diff --git a/card_counter_constants.lua b/card_counter_constants.lua index 7c3af49f60..519c86b596 100644 --- a/card_counter_constants.lua +++ b/card_counter_constants.lua @@ -20,6 +20,7 @@ CARD_CLEAR_WORLD = 33900648 CARD_CLOCK_LIZARD = 51476410 CARD_CRIMSON_DRAGON = 63436931 CARD_CRYSTAL_GOD_TISTINA = 86999951 +CARD_CRYSTAL_TREE = 47408488 CARD_CYBER_DRAGON = 70095154 CARD_DARK_FUSION = 94820406 CARD_DARK_MAGICIAN = 46986414 diff --git a/constant.lua b/constant.lua index ad7aa3658a..9591a53830 100644 --- a/constant.lua +++ b/constant.lua @@ -1018,5 +1018,6 @@ WIN_REASON_DEUCE = 0x54 WIN_REASON_DECK_MASTER = 0x56 WIN_REASON_DRAW_OF_FATE = 0x57 WIN_REASON_MUSICAL_SUMO = 0x58 +WIN_REASON_SUMMER_SCHOOLWORK = 0x59 Duel.LoadScript("card_counter_constants.lua") Duel.LoadScript("archetype_setcode_constants.lua") diff --git a/official/c10000000.lua b/official/c10000000.lua index 704b977ca7..962d835622 100644 --- a/official/c10000000.lua +++ b/official/c10000000.lua @@ -1,4 +1,5 @@ --オベリスクの巨神兵 +--Obelisk the Tormentor local s,id=GetID() function s.initial_effect(c) --summon with 3 tribute @@ -51,7 +52,7 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) Duel.SetChainLimitTillChainEnd(aux.FALSE) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) + return e:GetHandler():IsSpecialSummoned() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -70,7 +71,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) local g=Duel.SelectReleaseGroupCost(tp,nil,2,2,false,aux.ReleaseCheckTarget,nil,dg) Duel.Release(g,REASON_COST) @@ -83,4 +84,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10000010.lua b/official/c10000010.lua index 9cb8aa4c09..31eb547032 100644 --- a/official/c10000010.lua +++ b/official/c10000010.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_MZONE) - e4:SetCost(s.descost) + e4:SetCost(Cost.PayLP(1000)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4) @@ -76,10 +76,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end diff --git a/official/c10000020.lua b/official/c10000020.lua index 3d4b54cbb8..3f363d977d 100644 --- a/official/c10000020.lua +++ b/official/c10000020.lua @@ -59,7 +59,7 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) Duel.SetChainLimitTillChainEnd(aux.FALSE) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) + return e:GetHandler():IsSpecialSummoned() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -95,11 +95,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if preatk~=0 and tc:GetAttack()==0 then dg:AddCard(tc) end end if #dg==0 then return end Duel.BreakEffect() Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10000040.lua b/official/c10000040.lua index c4d31eb567..b255494ff8 100644 --- a/official/c10000040.lua +++ b/official/c10000040.lua @@ -35,13 +35,13 @@ function s.initial_effect(c) e4:SetOperation(s.winop) c:RegisterEffect(e4) end -s.listed_names={10000000,CARD_RA,10000020} +s.listed_names={CARD_OBELISK,CARD_RA,CARD_SLIFER} function s.spfilter(c,code) local code1,code2=c:GetOriginalCodeRule() return code1==code or code2==code end function s.rescon(sg,e,tp,mg) - return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg,Group.CreateGroup(),10000000,CARD_RA,10000020) + return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg,Group.CreateGroup(),CARD_OBELISK,CARD_RA,CARD_SLIFER) end function s.chk(c,sg,g,code,...) local code1,code2=c:GetOriginalCodeRule() @@ -60,9 +60,9 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local rg=Duel.GetReleaseGroup(tp) - local g1=rg:Filter(s.spfilter,nil,10000000) + local g1=rg:Filter(s.spfilter,nil,CARD_OBELISK) local g2=rg:Filter(s.spfilter,nil,CARD_RA) - local g3=rg:Filter(s.spfilter,nil,10000020) + local g3=rg:Filter(s.spfilter,nil,CARD_SLIFER) local g=g1:Clone() g:Merge(g2) g:Merge(g3) @@ -71,9 +71,9 @@ function s.spcon(e,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local rg=Duel.GetReleaseGroup(tp) - local g1=rg:Filter(s.spfilter,nil,10000000) + local g1=rg:Filter(s.spfilter,nil,CARD_OBELISK) local g2=rg:Filter(s.spfilter,nil,CARD_RA) - local g3=rg:Filter(s.spfilter,nil,10000020) + local g3=rg:Filter(s.spfilter,nil,CARD_SLIFER) g1:Merge(g2) g1:Merge(g3) local g1=aux.SelectUnselectGroup(g1,e,tp,3,3,s.rescon,1,tp,HINTMSG_RELEASE,s.rescon,nil,true) diff --git a/official/c10000080.lua b/official/c10000080.lua index 03b8d80ae0..f105a5e01b 100644 --- a/official/c10000080.lua +++ b/official/c10000080.lua @@ -52,7 +52,7 @@ function s.initial_effect(c) e9:SetCategory(CATEGORY_SPECIAL_SUMMON) e9:SetType(EFFECT_TYPE_IGNITION) e9:SetRange(LOCATION_MZONE) - e9:SetCost(s.spcost) + e9:SetCost(Cost.SelfTribute) e9:SetTarget(s.sptg) e9:SetOperation(s.spop) c:RegisterEffect(e9) @@ -66,7 +66,7 @@ function s.ttcon2(e,c,minc,zone,relzone,exeff) if type(ret)=="function" then ret={ret(exeff,c)} if #ret>1 then - zone=(ret[2]>>16)&0x7f + zone=(ret[2]>>16)&(ZONES_EMZ|ZONES_MMZ) end end end @@ -80,7 +80,7 @@ function s.tttg2(e,tp,eg,ep,ev,re,r,rp,chk,c,minc,zone,relzone,exeff) if type(ret)=="function" then ret={ret(exeff,c)} if #ret>1 then - zone=(ret[2]>>16)&0x7f + zone=(ret[2]>>16)&(ZONES_EMZ|ZONES_MMZ) end end end @@ -96,12 +96,12 @@ end function s.ttop2(e,tp,eg,ep,ev,re,r,rp,c,minc,zone,relzone,exeff) local g=e:GetLabelObject() c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) + Duel.Release(g,REASON_SUMMON|REASON_MATERIAL) g:DeleteGroup() end function s.retreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,2) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -110,7 +110,7 @@ function s.retreg(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) @@ -123,37 +123,33 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(c:GetOwner()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TEMP_REMOVE+RESET_TURN_SET)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_TURN_SET)) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(CARD_RA) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(4000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c10000090.lua b/official/c10000090.lua index 3e86ce1b3e..6ade5de05e 100644 --- a/official/c10000090.lua +++ b/official/c10000090.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_TOGRAVE) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) - e4:SetCost(s.tgcost) + e4:SetCost(Cost.PayLP(1000)) e4:SetTarget(s.tgtg) e4:SetOperation(s.tgop) c:RegisterEffect(e4) @@ -71,10 +71,6 @@ end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) @@ -93,16 +89,16 @@ end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c10004783.lua b/official/c10004783.lua index fe5736b575..e1ed34cb1c 100644 --- a/official/c10004783.lua +++ b/official/c10004783.lua @@ -1,7 +1,8 @@ --宝玉の解放 +--Crystal Release local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x1034)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_CRYSTAL_BEAST)) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -19,12 +20,12 @@ function s.initial_effect(c) e4:SetOperation(s.tfop) c:RegisterEffect(e4) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.tfcon(e,tp,eg,ep,ev,re,r,rp) return (e:GetHandler():GetPreviousLocation()&LOCATION_ONFIELD)~=0 end function s.tffilter(c) - return c:IsSetCard(0x1034) and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and not c:IsForbidden() end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -41,9 +42,9 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(tc,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end -end +end \ No newline at end of file diff --git a/official/c10012614.lua b/official/c10012614.lua index 9a1fb649f2..fad6f7cdd9 100644 --- a/official/c10012614.lua +++ b/official/c10012614.lua @@ -1,4 +1,5 @@ --勇気の旗印 +--Banner of Courage local s,id=GetID() function s.initial_effect(c) --activate @@ -17,7 +18,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.con(e) - local ph=Duel.GetCurrentPhase() - local tp=Duel.GetTurnPlayer() - return tp==e:GetHandlerPlayer() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE -end + return Duel.IsTurnPlayer(e:GetHandlerPlayer()) and Duel.IsBattlePhase() +end \ No newline at end of file diff --git a/official/c10024317.lua b/official/c10024317.lua index 4461e600ec..f2a61983d6 100644 --- a/official/c10024317.lua +++ b/official/c10024317.lua @@ -1,5 +1,5 @@ --- パラメタルフォーゼ・メルキャスター --- Parametalfoes Melcaster +--パラメタルフォーゼ・メルキャスター +--Parametalfoes Melcaster local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.desfilter(c,tp) if c:IsFacedown() then return false end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -39,7 +39,7 @@ function s.desfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end @@ -63,7 +63,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xe1) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_METALFOES) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -83,10 +83,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabel(code) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c10026986.lua b/official/c10026986.lua index 3d7c56811f..a7b1dabe83 100644 --- a/official/c10026986.lua +++ b/official/c10026986.lua @@ -1,4 +1,5 @@ --ワーム・キング +--Worm King local s,id=GetID() function s.initial_effect(c) --summon with 1 tribute @@ -15,9 +16,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.cfilter(c,tp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup()) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,tp) end @@ -36,4 +37,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10032958.lua b/official/c10032958.lua index dfb241e447..5bb0ceef88 100644 --- a/official/c10032958.lua +++ b/official/c10032958.lua @@ -1,4 +1,5 @@ --神竜-エクセリオン +--Divine Dragon - Excelion local s,id=GetID() function s.initial_effect(c) --to defense @@ -39,7 +40,7 @@ function s.reg(c,opt) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) elseif opt==1 then --chain attack @@ -49,7 +50,7 @@ function s.reg(c,opt) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.atcon) e1:SetOperation(s.atop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) else --damage @@ -62,7 +63,7 @@ function s.reg(c,opt) e1:SetCondition(aux.bdgcon) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -85,4 +86,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10035717.lua b/official/c10035717.lua index 05ecd30e7b..20136b5bf2 100644 --- a/official/c10035717.lua +++ b/official/c10035717.lua @@ -1,4 +1,5 @@ --ウェポンチェンジ +--Weapon Change local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,20 +16,16 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.adcon) - e2:SetCost(s.adcost) + e2:SetCost(Cost.PayLP(700)) e2:SetTarget(s.adtg) e2:SetOperation(s.adop) c:RegisterEffect(e2) end function s.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,700) end - Duel.PayLPCost(tp,700) + return Duel.IsTurnPlayer(tp) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_WARRIOR) and c:IsDefenseAbove(0) + return c:IsFaceup() and c:IsRace(RACE_MACHINE|RACE_WARRIOR) and c:IsDefenseAbove(0) end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -46,13 +43,13 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c1003840.lua b/official/c1003840.lua index 3a343df37c..fcd7c1e6db 100644 --- a/official/c1003840.lua +++ b/official/c1003840.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x1017} +s.listed_series={SET_SYNCHRON} function s.cfilter(c,e,tp,ft) local lv=c:GetLevel() return lv>0 and c:IsType(TYPE_TUNER) @@ -39,7 +39,7 @@ function s.cfilter(c,e,tp,ft) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) end function s.spfilter(c,e,tp,lv) - return c:IsSetCard(0x1017) and c:GetLevel()~=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SYNCHRON) and c:GetLevel()~=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) diff --git a/official/c10040267.lua b/official/c10040267.lua index aa122e7560..f18d3d12e7 100644 --- a/official/c10040267.lua +++ b/official/c10040267.lua @@ -1,7 +1,6 @@ --新生代化石マシン スカルバギ --Fossil Machine Skull Buggy --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -35,7 +34,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) e2:SetCountLimit(1,id) @@ -43,7 +42,6 @@ function s.initial_effect(c) end --Specifically lists "Fossil Fusion" s.listed_names={CARD_FOSSIL_FUSION} - --Check for a rock monster in your GY function s.ffilter(c,fc,sumtype,tp) return c:IsRace(RACE_ROCK) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) @@ -77,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c1005587.lua b/official/c1005587.lua index 7896772627..341bd9c3e6 100644 --- a/official/c1005587.lua +++ b/official/c1005587.lua @@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.AdjustInstantly() Duel.NegateRelatedChain(tc,RESET_TURN_SET) diff --git a/official/c10060427.lua b/official/c10060427.lua index b3b36dd15e..b308e62827 100644 --- a/official/c10060427.lua +++ b/official/c10060427.lua @@ -1,4 +1,5 @@ --コアキメイル・ルークロード +--Koa'ki Meiru Rooklord local s,id=GetID() function s.initial_effect(c) --cost @@ -26,10 +27,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -68,15 +69,15 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.otfilter(c,tp) - return c:IsSetCard(0x1d) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_KOAKI_MEIRU) and (c:IsControler(tp) or c:IsFaceup()) end function s.dfilter(c) - return c:IsSetCard(0x1d) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_KOAKI_MEIRU) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -92,4 +93,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1006081.lua b/official/c1006081.lua index b19a2b6334..18dc7c3142 100644 --- a/official/c1006081.lua +++ b/official/c1006081.lua @@ -1,5 +1,5 @@ --ジャンク・チェンジャー ---Junk Charger +--Junk Changer local s,id=GetID() function s.initial_effect(c) --lv up @@ -16,9 +16,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.filter(c) - return c:IsFaceup() and c:HasLevel() and c:IsSetCard(0x43) + return c:IsFaceup() and c:HasLevel() and c:IsSetCard(SET_JUNK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -42,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) if e:GetLabel()==0 then e1:SetValue(1) else diff --git a/official/c10065487.lua b/official/c10065487.lua index 76d450652c..a84515c6b8 100644 --- a/official/c10065487.lua +++ b/official/c10065487.lua @@ -19,7 +19,7 @@ s.listed_names={CARD_ALBAZ} function s.tdfilter(c,e,tp) return c:IsCanBeEffectTarget(e) and c:IsAbleToDeck() and ((c:IsControler(tp) and c:IsFaceup() and c:IsType(TYPE_FUSION)) - or (c:IsControler(1-tp) and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_EXTRA))) + or (c:IsControler(1-tp) and c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_EXTRA))) end function s.rescon(sg,e,tp,mg) return sg:FilterCount(Card.IsControler,nil,tp)==1 diff --git a/official/c10069180.lua b/official/c10069180.lua index 9e27ad26aa..cdc90f1c2d 100644 --- a/official/c10069180.lua +++ b/official/c10069180.lua @@ -1,4 +1,5 @@ --魔力終了宣告 +--Spell-Stopping Statute local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c10071151.lua b/official/c10071151.lua index 3c1b7985a9..f581460241 100644 --- a/official/c10071151.lua +++ b/official/c10071151.lua @@ -29,18 +29,18 @@ function s.initial_effect(c) e3:SetOperation(s.ddop) c:RegisterEffect(e3) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x38) and c:IsAbleToRemoveAsCost() + return c:IsMonster() and c:IsSetCard(SET_LIGHTSWORN) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.desfilter(c) @@ -62,8 +62,8 @@ end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c - and rc:IsSetCard(0x38) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c + and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsControler(tp) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -71,4 +71,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10080320.lua b/official/c10080320.lua index e3a189d929..8b39262d44 100644 --- a/official/c10080320.lua +++ b/official/c10080320.lua @@ -1,4 +1,5 @@ --ジュラシックワールド +--Jurassic World local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c10097168.lua b/official/c10097168.lua index 77d9aeb073..df9bf3b467 100644 --- a/official/c10097168.lua +++ b/official/c10097168.lua @@ -1,4 +1,5 @@ --タイガードラゴン +--Tiger Dragon local s,id=GetID() function s.initial_effect(c) --summon success @@ -29,7 +30,7 @@ function s.valcheck(e,c) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.filter(c) return c:IsFacedown() and c:GetSequence()~=5 @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10117149.lua b/official/c10117149.lua index e9a545792b..da19ef8d60 100644 --- a/official/c10117149.lua +++ b/official/c10117149.lua @@ -47,9 +47,9 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xab) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DESKBOT) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end @@ -65,10 +65,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0xab),c:GetControler(),LOCATION_EXTRA,0,nil)*500 + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DESKBOT),c:GetControler(),LOCATION_EXTRA,0,nil)*500 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xab) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESKBOT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c10118318.lua b/official/c10118318.lua index 32ccebbb9d..a62867c6f0 100644 --- a/official/c10118318.lua +++ b/official/c10118318.lua @@ -20,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c10132124.lua b/official/c10132124.lua index 450dd5d93d..ee89d7762d 100644 --- a/official/c10132124.lua +++ b/official/c10132124.lua @@ -1,4 +1,5 @@ --ウイングトータス +--Wingtortoise local s,id=GetID() function s.initial_effect(c) --special summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_REMOVE) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -15,7 +16,7 @@ function s.initial_effect(c) end function s.spfilter(c,tp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousControler(tp) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + and c:IsPreviousControler(tp) and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spfilter,1,nil,tp) @@ -29,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c10158145.lua b/official/c10158145.lua index 377fe17a72..3fec7429b5 100644 --- a/official/c10158145.lua +++ b/official/c10158145.lua @@ -64,18 +64,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end Duel.SpecialSummonComplete() @@ -101,4 +101,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c10178757.lua b/official/c10178757.lua index a44f5f2f62..c7abfbd637 100644 --- a/official/c10178757.lua +++ b/official/c10178757.lua @@ -1,4 +1,5 @@ --レアル・ジェネクス・オラクル +--R-Genex Oracle local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,13 +21,13 @@ function s.initial_effect(c) e2:SetValue(s.synlimit) c:RegisterEffect(e2) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x2) + return not c:IsSetCard(SET_GENEX) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_EFFECT)>0 and re:GetHandler():IsSetCard(0x2) + return (r&REASON_EFFECT)>0 and re:GetHandler():IsSetCard(SET_GENEX) and e:GetHandler():GetPreviousLocation()==LOCATION_DECK and e:GetHandler():IsPreviousControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c10182251.lua b/official/c10182251.lua index 4f5b0e8169..ce4569e625 100644 --- a/official/c10182251.lua +++ b/official/c10182251.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) end --Special Summon function s.spfilter(c,e,tp) - return c:IsSetCard(0xf7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LYRILUSC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -34,7 +34,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc+Group.FromCards(c),2,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc+Group.FromCards(c),2,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp,s.lizfilter) @@ -74,7 +74,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) --Possession cannot switch local e2=Effect.CreateEffect(rc) @@ -82,14 +82,14 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2) if not rc:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end -end +end \ No newline at end of file diff --git a/official/c10186633.lua b/official/c10186633.lua index 2d6c1037b9..72c100e7bd 100644 --- a/official/c10186633.lua +++ b/official/c10186633.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) @@ -75,7 +75,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg,true) if Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==#sg then local og=Duel.GetOperatedGroup() - if og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)~=#sg then return end + if og:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA)~=#sg then return end Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) diff --git a/official/c10189126.lua b/official/c10189126.lua index 3639f692f0..3b6b6bf0e5 100644 --- a/official/c10189126.lua +++ b/official/c10189126.lua @@ -1,4 +1,5 @@ --仮面魔道士 +--Masked Sorcerer local s,id=GetID() function s.initial_effect(c) --draw diff --git a/official/c10194329.lua b/official/c10194329.lua index 7c1f754d17..de6d026765 100644 --- a/official/c10194329.lua +++ b/official/c10194329.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_BATTLE+REASON_EFFECT)~=0 end @@ -33,17 +33,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) - if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xba) and c:IsLocation(LOCATION_EXTRA) + return not c:IsSetCard(SET_RAIDRAPTOR) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xba) + return not c:IsOriginalSetCard(SET_RAIDRAPTOR) end \ No newline at end of file diff --git a/official/c10204849.lua b/official/c10204849.lua index 8b6a54edbc..1839d5aabd 100644 --- a/official/c10204849.lua +++ b/official/c10204849.lua @@ -68,19 +68,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_EQUIP_LIMIT) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) e0:SetValue(s.eqlimit) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.eqlimit(e,c) @@ -125,6 +125,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(true) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c10209545.lua b/official/c10209545.lua index 8d5e24ff6d..a5bc235e1b 100644 --- a/official/c10209545.lua +++ b/official/c10209545.lua @@ -1,4 +1,5 @@ --朽ち果てた武将 +--Decayed Commander local s,id=GetID() function s.initial_effect(c) --spsummon @@ -49,5 +50,5 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end diff --git a/official/c10218411.lua b/official/c10218411.lua index 415b29bd56..30c8206625 100644 --- a/official/c10218411.lua +++ b/official/c10218411.lua @@ -4,13 +4,9 @@ local s,id=GetID() function s.initial_effect(c) local e1=Fusion.CreateSummonEff({handler=c,stage2=s.stage2}) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.stage2(e,tc,tp,sg,chk) if chk==1 then if Fusion.SummonEffTG()(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then diff --git a/official/c10236520.lua b/official/c10236520.lua index c5692461f3..9b2ec85afc 100644 --- a/official/c10236520.lua +++ b/official/c10236520.lua @@ -1,4 +1,5 @@ --忍者義賊ゴエゴエ +--Goe Goe the Gallant Ninja local s,id=GetID() function s.initial_effect(c) --handes @@ -23,5 +24,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g<5 then return end local sg=g:RandomSelect(1-tp,2) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) end diff --git a/official/c10239627.lua b/official/c10239627.lua index d7585014b3..77278f497a 100644 --- a/official/c10239627.lua +++ b/official/c10239627.lua @@ -2,7 +2,7 @@ --Magical Abductor local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE+LOCATION_MZONE) + c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE|LOCATION_MZONE) --pendulum summon Pendulum.AddProcedure(c) --add counter @@ -10,13 +10,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_PZONE+LOCATION_MZONE) + e2:SetRange(LOCATION_PZONE|LOCATION_MZONE) e2:SetOperation(aux.chainreg) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetCode(EVENT_CHAIN_SOLVED) - e3:SetRange(LOCATION_PZONE+LOCATION_MZONE) + e3:SetRange(LOCATION_PZONE|LOCATION_MZONE) e3:SetOperation(s.acop) c:RegisterEffect(e3) --to hand @@ -45,7 +45,7 @@ function s.initial_effect(c) end s.counter_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -86,4 +86,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) end function s.atkval(e,c) return e:GetHandler():GetCounter(COUNTER_SPELL)*100 -end +end \ No newline at end of file diff --git a/official/c10248192.lua b/official/c10248192.lua index c0a7aa8e51..2de8de65bc 100644 --- a/official/c10248192.lua +++ b/official/c10248192.lua @@ -1,4 +1,5 @@ --ヒエログリフの石版 +--Hieroglyph Lithograph local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,15 +7,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) diff --git a/official/c10248389.lua b/official/c10248389.lua index 083df90fe5..a55f91f6c6 100644 --- a/official/c10248389.lua +++ b/official/c10248389.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.material_setcode=0x93 +s.material_setcode=SET_CYBER function s.con(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==e:GetLabel() end @@ -45,4 +45,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if rp~=tp then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c10275411.lua b/official/c10275411.lua index 5ba0dec4ae..3ba2d9a500 100644 --- a/official/c10275411.lua +++ b/official/c10275411.lua @@ -1,4 +1,5 @@ --エクシーズ・リベンジ +--Xyz Revenge local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c10282757.lua b/official/c10282757.lua index caa76f00e6..6e982680fa 100644 --- a/official/c10282757.lua +++ b/official/c10282757.lua @@ -1,4 +1,5 @@ --プランクスケール +--Planckton local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetValue(500) e1:SetTarget(s.filter1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTarget(s.filter2) Duel.RegisterEffect(e3,tp) end @@ -34,4 +35,4 @@ function s.filter1(e,c) end function s.filter2(e,c) return c:IsType(TYPE_XYZ) and c:IsRankAbove(4) -end +end \ No newline at end of file diff --git a/official/c10286023.lua b/official/c10286023.lua index 2e7ddd22f8..882b7714f3 100644 --- a/official/c10286023.lua +++ b/official/c10286023.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.dtcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x140) + return re and re:GetHandler():IsSetCard(SET_ADAMANCIPATOR) end function s.dttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -43,10 +43,10 @@ function s.tdfilter(c) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and c:IsAbleToDeck() end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) and c:IsAbleToDeck() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tc=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil):GetFirst() Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_GRAVE) if tc:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) diff --git a/official/c10300821.lua b/official/c10300821.lua index e90ef58d9b..9d0147c7d7 100644 --- a/official/c10300821.lua +++ b/official/c10300821.lua @@ -80,4 +80,4 @@ function s.tgattachop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,tc,true) end end -end +end \ No newline at end of file diff --git a/official/c10312660.lua b/official/c10312660.lua index 5d4facf056..c4adf099a6 100644 --- a/official/c10312660.lua +++ b/official/c10312660.lua @@ -1,5 +1,5 @@ --未界域の歓待 ---You are in Danger! +--You're in Danger! --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} function s.spfilter(c,e,tp) - return c:IsSetCard(0x11e) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsPublic() + return c:IsSetCard(SET_DANGER) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsPublic() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rvg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=tg:GetFirst() if tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -54,4 +54,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10333641.lua b/official/c10333641.lua index bbe2b322f4..5ff1012e00 100644 --- a/official/c10333641.lua +++ b/official/c10333641.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.gycon) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c10352095.lua b/official/c10352095.lua index b1f1d87027..39696d0b62 100644 --- a/official/c10352095.lua +++ b/official/c10352095.lua @@ -14,7 +14,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,tc,chk) if chk==0 then return true end local rc=tc:AnnounceAnotherAttribute(tp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,rc) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,rc) e:GetHandler():SetHint(CHINT_ATTRIBUTE,rc) end function s.attcon(e) @@ -22,4 +22,4 @@ function s.attcon(e) end function s.value(e,c) return e:GetHandler():GetFlagEffectLabel(id) -end +end \ No newline at end of file diff --git a/official/c10365322.lua b/official/c10365322.lua index a4b3ce479a..857a8f7e1f 100644 --- a/official/c10365322.lua +++ b/official/c10365322.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -41,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1036974.lua b/official/c1036974.lua index 76e760a704..a3bbfaac57 100644 --- a/official/c1036974.lua +++ b/official/c1036974.lua @@ -19,7 +19,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c10375182.lua b/official/c10375182.lua index c7ea546bdd..c1166c4f59 100644 --- a/official/c10375182.lua +++ b/official/c10375182.lua @@ -1,4 +1,5 @@ --コマンド・ナイト +--Command Knight local s,id=GetID() function s.initial_effect(c) --cannot be battle target diff --git a/official/c10383554.lua b/official/c10383554.lua index ea50f3944e..2dd514f731 100644 --- a/official/c10383554.lua +++ b/official/c10383554.lua @@ -1,12 +1,11 @@ --デストーイ・ホイールソウ・ライオ --Frightfur Leo - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcMix(c,true,true,34688023,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9)) + Fusion.AddProcMix(c,true,true,34688023,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL)) --Must be fusion summoned local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -26,9 +25,8 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xa9} -s.material_setcode={0xa9,0xc3} - +s.listed_series={SET_FLUFFAL} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsDirectAttacked() end --Cannot attack directly @@ -37,7 +35,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c10389142.lua b/official/c10389142.lua index 74fe29e82f..aa10a91479 100644 --- a/official/c10389142.lua +++ b/official/c10389142.lua @@ -28,7 +28,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) for i=1,ft do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - token:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + token:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) g:AddCard(token) end Duel.SpecialSummonComplete() @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetLabel(fid) e1:SetLabelObject(g) @@ -81,4 +81,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tg=g:Filter(s.desfilter,nil,e:GetLabel()) g:DeleteGroup() Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10389794.lua b/official/c10389794.lua index 56f4cd77f1..f3e40f04de 100644 --- a/official/c10389794.lua +++ b/official/c10389794.lua @@ -1,4 +1,5 @@ --デス・ドーナツ +--Doom Donuts local s,id=GetID() function s.initial_effect(c) --flip diff --git a/official/c10406322.lua b/official/c10406322.lua index 5860bc0f25..b457c4430e 100644 --- a/official/c10406322.lua +++ b/official/c10406322.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.tdcon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c10424147.lua b/official/c10424147.lua index e439126c76..63400c9ae6 100644 --- a/official/c10424147.lua +++ b/official/c10424147.lua @@ -25,24 +25,24 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_FZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(s.spcost2) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x10dc,0x20dc} +s.listed_series={SET_SUPER_QUANTUM,SET_SUPER_QUANTAL_MECH_BEAST} s.listed_names={84025439} function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return #pg<=1 and c:IsFaceup() and c:IsSetCard(0x10dc) + return #pg<=1 and c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANTUM) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetAttribute(),pg) end function s.spfilter2(c,e,tp,mc,att,pg) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x20dc) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsAttribute(att) and mc:IsCanBeXyzMaterial(c,tp) and (#pg<=0 or pg:IsContains(mc)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -68,18 +68,14 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter3(c,e) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x20dc) and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsType(TYPE_XYZ) and c:IsCanBeEffectTarget(e) end function s.spfilter4(c,e,tp,rp) return c:IsCode(84025439) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - local g=Duel.GetMatchingGroup(s.spfilter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) + local g=Duel.GetMatchingGroup(s.spfilter3,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e) if chk==0 then return g:GetClassCount(Card.GetCode)>2 and Duel.IsExistingMatchingCard(s.spfilter4,tp,LOCATION_EXTRA,0,1,nil,e,tp) end local eg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_XMATERIAL) @@ -94,4 +90,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e):Match(aux.NOT(Card.IsImmuneToEffect),nil,e) Duel.Overlay(sc,g) end -end +end \ No newline at end of file diff --git a/official/c10441498.lua b/official/c10441498.lua index 1120839eff..40afa2e78c 100644 --- a/official/c10441498.lua +++ b/official/c10441498.lua @@ -55,12 +55,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.thfilter2(c,tp) - return c:IsMonster() and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and c:IsPreviousControler(tp) + return c:IsMonster() and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) and c:IsPreviousControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thfilter2,1,e:GetHandler(),tp) @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10443957.lua b/official/c10443957.lua index bfd8a5c60a..eb52b3ba0c 100644 --- a/official/c10443957.lua +++ b/official/c10443957.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.discon) - e3:SetCost(s.discost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -45,7 +45,7 @@ function s.ovfilter(c,tp,lc) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.atkval(e,c) @@ -72,10 +72,6 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -87,4 +83,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10449150.lua b/official/c10449150.lua index bf70dc9ca4..b693a67534 100644 --- a/official/c10449150.lua +++ b/official/c10449150.lua @@ -1,4 +1,5 @@ --シャトルロイド +--Shuttleroid local s,id=GetID() function s.initial_effect(c) --remove @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_REMOVED) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) @@ -40,11 +41,11 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end @@ -69,4 +70,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1045143.lua b/official/c1045143.lua index 213ce6b7de..6d403b6ad7 100644 --- a/official/c1045143.lua +++ b/official/c1045143.lua @@ -15,20 +15,20 @@ function s.initial_effect(c) e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} function s.filter(c,e,tp) - return c:IsSetCard(0x72) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GEARGIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c10456559.lua b/official/c10456559.lua index bee295d750..698abb56f8 100644 --- a/official/c10456559.lua +++ b/official/c10456559.lua @@ -1,4 +1,5 @@ --悪魂邪苦止 +--T.A.D.P.O.L.E. local s,id=GetID() function s.initial_effect(c) --add diff --git a/official/c1047075.lua b/official/c1047075.lua index 4404c62255..92f1ed8f3e 100644 --- a/official/c1047075.lua +++ b/official/c1047075.lua @@ -1,4 +1,4 @@ --- +--闘炎の剣士 --Fighting Flame Swordsman --scripted by Naim local s,id=GetID() diff --git a/official/c10474647.lua b/official/c10474647.lua index 094aa3e8bb..c4bb9dca60 100644 --- a/official/c10474647.lua +++ b/official/c10474647.lua @@ -63,7 +63,7 @@ function s.atk2500op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(2500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,ct) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,ct) c:RegisterEffect(e1) end end diff --git a/official/c10485110.lua b/official/c10485110.lua index 971ead76a8..cff9dce831 100644 --- a/official/c10485110.lua +++ b/official/c10485110.lua @@ -61,11 +61,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0xe,0xe,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD,1,e:GetHandler()) end + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,e:GetHandler()) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10489311.lua b/official/c10489311.lua index 7b128f1b8f..8a6086b065 100644 --- a/official/c10489311.lua +++ b/official/c10489311.lua @@ -1,4 +1,5 @@ --ヒーロー・メダル +--Hero Medal local s,id=GetID() function s.initial_effect(c) --draw @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&0x41)==0x41 and rp~=tp and c:IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -24,7 +25,7 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) Duel.Draw(tp,1,REASON_EFFECT) end diff --git a/official/c10497636.lua b/official/c10497636.lua index fbbb422d7b..e019face40 100644 --- a/official/c10497636.lua +++ b/official/c10497636.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - local timing=TIMING_BATTLE_PHASE+TIMING_BATTLE_END+TIMING_DAMAGE_STEP+TIMING_ATTACK+TIMING_BATTLE_START + local timing=TIMING_BATTLE_PHASE|TIMING_BATTLE_END|TIMING_DAMAGE_STEP|TIMING_ATTACK|TIMING_BATTLE_START e3:SetHintTiming(timing,timing) e3:SetCountLimit(1) e3:SetCondition(s.atkcon) @@ -44,7 +44,7 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} function s.checkfilter(c) return c and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) end @@ -52,10 +52,10 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsDamageCalculated() then return end local bc0,bc1=Duel.GetBattleMonster(0) if s.checkfilter(bc0) then - Duel.RegisterFlagEffect(bc0:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(bc0:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end if s.checkfilter(bc1) then - Duel.RegisterFlagEffect(bc1:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(bc1:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -73,7 +73,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -87,7 +87,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTarget(s.distg) e3:SetLabel(tc:GetOriginalCodeRule()) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -95,7 +95,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e4:SetCondition(s.discon) e4:SetOperation(s.disop) e4:SetLabel(tc:GetOriginalCodeRule()) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end end @@ -108,7 +108,7 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() local code1,code2=re:GetHandler():GetOriginalCodeRule() - return re:IsActiveType(TYPE_MONSTER) and (code1==code or code2==code) + return re:IsMonsterEffect() and (code1==code or code2==code) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) @@ -116,10 +116,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsBattlePhase() and Duel.GetFlagEffect(tp,id)>0 - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x161),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WAR_ROCK),tp,LOCATION_MZONE,0,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -131,17 +131,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1,true) end - local atkg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x161),tp,LOCATION_MZONE,0,nil) - for tc in aux.Next(atkg) do + local atkg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_WAR_ROCK),tp,LOCATION_MZONE,0,nil) + for tc in atkg:Iter() do --Increase ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e2:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e2:SetValue(200) tc:RegisterEffect(e2) end diff --git a/official/c1050355.lua b/official/c1050355.lua index b8761900ff..e5d06f7527 100644 --- a/official/c1050355.lua +++ b/official/c1050355.lua @@ -1,7 +1,6 @@ --闇黒の夢魔鏡 --Dream Mirror of Terror --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tftg) e2:SetOperation(s.tfop) c:RegisterEffect(e2) @@ -30,29 +29,25 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_DREAM_MIRROR_JOY} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.filter(c,tp) return c:IsCode(CARD_DREAM_MIRROR_JOY) and c:GetActivateEffect():IsActivatable(tp,true,true) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,tp) end if not Duel.CheckPhaseActivity() then Duel.RegisterFlagEffect(tp,CARD_MAGICAL_MIDBREAKER,RESET_CHAIN,0,1) end end function s.tfop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,tp):GetFirst() Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) end function s.damfilter(c) - return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_DARK) -end -function s.cfilter(c,tp) - return c:GetSummonPlayer()==tp + return c:IsFaceup() and c:IsSetCard(SET_DREAM_MIRROR) and c:IsAttribute(ATTRIBUTE_DARK) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.damfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) - and eg:IsExists(s.cfilter,1,nil,1-tp) + and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) diff --git a/official/c10505300.lua b/official/c10505300.lua index b5bf84e388..28e007dd03 100644 --- a/official/c10505300.lua +++ b/official/c10505300.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.drcost) + e2:SetCost(Cost.SelfTribute) e2:SetOperation(s.drop) c:RegisterEffect(e2) end @@ -30,10 +30,6 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.drop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -41,6 +37,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(2) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,1) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c1050684.lua b/official/c1050684.lua index d15fff1389..77e0e91fb1 100644 --- a/official/c1050684.lua +++ b/official/c1050684.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.filter(c) - return c:IsSetCard(0x24) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() + return c:IsSetCard(SET_SCRAP) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c10509340.lua b/official/c10509340.lua index 6a8772ac6a..137f8e4bcc 100644 --- a/official/c10509340.lua +++ b/official/c10509340.lua @@ -1,4 +1,5 @@ --古代の機械獣 +--Ancient Gear Beast local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -32,12 +33,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) d:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) d:RegisterEffect(e2) end function s.aclimit(e,re,tp) @@ -45,4 +46,4 @@ function s.aclimit(e,re,tp) end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c10526791.lua b/official/c10526791.lua index 75027dc757..920e843978 100644 --- a/official/c10526791.lua +++ b/official/c10526791.lua @@ -1,4 +1,5 @@ --E・HERO ワイルドジャギーマン +--Elemental HERO Wildedge local s,id=GetID() function s.initial_effect(c) --fusion material @@ -18,4 +19,4 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} \ No newline at end of file diff --git a/official/c10532969.lua b/official/c10532969.lua index fbca413403..bf5153d8ff 100644 --- a/official/c10532969.lua +++ b/official/c10532969.lua @@ -1,4 +1,5 @@ --エンシェント・シャーク ハイパー・メガロドン +--Hyper-Ancient Shark Megalodon local s,id=GetID() function s.initial_effect(c) --destroy diff --git a/official/c10537981.lua b/official/c10537981.lua index 035d391dad..1d02f5b8ce 100644 --- a/official/c10537981.lua +++ b/official/c10537981.lua @@ -1,4 +1,5 @@ --リターンソウル +--Return Soul local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.filter(c,tid) return c:IsReason(REASON_DESTROY) and c:IsMonster() and c:GetTurnID()==tid diff --git a/official/c10547580.lua b/official/c10547580.lua index 61d88e4a5b..063047fb7d 100644 --- a/official/c10547580.lua +++ b/official/c10547580.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c10552026.lua b/official/c10552026.lua index bfa41683b3..0f7fb6b44c 100644 --- a/official/c10552026.lua +++ b/official/c10552026.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) --Negate monster effect local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -19,14 +19,14 @@ function s.initial_effect(c) e1:SetOperation(s.negop) c:RegisterEffect(e1) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end local loc,seq,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_CONTROLER) if p==1-tp then seq=seq+16 end - return re:IsActiveType(TYPE_MONSTER) and (loc&LOCATION_MZONE)~=0 and bit.extract(c:GetLinkedZone(),seq)~=0 and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and (loc&LOCATION_MZONE)~=0 and bit.extract(c:GetLinkedZone(),seq)~=0 and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,7 +37,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then diff --git a/official/c10560119.lua b/official/c10560119.lua index 1e894cc377..a55e323de6 100644 --- a/official/c10560119.lua +++ b/official/c10560119.lua @@ -1,6 +1,5 @@ --フィッシュボーグ-ドクター --Fishborg Doctor - local s,id=GetID() function s.initial_effect(c) --Destroy this card if player has a non-"Fishborg" monster @@ -23,10 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x96} - +s.listed_series={SET_FISHBORG} function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x96) + return c:IsFacedown() or not c:IsSetCard(SET_FISHBORG) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -49,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c10584050.lua b/official/c10584050.lua index c31a9c2e02..de66fb8168 100644 --- a/official/c10584050.lua +++ b/official/c10584050.lua @@ -1,5 +1,5 @@ --スプリガンズ・ブラスト! ---Sprigguns Blast! +--Springans Blast! --scripted by aforaverage.46 local s,id=GetID() function s.initial_effect(c) @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x158} +s.listed_series={SET_SPRINGANS} s.listed_names={CARD_ALBAZ} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x158),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SPRINGANS),tp,LOCATION_MZONE,0,1,nil) end function s.bonusfilter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_ALBAZ) @@ -26,12 +26,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end local seqs={} Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local zone1=Duel.SelectFieldZone(tp,1,0,LOCATION_MZONE,0x60<<16) + local zone1=Duel.SelectFieldZone(tp,1,0,LOCATION_MZONE,ZONES_EMZ<<16) table.insert(seqs, math.log(zone1,2)-16) Duel.Hint(HINT_ZONE,tp,zone1) if Duel.IsExistingMatchingCard(s.bonusfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local zone2=Duel.SelectFieldZone(tp,1,0,LOCATION_MZONE,(0x60<<16)|zone1) + local zone2=Duel.SelectFieldZone(tp,1,0,LOCATION_MZONE,(ZONES_EMZ<<16)|zone1) table.insert(seqs, math.log(zone2,2)-16) Duel.Hint(HINT_ZONE,tp,zone2) end @@ -45,26 +45,26 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) z1:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) z1:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) z1:RegisterEffect(e3) elseif z1==nil then local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_DISABLE_FIELD) e4:SetValue((1<0 end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c10604644.lua b/official/c10604644.lua index cf3fd9196b..e7f4053eb0 100644 --- a/official/c10604644.lua +++ b/official/c10604644.lua @@ -1,9 +1,9 @@ --- セリオンズ“キング”レギュラス --- Therions' "King" Regulus --- Scripted by Hatter +--セリオンズ“キング”レギュラス +--Therion "King" Regulus +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) - -- Negate effect + --Negate effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DISABLE) @@ -28,25 +28,25 @@ function s.initial_effect(c) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) - -- Equipped monster gains ATK + --Equipped monster gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x17b) end) + e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_THERION) end) e3:SetValue(700) c:RegisterEffect(e3) - -- Equipped monster gains effect + --Equipped monster gains effect local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x17b) end) + e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(SET_THERION) end) e4:SetLabelObject(e2) c:RegisterEffect(e4) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.eqfilter(c) - return c:IsMonster() and (c:IsSetCard(0x17b) or c:IsRace(RACE_MACHINE)) + return c:IsMonster() and (c:IsSetCard(SET_THERION) or c:IsRace(RACE_MACHINE)) end function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) @@ -78,14 +78,14 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and Duel.IsChainDisablable(ev) end function s.discostfilter(c) - return c:IsSetCard(0x17b) and c:IsOriginalType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_THERION) and c:IsOriginalType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.discostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.discostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c1061200.lua b/official/c1061200.lua index cf5bb43637..d6f0681a43 100644 --- a/official/c1061200.lua +++ b/official/c1061200.lua @@ -1,8 +1,8 @@ +--F.A.シティGP --F.A. City Grand Prix ---Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) - --activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FA)) e2:SetValue(2) e2:SetCondition(s.lvcon) c:RegisterEffect(e2) @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_FZONE) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FA)) e3:SetValue(aux.tgoval) c:RegisterEffect(e3) --to hand @@ -39,18 +39,17 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x107} +s.listed_series={SET_FA} s.listed_names={id} function s.lvcon(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) + return Duel.IsMainPhase() or Duel.IsBattlePhase() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.thfilter(c) - return c:IsSetCard(0x107) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_FA) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c10612222.lua b/official/c10612222.lua index e376ada469..01ccc1857d 100644 --- a/official/c10612222.lua +++ b/official/c10612222.lua @@ -1,5 +1,5 @@ --妖仙獣の居太刀風 ---Yosenju Weaselblade Wind +--Yosenjus' Sword Sting --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -10,19 +10,19 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.cfilter(c) - return c:IsSetCard(0xb3) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_YOSENJU) and c:IsMonster() and not c:IsPublic() end function s.filter(c,e) return c:IsFaceup() and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) @@ -52,4 +52,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10613952.lua b/official/c10613952.lua index 131e107e30..f647dfd437 100644 --- a/official/c10613952.lua +++ b/official/c10613952.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x107a),5,2) + Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_NOBLE_KNIGHT),5,2) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,12 +40,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x207a,0x107a} +s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.filter(c,e,tp,ec) - return c:IsSetCard(0x207a) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) + return c:IsSetCard(SET_NOBLE_ARMS) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -70,10 +70,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.EquipComplete() end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end @@ -91,7 +87,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -106,4 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c10642488.lua b/official/c10642488.lua index c79422e7ed..a38c68bd54 100644 --- a/official/c10642488.lua +++ b/official/c10642488.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) e1:SetTarget(s.target) @@ -41,11 +41,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end function s.atktg(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c10651797.lua b/official/c10651797.lua index 0c2d2e9d06..bcb3dde96f 100644 --- a/official/c10651797.lua +++ b/official/c10651797.lua @@ -1,4 +1,5 @@ --ツバメ返し +--Swallow Flip local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetCode()==EVENT_SPSUMMON_SUCCESS and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and re:GetCode()==EVENT_SPSUMMON_SUCCESS and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c10666000.lua b/official/c10666000.lua index 92ce9b70cb..9d1fa29e35 100644 --- a/official/c10666000.lua +++ b/official/c10666000.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_LEAVE_GRAVE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c10667321.lua b/official/c10667321.lua index 5074d50e75..bdf9949095 100644 --- a/official/c10667321.lua +++ b/official/c10667321.lua @@ -1,4 +1,5 @@ --古のルール +--Ancient Rules local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c10669138.lua b/official/c10669138.lua index c2fd801c91..be4d117ab1 100644 --- a/official/c10669138.lua +++ b/official/c10669138.lua @@ -1,5 +1,5 @@ --L・G・D ---Link God Dragon +--Five-Headed Link Dragon --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -55,7 +55,7 @@ function s.initial_effect(c) c:RegisterEffect(e6) end function s.valcheck(e,c) - local g=c:GetMaterial():Filter(Card.IsAttribute,nil,0x2f) + local g=c:GetMaterial():Filter(Card.IsAttribute,nil,ATTRIBUTE_DARK|ATTRIBUTE_WIND|ATTRIBUTE_FIRE|ATTRIBUTE_WATER|ATTRIBUTE_EARTH) if #g==5 and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_EARTH) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WIND) @@ -66,7 +66,7 @@ function s.valcheck(e,c) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1 + return e:GetHandler():IsLinkSummoned() and e:GetLabel()==1 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) @@ -83,10 +83,10 @@ function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end function s.batfilter(e,c) - return c:IsAttribute(0x2f) + return c:IsAttribute(ATTRIBUTE_DARK|ATTRIBUTE_WIND|ATTRIBUTE_FIRE|ATTRIBUTE_WATER|ATTRIBUTE_EARTH) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -105,5 +105,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(c,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c10678778.lua b/official/c10678778.lua index 36c47101b3..0d4060db48 100644 --- a/official/c10678778.lua +++ b/official/c10678778.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -50,13 +50,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,tp) local ctype=(c:GetType()&TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) return c:IsFaceup() and ctype~=0 and c:IsAbleToExtra() @@ -74,10 +70,10 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then local ctype=(tc:GetType()&TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsType,ctype),tp,0,LOCATION_MZONE,1,1,nil) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10691144.lua b/official/c10691144.lua index 4dcd0bddff..72003b705e 100644 --- a/official/c10691144.lua +++ b/official/c10691144.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end @@ -24,17 +24,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_REMOVE) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local flag=0 for tc in eg:Iter() do local ploc=tc:GetPreviousLocation() local te=tc:GetReasonEffect() - if tc:IsReason(REASON_EFFECT) and not tc:IsReason(REASON_REDIRECT) and (ploc&(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE))~=0 - and tc:IsPreviousControler(tp) and te:GetOwnerPlayer()==1-tp and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then + if tc:IsReason(REASON_EFFECT) and not tc:IsReason(REASON_REDIRECT) and (ploc&(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE))~=0 + and tc:IsPreviousControler(tp) and te:GetOwnerPlayer()==1-tp and te:IsMonsterEffect() and te:IsActivated() then flag=(flag|ploc) end end @@ -63,11 +63,11 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end if (flag&LOCATION_GRAVE)~=0 then - local rg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local rg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) if #rg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) g:Merge(rg:Select(tp,1,2,nil)) end end Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10698416.lua b/official/c10698416.lua index f49197393e..8d577fa799 100644 --- a/official/c10698416.lua +++ b/official/c10698416.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x104) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_KRAWLER) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -49,7 +49,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c10712320.lua b/official/c10712320.lua index 495f8e4c27..4e19db9e7e 100644 --- a/official/c10712320.lua +++ b/official/c10712320.lua @@ -1,4 +1,5 @@ --ヴァイロン・スティグマ +--Vylon Stigma local s,id=GetID() function s.initial_effect(c) --equip @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.eqop) c:RegisterEffect(e1) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.filter1(c,tp) - return c:IsFaceup() and c:IsSetCard(0x30) and c:GetEquipTarget() + return c:IsFaceup() and c:IsSetCard(SET_VYLON) and c:GetEquipTarget() and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c) end function s.filter2(c,eqc) @@ -40,4 +41,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc==eqc then tc=g:GetNext() end if not eqc:IsRelateToEffect(e) then return end Duel.Equip(tp,eqc,tc) -end +end \ No newline at end of file diff --git a/official/c10719350.lua b/official/c10719350.lua index 67a528ea36..50f2467627 100644 --- a/official/c10719350.lua +++ b/official/c10719350.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) c:RegisterEffect(e2) @@ -24,4 +24,4 @@ function s.initial_effect(c) e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) e3:SetValue(100) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c10731333.lua b/official/c10731333.lua index 7940765d53..7cd89b61ba 100644 --- a/official/c10731333.lua +++ b/official/c10731333.lua @@ -1,4 +1,5 @@ --EMオッドアイズ・ミノタウロス +--Performapal Odd-Eyes Minitaurus local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -20,12 +21,12 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.ptg(e,c) - return c:IsSetCard(0x9f) or c:IsSetCard(0x99) + return c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES) end function s.atkfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) + return c:IsFaceup() and (c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES)) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -41,8 +42,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(-gc*100) d:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c10732060.lua b/official/c10732060.lua index f7f902d540..6e5f2917c8 100644 --- a/official/c10732060.lua +++ b/official/c10732060.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) diff --git a/official/c10736540.lua b/official/c10736540.lua index d1420f3865..6f6e2ac1fb 100644 --- a/official/c10736540.lua +++ b/official/c10736540.lua @@ -1,4 +1,5 @@ --湖の乙女ヴィヴィアン +--Lady of the Lake local s,id=GetID() function s.initial_effect(c) --synchro limit @@ -36,7 +37,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.synlimit(e,c) if not c then return false end return not c:IsRace(RACE_WARRIOR) @@ -45,7 +46,7 @@ function s.rmcon(e) return (e:GetHandler():GetReason()&REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO end function s.filter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -62,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:GetLevel()==5 + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and c:GetLevel()==5 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.spfilter(chkc) end @@ -80,10 +81,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c1073952.lua b/official/c1073952.lua index 41165e0573..1b9f83d52b 100644 --- a/official/c1073952.lua +++ b/official/c1073952.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsFaceup() and (c:GetType()&0x20004)==0x20004 and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsContinuousSpell() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) end diff --git a/official/c10755153.lua b/official/c10755153.lua index 90c8a7aff0..979bcee785 100644 --- a/official/c10755153.lua +++ b/official/c10755153.lua @@ -1,4 +1,5 @@ --ガーディアン・シール +--Guardian Ceal local s,id=GetID() function s.initial_effect(c) --sum limit diff --git a/official/c10755984.lua b/official/c10755984.lua index c4bc082fff..b23ac2d653 100644 --- a/official/c10755984.lua +++ b/official/c10755984.lua @@ -1,8 +1,9 @@ --ダイガスタ・イグルス +--Daigusto Eguls local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x10),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_GUSTO),1,99) c:EnableReviveLimit() --destroy local e1=Effect.CreateEffect(c) @@ -19,17 +20,17 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.costfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c10759529.lua b/official/c10759529.lua index 10e1210c4b..0f24f876ea 100644 --- a/official/c10759529.lua +++ b/official/c10759529.lua @@ -1,4 +1,5 @@ --キッズ・ガード +--Kid Guard local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsCode,1,false,nil,nil,32679370) end @@ -22,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x3008) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c10789972.lua b/official/c10789972.lua index 0961b0018e..521fc2604d 100644 --- a/official/c10789972.lua +++ b/official/c10789972.lua @@ -1,4 +1,5 @@ --覚醒戦士 クーフーリン +--Cú Chulainn the Awakened local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -19,10 +20,10 @@ function s.filter(c) return c:IsType(TYPE_NORMAL) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c10793085.lua b/official/c10793085.lua index bf946bc901..14b9770428 100644 --- a/official/c10793085.lua +++ b/official/c10793085.lua @@ -38,7 +38,7 @@ function s.costfilter(c,op1,op2,op3) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local phase=Duel.GetCurrentPhase() - local op1=Duel.IsExistingTarget(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and (phase~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + local op1=Duel.IsExistingTarget(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and aux.StatChangeDamageStepCondition() local op2=Duel.IsExistingTarget(s.cfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and phase~=PHASE_DAMAGE local op3=Duel.IsExistingTarget(s.cfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and phase~=PHASE_DAMAGE if chk==0 then return (op1 or op2 or op3) and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,op1,op2,op3) end diff --git a/official/c10802915.lua b/official/c10802915.lua index f6006a9624..14528430e9 100644 --- a/official/c10802915.lua +++ b/official/c10802915.lua @@ -17,32 +17,32 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c10809984.lua b/official/c10809984.lua index 7c826db0f5..9c5fe5370f 100644 --- a/official/c10809984.lua +++ b/official/c10809984.lua @@ -1,4 +1,5 @@ --世紀の大泥棒 +--Great Phantom Thief local s,id=GetID() function s.initial_effect(c) --handes @@ -29,7 +30,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND) Duel.ConfirmCards(tp,hg) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end Duel.ShuffleHand(1-tp) end diff --git a/official/c10813327.lua b/official/c10813327.lua index 08583fbf93..fa4d12a9ab 100644 --- a/official/c10813327.lua +++ b/official/c10813327.lua @@ -1,5 +1,5 @@ --やぶ蛇 ---Shrub Serpent +--Waking the Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -28,7 +28,7 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -36,5 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c10817524.lua b/official/c10817524.lua index 29a80b5d01..f080b81668 100644 --- a/official/c10817524.lua +++ b/official/c10817524.lua @@ -1,4 +1,5 @@ --始祖竜ワイアーム +--First of the Dragons local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -31,5 +32,5 @@ function s.indval(e,c) return not c:IsType(TYPE_NORMAL) end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end diff --git a/official/c1082946.lua b/official/c1082946.lua index fe60aa4321..8dcf3748c8 100644 --- a/official/c1082946.lua +++ b/official/c1082946.lua @@ -11,11 +11,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsHasEffect,tp,0x3f,0x3f,1,nil,id) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsHasEffect,tp,LOCATION_ALL,LOCATION_ALL,1,nil,id) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local g=Duel.SelectMatchingCard(tp,Card.IsHasEffect,tp,0x3f,0x3f,1,1,nil,id) + local g=Duel.SelectMatchingCard(tp,Card.IsHasEffect,tp,LOCATION_ALL,LOCATION_ALL,1,1,nil,id) local tc=g:GetFirst() local eff={tc:GetCardEffect(id)} local sel={} diff --git a/official/c10833828.lua b/official/c10833828.lua index 17f37ba574..2f1bcf60bd 100644 --- a/official/c10833828.lua +++ b/official/c10833828.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetCategory(CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetCondition(s.damcon) @@ -41,14 +41,14 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} function s.extrafil(g) return function(tp,sg,fc) return #(g&sg)>0 end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DDD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -67,19 +67,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) c:SetCardTarget(tc) end Duel.SpecialSummonComplete() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -91,4 +91,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c10851853.lua b/official/c10851853.lua index d8e2c88505..aa5edf76bf 100644 --- a/official/c10851853.lua +++ b/official/c10851853.lua @@ -1,4 +1,4 @@ --- +--フラワーダイノ --Flowerdino --Scripted by Yuno local s,id=GetID() @@ -38,7 +38,7 @@ function s.initial_effect(c) end --Special Summon function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return (rp==tp and re:IsActiveType(TYPE_TRAP)) or (rp==1-tp and re:IsActiveType(TYPE_SPELL)) + return (rp==tp and re:IsTrapEffect()) or (rp==1-tp and re:IsSpellEffect()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c10860121.lua b/official/c10860121.lua index 51f3f32828..4b8da90f4b 100644 --- a/official/c10860121.lua +++ b/official/c10860121.lua @@ -1,4 +1,5 @@ --武神器-イオツミ +--Bujingi Pavo local s,id=GetID() function s.initial_effect(c) --spsummon @@ -11,25 +12,21 @@ function s.initial_effect(c) e1:SetCode(EVENT_TO_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c,tp) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_BATTLE) + and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_BATTLE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BUJIN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c10877309.lua b/official/c10877309.lua index acae73965b..e7225fa8d7 100644 --- a/official/c10877309.lua +++ b/official/c10877309.lua @@ -18,14 +18,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.xtg) e2:SetOperation(s.xop) c:RegisterEffect(e2) end -s.listed_series={0x126} +s.listed_series={SET_TIME_THIEF} function s.filter(c,e,tp) - return c:IsSetCard(0x126) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TIME_THIEF) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.xfilter(c) - return c:IsFaceup() and c:IsSetCard(0x126) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_TIME_THIEF) and c:IsType(TYPE_XYZ) end function s.xcheck(sg,e,tp) return sg:FilterCount(Card.IsMonster,nil)==1 @@ -50,7 +50,7 @@ function s.xcheck(sg,e,tp) end function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.xfilter(chkc) end - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,e:GetHandler(),0x126) + local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,e:GetHandler(),SET_TIME_THIEF) if chk==0 then return Duel.IsExistingTarget(s.xfilter,tp,LOCATION_MZONE,0,1,nil) and aux.SelectUnselectGroup(g,e,tp,3,3,s.xcheck,0) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) @@ -59,9 +59,9 @@ end function s.xop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsImmuneToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsSetCard),tp,LOCATION_GRAVE,0,nil,0x126) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsSetCard),tp,LOCATION_GRAVE,0,nil,SET_TIME_THIEF) local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.xcheck,1,tp,HINTMSG_XMATERIAL) if #sg==3 then Duel.Overlay(tc,sg) end -end +end \ No newline at end of file diff --git a/official/c10928224.lua b/official/c10928224.lua index ef3bb0037b..bd9f7b8410 100644 --- a/official/c10928224.lua +++ b/official/c10928224.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetValue(10979723) c:RegisterEffect(e3) --atkup @@ -35,10 +35,10 @@ function s.initial_effect(c) e4:SetValue(s.val) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} s.listed_names={10979723} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x4) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_AMAZONESS) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -54,5 +54,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x4)*100 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_AMAZONESS)*100 +end \ No newline at end of file diff --git a/official/c10938846.lua b/official/c10938846.lua index b11b68d39c..e4c201d3e3 100644 --- a/official/c10938846.lua +++ b/official/c10938846.lua @@ -1,5 +1,5 @@ --心の架け橋 ---Bridge of the Heart +--Rainbow Bridge of the Heart --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -15,8 +15,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1,id) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1034)) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_CRYSTAL_BEAST)) c:RegisterEffect(e1) --Destroy 1 "Crystal Beast" monster and add 1 "Crystal" S/T to the hand local e2=Effect.CreateEffect(c) @@ -42,23 +42,23 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x34,0x1034} +s.listed_series={SET_CRYSTAL,SET_CRYSTAL_BEAST} function s.desfilter(c) - return c:IsSetCard(0x1034) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + return c:IsSetCard(SET_CRYSTAL_BEAST) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) end function s.thfilter(c) - return c:IsSetCard(0x34) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_CRYSTAL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) @@ -69,7 +69,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsControler(tp) and c:GetSequence()<5 end function s.thcond(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c109401.lua b/official/c109401.lua index f9022d8050..21810c3b7b 100644 --- a/official/c109401.lua +++ b/official/c109401.lua @@ -1,7 +1,6 @@ --闇次元の戦士 --Dark Dimension Soldier --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Synchro Summon. diff --git a/official/c10960419.lua b/official/c10960419.lua index df04ecd51f..8d7b97bc6b 100644 --- a/official/c10960419.lua +++ b/official/c10960419.lua @@ -43,7 +43,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --remove local e2=Effect.CreateEffect(c) @@ -54,7 +54,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.rmcon) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) @@ -77,13 +77,13 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=ec:GetBattleTarget() if tc and tc:IsRelateToBattle() then local ct=Duel.TossDice(tp,1) - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then tc:SetTurnCounter(0) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE_START+PHASE_DRAW) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,ct) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,ct) e1:SetLabel(ct) e1:SetLabelObject(tc) e1:SetCountLimit(1) @@ -91,7 +91,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.turnop) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.retcon) e2:SetOperation(s.retop) Duel.RegisterEffect(e2,tp) @@ -102,7 +102,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e3:SetOwnerPlayer(tp) e3:SetLabelObject(e1) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_STANDBY,ct) + e3:SetReset(RESET_PHASE|PHASE_STANDBY,ct) c:RegisterEffect(e3) end end @@ -139,4 +139,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.ReturnToField(tc) -end +end \ No newline at end of file diff --git a/official/c10963799.lua b/official/c10963799.lua index 90217e97c6..b765532e40 100644 --- a/official/c10963799.lua +++ b/official/c10963799.lua @@ -1,4 +1,5 @@ --豪雨の結界像 +--Barrier Statue of the Torrent local s,id=GetID() function s.initial_effect(c) --disable spsummon diff --git a/official/c10971759.lua b/official/c10971759.lua index 6156347ac6..4deff4191e 100644 --- a/official/c10971759.lua +++ b/official/c10971759.lua @@ -45,12 +45,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -60,9 +60,9 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) e:SetLabel(g:GetFirst():GetRank()) g:AddCard(e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -82,7 +82,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -92,9 +92,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,2)) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_INSECT) -end +end \ No newline at end of file diff --git a/official/c10979723.lua b/official/c10979723.lua index d5df2d3cf4..fcf3af198b 100644 --- a/official/c10979723.lua +++ b/official/c10979723.lua @@ -1,4 +1,5 @@ --アマゾネスペット虎 +--Amazoness Tiger local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -19,10 +20,10 @@ function s.initial_effect(c) e2:SetValue(s.atlimit) c:RegisterEffect(e2) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.val(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x4),c:GetControler(),LOCATION_MZONE,0,nil)*400 + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_AMAZONESS),c:GetControler(),LOCATION_MZONE,0,nil)*400 end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x4) and c~=e:GetHandler() -end + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c11012887.lua b/official/c11012887.lua index 4d246eea69..802b5c1859 100644 --- a/official/c11012887.lua +++ b/official/c11012887.lua @@ -1,4 +1,5 @@ --ジュラック・グアイバ +--Jurrac Guaiba local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x22} +s.listed_series={SET_JURRAC} function s.filter(c,e,tp) - return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_JURRAC) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -30,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c11020863.lua b/official/c11020863.lua index 6933f91409..c23636123a 100644 --- a/official/c11020863.lua +++ b/official/c11020863.lua @@ -1,16 +1,16 @@ --- ロイヤル・ストレート・スラッシャー --- Royal Straight Slasher --- Scripted by Hatter +--ロイヤル・ストレート・スラッシャー +--Royal Straight Slasher +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- Must be Special Summoned by "Royal Straight" + --Must be Special Summoned by "Royal Straight" local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e1) - -- Destroy all opponent cards + --Destroy all opponent cards local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) - -- Special Summon up to 3 LIGHT Warrior monsters + --Special Summon up to 3 LIGHT Warrior monsters local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -50,14 +50,14 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) if chk==0 then if #dg<1 then return false end - local tg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local tg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) return #tg>4 and aux.SelectUnselectGroup(tg,e,tp,5,5,s.tgrescon,0) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,5,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,5,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if #g<5 then return end local tg=aux.SelectUnselectGroup(g,e,tp,5,5,s.tgrescon,1,tp,HINTMSG_TOGRAVE) if #tg==5 and Duel.SendtoGrave(tg,REASON_EFFECT)>0 then diff --git a/official/c11021521.lua b/official/c11021521.lua index 2dfed068cb..1699e36097 100644 --- a/official/c11021521.lua +++ b/official/c11021521.lua @@ -1,4 +1,5 @@ --ネコマネキング +--Neko Mane King local s,id=GetID() function s.initial_effect(c) --end turn @@ -12,20 +13,20 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return Duel.GetTurnPlayer()~=tp and c:IsPreviousControler(tp) + return Duel.IsTurnPlayer(1-tp) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp end function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(1-tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE|PHASE_END,1) + Duel.SkipPhase(1-tp,PHASE_STANDBY,RESET_PHASE|PHASE_END,1) + Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE|PHASE_END,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1,1) + Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c11024707.lua b/official/c11024707.lua index e441b5ae03..d90018ad38 100644 --- a/official/c11024707.lua +++ b/official/c11024707.lua @@ -64,7 +64,7 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,e,tp) return c:IsMonster() and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) and c:IsLocation(LOCATION_GRAVE) - and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local eff=e:GetLabelObject() diff --git a/official/c1102515.lua b/official/c1102515.lua index 7fd12bddbc..d04865fabf 100644 --- a/official/c1102515.lua +++ b/official/c1102515.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end s.listed_names={74713516} s.LVnum=3 -s.LVset=0x53 +--s.LVset=0x53 --This is incorrect, 0x53 is "Constellar" function s.condition(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 then e:SetLabel(2) else e:SetLabel(1) end diff --git a/official/c11039171.lua b/official/c11039171.lua index b18d6c0e6c..26ef2acad4 100644 --- a/official/c11039171.lua +++ b/official/c11039171.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixRep(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9),1,99,30068120) + Fusion.AddProcMixRep(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL),1,99,30068120) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -19,14 +19,14 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xa9} -s.material_setcode={0xa9,0xc3} +s.listed_series={SET_FLUFFAL} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP} function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(c:GetMaterialCount()-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c11047543.lua b/official/c11047543.lua index c99d4d7d70..54eb1f0d72 100644 --- a/official/c11047543.lua +++ b/official/c11047543.lua @@ -1,4 +1,5 @@ --サイコ・フィール・ゾーン +--Psychic Feel Zone local s,id=GetID() function s.initial_effect(c) --special summon @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not tc1:IsRelateToEffect(e) or not tc2:IsRelateToEffect(e) then return end local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,tc1:GetLevel()+tc2:GetLevel()) if #sg==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local ssg=sg:Select(tp,1,1,nil) Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) diff --git a/official/c11050415.lua b/official/c11050415.lua index 0800e64d90..1011441ed8 100644 --- a/official/c11050415.lua +++ b/official/c11050415.lua @@ -1,6 +1,5 @@ --超カバーカーニバル --Super Hippo Carnival - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Performapal Hip Hippo" from hand, deck, or GY @@ -14,19 +13,18 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={41440148,TOKEN_HIPPO} - function s.filter(c,e,tp) return c:IsCode(41440148) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)==0 then return end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -45,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -58,11 +56,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetAbsoluteRange(tp,1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e3) --Clock Lizard check local e4=aux.createContinuousLizardCheck(e:GetHandler(),LOCATION_MZONE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e4,true) end Duel.SpecialSummonComplete() @@ -71,7 +69,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.atlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c11052544.lua b/official/c11052544.lua index c951943dff..28a9c7dbc9 100644 --- a/official/c11052544.lua +++ b/official/c11052544.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.cfilter(c) - return c:IsFaceup() and c:IsAttackPos() and c:IsSetCard(0x100d) + return c:IsFaceup() and c:IsAttackPos() and c:IsSetCard(SET_X_SABER) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11067666.lua b/official/c11067666.lua index df6fcd463a..9ab04cdd3d 100644 --- a/official/c11067666.lua +++ b/official/c11067666.lua @@ -30,7 +30,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.SelectEffectYesNo(tp,e:GetHandler()) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) if Duel.NegateEffect(ev) then Duel.BreakEffect() Duel.Destroy(e:GetHandler(),REASON_EFFECT) @@ -39,5 +39,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.rmcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) -end + return c:IsPendulumSummoned() and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) +end \ No newline at end of file diff --git a/official/c11069680.lua b/official/c11069680.lua index 5fba878bb6..ed9aedbd3e 100644 --- a/official/c11069680.lua +++ b/official/c11069680.lua @@ -1,7 +1,6 @@ --ジャンク・コンバーター --Junk Converter --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Add 1 "Synchron" monster from deck @@ -28,8 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1017} - +s.listed_series={SET_SYNCHRON} function s.cfilter(c) return c:IsType(TYPE_TUNER) and c:IsDiscardable() end @@ -39,10 +37,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x1017) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SYNCHRON) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -79,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c11074235.lua b/official/c11074235.lua index 515bf8794d..a19aca6569 100644 --- a/official/c11074235.lua +++ b/official/c11074235.lua @@ -1,6 +1,5 @@ --魔晶龍ジルドラス --Mana Dragon Zirnitron - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -46,10 +45,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then --Set 1 of your spells/traps, that is banished or in GY Duel.BreakEffect() diff --git a/official/c11082056.lua b/official/c11082056.lua index 4d65bdfb39..d4c89b1a2b 100644 --- a/official/c11082056.lua +++ b/official/c11082056.lua @@ -26,12 +26,12 @@ function s.spfilter(c,e,tp,code,rp) return c:IsType(TYPE_FUSION) and c.material_trap and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and code==c.material_trap end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,e,tp,rp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_SZONE,0,1,nil,e,tp,rp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil,e,tp,rp) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_SZONE,0,1,1,nil,e,tp,rp) local tc=g:GetFirst() if tc and not tc:IsImmuneToEffect(e) then if tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end @@ -49,4 +49,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c11102908.lua b/official/c11102908.lua index 3d7177273a..56e029ee50 100644 --- a/official/c11102908.lua +++ b/official/c11102908.lua @@ -1,4 +1,5 @@ --紫炎の霞城 +--Shien's Castle of Mist local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,11 +18,11 @@ function s.initial_effect(c) e2:SetValue(-500) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.atkcon(e) local d=Duel.GetAttackTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and d and d:IsSetCard(0x3d) + return Duel.IsPhase(PHASE_DAMAGE_CAL) and d and d:IsSetCard(SET_SIX_SAMURAI) end function s.atktg(e,c) return c==Duel.GetAttacker() -end +end \ No newline at end of file diff --git a/official/c11109820.lua b/official/c11109820.lua index 804c94bb67..a7024feb7b 100644 --- a/official/c11109820.lua +++ b/official/c11109820.lua @@ -1,4 +1,5 @@ --エクシーズ・ユニバース +--Xyz Universe local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.filter1(c,e,tp) return c:IsFaceup() and c:IsType(TYPE_XYZ) and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,e,tp,c,c:GetRank()) @@ -23,7 +24,7 @@ function s.filter2(c,e,tp,mc,rk) end function s.spfilter(c,e,tp,rk,sg) local crk=c:GetRank() - return (crk==rk or crk==rk-1) and not c:IsSetCard(0x48) and Duel.GetLocationCountFromEx(tp,tp,sg,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (crk==rk or crk==rk-1) and not c:IsSetCard(SET_NUMBER) and Duel.GetLocationCountFromEx(tp,tp,sg,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -47,11 +48,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --sp_summon local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) @@ -73,4 +74,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(sc,c) end end -end +end \ No newline at end of file diff --git a/official/c11110218.lua b/official/c11110218.lua index d6e05438b4..3a3315cc3e 100644 --- a/official/c11110218.lua +++ b/official/c11110218.lua @@ -1,9 +1,11 @@ +--常世離レ --Terrors of the Underroot --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -38,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then local og=Duel.GetOperatedGroup() if #sg>0 and og:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end end -end +end \ No newline at end of file diff --git a/official/c11110587.lua b/official/c11110587.lua index 63ea2fe91b..8e198cde56 100644 --- a/official/c11110587.lua +++ b/official/c11110587.lua @@ -1,4 +1,5 @@ --隣の芝刈り +--That Grass Looks Greener local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c11125718.lua b/official/c11125718.lua index db081ddf7b..2c3503fcee 100644 --- a/official/c11125718.lua +++ b/official/c11125718.lua @@ -1,4 +1,5 @@ --ランサー・ドラゴニュート +--Lancer Dragonute local s,id=GetID() function s.initial_effect(c) --pierce diff --git a/official/c111280.lua b/official/c111280.lua index c4dba93e55..33962f9bdd 100644 --- a/official/c111280.lua +++ b/official/c111280.lua @@ -1,6 +1,5 @@ --黒魔導強化 --Dark Magic Expanded - local s,id=GetID() function s.initial_effect(c) --Apply various effects, depending on the number of "Dark Magicians" and "Dark Magician Girls" in GY @@ -16,26 +15,25 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL} - function s.cfilter(c) return c:IsFaceup() and c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) - return ct>0 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) + return ct>0 and aux.StatChangeDamageStepCondition() end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) if ct<=1 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end return true end end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) local ct=#g if ct>=1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -46,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) end @@ -56,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAINING) e2:SetOperation(s.chainop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD) @@ -65,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(LOCATION_ONFIELD,0) e3:SetTarget(s.indtg) e3:SetValue(aux.indoval) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,1,aux.Stringid(id,1),nil) end @@ -80,14 +78,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetValue(s.efilter) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) e4:SetOwnerPlayer(tp) tc:RegisterEffect(e4) end end end function s.chainop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and ep==tp then + if re:IsSpellTrapEffect() and ep==tp then Duel.SetChainLimit(s.chainlm) end end diff --git a/official/c11132674.lua b/official/c11132674.lua index 6578e5d14e..e3ba755141 100644 --- a/official/c11132674.lua +++ b/official/c11132674.lua @@ -41,7 +41,7 @@ function s.xyzop(e,tp,chk) return true end function s.thfilter(c) - return (c:IsSetCard(SET_SPRINGANS) or c:IsSetCard(SET_THERION)) and c:IsAbleToHand() + return c:IsSetCard({SET_SPRINGANS,SET_THERION}) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c11136371.lua b/official/c11136371.lua index d632722c9d..8c91caa1ff 100644 --- a/official/c11136371.lua +++ b/official/c11136371.lua @@ -42,7 +42,7 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end - Duel.RaiseEvent(g,EVENT_CUSTOM+47408488,e,0,tp,0,0)--Event used by Crystal Tree + Duel.RaiseEvent(g,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0)--Event used by Crystal Tree end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) diff --git a/official/c11155484.lua b/official/c11155484.lua index a8b0a1c1f1..f25c22da3c 100644 --- a/official/c11155484.lua +++ b/official/c11155484.lua @@ -1,9 +1,9 @@ --- 宝玉の奇跡 --- Crystal Miracle --- Scripted by Hatter +--宝玉の奇跡 +--Crystal Miracle +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy 1 "Crystal Beast" card and negate activation + --Destroy 1 "Crystal Beast" card and negate activation local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - -- Place 1 "Crystal Beast" in your Spell/Trap Zone + --Place 1 "Crystal Beast" in your Spell/Trap Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -22,17 +22,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.plcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_ONFIELD,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) local dg=nil local ct=0 @@ -44,7 +44,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_ONFIELD,0,1,1,nil) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then @@ -52,31 +52,31 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.plconfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsControler(tp) and c:GetSequence()<5 end function s.plcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.plconfilter,1,nil,tp) end function s.plfilter(c) - return c:IsSetCard(0x1034) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsMonster() and not c:IsForbidden() end function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end + and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end end function s.plop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.plfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil):GetFirst() if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - -- Treat as Continuous Spell + --Treat as Continuous Spell local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c11159464.lua b/official/c11159464.lua index f11046ec58..fef7457965 100644 --- a/official/c11159464.lua +++ b/official/c11159464.lua @@ -1,4 +1,5 @@ --ワーム・ホープ +--Worm Hope local s,id=GetID() function s.initial_effect(c) --flip @@ -21,12 +22,12 @@ function s.initial_effect(c) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then + if Duel.IsPhase(PHASE_DAMAGE) and e:GetHandler()==Duel.GetAttackTarget() then Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end end function s.drop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then + if Duel.IsPhase(PHASE_DAMAGE) and e:GetHandler()==Duel.GetAttackTarget() then Duel.Draw(tp,1,REASON_EFFECT) end end diff --git a/official/c11163040.lua b/official/c11163040.lua index 45c6b1b8ac..6027354dd8 100644 --- a/official/c11163040.lua +++ b/official/c11163040.lua @@ -2,8 +2,8 @@ --The Kaiju Files local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x37) - c:SetCounterLimit(0x37,5) + c:EnableCounterPermit(COUNTER_KAIJU) + c:SetCounterLimit(COUNTER_KAIJU,5) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -34,32 +34,32 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_SZONE) e4:SetCondition(s.thcon) - e4:SetCost(s.thcost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.counter_place_list={0x37} -s.listed_series={0xd3} +s.counter_place_list={COUNTER_KAIJU} +s.listed_series={SET_KAIJU} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0xd3) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_GRAVE) + return c:IsSetCard(SET_KAIJU) and c:IsPreviousLocation(LOCATION_HAND|LOCATION_GRAVE) end function s.counter(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.cfilter,1,nil) then - e:GetHandler():AddCounter(0x37,1) + e:GetHandler():AddCounter(COUNTER_KAIJU,1) end end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xd3) + return c:IsFaceup() and c:IsSetCard(SET_KAIJU) and Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetControler(),c:GetOriginalCode()) end function s.chkfilter(c,e,tp,cc,code) - return c:IsSetCard(0xd3) and c:GetOriginalCode()~=code and + return c:IsSetCard(SET_KAIJU) and c:GetOriginalCode()~=code and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,cc,c) end function s.spfilter(c,e,tp,cc,code) - return c:IsSetCard(0xd3) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,cc) + return c:IsSetCard(SET_KAIJU) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,cc) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -90,14 +90,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x37)>=3 -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return e:GetHandler():GetCounter(COUNTER_KAIJU)>=3 end function s.thfilter(c) - return c:IsSetCard(0xd3) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_KAIJU) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -110,4 +106,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c11167052.lua b/official/c11167052.lua index 8af4035bae..3680950c79 100644 --- a/official/c11167052.lua +++ b/official/c11167052.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x400d,0x113} +s.listed_series={SET_ELEMENTSABER,SET_ELEMENTAL_LORD} s.listed_names={61557074} function s.intg(e,c) return c:IsFaceup() and c:IsCode(61557074) @@ -62,7 +62,7 @@ function s.filter1(c,e,tp) and Duel.GetMZoneCount(tp,c)>0 end function s.filter2(c,e,tp,att) - return c:IsSetCard(0x400d) and c:GetOriginalAttribute()~=att and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTSABER) and c:GetOriginalAttribute()~=att and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -90,7 +90,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(c,REASON_COST) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x113) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_ELEMENTAL_LORD) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) @@ -101,7 +101,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - local ct=Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD) + local ct=Duel.SendtoGrave(hg,REASON_EFFECT|REASON_DISCARD) if ct<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,ct,ct,nil) diff --git a/official/c1118137.lua b/official/c1118137.lua index 2f044b74df..b7581bb01b 100644 --- a/official/c1118137.lua +++ b/official/c1118137.lua @@ -66,11 +66,10 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tg=c:GetEquipTarget() if chk==0 then return tg - and tg:IsReason(REASON_BATTLE+REASON_EFFECT) + and tg:IsReason(REASON_BATTLE|REASON_EFFECT) and Duel.IsCanRemoveCounter(tp,1,0,COUNTER_SPELL,1,REASON_EFFECT) end return Duel.SelectEffectYesNo(tp,c,96) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,1,REASON_EFFECT+REASON_REPLACE) + Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,1,REASON_EFFECT|REASON_REPLACE) end - diff --git a/official/c11193246.lua b/official/c11193246.lua index 94eaeeadf4..8be60fdb7e 100644 --- a/official/c11193246.lua +++ b/official/c11193246.lua @@ -1,4 +1,5 @@ --月光輪廻舞踊 +--Lunalight Reincarnation Dance local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0xdf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c11221418.lua b/official/c11221418.lua index bc75ddd22f..df74360914 100644 --- a/official/c11221418.lua +++ b/official/c11221418.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(Card.IsAbleToHand,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local rct=Duel.GetTurnCount(tp)+1 if Duel.IsTurnPlayer(1-tp) then rct=rct+1 end if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end --trigger effect @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.spop) e1:SetLabel(rct) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e1,tp) end --cannot summon/flip summon/sp summon @@ -57,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) @@ -72,17 +72,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetTargetRange(1,1) e5:SetValue(0) - e5:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e5:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e5,tp) local e6=e5:Clone() e6:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e6:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e6:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e6,tp) --player hint local e7=Effect.CreateEffect(e:GetHandler()) e7:SetDescription(aux.Stringid(id,2)) e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e7:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e7:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) e7:SetTargetRange(1,1) Duel.RegisterEffect(e7,tp) --reset e2~e7 @@ -96,7 +96,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e8:SetLabel(rct) local reset_eff_table={e2,e3,e4,e5,e6,e7} e8:SetLabelObject(reset_eff_table) - e8:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e8:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e8,tp) end function s.resetall(e) @@ -110,7 +110,7 @@ function s.spresetcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) and e:GetLabel()==Duel.GetTurnCount(tp) end function s.mfilter(c) - return c:IsSetCard(0x88) and c:IsMonster() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.mfilter(chkc) end @@ -128,4 +128,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and mc and mc:IsRelateToEffect(e) then Duel.Overlay(tc,mc) end -end +end \ No newline at end of file diff --git a/official/c11224103.lua b/official/c11224103.lua index 64b79ffad7..6dc337576f 100644 --- a/official/c11224103.lua +++ b/official/c11224103.lua @@ -26,41 +26,37 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_names={48229808} s.LVnum=6 -s.LVset=0x3 +s.LVset=SET_HORUS_BLACK_FLAME_DRAGON function s.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) + return te:IsSpellEffect() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(48229808) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c11224934.lua b/official/c11224934.lua index 22206c4389..fa4c7081e9 100644 --- a/official/c11224934.lua +++ b/official/c11224934.lua @@ -1,4 +1,5 @@ --強化空間 +--Reinforced Space local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:GetOverlayCount()~=0 end @@ -24,13 +22,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetOverlayCount()*300) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c11228035.lua b/official/c11228035.lua index a1205fcbe6..ad4e23b973 100644 --- a/official/c11228035.lua +++ b/official/c11228035.lua @@ -9,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsType(TYPE_XYZ) end if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,TYPE_XYZ) @@ -30,19 +27,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) if #g>0 and tc:IsRelateToEffect(e) then local atk=tc:GetRank()*200 - local sc=g:GetFirst() - for sc in aux.Next(g) do + for sc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) sc:RegisterEffect(e1) end if tc:IsAbleToDeck() and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c11232355.lua b/official/c11232355.lua index 2c98a29ac8..ce8624742d 100644 --- a/official/c11232355.lua +++ b/official/c11232355.lua @@ -1,4 +1,5 @@ --ディストラクター +--Destructotron local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(s.descost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -25,10 +26,6 @@ function s.initial_effect(c) e2:SetOperation(s.sdop) c:RegisterEffect(e2) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) return c:IsFacedown() end diff --git a/official/c11234702.lua b/official/c11234702.lua index 3a151a7cf5..553cfe582d 100644 --- a/official/c11234702.lua +++ b/official/c11234702.lua @@ -22,15 +22,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.lvtg) e3:SetOperation(s.lvop) c:RegisterEffect(e3) end -s.listed_series={0x27} +s.listed_series={SET_TG} s.listed_names={11234702} function s.spfilter(c,e,tp) - return c:IsSetCard(0x27) and c:IsLevelBelow(4) and not c:IsCode(11234702) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TG) and c:IsLevelBelow(4) and not c:IsCode(11234702) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -47,18 +47,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end function s.filter(c) - return c:IsSetCard(0x27) and c:IsFaceup() and c:HasLevel() + return c:IsSetCard(SET_TG) and c:IsFaceup() and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -82,7 +82,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(lvl) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c11264180.lua b/official/c11264180.lua index 1c324a103e..08f675ff8c 100644 --- a/official/c11264180.lua +++ b/official/c11264180.lua @@ -1,4 +1,5 @@ ---TGX1-HL +--TGX1-HL +--TGX1-HL local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,17 +9,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x27} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_TG} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x27) + return c:IsFaceup() and c:IsSetCard(SET_TG) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,16 +33,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(tc:GetDefense()/2) tc:RegisterEffect(e2) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) + Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1127737.lua b/official/c1127737.lua index 9454fbdaa0..a76631028f 100644 --- a/official/c1127737.lua +++ b/official/c1127737.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.damcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsSummonType(SUMMON_TYPE_XYZ) + return eg:GetFirst():IsXyzSummoned() end function s.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,4 +53,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Damage(p,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11287364.lua b/official/c11287364.lua index 73f4706c8f..b541e96ba6 100644 --- a/official/c11287364.lua +++ b/official/c11287364.lua @@ -1,4 +1,5 @@ --クイック・スパナイト +--Quick-Span Knight local s,id=GetID() function s.initial_effect(c) --atk change @@ -28,8 +29,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c11302671.lua b/official/c11302671.lua index 4ab411c194..be5bd37fb9 100644 --- a/official/c11302671.lua +++ b/official/c11302671.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end diff --git a/official/c11317977.lua b/official/c11317977.lua index 970b35f7ee..7e3dfddf0b 100644 --- a/official/c11317977.lua +++ b/official/c11317977.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.effcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) @@ -25,11 +25,6 @@ function s.initial_effect(c) end s.listed_series={SET_LUNALIGHT} s.listed_names={CARD_POLYMERIZATION,id} -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.gythfilter(c) return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c11321089.lua b/official/c11321089.lua index 2ee2305aea..da0e6428d1 100644 --- a/official/c11321089.lua +++ b/official/c11321089.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetLabelObject(e0) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and re and re:IsSpellEffect() end) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsFusionSummoned() and re and re:IsSpellEffect() end) e1:SetTarget(s.drdestg) e1:SetOperation(s.drdesop) c:RegisterEffect(e1) diff --git a/official/c11324436.lua b/official/c11324436.lua index a2abc2bcd0..a24141a682 100644 --- a/official/c11324436.lua +++ b/official/c11324436.lua @@ -1,4 +1,5 @@ --エレクトリック・スネーク +--Electric Snake local s,id=GetID() function s.initial_effect(c) --draw @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 and rp==1-tp + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT and rp==1-tp end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c11327848.lua b/official/c11327848.lua index be8d89fe3d..38ce28ef0c 100644 --- a/official/c11327848.lua +++ b/official/c11327848.lua @@ -1,5 +1,5 @@ --修士号ディプロマン ---Master-Model Diploman +--Master's Diploman --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.eqfilter1(c,tp) return c:IsMonster() and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) @@ -53,7 +53,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-ec:GetAttack()) ec:RegisterEffect(e1) --Equip limit @@ -62,11 +62,11 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(true) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e2) end end function s.aclimit(e,re) local loc=re:GetActivateLocation() - return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetEquipGroup():IsExists(Card.IsControler,1,nil,e:GetHandlerPlayer()) + return loc==LOCATION_MZONE and re:IsMonsterEffect() and re:GetHandler():GetEquipGroup():IsExists(Card.IsControler,1,nil,e:GetHandlerPlayer()) end \ No newline at end of file diff --git a/official/c11366199.lua b/official/c11366199.lua index 5cc9b74bc4..d3c259d164 100644 --- a/official/c11366199.lua +++ b/official/c11366199.lua @@ -58,8 +58,8 @@ function s.spfilter1(c,att) return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -93,4 +93,4 @@ function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if #g==2 then Duel.Remove(g,POS_FACEUP,REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c11373345.lua b/official/c11373345.lua index 5e4b783eaa..e183a73cc2 100644 --- a/official/c11373345.lua +++ b/official/c11373345.lua @@ -24,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,4 +35,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelBelow,5),tp,0,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c11375683.lua b/official/c11375683.lua index 2e8a3f8bf0..b6d3e41c47 100644 --- a/official/c11375683.lua +++ b/official/c11375683.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x10b)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TINDANGLE)) e3:SetCondition(s.indcon) e3:SetValue(1) c:RegisterEffect(e3) @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} s.listed_names={94365540,59490397} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -60,14 +60,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.indcon(e) return e:GetHandler():GetFlagEffect(id)~=0 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x10b) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_TINDANGLE) end function s.thfilter(c,tp) return c:IsCode(59490397) and c:IsAbleToHand() @@ -93,5 +93,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c11384280.lua b/official/c11384280.lua index 0211f205c9..4048c4b2a7 100644 --- a/official/c11384280.lua +++ b/official/c11384280.lua @@ -1,4 +1,5 @@ --キャノン・ソルジャー +--Cannon Soldier local s,id=GetID() function s.initial_effect(c) --damage diff --git a/official/c11390349.lua b/official/c11390349.lua index 3c14f79b05..bf0ad52796 100644 --- a/official/c11390349.lua +++ b/official/c11390349.lua @@ -1,4 +1,5 @@ --ナチュル・フライトフライ +--Naturia Fruitfly local s,id=GetID() function s.initial_effect(c) --atk,def @@ -24,9 +25,9 @@ function s.initial_effect(c) e3:SetOperation(s.ctlop) c:RegisterEffect(e3) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.val(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x2a),e:GetOwnerPlayer(),LOCATION_MZONE,0,nil)*-300 + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),e:GetOwnerPlayer(),LOCATION_MZONE,0,nil)*-300 end function s.filter(c) return c:IsFaceup() and c:IsDefenseBelow(0) and c:IsControlerCanBeChanged() @@ -43,4 +44,4 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsDefenseBelow(0) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c11398059.lua b/official/c11398059.lua index 49e42fac46..db2b7d4dbb 100644 --- a/official/c11398059.lua +++ b/official/c11398059.lua @@ -1,4 +1,5 @@ --キングレムリン +--King of the Feral Imps local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsRace(RACE_REPTILE) and c:IsAbleToHand() end diff --git a/official/c11398951.lua b/official/c11398951.lua index f23853c9bb..e09a088c20 100644 --- a/official/c11398951.lua +++ b/official/c11398951.lua @@ -23,7 +23,7 @@ function s.extraop(mg,e,tp,eg,ep,ev,re,r,rp) local mat2=mg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(Card.IsRace,nil,RACE_WARRIOR|RACE_FAIRY) mg:Sub(mat2) Duel.ReleaseRitualMaterial(mg) - Duel.SendtoDeck(mat2,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) + Duel.SendtoDeck(mat2,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c11411223.lua b/official/c11411223.lua index 7d2e52c988..7eb42a6db5 100644 --- a/official/c11411223.lua +++ b/official/c11411223.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c11426487.lua b/official/c11426487.lua index b8eb2b9be6..9f50bd1ba2 100644 --- a/official/c11426487.lua +++ b/official/c11426487.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -50,4 +50,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() and tc:IsRelateToEffect(e) and tc:IsControler(tp) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1142880.lua b/official/c1142880.lua index 3cc13d594b..38b4b38f36 100644 --- a/official/c1142880.lua +++ b/official/c1142880.lua @@ -1,5 +1,5 @@ --サイバー・ドラゴン・ネクステア ---Cyber Dragon Nächster +--Cyber Dragon Nachster --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e1) --special summon @@ -43,7 +43,7 @@ function s.cfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,7 +79,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil) end diff --git a/official/c11429811.lua b/official/c11429811.lua index 4cb649a989..41e0c3b3c2 100644 --- a/official/c11429811.lua +++ b/official/c11429811.lua @@ -1,7 +1,6 @@ --ワーニングポイント --Warning Point --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Activate on Normal, Flip, or Special Summon @@ -34,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -44,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) --Cannot be used as material for a Fusion/Synchro/Xyz/Link Summon local e4=Effect.CreateEffect(c) @@ -53,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) e4:SetCode(EFFECT_CANNOT_BE_MATERIAL) e4:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) end -end +end \ No newline at end of file diff --git a/official/c11434258.lua b/official/c11434258.lua index 967ce41ad9..0c78b425c5 100644 --- a/official/c11434258.lua +++ b/official/c11434258.lua @@ -17,10 +17,10 @@ function s.filter(c,tp) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsLinkMonster() and Duel.IsPlayerCanDraw(tp,c:GetLink()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil,tp) Duel.SetTargetPlayer(tp) Duel.SetTargetParam(g:GetFirst():GetLink()) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetFirst():GetLink()) @@ -44,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SortDeckbottom(p,p,2) end end -end +end \ No newline at end of file diff --git a/official/c11439455.lua b/official/c11439455.lua index 878bff8072..b24fb81d7e 100644 --- a/official/c11439455.lua +++ b/official/c11439455.lua @@ -1,4 +1,5 @@ --月光蒼猫 +--Lunalight Blue Cat local s,id=GetID() function s.initial_effect(c) --atk up @@ -24,10 +25,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} s.listed_names={id} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xdf) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_LUNALIGHT) and not c:IsCode(id) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -43,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(tc:GetBaseAttack()*2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -51,7 +52,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xdf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LUNALIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c11441009.lua b/official/c11441009.lua index 59dfcf8755..531be06b24 100644 --- a/official/c11441009.lua +++ b/official/c11441009.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(aux.dxmcostgen(1,1)) + e2:SetCost(Cost.Detach(1,1)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -37,7 +37,7 @@ s.listed_names={id} s.listed_series={SET_PUNK} function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:IsSetCard(SET_PUNK,xyzc,SUMMON_TYPE_XYZ,tp) - and (c:IsType(TYPE_FUSION,xyzc,SUMMON_TYPE_XYZ,tp) or c:IsType(TYPE_SYNCHRO,xyzc,SUMMON_TYPE_XYZ,tp)) + and (c:IsType(TYPE_FUSION,xyzc,SUMMON_TYPE_XYZ,tp) or c:IsType(TYPE_SYNCHRO,xyzc,SUMMON_TYPE_XYZ,tp)) end function s.xyzop(e,tp,chk) if chk==0 then return not Duel.HasFlagEffect(tp,id) end diff --git a/official/c11443677.lua b/official/c11443677.lua index 3d09008e0b..64a352654e 100644 --- a/official/c11443677.lua +++ b/official/c11443677.lua @@ -63,11 +63,11 @@ end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) g:DeleteGroup() end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) + return te:IsTrapEffect() end function s.stfilter(c) return c:IsTrap() and c:IsSSetable() @@ -78,7 +78,7 @@ function s.fgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.stfilter,tp,LOCATION_GRAVE,0,1,nil) and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE-RESET_REMOVE-RESET_LEAVE+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOGRAVE-RESET_REMOVE-RESET_LEAVE|RESET_PHASE|PHASE_END,0,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectTarget(tp,s.stfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) @@ -88,4 +88,4 @@ function s.fgop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c11448373.lua b/official/c11448373.lua index 70f0cc00a7..09e2ec399a 100644 --- a/official/c11448373.lua +++ b/official/c11448373.lua @@ -1,4 +1,5 @@ --グレイヴ・キーパー +--Grave Protector local s,id=GetID() function s.initial_effect(c) --todeck diff --git a/official/c11449436.lua b/official/c11449436.lua index aeeff39413..afcdb86410 100644 --- a/official/c11449436.lua +++ b/official/c11449436.lua @@ -1,5 +1,5 @@ --氷河のアクア・マドール ---Glacial Aqua Madoor +--Glacier Aqua Madoor --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -41,14 +41,14 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if a:IsControler(1-tp) then a,d=d,a end - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)>0 + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)>0 and a:IsRelateToBattle() and a:IsControler(tp) then --Cannot be destroyed by that battle local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) end end @@ -75,8 +75,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetAttacker() if tc==c then tc=Duel.GetAttackTarget() end - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)>0 + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)>0 and tc:IsRelateToBattle() and tc:IsControler(1-tp) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11458071.lua b/official/c11458071.lua index 9db5ba6b42..de1bca7cd2 100644 --- a/official/c11458071.lua +++ b/official/c11458071.lua @@ -1,6 +1,5 @@ --天魔神 エンライズ --Sky Scourge Enrise - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -50,16 +49,16 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_FIEND,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,RACE_FIEND,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-4 and #rg1>2 and #rg2>0 and aux.SelectUnselectGroup(rg,e,tp,4,4,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) - rg:Merge(Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_FIEND,ATTRIBUTE_DARK)) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,RACE_FAIRY,ATTRIBUTE_LIGHT) + rg:Merge(Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,RACE_FIEND,ATTRIBUTE_DARK)) local g=aux.SelectUnselectGroup(rg,e,tp,4,4,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -82,7 +81,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function s.tgfilter(c) @@ -100,4 +99,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11460577.lua b/official/c11460577.lua index 8152e5d399..dc32aef17b 100644 --- a/official/c11460577.lua +++ b/official/c11460577.lua @@ -1,4 +1,5 @@ --エトワール・サイバー +--Etoile Cyber local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) diff --git a/official/c11471117.lua b/official/c11471117.lua index 0185cc0fde..f1fdcb951a 100644 --- a/official/c11471117.lua +++ b/official/c11471117.lua @@ -1,4 +1,5 @@ --ライトイレイザー +--Light Laser local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) diff --git a/official/c11475049.lua b/official/c11475049.lua index 654fd87eef..a289598d07 100644 --- a/official/c11475049.lua +++ b/official/c11475049.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) @@ -43,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -51,9 +51,9 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.atlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x97) -end + return c:IsFaceup() and c:IsSetCard(SET_ARTIFACT) +end \ No newline at end of file diff --git a/official/c11481610.lua b/official/c11481610.lua index cccd003e48..d0f611acb9 100644 --- a/official/c11481610.lua +++ b/official/c11481610.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9f,0x99,0x98} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES,SET_MAGICIAN} function s.costchk(sg,e,tp) return Duel.IsPlayerCanDraw(tp,#sg) end @@ -35,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) end function s.spfilter(c,e,tp,ls,rs) - return ((c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(0x99) or c:IsSetCard(0x9f)) + return ((c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and c:GetLevel()>ls and c:GetLevel()=lpo then return 0 else return lpo-lps end -end +end \ No newline at end of file diff --git a/official/c11508758.lua b/official/c11508758.lua index 57c55aef02..227a40c785 100644 --- a/official/c11508758.lua +++ b/official/c11508758.lua @@ -1,4 +1,5 @@ --ミュータント・ハイブレイン +--Mutant Mindmaster local s,id=GetID() function s.initial_effect(c) --control @@ -33,7 +34,7 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) Duel.AdjustInstantly(tc) if Duel.GetControl(tc,tp,PHASE_BATTLE,1)~=0 then @@ -49,8 +50,8 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) e:GetHandler():RegisterEffect(e2,true) end end -end +end \ No newline at end of file diff --git a/official/c11510448.lua b/official/c11510448.lua index 2b57b71721..e6b5c0a68a 100644 --- a/official/c11510448.lua +++ b/official/c11510448.lua @@ -1,4 +1,5 @@ --十二獣タイグリス +--Zoodiac Tigermortar local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -23,40 +24,36 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0xf1,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_ZOODIAC,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.atkfilter(c) - return c:IsSetCard(0xf1) and c:GetAttack()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetAttack()>=0 end function s.atkval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.atkfilter,nil) return g:GetSum(Card.GetAttack) end function s.deffilter(c) - return c:IsSetCard(0xf1) and c:GetDefense()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetDefense()>=0 end function s.defval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.deffilter,nil) return g:GetSum(Card.GetDefense) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter2(c) - return c:IsSetCard(0xf1) and c:IsMonster() + return c:IsSetCard(SET_ZOODIAC) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -76,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc1 and tc1:IsFaceup() and not tc1:IsImmuneToEffect(e) and #g2>0 then Duel.Overlay(tc1,g2) end -end +end \ No newline at end of file diff --git a/official/c1151281.lua b/official/c1151281.lua index 76fee1aeb3..627f606414 100644 --- a/official/c1151281.lua +++ b/official/c1151281.lua @@ -65,7 +65,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -73,4 +73,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c11516241.lua b/official/c11516241.lua index 05e32584df..27f58dd60f 100644 --- a/official/c11516241.lua +++ b/official/c11516241.lua @@ -35,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.econ(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() @@ -61,7 +61,7 @@ function s.spcheck(sg,tp,exg,dg) return #dg-a>0 end function s.cfilter(c) - return c:IsSetCard(0xfc) and c:IsType(TYPE_LINK) + return c:IsSetCard(SET_GOUKI) and c:IsType(TYPE_LINK) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -83,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11522979.lua b/official/c11522979.lua index e8b81527bc..a1bafa74cb 100644 --- a/official/c11522979.lua +++ b/official/c11522979.lua @@ -1,4 +1,5 @@ --CNo.69 紋章死神カオス・オブ・アームズ +--Number C69: Heraldry Crest of Horror local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -45,10 +46,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,2407234) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end @@ -70,14 +67,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c1154611.lua b/official/c1154611.lua index 7a3eb4a6e9..e201aa1cde 100644 --- a/official/c1154611.lua +++ b/official/c1154611.lua @@ -1,6 +1,5 @@ --バージェストマ・レアンコイリア ---Paleozoic Leancholia - +--Paleozoic Leanchoilia local s,id=GetID() function s.initial_effect(c) --Return 1 banished card to GY @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1) --Special summon itself from GY as a monster local e2=Effect.CreateEffect(c) @@ -35,23 +34,23 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -64,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -72,12 +71,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c11548522.lua b/official/c11548522.lua index 81aa1cb8f2..b36da0387b 100644 --- a/official/c11548522.lua +++ b/official/c11548522.lua @@ -1,4 +1,5 @@ --迷犬マロン +--Outstanding Dog Marron local s,id=GetID() function s.initial_effect(c) --to deck @@ -17,6 +18,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end diff --git a/official/c11556339.lua b/official/c11556339.lua index 791d7fa74f..8c028220e1 100644 --- a/official/c11556339.lua +++ b/official/c11556339.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xb5),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_RITUAL_BEAST),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -23,7 +23,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0xb5),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_RITUAL_BEAST),tp,LOCATION_MZONE,0,nil) if ct==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1157683.lua b/official/c1157683.lua index 925c14d778..15314ca856 100644 --- a/official/c1157683.lua +++ b/official/c1157683.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1) e2:SetTarget(s.target) - c:RegisterEffect(e2) + c:RegisterEffect(e2) end -s.listed_series={0x4093} +s.listed_series={SET_CYBERDARK} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -53,11 +53,11 @@ function s.select(e,tp,b1,b2) end end function s.eqfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x4093) and c:IsType(TYPE_EFFECT) + return c:IsFaceup() and c:IsSetCard(SET_CYBERDARK) and c:IsType(TYPE_EFFECT) and Duel.IsExistingMatchingCard(s.eqfilter2,0,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end function s.eqfilter2(c) - return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsMonster() and not c:IsForbidden() + return c:IsRace(RACE_DRAGON|RACE_MACHINE) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter1(chkc) end @@ -65,7 +65,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.eqfilter1,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.eqfilter1,tp,LOCATION_MZONE,0,1,1,nil) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,PLAYER_EITHER,0) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -82,7 +82,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(ec) tc:RegisterEffect(e1) @@ -91,7 +91,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -109,7 +109,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=mg:Select(tp,1,1,nil) Duel.SendtoGrave(g,REASON_COST) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,1-tp,LOCATION_ONFIELD) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -121,4 +121,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11587414.lua b/official/c11587414.lua index 46682ddb61..73b0798fed 100644 --- a/official/c11587414.lua +++ b/official/c11587414.lua @@ -57,7 +57,7 @@ end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return (e:GetHandler():IsAbleToGrave() or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil)) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK+LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK|LOCATION_ONFIELD) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -73,4 +73,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c11593137.lua b/official/c11593137.lua index 6dfb466da0..11ecf1fbe8 100644 --- a/official/c11593137.lua +++ b/official/c11593137.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_SUMMON) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -20,15 +20,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.filter(c) - return c:IsAttribute(0x30) and c:IsAbleToRemove() + return c:IsAttribute(ATTRIBUTE_DARK|ATTRIBUTE_LIGHT) and c:IsAbleToRemove() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and eg:IsExists(s.filter,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=eg:Filter(s.filter,nil) diff --git a/official/c11596936.lua b/official/c11596936.lua index cdd9d0e3c3..f634899256 100644 --- a/official/c11596936.lua +++ b/official/c11596936.lua @@ -1,4 +1,5 @@ --レクリスパワー +--Reckoned Power local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c11609969.lua b/official/c11609969.lua index 35becdc4a0..72c2893a0b 100644 --- a/official/c11609969.lua +++ b/official/c11609969.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) @@ -106,4 +106,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c11613567.lua b/official/c11613567.lua index 4649128cf5..e8f400c7b4 100644 --- a/official/c11613567.lua +++ b/official/c11613567.lua @@ -1,4 +1,5 @@ --BF-漆黒のエルフェン +--Blackwing - Elphin the Raven local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -20,11 +21,11 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x33),c:GetControler(),LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_BLACKWING),c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.filter(c) return c:IsCanChangePosition() @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c11637481.lua b/official/c11637481.lua index a11842f1f4..6a2e0ad714 100644 --- a/official/c11637481.lua +++ b/official/c11637481.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon2) @@ -30,9 +30,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xb2} +s.listed_series={SET_UA} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -62,14 +62,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.tdfilter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsLevelAbove(5) and c:IsAbleToDeck() + return c:IsSetCard(SET_UA) and c:IsLevelAbove(5) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter2(c,e,tp,code) - return c:IsSetCard(0xb2) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UA) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsAbleToHand() @@ -84,7 +84,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if tc then Duel.ConfirmCards(1-tp,tc) - if Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + if Duel.SendtoDeck(tc,tp,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then @@ -93,4 +93,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c11662742.lua b/official/c11662742.lua index a4bb0445d4..fcfd630cc1 100644 --- a/official/c11662742.lua +++ b/official/c11662742.lua @@ -1,84 +1,39 @@ --ジェルエンデュオ +--Gellenduo local s,id=GetID() function s.initial_effect(c) - --battle indestructable + --Cannot be destroyed by battle local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) c:RegisterEffect(e1) - --double tribute + --Destroy this face-up card local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DOUBLE_TRIBUTE) - e2:SetValue(s.dtcon) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_DAMAGE) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)>0 end) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) c:RegisterEffect(e2) - --selfdes + --This card can be treated as 2 Tributes for the Tribute Summon of a LIGHT Fairy monster local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_DAMAGE) - e3:SetOperation(s.dmop) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetCode(EFFECT_DOUBLE_TRIBUTE) + e3:SetValue(function(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) end) c:RegisterEffect(e3) - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_BATTLED) - e4:SetRange(LOCATION_MZONE) - e4:SetCondition(s.descon) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) - local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) - e5:SetCategory(CATEGORY_DESTROY) - e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_BATTLED) - e5:SetRange(LOCATION_MZONE) - e5:SetCondition(s.descon2) - e5:SetTarget(s.destg) - e5:SetOperation(s.desop) - c:RegisterEffect(e5) - local e6=Effect.CreateEffect(c) - e6:SetDescription(aux.Stringid(id,0)) - e6:SetCategory(CATEGORY_DESTROY) - e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetRange(LOCATION_MZONE) - e6:SetCode(EVENT_DAMAGE) - e6:SetCondition(s.descon3) - e6:SetTarget(s.destg) - e6:SetOperation(s.desop) - c:RegisterEffect(e6) -end -function s.dtcon(e,c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) -end -function s.dmop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:GetControler()~=ep then return end - if (r&REASON_BATTLE)~=0 then - c:RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) - elseif Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then - c:RegisterFlagEffect(id+1,RESET_PHASE+PHASE_DAMAGE,0,1) - end -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)>0 -end -function s.descon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id+1)>0 -end -function s.descon3(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_EFFECT)~=0 and e:GetHandler():GetControler()==ep - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or Duel.IsDamageCalculated()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.Destroy(e:GetHandler(),REASON_EFFECT) + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + Duel.Destroy(c,REASON_EFFECT) end end diff --git a/official/c11674673.lua b/official/c11674673.lua index 0752319b67..eed65d0ce4 100644 --- a/official/c11674673.lua +++ b/official/c11674673.lua @@ -53,7 +53,7 @@ end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c11678191.lua b/official/c11678191.lua index 8893a45645..2145bbedf5 100644 --- a/official/c11678191.lua +++ b/official/c11678191.lua @@ -1,4 +1,5 @@ --守護霊 アイリン +--Protective Soul Ailin local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,84173492),true) diff --git a/official/c11685347.lua b/official/c11685347.lua index 69bbab3909..3000bf0168 100644 --- a/official/c11685347.lua +++ b/official/c11685347.lua @@ -1,4 +1,5 @@ --連爆魔人 +--Blast Asmodian local s,id=GetID() function s.initial_effect(c) --chain diff --git a/official/c11699941.lua b/official/c11699941.lua index 2edce197bc..226ac5361c 100644 --- a/official/c11699941.lua +++ b/official/c11699941.lua @@ -1,5 +1,5 @@ --カラクリ蝦蟇油 ---Karakuri Toad Oil +--Karakuri Gama Oil local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.eqlimit(e,c) return e:GetLabelObject()==c end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -59,7 +59,7 @@ end function s.cfilter(c,tp) local np=c:GetPosition() local pp=c:GetPreviousPosition() - return c:IsSetCard(0x11) and pp&POS_FACEUP>0 and np&POS_FACEUP>0 and np~=pp and c:IsControler(tp) + return c:IsSetCard(SET_KARAKURI) and pp&POS_FACEUP>0 and np&POS_FACEUP>0 and np~=pp and c:IsControler(tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -71,5 +71,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ec:UpdateAttack(500,nil,c) ec:UpdateDefense(500,nil,c) end -end - +end \ No newline at end of file diff --git a/official/c11705261.lua b/official/c11705261.lua index 662636590b..614b5d5657 100644 --- a/official/c11705261.lua +++ b/official/c11705261.lua @@ -17,22 +17,18 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.filter(c,tp) - return c:IsSetCard(0x107f) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsSetCard(SET_UTOPIA) and c:IsControler(tp) and c:IsXyzSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -43,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c11711438.lua b/official/c11711438.lua index a378af6ac2..c3981ab6b2 100644 --- a/official/c11711438.lua +++ b/official/c11711438.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() @@ -46,17 +46,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.scon) e1:SetOperation(s.sop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) c:SetTurnCounter(0) c:RegisterEffect(e1) end function s.scon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,15 +68,15 @@ function s.sop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(tp) and Duel.IsMainPhase() end function s.thcfilter(c,e,tp) local code=c:GetCode() - return c:IsSetCard(0x137) and c:IsSummonPlayer(tp) and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e) + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsSummonPlayer(tp) and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,code) end function s.thfilter(c,code) - return c:IsSetCard(0x137) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(code) + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(code) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return eg:IsContains(chkc) and s.thcfilter(chkc,e,tp) end @@ -105,7 +105,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x137) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) @@ -122,4 +122,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c11722335.lua b/official/c11722335.lua index 766e142e0c..f3ff089fbe 100644 --- a/official/c11722335.lua +++ b/official/c11722335.lua @@ -1,4 +1,5 @@ --ワーム・ゼクス +--Worm Xex local s,id=GetID() function s.initial_effect(c) --send to grave @@ -19,10 +20,10 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} s.listed_names={47111934} function s.tgfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToGrave() + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,47111934),e:GetOwnerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c11738489.lua b/official/c11738489.lua index b786c7305e..3f71e5370a 100644 --- a/official/c11738489.lua +++ b/official/c11738489.lua @@ -39,26 +39,26 @@ function s.lcheck(g,lc,sumtype,tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsSummonType(SUMMON_TYPE_LINK) then return end + if not c:IsLinkSummoned() then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(c:GetMaterialCount()*1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end function s.desfilter(c,hc,tp) - local zone=hc:GetLinkedZone(tp)&~0x60 + local zone=hc:GetLinkedZone(tp)&~ZONES_EMZ return Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc~=e:GetHandler() end local c=e:GetHandler() if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,tp) - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IGNISTER,0x135,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IGNISTER,SET_IGNISTER,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) @@ -67,11 +67,11 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - local zone=e:GetHandler():GetLinkedZone(tp)&~0x60 + local zone=e:GetHandler():GetLinkedZone(tp)&~ZONES_EMZ if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IGNISTER,0x135,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_IGNISTER,SET_IGNISTER,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_DARK) then local token=Duel.CreateToken(tp,TOKEN_IGNISTER) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP,zone) end -end +end \ No newline at end of file diff --git a/official/c1174075.lua b/official/c1174075.lua index e1a75b2a39..848d0b2480 100644 --- a/official/c1174075.lua +++ b/official/c1174075.lua @@ -1,5 +1,5 @@ --竜輝巧-ファフμβ’ ---Drytron Mu-beta Fafnir +--Drytron Mu Beta Fafnir --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -35,20 +35,20 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.negcon) - e3:SetCost(s.negcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.mttg(e,c) return e:GetHandler():GetOverlayGroup():IsContains(c) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.tgfilter(c) - return c:IsSetCard(0x151) and c:IsAbleToGrave() + return c:IsSetCard(SET_DRYTRON) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -68,10 +68,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(s.negcfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -83,4 +79,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11741041.lua b/official/c11741041.lua index f26a7ed963..d75872877b 100644 --- a/official/c11741041.lua +++ b/official/c11741041.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_SZONE) e3:SetCondition(s.descon) - e3:SetCost(s.descost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -37,10 +37,6 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetCounter(0xc)>=4 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) diff --git a/official/c11743119.lua b/official/c11743119.lua index 6e6fc4ec96..900ab13202 100644 --- a/official/c11743119.lua +++ b/official/c11743119.lua @@ -1,4 +1,5 @@ --ユニオン・ライダー +--Union Rider local s,id=GetID() function s.initial_effect(c) --equip diff --git a/official/c11747708.lua b/official/c11747708.lua index a235ad38dc..79854fa40d 100644 --- a/official/c11747708.lua +++ b/official/c11747708.lua @@ -20,9 +20,9 @@ function s.costfilter(c,hz) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local hz=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),hz) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),hz) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),hz) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),hz) Duel.Remove(g,POS_FACEUP,REASON_COST) e:SetLabel(g:GetFirst():GetLevel()) end @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c11755663.lua b/official/c11755663.lua index 397174c97f..ad8bd15774 100644 --- a/official/c11755663.lua +++ b/official/c11755663.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.ssop) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.bpcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local b=a:GetBattleTarget() @@ -34,14 +34,14 @@ function s.bpcon(e,tp,eg,ep,ev,re,r,rp) if a and b then local dif=b:GetAttack()-a:GetAttack() return a:GetControler()~=b:GetControler() and a~=e:GetHandler() - and a:IsSetCard(0x11a) and a:IsRelateToBattle() + and a:IsSetCard(SET_DINOWRESTLER) and a:IsRelateToBattle() and Duel.GetAttackTarget()~=nil and dif>=0 else return false end end function s.bpcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end Duel.SendtoGrave(e:GetHandler(),REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.bpop(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -53,7 +53,7 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -61,12 +61,12 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetOperation(s.skop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) Duel.RegisterEffect(e2,Duel.GetTurnPlayer()) end function s.skop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetTurnPlayer() - Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end function s.sscon(e,c) return Duel.GetLocationCount(e:GetHandler():GetControler(),LOCATION_MZONE)>0 diff --git a/official/c11759079.lua b/official/c11759079.lua index 5965bdd55d..0bc1ea38d5 100644 --- a/official/c11759079.lua +++ b/official/c11759079.lua @@ -1,5 +1,5 @@ --双天脚の鴻鵠 ---Koukoku of the Souten Kicks +--Dual Avatar Feet - Kokoku --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -31,15 +31,15 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x14e} +s.listed_series={SET_DUAL_AVATAR} s.listed_names={id} function s.spfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsSetCard(0x14e) and c:IsMonster() and not c:IsCode(id) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) + and c:IsSetCard(SET_DUAL_AVATAR) and c:IsMonster() and not c:IsCode(id) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.spfilter,1,nil,tp) and Duel.GetTurnPlayer()==1-tp + return eg:IsExists(s.spfilter,1,nil,tp) and Duel.IsTurnPlayer(1-tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,10 +47,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.desfilter(c,e) - return c:IsSetCard(0x14e) and c:IsFaceup() and c:IsDestructable(e) + return c:IsSetCard(SET_DUAL_AVATAR) and c:IsFaceup() and c:IsDestructable(e) end function s.fusfilter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x14e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_FUSION) and c:IsSetCard(SET_DUAL_AVATAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -73,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x14e) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_DUAL_AVATAR) and c:IsTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -86,4 +86,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c11760174.lua b/official/c11760174.lua index cbbef6fe21..0225578c62 100644 --- a/official/c11760174.lua +++ b/official/c11760174.lua @@ -7,15 +7,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end end @@ -27,10 +23,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end + return re:IsSpellTrapEffect() +end \ No newline at end of file diff --git a/official/c11790356.lua b/official/c11790356.lua index 29d5947fec..84374fd251 100644 --- a/official/c11790356.lua +++ b/official/c11790356.lua @@ -87,7 +87,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) sc:RegisterEffect(e1) diff --git a/official/c11801343.lua b/official/c11801343.lua index f985dfdfb3..fc455b5e64 100644 --- a/official/c11801343.lua +++ b/official/c11801343.lua @@ -1,4 +1,5 @@ --ガベージコレクター +--Garbage Collector local s,id=GetID() function s.initial_effect(c) --bounce and summon @@ -14,10 +15,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.thfilter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_CYBERSE) - and Duel.GetMZoneCount(tp,c)>0 - and c:IsAbleToHandAsCost() - and c:GetOriginalType()&TYPE_MONSTER>0 + return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and Duel.GetMZoneCount(tp,c)>0 + and c:IsAbleToHandAsCost() and c:IsMonsterCard() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) @@ -39,9 +38,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc) - if #g~=0 then + if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end end - diff --git a/official/c11802691.lua b/official/c11802691.lua index df25a862b2..9037885be3 100644 --- a/official/c11802691.lua +++ b/official/c11802691.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.StatChangeDamageStepCondition) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) diff --git a/official/c11808215.lua b/official/c11808215.lua index 829dc5ee6b..2692abeed7 100644 --- a/official/c11808215.lua +++ b/official/c11808215.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) e2:SetTarget(s.dicetg) @@ -69,7 +69,7 @@ function s.atkchange(tc,opt,c) else e1:SetValue(tc:GetAttack()*2) --6: double the current aTK end - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) else --for other atk increase/decrease local e1=Effect.CreateEffect(c) @@ -84,7 +84,7 @@ function s.atkchange(tc,opt,c) elseif opt==4 then e1:SetValue(500) --4: gain 500 ATK end - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c11813722.lua b/official/c11813722.lua index e3ca38c997..d0c2aabd30 100644 --- a/official/c11813722.lua +++ b/official/c11813722.lua @@ -1,4 +1,5 @@ --パルキオンのうろこ +--Barkion's Bark local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2a),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),tp,LOCATION_MZONE,0,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -20,9 +21,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) return re:GetHandler():IsTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c11819473.lua b/official/c11819473.lua index b49d8aea24..86cf99269a 100644 --- a/official/c11819473.lua +++ b/official/c11819473.lua @@ -1,7 +1,6 @@ --アルカナリーディング --Arcana Reading --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Flip a coin, apply appropriate effect base on result @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.nstg) e2:SetOperation(s.nsop) c:RegisterEffect(e2) diff --git a/official/c11825276.lua b/official/c11825276.lua index 036bd5d0ce..88efdb258a 100644 --- a/official/c11825276.lua +++ b/official/c11825276.lua @@ -1,5 +1,5 @@ --戎の忍者-冥禪 ---War Ninja Meisen +--Meizen the Battle Ninja --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2b)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_NINJA)) c:RegisterEffect(e1) --Cannot be attack target local e2=Effect.CreateEffect(c) @@ -38,9 +38,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.ffilter(c,fc,sumtype,sp,sub,mg,sg) - return c:IsSetCard(0x2b,fc,sumtype,sp) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp)) + return c:IsSetCard(SET_NINJA,fc,sumtype,sp) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsRace,1,c,c:GetRace(),fc,sumtype,sp)) end function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION or not e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -49,13 +49,13 @@ function s.contactfil(tp) return Duel.GetReleaseGroup(tp) end function s.contactop(g) - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) end function s.tgcon(e) return Duel.IsExistingMatchingCard(Card.IsPosition,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,POS_FACEDOWN_DEFENSE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE|POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_NINJA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c11830996.lua b/official/c11830996.lua index bf9e402c28..1256e501e2 100644 --- a/official/c11830996.lua +++ b/official/c11830996.lua @@ -1,4 +1,5 @@ --エンシェント・リーフ +--Ancient Leaf local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c11834972.lua b/official/c11834972.lua index 13ec4bb256..e4d3a6c20d 100644 --- a/official/c11834972.lua +++ b/official/c11834972.lua @@ -1,4 +1,5 @@ --ラヴァル・ガンナー +--Laval Blaster local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.cfilter(c) - return c:IsSetCard(0x39) and c:GetCode()~=id + return c:IsSetCard(SET_LAVAL) and c:GetCode()~=id end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) @@ -35,7 +36,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.DiscardDeck(tp,ac,REASON_COST) end local g=Duel.GetOperatedGroup() - e:SetLabel(g:FilterCount(Card.IsSetCard,nil,0x39)*200) + e:SetLabel(g:FilterCount(Card.IsSetCard,nil,SET_LAVAL)*200) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,8 +44,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c11845050.lua b/official/c11845050.lua index 77ee519b1d..c613debbcc 100644 --- a/official/c11845050.lua +++ b/official/c11845050.lua @@ -1,7 +1,6 @@ --ライトハンド・シャーク --Right-Hand Shark --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --When normal summoned, add 1 "Left-Hand Shark" from deck @@ -36,7 +35,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={47840168} - function s.thfilter(c) return c:IsCode(47840168) and c:IsAbleToHand() end @@ -70,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end @@ -90,7 +88,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) rc:RegisterEffect(e1,true) end \ No newline at end of file diff --git a/official/c11851647.lua b/official/c11851647.lua index 6dffacf39e..12fedb9b8b 100644 --- a/official/c11851647.lua +++ b/official/c11851647.lua @@ -1,5 +1,5 @@ --ハイ・キューピット ---High Cupit +--Cupid Volley --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -50,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct) c:RegisterEffect(e1) end @@ -68,5 +68,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c11868731.lua b/official/c11868731.lua index c8b503e962..cfc3ba1193 100644 --- a/official/c11868731.lua +++ b/official/c11868731.lua @@ -1,4 +1,5 @@ --マドルチェ・マジョレーヌ +--Madolche Magileine local s,id=GetID() function s.initial_effect(c) --to deck @@ -24,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -35,11 +36,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.filter(c) - return c:IsSetCard(0x71) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MADOLCHE) and c:IsMonster() and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -52,4 +53,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c11868825.lua b/official/c11868825.lua index 0d720f183a..b3c11b0066 100644 --- a/official/c11868825.lua +++ b/official/c11868825.lua @@ -1,4 +1,5 @@ --ゴブリンの秘薬 +--Goblin's Secret Remedy local s,id=GetID() function s.initial_effect(c) --recover diff --git a/official/c1187243.lua b/official/c1187243.lua index 9f0a093f3a..8a11734d86 100644 --- a/official/c1187243.lua +++ b/official/c1187243.lua @@ -1,9 +1,9 @@ --ガスタへの追風 ---Gusto Tailwind +--Tailwind of Gusto --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x10)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_GUSTO)) --Cannot be destroyed by the opponent's card effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.thcfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsDiscardable() end @@ -38,10 +38,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,s.thcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.thcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0x10) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_GUSTO) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -56,7 +56,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter1(c,e,tp,ec) - return c:IsSetCard(0x10) and not c:IsRace(ec:GetRace()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and not c:IsRace(ec:GetRace()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spfilter2(c,e,tp) return c:IsLevel(1) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -86,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c11877465.lua b/official/c11877465.lua index cfffabae46..e0daea27e8 100644 --- a/official/c11877465.lua +++ b/official/c11877465.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end diff --git a/official/c11881272.lua b/official/c11881272.lua index ea6ca861d4..650507cc92 100644 --- a/official/c11881272.lua +++ b/official/c11881272.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) e3:SetTarget(s.acttg) @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_BATTLE_DESTROYING) e4:SetRange(LOCATION_SZONE) e4:SetCondition(s.atkcon) - e4:SetCost(s.atkcost) + e4:SetCost(Cost.SelfToGrave) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end @@ -68,10 +68,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ec==eg:GetFirst() and ec==Duel.GetAttacker() and ec:IsStatus(STATUS_OPPO_BATTLE) and ec:CanChainAttack() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() end \ No newline at end of file diff --git a/official/c11901678.lua b/official/c11901678.lua index df7234d70c..31bec62c2a 100644 --- a/official/c11901678.lua +++ b/official/c11901678.lua @@ -1,4 +1,5 @@ --ブラック・デーモンズ・ドラゴン +--Black Skull Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -6,4 +7,4 @@ function s.initial_effect(c) Fusion.AddProcMix(c,true,true,CARD_SUMMONED_SKULL,CARD_REDEYES_B_DRAGON) end s.listed_names={CARD_REDEYES_B_DRAGON} -s.material_setcode={0x3b,0x45} +s.material_setcode={SET_RED_EYES,SET_ARCHFIEND} \ No newline at end of file diff --git a/official/c11908584.lua b/official/c11908584.lua index 77501f3c16..4cb091618b 100644 --- a/official/c11908584.lua +++ b/official/c11908584.lua @@ -36,14 +36,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c11913700.lua b/official/c11913700.lua index ca263cf9a3..789244ce04 100644 --- a/official/c11913700.lua +++ b/official/c11913700.lua @@ -26,21 +26,21 @@ function s.eqfilter(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetPreviousEquipTarget() - return e:GetHandler():IsReason(REASON_LOST_TARGET) and not ec:IsLocation(LOCATION_ONFIELD+LOCATION_OVERLAY) + return e:GetHandler():IsReason(REASON_LOST_TARGET) and not ec:IsLocation(LOCATION_ONFIELD|LOCATION_OVERLAY) end function s.spfilter(c,e,tp) return c:IsCode(CARD_NEOS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c11925569.lua b/official/c11925569.lua index 84f60105c0..b38c701eed 100644 --- a/official/c11925569.lua +++ b/official/c11925569.lua @@ -1,4 +1,5 @@ --狩猟本能 +--Hunting Instinct local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c11954712.lua b/official/c11954712.lua index 32d1414a51..41c0228072 100644 --- a/official/c11954712.lua +++ b/official/c11954712.lua @@ -1,4 +1,5 @@ --フライファング +--Flyfang local s,id=GetID() function s.initial_effect(c) --reg @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_REMOVE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetCountLimit(1) e3:SetCondition(s.rmcon) e3:SetTarget(s.rmtg) @@ -26,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -38,21 +39,21 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end + if Duel.Remove(c,0,REASON_EFFECT|REASON_TEMPORARY)==0 then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabelObject(c) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) Duel.RegisterEffect(e1,tp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c11958188.lua b/official/c11958188.lua index d46a7f3a8b..e5abd3234d 100644 --- a/official/c11958188.lua +++ b/official/c11958188.lua @@ -1,4 +1,5 @@ --武神器-マフツ +--Bujingi Raven local s,id=GetID() function s.initial_effect(c) --destroy @@ -9,14 +10,14 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.descon) - e1:SetCost(s.descost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c,tp) - return c:IsSetCard(0x88) and c:IsControler(tp) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_BUJIN) and c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -24,10 +25,6 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(g:GetFirst()) return #g>0 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetLabelObject():GetReasonCard() if chk==0 then return tc:IsRelateToBattle() end @@ -38,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c11961740.lua b/official/c11961740.lua index 67bc520d5b..3a8b282864 100644 --- a/official/c11961740.lua +++ b/official/c11961740.lua @@ -1,4 +1,5 @@ --タイムカプセル +--Different Dimension Capsule local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,13 +25,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,tp,POS_FACEDOWN) local tc=g:GetFirst() if tc and Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)~=0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) e1:SetLabel(0) @@ -42,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -54,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end else e:SetLabel(1) end -end +end \ No newline at end of file diff --git a/official/c11962031.lua b/official/c11962031.lua index 96c7d26cdc..4c73f7d06f 100644 --- a/official/c11962031.lua +++ b/official/c11962031.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.descon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) diff --git a/official/c11969228.lua b/official/c11969228.lua index e946c99c32..c5d7c2af00 100644 --- a/official/c11969228.lua +++ b/official/c11969228.lua @@ -1,6 +1,5 @@ --ドラグニティナイト - ロムルス --Dragunity Knight - Romulus - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -33,17 +32,16 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} s.listed_names={62265044} - function s.matfilter(c,sc,st,tp) - return c:IsRace(RACE_DRAGON+RACE_WINGEDBEAST,sc,st,tp) and not c:IsType(TYPE_TOKEN,sc,st,tp) + return c:IsRace(RACE_DRAGON|RACE_WINGEDBEAST,sc,st,tp) and not c:IsType(TYPE_TOKEN,sc,st,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) - return (c:IsSetCard(0x29) and c:IsSpellTrap()) or c:IsCode(62265044) and c:IsAbleToHand() + return (c:IsSetCard(SET_DRAGUNITY) and c:IsSpellTrap()) or c:IsCode(62265044) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,7 +63,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.seqcfilter,1,nil,tp,lg) end function s.filter(c,e,tp) - return c:IsRace(RACE_DRAGON+RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsRace(RACE_DRAGON|RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -82,12 +80,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2,true) --Cannot be used as link material local e3=Effect.CreateEffect(e:GetHandler()) @@ -96,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() diff --git a/official/c11975962.lua b/official/c11975962.lua index 33fc1a018a..874ff6ead8 100644 --- a/official/c11975962.lua +++ b/official/c11975962.lua @@ -15,8 +15,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x69) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x69) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_HIERATIC) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_HIERATIC) Duel.Release(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1197847.lua b/official/c1197847.lua index 4e94658665..e5386e9484 100644 --- a/official/c1197847.lua +++ b/official/c1197847.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1,id) e4:SetCondition(s.spcon) @@ -36,8 +36,8 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then local tc=g:GetFirst() if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then @@ -56,8 +56,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then Duel.BreakEffect() - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end end -end +end \ No newline at end of file diff --git a/official/c12014404.lua b/official/c12014404.lua index 3cd49564a7..305c839b49 100644 --- a/official/c12014404.lua +++ b/official/c12014404.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -35,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EVENT_BATTLE_START) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -49,7 +49,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) --Lose 500 ATK local e2=Effect.CreateEffect(c) @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bc:RegisterEffect(e2) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) -end + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) +end \ No newline at end of file diff --git a/official/c12015000.lua b/official/c12015000.lua index 573aa88c62..c79f996a85 100644 --- a/official/c12015000.lua +++ b/official/c12015000.lua @@ -1,7 +1,6 @@ --新生代化石竜 スカルガ --Fossil Dragon Skullgar --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Fusion summon procedure @@ -29,13 +28,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={CARD_FOSSIL_FUSION} - function s.ffilter(c,fc,sumtype,tp) return c:IsLevelBelow(4) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-tp) end diff --git a/official/c12018201.lua b/official/c12018201.lua index 6382d8aac0..b66fd95a7a 100644 --- a/official/c12018201.lua +++ b/official/c12018201.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsLocation(LOCATION_HAND+LOCATION_MZONE) + return rp~=tp and re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_HAND|LOCATION_MZONE) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_HAND+LOCATION_MZONE) and not chkc:IsControler(tp) end + if chkc then return chkc:IsLocation(LOCATION_HAND|LOCATION_MZONE) and not chkc:IsControler(tp) end local rc=re:GetHandler() if chk==0 then return rc:IsMonster() and rc:IsControler(1-tp) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,LOCATION_MZONE) @@ -50,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and rp==1-tp and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDefense(200) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -73,12 +73,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() diff --git a/official/c12021072.lua b/official/c12021072.lua index fb3e85006e..e7b9f1b6b1 100644 --- a/official/c12021072.lua +++ b/official/c12021072.lua @@ -1,5 +1,5 @@ --大胆無敵 ---Boldly Invincible +--Child's Play local s,id=GetID() function s.initial_effect(c) --activate @@ -45,5 +45,4 @@ function s.hoperation(e,tp) end function s.bpcondition(e) return Duel.GetLP(e:GetHandlerPlayer())>=10000 -end - +end \ No newline at end of file diff --git a/official/c12023931.lua b/official/c12023931.lua index 36a7c2a677..928a860106 100644 --- a/official/c12023931.lua +++ b/official/c12023931.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x102),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ROKKET),2,2) --atkup local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc~=c end @@ -46,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -55,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter(c,e,tp) @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c12061457.lua b/official/c12061457.lua index dcbcd7721b..6f8b3b64f2 100644 --- a/official/c12061457.lua +++ b/official/c12061457.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil) @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end diff --git a/official/c12071500.lua b/official/c12071500.lua index 8630f8ff2a..9843e13f32 100644 --- a/official/c12071500.lua +++ b/official/c12071500.lua @@ -12,9 +12,9 @@ function s.fusfilter(c) return c.dark_calling end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE|LOCATION_HAND,0,nil) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end \ No newline at end of file diff --git a/official/c12076263.lua b/official/c12076263.lua index 0201280fae..4230b371db 100644 --- a/official/c12076263.lua +++ b/official/c12076263.lua @@ -1,4 +1,5 @@ --ゼンマイドッグ +--Wind-Up Dog local s,id=GetID() function s.initial_effect(c) --atk/lv up @@ -18,14 +19,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(600) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e2:SetValue(2) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c12079734.lua b/official/c12079734.lua index 4fdb260a59..d576b582e3 100644 --- a/official/c12079734.lua +++ b/official/c12079734.lua @@ -59,10 +59,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) aux.SetUnionState(tc) end else - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c12081875.lua b/official/c12081875.lua index 911f23bceb..0ca717134b 100644 --- a/official/c12081875.lua +++ b/official/c12081875.lua @@ -1,5 +1,5 @@ --轟雷機龍-サンダー・ドラゴン ---Thunder Dragon Thunderstorm +--Thunder Dragon Thunderstormech --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -26,12 +26,12 @@ function s.initial_effect(c) e2:SetValue(s.repval) c:RegisterEffect(e2) end -s.listed_series={0x11c} +s.listed_series={SET_THUNDER_DRAGON} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.filter(c,e,tp) - if not (c:IsSetCard(0x11c) and c:IsMonster() + if not (c:IsSetCard(SET_THUNDER_DRAGON) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsHasEffect(id) and c:IsCanBeEffectTarget(e) and c:IsAbleToDeck()) then return false @@ -47,10 +47,10 @@ function s.filter(c,e,tp) return false end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -101,7 +101,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_THUNDER) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.repcfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c,true) diff --git a/official/c12097275.lua b/official/c12097275.lua index 4b9ea771ca..11e70a92a4 100644 --- a/official/c12097275.lua +++ b/official/c12097275.lua @@ -1,5 +1,5 @@ --剛鬼ハッグベア --- Gouki Hugbear +--Gouki Bearhug local s,id=GetID() function s.initial_effect(c) --atk down @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:HasNonZeroAttack() end @@ -45,19 +45,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(tc:GetBaseAttack()/2)) tc:RegisterEffect(e1) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0xfc) + return re and re:GetHandler():IsSetCard(SET_GOUKI) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,5 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c12117532.lua b/official/c12117532.lua index f1e0ba3c14..186fa3d0bd 100644 --- a/official/c12117532.lua +++ b/official/c12117532.lua @@ -1,4 +1,5 @@ --罅割れゆく斧 +--Shattered Axe local s,id=GetID() function s.initial_effect(c) aux.AddPersistentProcedure(c,nil,aux.FilterBoolFunction(Card.IsFaceup),CATEGORY_DISABLE,nil,nil,TIMING_END_PHASE,nil,nil,s.target) @@ -13,7 +14,7 @@ function s.initial_effect(c) --atkdown local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.atkcon) @@ -42,14 +43,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFirstCardTarget()~=nil + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetFirstCardTarget()~=nil end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() if tc then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.val(e,c) return c:GetFlagEffect(id)*-500 -end +end \ No newline at end of file diff --git a/official/c12148078.lua b/official/c12148078.lua index 9fec9f4f45..f7ecca358f 100644 --- a/official/c12148078.lua +++ b/official/c12148078.lua @@ -15,25 +15,25 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.roll_dice=true -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.filter(c,e,tp) - return c:IsSetCard(0x2016) and c:HasLevel() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:HasLevel() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local dc=Duel.TossDice(tp,1) local flag=false if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),2) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -58,4 +58,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end if not flag then Duel.SetLP(tp,Duel.GetLP(tp)-dc*500) end -end +end \ No newline at end of file diff --git a/official/c12152769.lua b/official/c12152769.lua index 4014cbbd1e..5b00053963 100644 --- a/official/c12152769.lua +++ b/official/c12152769.lua @@ -1,4 +1,5 @@ --おねだりゴブリン +--Scrounging Goblin local s,id=GetID() function s.initial_effect(c) --search @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xac} +s.listed_series={SET_GOBLIN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c) - return c:IsSetCard(0xac) and c:IsAbleToHand() + return c:IsSetCard(SET_GOBLIN) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c12160911.lua b/official/c12160911.lua index 6c13650a42..2fcf5267e1 100644 --- a/official/c12160911.lua +++ b/official/c12160911.lua @@ -1,4 +1,5 @@ --恵災いの像 +--Elephant Statue of Disaster local s,id=GetID() function s.initial_effect(c) --damage diff --git a/official/c12163590.lua b/official/c12163590.lua index 3b64ba0551..c793b59eca 100644 --- a/official/c12163590.lua +++ b/official/c12163590.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfDiscardCost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.gyrmsptg) e2:SetOperation(s.gyrmspop) c:RegisterEffect(e2) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) diff --git a/official/c12171659.lua b/official/c12171659.lua index 423ddfdf27..c0a43fb0a3 100644 --- a/official/c12171659.lua +++ b/official/c12171659.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,11 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_SANCTUARY_SKY} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(CARD_SANCTUARY_SKY) and c:IsAbleToHand() end diff --git a/official/c12174035.lua b/official/c12174035.lua index cf76e961bf..a2e3db0fc6 100644 --- a/official/c12174035.lua +++ b/official/c12174035.lua @@ -1,4 +1,5 @@ --ハイドロプレッシャーカノン +--Hydro Pressure Cannon local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) diff --git a/official/c12181376.lua b/official/c12181376.lua index cb307ae1f7..f64805d5bb 100644 --- a/official/c12181376.lua +++ b/official/c12181376.lua @@ -24,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(2700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end --cannot activate @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --disable local e2=Effect.CreateEffect(c) @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DISABLE) e2:SetTargetRange(0,LOCATION_SZONE) e2:SetTarget(s.distg) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --disable trap monster local e3=Effect.CreateEffect(c) @@ -50,11 +50,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTarget(s.distg) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() end function s.distg(e,c) return c:IsTrap() diff --git a/official/c1218214.lua b/official/c1218214.lua index 2140f93327..d42472464a 100644 --- a/official/c1218214.lua +++ b/official/c1218214.lua @@ -37,17 +37,17 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} function s.efilter(e,c) - return c:IsSetCard(0xe3) + return c:IsSetCard(SET_CUBIC) end function s.disfilter(c) - return c:IsSetCard(0xe3) + return c:IsSetCard(SET_CUBIC) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -65,7 +65,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xe3) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CUBIC) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c12183332.lua b/official/c12183332.lua index ec3c30e6c4..f9f2623947 100644 --- a/official/c12183332.lua +++ b/official/c12183332.lua @@ -1,4 +1,5 @@ --ショット・ガン・シャッフル +--Card Shuffle local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,14 +13,10 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(300)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) diff --git a/official/c12196873.lua b/official/c12196873.lua index 7cbb77e0b8..d51af4c0c7 100644 --- a/official/c12196873.lua +++ b/official/c12196873.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1,12196875) e3:SetRange(LOCATION_REMOVED) e3:SetCondition(s.spcon2) @@ -35,20 +35,20 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp) end function s.spfilter(c,e,tp) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x105) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_METAPHYS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end @@ -73,5 +73,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end - +end \ No newline at end of file diff --git a/official/c12197543.lua b/official/c12197543.lua index 1b83207c84..98d4572321 100644 --- a/official/c12197543.lua +++ b/official/c12197543.lua @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) {b1,aux.Stringid(id,1)}, {b2,aux.Stringid(id,2)}) if op==1 then - Duel.SendtoGrave(rg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(rg,REASON_EFFECT|REASON_DISCARD) elseif op==2 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=g:Select(tp,1,1,nil) diff --git a/official/c12206212.lua b/official/c12206212.lua index 994031cb6d..853a930e71 100644 --- a/official/c12206212.lua +++ b/official/c12206212.lua @@ -1,4 +1,5 @@ --ハーピィ・レディ三姉妹 +--Harpie Lady Sisters local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c12213463.lua b/official/c12213463.lua index 2e4820d38e..8677c5ec97 100644 --- a/official/c12213463.lua +++ b/official/c12213463.lua @@ -38,10 +38,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x1123} +s.listed_series={SET_ROSE_DRAGON} --Check for plant/dragon tuner monster function s.filter1(c) - return c:IsFaceup() and c:IsRace(RACE_PLANT+RACE_DRAGON) and c:IsType(TYPE_TUNER) + return c:IsFaceup() and c:IsRace(RACE_PLANT|RACE_DRAGON) and c:IsType(TYPE_TUNER) end --Does something that fits "filter" exist function s.sscon(e,tp,eg,ep,ev,re,r,rp) @@ -62,19 +62,19 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Rose Dragon" monster function s.filter(c,e,tp) - return c:IsSetCard(0x1123) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) + return c:IsSetCard(SET_ROSE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end --Performing the effect of special summoning a "Rose Dragon" from hand or GY function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -99,4 +99,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12215894.lua b/official/c12215894.lua index 913d16d505..a80da4c7d2 100644 --- a/official/c12215894.lua +++ b/official/c12215894.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xab)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DESKBOT)) e2:SetValue(500) c:RegisterEffect(e2) --defup @@ -43,9 +43,9 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.filter(c) - return c:IsSetCard(0xab) and c:IsAbleToDeck() and not c:IsPublic() + return c:IsSetCard(SET_DESKBOT) and c:IsAbleToDeck() and not c:IsPublic() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) @@ -68,24 +68,24 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0xab) and c:IsAbleToRemoveAsCost() and not c:IsCode(id) + return c:IsSetCard(SET_DESKBOT) and c:IsAbleToRemoveAsCost() and not c:IsCode(id) and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,true,true)) end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,nil) if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,9,9,aux.dncheck,0) end local gp=aux.SelectUnselectGroup(rg,e,tp,9,9,aux.dncheck,1,tp,HINTMSG_REMOVE) Duel.Remove(gp,POS_FACEUP,REASON_COST) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.operation2(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,nil) + local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_HAND,nil) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12216615.lua b/official/c12216615.lua index 398cfea1d4..35d5674e22 100644 --- a/official/c12216615.lua +++ b/official/c12216615.lua @@ -1,4 +1,5 @@ --コアキメイルの障壁 +--Koa'ki Meiru Shield local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,36623431) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,36623431) end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) diff --git a/official/c12219047.lua b/official/c12219047.lua index 7b6237718e..b0200fcab4 100644 --- a/official/c12219047.lua +++ b/official/c12219047.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetCondition(s.condition1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -21,17 +21,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER_E) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e2:SetCondition(s.condition2) c:RegisterEffect(e2) end -s.listed_series={0x10db} +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x10db) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_THE_PHANTOM_KNIGHTS) end function s.filter(c) return c:IsFaceup() and not (c:GetAttack()==0 and c:IsDisabled()) @@ -51,32 +47,32 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetValue(0) tc:RegisterEffect(e3) if tc:IsType(TYPE_TRAPMONSTER) then local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) end end end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x10db) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_THE_PHANTOM_KNIGHTS) + and aux.StatChangeDamageStepCondition() +end \ No newline at end of file diff --git a/official/c12235475.lua b/official/c12235475.lua index e47b0ff397..7352e54db0 100644 --- a/official/c12235475.lua +++ b/official/c12235475.lua @@ -1,4 +1,5 @@ --魔轟神アシェンヴェイル +--Fabled Ashenveil local s,id=GetID() function s.initial_effect(c) --attack up @@ -22,14 +23,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(600) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c12247206.lua b/official/c12247206.lua index f099374777..4ec8985657 100644 --- a/official/c12247206.lua +++ b/official/c12247206.lua @@ -23,18 +23,18 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() if chk==0 then - local g=Duel.GetMatchingGroup(s.nfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc) + local g=Duel.GetMatchingGroup(s.nfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,tc) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and #g==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false) end tc:CreateEffectRelation(e) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_NONE,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_NONE,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.filter(c,tc,e,tp) return s.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.selfilter(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c,e,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c,e,tp) end function s.sp(g,tp,pos) for sc in aux.Next(g) do @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft1>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft1=1 end local gg=Group.CreateGroup() - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,tc,e,tp) if ft1>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then if #g<=ft1 then s.sp(g,tp,POS_FACEUP_ATTACK) @@ -63,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_FACEUP) local sg=Duel.SelectMatchingCard(1-tp,s.selfilter,1-tp,LOCATION_MZONE,0,1,1,nil,e,1-tp) if ft2>0 and #sg>0 then - local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),1-tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,sg:GetFirst(),e,1-tp) + local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),1-tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,sg:GetFirst(),e,1-tp) if #g2>0 then if #g2<=ft2 then s.sp(g2,1-tp,POS_FACEUP) @@ -78,4 +78,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() Duel.SendtoGrave(gg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1224927.lua b/official/c1224927.lua index a0e43279f1..57c28c9b6f 100644 --- a/official/c1224927.lua +++ b/official/c1224927.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c1225009.lua b/official/c1225009.lua index b1da364bc8..3f15919c77 100644 --- a/official/c1225009.lua +++ b/official/c1225009.lua @@ -1,5 +1,5 @@ --白銀の城の召使い アリアンナ ---Labrynth Servant Arianna +--Arianna the Labrynth Servant --Scripted by Yuno local s,id=GetID() function s.initial_effect(c) @@ -32,10 +32,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x17f} +s.listed_series={SET_LABRYNTH} --Search a "Labrynth" card function s.filter(c) - return c:IsSetCard(0x17f) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_LABRYNTH) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -54,7 +54,7 @@ function s.cfilter(c,re) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetOriginalType()==TYPE_TRAP + return rp==tp and re and re:IsTrapEffect() and re:GetHandler():GetOriginalType()==TYPE_TRAP and eg:IsExists(s.cfilter,1,nil) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -94,4 +94,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c122520.lua b/official/c122520.lua index 7b73703150..ac83ab3331 100644 --- a/official/c122520.lua +++ b/official/c122520.lua @@ -34,9 +34,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.spcfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsLevelAbove(5) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) and c:IsLevelAbove(5) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,7 +59,7 @@ function s.distg(e,c) return c==e:GetHandler():GetBattleTarget() end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x9f),tp,LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PERFORMAPAL),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local t=Duel.GetAttackTarget() @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if t:IsRelateToBattle() then Duel.Destroy(t,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12253117.lua b/official/c12253117.lua index 6edd114243..144fa46fbf 100644 --- a/official/c12253117.lua +++ b/official/c12253117.lua @@ -1,4 +1,5 @@ --世界の平定 +--World Suppression local s,id=GetID() function s.initial_effect(c) --activate @@ -20,9 +21,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.distarget(e,c) return c:IsType(TYPE_FIELD) -end +end \ No newline at end of file diff --git a/official/c12255007.lua b/official/c12255007.lua index 890f899fd3..b0d79e04f4 100644 --- a/official/c12255007.lua +++ b/official/c12255007.lua @@ -25,25 +25,25 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.aclimit(e,re,tp) return not re:GetHandler():IsImmuneToEffect(e) and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.actcon(e) local tc=Duel.GetAttacker() local tp=e:GetHandlerPlayer() - return tc and tc:IsControler(tp) and (tc:IsSetCard(0x9f) or tc:IsSetCard(0x99)) + return tc and tc:IsControler(tp) and (tc:IsSetCard(SET_PERFORMAPAL) or tc:IsSetCard(SET_ODD_EYES)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x9f) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x9f) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_PERFORMAPAL) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_PERFORMAPAL) Duel.Release(g,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c12262393.lua b/official/c12262393.lua index 906fce9192..9cd9d0d851 100644 --- a/official/c12262393.lua +++ b/official/c12262393.lua @@ -1,4 +1,5 @@ --磁石の戦士δ +--Delta The Magnet Warrior local s,id=GetID() function s.initial_effect(c) --to grave @@ -28,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x2066} +s.listed_series={SET_MAGNET_WARRIOR} s.listed_names={75347539} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x2066) and c:IsLevelBelow(4) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevelBelow(4) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -45,11 +46,11 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x2066) and c:IsLevelBelow(4) and not c:IsCode(id) + return c:IsMonster() and c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) @@ -59,14 +60,14 @@ function s.spfilter(c,e,tp) return c:IsCode(75347539) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c12266229.lua b/official/c12266229.lua index 55b514ed8f..d687f67eca 100644 --- a/official/c12266229.lua +++ b/official/c12266229.lua @@ -55,7 +55,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.spfilter(c,e,tp) return c:IsCode(CARD_DARK_MAGICIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c12275533.lua b/official/c12275533.lua index 4397693a97..afa80f804e 100644 --- a/official/c12275533.lua +++ b/official/c12275533.lua @@ -1,6 +1,5 @@ --機動要犀 トリケライナー --Trifortressops - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -33,7 +32,7 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -55,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.efilter) c:RegisterEffect(e1) --Loses 500 DEF during each standby phase @@ -64,8 +63,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetOperation(s.adjustop) c:RegisterEffect(e2) end @@ -78,7 +77,7 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(-500) c:RegisterEffect(e1) diff --git a/official/c12289247.lua b/official/c12289247.lua index 33a94709a2..0bc52cf77f 100644 --- a/official/c12289247.lua +++ b/official/c12289247.lua @@ -51,7 +51,7 @@ function s.rpop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,6)) - local g=Duel.SelectMatchingCard(tp,s.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.rpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() local op=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then @@ -110,7 +110,7 @@ function s.hnfilter(c,e,tp,sg) end function s.hncost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE|LOCATION_GRAVE,0,c) + local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,c) local checkfunc=aux.PropertyTableFilter(Card.GetSetCard,SET_PENDULUM_DRAGON,SET_XYZ_DRAGON,SET_SYNCHRO_DRAGON,SET_FUSION_DRAGON) if chk==0 then return c:IsAbleToRemoveAsCost() and aux.SelectUnselectGroup(mg,e,tp,4,4,s.rescon(checkfunc),0) end local sg=aux.SelectUnselectGroup(mg,e,tp,4,4,s.rescon(checkfunc),1,tp,HINTMSG_REMOVE,s.rescon(checkfunc))+c diff --git a/official/c12292422.lua b/official/c12292422.lua index 7e8d2a3405..da102ebba9 100644 --- a/official/c12292422.lua +++ b/official/c12292422.lua @@ -30,9 +30,9 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgyfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.GetFieldGroupCount(1-tp,0,LOCATION_HAND+LOCATION_DECK)>0 end + and Duel.GetFieldGroupCount(1-tp,0,LOCATION_HAND|LOCATION_DECK)>0 end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND|LOCATION_DECK) end function s.filter(c,typ,lv) return c:IsRace(typ) and c:IsLevel(lv) and c:IsAbleToGrave() @@ -45,9 +45,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK) local lv=Duel.AnnounceLevel(tp,1,12) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(1-tp,s.filter,1-tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,typ,lv) + local g=Duel.SelectMatchingCard(1-tp,s.filter,1-tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,typ,lv) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c12296376.lua b/official/c12296376.lua index 579b74593f..90af1faa26 100644 --- a/official/c12296376.lua +++ b/official/c12296376.lua @@ -1,6 +1,5 @@ --エレキツツキ --Wattwoodpecker - local s,id=GetID() function s.initial_effect(c) --Can make a second attack @@ -27,6 +26,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c12299841.lua b/official/c12299841.lua index 8c8c97a980..e8abc84521 100644 --- a/official/c12299841.lua +++ b/official/c12299841.lua @@ -1,4 +1,5 @@ --ゼンマイソルジャー +--Wind-Up Soldier local s,id=GetID() function s.initial_effect(c) --atk/lv up @@ -18,14 +19,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(400) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e2:SetValue(1) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c12307878.lua b/official/c12307878.lua index c8266d3d5a..4f8cd026a5 100644 --- a/official/c12307878.lua +++ b/official/c12307878.lua @@ -1,4 +1,5 @@ --召喚獣プルガトリオ +--Invoked Purgatrio local s,id=GetID() function s.initial_effect(c) --fusion material diff --git a/official/c12324546.lua b/official/c12324546.lua index 46106b32d2..cb203c2f21 100644 --- a/official/c12324546.lua +++ b/official/c12324546.lua @@ -1,7 +1,8 @@ --漆黒の名馬 +--Legendary Ebon Steed local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x3d)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_SIX_SAMURAI)) --Atk,def up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -21,4 +22,4 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} \ No newline at end of file diff --git a/official/c12338068.lua b/official/c12338068.lua index ecc9f93c58..9158686675 100644 --- a/official/c12338068.lua +++ b/official/c12338068.lua @@ -1,4 +1,5 @@ --真魔獣 ガーゼット +--Legendary Maju Garzett local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c12369277.lua b/official/c12369277.lua index f3b607dad6..a0a924c3ea 100644 --- a/official/c12369277.lua +++ b/official/c12369277.lua @@ -1,4 +1,5 @@ --超量士ブルーレイヤー +--Super Quantum Blue Layer local s,id=GetID() function s.initial_effect(c) --search @@ -26,10 +27,10 @@ function s.initial_effect(c) e3:SetOperation(s.tdop) c:RegisterEffect(e3) end -s.listed_series={0xdc} +s.listed_series={SET_SUPER_QUANT} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0xdc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSetCard(0xdc) and c:IsAbleToDeck() + return c:IsSetCard(SET_SUPER_QUANT) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -58,4 +59,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c123709.lua b/official/c123709.lua index 69206689e6..c26c449e1e 100644 --- a/official/c123709.lua +++ b/official/c123709.lua @@ -39,7 +39,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetCondition(s.tgcon) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE)) c:RegisterEffect(e1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) @@ -75,4 +75,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c12385638.lua b/official/c12385638.lua index ed6816ca60..403c7f1da4 100644 --- a/official/c12385638.lua +++ b/official/c12385638.lua @@ -1,4 +1,5 @@ --Kozmo-エピローグ +--Kozmourning local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,13 +21,13 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.tdtg(e,c) - return c:IsSetCard(0xd2) + return c:IsSetCard(SET_KOZMO) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -35,18 +36,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_REVERSE_DAMAGE) e1:SetTargetRange(1,0) e1:SetValue(s.valcon) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.valcon(e,re,r,rp,rc) if (r&REASON_BATTLE)~=0 then local tp=e:GetHandlerPlayer() local bc=rc:GetBattleTarget() - if bc and bc:IsSetCard(0xd2) and bc:IsControler(tp) + if bc and bc:IsSetCard(SET_KOZMO) and bc:IsControler(tp) and Duel.GetFlagEffect(tp,id)==0 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end end return false -end +end \ No newline at end of file diff --git a/official/c12397569.lua b/official/c12397569.lua index 853ac019d5..15187d60c6 100644 --- a/official/c12397569.lua +++ b/official/c12397569.lua @@ -1,4 +1,4 @@ --- +--神域 バ=ティスティナ --Divine Domain Baatistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c12398280.lua b/official/c12398280.lua index 50713aa112..756f0361d7 100644 --- a/official/c12398280.lua +++ b/official/c12398280.lua @@ -1,4 +1,5 @@ --勝利の導き手フレイヤ +--Freya, Spirit of Victory local s,id=GetID() function s.initial_effect(c) --atk def diff --git a/official/c12408276.lua b/official/c12408276.lua index 542916fd0a..76ab88aa28 100644 --- a/official/c12408276.lua +++ b/official/c12408276.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -24,18 +24,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCountLimit(1) e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0xd2} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -52,11 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler()~=e:GetHandler() - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -69,4 +61,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12423762.lua b/official/c12423762.lua index c2f1d28d99..4963d6792e 100644 --- a/official/c12423762.lua +++ b/official/c12423762.lua @@ -1,4 +1,5 @@ --ガガガガードナー +--Gagaga Gardna local s,id=GetID() function s.initial_effect(c) --spsummon @@ -38,7 +39,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -47,7 +48,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c12435193.lua b/official/c12435193.lua index c31179cd15..3ef468eaac 100644 --- a/official/c12435193.lua +++ b/official/c12435193.lua @@ -1,4 +1,5 @@ --コアキメイル・ドラゴ +--Koa'ki Meiru Drago local s,id=GetID() function s.initial_effect(c) --cost @@ -23,7 +24,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -63,4 +64,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end function s.disspsum(e,c) return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) -end +end \ No newline at end of file diff --git a/official/c12444060.lua b/official/c12444060.lua index e7f7bbe553..d94915773c 100644 --- a/official/c12444060.lua +++ b/official/c12444060.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK+TIMING_BATTLE_START) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK|TIMING_BATTLE_START) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCost(s.cost) e1:SetTarget(s.target) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end local e1=Effect.CreateEffect(e:GetHandler()) @@ -34,12 +34,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x97) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ARTIFACT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -69,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12450071.lua b/official/c12450071.lua index 0799e7e297..62b27edd92 100644 --- a/official/c12450071.lua +++ b/official/c12450071.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcfilter(c) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsFusionSummoned() end function s.spfilter(c,e,tp) return c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -49,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c12451640.lua b/official/c12451640.lua index 373a968c6f..0e22228ac8 100644 --- a/official/c12451640.lua +++ b/official/c12451640.lua @@ -1,4 +1,5 @@ --フロント・オブザーバー +--Frontline Observer local s,id=GetID() function s.initial_effect(c) --tohand @@ -20,7 +21,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.thtg1) e1:SetOperation(s.thop1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -29,14 +30,14 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.thcon) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.thtg2) e2:SetOperation(s.thop2) e2:SetLabel(Duel.GetTurnCount()) - if Duel.GetTurnPlayer()==tp then - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) then + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END|RESET_SELF_TURN) end c:RegisterEffect(e2) end @@ -56,11 +57,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.filter2(c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() @@ -76,4 +73,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c12467005.lua b/official/c12467005.lua index 401296bdd2..1631d2fd3a 100644 --- a/official/c12467005.lua +++ b/official/c12467005.lua @@ -1,4 +1,5 @@ --タックルセイダー +--Tackle Crusader local s,id=GetID() function s.initial_effect(c) -- @@ -51,10 +52,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) e1:SetLabel(code) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c12469386.lua b/official/c12469386.lua index 7f1c45b61f..4d0ada7cc0 100644 --- a/official/c12469386.lua +++ b/official/c12469386.lua @@ -1,4 +1,5 @@ --返り咲く薔薇の大輪 +--Revival Rose local s,id=GetID() function s.initial_effect(c) --spsummon diff --git a/official/c12472242.lua b/official/c12472242.lua index 0cd91e843e..ef9a91e8e7 100644 --- a/official/c12472242.lua +++ b/official/c12472242.lua @@ -1,4 +1,5 @@ --レッグル +--Leghul local s,id=GetID() function s.initial_effect(c) --direct attack diff --git a/official/c1249315.lua b/official/c1249315.lua index 4352f81ffb..2e1a76ec29 100644 --- a/official/c1249315.lua +++ b/official/c1249315.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) return c:IsMonster() and c:IsAbleToHand() end diff --git a/official/c12496261.lua b/official/c12496261.lua index 40ec52d847..8e8af0e787 100644 --- a/official/c12496261.lua +++ b/official/c12496261.lua @@ -1,9 +1,9 @@ --ドラグニティナイト-ハールーン ---Dragunity Knight – Luin +--Dragunity Knight - Luin local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x29),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGUNITY),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) @@ -29,12 +29,12 @@ function s.initial_effect(c) e2:SetOperation(s.eqop2) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x29) + return ec:IsControler(tp) and ec:IsSetCard(SET_DRAGUNITY) end function s.filter(c) - return c:IsSetCard(0x29) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -60,7 +60,7 @@ function s.eqcheck(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(g) end function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) end function s.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end @@ -82,17 +82,17 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(true) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --equip effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1000) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c12501230.lua b/official/c12501230.lua index 4fc8b4abe4..35b81fdfc7 100644 --- a/official/c12501230.lua +++ b/official/c12501230.lua @@ -50,7 +50,7 @@ function s.initial_effect(c) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c12503902.lua b/official/c12503902.lua index 02103b4dee..df2e9fd736 100644 --- a/official/c12503902.lua +++ b/official/c12503902.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Equip procedure - aux.AddPersistentProcedure(c,0,s.filter,CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,nil,TIMING_DAMAGE_STEP,s.condition,nil,nil,s.operation) + aux.AddPersistentProcedure(c,0,s.filter,CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,nil,TIMING_DAMAGE_STEP,aux.StatChangeDamageStepCondition,nil,nil,s.operation) --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -22,9 +22,6 @@ function s.initial_effect(c) e2:SetOperation(s.selfdesop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) end @@ -44,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.discon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() - if not tc or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + if not tc or not re:IsSpellEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g:IsContains(tc) end diff --git a/official/c12508268.lua b/official/c12508268.lua index 3adbcc84cc..b5bcfd177b 100644 --- a/official/c12508268.lua +++ b/official/c12508268.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x207f} +s.listed_series={SET_UTOPIC_FUTURE} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x207f) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIC_FUTURE) and c:IsType(TYPE_XYZ) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --disable local e2=Effect.CreateEffect(c) @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetCondition(s.discon) e2:SetTarget(s.distg) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --damage local e3=Effect.CreateEffect(c) @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCondition(aux.bdcon) e3:SetOperation(s.damop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -70,4 +70,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Damage(1-tp,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12525049.lua b/official/c12525049.lua index bd5a75102f..e3c833a84f 100644 --- a/official/c12525049.lua +++ b/official/c12525049.lua @@ -1,4 +1,5 @@ --音響戦士ギータス +--Symphonic Warrior Guitaar local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -25,14 +26,14 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.listed_names={id} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1066) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SYMPHONIC_WARRIOR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c,e,tp) - return c:IsSetCard(0x1066) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -64,4 +65,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c12527118.lua b/official/c12527118.lua index cdcc2f5b12..e9ba1ed88a 100644 --- a/official/c12527118.lua +++ b/official/c12527118.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) --Opponent's monsters cannot attack directly local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) @@ -38,10 +38,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetBaseAttack()) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,2)) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,2)) --Destroy it during the End Phase of the next turn local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -50,7 +50,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) e2:SetLabel(Duel.GetTurnCount()) e2:SetLabelObject(tc) Duel.RegisterEffect(e2,tp) @@ -69,7 +69,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsReleasable() end + if chk==0 then return c:IsNormalSummoned() and c:IsReleasable() end Duel.Release(c,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -78,6 +78,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c12533811.lua b/official/c12533811.lua index 2e95e0b2ea..a78b4784c1 100644 --- a/official/c12533811.lua +++ b/official/c12533811.lua @@ -1,4 +1,5 @@ --ベビー・トラゴン +--Baby Tiragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,17 +12,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) return c:IsFaceup() and c:GetLevel()==1 and c:GetEffectCount(EFFECT_DIRECT_ATTACK)==0 @@ -38,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c12538374.lua b/official/c12538374.lua index 2a047938e5..f11c889ec8 100644 --- a/official/c12538374.lua +++ b/official/c12538374.lua @@ -1,4 +1,5 @@ --黄泉ガエル +--Treeborn Frog local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.condition) diff --git a/official/c12571621.lua b/official/c12571621.lua index b3b830399c..1350013a90 100644 --- a/official/c12571621.lua +++ b/official/c12571621.lua @@ -15,14 +15,14 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x150} +s.listed_series={SET_VIRTUAL_WORLD} s.listed_names={id} local key=TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP function s.tgtfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x150) and Duel.IsExistingMatchingCard(s.tgvfilter,tp,LOCATION_DECK,0,1,nil,c:GetType()&key) + return c:IsFaceup() and c:IsSetCard(SET_VIRTUAL_WORLD) and Duel.IsExistingMatchingCard(s.tgvfilter,tp,LOCATION_DECK,0,1,nil,c:GetType()&key) end function s.tgvfilter(c,type1) - return c:IsAbleToGrave() and c:IsSetCard(0x150) and not c:IsType(type1) + return c:IsAbleToGrave() and c:IsSetCard(SET_VIRTUAL_WORLD) and not c:IsType(type1) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.tgtfilter(chkc,tp) end @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e0,tp) aux.RegisterClientHint(c,EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,1),nil) local tc=Duel.GetFirstTarget() @@ -60,14 +60,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end end end function s.thfilter(c) - return c:IsSetCard(0x150) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) @@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c) return not (c:IsLevelAbove(3) or c:IsRankAbove(3)) -end +end \ No newline at end of file diff --git a/official/c12580477.lua b/official/c12580477.lua index 5e331d594f..cdb58d1485 100644 --- a/official/c12580477.lua +++ b/official/c12580477.lua @@ -1,4 +1,5 @@ --サンダー・ボルト +--Raigeki local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c12600382.lua b/official/c12600382.lua index 99192809de..7606ec74c8 100644 --- a/official/c12600382.lua +++ b/official/c12600382.lua @@ -1,4 +1,5 @@ --エクゾディア・ネクロス +--Exodia Necross local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -28,7 +29,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetCategory(CATEGORY_ATKCHANGE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.atkcon) @@ -45,7 +46,7 @@ function s.initial_effect(c) end s.listed_names={8124921,44519536,70903634,7902349,33396948} function s.efdes(e,re) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() @@ -57,7 +58,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(500) c:RegisterEffect(e1) end @@ -68,4 +69,4 @@ function s.descon(e) or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,70903634) or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,7902349) or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,33396948) -end +end \ No newline at end of file diff --git a/official/c12607053.lua b/official/c12607053.lua index d29fbdeb71..17887cc5c8 100644 --- a/official/c12607053.lua +++ b/official/c12607053.lua @@ -1,5 +1,5 @@ ---Waboku --和睦の使者 +--Waboku local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,13 +16,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c12615446.lua b/official/c12615446.lua index 95d3cb9bd5..d45fcdade0 100644 --- a/official/c12615446.lua +++ b/official/c12615446.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCategory(CATEGORY_POSITION+CATEGORY_DISABLE) e1:SetCountLimit(1) - e1:SetCost(s.poscost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,10 +33,6 @@ end function s.matfilter(c,xyz,sumtype,tp) return c:IsRace(RACE_INSECT,xyz,sumtype,tp) and c:IsAttribute(ATTRIBUTE_LIGHT,xyz,sumtype,tp) end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end @@ -51,19 +47,19 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -87,4 +83,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Overlay(c,tc) end -end +end \ No newline at end of file diff --git a/official/c12624008.lua b/official/c12624008.lua index be30eb4b46..090172cb79 100644 --- a/official/c12624008.lua +++ b/official/c12624008.lua @@ -1,4 +1,5 @@ --シャインスピリッツ +--Radiant Spirit local s,id=GetID() function s.initial_effect(c) --destroy diff --git a/official/c1264319.lua b/official/c1264319.lua index d3da805265..b359945e9b 100644 --- a/official/c1264319.lua +++ b/official/c1264319.lua @@ -2,7 +2,7 @@ --Gem-Knight Fusion local s,id=GetID() function s.initial_effect(c) - c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047))) + c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT))) --salvage local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) @@ -14,9 +14,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.thfilter(c) - return c:IsSetCard(0x1047) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end @@ -34,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c12644061.lua b/official/c12644061.lua index 5505b607d5..43be3285f2 100644 --- a/official/c12644061.lua +++ b/official/c12644061.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE) + e2:SetTargetRange(LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetTarget(s.tg) e2:SetValue(ATTRIBUTE_DARK) @@ -44,9 +44,9 @@ function s.initial_effect(c) e5:SetValue(s.val) c:RegisterEffect(e5) end -s.listed_series={0x1034,0x2034} +s.listed_series={SET_CRYSTAL_BEAST,SET_ULTIMATE_CRYSTAL} function s.tg(e,c) - if not c:IsSetCard(0x1034) then return false end + if not c:IsSetCard(SET_CRYSTAL_BEAST) then return false end if c:GetFlagEffect(1)==0 then c:RegisterFlagEffect(1,0,0,0) local eff @@ -64,13 +64,13 @@ function s.tg(e,c) return true end function s.val(e,c,re,chk) - if chk==0 then return c:IsSetCard(0x1034) end + if chk==0 then return c:IsSetCard(SET_CRYSTAL_BEAST) end return ATTRIBUTE_DARK end function s.discon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return at and a:IsSetCard(0x2034) + return at and a:IsSetCard(SET_ULTIMATE_CRYSTAL) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -79,12 +79,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) Duel.AdjustInstantly(tc) end @@ -92,10 +92,10 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() return Duel.GetBattleDamage(tp)>0 - and ((a:IsControler(tp) and a:IsSetCard(0x1034)) or (at and at:IsControler(tp) and at:IsSetCard(0x1034))) + and ((a:IsControler(tp) and a:IsSetCard(SET_CRYSTAL_BEAST)) or (at and at:IsControler(tp) and at:IsSetCard(SET_CRYSTAL_BEAST))) end function s.dfilter(c) - return c:IsSetCard(0x1034) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_DECK,0,1,nil) end @@ -111,6 +111,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c12670770.lua b/official/c12670770.lua index 1180e8e53f..ded3b42f14 100644 --- a/official/c12670770.lua +++ b/official/c12670770.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetTarget(s.acttg) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -49,7 +49,7 @@ function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetRange(LOCATION_SZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.sdescon) e1:SetOperation(s.sdesop) diff --git a/official/c12678601.lua b/official/c12678601.lua index 2a524cd02b..cc7642dc7d 100644 --- a/official/c12678601.lua +++ b/official/c12678601.lua @@ -34,13 +34,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={} -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_DECK) or c:IsPreviousLocation(LOCATION_HAND) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_TINDANGLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -72,7 +72,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end function s.lkcon(e,tp,eg,ep,ev,re,r,rp) local rc=e:GetHandler():GetReasonCard() - return rc:IsSetCard(0x10b) and r==REASON_LINK + return rc:IsSetCard(SET_TINDANGLE) and r==REASON_LINK end function s.lkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -83,6 +83,6 @@ function s.lkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c12678870.lua b/official/c12678870.lua index 1ae1990019..891a113359 100644 --- a/official/c12678870.lua +++ b/official/c12678870.lua @@ -1,9 +1,10 @@ --聖霊獣騎 ペトルフィン +--Ritual Beast Ulti-Pettlephin local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10b5),aux.FilterBoolFunctionEx(Card.IsSetCard,0x20b5)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RITUAL_BEAST_TAMER),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SPIRITUAL_BEAST)) Fusion.AddContactProc(c,s.contactfil,s.contactop,aux.FALSE) --indes local e3=Effect.CreateEffect(c) @@ -26,24 +27,24 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10b5,0x20b5} -s.material_setcode={0xb5,0x10b5,0x20b5} +s.listed_series={SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} +s.material_setcode={SET_RITUAL_BEAST,SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_COST) end function s.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_RITUAL_BEAST_TAMER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.IsExistingTarget(s.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp) end function s.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_SPIRITUAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -72,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c12694768.lua b/official/c12694768.lua index bda0e493b4..53bd74b1cc 100644 --- a/official/c12694768.lua +++ b/official/c12694768.lua @@ -1,4 +1,5 @@ --暴鬼 +--Abaki local s,id=GetID() function s.initial_effect(c) --battle destroyed diff --git a/official/c1269512.lua b/official/c1269512.lua index d61127eb8d..43081d58e4 100644 --- a/official/c1269512.lua +++ b/official/c1269512.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.distg) @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCondition(s.exatkcon) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetOperation(function() Duel.ChainAttack() end) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end diff --git a/official/c12697630.lua b/official/c12697630.lua index 8cacabc081..46b347e92b 100644 --- a/official/c12697630.lua +++ b/official/c12697630.lua @@ -1,4 +1,5 @@ --アーティファクト-ベガルタ +--Artifact Beagalltach local s,id=GetID() function s.initial_effect(c) --set @@ -44,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsFacedown() diff --git a/official/c12735388.lua b/official/c12735388.lua index 2671c3485f..1919b6e79f 100644 --- a/official/c12735388.lua +++ b/official/c12735388.lua @@ -1,4 +1,5 @@ --レインボー・ヴェール +--Rainbow Veil local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -18,19 +19,19 @@ end function s.disop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=c:GetEquipTarget():GetBattleTarget() - c:CreateRelation(tc,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + c:CreateRelation(tc,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) e1:SetCondition(s.discon2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetRange(LOCATION_SZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) e2:SetOperation(s.disop2) e2:SetLabelObject(tc) c:RegisterEffect(e2) @@ -43,4 +44,4 @@ function s.disop2(e,tp,eg,ep,ev,re,r,rp) if loc==LOCATION_MZONE and re:GetHandler()==e:GetLabelObject() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c12743620.lua b/official/c12743620.lua index e002715df3..1f348a53c1 100644 --- a/official/c12743620.lua +++ b/official/c12743620.lua @@ -1,5 +1,5 @@ --ユニゾン・チューン ---Uni-song Tuning +--Uni-Song Tuning --scripted Logical Nonsense local s,id=GetID() function s.initial_effect(c) @@ -43,14 +43,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(tc1:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc2:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(TYPE_TUNER) tc2:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c1274455.lua b/official/c1274455.lua index 55c42191dd..54290113d2 100644 --- a/official/c1274455.lua +++ b/official/c1274455.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -23,18 +23,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xd2} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -49,12 +45,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -69,4 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c12744567.lua b/official/c12744567.lua index 4597e3d145..d487fe6d08 100644 --- a/official/c12744567.lua +++ b/official/c12744567.lua @@ -1,6 +1,5 @@ --CNo.101 S・H・Dark Knight --Number C101: Silent Honor DARK - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -31,10 +30,9 @@ function s.initial_effect(c) end s.xyz_number=101 s.listed_names={48739166} - function s.filter(c) return not c:IsType(TYPE_TOKEN) and c:IsAbleToChangeControler() - and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -73,10 +71,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) Duel.BreakEffect() local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12755462.lua b/official/c12755462.lua index 85159a1b86..26c770dec4 100644 --- a/official/c12755462.lua +++ b/official/c12755462.lua @@ -1,4 +1,5 @@ --ゴブリン穴埋め部隊 +--Goblin Pothole Squad local s,id=GetID() function s.initial_effect(c) --summon success @@ -28,7 +29,7 @@ function s.initial_effect(c) e5:SetOperation(s.cedop2) c:RegisterEffect(e5) end -s.listed_series={0x4c} +s.listed_series={SET_TRAP_HOLE} function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) Duel.SetChainLimitTillChainEnd(s.chlimit1) end @@ -47,5 +48,5 @@ function s.cedop2(e,tp,eg,ep,ev,re,r,rp) end end function s.chlimit2(re,rp,tp) - return not re:GetHandler():IsTrap() or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:GetHandler():IsSetCard(0x4c) -end + return not re:GetHandler():IsTrap() or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:GetHandler():IsSetCard(SET_TRAP_HOLE) +end \ No newline at end of file diff --git a/official/c12760674.lua b/official/c12760674.lua index e2139f964d..fbf7139245 100644 --- a/official/c12760674.lua +++ b/official/c12760674.lua @@ -1,5 +1,5 @@ --モルトシュラーク ---Mortschlag +--Mordschlag --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -21,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.immval(e,te) - return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and te:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) + return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsMonsterEffect() and te:IsActivated() and te:GetHandler():IsSpecialSummoned() end function s.adcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetEquipTarget() @@ -38,11 +38,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-value) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) bc:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c12766474.lua b/official/c12766474.lua index 1b50569c0c..72b717a2b4 100644 --- a/official/c12766474.lua +++ b/official/c12766474.lua @@ -40,7 +40,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -69,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500*e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12800777.lua b/official/c12800777.lua index 4ebeda34ae..96c6eac9b1 100644 --- a/official/c12800777.lua +++ b/official/c12800777.lua @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end diff --git a/official/c12804701.lua b/official/c12804701.lua index 2985750415..8fee07a89c 100644 --- a/official/c12804701.lua +++ b/official/c12804701.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c1281505.lua b/official/c1281505.lua index cf199ce064..060ce0e0b8 100644 --- a/official/c1281505.lua +++ b/official/c1281505.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(s.eqcon) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -27,10 +27,6 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetPreviousLocation()==LOCATION_MZONE end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -51,7 +47,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -65,5 +61,5 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,c,96) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c12817939.lua b/official/c12817939.lua index eef08619fa..5b06eda792 100644 --- a/official/c12817939.lua +++ b/official/c12817939.lua @@ -15,16 +15,16 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={58206034,85313220} s.LVnum=6 -s.LVset=0x4f +s.LVset=SET_DARK_LUCIUS function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local d=Duel.GetAttackTarget() @@ -34,33 +34,29 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) d:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id)~=0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(58206034) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE),0,0) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c12822541.lua b/official/c12822541.lua index 764beae174..e140f9da42 100644 --- a/official/c12822541.lua +++ b/official/c12822541.lua @@ -16,12 +16,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.filter1(c) - return c:IsSetCard(0xaf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToHand() end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter1(chkc) end diff --git a/official/c12836042.lua b/official/c12836042.lua index fbb3342225..4a4c7a5fed 100644 --- a/official/c12836042.lua +++ b/official/c12836042.lua @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BP) @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c128454.lua b/official/c128454.lua index 91bd12f2ca..487ba31541 100644 --- a/official/c128454.lua +++ b/official/c128454.lua @@ -10,14 +10,14 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x9f,0x98} +s.listed_series={SET_PERFORMAPAL,SET_MAGICIAN} function s.thfilter(c) - return ((c:IsLocation(LOCATION_PZONE) and (c:IsSetCard(0x9f) or c:IsSetCard(0x98))) + return ((c:IsLocation(LOCATION_PZONE) and c:IsSetCard({SET_PERFORMAPAL,SET_MAGICIAN})) or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_PENDULUM))) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #tg==2 then Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12863633.lua b/official/c12863633.lua index 21abe13c27..24c4c5fb06 100644 --- a/official/c12863633.lua +++ b/official/c12863633.lua @@ -33,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetLabel(1-tp) e3:SetValue(s.synlimit) tc:RegisterEffect(e3) diff --git a/official/c1287123.lua b/official/c1287123.lua index f029ef7299..09c2437e39 100644 --- a/official/c1287123.lua +++ b/official/c1287123.lua @@ -21,7 +21,7 @@ function s.filter(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) or re:IsHasCategory(CATEGORY_NEGATE) then return false end + if not re:IsMonsterEffect() or re:IsHasCategory(CATEGORY_NEGATE) then return false end local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and tc+tg:FilterCount(s.filter,nil)-#tg>0 end diff --git a/official/c12923641.lua b/official/c12923641.lua index 5c57496cc3..0643650c62 100644 --- a/official/c12923641.lua +++ b/official/c12923641.lua @@ -29,12 +29,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) c:RegisterEffect(e1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -55,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ct==2 then Duel.Destroy(c,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c12927849.lua b/official/c12927849.lua index 94bf71926c..6780a41f48 100644 --- a/official/c12927849.lua +++ b/official/c12927849.lua @@ -36,9 +36,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x107e,0x107f} +s.listed_series={SET_ZW,SET_UTOPIA} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x107e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_ZW) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end @@ -80,7 +80,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ec==e:GetHandler():GetEquipTarget() and ec:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end function s.thfilter(c) - return c:IsSetCard(0x107e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ZW) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -95,4 +95,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c12930501.lua b/official/c12930501.lua index 8eb4d6e8a3..e750fee797 100644 --- a/official/c12930501.lua +++ b/official/c12930501.lua @@ -54,10 +54,10 @@ function s.costfilter(c,tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end + and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -73,8 +73,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if #g<1 or Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)<1 then return end local tc=g:GetFirst() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) - -- Send to GY in the End Phase + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + --Send to GY in the End Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -83,7 +83,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then diff --git a/official/c12931061.lua b/official/c12931061.lua index ac958053d4..606e763c7a 100644 --- a/official/c12931061.lua +++ b/official/c12931061.lua @@ -25,19 +25,19 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={19814508} -s.listed_series={0x107,0xb2} +s.listed_series={SET_FA,SET_UA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thfilter(c) - return c:IsAbleToHand() and ((c:IsMonster() and c:IsLocation(LOCATION_DECK) and (c:IsSetCard(0x107) or c:IsSetCard(0xb2))) + return c:IsAbleToHand() and ((c:IsMonster() and c:IsLocation(LOCATION_DECK) and (c:IsSetCard(SET_FA) or c:IsSetCard(SET_UA))) or (c:IsCode(19814508) and c:IsLocation(LOCATION_GRAVE))) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -67,9 +67,9 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(function(_,c) return c:IsSetCard(0xb2) or c:IsSetCard(0x107) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(function(_,c) return c:IsSetCard(SET_UA) or c:IsSetCard(SET_FA) end) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end \ No newline at end of file diff --git a/official/c12940613.lua b/official/c12940613.lua index 13d9879ea1..e87bd80598 100644 --- a/official/c12940613.lua +++ b/official/c12940613.lua @@ -9,21 +9,18 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x71} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_MADOLCHE} function s.tdfilter1(c) - return c:IsMonster() and c:IsSetCard(0x71) and c:IsAbleToDeck() + return c:IsMonster() and c:IsSetCard(SET_MADOLCHE) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter1(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x71),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MADOLCHE),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(s.tdfilter1,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.tdfilter1,tp,LOCATION_GRAVE,0,1,1,nil) @@ -35,8 +32,8 @@ function s.tdfilter2(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not (tc and tc:IsRelateToEffect(e)) or Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)==0 then return end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x71),tp,LOCATION_MZONE,0,nil) + if not (tc and tc:IsRelateToEffect(e)) or Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_MADOLCHE),tp,LOCATION_MZONE,0,nil) local ct=0 for tc in aux.Next(g) do local preatk=tc:GetAttack() @@ -45,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -57,6 +54,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #dg~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - Duel.SendtoDeck(dg:Select(tp,1,1,nil),nil,2,REASON_EFFECT) + Duel.SendtoDeck(dg:Select(tp,1,1,nil),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c12948099.lua b/official/c12948099.lua index 6014eff3e7..b21b307f0e 100644 --- a/official/c12948099.lua +++ b/official/c12948099.lua @@ -1,4 +1,5 @@ --古神クトグア +--Old Entity Cthugua local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -35,7 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) return c:IsType(TYPE_XYZ) and c:GetRank()==4 and c:IsAbleToExtra() @@ -48,7 +49,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if #g>0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) @@ -79,17 +80,17 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.drcon2) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.drcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) -end + return e:GetHandler():IsXyzSummoned() +end \ No newline at end of file diff --git a/official/c12950294.lua b/official/c12950294.lua index a2d049d642..2a3b7e3830 100644 --- a/official/c12950294.lua +++ b/official/c12950294.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_EFFECT)~=0 end @@ -48,10 +48,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.thfilter(c) - return c:IsSetCard(0x102) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ROKKET) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -67,5 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end - +end \ No newline at end of file diff --git a/official/c1295111.lua b/official/c1295111.lua index b65bf8f4ea..886935fe43 100644 --- a/official/c1295111.lua +++ b/official/c1295111.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_FZONE) e4:SetCountLimit(1,id) e4:SetCondition(function(e,tp) return Duel.GetBattleMonster(tp) end) - e4:SetCost(s.atkcost) + e4:SetCost(Cost.PayLP(1000)) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) c:RegisterEffect(e4) @@ -83,10 +83,6 @@ function s.reinclinkop(e,tp,eg,ep,ev,re,r,rp,c,must,g,min,max) Duel.SendtoGrave(mg,REASON_MATERIAL|REASON_LINK) Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.atkfilter(c) return c:IsFaceup() and c:IsLinkMonster() and not c:IsAttack(0) end diff --git a/official/c12953226.lua b/official/c12953226.lua index 993b5f46d2..4b646975e8 100644 --- a/official/c12953226.lua +++ b/official/c12953226.lua @@ -1,4 +1,5 @@ --女邪神ヌヴィア +--Nuvia the Wicked local s,id=GetID() function s.initial_effect(c) --self destroy diff --git a/official/c1295442.lua b/official/c1295442.lua index 8e943b09d3..7984cecdfe 100644 --- a/official/c1295442.lua +++ b/official/c1295442.lua @@ -1,9 +1,9 @@ --- 氷水艇エーギロカシス --- Icejade Creation Aegirocassis --- Scripted by Hatter +--氷水艇エーギロカシス +--Icejade Creation Aegirocassis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Equipped monster gains ATK/DEF + --Equipped monster gains ATK/DEF local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) @@ -12,7 +12,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) - -- Equip this card to 1 "Icejade" monster + --Equip this card to 1 "Icejade" monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_EQUIP) @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetTarget(s.eqtg) e3:SetOperation(s.eqop) c:RegisterEffect(e3) - -- Special Summon this card while it is equipped to a monster + --Special Summon this card while it is equipped to a monster local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -60,7 +60,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(tp) and Duel.Equip(tp,c,tc) then - -- Equip limit + --Equip limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) diff --git a/official/c12958919.lua b/official/c12958919.lua index ec326e8e6e..5996f38647 100644 --- a/official/c12958919.lua +++ b/official/c12958919.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.damcon) @@ -37,16 +37,16 @@ function s.initial_effect(c) end) end s.listed_names={12958920} -s.listed_series={0x49} +s.listed_series={SET_SKYBLASTER} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - if tc:IsSetCard(0x49) then - Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + if tc:IsSetCard(SET_SKYBLASTER) then + Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x49,TYPES_TOKEN,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SKYBLASTER,TYPES_TOKEN,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end @@ -56,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if ft>ct then ft=ct end if ft<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x49,TYPES_TOKEN,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) then return end + if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SKYBLASTER,TYPES_TOKEN,500,500,4,RACE_FIEND,ATTRIBUTE_DARK) then return end local ctn=true while ft>0 and ctn do local token=Duel.CreateToken(tp,id+1) @@ -75,19 +75,19 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_OATH) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x49)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SKYBLASTER)) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x49),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_SKYBLASTER),tp,LOCATION_MZONE,0,nil) Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x49),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_SKYBLASTER),tp,LOCATION_MZONE,0,nil) Duel.Damage(p,ct*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c12977245.lua b/official/c12977245.lua index 9d23ef3b96..6c23032ebe 100644 --- a/official/c12977245.lua +++ b/official/c12977245.lua @@ -21,9 +21,8 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} s.listed_names={id} function s.imtg(e,c) - return c:IsFaceup() and c:IsSetCard(0x103) and not c:IsCode(id) -end - + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) and not c:IsCode(id) +end \ No newline at end of file diff --git a/official/c12980373.lua b/official/c12980373.lua index 1771d4a55a..8da34c3959 100644 --- a/official/c12980373.lua +++ b/official/c12980373.lua @@ -1,4 +1,5 @@ --マドルチェ・ミィルフィーヤ +--Madolche Mewfeuille local s,id=GetID() function s.initial_effect(c) --to deck @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -32,11 +33,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.filter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MADOLCHE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -50,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c12986778.lua b/official/c12986778.lua index 385e948c0b..be373bf09c 100644 --- a/official/c12986778.lua +++ b/official/c12986778.lua @@ -14,19 +14,19 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - return #g==2 and g:GetFirst():IsSetCard(0x13) and g:GetNext():IsSetCard(0x13) + return #g==2 and g:GetFirst():IsSetCard(SET_MEKLORD) and g:GetNext():IsSetCard(SET_MEKLORD) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -39,4 +39,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c12986807.lua b/official/c12986807.lua index 2387059cca..f4d256dc46 100644 --- a/official/c12986807.lua +++ b/official/c12986807.lua @@ -1,4 +1,5 @@ --ラヴァル・グレイター +--Laval the Greater local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,9 +24,9 @@ function s.initial_effect(c) e2:SetTarget(s.desreptg) c:RegisterEffect(e2) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,16 +38,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_EFFECT) end function s.repfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) - and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end if Duel.SelectEffectYesNo(tp,c,96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) return true else return false end -end +end \ No newline at end of file diff --git a/official/c12989604.lua b/official/c12989604.lua index b14984162e..1b92d80571 100644 --- a/official/c12989604.lua +++ b/official/c12989604.lua @@ -1,4 +1,5 @@ --星遺物からの目醒め +--World Legacy Awakens local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,3 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.LinkSummon(tp,tc) end end - diff --git a/official/c13002461.lua b/official/c13002461.lua index 7a59e54754..e89a8f28b4 100644 --- a/official/c13002461.lua +++ b/official/c13002461.lua @@ -1,4 +1,5 @@ --魔導戦士 フォルス +--Strength of Prophecy local s,id=GetID() function s.initial_effect(c) --atk/lv up @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -41,15 +42,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c13026402.lua b/official/c13026402.lua index 19bdb90603..f9b8c6f84c 100644 --- a/official/c13026402.lua +++ b/official/c13026402.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -19,11 +19,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp - and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13030280.lua b/official/c13030280.lua index 24e52b21a8..e4e06831b9 100644 --- a/official/c13030280.lua +++ b/official/c13030280.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCondition(s.damcon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c13035077.lua b/official/c13035077.lua index dee338d3b5..f3e657f938 100644 --- a/official/c13035077.lua +++ b/official/c13035077.lua @@ -1,4 +1,5 @@ --ドラゴニックD +--Dragonic Diagram local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf9)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TRUE_DRACO_KING)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -38,9 +39,9 @@ function s.initial_effect(c) e5:SetOperation(s.desop) c:RegisterEffect(e5) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.indtg(e,c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) and c:IsSetCard(0xf9) + return c:IsTributeSummoned() and c:IsSetCard(SET_TRUE_DRACO_KING) end function s.indct(e,re,r,rp) if (r&REASON_BATTLE)~=0 then @@ -48,19 +49,19 @@ function s.indct(e,re,r,rp) else return 0 end end function s.thfilter(c) - return c:IsSetCard(0xf9) and c:IsAbleToHand() + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsAbleToHand() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler()) + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,e:GetHandler()) if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) @@ -69,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c13046291.lua b/official/c13046291.lua index 494edfb0a2..84dbab72de 100644 --- a/official/c13046291.lua +++ b/official/c13046291.lua @@ -39,7 +39,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end local sg=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,e,tp,ft) Duel.Release(sg,REASON_COST) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -61,25 +61,25 @@ end function s.atchcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) end + and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,RACE_REPTILE|RACE_DINOSAUR) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.atchtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) end + and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,RACE_REPTILE|RACE_DINOSAUR) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) end function s.atchop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) - and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,RACE_REPTILE+RACE_DINOSAUR) then + and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,RACE_REPTILE|RACE_DINOSAUR) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,RACE_REPTILE+RACE_DINOSAUR) + local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,RACE_REPTILE|RACE_DINOSAUR) local sg=aux.SelectUnselectGroup(g,e,tp,1,2,aux.dncheck,1,tp,HINTMSG_SPSUMMON) if sg then Duel.Overlay(tc,sg) end end -end +end \ No newline at end of file diff --git a/official/c13048472.lua b/official/c13048472.lua index 6d3851fe02..fe013252ea 100644 --- a/official/c13048472.lua +++ b/official/c13048472.lua @@ -1,5 +1,5 @@ --儀式の下準備 ---Pre-Preparations of Rites +--Pre-Preparation of Rites local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +14,7 @@ function s.initial_effect(c) end function s.filter(c,tp) return c:IsRitualSpell() and c:IsAbleToHand() - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c) end function s.filter2(c,mc) return c:IsRitualMonster() and c:IsAbleToHand() and s.isfit(c,mc) @@ -24,13 +24,13 @@ function s.isfit(c,mc) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp) if #g>0 then - local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,g:GetFirst()) + local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,g:GetFirst()) if #mg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=mg:Select(tp,1,1,nil) @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c13070280.lua b/official/c13070280.lua index f93adbc7ec..dc7b6ebd5b 100644 --- a/official/c13070280.lua +++ b/official/c13070280.lua @@ -1,4 +1,4 @@ --- +--ティスティナの戯れ --Play of the Tistina --Scripted by Hatter local s,id=GetID() @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c13073850.lua b/official/c13073850.lua index 5f2bf4ca12..270e939704 100644 --- a/official/c13073850.lua +++ b/official/c13073850.lua @@ -1,4 +1,5 @@ --クリフォート・エイリアス +--Qliphort Stealth local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -19,7 +20,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_PZONE) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_QLI)) e3:SetValue(300) c:RegisterEffect(e3) --summon with no tribute @@ -68,12 +69,12 @@ function s.initial_effect(c) e9:SetLabelObject(e8) c:RegisterEffect(e9) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimcon(e) return not e:GetHandler():IsForbidden() end function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -111,7 +112,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -119,14 +120,14 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e2) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end @@ -147,9 +148,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then + if g:IsExists(Card.IsSetCard,1,nil,SET_QLI) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c13090893.lua b/official/c13090893.lua index 8bdb2cbaf4..82c7088655 100644 --- a/official/c13090893.lua +++ b/official/c13090893.lua @@ -61,4 +61,3 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end - diff --git a/official/c13093792.lua b/official/c13093792.lua index 17e1db64d5..52d5e9c6af 100644 --- a/official/c13093792.lua +++ b/official/c13093792.lua @@ -22,11 +22,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,1) local g=Duel.GetDecktopGroup(tp,1) local tc=g:GetFirst() - if tc:GetType()==TYPE_SPELL then + if tc:IsNormalSpell() then Duel.DisableShuffleCheck() Duel.SendtoGrave(g,REASON_EFFECT) local ae=tc:GetActivateEffect() - if tc:GetLocation()==LOCATION_GRAVE and ae then + if tc:IsLocation(LOCATION_GRAVE) and ae then local e1=Effect.CreateEffect(tc) e1:SetDescription(ae:GetDescription()) e1:SetType(EFFECT_TYPE_IGNITION) diff --git a/official/c13108445.lua b/official/c13108445.lua index 9990fd1b39..55b5fce9d8 100644 --- a/official/c13108445.lua +++ b/official/c13108445.lua @@ -1,9 +1,10 @@ --ジェムナイト・アクアマリナ +--Gem-Knight Aquamarine local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,27126980,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047)) + Fusion.AddProcMix(c,false,false,27126980,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -25,15 +26,15 @@ function s.initial_effect(c) --to defense local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.poscon) e4:SetOperation(s.posop) c:RegisterEffect(e4) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end @@ -61,4 +62,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c13117073.lua b/official/c13117073.lua index d8c3a2b28d..602fcd4eeb 100644 --- a/official/c13117073.lua +++ b/official/c13117073.lua @@ -34,11 +34,11 @@ function s.lcheck(g,lc) return g:GetClassCount(Card.GetCode)==#g end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.regcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -51,7 +51,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) @@ -71,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.imtg(e,c) return c:IsFaceup() and c:IsSpell() -end +end \ No newline at end of file diff --git a/official/c131182.lua b/official/c131182.lua index 7a89ea05af..12cc73b081 100644 --- a/official/c131182.lua +++ b/official/c131182.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e6:SetRange(0xff) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetCondition(s.spcon) e6:SetTarget(s.sptg) @@ -65,7 +65,7 @@ function s.atlimit(e,c) return c:IsFaceup() and c~=e:GetHandler() end function s.battleop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -80,7 +80,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_EFFECT)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return (r&REASON_EFFECT)~=0 and re:IsSpellTrapEffect() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -94,4 +94,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13143275.lua b/official/c13143275.lua index f30255bf1f..75447a717b 100644 --- a/official/c13143275.lua +++ b/official/c13143275.lua @@ -38,17 +38,17 @@ function s.filter(c,e,tp,zone) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local zone=Duel.GetZoneWithLinkedCount(2,tp)&0x1f - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.filter(chkc,e,tp,zone) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end + local zone=Duel.GetZoneWithLinkedCount(2,tp)&ZONES_MMZ + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.filter(chkc,e,tp,zone) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,zone) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,zone) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - local zone=Duel.GetZoneWithLinkedCount(2,tp)&0x1f + local zone=Duel.GetZoneWithLinkedCount(2,tp)&ZONES_MMZ if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) end -end +end \ No newline at end of file diff --git a/official/c1315120.lua b/official/c1315120.lua index db27cdc1cd..5c1541e0e3 100644 --- a/official/c1315120.lua +++ b/official/c1315120.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 @@ -37,12 +37,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TG) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -55,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c13166204.lua b/official/c13166204.lua index a0e42c7847..375a832303 100644 --- a/official/c13166204.lua +++ b/official/c13166204.lua @@ -12,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x54) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_GAGAGA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and eg:IsExists(s.filter,1,nil,tp) and Duel.IsChainDisablable(ev) + return rp~=tp and re:IsMonsterEffect() and eg:IsExists(s.filter,1,nil,tp) and Duel.IsChainDisablable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if a<0 then a=0 end if a>0 then Duel.Damage(1-tp,a,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c13166648.lua b/official/c13166648.lua index bdfe634b78..065fac0542 100644 --- a/official/c13166648.lua +++ b/official/c13166648.lua @@ -1,4 +1,5 @@ --双龍降臨 +--Double Dragon Descent local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,19 +38,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) Duel.CalculateDamage(a,tc) end end -end +end \ No newline at end of file diff --git a/official/c13171876.lua b/official/c13171876.lua index 89fa526138..c5674814d2 100644 --- a/official/c13171876.lua +++ b/official/c13171876.lua @@ -1,8 +1,8 @@ --ドラゴンメイド・ラドリー ---Dragon Maid Laudry +--Laundry Dragonmaid local s,id=GetID() function s.initial_effect(c) - -- mill + --mill local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DECKDES) @@ -20,14 +20,14 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,tp,3) @@ -36,21 +36,21 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:GetLevel()==7 and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==7 and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c13173832.lua b/official/c13173832.lua index 19b82faf70..8790450f3a 100644 --- a/official/c13173832.lua +++ b/official/c13173832.lua @@ -1,7 +1,6 @@ --転生炎獣ウルヴィー --Salamangreat Wolvie --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -45,7 +44,7 @@ function s.lkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) rc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -82,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13179234.lua b/official/c13179234.lua index 0e5f6dbb46..f9bc41d7e1 100644 --- a/official/c13179234.lua +++ b/official/c13179234.lua @@ -1,9 +1,9 @@ --- VV~始まりの地~ --- Valiants' Var - The Land of Beginning --- Scripted by Hatter +--VV~始まりの地~ +--Vaylantz Wars - The Place of Beginning +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search 1 "Valiants" Field Spell + --Search 1 "Valiants" Field Spell local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY) @@ -13,22 +13,22 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Place 1 "Valiants" monster in the Pendulum Zone + --Place 1 "Valiants" monster in the Pendulum Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.pztg) e2:SetOperation(s.pzop) c:RegisterEffect(e2) end s.listed_names={63394872} -s.listed_series={0x17e} +s.listed_series={SET_VAYLANTZ} function s.thfilter(c) - return c:IsType(TYPE_FIELD) and c:IsSpell() and c:IsSetCard(0x17e) and c:IsAbleToHand() + return c:IsType(TYPE_FIELD) and c:IsSpell() and c:IsSetCard(SET_VAYLANTZ) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,7 +65,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.pzfilter(c) - return c:IsFaceup() and c:IsSetCard(0x17e) and not c:IsForbidden() + return c:IsFaceup() and c:IsSetCard(SET_VAYLANTZ) and not c:IsForbidden() end function s.pztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.pzfilter,tp,LOCATION_EXTRA,0,1,nil) diff --git a/official/c13183454.lua b/official/c13183454.lua index f4d6715dfe..4484c7e5e9 100644 --- a/official/c13183454.lua +++ b/official/c13183454.lua @@ -1,4 +1,5 @@ --零鳥姫リオート・ハルピュイア +--Ice Princess Zereort local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,15 +11,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end @@ -36,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c13204145.lua b/official/c13204145.lua index b3eee6e073..28a94722b1 100644 --- a/official/c13204145.lua +++ b/official/c13204145.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) diff --git a/official/c13210191.lua b/official/c13210191.lua index 86bcb97f07..465d8facd2 100644 --- a/official/c13210191.lua +++ b/official/c13210191.lua @@ -1,4 +1,5 @@ --嵐 +--Storm local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c13215230.lua b/official/c13215230.lua index 90e84ff668..c28f10bcda 100644 --- a/official/c13215230.lua +++ b/official/c13215230.lua @@ -1,4 +1,5 @@ --ドリーム・ピエロ +--Dream Clown local s,id=GetID() function s.initial_effect(c) --destroy diff --git a/official/c13220032.lua b/official/c13220032.lua index 3152881280..5ef6bc51f8 100644 --- a/official/c13220032.lua +++ b/official/c13220032.lua @@ -1,4 +1,5 @@ --ヴァイロン・チャージャー +--Vylon Charger local s,id=GetID() function s.initial_effect(c) --draw diff --git a/official/c1322368.lua b/official/c1322368.lua index 88d09f0f02..f11dd91858 100644 --- a/official/c1322368.lua +++ b/official/c1322368.lua @@ -4,13 +4,13 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xee),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SPYRAL),2,2) --Change name to "SPYRAL Super Agent" local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(41091257) c:RegisterEffect(e1) --Special summon or add to hand 1 "SPYRAL" monster @@ -24,19 +24,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} s.listed_names={41091257} function s.spfilter(c,e,tp,zone) - return c:IsSetCard(0xee) and c:IsMonster() and (c:IsAbleToHand() or (zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone))) + return c:IsSetCard(SET_SPYRAL) and c:IsMonster() and (c:IsAbleToHand() or (zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone))) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local zone=e:GetHandler():GetLinkedZone(tp) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,zone) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) e:SetLabel(Duel.SelectOption(tp,70,71,72)) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if (opt==0 and tc:IsMonster()) or (opt==1 and tc:IsSpell()) or (opt==2 and tc:IsTrap()) then local zone=e:GetHandler():GetLinkedZone(tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,zone) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,zone) local sc=sg:GetFirst() if sc then if zone~=0 then @@ -63,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c13224603.lua b/official/c13224603.lua index 34f6061dc3..bc842c6094 100644 --- a/official/c13224603.lua +++ b/official/c13224603.lua @@ -78,12 +78,12 @@ function s.filter(c) return c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.Summon(tp,tc,true,nil) @@ -94,7 +94,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit(tc)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -116,4 +116,4 @@ end function s.rcop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c132308.lua b/official/c132308.lua index e1894f25a6..37501b42b2 100644 --- a/official/c132308.lua +++ b/official/c132308.lua @@ -1,9 +1,9 @@ --- 六花のしらひめ --- Rikka Snow Princess --- Scripted by Hatter +--六花のしらひめ +--Rikka Princess +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Negate activated monster effect + --Negate activated monster effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DISABLE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.discon) e2:SetCost(s.discost) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -37,7 +37,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Cannot Special Summon, except Plant monsters + --Cannot Special Summon, except Plant monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -45,13 +45,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return not c:IsRace(RACE_PLANT) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x141),tp,LOCATION_MZONE,0,1,nil) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_RIKKA),tp,LOCATION_MZONE,0,1,nil) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c13234975.lua b/official/c13234975.lua index a47cda828c..1074aa7050 100644 --- a/official/c13234975.lua +++ b/official/c13234975.lua @@ -1,4 +1,4 @@ --- +--騎甲虫隊上陸態勢 --Beetrooper Landing --scripted by pyrQ local s,id=GetID() @@ -22,7 +22,7 @@ function s.cfilter(c) return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -37,4 +37,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c13235258.lua b/official/c13235258.lua index cac1f50278..389215d1a1 100644 --- a/official/c13235258.lua +++ b/official/c13235258.lua @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetCondition(s.atkcon1) e2:SetValue(s.atktg) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -105,7 +105,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) end function s.ctcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget() and ep~=tp and e:GetHandler():GetFlagEffect(id)~=0 @@ -115,5 +115,4 @@ function s.atkcon2(e) end function s.atkval(e,c) return c:GetCounter(0x1045)*-100 -end - +end \ No newline at end of file diff --git a/official/c13241004.lua b/official/c13241004.lua index 360e777e85..7efff1609e 100644 --- a/official/c13241004.lua +++ b/official/c13241004.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0xa9,0xad} +s.listed_series={SET_FLUFFAL,SET_FRIGHTFUR} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0xa9) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FLUFFAL) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and c:GetReasonCard():IsOriginalSetCard(0xad) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and c:GetReasonCard():IsOriginalSetCard(SET_FRIGHTFUR) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -60,6 +60,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)==2 then Duel.ShuffleHand(p) Duel.BreakEffect() - Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(p,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c13247801.lua b/official/c13247801.lua index 0daf08a487..13e71e2c8d 100644 --- a/official/c13247801.lua +++ b/official/c13247801.lua @@ -1,5 +1,5 @@ --機甲部隊の防衛圏 ---Machina Defense Region +--Machina Defense Perimeter --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -76,4 +76,4 @@ function s.tohandop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13250922.lua b/official/c13250922.lua index 1fbf77f697..de37557350 100644 --- a/official/c13250922.lua +++ b/official/c13250922.lua @@ -1,6 +1,5 @@ --オオアリクイクイアリ --Anteatereatingant - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -68,7 +67,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c13256226.lua b/official/c13256226.lua index b82fe01470..34501c4f7e 100644 --- a/official/c13256226.lua +++ b/official/c13256226.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_POLYMERIZATION} -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end @@ -59,13 +59,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end function s.thfilter(c) if not c:IsAbleToHand() then return false end - return c:IsCode(CARD_POLYMERIZATION) or (c:IsSpellTrap() and c:ListsCodeWithArchetype(0x3008)) + return c:IsCode(CARD_POLYMERIZATION) or (c:IsSpellTrap() and c:ListsCodeWithArchetype(SET_ELEMENTAL_HERO)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -80,7 +80,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_NORMAL) and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -92,7 +92,7 @@ end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + and c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then diff --git a/official/c13258285.lua b/official/c13258285.lua index 485a3d9a7e..c33ac18dc1 100644 --- a/official/c13258285.lua +++ b/official/c13258285.lua @@ -1,42 +1,38 @@ --- Uk-P.U.N.K.娑楽斎 --- Ukiyoe P.U.N.K. Sharakusai --- Scripted by Hatter +--Uk-P.U.N.K.娑楽斎 +--Ukiyoe-P.U.N.K. Sharakusai +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Fusion Summon - local fusparam=aux.FilterBoolFunction(Card.IsSetCard,0x173) + --Fusion Summon + local fusparam=aux.FilterBoolFunction(Card.IsSetCard,SET_PUNK) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(Fusion.SummonEffTG(fusparam)) e1:SetOperation(Fusion.SummonEffOP(fusparam)) c:RegisterEffect(e1) - -- Synchro Summon + --Synchro Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp)return Duel.IsTurnPlayer(1-tp)end) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(600)) e2:SetTarget(s.sctg) e2:SetOperation(s.scop) c:RegisterEffect(e2) end -s.listed_series={0x173} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end +s.listed_series={SET_PUNK} function s.scfilter(c) - return c:IsSetCard(0x173) and c:IsSynchroSummonable(nil) + return c:IsSetCard(SET_PUNK) and c:IsSynchroSummonable(nil) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -49,4 +45,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),nil) end -end +end \ No newline at end of file diff --git a/official/c13291886.lua b/official/c13291886.lua index ffc3649c26..56744238f5 100644 --- a/official/c13291886.lua +++ b/official/c13291886.lua @@ -1,10 +1,10 @@ --- ヴァリアンツD-デューク --- Vaylantz Dominator Duke --- Scripted by Hatter +--ヴァリアンツD-デューク +--Vaylantz Dominator Duke +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Prevent activation + --Prevent activation local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.catg) e2:SetOperation(s.caop) c:RegisterEffect(e2) - -- Take control + --Take control local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_CONTROL) @@ -75,7 +75,7 @@ end function s.caop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFacedown() and tc:IsRelateToEffect(e) then - -- Cannot activate card this turn + --Cannot activate card this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) @@ -103,7 +103,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and tc:IsControler(1-tp) and tc:IsControlerCanBeChanged() and Duel.GetControl(tc,tp) then local c=e:GetHandler() - -- Cannot activate its effects + --Cannot activate its effects local e1=Effect.CreateEffect(c) e1:SetDescription(3302) e1:SetType(EFFECT_TYPE_SINGLE) @@ -111,12 +111,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - -- Cannot declare an attack + --Cannot declare an attack local e2=e1:Clone() e2:SetDescription(3206) e2:SetCode(EFFECT_CANNOT_ATTACK) tc:RegisterEffect(e2) - -- Treated as a "Vaylantz" monster + --Treated as a "Vaylantz" monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,3)) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) diff --git a/official/c13293158.lua b/official/c13293158.lua index 2434e806ec..65411af971 100644 --- a/official/c13293158.lua +++ b/official/c13293158.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetOperation(s.activate) c:RegisterEffect(e3) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} s.dark_calling=true s.listed_names={CARD_DARK_FUSION,21844576,86188410} function s.lizcon(e,tp,eg,ep,ev,re,r,rp) @@ -65,4 +65,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1329620.lua b/official/c1329620.lua index 3d24da2056..497fc8ed2a 100644 --- a/official/c1329620.lua +++ b/official/c1329620.lua @@ -1,9 +1,9 @@ --- 壱世壊に澄み渡る残響 --- Tearalaments Crime --- Scripted by Hatter +--壱世壊に澄み渡る残響 +--Tearlaments Cryme +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate effect activation + --Negate effect activation local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK+CATEGORY_TOGRAVE) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) - -- Add 1 "Tearalaments" monster to the hand + --Add 1 "Tearalaments" monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -28,11 +28,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and (Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_VISAS_STARFROST),tp,LOCATION_ONFIELD,0,1,nil) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x182),tp,LOCATION_MZONE,0,1,nil)) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_TEARLAMENTS),tp,LOCATION_MZONE,0,1,nil)) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_HAND,0,1,nil) end @@ -46,7 +46,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if not Duel.NegateActivation(ev) or not rc:IsRelateToEffect(re) then return end rc:CancelToGrave() - if Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)<1 or not rc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then return end + if Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)<1 or not rc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsMonster,Card.IsAbleToGrave),tp,LOCATION_HAND,0,1,1,nil) if #g>0 then @@ -55,7 +55,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x182) and c:IsMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_TEARLAMENTS) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c13302026.lua b/official/c13302026.lua index 155de8962a..1bcbf6bce3 100644 --- a/official/c13302026.lua +++ b/official/c13302026.lua @@ -21,7 +21,7 @@ end function s.spcond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsNormalSummoned() and not c:IsAttack(0) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.spfilter(c,e,tp) return c:IsRace(RACE_INSECT) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c13313278.lua b/official/c13313278.lua index 3d68e59154..7dc2ebbcd2 100644 --- a/official/c13313278.lua +++ b/official/c13313278.lua @@ -1,4 +1,5 @@ --BK ベイル +--Battlin' Boxer Veil local s,id=GetID() function s.initial_effect(c) --special summon diff --git a/official/c13314457.lua b/official/c13314457.lua index d07908f8f4..dff39d4c32 100644 --- a/official/c13314457.lua +++ b/official/c13314457.lua @@ -1,4 +1,5 @@ --深海の大ウナギ +--Deepsea Macrotrema local s,id=GetID() function s.initial_effect(c) --to grave @@ -23,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c13316346.lua b/official/c13316346.lua index 123c169d76..b13c51fa2f 100644 --- a/official/c13316346.lua +++ b/official/c13316346.lua @@ -1,4 +1,5 @@ --起動兵士デッドリボルバー +--Boot-Up Soldier - Dread Dynamo local s,id=GetID() function s.initial_effect(c) --spsummon condition @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetValue(2000) c:RegisterEffect(e1) end -s.listed_series={0x51} +s.listed_series={SET_GADGET} function s.atkcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x51),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GADGET),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) +end \ No newline at end of file diff --git a/official/c13317419.lua b/official/c13317419.lua index dfc7efb47a..8474ed3aff 100644 --- a/official/c13317419.lua +++ b/official/c13317419.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -29,9 +29,6 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackAbove(800) end @@ -54,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -62,7 +59,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -93,12 +90,12 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c13331639.lua b/official/c13331639.lua index 4bb575bd62..b26f6a7ad8 100644 --- a/official/c13331639.lua +++ b/official/c13331639.lua @@ -75,7 +75,7 @@ function s.initial_effect(c) e8:SetOperation(s.penop) c:RegisterEffect(e8) end -s.listed_series={0x20f8} +s.listed_series={SET_SUPREME_KING_DRAGON} s.miracle_synchro_fusion=true function s.fusfilter1(c,fc,sumtype,tp) return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) @@ -91,7 +91,7 @@ function s.fusfilter4(c,fc,sumtype,tp) end function s.limval(e,re,rp) local rc=re:GetHandler() - return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) + return rc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() and rc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) @@ -129,17 +129,17 @@ end function s.spfilter(c,e,tp,rp) if c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,rp,nil,c)<=0 then return false end - return c:IsSetCard(0x20f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPREME_KING_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,rp) + return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e,tp,rp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,rp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e,tp,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -157,4 +157,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c13361027.lua b/official/c13361027.lua index e5f851e70e..5b243d46b6 100644 --- a/official/c13361027.lua +++ b/official/c13361027.lua @@ -1,4 +1,5 @@ --ドラグニティ-ブラックスピア +--Dragunity Darkspear local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.cfilter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13364097.lua b/official/c13364097.lua index a29bf0386c..591a9fa4e6 100644 --- a/official/c13364097.lua +++ b/official/c13364097.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvrnktg) e2:SetOperation(s.lvrnkop) c:RegisterEffect(e2) diff --git a/official/c13382806.lua b/official/c13382806.lua index 82a2663592..1f258ec7b9 100644 --- a/official/c13382806.lua +++ b/official/c13382806.lua @@ -1,5 +1,5 @@ --マタタビ仙狸 ---Catnip Li Hua +--Silvervine Senri --Scripted by FiftyFour local s,id=GetID() function s.initial_effect(c) @@ -11,16 +11,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={id} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsLevel(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end @@ -37,7 +33,7 @@ function s.sphfilter(c,e,tp,att) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then local g=Duel.GetMatchingGroup(s.sphfilter,tp,LOCATION_HAND,0,nil,e,tp,tc:GetAttribute()) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -49,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c13386407.lua b/official/c13386407.lua index b6ce2c718f..0261f8046b 100644 --- a/official/c13386407.lua +++ b/official/c13386407.lua @@ -15,20 +15,20 @@ function s.initial_effect(c) e1:SetOperation(s.operation(Ritual.Target(rparams),Ritual.Operation(rparams))) c:RegisterEffect(e1) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} s.listed_names={29348048} function s.ritualfil(c) - return c:IsSetCard(0x106) and c:IsRitualMonster() + return c:IsSetCard(SET_VENDREAD) and c:IsRitualMonster() end function s.matfilter(c,e,tp) return (Duel.IsPlayerCanRelease(tp,c) and c:IsLocation(LOCATION_MZONE)) or s.extramatfil(c,e,tp) end function s.extramatfil(c,e,tp) - return c:IsSetCard(0x106) and not c:IsCode(29348048) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_VENDREAD) and not c:IsCode(29348048) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.extrafil(e,tp,mg) if not Duel.IsPlayerCanRelease(tp) then return nil end - return Duel.GetMatchingGroup(s.extramatfil,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + return Duel.GetMatchingGroup(s.extramatfil,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) end function s.ritcheck(e,tp,g,sc) local obj=e:GetLabelObject() @@ -46,15 +46,15 @@ end function s.target(rittg) return function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,eg,ep,ev,re,r,rp,rittg) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,eg,ep,ev,re,r,rp,rittg) end rittg(e,tp,eg,ep,ev,re,r,rp,1) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end end function s.operation(rittg,ritop) return function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,rittg) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp,rittg) if #sg==0 then return end if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then Duel.ConfirmCards(1-tp,sg) diff --git a/official/c13386503.lua b/official/c13386503.lua index 8ac56f1072..630c27c6f4 100644 --- a/official/c13386503.lua +++ b/official/c13386503.lua @@ -1,4 +1,5 @@ --ジャッカルの霊騎士 +--Ghost Knight of Jackal local s,id=GetID() function s.initial_effect(c) --special summon diff --git a/official/c13391185.lua b/official/c13391185.lua index 84c13f8a2f..cc2f5108fb 100644 --- a/official/c13391185.lua +++ b/official/c13391185.lua @@ -1,4 +1,5 @@ --聖騎士ガラハド +--Noble Knight Gwalchavad local s,id=GetID() function s.initial_effect(c) --Normal monster @@ -27,20 +28,20 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.eqcon1(e) local eg=e:GetHandler():GetEquipGroup() - return not eg or not eg:IsExists(Card.IsSetCard,1,nil,0x207a) + return not eg or not eg:IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.eqcon2(e) local eg=e:GetHandler():GetEquipGroup() - return eg and eg:IsExists(Card.IsSetCard,1,nil,0x207a) + return eg and eg:IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return s.eqcon2(e) end function s.thfilter(c) - return c:IsSetCard(0x107a) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -50,7 +51,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_ARMS) and c:IsType(TYPE_EQUIP) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -60,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13409151.lua b/official/c13409151.lua index 10ea570da8..866638a123 100644 --- a/official/c13409151.lua +++ b/official/c13409151.lua @@ -1,4 +1,5 @@ --砂バク +--Desertapir local s,id=GetID() function s.initial_effect(c) --flip diff --git a/official/c13438207.lua b/official/c13438207.lua index 5d0b7b8243..697c912fb7 100644 --- a/official/c13438207.lua +++ b/official/c13438207.lua @@ -1,4 +1,5 @@ --ブロッサム・ボンバー +--Blossom Bombardment local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1344018.lua b/official/c1344018.lua index 6f80eb6aa0..d33d5d5c44 100644 --- a/official/c1344018.lua +++ b/official/c1344018.lua @@ -32,19 +32,19 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.evalue(e,re,rp) - return re:IsActiveType(TYPE_TRAP) and rp==1-e:GetHandlerPlayer() + return re:IsTrapEffect() and rp==1-e:GetHandlerPlayer() end function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,nil) + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,0,1,nil) and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE+LOCATION_PZONE,0,1,1,nil) + local g1=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) g1:Merge(g2) @@ -63,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c13452889.lua b/official/c13452889.lua index 737a922db1..7d08f96413 100644 --- a/official/c13452889.lua +++ b/official/c13452889.lua @@ -1,6 +1,5 @@ --ベクター・スケア・デーモン --Vector Scare Archfiend - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -60,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end end diff --git a/official/c13455674.lua b/official/c13455674.lua index 6d9623e1af..5860ec0bdc 100644 --- a/official/c13455674.lua +++ b/official/c13455674.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -53,7 +53,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and (r&REASON_EFFECT+REASON_BATTLE)~=0 + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c13455953.lua b/official/c13455953.lua index b07fd063f5..0120100d11 100644 --- a/official/c13455953.lua +++ b/official/c13455953.lua @@ -20,25 +20,25 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x5042,0x42} +s.listed_series={SET_NORDIC_RELIC,SET_NORDIC} function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x42)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_NORDIC)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.filter(c) - return c:IsSetCard(0x5042) and c:IsAbleToHand() + return c:IsSetCard(SET_NORDIC_RELIC) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -53,4 +53,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c13474291.lua b/official/c13474291.lua index df60c84620..f4dc8bdc8f 100644 --- a/official/c13474291.lua +++ b/official/c13474291.lua @@ -38,13 +38,13 @@ function s.initial_effect(c) e4:SetOperation(s.ctop) c:RegisterEffect(e4) end -s.listed_series={0x18} -s.counter_place_list={0x1019} +s.listed_series={SET_CLOUDIAN} +s.counter_place_list={COUNTER_FOG} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.spfilter(c) - return c:IsSetCard(0x18) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_CLOUDIAN) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -77,6 +77,6 @@ end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x1019,1) + tc:AddCounter(COUNTER_FOG,1) end -end +end \ No newline at end of file diff --git a/official/c13482075.lua b/official/c13482075.lua index f97701dddd..1c2186ff75 100644 --- a/official/c13482075.lua +++ b/official/c13482075.lua @@ -72,11 +72,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetValue(-500) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c13482262.lua b/official/c13482262.lua index 426c5c8cdd..94dbbde503 100644 --- a/official/c13482262.lua +++ b/official/c13482262.lua @@ -27,14 +27,14 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.revfilter(c,e,tp) - return c:IsSetCard(0x117) and c:IsMonster() and c:IsAbleToDeck() and not c:IsPublic() + return c:IsSetCard(SET_IMPCANTATION) and c:IsMonster() and c:IsAbleToDeck() and not c:IsPublic() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,2,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,cd) diff --git a/official/c13486638.lua b/official/c13486638.lua index c160235985..d05f9c23ac 100644 --- a/official/c13486638.lua +++ b/official/c13486638.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2073,0x10db,0xba} +s.listed_series={SET_XYZ_DRAGON,SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) @@ -32,7 +32,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return #g>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) local sc=g:Select(tp,1,1,nil):GetFirst() - if sc:IsSetCard(0x2073) or sc:IsSetCard(0x10db) or sc:IsSetCard(0xba) then + if sc:IsSetCard({SET_XYZ_DRAGON,SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR}) then e:SetLabel(1) else e:SetLabel(0) @@ -48,7 +48,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) @@ -63,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) end end diff --git a/official/c13492423.lua b/official/c13492423.lua index 8bf8a0de59..ce00ec8bb2 100644 --- a/official/c13492423.lua +++ b/official/c13492423.lua @@ -1,4 +1,5 @@ --フォトン・カイザー +--Photon Caesar local s,id=GetID() function s.initial_effect(c) --spsummon @@ -20,14 +21,14 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13504844.lua b/official/c13504844.lua index 03c49a4273..265efa7309 100644 --- a/official/c13504844.lua +++ b/official/c13504844.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x100d),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_X_SABER),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetTargetCards(e) if #sg~=2 then return end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c13510157.lua b/official/c13510157.lua index a1e1ba2c5f..56efdf7a5d 100644 --- a/official/c13510157.lua +++ b/official/c13510157.lua @@ -1,4 +1,4 @@ --- +--ティスティナの猟犬 --Hound of the Tistina --Scripted by Hatter local s,id=GetID() @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --“Tistina” monsters can attack directly + --"Tistina" monsters can attack directly local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_DIRECT_ATTACK) diff --git a/official/c13513663.lua b/official/c13513663.lua index ef9ea85801..f2ff86572e 100644 --- a/official/c13513663.lua +++ b/official/c13513663.lua @@ -1,4 +1,5 @@ --竜魂の城 +--Castle of Dragon Souls local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCost(s.cost) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) c:RegisterEffect(e1) --atkup @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(s.atkcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetCost(s.atkcost) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) @@ -42,9 +43,6 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) if chk==0 then return true end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c,tp) return c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) @@ -53,14 +51,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local label=e:GetLabel() if chkc then return s.atktg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end if chk==0 then - if Duel.GetCurrentPhase()==PHASE_DAMAGE then + if Duel.IsPhase(PHASE_DAMAGE) then if label==1 then e:SetLabel(0) end return (label~=1 or s.atkcost(e,tp,eg,ep,ev,re,r,rp,0)) and s.atktg(e,tp,eg,ep,ev,re,r,rp,0) end return true end if (label~=1 or s.atkcost(e,tp,eg,ep,ev,re,r,rp,0)) and s.atktg(e,tp,eg,ep,ev,re,r,rp,0) - and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then + and (Duel.IsPhase(PHASE_DAMAGE) or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then e:SetCategory(CATEGORY_ATKCHANGE) e:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e:SetOperation(s.atkop) @@ -75,9 +73,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(rg,POS_FACEUP,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -86,17 +84,17 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -119,4 +117,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13518809.lua b/official/c13518809.lua index fab6d71b0b..c2998f0200 100644 --- a/official/c13518809.lua +++ b/official/c13518809.lua @@ -1,5 +1,5 @@ --- 破滅の美神ルイン --- Ruin, Supreme Queen of Oblivion +--破滅の美神ルイン +--Ruin, Supreme Queen of Oblivion local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetValue(46427957) c:RegisterEffect(e1) --indes @@ -42,7 +42,7 @@ end s.listed_names={32828635,46427957} function s.indcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsRitualSummoned() end function s.indtg(e,c) return c:IsType(TYPE_RITUAL) @@ -67,4 +67,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c13521194.lua b/official/c13521194.lua index 8be2759d6e..458e92b920 100644 --- a/official/c13521194.lua +++ b/official/c13521194.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptarget) e2:SetOperation(s.spoperation) c:RegisterEffect(e2) @@ -57,4 +57,4 @@ function s.spoperation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13522325.lua b/official/c13522325.lua index 7022a0c7bc..006fdfe284 100644 --- a/official/c13522325.lua +++ b/official/c13522325.lua @@ -24,9 +24,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.atkcon(e) - local ph=Duel.GetCurrentPhase() local tp=Duel.GetTurnPlayer() - return tp==e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return tp==e:GetHandler():GetControler() and Duel.IsBattlePhase() end function s.spfilter(c,tp) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() @@ -53,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Remove(g,POS_FACEUP,REASON_COST) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c13529466.lua b/official/c13529466.lua index 9931e655b6..e91e647e00 100644 --- a/official/c13529466.lua +++ b/official/c13529466.lua @@ -48,21 +48,21 @@ function s.initial_effect(c) c:RegisterEffect(e8) end function s.aclimit1(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp or not re:IsActiveType(TYPE_MONSTER) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_CONTROL+RESET_PHASE+PHASE_END,0,1) + if ep~=tp or not re:IsMonsterEffect() then return end + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) end function s.econ1(e) return e:GetHandler():GetFlagEffect(id)~=0 end function s.aclimit3(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsActiveType(TYPE_MONSTER) then return end - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_CONTROL+RESET_PHASE+PHASE_END,0,1) + if ep==tp or not re:IsMonsterEffect() then return end + e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) end function s.econ2(e) return e:GetHandler():GetFlagEffect(id+1)~=0 end function s.elimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.atkcon(e) return e:GetHandler():GetFlagEffect(id+2)~=0 @@ -73,6 +73,6 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id+2)~=0 then return end local fid=eg:GetFirst():GetFieldID() - e:GetHandler():RegisterFlagEffect(id+2,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+2,RESETS_STANDARD_PHASE_END,0,1) e:GetLabelObject():SetLabel(fid) end \ No newline at end of file diff --git a/official/c13532663.lua b/official/c13532663.lua index a6fc6207ee..a2db130656 100644 --- a/official/c13532663.lua +++ b/official/c13532663.lua @@ -1,4 +1,5 @@ --ダミー・ゴーレム +--Dummy Golem local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONTROL) local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToChangeControler,1-tp,LOCATION_MZONE,0,1,1,nil) Duel.SwapControl(c,g:GetFirst(),0,0) -end +end \ No newline at end of file diff --git a/official/c13533678.lua b/official/c13533678.lua index 69c111c1f8..9a23919817 100644 --- a/official/c13533678.lua +++ b/official/c13533678.lua @@ -1,9 +1,9 @@ --- スプライト・ジェット --- Splight Jet --- Scripted by Hatter +--スプライト・ジェット +--Spright Jet +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Search 1 "Splight" Spell/Trap + --Search 1 "Splight" Spell/Trap local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x181} +s.listed_series={SET_SPRIGHT} function s.spconfilter(c) return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2)) end @@ -34,7 +34,7 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) - return c:IsSetCard(0x181) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SPRIGHT) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c13536606.lua b/official/c13536606.lua index eae96718ae..c6d35288cf 100644 --- a/official/c13536606.lua +++ b/official/c13536606.lua @@ -35,10 +35,10 @@ end function s.rfilter(c,tp,g) local lk=c:GetLink() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if c:GetControler()==tp then + if c:IsControler(tp) then return c:IsFaceup() and c:IsLinkMonster() and c:IsLinkBelow(3) and c:IsReleasableByEffect() and g:IsContains(c) and ((c:GetSequence()>4 and ft>=lk) or (c:GetSequence()<=4 and (ft+1)>=lk)) and (ft==1 or not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)) - elseif c:GetControler()==1-tp then + elseif c:IsControler(1-tp) then return c:IsFaceup() and c:IsLinkMonster() and c:IsLinkBelow(3) and c:IsReleasableByEffect() and g:IsContains(c) and ft>=lk and (ft==1 or not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)) else return false @@ -74,7 +74,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabel(ct) e1:SetTarget(s.splimit) @@ -82,4 +82,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLink(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c1353770.lua b/official/c1353770.lua index 90000ea8a8..59a32e7f43 100644 --- a/official/c1353770.lua +++ b/official/c1353770.lua @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13556444.lua b/official/c13556444.lua index 6804f9f62b..c3bb98c6a3 100644 --- a/official/c13556444.lua +++ b/official/c13556444.lua @@ -42,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c135598.lua b/official/c135598.lua index 5226c18b3e..2caf21b2a3 100644 --- a/official/c135598.lua +++ b/official/c135598.lua @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c1357146.lua b/official/c1357146.lua index 4f926b52e4..6b3c844012 100644 --- a/official/c1357146.lua +++ b/official/c1357146.lua @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13574687.lua b/official/c13574687.lua index c66165a08f..2953f6033a 100644 --- a/official/c13574687.lua +++ b/official/c13574687.lua @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c13582837.lua b/official/c13582837.lua index 774c5cb874..b363d1b962 100644 --- a/official/c13582837.lua +++ b/official/c13582837.lua @@ -1,4 +1,5 @@ --インフェルニティ・リローダー +--Infernity Randomizer local s,id=GetID() function s.initial_effect(c) --draw @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c13599884.lua b/official/c13599884.lua index 10a78e5ea1..ad5d556196 100644 --- a/official/c13599884.lua +++ b/official/c13599884.lua @@ -1,4 +1,5 @@ --鉄のサソリ +--Steel Scorpion local s,id=GetID() function s.initial_effect(c) -- @@ -45,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(e) e1:SetLabel(0) e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) e:GetLabelObject():AddCard(tc) end @@ -91,4 +92,4 @@ function s.desop(tc,e,c,check) end end end -end +end \ No newline at end of file diff --git a/official/c13604200.lua b/official/c13604200.lua index 435468e260..a01c1150ac 100644 --- a/official/c13604200.lua +++ b/official/c13604200.lua @@ -1,4 +1,5 @@ --賢者の宝石 +--Sage's Stone local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,14 +21,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13611090.lua b/official/c13611090.lua index 9fc4c7a856..ae8b9c9963 100644 --- a/official/c13611090.lua +++ b/official/c13611090.lua @@ -9,17 +9,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xd0} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_MAJESPECTER} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xd0) + return c:IsFaceup() and c:IsSetCard(SET_MAJESPECTER) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,24 +26,24 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(tc:GetDefense()*2) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c1362589.lua b/official/c1362589.lua index fae056ecdf..f6935f2554 100644 --- a/official/c1362589.lua +++ b/official/c1362589.lua @@ -18,4 +18,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c13626450.lua b/official/c13626450.lua index 0bbba82585..96224da869 100644 --- a/official/c13626450.lua +++ b/official/c13626450.lua @@ -1,4 +1,5 @@ --邪気退散 +--Malice Dispersion local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS + return c:IsFaceup() and c:IsContinuousTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -26,4 +27,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c13629812.lua b/official/c13629812.lua index bb34cc018b..f17a7aafa0 100644 --- a/official/c13629812.lua +++ b/official/c13629812.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.cfilter(c) - return c:IsSetCard(0x2b) + return c:IsSetCard(SET_NINJA) end function s.filter(c,e) return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) @@ -48,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or not tc then return end local seq=tc:GetSequence() if tc:IsControler(1-tp) then seq=seq+16 end - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 and tc:IsLocation(LOCATION_REMOVED) then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 and tc:IsLocation(LOCATION_REMOVED) then c:SetCardTarget(tc) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -57,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabel(seq) e1:SetCondition(s.discon) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -82,9 +82,9 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then local seq=tc:GetPreviousSequence() if seq>4 then - Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_RULE|REASON_RETURN) end local zone=0x1<0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13758665.lua b/official/c13758665.lua index c19126e48f..476c1997af 100644 --- a/official/c13758665.lua +++ b/official/c13758665.lua @@ -20,11 +20,11 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) - and rp==1-tp and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev) + and rp==1-tp and re:IsTrapEffect() and Duel.IsChainDisablable(ev) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13760677.lua b/official/c13760677.lua index 24981f426c..47cc1224dc 100644 --- a/official/c13760677.lua +++ b/official/c13760677.lua @@ -1,6 +1,5 @@ --P・M・キャプチャー --P.M. Captor - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -28,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.cfilter(c,e,tp) - return c:IsRace(RACE_ZOMBIE) and c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsRace(RACE_ZOMBIE) and c:IsSummonPlayer(tp) and c:IsPendulumSummoned() and (not e or c:IsRelateToEffect(e)) end function s.indcon(e,tp,eg,ep,ev,re,r,rp) @@ -51,7 +50,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c13761956.lua b/official/c13761956.lua index 379ec83961..bac772815b 100644 --- a/official/c13761956.lua +++ b/official/c13761956.lua @@ -1,4 +1,5 @@ --フレムベル・ベビー +--Flamvell Baby local s,id=GetID() function s.initial_effect(c) --atkup @@ -33,7 +34,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c13764602.lua b/official/c13764602.lua index 0df4f7921c..558e2e3e3c 100644 --- a/official/c13764602.lua +++ b/official/c13764602.lua @@ -1,5 +1,5 @@ --阿吽の呼吸 ---Perfect Sync - A-un +--Perfect Sync - A-Un --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x14e} +s.listed_series={SET_DUAL_AVATAR} s.listed_names={TOKEN_DUAL_AVATAR_SPIRIT} function s.thfilter(c) - return c:IsSetCard(0x14e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DUAL_AVATAR) and c:IsMonster() and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -40,14 +40,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x14e) and c:IsType(TYPE_EFFECT) + return c:IsFaceup() and c:IsSetCard(SET_DUAL_AVATAR) and c:IsType(TYPE_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,0x14e,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,SET_DUAL_AVATAR,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) end @@ -60,12 +60,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ge1:SetDescription(aux.Stringid(id,2)) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,0x14e,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,SET_DUAL_AVATAR,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end local token=Duel.CreateToken(tp,TOKEN_DUAL_AVATAR_SPIRIT) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c13764881.lua b/official/c13764881.lua index 2011bb5e9d..9d92125082 100644 --- a/official/c13764881.lua +++ b/official/c13764881.lua @@ -1,4 +1,5 @@ --チェーン・リゾネーター +--Chain Resonator local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_SYNCHRO),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x57) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESONATOR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13803864.lua b/official/c13803864.lua index ec5645cae7..5270250536 100644 --- a/official/c13803864.lua +++ b/official/c13803864.lua @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c13839120.lua b/official/c13839120.lua index 433cd13234..5539ee4b4b 100644 --- a/official/c13839120.lua +++ b/official/c13839120.lua @@ -1,4 +1,5 @@ --イエロー・ガジェット +--Yellow Gadget local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c13846680.lua b/official/c13846680.lua index cefb3966b8..82a0257871 100644 --- a/official/c13846680.lua +++ b/official/c13846680.lua @@ -1,4 +1,5 @@ --ヘルプロミネンス +--Firestorm Prominence local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c13857930.lua b/official/c13857930.lua index 4b94cefa71..f060c73e0c 100644 --- a/official/c13857930.lua +++ b/official/c13857930.lua @@ -33,7 +33,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) if tc:IsMonster() then - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) elseif tc:IsSpell() then if c==Duel.GetAttacker() and not c:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) and c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then diff --git a/official/c13890468.lua b/official/c13890468.lua index 6e104571a8..e5f321229e 100644 --- a/official/c13890468.lua +++ b/official/c13890468.lua @@ -1,4 +1,5 @@ --精霊獣 ペトルフィン +--Spiritual Beast Pettlephin local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.filter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13893596.lua b/official/c13893596.lua index 08e060a418..573c192854 100644 --- a/official/c13893596.lua +++ b/official/c13893596.lua @@ -75,4 +75,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(tp,WIN_REASON_EXODIUS) end end -end +end \ No newline at end of file diff --git a/official/c13903402.lua b/official/c13903402.lua index 84918a59a1..756f72623a 100644 --- a/official/c13903402.lua +++ b/official/c13903402.lua @@ -1,5 +1,5 @@ --光の王 マルデル ---Mardoll, Generaid of Light +--Mardel, Generaider Boss of Light --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -20,9 +20,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.thfilter(c) - return not c:IsCode(id) and (c:IsRace(RACE_PLANT) or c:IsSetCard(0x134)) and c:IsAbleToHand() + return not c:IsCode(id) and (c:IsRace(RACE_PLANT) or c:IsSetCard(SET_GENERAIDER)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -35,4 +35,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c13923256.lua b/official/c13923256.lua index acf0e05061..fb3bbbd18e 100644 --- a/official/c13923256.lua +++ b/official/c13923256.lua @@ -27,12 +27,12 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.gvfilter(c,tp) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.thfilter(c,code) - return c:IsSetCard(0x137) and c:IsAbleToHand() and c:IsSpellTrap() and not c:IsCode(code) + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsAbleToHand() and c:IsSpellTrap() and not c:IsCode(code) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.gvfilter(chkc,tp) end @@ -56,7 +56,7 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsSetCard(0x137) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c and rc:IsSetCard(SET_ANCIENT_WARRIORS) and rc:IsControler(tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end diff --git a/official/c13927359.lua b/official/c13927359.lua index 9611119e82..99d3ee585a 100644 --- a/official/c13927359.lua +++ b/official/c13927359.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c13935001.lua b/official/c13935001.lua index ede6b64b11..cb23e06b4f 100644 --- a/official/c13935001.lua +++ b/official/c13935001.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) diff --git a/official/c13944422.lua b/official/c13944422.lua index 9f5d381dc3..ed75d893b6 100644 --- a/official/c13944422.lua +++ b/official/c13944422.lua @@ -1,4 +1,5 @@ --グラナドラ +--Granadora local s,id=GetID() function s.initial_effect(c) --recover diff --git a/official/c13945283.lua b/official/c13945283.lua index 6d9ba10102..f9420d14f0 100644 --- a/official/c13945283.lua +++ b/official/c13945283.lua @@ -1,4 +1,5 @@ --幻影の壁 +--Wall of Illusion local s,id=GetID() function s.initial_effect(c) --to hand @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.SendtoHand(a,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c13955608.lua b/official/c13955608.lua index 73125fd5ff..c8d811bce7 100644 --- a/official/c13955608.lua +++ b/official/c13955608.lua @@ -1,4 +1,5 @@ --機動砦 ストロング・ホールド +--Stronghold the Moving Fortress local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,14 +14,14 @@ end s.listed_names={41172955,86445415,13839120} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) c:AddMonsterAttributeComplete() @@ -32,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3000) e1:SetCondition(s.atkcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -41,4 +42,4 @@ function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,41172955),tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,86445415),tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,13839120),tp,LOCATION_ONFIELD,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c13959634.lua b/official/c13959634.lua index e935a22f89..21a24ab930 100644 --- a/official/c13959634.lua +++ b/official/c13959634.lua @@ -1,4 +1,5 @@ --氷霊神ムーラングレイス +--Moulinglacia the Elemental Lord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -45,7 +46,7 @@ function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,2) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsFacedown() then return end @@ -58,12 +59,12 @@ function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()==effp then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,effp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c13965201.lua b/official/c13965201.lua index 7eb129cef1..ef148ac8be 100644 --- a/official/c13965201.lua +++ b/official/c13965201.lua @@ -3,8 +3,9 @@ --scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) - --Activate + --Special Summon 1 "Shiranui" monster from your Deck or GY local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -15,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end @@ -24,10 +25,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) return true end function s.costfilter(c,e,tp) - return c:IsDiscardable() and c:IsRace(RACE_ZOMBIE) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) + return c:IsDiscardable() and c:IsRace(RACE_ZOMBIE) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0xd9) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) + return c:IsSetCard(SET_SHIRANUI) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -36,14 +37,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) e:SetLabelObject(g:GetFirst()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local dc=e:GetLabelObject() - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,dc:GetCode()) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,dc:GetCode()) if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) @@ -56,9 +58,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_ZOMBIE) -end +end \ No newline at end of file diff --git a/official/c13972452.lua b/official/c13972452.lua index a251e878fa..33ab13c008 100644 --- a/official/c13972452.lua +++ b/official/c13972452.lua @@ -1,4 +1,5 @@ --マジェスペクター・ストーム +--Majespecter Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,6 +35,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c13974207.lua b/official/c13974207.lua index c4a9ad7316..d21d3c96a2 100644 --- a/official/c13974207.lua +++ b/official/c13974207.lua @@ -1,4 +1,5 @@ --電光-雪花- +--Denko Sekka local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -32,4 +33,4 @@ function s.effcon(e) end function s.distg(e,c) return c:IsFacedown() -end +end \ No newline at end of file diff --git a/official/c13995824.lua b/official/c13995824.lua index 5b118c9feb..38691e85b7 100644 --- a/official/c13995824.lua +++ b/official/c13995824.lua @@ -26,4 +26,4 @@ end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,7,REASON_EFFECT) Duel.DiscardDeck(1-tp,7,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c13997673.lua b/official/c13997673.lua index 8d5ac46cd6..5e011df3a2 100644 --- a/official/c13997673.lua +++ b/official/c13997673.lua @@ -1,4 +1,5 @@ --コア濃度圧縮 +--Core Compression local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.cfilter1(c) return c:IsCode(36623431) and not c:IsPublic() end function s.cfilter2(c) - return c:IsMonster() and c:IsSetCard(0x1d) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_KOAKI_MEIRU) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND,0,1,nil) @@ -28,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ConfirmCards(1-tp,g1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g2=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g2,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g2,REASON_COST|REASON_DISCARD) Duel.ShuffleHand(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +41,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14001430.lua b/official/c14001430.lua index ebf54c8912..8cdcc299ad 100644 --- a/official/c14001430.lua +++ b/official/c14001430.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x71)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MADOLCHE)) e2:SetValue(500) c:RegisterEffect(e2) local e3=e2:Clone() @@ -33,9 +33,9 @@ function s.initial_effect(c) e4:SetValue(s.repval) c:RegisterEffect(e4) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.tdfilter(c) - return c:IsMonster() and c:IsSetCard(0x71) and c:IsAbleToDeck() + return c:IsMonster() and c:IsSetCard(SET_MADOLCHE) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,8 +54,8 @@ function s.repfilter(c,tp) and c:IsAbleToHand() end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return (r&REASON_EFFECT)~=0 and re and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsSetCard(0x71) and eg:IsExists(s.repfilter,1,nil,tp) end + if chk==0 then return (r&REASON_EFFECT)~=0 and re and re:IsMonsterEffect() + and re:GetHandler():IsSetCard(SET_MADOLCHE) and eg:IsExists(s.repfilter,1,nil,tp) end if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then local c=e:GetHandler() local g=eg:Filter(s.repfilter,nil,tp) @@ -70,9 +70,9 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_TO_DECK_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(LOCATION_HAND) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TOHAND+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~RESET_TOHAND|RESET_PHASE|PHASE_END,0,1) end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) @@ -80,7 +80,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) return true else return false end @@ -98,4 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.thfilter,nil) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c14005031.lua b/official/c14005031.lua index bf495f9c79..ae2cdb5319 100644 --- a/official/c14005031.lua +++ b/official/c14005031.lua @@ -1,7 +1,8 @@ --ムーンダンスの儀式 +--Moon Dance Ritual local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,s.filter,nil,nil,nil,0x1e0,nil,nil,nil,s.activate) + aux.AddPersistentProcedure(c,0,s.filter,nil,nil,nil,TIMINGS_CHECK_MONSTER_E,nil,nil,nil,s.activate) --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -37,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end end function s.disable(e,c) @@ -62,4 +63,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c14017402.lua b/official/c14017402.lua index cb73c251c2..c12e4d2b25 100644 --- a/official/c14017402.lua +++ b/official/c14017402.lua @@ -50,10 +50,10 @@ function s.cpfilter(c) return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.cpfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.cpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.cpfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.cpfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.cpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.cpfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -62,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) then if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==1 then local code=tc:GetOriginalCode() - local reset_flag=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END + local reset_flag=RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END c:CopyEffect(code, reset_flag, 1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c14025912.lua b/official/c14025912.lua index 4cb086ac9a..a55b66a805 100644 --- a/official/c14025912.lua +++ b/official/c14025912.lua @@ -1,5 +1,5 @@ --斬機方程式 ---Zanki Equation +--Mathmech Equation --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} function s.spfilter(c,e,tp) - return c:IsSetCard(0x132) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MATHMECH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -33,7 +33,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) end diff --git a/official/c14047624.lua b/official/c14047624.lua index d19b1c01fd..d68648934d 100644 --- a/official/c14047624.lua +++ b/official/c14047624.lua @@ -1,4 +1,5 @@ --ラヴァルロード・ジャッジメント +--Laval Judgment Lord local s,id=GetID() function s.initial_effect(c) --damage @@ -14,19 +15,19 @@ function s.initial_effect(c) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cfilter2(c) return c:IsCode(id) and c:GetAttackAnnouncedCount()>0 end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) and not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -34,7 +35,7 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_OATH) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,id)) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -46,4 +47,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14055212.lua b/official/c14055212.lua index 43989df7c4..f508601aed 100644 --- a/official/c14055212.lua +++ b/official/c14055212.lua @@ -1,7 +1,6 @@ --のどかな埋葬 --Peaceful Burial --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Send 1 monster from deck to GY @@ -35,14 +34,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetDescription(3302) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c14057297.lua b/official/c14057297.lua index 79d2f1ff9f..dd3d58f5e0 100644 --- a/official/c14057297.lua +++ b/official/c14057297.lua @@ -44,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,5,REASON_EFFECT) Duel.Draw(1-tp,5,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14087893.lua b/official/c14087893.lua index 8fada01dc5..c135ec9782 100644 --- a/official/c14087893.lua +++ b/official/c14087893.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -28,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c14088859.lua b/official/c14088859.lua index 1aae977f9c..15bd592a6d 100644 --- a/official/c14088859.lua +++ b/official/c14088859.lua @@ -31,14 +31,14 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_NEOS) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -49,4 +49,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14089428.lua b/official/c14089428.lua index c16eb00326..894c364e8f 100644 --- a/official/c14089428.lua +++ b/official/c14089428.lua @@ -1,6 +1,5 @@ --ブルーサンダーT45 --Blue Thunder T-45 - local s,id=GetID() function s.initial_effect(c) --Special summon 1 token to your field @@ -32,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c14094090.lua b/official/c14094090.lua index 6fb8745c86..2a2a51ae9e 100644 --- a/official/c14094090.lua +++ b/official/c14094090.lua @@ -1,7 +1,8 @@ --超戦士の儀式 +--Super Soldier Ritual local s,id=GetID() function s.initial_effect(c) - Ritual.AddProcEqual(c,aux.FilterBoolFunction(Card.IsSetCard,0x10cf),8) + Ritual.AddProcEqual(c,aux.FilterBoolFunction(Card.IsSetCard,SET_BLACK_LUSTER_SOLDIER),8) --spsummon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,24 +15,24 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x10cf} +s.listed_series={SET_BLACK_LUSTER_SOLDIER} function s.cfilter(c,att) return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) + local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) + local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) g1:Merge(g2) g1:AddCard(e:GetHandler()) Duel.Remove(g1,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10cf) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c1409474.lua b/official/c1409474.lua index 711bf81e35..11b14da1ed 100644 --- a/official/c1409474.lua +++ b/official/c1409474.lua @@ -25,7 +25,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.SetTargetParam(Duel.SelectOption(tp,70,71,72)) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not tc then return end local opt=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) if (opt==0 and tc:IsMonster()) or (opt==1 and tc:IsSpell()) or (opt==2 and tc:IsTrap()) then - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c1410324.lua b/official/c1410324.lua index c5f57bdadf..d6fc1c3f2c 100644 --- a/official/c1410324.lua +++ b/official/c1410324.lua @@ -1,5 +1,5 @@ --トリックスター・フーディ ---Trickstar Hoodie +--Trickstar Hoody --scripted by Naim local s,id=GetID() function s.initial_effect(c) diff --git a/official/c14105623.lua b/official/c14105623.lua index 8cc85c208e..2828089d2e 100644 --- a/official/c14105623.lua +++ b/official/c14105623.lua @@ -1,5 +1,5 @@ +--オッドアイズ・アークペンデュラム・ドラゴン --Odd-Eyes Arc Pendulum Dragon --- local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -18,27 +18,27 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousSetCard(0x99) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousSetCard(SET_ODD_EYES) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ODD_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c14108995.lua b/official/c14108995.lua index d0699e54c2..c9ba552a19 100644 --- a/official/c14108995.lua +++ b/official/c14108995.lua @@ -1,14 +1,14 @@ --- 春化精の花冠 --- Vernusylph Corolla --- Scripted by Hatter +--春化精の花冠 +--Vernusylph Corolla +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- EARTH monsters become "Vernusylph" monsters + --EARTH monsters become "Vernusylph" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_ADD_SETCODE) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH)) e2:SetValue(SET_VERNUSYLPH) c:RegisterEffect(e2) - -- "Vernusylph" cost replacement + --"Vernusylph" cost replacement local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD) @@ -42,5 +42,5 @@ function s.repop(base,e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(c,true) end c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,nil,aux.Stringid(id,1)) - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) end \ No newline at end of file diff --git a/official/c1412158.lua b/official/c1412158.lua index 08ef2c369a..7726d5da5f 100644 --- a/official/c1412158.lua +++ b/official/c1412158.lua @@ -49,7 +49,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end - if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 then + if Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c) if #sg==0 then return end diff --git a/official/c14124483.lua b/official/c14124483.lua index 6bc79be68c..36aa8fac0b 100644 --- a/official/c14124483.lua +++ b/official/c14124483.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetCost(s.heroatkcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.heroatktg) e1:SetOperation(s.heroatkop) c:RegisterEffect(e1) @@ -33,11 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_HERO} -function s.heroatkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.heroatktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_HERO) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_HERO),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -75,7 +70,7 @@ function s.selfatkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c14146794.lua b/official/c14146794.lua index 686cf54a43..52822e3911 100644 --- a/official/c14146794.lua +++ b/official/c14146794.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) --double damage @@ -21,18 +21,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.damcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x135,0x136} +s.listed_series={SET_IGNISTER,SET_AI} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttackTarget() - return tc and tc:IsControler(tp) and tc:IsSetCard(0x135) and Duel.GetBattleDamage(tp)>0 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return tc and tc:IsControler(tp) and tc:IsSetCard(SET_IGNISTER) and Duel.GetBattleDamage(tp)>0 end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -40,12 +36,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if not ((re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x135)) or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rc:IsSetCard(0x136))) then return false end + if not ((re:IsMonsterEffect() and rc:IsSetCard(SET_IGNISTER)) or (re:IsSpellTrapEffect() and rc:IsSetCard(SET_AI))) then return false end local p=1-tp local e1=Duel.IsPlayerAffectedByEffect(p,EFFECT_REVERSE_DAMAGE) local e2=Duel.IsPlayerAffectedByEffect(p,EFFECT_REVERSE_RECOVER) @@ -79,4 +75,4 @@ function s.damval(e,re,val,r,rp,rc) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) if cid~=e:GetLabel() then return val end return val*2 -end +end \ No newline at end of file diff --git a/official/c14148099.lua b/official/c14148099.lua index 3b586c1c0c..6fe8107b99 100644 --- a/official/c14148099.lua +++ b/official/c14148099.lua @@ -1,4 +1,5 @@ --巨大戦艦 ビッグ・コア +--B.E.S. Big Core local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x1f) @@ -66,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14152693.lua b/official/c14152693.lua index 3fb80690e9..f9ef88a3e9 100644 --- a/official/c14152693.lua +++ b/official/c14152693.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.drfilter(c) - return c:IsSetCard(0xdf) and c:IsDiscardable(REASON_EFFECT) + return c:IsSetCard(SET_LUNALIGHT) and c:IsDiscardable(REASON_EFFECT) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -53,15 +53,15 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,e,tp) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) - and c:IsLevelBelow(4) and c:IsSetCard(0xdf) and not c:IsCode(id) + and c:IsLevelBelow(4) and c:IsSetCard(SET_LUNALIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -71,13 +71,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c14152862.lua b/official/c14152862.lua index 574e57d711..cfbec0a6c2 100644 --- a/official/c14152862.lua +++ b/official/c14152862.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -24,10 +24,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -39,4 +35,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14154221.lua b/official/c14154221.lua index b97ff6f5d3..8fb18b318b 100644 --- a/official/c14154221.lua +++ b/official/c14154221.lua @@ -1,4 +1,5 @@ --進化の代償 +--Evo-Price local s,id=GetID() function s.initial_effect(c) --activate @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14166715.lua b/official/c14166715.lua index b2d7f8612b..82a288bb4b 100644 --- a/official/c14166715.lua +++ b/official/c14166715.lua @@ -25,4 +25,4 @@ function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil) Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,g,#g,0,0) -end +end \ No newline at end of file diff --git a/official/c14169843.lua b/official/c14169843.lua index 6c9342863f..4d11853adb 100644 --- a/official/c14169843.lua +++ b/official/c14169843.lua @@ -71,7 +71,7 @@ function s.tunop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end @@ -85,4 +85,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14198496.lua b/official/c14198496.lua index 29eab9998d..3df362924c 100644 --- a/official/c14198496.lua +++ b/official/c14198496.lua @@ -1,4 +1,5 @@ --ミスティック・パイパー +--Mystic Piper local s,id=GetID() function s.initial_effect(c) --draw @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) @@ -31,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c14212201.lua b/official/c14212201.lua index 94a24b7245..7c05a2f95f 100644 --- a/official/c14212201.lua +++ b/official/c14212201.lua @@ -18,19 +18,19 @@ function s.initial_effect(c) e2:SetValue(s.xyzlimit) c:RegisterEffect(e2) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.filter(c,e,tp) - return c:GetCode()~=id and c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetCode()~=id and c:IsSetCard(SET_VAMPIRE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then local e1=Effect.CreateEffect(e:GetHandler()) @@ -39,7 +39,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -50,4 +50,4 @@ end function s.xyzlimit(e,c) if not c then return false end return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c14220547.lua b/official/c14220547.lua index 69477985b0..3ef40f3eb9 100644 --- a/official/c14220547.lua +++ b/official/c14220547.lua @@ -1,5 +1,5 @@ --烙印の命数 ---Branded Central Dogmatika +--Branded in Central Dogmatika --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -39,7 +39,7 @@ function s.condition(typ) return function(e,tp,eg,ep,ev,re,r,rp) if #eg~=1 then return false end local c=eg:GetFirst() - return c:IsFaceup() and c:IsType(typ) and c:IsSummonPlayer(tp) and re and re:IsActiveType(TYPE_SPELL) + return c:IsFaceup() and c:IsType(typ) and c:IsSummonPlayer(tp) and re and re:IsSpellEffect() end end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,19 +77,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Can only attack an opponent's Attack Position monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(s.atlimit) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end diff --git a/official/c14225239.lua b/official/c14225239.lua index 50484bca91..53211077d1 100644 --- a/official/c14225239.lua +++ b/official/c14225239.lua @@ -1,4 +1,5 @@ --E・HERO セイラーマン +--Elemental HERO Mariner local s,id=GetID() function s.initial_effect(c) --fusion material @@ -18,10 +19,10 @@ function s.initial_effect(c) e2:SetCondition(s.dacon) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.filter(c) return c:IsFacedown() and c:GetSequence()~=5 end function s.dacon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_SZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c14235211.lua b/official/c14235211.lua index b60a3372e2..c5b92ee4af 100644 --- a/official/c14235211.lua +++ b/official/c14235211.lua @@ -1,4 +1,5 @@ --暴風竜の防人 +--Rider of the Storm Winds local s,id=GetID() function s.initial_effect(c) --equip @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -47,11 +48,11 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c14255590.lua b/official/c14255590.lua index 52ebf213ab..f7dde87353 100644 --- a/official/c14255590.lua +++ b/official/c14255590.lua @@ -1,4 +1,5 @@ --増幅する悪意 +--Malice Ascendant local s,id=GetID() function s.initial_effect(c) --discard deck @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_DECKDES) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.discon) @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -28,4 +29,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14258627.lua b/official/c14258627.lua index 6a17cdda44..4434771f5f 100644 --- a/official/c14258627.lua +++ b/official/c14258627.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.mtcon) @@ -43,11 +43,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -63,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and e:GetHandler():GetBattleTarget() end function s.adtg(e,c) return c==e:GetHandler():GetBattleTarget() @@ -75,15 +75,15 @@ function s.defval(e,c) return c:GetDefense()/2 end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) else Duel.SendtoGrave(e:GetHandler(),REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c14261867.lua b/official/c14261867.lua index c318ed015a..b02f2bb5dd 100644 --- a/official/c14261867.lua +++ b/official/c14261867.lua @@ -1,4 +1,5 @@ --八つ手サソリ +--8-Claws Scorpion local s,id=GetID() function s.initial_effect(c) --turn set @@ -23,7 +24,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -43,8 +44,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(2400) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c1426714.lua b/official/c1426714.lua index 69ab43ab54..abd35796d0 100644 --- a/official/c1426714.lua +++ b/official/c1426714.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,11 +40,7 @@ end s.listed_names={1426715} s.xyz_number=48 function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -64,4 +60,4 @@ function s.atkcon(e) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_ONFIELD,0,nil,id+1)*500 -end +end \ No newline at end of file diff --git a/official/c14283055.lua b/official/c14283055.lua index 757b54febb..4eae06fd66 100644 --- a/official/c14283055.lua +++ b/official/c14283055.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c14289852.lua b/official/c14289852.lua index 6d96d16800..ece1dcf4fd 100644 --- a/official/c14289852.lua +++ b/official/c14289852.lua @@ -1,4 +1,5 @@ --岩投げエリア +--Catapult Zone local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14291024.lua b/official/c14291024.lua index 167fc87e8e..ebe6b324fe 100644 --- a/official/c14291024.lua +++ b/official/c14291024.lua @@ -1,4 +1,5 @@ --オプション +--Gradius' Option local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -66,7 +67,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsCode,10992251),tp,LOCATION_MZONE,0,1,1,nil) Duel.HintSelection(g) c:SetCardTarget(g:GetFirst()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,1) end function s.adcon(e) return e:GetHandler():GetFirstCardTarget()~=nil @@ -79,4 +80,4 @@ function s.defval(e,c) end function s.sdcon(e) return e:GetHandler():GetFirstCardTarget()==nil and e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c14306092.lua b/official/c14306092.lua index 47a90c8395..33931b1b93 100644 --- a/official/c14306092.lua +++ b/official/c14306092.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.ctcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.ctop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --atkup @@ -27,10 +27,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.counter_place_list={0x2e} -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -43,4 +39,4 @@ function s.atkcon(e) end function s.atkval(e,c) return c:GetCounter(0x2e)*1000 -end +end \ No newline at end of file diff --git a/official/c14309486.lua b/official/c14309486.lua index 2110f2dd8a..00a9829886 100644 --- a/official/c14309486.lua +++ b/official/c14309486.lua @@ -1,4 +1,5 @@ --コアキメイル・オーバードーズ +--Koa'ki Meiru Overload local s,id=GetID() function s.initial_effect(c) --cost @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_SUMMON) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -32,7 +33,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -73,10 +74,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp~=ep and Duel.GetCurrentChain()==0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,0,0) @@ -85,4 +82,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14315573.lua b/official/c14315573.lua index 379594fa6e..43ba647be5 100644 --- a/official/c14315573.lua +++ b/official/c14315573.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -24,6 +24,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsRelateToEffect(e) and Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c14318794.lua b/official/c14318794.lua index 92c44034eb..113b29d89d 100644 --- a/official/c14318794.lua +++ b/official/c14318794.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.reccon) e2:SetTarget(s.rectg) e2:SetOperation(s.recop) @@ -52,7 +52,7 @@ function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) local rec if c:GetFlagEffect(id)==0 then rec=s[tp+2][1] - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1,1) else rec=s[tp+2][c:GetFlagEffectLabel(id)+1] c:SetFlagEffectLabel(id,c:GetFlagEffectLabel(id)+1) @@ -65,4 +65,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14342283.lua b/official/c14342283.lua index 35b8a62008..8fcfc95781 100644 --- a/official/c14342283.lua +++ b/official/c14342283.lua @@ -1,4 +1,5 @@ --暴走闘君 +--Token Stampede local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.initial_effect(c) end function s.tg(e,c) return c:IsType(TYPE_TOKEN) and c:IsAttackPos() -end +end \ No newline at end of file diff --git a/official/c14344682.lua b/official/c14344682.lua index e15bbffb84..c9420fb0a3 100644 --- a/official/c14344682.lua +++ b/official/c14344682.lua @@ -1,4 +1,5 @@ --サムライソード・バロン +--Samurai Sword Baron local s,id=GetID() function s.initial_effect(c) --pos change @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsDefensePos() then Duel.ChangePosition(tc,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c14357527.lua b/official/c14357527.lua index 20f4e0fd82..89df35a08d 100644 --- a/official/c14357527.lua +++ b/official/c14357527.lua @@ -1,4 +1,4 @@ --- +--重騎甲虫マイティ・ネプチューン --Heavy Beetrooper Mighty Neptune --Scripted by Zefile local s,id=GetID() @@ -95,13 +95,13 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then --Increase ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c1435851.lua b/official/c1435851.lua index 2e787d4e97..388eeda57a 100644 --- a/official/c1435851.lua +++ b/official/c1435851.lua @@ -15,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c14365823.lua b/official/c14365823.lua index a17e8e4fc6..9db417caac 100644 --- a/official/c14365823.lua +++ b/official/c14365823.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.matfilter(c,lc,sumtype,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0xfb,lc,sumtype,tp) + return c:IsLevelBelow(3) and c:IsSetCard(SET_TRICKSTAR,lc,sumtype,tp) end --Activation legality function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -68,5 +68,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c14386013.lua b/official/c14386013.lua index 40a3adfe90..aa547dd9cf 100644 --- a/official/c14386013.lua +++ b/official/c14386013.lua @@ -22,44 +22,44 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdrtg) e2:SetOperation(s.tdrop) c:RegisterEffect(e2) end s.listed_names={CARD_DESTINY_BOARD} -s.listed_series={0x1c} +s.listed_series={SET_SPIRIT_MESSAGE} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return (c:IsCode(CARD_DESTINY_BOARD) or c:IsRace(RACE_FIEND) and c:GetLevel()==8) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.tdfilter(c) - return (c:IsCode(CARD_DESTINY_BOARD) or c:IsSetCard(0x1c)) and c:IsAbleToDeck() + return (c:IsCode(CARD_DESTINY_BOARD) or c:IsSetCard(SET_SPIRIT_MESSAGE)) and c:IsAbleToDeck() end function s.tdrtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) if chk==0 then return Duel.IsPlayerCanDraw(tp) and aux.SelectUnselectGroup(g,e,tp,1,g:GetClassCount(Card.GetCode),aux.dncheck,0) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.tdrop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) if #g==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,1,g:GetClassCount(Card.GetCode),s.rescon,1,tp,HINTMSG_TODECK) Duel.ConfirmCards(1-tp,sg) @@ -71,4 +71,4 @@ function s.tdrop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14391920.lua b/official/c14391920.lua index 001ebe26c8..b0bbe2bb45 100644 --- a/official/c14391920.lua +++ b/official/c14391920.lua @@ -1,4 +1,5 @@ --ヘル・テンペスト +--Inferno Tempest local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,11 +19,11 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and (c:IsLocation(LOCATION_DECK) or aux.SpElimFilter(c)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,1,nil) end - local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_MZONE|LOCATION_GRAVE,LOCATION_DECK|LOCATION_MZONE|LOCATION_GRAVE,1,nil) end + local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK|LOCATION_MZONE|LOCATION_GRAVE,LOCATION_DECK|LOCATION_MZONE|LOCATION_GRAVE,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,#sg,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE,nil) + local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK|LOCATION_MZONE|LOCATION_GRAVE,LOCATION_DECK|LOCATION_MZONE|LOCATION_GRAVE,nil) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14393464.lua b/official/c14393464.lua index 5877a53375..9481c21557 100644 --- a/official/c14393464.lua +++ b/official/c14393464.lua @@ -32,9 +32,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x132),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MATHMECH),tp,LOCATION_MZONE,0,1,nil) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c14418464.lua b/official/c14418464.lua index 3ca5240f6d..549efe5282 100644 --- a/official/c14418464.lua +++ b/official/c14418464.lua @@ -1,10 +1,10 @@ --- ヴァリアンツB-バロン --- Valiants' Buster - Baron --- Scripted by Hatter +--ヴァリアンツB-バロン +--Vaylantz Buster Baron +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,18 +14,18 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Move 1 other "Valiants" monster + --Move 1 other "Valiants" monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end) + e2:SetCondition(function(e) return e:GetHandler():IsSpecialSummoned() end) e2:SetTarget(s.mmvtg) e2:SetOperation(s.mmvop) c:RegisterEffect(e2) - -- Move 1 "Valiants" Pendulum Spell + --Move 1 "Valiants" Pendulum Spell local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -37,11 +37,11 @@ function s.initial_effect(c) e3:SetOperation(s.smvop) c:RegisterEffect(e3) end -s.listed_series={0x17e} +s.listed_series={SET_VAYLANTZ} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then - local zone=(1<>1)&0x1f)>0 + return Duel.GetLocationCount(tp,LOCATION_SZONE,tp,LOCATION_REASON_TOFIELD,(z<<1|z>>1)&ZONES_MMZ)>0 end function s.smvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) and s.smvfilter(chkc) end @@ -109,12 +109,12 @@ function s.smvop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) local zone=math.log(Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,~(flag<<8)),2)-8 if Duel.MoveSequence(tc,zone,LOCATION_SZONE) then - -- Treat as Continuous Spell + --Treat as Continuous Spell local e1=Effect.CreateEffect(e:GetHandler()) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end diff --git a/official/c14430063.lua b/official/c14430063.lua index 9f20bea907..0c33aa4245 100644 --- a/official/c14430063.lua +++ b/official/c14430063.lua @@ -1,4 +1,5 @@ --インターセプト・デーモン +--Archfiend Interceptor local s,id=GetID() function s.initial_effect(c) --damage @@ -29,4 +30,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14457896.lua b/official/c14457896.lua index 9e4e4a9eea..5ff537eb46 100644 --- a/official/c14457896.lua +++ b/official/c14457896.lua @@ -46,7 +46,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -55,14 +55,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_CHANGE_RACE) e2:SetValue(RACE_INSECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --cannot attack local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e3:SetValue(s.atlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) --disable local e4=Effect.CreateEffect(c) @@ -72,7 +72,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e4:SetLabelObject(tc) e4:SetCondition(s.discon) e4:SetOperation(s.disop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e4) local att=Duel.GetAttacker() if att and att==tc then @@ -82,7 +82,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_EQUIP) e5:SetCode(EFFECT_CANNOT_ATTACK) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e5) --reset after unsuccessful attack local e5r=Effect.CreateEffect(c) @@ -92,7 +92,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e5r:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e5r:SetLabelObject(e5) e5r:SetOperation(s.resop) - e5r:SetReset(RESET_EVENT+RESETS_STANDARD) + e5r:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e5r) Duel.AdjustInstantly() end @@ -140,4 +140,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c14463695.lua b/official/c14463695.lua index 8964ff7716..5df798f47b 100644 --- a/official/c14463695.lua +++ b/official/c14463695.lua @@ -1,4 +1,5 @@ --捕食接ぎ木 +--Predapruning local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,9 +25,9 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.spfilter(c,e,tp) - return c:IsSetCard(0x10f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PREDAPLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -48,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -68,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14464864.lua b/official/c14464864.lua index 58eda75d99..68d54037a0 100644 --- a/official/c14464864.lua +++ b/official/c14464864.lua @@ -1,4 +1,5 @@ --神の桎梏グレイプニル +--Gleipnir, the Fetters of Fenrir local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.filter(c) - return c:IsSetCard(0x42) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NORDIC) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c14469229.lua b/official/c14469229.lua index 21f75ccdac..216e82faa9 100644 --- a/official/c14469229.lua +++ b/official/c14469229.lua @@ -1,4 +1,5 @@ --宝玉の守護者 +--Crystal Keeper local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -17,30 +18,26 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e3:SetRange(LOCATION_MZONE+LOCATION_HAND) - e3:SetCost(s.cost) + e3:SetRange(LOCATION_MZONE|LOCATION_HAND) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1034,0x2034} +s.listed_series={SET_CRYSTAL_BEAST,SET_ULTIMATE_CRYSTAL} function s.indtg(e,c) - return c:IsSetCard(0x1034) or (c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x2034)) + return c:IsSetCard(SET_CRYSTAL_BEAST) or (c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_ULTIMATE_CRYSTAL)) end function s.indval(e,re,r,rp) if (r&REASON_EFFECT)~=0 then return 1 else return 0 end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if a:IsControler(1-tp) then a=d end - if chk==0 then return d and a:IsSetCard(0x1034) end + if chk==0 then return d and a:IsSetCard(SET_CRYSTAL_BEAST) end e:SetLabelObject(a) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -52,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -62,7 +59,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetOperation(s.desop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e3) end end @@ -71,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToBattle() and c:IsFaceup() then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14470845.lua b/official/c14470845.lua index a1088d474b..4c3f934cdf 100644 --- a/official/c14470845.lua +++ b/official/c14470845.lua @@ -1,6 +1,5 @@ --おジャマデュオ --Ojama Duo - local s,id=GetID() function s.initial_effect(c) --Special summon 2 tokens to opponent's field @@ -20,23 +19,23 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) e2:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e2) end -s.listed_series={0xf} +s.listed_series={SET_OJAMA} s.listed_names={TOKEN_OJAMA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,0xf,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,SET_OJAMA,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<2 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,0xf,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,SET_OJAMA,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) then return end for i=0,1 do local token=Duel.CreateToken(tp,TOKEN_OJAMA_DUO+i) if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) then @@ -46,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) token:RegisterEffect(e1,true) --Inflict 300 damage when destroyed @@ -67,7 +66,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e:Reset() end function s.spfilter(c,e,tp) - return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_OJAMA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then diff --git a/official/c14472500.lua b/official/c14472500.lua index bf88e7b2e8..6459f9c613 100644 --- a/official/c14472500.lua +++ b/official/c14472500.lua @@ -1,4 +1,5 @@ --ゴキポン +--Gokipon local s,id=GetID() function s.initial_effect(c) --special summon @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c14478717.lua b/official/c14478717.lua index e96333ce76..3b5cfa103d 100644 --- a/official/c14478717.lua +++ b/official/c14478717.lua @@ -1,4 +1,4 @@ --- +--リブロマンサー・プリベント --Libromancer Prevented --scripted by Naim local s,id=GetID() @@ -35,9 +35,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x17d),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_LIBROMANCER),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c:IsFaceup() end @@ -54,13 +54,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) tc:RegisterEffect(e1) end end function s.rfilter(c) - return c:IsRitualMonster() and c:IsSetCard(0x17d) and c:IsFaceup() + return c:IsRitualMonster() and c:IsSetCard(SET_LIBROMANCER) and c:IsFaceup() end function s.tgcond(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE,0,1,nil) @@ -71,4 +71,4 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14504454.lua b/official/c14504454.lua index 5e4e76c46e..1a8d6dd4e8 100644 --- a/official/c14504454.lua +++ b/official/c14504454.lua @@ -1,9 +1,9 @@ --- 悪魔嬢アリス --- Alice, Lady of Lament --- Scripted by Hatter +--悪魔嬢アリス +--Alice, Lady of Lament +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Special summon self + --Special summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetTarget(s.hsptg) e2:SetOperation(s.hspop) c:RegisterEffect(e2) - -- Search + --Search local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -41,9 +41,9 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={id} -s.listed_series={0x176} +s.listed_series={SET_LADY_OF_LAMENT} function s.spfilter(c,e,tp) - return c:IsSetCard(0x176) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LADY_OF_LAMENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -63,9 +63,9 @@ function s.hspcostfilter(c) return c:IsTrap() and c:IsAbleToRemoveAsCost() end function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.hspcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.hspcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.hspcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.hspcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -98,4 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.thdescon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) -end +end \ No newline at end of file diff --git a/official/c14505685.lua b/official/c14505685.lua index c1e7fd6b45..4610f77ff3 100644 --- a/official/c14505685.lua +++ b/official/c14505685.lua @@ -47,7 +47,7 @@ function s.rcop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_CYBERSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c14506878.lua b/official/c14506878.lua index 304cb4bbdf..418c171085 100644 --- a/official/c14506878.lua +++ b/official/c14506878.lua @@ -1,4 +1,5 @@ --ダッカー +--DUCKER Mobile Cannon local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14507213.lua b/official/c14507213.lua index 8452f80024..bae76f0284 100644 --- a/official/c14507213.lua +++ b/official/c14507213.lua @@ -22,7 +22,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c14509651.lua b/official/c14509651.lua index 3f45dd00f9..64310a01f4 100644 --- a/official/c14509651.lua +++ b/official/c14509651.lua @@ -64,7 +64,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg2) e1:SetOperation(s.spop2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c14512825.lua b/official/c14512825.lua index a191c837c1..8fb20f0270 100644 --- a/official/c14512825.lua +++ b/official/c14512825.lua @@ -30,5 +30,4 @@ end s.listed_names={CARD_STROMBERG,78527720} function s.indtg(e,c) return c:IsFaceup() and c:IsCode(CARD_STROMBERG) -end - +end \ No newline at end of file diff --git a/official/c14513016.lua b/official/c14513016.lua index a5ad52852b..c2fdfbf00d 100644 --- a/official/c14513016.lua +++ b/official/c14513016.lua @@ -10,16 +10,16 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,0)) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb5)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_RITUAL_BEAST)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c14517422.lua b/official/c14517422.lua index 9dc1ff9d96..2a034c009c 100644 --- a/official/c14517422.lua +++ b/official/c14517422.lua @@ -1,4 +1,5 @@ --堕天使の戒壇 +--Darklord Contact local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.filter(c,e,tp) - return c:IsSetCard(0xef) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DARKLORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c14529511.lua b/official/c14529511.lua index 3cedf528be..f3c72afeaf 100644 --- a/official/c14529511.lua +++ b/official/c14529511.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,2}) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e3:SetCost(s.opccost) e3:SetTarget(s.destg) e3:SetOperation(s.desop) diff --git a/official/c14532163.lua b/official/c14532163.lua index 4f088eebec..dacf4b7b46 100644 --- a/official/c14532163.lua +++ b/official/c14532163.lua @@ -1,9 +1,9 @@ --- ライトニング・ストーム --- Lightning Storm --- Scripted by Hatter +--ライトニング・ストーム +--Lightning Storm +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy + --Destroy local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) diff --git a/official/c14536035.lua b/official/c14536035.lua index 7e62f2eb25..7dfc6db1a2 100644 --- a/official/c14536035.lua +++ b/official/c14536035.lua @@ -48,7 +48,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) g:DeleteGroup() end function s.costfilter(c) @@ -56,7 +56,7 @@ function s.costfilter(c) end function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() @@ -72,4 +72,4 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14541657.lua b/official/c14541657.lua index 98160505c6..95674e4bf0 100644 --- a/official/c14541657.lua +++ b/official/c14541657.lua @@ -1,4 +1,5 @@ --黄昏の忍者-シンゲツ +--Twilight Ninja Shingetsu local s,id=GetID() function s.initial_effect(c) --untargetable @@ -30,13 +31,13 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} s.listed_names={id} function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x2b) and c~=e:GetHandler() + return c:IsFaceup() and c:IsSetCard(SET_NINJA) and c~=e:GetHandler() end function s.tglimit(e,c) - return c:IsSetCard(0x2b) and c~=e:GetHandler() + return c:IsSetCard(SET_NINJA) and c~=e:GetHandler() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,7 +45,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) or (rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)) end function s.thfilter(c) - return c:IsSetCard(0x2b) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NINJA) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -57,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c14550855.lua b/official/c14550855.lua index 79924ccb78..3397a6ff9d 100644 --- a/official/c14550855.lua +++ b/official/c14550855.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.filter(c) - return c:IsSetCard(0xb) and c:IsAbleToGrave() + return c:IsSetCard(SET_INFERNITY) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 @@ -26,9 +26,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ac=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_DECK,0,nil) if ac==0 then return end if ac>2 then ac=2 end - local ct=Duel.DiscardHand(tp,aux.TRUE,1,ac,REASON_DISCARD+REASON_EFFECT) + local ct=Duel.DiscardHand(tp,aux.TRUE,1,ac,REASON_DISCARD|REASON_EFFECT) Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,ct,ct,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14553285.lua b/official/c14553285.lua index 64f4890633..bc17921db5 100644 --- a/official/c14553285.lua +++ b/official/c14553285.lua @@ -95,4 +95,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c14558127.lua b/official/c14558127.lua index d83a0012b9..e6f84b5a78 100644 --- a/official/c14558127.lua +++ b/official/c14558127.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -36,11 +36,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) or checkfunc(CATEGORY_TOGRAVE,true) or checkfunc(CATEGORY_DRAW,true) or checkfunc(CATEGORY_DRAW,false) or checkfunc(CATEGORY_SEARCH,false) or checkfunc(CATEGORY_DECKDES,true) or checkfunc(CATEGORY_DECKDES,false) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) diff --git a/official/c14577226.lua b/official/c14577226.lua index 6660480dac..81a647f92f 100644 --- a/official/c14577226.lua +++ b/official/c14577226.lua @@ -1,6 +1,5 @@ --WW-ウィンター・ベル --Windwitch - Winter Bell - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -27,16 +26,15 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xf0} - +s.listed_series={SET_WINDWITCH} function s.damfil(c) - return c:IsMonster() and c:IsSetCard(0xf0) and c:IsLevelAbove(1) + return c:IsMonster() and c:IsSetCard(SET_WINDWITCH) and c:IsLevelAbove(1) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.damfil(chkc) end @@ -54,13 +52,11 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,tc:GetLevel()*200,REASON_EFFECT) end end - function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.spfil1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xf0) and Duel.IsExistingMatchingCard(s.spfil2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetLevel()) + return c:IsFaceup() and c:IsSetCard(SET_WINDWITCH) and Duel.IsExistingMatchingCard(s.spfil2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetLevel()) end function s.spfil2(c,e,tp,lv) return c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -86,7 +82,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c14602126.lua b/official/c14602126.lua index cd959ac378..ef1265e7cc 100644 --- a/official/c14602126.lua +++ b/official/c14602126.lua @@ -1,14 +1,13 @@ --エクシーズ・インポート --Xyz Import --Scripted by Naim, updated by DyXel - local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START) + e1:SetHintTiming(TIMINGS_CHECK_MONSTER|TIMING_BATTLE_START) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) @@ -21,7 +20,7 @@ function s.atchfilter(c,atk) end function s.xyzfilter(c,tp) return c:IsFaceup() and c:IsMonster() and c:IsType(TYPE_XYZ) and - Duel.IsExistingTarget(s.atchfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) + Duel.IsExistingTarget(s.atchfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -44,4 +43,4 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) and not xyzc:IsImmuneToEffect(e) and not tgc:IsImmuneToEffect(e) then Duel.Overlay(xyzc,tgc,true) end -end +end \ No newline at end of file diff --git a/official/c14613029.lua b/official/c14613029.lua index 08be821ec4..10374124ac 100644 --- a/official/c14613029.lua +++ b/official/c14613029.lua @@ -1,4 +1,5 @@ --ブレンD +--Morphtronic Mix-up local s,id=GetID() function s.initial_effect(c) --destroy @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x26),tp,LOCATION_MZONE,0,2,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MORPHTRONIC),tp,LOCATION_MZONE,0,2,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local dg=sg:Select(1-tp,1,1,nil) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14624296.lua b/official/c14624296.lua index 05fbd59858..3dce20586d 100644 --- a/official/c14624296.lua +++ b/official/c14624296.lua @@ -1,4 +1,5 @@ --超重武者装留ダブル・ホーン +--Superheavy Samurai Soulhorns local s,id=GetID() function s.initial_effect(c) --equip @@ -6,14 +7,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end @@ -36,14 +37,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) @@ -53,7 +54,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetCountLimit(1,id) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.eqlimit(e,c) @@ -68,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c14625090.lua b/official/c14625090.lua index 29364a83e5..71138c9097 100644 --- a/official/c14625090.lua +++ b/official/c14625090.lua @@ -40,9 +40,9 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x133) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_DRAGONMAID) and c:IsMonster() end function s.atkval(e,c) local ct=Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) @@ -53,10 +53,10 @@ function s.atkval(e,c) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x133),tp,LOCATION_MZONE,0,2,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DRAGONMAID),tp,LOCATION_MZONE,0,2,nil) end function s.thfilter(c) - return c:IsSetCard(0x133) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_DRAGONMAID) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,9 +80,9 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x133)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DRAGONMAID)) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,0,1,aux.Stringid(id,2),nil) -end +end \ No newline at end of file diff --git a/official/c14644902.lua b/official/c14644902.lua index 0866184527..9881a4f10e 100644 --- a/official/c14644902.lua +++ b/official/c14644902.lua @@ -36,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) sg:GetFirst():RegisterEffect(e1) end @@ -47,4 +47,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c146746.lua b/official/c146746.lua index 2672abda08..43db6b9627 100644 --- a/official/c146746.lua +++ b/official/c146746.lua @@ -1,5 +1,5 @@ --機関重連アンガー・ナックル ---Double Header Anger Knuckle +--Double Headed Anger Knuckle --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) @@ -41,16 +41,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.costfilter(c,tp) return c:IsMonster() and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -71,12 +70,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -85,9 +84,9 @@ function s.costfilter2(c,tp) return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter2,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter2,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -100,4 +99,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c14677495.lua b/official/c14677495.lua index 5063630ddd..dd397640d4 100644 --- a/official/c14677495.lua +++ b/official/c14677495.lua @@ -1,62 +1,66 @@ --極星獣タングニョースト +--Tanngnjostr of the Nordic Beasts local s,id=GetID() function s.initial_effect(c) - --special summon(hand) + --Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_BATTLE_DESTROYED) - e1:SetCondition(s.spcon1) - e1:SetTarget(s.sptg1) - e1:SetOperation(s.spop1) + e1:SetRange(LOCATION_HAND) + e1:SetCondition(s.selfspcon) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) c:RegisterEffect(e1) - --spsummon2 + --Special Summon 1 "Nordic Beast" monster from your Deck in Defense Position, except "Tanngnjostr of the Nordic Beasts" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_CHANGE_POS) e2:SetCountLimit(1) - e2:SetCondition(s.spcon2) - e2:SetTarget(s.sptg2) - e2:SetOperation(s.spop2) + e2:SetCondition(s.deckspcon) + e2:SetTarget(s.decksptg) + e2:SetOperation(s.deckspop) c:RegisterEffect(e2) end -s.listed_series={0x6042} -function s.cfilter(c,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousControler(tp) +s.listed_series={SET_NORDIC_BEAST} +s.listed_names={id} +function s.selfspconfilter(c,tp) + return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) end -function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) +function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.selfspconfilter,1,nil,tp) end -function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end -function s.spop1(e,tp,eg,ep,ev,re,r,rp) +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end end -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPosition()==POS_FACEUP_ATTACK and e:GetHandler():GetPreviousPosition()>0x3 +function s.deckspcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsPreviousPosition(POS_DEFENSE) end -function s.filter(c,e,tp) - return c:IsSetCard(0x6042) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_NORDIC_BEAST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end -function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end -function s.spop2(e,tp,eg,ep,ev,re,r,rp) +function s.deckspop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end diff --git a/official/c14702066.lua b/official/c14702066.lua index cb749046a1..20e4212522 100644 --- a/official/c14702066.lua +++ b/official/c14702066.lua @@ -1,4 +1,5 @@ --メガキャノン・ソルジャー +--Cannon Soldier MK-2 local s,id=GetID() function s.initial_effect(c) --damage @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14729426.lua b/official/c14729426.lua index 35769a174c..c4bf51b206 100644 --- a/official/c14729426.lua +++ b/official/c14729426.lua @@ -1,4 +1,5 @@ --惑星からの物体A +--Interplanetary Invader "A" local s,id=GetID() function s.initial_effect(c) --return to hand @@ -16,13 +17,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetCountLimit(1) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) e1:SetLabelObject(a) e1:SetLabel(a:GetRealFieldID()) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) end end @@ -39,4 +40,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c14730606.lua b/official/c14730606.lua index 3873dd5493..b2d9f0e8fd 100644 --- a/official/c14730606.lua +++ b/official/c14730606.lua @@ -1,4 +1,5 @@ --アイヴィ・シャックル +--Ivy Shackles local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,4 +43,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14731897.lua b/official/c14731897.lua index d09bfc295b..44a276565f 100644 --- a/official/c14731897.lua +++ b/official/c14731897.lua @@ -1,4 +1,5 @@ --結束 UNITY +--Unity local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsDefenseAbove(0) end @@ -30,8 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local def=0 - local sc=g:GetFirst() - for sc in aux.Next(g) do + for sc in g:Iter() do local cdef=sc:GetBaseDefense() if cdef<0 then cdef=0 end def=def+cdef @@ -40,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c14733538.lua b/official/c14733538.lua index 64d172def8..8d884fd593 100644 --- a/official/c14733538.lua +++ b/official/c14733538.lua @@ -1,4 +1,5 @@ --竜呼相打つ +--Draco Face-Off local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,36 +14,37 @@ function s.initial_effect(c) e1:SetValue(s.zones) c:RegisterEffect(e1) end +s.listed_series={SET_DRACOSLAYER,SET_DRACOVERLORD} function s.filter(c,e,tp,b1,setcode) return c:IsSetCard(setcode) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and (b1 or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end function s.zones(e,tp,eg,ep,ev,re,r,rp) - local zone=0xff + local zone=0xff --all Spell/Trap zones local p0=Duel.CheckLocation(tp,LOCATION_PZONE,0) local p1=Duel.CheckLocation(tp,LOCATION_PZONE,1) local sp=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,false,0xc7) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,false,0xda) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,false,SET_DRACOSLAYER) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,false,SET_DRACOVERLORD) if p0==p1 or sp then return zone end - if p0 then zone=zone-0x1 end - if p1 then zone=zone-0x10 end + if p0 then zone=zone-0x1 end --remove the left most S/T zone + if p1 then zone=zone-0x10 end --remove the right most S/T zone return zone end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.CheckPendulumZones(tp) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return (b1 or b2) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,0xc7) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,0xda) end + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,SET_DRACOSLAYER) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,SET_DRACOVERLORD) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local b1=Duel.CheckPendulumZones(tp) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if not b1 and not b2 then return end - local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,0xc7) - local g2=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,0xda) + local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,SET_DRACOSLAYER) + local g2=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,SET_DRACOVERLORD) if #g1==0 or #g2==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg1=g1:Select(tp,1,1,nil) @@ -61,4 +63,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end sg1:RemoveCard(tc) Duel.SendtoExtraP(sg1,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14745409.lua b/official/c14745409.lua index add390a06d..d7950af5fc 100644 --- a/official/c14745409.lua +++ b/official/c14745409.lua @@ -1,4 +1,5 @@ --聖剣ガラティーン +--Noble Arms - Gallatin local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -21,7 +22,7 @@ function s.initial_effect(c) --atkdown local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetLabelObject(e2) @@ -41,14 +42,14 @@ function s.initial_effect(c) e5:SetOperation(s.eqop) c:RegisterEffect(e5) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.regop(e,tp,eg,ep,ev,re,r,rp) if not eg:IsContains(e:GetHandler()) then return end local pe=e:GetLabelObject() pe:SetValue(1000) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local pe=e:GetLabelObject() @@ -67,7 +68,7 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) end function s.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsRace(RACE_WARRIOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter2(chkc) end @@ -77,4 +78,4 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) -end +end \ No newline at end of file diff --git a/official/c1474910.lua b/official/c1474910.lua index afc67186e9..7e0843af83 100644 --- a/official/c1474910.lua +++ b/official/c1474910.lua @@ -31,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1475311.lua b/official/c1475311.lua index 0d87d534d3..c3b18e4558 100644 --- a/official/c1475311.lua +++ b/official/c1475311.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14756848.lua b/official/c14756848.lua index 1d74cb1d0d..2889dcc984 100644 --- a/official/c14756848.lua +++ b/official/c14756848.lua @@ -25,12 +25,12 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.descost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.hspcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -48,15 +48,11 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,5)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.desfilter1(c) return c:GetSequence()<5 @@ -95,7 +91,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not tc then return end Duel.HintSelection(g) if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) + and not tc:IsLocation(LOCATION_HAND|LOCATION_DECK) and tc:IsSpellTrap() and tc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() @@ -109,7 +105,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.CheckPendulumZones(tp) - and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) and not tc:IsForbidden() + and not tc:IsLocation(LOCATION_HAND|LOCATION_DECK) and not tc:IsForbidden() and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then Duel.BreakEffect() Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) diff --git a/official/c14763299.lua b/official/c14763299.lua index 9448936a46..c637b1b1b3 100644 --- a/official/c14763299.lua +++ b/official/c14763299.lua @@ -1,4 +1,5 @@ --幻奏の歌姫ソロ +--Solo the Melodious Songstress local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} s.listed_names={id} function s.spcon(e,c) if c==nil then return true end @@ -32,7 +33,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) end function s.filter(c,e,tp) - return c:IsSetCard(0x9b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MELODIOUS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c14771222.lua b/official/c14771222.lua index 060d462e67..ce17c0198e 100644 --- a/official/c14771222.lua +++ b/official/c14771222.lua @@ -1,4 +1,5 @@ --絶海の騎士 +--Shore Knight local s,id=GetID() function s.initial_effect(c) --send to grave @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14772491.lua b/official/c14772491.lua index 0dce58843b..8ab268c03f 100644 --- a/official/c14772491.lua +++ b/official/c14772491.lua @@ -1,4 +1,5 @@ --魂の共有-コモンソウル +--Common Soul local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,9 +20,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) e1:SetLabelObject(e2) end -s.listed_series={0x1f} +s.listed_series={SET_NEO_SPACIAN} function s.spfilter(c,e,tp) - return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter(c) return c:IsFaceup() and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 @@ -56,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.rcon) e1:SetValue(sc:GetAttack()) e1:SetLabelObject(sc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end @@ -70,4 +71,4 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14778250.lua b/official/c14778250.lua index 87d5d8a558..028cc58225 100644 --- a/official/c14778250.lua +++ b/official/c14778250.lua @@ -33,6 +33,6 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) g:DeleteGroup() end \ No newline at end of file diff --git a/official/c14785765.lua b/official/c14785765.lua index b8cdc5659c..297d92a98d 100644 --- a/official/c14785765.lua +++ b/official/c14785765.lua @@ -1,4 +1,5 @@ --BF-精鋭のゼピュロス +--Blackwing - Zephyros the Elite local s,id=GetID() function s.initial_effect(c) --special summon @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Damage(tp,400,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c14812471.lua b/official/c14812471.lua index 88472c338b..3e06666d7a 100644 --- a/official/c14812471.lua +++ b/official/c14812471.lua @@ -37,7 +37,7 @@ function s.thfilter(c) return c:IsCode(CARD_SALAMANGREAT_SANCTUARY) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,7 +53,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(SET_SALAMANGREAT) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -64,5 +64,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c14812659.lua b/official/c14812659.lua index 60ea8d6c39..37dccf78e6 100644 --- a/official/c14812659.lua +++ b/official/c14812659.lua @@ -32,8 +32,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c14816688.lua b/official/c14816688.lua index 901ef364ed..6377f573e3 100644 --- a/official/c14816688.lua +++ b/official/c14816688.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c14816857.lua b/official/c14816857.lua index 1d9b8e21c1..83e36274c5 100644 --- a/official/c14816857.lua +++ b/official/c14816857.lua @@ -1,5 +1,5 @@ --鉄獣戦線 ナーベル ---Tribrigade Navel +--Tri-Brigade Nervall --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.rmfilter(c) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) end @@ -37,7 +37,7 @@ function s.spfilter(c,e,tp,ct,g) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local nums={} for i=1,#g do if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,i,g) then @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.matlimit) e1:SetTargetRange(LOCATION_ALL,LOCATION_ALL) e1:SetValue(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --client hint aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) @@ -85,7 +85,7 @@ function s.sumlimit(e,c) return c:IsControler(e:GetHandlerPlayer()) end function s.thfilter(c) - return c:IsSetCard(0x14f) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -98,4 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c1482001.lua b/official/c1482001.lua index ed176c7c76..a9a6b23bd0 100644 --- a/official/c1482001.lua +++ b/official/c1482001.lua @@ -14,6 +14,5 @@ function s.initial_effect(c) end function s.spcost(e,c,tp,st) if (st&SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end - return Duel.GetCurrentPhase()==PHASE_MAIN2 -end - + return Duel.IsPhase(PHASE_MAIN2) +end \ No newline at end of file diff --git a/official/c14821890.lua b/official/c14821890.lua index 5fe76db385..44e209aa4d 100644 --- a/official/c14821890.lua +++ b/official/c14821890.lua @@ -1,9 +1,9 @@ --- 相剣暗転 --- Swordsoul Blackout --- Scripted by Hatter +--相剣暗転 +--Swordsoul Blackout +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy + --Destroy local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - -- Special Summon token + --Special Summon token local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -26,13 +26,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={TOKEN_SWORDSOUL} -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.desfilter(c,e,tp) return c:IsCanBeEffectTarget(e) and (c:IsControler(1-tp) or (c:IsFaceup() and c:IsMonster() and c:IsRace(RACE_WYRM))) end function s.desrescon(sg,e,tp,mg) - local own=sg:FilterCount(Card.IsControler,nil,tp) - return own==1,own>1 + local own=sg:FilterCount(Card.IsControler,nil,tp) + return own==1,own>1 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -51,7 +51,7 @@ end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,0x16d,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,SET_SWORDSOUL,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) @@ -61,7 +61,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local token=Duel.CreateToken(tp,TOKEN_SWORDSOUL) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Cannot Special Summon non-Synchro monsters from Extra Deck + --Cannot Special Summon non-Synchro monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -69,12 +69,12 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) - -- Lizard check + --Lizard check local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c14824019.lua b/official/c14824019.lua index 68c14aa543..1feba6fe48 100644 --- a/official/c14824019.lua +++ b/official/c14824019.lua @@ -1,4 +1,5 @@ --魔導書士 バテル +--Spellbook Magician of Prophecy local s,id=GetID() function s.initial_effect(c) --search @@ -14,9 +15,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_FLIP) c:RegisterEffect(e2) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.filter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,4 +30,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c14839621.lua b/official/c14839621.lua index 334525f2e3..85445b93ba 100644 --- a/official/c14839621.lua +++ b/official/c14839621.lua @@ -49,4 +49,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) g:AddCard(c) Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1487805.lua b/official/c1487805.lua index 5845f29acd..026cc9af44 100644 --- a/official/c1487805.lua +++ b/official/c1487805.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c14878871.lua b/official/c14878871.lua index a4e9786686..2355f42bea 100644 --- a/official/c14878871.lua +++ b/official/c14878871.lua @@ -9,16 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsLevelBelow(3) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -36,18 +31,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local fid=c:GetFieldID() for tc in sg:Iter() do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) --Negate its effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() diff --git a/official/c14882493.lua b/official/c14882493.lua index 615b5d605c..e4939f56cd 100644 --- a/official/c14882493.lua +++ b/official/c14882493.lua @@ -1,4 +1,5 @@ --極夜の騎士ガイア +--Gaia, the Polar Knight local s,id=GetID() function s.initial_effect(c) --search @@ -54,9 +55,9 @@ function s.cfilter(c,tp) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -71,8 +72,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetValue(500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c14886190.lua b/official/c14886190.lua index de6cce190f..ef503ab207 100644 --- a/official/c14886190.lua +++ b/official/c14886190.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.tfop) c:RegisterEffect(e1) end -s.listed_series={0x1150,0x150} +s.listed_series={SET_VIRTUAL_WORLD_GATE,SET_VIRTUAL_WORLD} function s.tffilter(c,tp) - return c:IsSpellTrap() and c:IsSetCard(0x1150) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + return c:IsSpellTrap() and c:IsSetCard(SET_VIRTUAL_WORLD_GATE) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -29,7 +29,7 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local tc=Duel.SelectMatchingCard(tp,s.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x1150),tp,LOCATION_ONFIELD,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_VIRTUAL_WORLD_GATE),tp,LOCATION_ONFIELD,0,nil) if ct>=2 then Duel.BreakEffect() local c=e:GetHandler() @@ -38,8 +38,8 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(200) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x150)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VIRTUAL_WORLD)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end if ct>=3 and Duel.IsPlayerCanDiscardDeck(tp,3) then @@ -67,7 +67,7 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x150) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.exfilter1(c) return c:IsFacedown() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) @@ -84,4 +84,4 @@ function s.rescon(ft1,ft2,ft3,ft) local res=ft2>=exnpct and ft3>=expct and ft>=groupcount and classcount==groupcount return res, not res end -end +end \ No newline at end of file diff --git a/official/c14886469.lua b/official/c14886469.lua index f7fb28957c..431ecda414 100644 --- a/official/c14886469.lua +++ b/official/c14886469.lua @@ -1,4 +1,5 @@ --レッド・スプリンター +--Red Sprinter local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,14 +27,14 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c14920218.lua b/official/c14920218.lua index 0aba650e7f..02681d3ddb 100644 --- a/official/c14920218.lua +++ b/official/c14920218.lua @@ -1,4 +1,5 @@ --賤竜の魔術師 +--Oafdragon Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -29,13 +30,13 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x98,0x99} +s.listed_series={SET_MAGICIAN,SET_ODD_EYES} s.listed_names={id} function s.pcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x98) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_MAGICIAN) end function s.pfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and (c:IsSetCard(0x98) or c:IsSetCard(0x99)) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard({SET_MAGICIAN,SET_ODD_EYES}) and not c:IsCode(id) and c:IsAbleToHand() end function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -51,7 +52,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsMonster() and ((c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(0x99)) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsMonster() and ((c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(SET_ODD_EYES)) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -66,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c14934922.lua b/official/c14934922.lua index 897343cfb0..7fd9b394a9 100644 --- a/official/c14934922.lua +++ b/official/c14934922.lua @@ -29,16 +29,16 @@ function s.initial_effect(c) e2:SetOperation(s.activate2) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} --Check for "Salamangreat" monster function s.costfilter(c) - return c:IsSetCard(0x119) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost() end --Defining cost function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end --Activation legality @@ -58,7 +58,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) end --Check if "Salamangreat" link monster was summoned using its own name function s.lkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsReincarnationSummoned() + return c:IsFaceup() and c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsReincarnationSummoned() end --Activation legality function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -81,5 +81,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c14936691.lua b/official/c14936691.lua index d74147489d..8a45fef523 100644 --- a/official/c14936691.lua +++ b/official/c14936691.lua @@ -1,4 +1,5 @@ --ワーム・イーロキン +--Worm Erokin local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -19,9 +20,9 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsCanTurnSet() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,4 +36,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE,0,POS_FACEDOWN_DEFENSE,0) end -end +end \ No newline at end of file diff --git a/official/c14943837.lua b/official/c14943837.lua index 09bb7346a8..ff970f1dc6 100644 --- a/official/c14943837.lua +++ b/official/c14943837.lua @@ -1,4 +1,5 @@ --デブリ・ドラゴン +--Debris Dragon local s,id=GetID() function s.initial_effect(c) --synchro custom @@ -50,13 +51,13 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c14957440.lua b/official/c14957440.lua index 25cc6dee4f..da5bf4f271 100644 --- a/official/c14957440.lua +++ b/official/c14957440.lua @@ -81,4 +81,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c14970113.lua b/official/c14970113.lua index edafc6c2d7..abb1a980ff 100644 --- a/official/c14970113.lua +++ b/official/c14970113.lua @@ -1,4 +1,5 @@ --十二獣ハマーコング +--Zoodiac Hammerkong local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -38,31 +39,31 @@ function s.initial_effect(c) e4:SetOperation(s.rmop) c:RegisterEffect(e4) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0xf1,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_ZOODIAC,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.atkfilter(c) - return c:IsSetCard(0xf1) and c:GetAttack()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetAttack()>=0 end function s.atkval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.atkfilter,nil) return g:GetSum(Card.GetAttack) end function s.deffilter(c) - return c:IsSetCard(0xf1) and c:GetDefense()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetDefense()>=0 end function s.defval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.deffilter,nil) return g:GetSum(Card.GetDefense) end function s.efftg(e,c) - return c:IsSetCard(0xf1) and c~=e:GetHandler() + return c:IsSetCard(SET_ZOODIAC) and c~=e:GetHandler() end function s.effcon(e) return e:GetHandler():GetOverlayCount()>0 @@ -74,4 +75,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c14972952.lua b/official/c14972952.lua index 16ae42764c..84f5cbdc92 100644 --- a/official/c14972952.lua +++ b/official/c14972952.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c1498130.lua b/official/c1498130.lua index dbb7bbca09..5894dbd772 100644 --- a/official/c1498130.lua +++ b/official/c1498130.lua @@ -12,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.tgop) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return false end local tc=g:GetFirst() local c=e:GetHandler() - if tc==c or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x3d) then return false end + if tc==c or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(SET_SIX_SAMURAI) then return false end return Duel.CheckChainTarget(ev,c) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) @@ -29,4 +29,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) g:AddCard(c) Duel.ChangeTargetCard(ev,g) end -end +end \ No newline at end of file diff --git a/official/c14983497.lua b/official/c14983497.lua index 01dc4228f4..e0f4656719 100644 --- a/official/c14983497.lua +++ b/official/c14983497.lua @@ -1,4 +1,5 @@ --霞の谷の幼怪鳥 +--Mist Valley Baby Roc local s,id=GetID() function s.initial_effect(c) --spsummon @@ -24,4 +25,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c1498449.lua b/official/c1498449.lua index 4d23abb13a..ec7ea7f26f 100644 --- a/official/c1498449.lua +++ b/official/c1498449.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1,id) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.fustg) e1:SetOperation(Fusion.SummonEffOP({fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_SPELLCASTER)})) c:RegisterEffect(e1) diff --git a/official/c14989021.lua b/official/c14989021.lua index 2eb8cdfb41..a9c1580e64 100644 --- a/official/c14989021.lua +++ b/official/c14989021.lua @@ -1,4 +1,5 @@ --神鳥シムルグ +--Simorgh, Bird of Divinity local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -42,4 +43,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if c2<2 then Duel.Damage(1-tp,1000-c2*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15001619.lua b/official/c15001619.lua index ead2ba0e0f..61bbe0ec72 100644 --- a/official/c15001619.lua +++ b/official/c15001619.lua @@ -54,8 +54,8 @@ function s.spfilter(c,e,tp) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.atkfilter(c) return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) @@ -63,7 +63,7 @@ end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and g:GetFirst():IsCode(3167573) then local c=e:GetHandler() local tg=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil) @@ -73,7 +73,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetValue(1000) tc:RegisterEffect(e1) end diff --git a/official/c15013468.lua b/official/c15013468.lua index 1b52c4575b..f27cd4dd6e 100644 --- a/official/c15013468.lua +++ b/official/c15013468.lua @@ -1,4 +1,5 @@ --アンドロ・スフィンクス +--Andro Sphinx local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -43,7 +44,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.spcon(e,c) @@ -70,4 +71,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15028680.lua b/official/c15028680.lua index 34603f44c1..8818468eb6 100644 --- a/official/c15028680.lua +++ b/official/c15028680.lua @@ -1,4 +1,5 @@ --超念導体ビヒーマス +--HTS Psyhemuth local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(a,d) local rg=g:Filter(Card.IsRelateToBattle,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15033525.lua b/official/c15033525.lua index 30167b55c1..6e2a8121f2 100644 --- a/official/c15033525.lua +++ b/official/c15033525.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -31,9 +31,9 @@ function s.costfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,3,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,3,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,12 +50,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.ncostfilter(c) return not c:IsAbleToGraveAsCost() @@ -77,4 +77,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15052462.lua b/official/c15052462.lua index 82a855e0ae..d739b5afb0 100644 --- a/official/c15052462.lua +++ b/official/c15052462.lua @@ -1,4 +1,5 @@ --紫水晶 +--Violet Crystal local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c15066114.lua b/official/c15066114.lua index f3a80cc369..5e2be6b786 100644 --- a/official/c15066114.lua +++ b/official/c15066114.lua @@ -39,7 +39,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(1300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -47,7 +47,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.desfilter(c,atk) return c:IsFaceup() and c:IsAttackBelow(atk) and c:GetSequence()<5 @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c15079028.lua b/official/c15079028.lua index 58897443cd..823d1e04f8 100644 --- a/official/c15079028.lua +++ b/official/c15079028.lua @@ -1,5 +1,5 @@ --地久神-カルボン ---Chikyuujin - Carbon +--World Soul - Carbon --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.scon) - e1:SetCost(s.scost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.stg) e1:SetOperation(s.sop) c:RegisterEffect(e1) @@ -29,21 +29,14 @@ function s.initial_effect(c) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) - end s.listed_names={id} ---Search function s.sfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() and not c:IsCode(id) end function s.scon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()&SUMMON_TYPE_SPECIAL==0 end -function s.scost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.stg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_SEARCH,nil,1,tp,LOCATION_DECK) @@ -55,7 +48,6 @@ function s.sop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end ---To Decktop function s.tgfilter(c,tp) return c:IsRace(RACE_FAIRY) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp @@ -70,4 +62,4 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsAbleToDeck() then return end Duel.SendtoDeck(e:GetHandler(),tp,SEQ_DECKTOP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15083304.lua b/official/c15083304.lua index 4b0137b98c..2ed61884f6 100644 --- a/official/c15083304.lua +++ b/official/c15083304.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end Duel.SetTargetPlayer(tp) @@ -22,7 +22,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3) end function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,0x11e) + return sg:IsExists(Card.IsSetCard,1,nil,SET_DANGER) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) @@ -30,12 +30,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(p) Duel.BreakEffect() local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) - if g:IsExists(Card.IsSetCard,1,nil,0x11e) then + if g:IsExists(Card.IsSetCard,1,nil,SET_DANGER) then local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_DISCARD) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) else Duel.ConfirmCards(1-p,g) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c15083728.lua b/official/c15083728.lua index 1f79592696..d324616358 100644 --- a/official/c15083728.lua +++ b/official/c15083728.lua @@ -1,4 +1,5 @@ --粘着テープの家 +--House of Adhesive Tape local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetDefense()<=500 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1508649.lua b/official/c1508649.lua index aa9a0b6f63..6be722919e 100644 --- a/official/c1508649.lua +++ b/official/c1508649.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x103),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALTERGEIST),2,2) --ATK increase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -40,9 +40,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x103) and c:GetBaseAttack()>=0 + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) and c:GetBaseAttack()>=0 end function s.atkval(e,c) local lg=c:GetLinkedGroup():Filter(s.atkfilter,nil) @@ -50,10 +50,10 @@ function s.atkval(e,c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + return re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c,g) - return c:IsSetCard(0x103) and g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_ALTERGEIST) and g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local lg=e:GetHandler():GetLinkedGroup() @@ -77,7 +77,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x103) and c:IsAbleToHand() + return c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c15090429.lua b/official/c15090429.lua index c1d9697189..3ad9a6eb30 100644 --- a/official/c15090429.lua +++ b/official/c15090429.lua @@ -1,4 +1,5 @@ --暴風小僧 +--Whirlwind Prodigy local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_WIND) -end +end \ No newline at end of file diff --git a/official/c15092394.lua b/official/c15092394.lua index 7ff748def0..ab960f841f 100644 --- a/official/c15092394.lua +++ b/official/c15092394.lua @@ -1,4 +1,5 @@ --RR-エトランゼ・ファルコン +--Raidraptor - Stranger Falcon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.descon) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,15 +29,11 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} s.listed_names={id} function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -56,7 +53,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0xba) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_RAIDRAPTOR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -76,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c15103313.lua b/official/c15103313.lua index 3f06d9e0b0..00ab92b85b 100644 --- a/official/c15103313.lua +++ b/official/c15103313.lua @@ -1,4 +1,5 @@ --即神仏 +--Self-Mummification local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(tp) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15130912.lua b/official/c15130912.lua index 41231aaae3..8a67c1a9f3 100644 --- a/official/c15130912.lua +++ b/official/c15130912.lua @@ -1,10 +1,10 @@ --- ヴァリアンツの弓引-西園 --- Saion the Vaylantz Archer --- Scripted by Hatter +--ヴァリアンツの弓引-西園 +--Saion the Vaylantz Archer +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon itself from the Pendulum Zone + --Special Summon itself from the Pendulum Zone local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Negate or halve ATK + --Negate or halve ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_COIN+CATEGORY_DISABLE+CATEGORY_ATKCHANGE) @@ -22,11 +22,11 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end) + e2:SetCondition(function(e) return e:GetHandler():IsSpecialSummoned() end) e2:SetTarget(s.disatktg) e2:SetOperation(s.disatkop) c:RegisterEffect(e2) - -- Destroy or return to hand + --Destroy or return to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_COIN+CATEGORY_DESTROY+CATEGORY_TOHAND) @@ -56,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if zone~=0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone) end - -- Cannot Special Summon, except "Vaylantz" and from the Extra Deck + --Cannot Special Summon, except "Vaylantz" and from the Extra Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) @@ -83,7 +83,7 @@ function s.disatkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local coin=Duel.TossCoin(tp,1) if coin==COIN_HEADS then - -- Negate its effects + --Negate its effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) @@ -94,7 +94,7 @@ function s.disatkop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DISABLE_EFFECT) tc:RegisterEffect(e2) elseif coin==COIN_TAILS then - -- Halve its ATK + --Halve its ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) diff --git a/official/c15146890.lua b/official/c15146890.lua index 10e0843fbd..d9648546e4 100644 --- a/official/c15146890.lua +++ b/official/c15146890.lua @@ -1,4 +1,5 @@ --竜脈の魔術師 +--Dragonpulse Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -17,16 +18,16 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x98) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_MAGICIAN) end function s.cfilter(c) return c:IsType(TYPE_PENDULUM) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15150365.lua b/official/c15150365.lua index f056b08c0e..9ad67b2e54 100644 --- a/official/c15150365.lua +++ b/official/c15150365.lua @@ -1,4 +1,5 @@ --白い泥棒 +--White Magical Hat local s,id=GetID() function s.initial_effect(c) --handes @@ -22,5 +23,5 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c15155568.lua b/official/c15155568.lua index 329f3ef8e8..06fc43559d 100644 --- a/official/c15155568.lua +++ b/official/c15155568.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.discon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) diff --git a/official/c1516510.lua b/official/c1516510.lua index 1baaab186b..4f7cb913a6 100644 --- a/official/c1516510.lua +++ b/official/c1516510.lua @@ -20,9 +20,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={16178681} -s.material_setcode={0x99,0xf2,0x10f2} +s.material_setcode={SET_ODD_EYES,SET_PENDULUM,SET_PENDULUM_DRAGON} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetValue(2) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x4)~=0 then @@ -48,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetValue(s.efilter) e4:SetOwnerPlayer(tp) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e4) end end @@ -59,7 +59,7 @@ function s.lvfilter(c,fc) return c:IsCode(16178681) or c:CheckFusionSubstitute(fc) end function s.imfilter(c) - return c:IsLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsLocation(LOCATION_MZONE) and c:IsPendulumSummoned() end function s.valcheck(e,c) local g=c:GetMaterial() diff --git a/official/c15169262.lua b/official/c15169262.lua index a5ea71e790..54856e471e 100644 --- a/official/c15169262.lua +++ b/official/c15169262.lua @@ -1,4 +1,5 @@ --ラヴァル炎樹海の妖女 +--Laval Forest Sprite local s,id=GetID() function s.initial_effect(c) --to grave @@ -11,22 +12,22 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x39),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() if not tc then return end local c=e:GetHandler() - local atk=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39)*200 + local atk=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_LAVAL)*200 for tc in aux.Next(g) do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c15173384.lua b/official/c15173384.lua index cddbfffb17..b4530b8b81 100644 --- a/official/c15173384.lua +++ b/official/c15173384.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon1) e1:SetTarget(s.sptg1) @@ -26,11 +26,11 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x1110} +s.listed_series={SET_EYES_RESTRICT} s.listed_names={64631466} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) - and ((c:IsPreviousSetCard(0x1110) and c:GetPreviousTypeOnField()&TYPE_FUSION~=0) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) + and ((c:IsPreviousSetCard(SET_EYES_RESTRICT) and c:GetPreviousTypeOnField()&TYPE_FUSION~=0) or c:GetPreviousCodeOnField()==64631466) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end @@ -52,7 +52,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return ((c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466)) + return ((c:IsSetCard(SET_EYES_RESTRICT) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -68,4 +68,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15175429.lua b/official/c15175429.lua index 07081213d3..5278858651 100644 --- a/official/c15175429.lua +++ b/official/c15175429.lua @@ -1,4 +1,5 @@ --マジック・リアクター・AID +--Spell Reactor ・RE local s,id=GetID() function s.initial_effect(c) --destroy&damage @@ -17,7 +18,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return re:GetHandler():IsDestructable() end @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then Duel.Damage(1-tp,800,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15177750.lua b/official/c15177750.lua index 4e173977d6..cd4d974174 100644 --- a/official/c15177750.lua +++ b/official/c15177750.lua @@ -53,10 +53,10 @@ function s.tgfilter(c) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) end function s.rccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.rctg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c15180041.lua b/official/c15180041.lua index 930f08497b..1df9937593 100644 --- a/official/c15180041.lua +++ b/official/c15180041.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -54,7 +54,7 @@ function s.initial_effect(c) e5:SetOperation(s.spop2) c:RegisterEffect(e5) end -s.listed_series={0xe7} +s.listed_series={SET_SILENT_SWORDSMAN} s.listed_names={id} function s.spcon(e,c) if c==nil then return true end @@ -82,12 +82,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -105,19 +105,19 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsMonster() and c:IsSetCard(0xe7) and not c:IsCode(id) + return c:IsMonster() and c:IsSetCard(SET_SILENT_SWORDSMAN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15198996.lua b/official/c15198996.lua index 27cb4ff865..473335d097 100644 --- a/official/c15198996.lua +++ b/official/c15198996.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_TO_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) end) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) diff --git a/official/c15216188.lua b/official/c15216188.lua index 98f0a72621..584efab609 100644 --- a/official/c15216188.lua +++ b/official/c15216188.lua @@ -68,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local exc=c:IsRelateToEffect(e) and c or nil local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsLevelAbove(5) and tc:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(s.metalmorphfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,exc) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) diff --git a/official/c15232745.lua b/official/c15232745.lua index ff19b9765e..ce824ee746 100644 --- a/official/c15232745.lua +++ b/official/c15232745.lua @@ -19,29 +19,29 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x14b} +s.listed_series={SET_NUMERON} s.xyz_number=1 function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsStatus(STATUS_OPPO_BATTLE) and c:IsRelateToBattle() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,nil) for tc in g:Iter() do --Double ATK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c15237615.lua b/official/c15237615.lua index dd32d91812..1ae3734b04 100644 --- a/official/c15237615.lua +++ b/official/c15237615.lua @@ -1,7 +1,8 @@ --裁きを下す女帝 +--Empress Judge local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,5901497,64501875) -end +end \ No newline at end of file diff --git a/official/c15240238.lua b/official/c15240238.lua index 50f2c9b37f..97f9892872 100644 --- a/official/c15240238.lua +++ b/official/c15240238.lua @@ -1,4 +1,5 @@ --霞鳥クラウソラス +--Mist Bird Clausolas local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -34,18 +35,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c15248594.lua b/official/c15248594.lua index 262429b615..793a96cb0c 100644 --- a/official/c15248594.lua +++ b/official/c15248594.lua @@ -1,5 +1,5 @@ --- 炎斬機マグマ --- En Zan-Ki Magma +--炎斬機マグマ +--Geomathmech Magma local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end @@ -49,7 +49,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ( c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp==1-tp) ) end function s.thfilter(c) - return c:IsSetCard(0x132) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MATHMECH) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c1525329.lua b/official/c1525329.lua index f1cf9b1fb9..a8b47c9587 100644 --- a/official/c1525329.lua +++ b/official/c1525329.lua @@ -32,7 +32,7 @@ function s.armop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.upcon) e1:SetOperation(s.upop) e1:SetLabel(rc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -47,8 +47,8 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(1000) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c15256925.lua b/official/c15256925.lua index d336b46201..912fb20c56 100644 --- a/official/c15256925.lua +++ b/official/c15256925.lua @@ -1,4 +1,5 @@ --滅びの呪文-デス・アルテマ +--Chaos Scepter Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -59,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15259703.lua b/official/c15259703.lua index 95af6bcf6b..bd36946d9f 100644 --- a/official/c15259703.lua +++ b/official/c15259703.lua @@ -1,14 +1,11 @@ --トゥーン・ワールド +--Toon World local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end diff --git a/official/c15259704.lua b/official/c15259704.lua deleted file mode 100644 index 92abf164f7..0000000000 --- a/official/c15259704.lua +++ /dev/null @@ -1,14 +0,0 @@ ---トゥーン·ワールド -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) - c:RegisterEffect(e1) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end diff --git a/official/c15270885.lua b/official/c15270885.lua index d8edba4a0c..87e4ad284a 100644 --- a/official/c15270885.lua +++ b/official/c15270885.lua @@ -1,6 +1,5 @@ --トゥーン・ゴブリン突撃部隊 --Toon Goblin Attack Force - local s,id=GetID() function s.initial_effect(c) --Cannot attack the turn it was summoned @@ -33,7 +32,7 @@ function s.initial_effect(c) --Change itself to defense position local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetRange(LOCATION_MZONE) e6:SetCountLimit(1) e6:SetCondition(s.poscon) @@ -41,12 +40,11 @@ function s.initial_effect(c) c:RegisterEffect(e6) end s.listed_names={15259703} - function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.sfilter(c) @@ -76,6 +74,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c1527418.lua b/official/c1527418.lua index ef0e98670b..088c078b42 100644 --- a/official/c1527418.lua +++ b/official/c1527418.lua @@ -1,5 +1,5 @@ --空牙団の叡智 ウィズ ---Wiz, Sage of the Skyfang Brigade +--Wiz, Sage Fur Hire local s,id=GetID() function s.initial_effect(c) --Recover @@ -29,10 +29,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} s.listed_names={id} function s.recfilter(c) - return not c:IsCode(id) and c:IsFaceup() and c:IsSetCard(0x114) + return not c:IsCode(id) and c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.recfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -47,14 +47,14 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + and ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x114) and c:IsDiscardable() + return c:IsSetCard(SET_FUR_HIRE) and c:IsDiscardable() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,4 +64,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15286412.lua b/official/c15286412.lua index b9233311ed..fd3dd2a53e 100644 --- a/official/c15286412.lua +++ b/official/c15286412.lua @@ -4,6 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x42,0x4b} +s.listed_series={SET_NORDIC,SET_AESIR} function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b)) and c:IsAbleToRemoveAsCost() + return c:IsFaceup() and c:IsSetCard({SET_NORDIC,SET_AESIR}) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -29,10 +30,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc~=e:GetHandler() end if chk==0 then e:SetLabel(0) - return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) + return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -48,15 +49,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.retop) e1:SetLabel(2) e1:SetLabelObject(e:GetLabelObject()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e1,tp) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() ct=ct-1 e:SetLabel(ct) if ct==0 then Duel.ReturnToField(e:GetLabelObject(),POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c15291624.lua b/official/c15291624.lua index 82e06a314b..78a3ebd7f3 100644 --- a/official/c15291624.lua +++ b/official/c15291624.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end function s.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_THUNDER) + return not (re:IsMonsterEffect() and re:GetHandler():IsRace(RACE_THUNDER) and (Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND)) end function s.hspfilter(c,tp,sc) @@ -66,7 +66,7 @@ function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c) end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) c:SetMaterial(g) g:DeleteGroup() end @@ -77,11 +77,11 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) end + and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c) end if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c) + local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c) Duel.Remove(g:GetFirst(),POS_FACEUP,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c15294090.lua b/official/c15294090.lua index 054d0c1c6a..4e00db1cc6 100644 --- a/official/c15294090.lua +++ b/official/c15294090.lua @@ -1,4 +1,5 @@ --デステニー・ミラージュ +--Destiny Mirage local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.cfilter(c,tp) - return c:IsPreviousSetCard(0xc008) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_DESTINY_HERO) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 and rp~=tp and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsReason(REASON_DESTROY) and c:GetTurnID()==Duel.GetTurnCount() and c:IsSetCard(0xc008) + return c:IsReason(REASON_DESTROY) and c:GetTurnID()==Duel.GetTurnCount() and c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15305240.lua b/official/c15305240.lua index d76d2fc678..06cb01278d 100644 --- a/official/c15305240.lua +++ b/official/c15305240.lua @@ -1,4 +1,5 @@ --鹵獲装置 +--Creature Seizure local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c1=g1:GetFirst() local c2=g2:GetFirst() Duel.SwapControl(c1,c2,0,0) -end +end \ No newline at end of file diff --git a/official/c15308295.lua b/official/c15308295.lua index 1720434631..19837c1ccf 100644 --- a/official/c15308295.lua +++ b/official/c15308295.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_CONTROL) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.ctcon) @@ -44,11 +44,11 @@ function s.initial_effect(c) e5:SetTarget(s.destg) e5:SetOperation(s.desop) c:RegisterEffect(e5) -end +end function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsAbleToChangeControler() + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsAbleToChangeControler() end -s.listed_series={0x10ec,0x20ec} +s.listed_series={SET_ABYSS_ACTOR,SET_ABYSS_SCRIPT} function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) @@ -85,7 +85,7 @@ function s.ctop2(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter(c) - return c:IsFacedown() and c:IsSpell() and c:IsSetCard(0x20ec) + return c:IsFacedown() and c:IsSpell() and c:IsSetCard(SET_ABYSS_SCRIPT) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -99,4 +99,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(p,1,1,nil) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15310033.lua b/official/c15310033.lua index 36fe3147bf..cc9c23cf54 100644 --- a/official/c15310033.lua +++ b/official/c15310033.lua @@ -1,4 +1,5 @@ --アンノウン・シンクロン +--Unknown Synchron local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,4 +18,4 @@ function s.spcon(e,c) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE,nil)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c15313433.lua b/official/c15313433.lua index 9a0bb1b40e..33cc24b6d6 100644 --- a/official/c15313433.lua +++ b/official/c15313433.lua @@ -1,4 +1,5 @@ --インフェルニティ・リフレクター +--Infernity Reflector local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE) + return c:IsSetCard(SET_INFERNITY) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end Duel.Damage(1-tp,1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15317640.lua b/official/c15317640.lua index ba8829084f..9033bca6d9 100644 --- a/official/c15317640.lua +++ b/official/c15317640.lua @@ -1,5 +1,5 @@ --巨大戦艦 カバード・コア ---B.E.S Covered Core +--B.E.S. Covered Core local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x1f) diff --git a/official/c15327215.lua b/official/c15327215.lua index 5ee4d8f915..58de02e0ba 100644 --- a/official/c15327215.lua +++ b/official/c15327215.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x103d,0x3d} +s.listed_series={SET_SECRET_SIX_SAMURAI,SET_SIX_SAMURAI} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x103d) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(SET_SECRET_SIX_SAMURAI) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x3d) and c:IsAbleToRemoveAsCost() + return c:IsLevelBelow(4) and c:IsSetCard(SET_SIX_SAMURAI) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end @@ -68,7 +68,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) @@ -83,4 +83,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetValue(def) c:RegisterEffect(e4) end -end +end \ No newline at end of file diff --git a/official/c1533292.lua b/official/c1533292.lua index 60d180eee3..369f2b13d8 100644 --- a/official/c1533292.lua +++ b/official/c1533292.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1002} +s.listed_series={SET_R_GENEX} function s.filter(c) - return c:GetLevel()==2 and c:IsSetCard(0x1002) and c:IsAbleToHand() + return c:GetLevel()==2 and c:IsSetCard(SET_R_GENEX) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c15341821.lua b/official/c15341821.lua index 80620719df..c528e827f6 100644 --- a/official/c15341821.lua +++ b/official/c15341821.lua @@ -1,6 +1,5 @@ --ダンディライオン --Dandylion - local s,id=GetID() function s.initial_effect(c) --Special summon 2 tokens to your field @@ -31,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) token:RegisterEffect(e1,true) end diff --git a/official/c15381252.lua b/official/c15381252.lua index aa1efdfba1..7f9f4b05bd 100644 --- a/official/c15381252.lua +++ b/official/c15381252.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and eg:GetFirst():GetControler()==tp and ev<=1500 and Duel.GetAttackTarget()==nil + return ep==1-tp and eg:GetFirst():IsControler(tp) and ev<=1500 and Duel.GetAttackTarget()==nil end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then diff --git a/official/c15381421.lua b/official/c15381421.lua index 3760f57903..96324914ab 100644 --- a/official/c15381421.lua +++ b/official/c15381421.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg2) e2:SetOperation(s.thop2) c:RegisterEffect(e2) @@ -36,7 +36,7 @@ function s.thcheck(sg,e,tp) return #sg>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,sg:GetSum(Card.GetOriginalLevel)) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.thcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.thcfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,1,#g,s.thcheck,0) end local sg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.thcheck,1,tp,HINTMSG_TOGRAVE,s.thcheck) e:SetLabel(sg:GetSum(Card.GetOriginalLevel)) @@ -69,4 +69,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15383415.lua b/official/c15383415.lua index d0e8bf18d5..7ab3ba07ab 100644 --- a/official/c15383415.lua +++ b/official/c15383415.lua @@ -1,4 +1,5 @@ --スカラベの大群 +--Swarm of Scarabs local s,id=GetID() function s.initial_effect(c) --turn set @@ -24,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15388353.lua b/official/c15388353.lua index 4fe602416d..fc87929b66 100644 --- a/official/c15388353.lua +++ b/official/c15388353.lua @@ -97,4 +97,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1539051.lua b/official/c1539051.lua index ff4f8e0e5c..5f7808b7f5 100644 --- a/official/c1539051.lua +++ b/official/c1539051.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1f} +s.listed_series={SET_NEO_SPACIAN} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x1f),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NEO_SPACIAN),tp,LOCATION_MZONE,0,nil) local ct=s.count_unique_code(g) e:SetLabel(ct) return ct>0 and Duel.IsPlayerCanDraw(tp,ct) @@ -26,7 +26,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x1f),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NEO_SPACIAN),tp,LOCATION_MZONE,0,nil) local ct=s.count_unique_code(g) Duel.Draw(p,ct,REASON_EFFECT) end @@ -43,4 +43,4 @@ function s.count_unique_code(g) end end return count -end +end \ No newline at end of file diff --git a/official/c15394083.lua b/official/c15394083.lua index 7f3ac786f7..a6bdec2fcd 100644 --- a/official/c15394083.lua +++ b/official/c15394083.lua @@ -24,10 +24,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x6042,TYPES_TOKEN,0,0,3,RACE_BEAST,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_NORDIC_BEAST,TYPES_TOKEN,0,0,3,RACE_BEAST,ATTRIBUTE_EARTH) then return end for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c15397015.lua b/official/c15397015.lua index e3df069319..2c7154f35f 100644 --- a/official/c15397015.lua +++ b/official/c15397015.lua @@ -1,5 +1,5 @@ --インスペクト・ボーダー ---Inspect Boarder +--Inspector Boarder local s,id=GetID() function s.initial_effect(c) --summon limit @@ -61,8 +61,8 @@ function s.typecount(c) return c:GetType()&TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM+TYPE_LINK end function s.aclimit1(e,tp,eg,ep,ev,re,r,rp) - if ep==1-tp or not re:IsActiveType(TYPE_MONSTER) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL+RESET_PHASE+PHASE_END,0,1) + if ep==1-tp or not re:IsMonsterEffect() then return end + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) end function s.aclimit2(e,tp,eg,ep,ev,re,r,rp) if ep~=tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end @@ -74,8 +74,8 @@ function s.econ1(e) return e:GetHandler():GetFlagEffect(id)>=ct end function s.aclimit3(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsActiveType(TYPE_MONSTER) then return end - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL+RESET_PHASE+PHASE_END,0,1) + if ep==tp or not re:IsMonsterEffect() then return end + e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) end function s.aclimit4(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end @@ -87,5 +87,5 @@ function s.econ2(e) return e:GetHandler():GetFlagEffect(id+1)>=ct end function s.elimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) -end + return re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c15419596.lua b/official/c15419596.lua index dcf532c115..fed8cd4546 100644 --- a/official/c15419596.lua +++ b/official/c15419596.lua @@ -71,5 +71,5 @@ function s.actcon(e) end function s.aclimit(e,re,tp) local tc=re:GetHandler() - return tc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetColumnGroup():IsContains(tc) + return tc:IsLocation(LOCATION_MZONE) and re:IsMonsterEffect() and e:GetHandler():GetColumnGroup():IsContains(tc) end \ No newline at end of file diff --git a/official/c15443125.lua b/official/c15443125.lua index e32c3890f7..a9f133fb03 100644 --- a/official/c15443125.lua +++ b/official/c15443125.lua @@ -1,5 +1,5 @@ --スプライト・スターター ---Splight Starter +--Spright Starter --Scripted by Zefile local s,id=GetID() function s.initial_effect(c) @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x181} +s.listed_series={SET_SPRIGHT} function s.filter(c,e,tp) - return c:IsSetCard(0x181) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPRIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) diff --git a/official/c15447747.lua b/official/c15447747.lua index 12a68a7fb7..a4b65d9145 100644 --- a/official/c15447747.lua +++ b/official/c15447747.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCondition(s.lkcon) e2:SetCost(s.lkcost) e2:SetTarget(s.lktg) @@ -28,26 +28,26 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) e3:SetCondition(s.atkcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} function s.lkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.lkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.lkfilter(c,mg) - return c:IsSetCard(0x120) and c:IsLinkSummonable(nil,mg) + return c:IsSetCard(SET_PRANK_KIDS) and c:IsLinkSummonable(nil,mg) end function s.lktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local el={} - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x120),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_PRANK_KIDS),tp,LOCATION_MZONE,0,nil) return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) @@ -56,7 +56,7 @@ function s.lkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local el={} - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x120),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_PRANK_KIDS),tp,LOCATION_MZONE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local xg=Duel.SelectMatchingCard(tp,s.lkfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg) local tc=xg:GetFirst() @@ -68,7 +68,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end function s.tdfilter(c) - return c:IsSetCard(0x120) and c:IsAbleToDeck() + return c:IsSetCard(SET_PRANK_KIDS) and c:IsAbleToDeck() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end @@ -81,13 +81,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local ct=math.min(#g,math.floor(tc:GetAttack()/100)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,1,ct,nil) - if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>0 and tc:IsFaceup() and tc:IsRelateToBattle() then + if Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsFaceup() and tc:IsRelateToBattle() then local oc=#(Duel.GetOperatedGroup()) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(oc*-100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c15449853.lua b/official/c15449853.lua index 3eec80d3ee..beaff83b6c 100644 --- a/official/c15449853.lua +++ b/official/c15449853.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_SZONE|LOCATION_GRAVE) e2:SetValue(CARD_SANCTUARY_SKY) c:RegisterEffect(e2) --atk/def increase @@ -71,4 +71,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT)==0 then return end local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK) if ct>0 then Duel.SortDecktop(tp,tp,ct) end -end +end \ No newline at end of file diff --git a/official/c15452043.lua b/official/c15452043.lua index 914b0b4701..0e5951a1a1 100644 --- a/official/c15452043.lua +++ b/official/c15452043.lua @@ -1,4 +1,5 @@ --EMソード・フィッシュ +--Performapal Sword Fish local s,id=GetID() function s.initial_effect(c) --addown @@ -32,10 +33,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c15458892.lua b/official/c15458892.lua index 6ad1be1b24..435f37a6b5 100644 --- a/official/c15458892.lua +++ b/official/c15458892.lua @@ -1,4 +1,5 @@ --スターシップ・スパイ・プレーン +--Starship Spy Plane local s,id=GetID() function s.initial_effect(c) --special summon @@ -45,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1546123.lua b/official/c1546123.lua index da47f83038..c976289f77 100644 --- a/official/c1546123.lua +++ b/official/c1546123.lua @@ -11,4 +11,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) end -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} \ No newline at end of file diff --git a/official/c1546124.lua b/official/c1546124.lua deleted file mode 100644 index cc62a1e9be..0000000000 --- a/official/c1546124.lua +++ /dev/null @@ -1,13 +0,0 @@ ---サイバー・エンド・ドラゴン ---Cyber End Dragon -local s,id=GetID() -function s.initial_effect(c) - --fusion material - c:EnableReviveLimit() - Fusion.AddProcMixN(c,false,false,CARD_CYBER_DRAGON,3) - --pierce - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_PIERCE) - c:RegisterEffect(e2) -end diff --git a/official/c15462014.lua b/official/c15462014.lua index 5716cd0291..fd715fffd0 100644 --- a/official/c15462014.lua +++ b/official/c15462014.lua @@ -1,7 +1,6 @@ --龍馬躓図 --Hollow Giants --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c15464375.lua b/official/c15464375.lua index d3d19425a0..ac107b29d6 100644 --- a/official/c15464375.lua +++ b/official/c15464375.lua @@ -1,9 +1,9 @@ --- 水月のアデュラリア --- Adularia of the Moonlit Water --- Scripted by Hatter +--水月のアデュラリア +--Adularia of the June Moon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Gain ATK/DEF + --Gain ATK/DEF local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -23,7 +23,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) - -- Send 1 Level 4 or lower monster to the GY + --Send 1 Level 4 or lower monster to the GY local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetCategory(CATEGORY_TOGRAVE) diff --git a/official/c15471265.lua b/official/c15471265.lua index 8ca6029103..1e5c65eff2 100644 --- a/official/c15471265.lua +++ b/official/c15471265.lua @@ -1,4 +1,5 @@ --バーサーカークラッシュ +--Berserker Crush local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,23 +9,20 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_names={57116033} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) e:SetLabelObject(g:GetFirst()) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -40,18 +38,18 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local rc=e:GetLabelObject() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(rc:GetTextAttack()) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(rc:GetTextDefense()) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c15475415.lua b/official/c15475415.lua index c67e7691cd..7d41a25275 100644 --- a/official/c15475415.lua +++ b/official/c15475415.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.ctop) c:RegisterEffect(e2) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst():IsSetCard(0xc) + return ep==tp and eg:GetFirst():IsSetCard(SET_ALIEN) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,4 +49,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) sg:GetFirst():AddCounter(COUNTER_A,1) end -end +end \ No newline at end of file diff --git a/official/c15495787.lua b/official/c15495787.lua index f18959b4ab..0368a768c2 100644 --- a/official/c15495787.lua +++ b/official/c15495787.lua @@ -1,6 +1,5 @@ --超重武者ココロガマ-A --Superheavy Samurai Prepped Defense - local s,id=GetID() function s.initial_effect(c) --Cannot be normal or flip summoned while you have a spell/trap in GY @@ -47,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c15502037.lua b/official/c15502037.lua index 85dc33afa6..2dbd71ba5c 100644 --- a/official/c15502037.lua +++ b/official/c15502037.lua @@ -1,4 +1,5 @@ --電磁石の戦士γ +--Gamma The Electromagnet Warrior local s,id=GetID() function s.initial_effect(c) --to hand @@ -24,15 +25,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x2066} +s.listed_series={SET_MAGNET_WARRIOR} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x2066) and not c:IsCode(id) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGNET_WARRIOR) and not c:IsCode(id) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,14 +49,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2066) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -71,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c15520842.lua b/official/c15520842.lua index ed589e4209..b064713d1c 100644 --- a/official/c15520842.lua +++ b/official/c15520842.lua @@ -1,33 +1,29 @@ --フォトン・ハンド --Photon Hand --- local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) + return c:IsFaceup() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c,tp,ged) return (ged or (c:IsFaceup() and c:IsType(TYPE_XYZ))) and c:IsControlerCanBeChanged() end @@ -44,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c15521027.lua b/official/c15521027.lua index 2abc892298..daa7bdeccf 100644 --- a/official/c15521027.lua +++ b/official/c15521027.lua @@ -37,9 +37,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.roll_dice=true -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.spfilter(c,tp) - return c:IsSetCard(0x26) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcon(e,c) @@ -72,7 +72,7 @@ function s.tga(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) end function s.filter(c) - return c:IsSetCard(0x26) and c:IsAbleToHand() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsAbleToHand() end function s.opa(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end @@ -105,4 +105,4 @@ function s.opd(e,tp,eg,ep,ev,re,r,rp) Duel.SortDecktop(tp,tp,ct) if op==0 then return end Duel.MoveToDeckBottom(ct,tp) -end +end \ No newline at end of file diff --git a/official/c15543940.lua b/official/c15543940.lua index 0a2bc868b7..22c7221bf5 100644 --- a/official/c15543940.lua +++ b/official/c15543940.lua @@ -3,11 +3,11 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x11a),Fusion.OnFieldMat,nil,nil,nil,s.stage2) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DINOWRESTLER),Fusion.OnFieldMat,nil,nil,nil,s.stage2) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.stage2(e,tc,tp,mg,chk) if chk==1 then local e1=Effect.CreateEffect(e:GetHandler()) @@ -17,17 +17,16 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetCountLimit(1) e1:SetLabelObject(tc) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end function s.valcon(e,re,r,rp) local tc=e:GetLabelObject() if tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) return r&REASON_BATTLE+REASON_EFFECT~=0 else return false end -end - +end \ No newline at end of file diff --git a/official/c15545291.lua b/official/c15545291.lua index 8dd687098a..9df2139c88 100644 --- a/official/c15545291.lua +++ b/official/c15545291.lua @@ -1,4 +1,5 @@ --剛地帝グランマーグ +--Granmarg the Mega Monarch local s,id=GetID() function s.initial_effect(c) --summon with 1 tribute @@ -23,10 +24,10 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.desfilter(c) return c:IsFacedown() @@ -63,4 +64,4 @@ function s.valcheck(e,c) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c15552258.lua b/official/c15552258.lua index cc8ae9dbbb..e13d1da8b7 100644 --- a/official/c15552258.lua +++ b/official/c15552258.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()0 and c:IsSetCard(0x2016) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return lv>0 and c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c,lv) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,9 +34,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then if not s.check then return false end s.check=false - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) local lv=g:GetFirst():GetLevel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -50,13 +51,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(lv*500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c15561463.lua b/official/c15561463.lua index d820109997..c424904e5c 100644 --- a/official/c15561463.lua +++ b/official/c15561463.lua @@ -1,4 +1,5 @@ --ガントレット・シューター +--Gauntlet Launcher local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -32,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1557341.lua b/official/c1557341.lua index d3b5e0c4fb..2a2206062c 100644 --- a/official/c1557341.lua +++ b/official/c1557341.lua @@ -26,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15574615.lua b/official/c15574615.lua index 4c4b775807..9e1d23e09c 100644 --- a/official/c15574615.lua +++ b/official/c15574615.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -44,7 +44,7 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local rg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) local g1=rg:Filter(Card.IsCode,nil,80208158) local g2=rg:Filter(Card.IsCode,nil,16796157) local g3=rg:Filter(Card.IsCode,nil,43791861) @@ -57,7 +57,7 @@ function s.spcon(e,c) and aux.SelectUnselectGroup(g,e,tp,4,4,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_MZONE,0,nil):Filter(Card.IsCode,nil,80208158,16796157,43791861,79185500) + local rg=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_MZONE,0,nil):Filter(Card.IsCode,nil,80208158,16796157,43791861,79185500) local g=aux.SelectUnselectGroup(rg,e,tp,4,4,s.rescon,1,tp,HINTMSG_TOGRAVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -72,10 +72,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.SendtoGrave(g,REASON_COST) g:DeleteGroup() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -107,4 +103,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if #g>ft then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c1557499.lua b/official/c1557499.lua index ccaf7c50b1..f8571ce9a1 100644 --- a/official/c1557499.lua +++ b/official/c1557499.lua @@ -15,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c15576074.lua b/official/c15576074.lua index cc34113ede..dd198be819 100644 --- a/official/c15576074.lua +++ b/official/c15576074.lua @@ -1,4 +1,5 @@ --リゾネーター・エンジン +--Resonator Engine local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.filter(c) - return c:IsSetCard(0x57) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_RESONATOR) and c:IsMonster() and c:IsAbleToDeck() end function s.filter2(c) return c:GetLevel()==4 and c:IsAbleToHand() @@ -36,6 +37,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end local g=Duel.GetTargetCards(e) if #g~=0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15582767.lua b/official/c15582767.lua index 4f8fa745e2..3710df61b6 100644 --- a/official/c15582767.lua +++ b/official/c15582767.lua @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15590355.lua b/official/c15590355.lua index c1a49ebaf6..f9837d9d82 100644 --- a/official/c15590355.lua +++ b/official/c15590355.lua @@ -63,4 +63,4 @@ function s.tknop(e,tp,eg,ep,ev,re,r,rp) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c15595052.lua b/official/c15595052.lua index eae96d91ce..4893073c8b 100644 --- a/official/c15595052.lua +++ b/official/c15595052.lua @@ -32,7 +32,7 @@ function s.ancop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.destg) e1:SetOperation(s.desop) e1:SetLabel(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -47,4 +47,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() and bc:IsFaceup() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15605085.lua b/official/c15605085.lua index 7adbb35066..744338b0c0 100644 --- a/official/c15605085.lua +++ b/official/c15605085.lua @@ -1,4 +1,5 @@ --ソーラー・ジェネクス +--Genex Solar local s,id=GetID() function s.initial_effect(c) --summon with 1 tribute @@ -16,12 +17,12 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.otfilter(c,tp) - return c:IsSetCard(0x2) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_GENEX) and (c:IsControler(tp) or c:IsFaceup()) end function s.cfilter(c,tp) - return c:IsSetCard(0x2) and c:IsPreviousControler(tp) and c:GetPreviousLocation()==LOCATION_MZONE + return c:IsSetCard(SET_GENEX) and c:IsPreviousControler(tp) and c:GetPreviousLocation()==LOCATION_MZONE and c:IsPreviousPosition(POS_FACEUP) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -36,4 +37,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15609017.lua b/official/c15609017.lua index 0bf1c36c5f..8387cd3959 100644 --- a/official/c15609017.lua +++ b/official/c15609017.lua @@ -1,4 +1,5 @@ --ヒドゥン・ショット +--Shock Surprise local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.costfilter(c) - return c:IsSetCard(0x2016) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.rescon(sg,e,tp,mg) local ct=#sg @@ -29,7 +30,7 @@ function s.rescon(sg,e,tp,mg) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - local rg=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chkc then return chkc:IsOnField() and chkc~=c end if chk==0 then if e:GetLabel()==1 then @@ -48,4 +49,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15610297.lua b/official/c15610297.lua index e136542638..ac0b301fbc 100644 --- a/official/c15610297.lua +++ b/official/c15610297.lua @@ -46,10 +46,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET,0,1) local bc=c:GetBattleTarget() if c:IsLocation(LOCATION_SZONE) and bc:IsRelateToBattle() and bc:IsFaceup() then bc:AddCounter(0x1038,1) @@ -57,7 +57,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCondition(s.condition) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE) diff --git a/official/c1561110.lua b/official/c1561110.lua index f59fded27e..f9ada56fa3 100644 --- a/official/c1561110.lua +++ b/official/c1561110.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e4:SetCondition(s.spcon2) - e4:SetCost(s.spcost2) + e4:SetCost(Cost.SelfTribute) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) c:RegisterEffect(e4) @@ -42,14 +42,14 @@ function s.matfil(c,tp) return c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,false,true)) end function s.contactfil(tp) - return Duel.GetMatchingGroup(s.matfil,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp) + return Duel.GetMatchingGroup(s.matfil,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil,tp) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end @@ -65,11 +65,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) @@ -101,4 +97,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c15627227.lua b/official/c15627227.lua index 0c768a541b..b56b51e21a 100644 --- a/official/c15627227.lua +++ b/official/c15627227.lua @@ -1,12 +1,11 @@ --リローダー・ドラゴン --Overburst Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Link summon procedure - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x102),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ROKKET),2,2) --Special summon 1 "Rokket" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -30,8 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x102} - +s.listed_series={SET_ROKKET} function s.spfilter1(c,e,tp) if c:IsFaceup() and c:IsLinkMonster() then local zone=c:GetLinkedZone(tp) @@ -39,7 +37,7 @@ function s.spfilter1(c,e,tp) else return false end end function s.spfilter2(c,e,tp,zone) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -52,7 +50,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local lc=Duel.GetFirstTarget() - if lc and lc:IsRelateToEffect(e) and lc:IsFaceup() then + if lc:IsRelateToEffect(e) and lc:IsFaceup() then local zone=lc:GetLinkedZone(tp) if zone==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -65,11 +63,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) --Destroyed during end phase local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -96,10 +94,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousControler(tp) and r&0x21==0x21 + return c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x102) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_ROKKET) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -110,7 +108,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c15629801.lua b/official/c15629801.lua index 06cc9e292e..c1d58a2f2d 100644 --- a/official/c15629801.lua +++ b/official/c15629801.lua @@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -59,11 +59,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_NO_BATTLE_DAMAGE) e6:SetValue(1) - e6:SetReset(RESET_EVENT+RESETS_STANDARD) + e6:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e6) local e7=e6:Clone() e7:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) token:RegisterEffect(e7) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c15653824.lua b/official/c15653824.lua index 783c9e396f..ed3a5653b4 100644 --- a/official/c15653824.lua +++ b/official/c15653824.lua @@ -1,4 +1,5 @@ --スカル・ナイト +--Skull Knight #2 local s,id=GetID() function s.initial_effect(c) --spsummon @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15658249.lua b/official/c15658249.lua index 8573a0f7ea..0ad569dfec 100644 --- a/official/c15658249.lua +++ b/official/c15658249.lua @@ -1,4 +1,5 @@ --ワーム・バルサス +--Worm Barses local s,id=GetID() function s.initial_effect(c) --position @@ -24,4 +25,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsDefensePos() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c15661378.lua b/official/c15661378.lua index 75414889f4..22fb1d509b 100644 --- a/official/c15661378.lua +++ b/official/c15661378.lua @@ -31,7 +31,7 @@ function s.fusfilter(c,code,fc,tp) end function s.matfilter(c,fc,sub,sub2,mg,sg,tp,contact,sumtype) if sumtype&SUMMON_TYPE_FUSION~=0 and fc:IsLocation(LOCATION_EXTRA) and not contact then - return c:IsLocation(LOCATION_ONFIELD+LOCATION_HAND) and c:IsControler(tp) + return c:IsLocation(LOCATION_ONFIELD|LOCATION_HAND) and c:IsControler(tp) end return true end @@ -42,7 +42,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(s.filteraux,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION @@ -58,7 +58,7 @@ function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_DECK|LOCATION_EXTRA) end function s.remop(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_DECK,0,nil) @@ -76,4 +76,4 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) Duel.ShuffleExtra(1-tp) end -end +end \ No newline at end of file diff --git a/official/c15667446.lua b/official/c15667446.lua index 3e3b8ad7f2..df5444f5a3 100644 --- a/official/c15667446.lua +++ b/official/c15667446.lua @@ -1,4 +1,5 @@ --暗黒界の闘神 ラチナ +--Latinum, Exarch of Dark World local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.atfilter(c) return c:IsFaceup() and c:IsRace(RACE_FIEND) @@ -40,8 +41,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c1566817.lua b/official/c1566817.lua index 652190c603..0190174a66 100644 --- a/official/c1566817.lua +++ b/official/c1566817.lua @@ -23,15 +23,15 @@ function s.initial_effect(c) end function s.efilter(e,te) local c,tc=e:GetHandler(),te:GetHandler() - return te:IsActiveType(TYPE_MONSTER) and (not tc:HasLevel() or tc:GetLevel()>c:GetLevel()) + return te:IsMonsterEffect() and (not tc:HasLevel() or tc:GetLevel()>c:GetLevel()) end function s.cfilter(c) return c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,3,e:GetHandler()) + local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,3,e:GetHandler()) Duel.Remove(cg,POS_FACEUP,REASON_COST) e:SetLabel(#cg) end @@ -43,7 +43,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c15684835.lua b/official/c15684835.lua index 61a7e55513..88ed198626 100644 --- a/official/c15684835.lua +++ b/official/c15684835.lua @@ -1,4 +1,5 @@ --イービル・ブラスト +--Evil Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,20 +35,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetCondition(s.damcon) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Atkup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -56,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) @@ -66,7 +67,7 @@ function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -78,4 +79,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c15693423.lua b/official/c15693423.lua index 3b7dc59773..f6340a37a6 100644 --- a/official/c15693423.lua +++ b/official/c15693423.lua @@ -45,4 +45,4 @@ end function s.handcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0 and Duel.GetFieldGroupCount(1-e:GetHandlerPlayer(),LOCATION_ONFIELD,0)>1 -end +end \ No newline at end of file diff --git a/official/c15710054.lua b/official/c15710054.lua index 37e5f09fd4..e288ec6576 100644 --- a/official/c15710054.lua +++ b/official/c15710054.lua @@ -2,7 +2,7 @@ --Krawler Axon local s,id=GetID() function s.initial_effect(c) - --flip + --Destroy 1 monster on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) - --spsummon + --Special Summon 2 "Krawler" monsters with different names from your Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -26,12 +26,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -46,7 +46,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c15717011.lua b/official/c15717011.lua index 6342b0009d..b3f2b50ac1 100644 --- a/official/c15717011.lua +++ b/official/c15717011.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.subcon(e) - return e:GetHandler():IsLocation(0x1e) + return e:GetHandler():IsLocation(LOCATION_GRAVE|LOCATION_SZONE|LOCATION_MZONE|LOCATION_HAND) end function s.filter(c,e,tp,m,gc,chkf) return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_LIGHT) diff --git a/official/c1571945.lua b/official/c1571945.lua index f39afe5511..9ba6fa0dc0 100644 --- a/official/c1571945.lua +++ b/official/c1571945.lua @@ -27,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsDefensePos() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15721123.lua b/official/c15721123.lua index 1609377142..d704c7ef65 100644 --- a/official/c15721123.lua +++ b/official/c15721123.lua @@ -1,4 +1,5 @@ --対峙するG +--Confronting the "C" local s,id=GetID() function s.initial_effect(c) --special summon @@ -34,14 +35,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end function s.efilter(e,te) - if not te:IsActiveType(TYPE_MONSTER) then return false end + if not te:IsMonsterEffect() then return false end local c=e:GetHandler() local ec=te:GetHandler() if ec:IsHasCardTarget(c) then return true end return te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te) -end +end \ No newline at end of file diff --git a/official/c15721392.lua b/official/c15721392.lua index 4d921986bf..00413a1c6a 100644 --- a/official/c15721392.lua +++ b/official/c15721392.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x20dc,0x10dc} +s.listed_series={SET_SUPER_QUANTAL_MECH_BEAST,SET_SUPER_QUANTUM} --Check for "Super Quant" function s.confilter(c,tp) - return c:IsReason(REASON_BATTLE) and c:IsPreviousSetCard(0xdc) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE) and c:IsPreviousSetCard(SET_SUPER_QUANT) and c:IsPreviousControler(tp) end --If it ever happened function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -26,11 +26,11 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end --Check for "Super Quantal Mech Beast" function s.exfilter(c,e,tp,rp) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x20dc) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Check for "Super Quantum" to special summon function s.spfilter(c,e,tp,xc) - if not (c:IsSetCard(0x10dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end + if not (c:IsSetCard(SET_SUPER_QUANTUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end for _,code in ipairs(xc.listed_names) do if c:IsCode(code) then return true end end @@ -40,7 +40,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end --Performing the effect of special summoning function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.exfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not tc.listed_names then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,tc) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,tc) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -57,14 +57,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c15735108.lua b/official/c15735108.lua index 45cacc3e63..b6090cf718 100644 --- a/official/c15735108.lua +++ b/official/c15735108.lua @@ -75,4 +75,4 @@ function s.opsumop(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then s.activate(e,1-tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c15744417.lua b/official/c15744417.lua index beddda15b1..b668bde46d 100644 --- a/official/c15744417.lua +++ b/official/c15744417.lua @@ -14,7 +14,6 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.roll_dice=true - function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,3) @@ -34,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -47,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -64,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c15754711.lua b/official/c15754711.lua index df4daa127b..e43622480a 100644 --- a/official/c15754711.lua +++ b/official/c15754711.lua @@ -1,7 +1,6 @@ --ドラゴンメイドのお見送り --Dragonmaid Send-Off --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special Summon 1 "Dragonmaid" monster from hand @@ -16,14 +15,13 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x133} - +s.listed_series={SET_DRAGONMAID} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x133) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DRAGONMAID) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x133) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DRAGONMAID) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -47,15 +45,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) g:GetFirst():RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) g:GetFirst():RegisterEffect(e2) - g:GetFirst():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,0)) + g:GetFirst():RegisterFlagEffect(0,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(id,0)) end if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.SendtoHand(tc,tp,REASON_EFFECT) diff --git a/official/c15758127.lua b/official/c15758127.lua index 3b9a4decaa..e18519bb32 100644 --- a/official/c15758127.lua +++ b/official/c15758127.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e3:SetCost(s.cost) + e3:SetCost(Cost.PayLP(700)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -63,10 +63,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_RULE,1-tp) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,700) end - Duel.PayLPCost(tp,700) -end function s.thfilter(c) return c:IsSetCard(SET_URSARCTIC) and c:IsMonster() and c:IsAbleToHand() end diff --git a/official/c15767889.lua b/official/c15767889.lua index 0bbe4c6df4..30792fb01b 100644 --- a/official/c15767889.lua +++ b/official/c15767889.lua @@ -36,4 +36,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c15771991.lua b/official/c15771991.lua index 6396b8f5f2..c27df566e8 100644 --- a/official/c15771991.lua +++ b/official/c15771991.lua @@ -43,7 +43,7 @@ end s.listed_names={id,CARD_RA} --If player took battle or effect damage function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and r&(REASON_BATTLE+REASON_EFFECT)~=0 + return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)~=0 end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -69,14 +69,14 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(val) c:RegisterEffect(e1) end end --Check if it was sent from the hand or field function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end --Check for 1 spell/trap that specifically lists "The Winged Dragon of Ra" function s.thfilter(c) diff --git a/official/c15792576.lua b/official/c15792576.lua index bfccb13a72..c840a8f3ee 100644 --- a/official/c15792576.lua +++ b/official/c15792576.lua @@ -1,7 +1,6 @@ --天魔神 シドヘルズ ---Sky Scourge Sidherz +--Sky Scourge Cidhels --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -17,7 +16,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE)end) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsTributeSummoned()end) e1:SetTarget(s.target) c:RegisterEffect(e1) --Check the type/attribute of the monster for its tribute summon @@ -91,4 +90,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) g1:Merge(g2) local sg=aux.SelectUnselectGroup(g1,e,tp,1,2,s.ctcheck,1,tp,HINTMSG_TOGRAVE) if #sg>0 then Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15800838.lua b/official/c15800838.lua index 882eadec17..d5efd15c14 100644 --- a/official/c15800838.lua +++ b/official/c15800838.lua @@ -1,4 +1,5 @@ --マインドクラッシュ +--Mind Crush local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,10 +25,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) else local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local dg=sg:RandomSelect(tp,1) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c1580833.lua b/official/c1580833.lua index 74534ef89a..85815bac1c 100644 --- a/official/c1580833.lua +++ b/official/c1580833.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_DINOMIST) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,7 +39,7 @@ function s.repval(e,c) return s.filter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15808381.lua b/official/c15808381.lua index 5bdf6a86cf..84ff6b0e33 100644 --- a/official/c15808381.lua +++ b/official/c15808381.lua @@ -27,15 +27,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.descon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.thfilter(c) - return c:IsSetCard(0x135) and c:IsMonster() and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_IGNISTER) and c:IsMonster() and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -71,5 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsControler(tp) and tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c15839054.lua b/official/c15839054.lua index ea8e576462..299116cc0a 100644 --- a/official/c15839054.lua +++ b/official/c15839054.lua @@ -1,4 +1,5 @@ --シンクロ・フュージョニスト +--Synchro Fusionist local s,id=GetID() function s.initial_effect(c) --search @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x46} +s.listed_series={SET_FUSION} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end function s.filter(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c15844566.lua b/official/c15844566.lua index ff9a4465fc..f30e036c9d 100644 --- a/official/c15844566.lua +++ b/official/c15844566.lua @@ -45,14 +45,14 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -75,9 +75,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(atk*2) c:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c15845914.lua b/official/c15845914.lua index 1e2128be86..d919119b07 100644 --- a/official/c15845914.lua +++ b/official/c15845914.lua @@ -35,4 +35,4 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=25 -end +end \ No newline at end of file diff --git a/official/c15848542.lua b/official/c15848542.lua index bd3456614e..4b1693e5fb 100644 --- a/official/c15848542.lua +++ b/official/c15848542.lua @@ -1,7 +1,6 @@ --ドラゴンメイド・ルフト --Dragonmaid Lorpar --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot activate its effects @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,19 +26,14 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} - -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_DRAGONMAID} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsType(TYPE_EFFECT) end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsType,TYPE_EFFECT),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -57,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -65,7 +59,7 @@ function s.incon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_FUSION),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsLevel(3) and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevel(3) and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c15854426.lua b/official/c15854426.lua index 8cf6c1854b..3f4ddf842b 100644 --- a/official/c15854426.lua +++ b/official/c15854426.lua @@ -1,4 +1,5 @@ --霞の谷の神風 +--Divine Wind of Mist Valley local s,id=GetID() function s.initial_effect(c) --Activate @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15862758.lua b/official/c15862758.lua index 03dfa7aaab..94cc48293c 100644 --- a/official/c15862758.lua +++ b/official/c15862758.lua @@ -1,5 +1,5 @@ --CiNo.1000 夢幻虚光神ヌメロニアス・ヌメロニア ---Number iC1000: Numeronius Numeronia +--Number iC1000: Numerounius Numerounia --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -48,7 +48,7 @@ function s.initial_effect(c) e7:SetCode(EVENT_ATTACK_ANNOUNCE) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.nacon) - e7:SetCost(s.nacost) + e7:SetCost(Cost.Detach(1)) e7:SetTarget(s.natg) e7:SetOperation(s.naop) c:RegisterEffect(e7,false,REGISTER_FLAG_DETACH_XMAT) @@ -73,10 +73,6 @@ end function s.nacon(e,tp,eg,ep,ev,re,r,rp) return not Duel.GetAttacker():IsControler(tp) end -function s.nacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsOnField() end Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,Duel.GetAttacker():GetAttack()) @@ -85,4 +81,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then Duel.Recover(tp,Duel.GetAttacker():GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1586457.lua b/official/c1586457.lua index a777eea932..5d87237da1 100644 --- a/official/c1586457.lua +++ b/official/c1586457.lua @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.SendtoGrave(g,REASON_COST) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c15893860.lua b/official/c15893860.lua index ab889323b9..8e3e75faf3 100644 --- a/official/c15893860.lua +++ b/official/c15893860.lua @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15894048.lua b/official/c15894048.lua index 47434bca78..6744cbc2fa 100644 --- a/official/c15894048.lua +++ b/official/c15894048.lua @@ -1,4 +1,5 @@ --究極恐獣 +--Ultimate Tyranno local s,id=GetID() function s.initial_effect(c) --attack @@ -26,6 +27,5 @@ function s.cfilter(c) return #ag>0 or direct end function s.cacon(e) - return Duel.GetCurrentPhase()>PHASE_MAIN1 and Duel.GetCurrentPhase()0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c15943341.lua b/official/c15943341.lua index 04a81621c2..d4a2e83032 100644 --- a/official/c15943341.lua +++ b/official/c15943341.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.dmgcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.dmgop) c:RegisterEffect(e2) end diff --git a/official/c15947754.lua b/official/c15947754.lua index 2b140b1329..2c3e3f9c1a 100644 --- a/official/c15947754.lua +++ b/official/c15947754.lua @@ -85,4 +85,4 @@ function s.callop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c15951532.lua b/official/c15951532.lua index 1c53102a50..b4ed66b7cf 100644 --- a/official/c15951532.lua +++ b/official/c15951532.lua @@ -1,4 +1,5 @@ --アマゾネス女王 +--Amazoness Queen local s,id=GetID() function s.initial_effect(c) --indes @@ -7,8 +8,8 @@ function s.initial_effect(c) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_AMAZONESS)) e1:SetValue(1) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} \ No newline at end of file diff --git a/official/c15960641.lua b/official/c15960641.lua index b9b017d32b..a2080bde50 100644 --- a/official/c15960641.lua +++ b/official/c15960641.lua @@ -1,4 +1,5 @@ --ミラージュ・ドラゴン +--Mirage Dragon local s,id=GetID() function s.initial_effect(c) --act limit @@ -13,8 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.con(e) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.aclimit(e,re,tp) return re:GetHandler():IsTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) diff --git a/official/c1596508.lua b/official/c1596508.lua index 6726c84ebb..571e452364 100644 --- a/official/c1596508.lua +++ b/official/c1596508.lua @@ -17,4 +17,4 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(1,1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c15978426.lua b/official/c15978426.lua index fbb09efabb..b88d22e501 100644 --- a/official/c15978426.lua +++ b/official/c15978426.lua @@ -16,10 +16,10 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} s.listed_names={} function s.filter(c,tohand) - return c:IsSetCard(0x9f) and not c:IsCode(id) and c:IsMonster() + return c:IsSetCard(SET_PERFORMAPAL) and not c:IsCode(id) and c:IsMonster() and (c:IsAbleToGrave() or (tohand and c:IsAbleToHand())) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +40,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c15981690.lua b/official/c15981690.lua index 1f41f03276..435f7da265 100644 --- a/official/c15981690.lua +++ b/official/c15981690.lua @@ -1,4 +1,5 @@ --カーボネドン +--Carboneddon local s,id=GetID() function s.initial_effect(c) --atk up @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -33,7 +34,7 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(1000) c:RegisterEffect(e1) end @@ -43,14 +44,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c15983048.lua b/official/c15983048.lua index 275ed1d5b9..75f2687f7d 100644 --- a/official/c15983048.lua +++ b/official/c15983048.lua @@ -1,5 +1,5 @@ --大魔鍵-マフテアル ---Greater Magikey - Mafteahl +--Maginificent Magikey Mafteal --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -35,14 +35,14 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.matlimit(e,c) if not c then return false end - return not c:IsSetCard(0x167) + return not c:IsSetCard(SET_MAGIKEY) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerCanAdditionalSummon(tp) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x167),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MAGIKEY),tp,LOCATION_MZONE,0,1,nil) end function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -58,14 +58,14 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,2)) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x167)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MAGIKEY)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x167)) + return c:IsLevelBelow(4) and (c:IsType(TYPE_NORMAL) or c:IsSetCard(SET_MAGIKEY)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c15989522.lua b/official/c15989522.lua index 672cdb2065..6dfa92c315 100644 --- a/official/c15989522.lua +++ b/official/c15989522.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion summon procedure c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xbd),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GAIA_THE_FIERCE_KNIGHT),s.matfilter) --Change name local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,id) e2:SetCondition(s.descon) e2:SetTarget(s.destg) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} s.listed_names={CARD_GAIA_CHAMPION} function s.matfilter(c,fc,sumtype,tp) return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsLevel(5) @@ -58,7 +58,7 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and c:UpdateAttack(-2600,RESET_EVENT+RESETS_STANDARD,c)==-2600 then + if c:IsRelateToEffect(e) and c:UpdateAttack(-2600,RESET_EVENT|RESETS_STANDARD,c)==-2600 then if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end @@ -71,7 +71,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16001119.lua b/official/c16001119.lua index 64043e062a..634fa093b5 100644 --- a/official/c16001119.lua +++ b/official/c16001119.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x148} +s.listed_series={SET_POTAN} function s.tnfilter(c) - return c:IsFaceup() and c:IsSetCard(0x148) and not c:IsType(TYPE_TUNER) + return c:IsFaceup() and c:IsSetCard(SET_POTAN) and not c:IsType(TYPE_TUNER) end function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -46,7 +46,7 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end @@ -54,18 +54,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_SYNCHRO) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x148) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_POTAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16003979.lua b/official/c16003979.lua index ca8738f5d9..325d3a44ac 100644 --- a/official/c16003979.lua +++ b/official/c16003979.lua @@ -20,10 +20,10 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -50,11 +50,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsCanBeSpecialSummoned(e,104,tp,false,false) end @@ -71,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,104,tp,tp,false,false,POS_FACEUP) tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c16006416.lua b/official/c16006416.lua index f7a687931b..b123763080 100644 --- a/official/c16006416.lua +++ b/official/c16006416.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcFun2(c,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf),true) + Fusion.AddProcFun2(c,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),true) --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -35,19 +35,19 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xaf} -s.material_setcode={0xaf} +s.listed_series={SET_DD} +s.material_setcode={SET_DD} function s.matfilter(c,fc,sumtype,tp) - return c:IsSetCard(0xaf,fc,sumtype,tp) and c:IsLevelAbove(5) + return c:IsSetCard(SET_DD,fc,sumtype,tp) and c:IsLevelAbove(5) end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + return Duel.IsTurnPlayer(tp) and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -72,4 +72,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) -end +end \ No newline at end of file diff --git a/official/c16008155.lua b/official/c16008155.lua index ee6842029c..2b02fc08ad 100644 --- a/official/c16008155.lua +++ b/official/c16008155.lua @@ -1,4 +1,5 @@ --レプティレス・サーヴァント +--Reptilianne Servant local s,id=GetID() function s.initial_effect(c) --self destroy @@ -54,7 +55,7 @@ end function s.desop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if re==e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) then - if Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then + if Duel.IsPhase(PHASE_DAMAGE) and not Duel.IsDamageCalculated() then e:GetLabelObject():SetLabel(1) else if not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end diff --git a/official/c16020923.lua b/official/c16020923.lua index 009c961ccc..1dc64a3076 100644 --- a/official/c16020923.lua +++ b/official/c16020923.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.lvop) c:RegisterEffect(e3) end -s.listed_series={0x136,0x135} +s.listed_series={SET_AI,SET_IGNISTER} function s.thfilter(c) - return c:IsSetCard(0x136) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_AI) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -46,7 +46,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x135) and not c:IsLevel(4) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_IGNISTER) and not c:IsLevel(4) and c:IsLevelAbove(1) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -62,8 +62,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c16021142.lua b/official/c16021142.lua index c848bb8970..875b61f88b 100644 --- a/official/c16021142.lua +++ b/official/c16021142.lua @@ -23,15 +23,15 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x9b),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MELODIOUS),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) and c:IsCanChangePosition() + return c:IsFaceup() and c:IsSetCard(SET_MELODIOUS) and c:IsCanChangePosition() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -45,4 +45,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c16024176.lua b/official/c16024176.lua index 84b58fd241..05a7c8a2e1 100644 --- a/official/c16024176.lua +++ b/official/c16024176.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DRAW) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.drcon) @@ -36,10 +36,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c,ft,tp) - return c:IsSetCard(0xe6) and c:GetLevel()==1 and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==1 and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -72,7 +72,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end @@ -94,4 +94,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16037007.lua b/official/c16037007.lua index 4d57a04c6f..0e75a56e54 100644 --- a/official/c16037007.lua +++ b/official/c16037007.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,10 +26,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsContains(e:GetHandler()) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -48,4 +44,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c16051717.lua b/official/c16051717.lua index b71da09e96..18a0a528d3 100644 --- a/official/c16051717.lua +++ b/official/c16051717.lua @@ -1,4 +1,5 @@ --A BF-驟雨のライキリ +--Assault Blackwing - Raikiri the Rain Shower local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,17 +30,17 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x33) then + if g:IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.tncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==1 end function s.tnop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -48,14 +49,14 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x33),tp,LOCATION_MZONE,0,1,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_BLACKWING),tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x33),tp,LOCATION_MZONE,0,e:GetHandler()) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_BLACKWING),tp,LOCATION_MZONE,0,e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) @@ -66,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16067089.lua b/official/c16067089.lua index 078cfa2a67..6a3a04bb4c 100644 --- a/official/c16067089.lua +++ b/official/c16067089.lua @@ -1,4 +1,5 @@ --蛇神降臨 +--Rise of the Snake Deity local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,16 +25,16 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c16110708.lua b/official/c16110708.lua index 4e5c10b37f..1cf34706cd 100644 --- a/official/c16110708.lua +++ b/official/c16110708.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(function(e) return not e:GetHandler():IsBaseAttack(1500) end) - e3:SetCost(aux.dxmcostgen(1,1)) + e3:SetCost(Cost.Detach(1,1)) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end @@ -69,7 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end --It can attack directly this turn diff --git a/official/c16111820.lua b/official/c16111820.lua index 63e779324b..9d5eaffdb3 100644 --- a/official/c16111820.lua +++ b/official/c16111820.lua @@ -1,21 +1,22 @@ --ジュラック・ヘレラ +--Jurrac Herra local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x22} +s.listed_series={SET_JURRAC} function s.filter(c,tp) return c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_DEFENSE) and c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) - and c:IsSetCard(0x22) and c:GetCode()~=id + and c:IsSetCard(SET_JURRAC) and c:GetCode()~=id end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,tp) @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c16114248.lua b/official/c16114248.lua index 541319e912..65bb4d687a 100644 --- a/official/c16114248.lua +++ b/official/c16114248.lua @@ -15,4 +15,4 @@ function s.ffilter(c,fc,sumtype,tp,sub,mg,sg) end function s.fusfilter(c,code,fc,tp) return c:IsSummonCode(fc,SUMMON_TYPE_FUSION,tp,code) or c:IsHasEffect(511002961) -end +end \ No newline at end of file diff --git a/official/c16135253.lua b/official/c16135253.lua index 2dad6d5fd7..1800d9f3e8 100644 --- a/official/c16135253.lua +++ b/official/c16135253.lua @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16146511.lua b/official/c16146511.lua index bca8ffafc2..ef6b202d0f 100644 --- a/official/c16146511.lua +++ b/official/c16146511.lua @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16157341.lua b/official/c16157341.lua index 3d794778b0..07fe475d12 100644 --- a/official/c16157341.lua +++ b/official/c16157341.lua @@ -1,6 +1,5 @@ --武神器-オハバリ --Bujingi Ibis - local s,id=GetID() function s.initial_effect(c) --Targeted "Bujin" inflicts piercing damage @@ -10,22 +9,17 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} - +s.listed_series={SET_BUJIN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and not c:IsHasEffect(EFFECT_PIERCE) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and not c:IsHasEffect(EFFECT_PIERCE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -42,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c16165939.lua b/official/c16165939.lua index 62238b17e6..29aa92301d 100644 --- a/official/c16165939.lua +++ b/official/c16165939.lua @@ -63,13 +63,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c16169772.lua b/official/c16169772.lua index e0006751dc..a2df552f0e 100644 --- a/official/c16169772.lua +++ b/official/c16169772.lua @@ -1,28 +1,24 @@ --- インスタント・コンタクト --- Instant Contact --- Scripted by Hatter +--インスタント・コンタクト +--Instant Contact +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={CARD_NEOS} -s.listed_series={0x3008,0x1f} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} function s.spfilter(c,e,tp) - return c:IsLevelBelow(7) and (c:IsSetCard(0x3008) or c:IsSetCard(0x1f)) + return c:IsLevelBelow(7) and c:IsSetCard({SET_ELEMENTAL_HERO,SET_NEO_SPACIAN}) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,30 +29,30 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() if not tc then return end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_NEOS),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_NEOS),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) elseif Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then local c=e:GetHandler() - -- Cannot attack + --Cannot attack local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) - -- Effects are negated + --Effects are negated local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) tc:RegisterEffect(e3) - -- Return it to the Extra Deck during the End Phase + --Return it to the Extra Deck during the End Phase local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_PHASE+PHASE_END) @@ -66,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetCondition(s.tdcon) e4:SetOperation(s.tdop) Duel.RegisterEffect(e4,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end Duel.SpecialSummonComplete() end diff --git a/official/c16178681.lua b/official/c16178681.lua index f2b0941076..1636e4df43 100644 --- a/official/c16178681.lua +++ b/official/c16178681.lua @@ -40,12 +40,12 @@ end function s.rdop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) Duel.ChangeBattleDamage(tp,0) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) return c:IsType(TYPE_PENDULUM) and c:IsAttackBelow(1500) and c:IsAbleToHand() @@ -53,7 +53,7 @@ end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDestructable() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,id+1)==0 end - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e) return e:GetHandler():GetBattleTarget()~=nil -end +end \ No newline at end of file diff --git a/official/c16188701.lua b/official/c16188701.lua index 7fe6c75afb..3931e7db3b 100644 --- a/official/c16188701.lua +++ b/official/c16188701.lua @@ -1,4 +1,5 @@ --レディ・デバッガー +--Lady Debug local s,id=GetID() function s.initial_effect(c) --search @@ -30,5 +31,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c16191953.lua b/official/c16191953.lua index b5040d8c0f..611d1e904b 100644 --- a/official/c16191953.lua +++ b/official/c16191953.lua @@ -1,4 +1,5 @@ --マスター・ジーグ +--Master Gig local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil)<=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,nil) end local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) @@ -31,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg=g:Select(tp,ct,ct,nil) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16195942.lua b/official/c16195942.lua index aae0574c85..227613f67c 100644 --- a/official/c16195942.lua +++ b/official/c16195942.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(val) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(val) c:RegisterEffect(e2) end diff --git a/official/c16197610.lua b/official/c16197610.lua index 362fc4b952..6c37f6bba5 100644 --- a/official/c16197610.lua +++ b/official/c16197610.lua @@ -35,35 +35,35 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x18} -s.counter_place_list={0x1019} +s.listed_series={SET_CLOUDIAN} +s.counter_place_list={COUNTER_FOG} s.listed_names={80825553} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x18),tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x1019,ct) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_CLOUDIAN),tp,LOCATION_MZONE,LOCATION_MZONE,nil) + e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+COUNTER_FOG,ct) end end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,1,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x1019,1,REASON_COST) + if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_FOG,1,REASON_COST) end + e:GetHandler():RemoveCounter(tp,COUNTER_FOG,1,REASON_COST) end function s.spfilter(c,e,tp) return c:IsCode(80825553) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16209941.lua b/official/c16209941.lua index 35ff961ab0..e16a46707e 100644 --- a/official/c16209941.lua +++ b/official/c16209941.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_REMOVE) c:RegisterEffect(e3) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} s.listed_names={id} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local tc=g:RandomSelect(1-tp,1,1,nil) Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_DISCARD) if not Duel.IsPlayerCanSpecialSummon(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end if not tc:GetFirst():IsCode(id) then Duel.BreakEffect() @@ -66,7 +66,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0 end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x11e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DANGER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -81,4 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c1621413.lua b/official/c1621413.lua index 04b1e3b58c..839b55a800 100644 --- a/official/c1621413.lua +++ b/official/c1621413.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -50,7 +50,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -58,14 +58,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) c:RegisterEffect(e2) end end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,16195942) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -90,4 +90,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c16222645.lua b/official/c16222645.lua index 199ba2f737..a023605aad 100644 --- a/official/c16222645.lua +++ b/official/c16222645.lua @@ -1,4 +1,5 @@ --一刀両断侍 +--Sasuke Samurai local s,id=GetID() function s.initial_effect(c) --destroy @@ -25,4 +26,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16223761.lua b/official/c16223761.lua index e9ccfee1a4..0bb92c1654 100644 --- a/official/c16223761.lua +++ b/official/c16223761.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) if #dg>0 then --Destroy 1 of your opponent's cards diff --git a/official/c16227556.lua b/official/c16227556.lua index 0a0287ee81..44bbb2160a 100644 --- a/official/c16227556.lua +++ b/official/c16227556.lua @@ -1,4 +1,5 @@ --検閲 +--Inspection local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,20 +11,16 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.cfcon) - e2:SetCost(s.cfcost) + e2:SetCost(Cost.PayLP(500)) e2:SetOperation(s.cfop) c:RegisterEffect(e2) end function s.cfcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 -end -function s.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end function s.cfop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -32,4 +29,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,g) Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c16227633.lua b/official/c16227633.lua index d5250db77a..8559cb93cb 100644 --- a/official/c16227633.lua +++ b/official/c16227633.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spmanycon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.spmanytg) e2:SetOperation(s.spmanyop) c:RegisterEffect(e2) diff --git a/official/c16229315.lua b/official/c16229315.lua index 376387a070..ab2bfb9876 100644 --- a/official/c16229315.lua +++ b/official/c16229315.lua @@ -1,4 +1,5 @@ --ゲール・ドグラ +--Gale Dogra local s,id=GetID() function s.initial_effect(c) --to grave @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(3000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,3000) end - Duel.PayLPCost(tp,3000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) @@ -26,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16238373.lua b/official/c16238373.lua index 2fb880b858..f8dac1ef34 100644 --- a/official/c16238373.lua +++ b/official/c16238373.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c16240772.lua b/official/c16240772.lua index 4f8a6824b5..2a4a289822 100644 --- a/official/c16240772.lua +++ b/official/c16240772.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER_E|TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -69,4 +69,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #dg==0 then return end Duel.BreakEffect() Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16241441.lua b/official/c16241441.lua index c97d0123f2..d59e3aad93 100644 --- a/official/c16241441.lua +++ b/official/c16241441.lua @@ -1,4 +1,5 @@ --C・ラーバ +--Chrysalis Larva local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,24 +18,20 @@ s.listed_names={89621922,42015635} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(42015635) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(89621922) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsEnvironment(42015635) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16255173.lua b/official/c16255173.lua index bbad1f5ef9..41983cda54 100644 --- a/official/c16255173.lua +++ b/official/c16255173.lua @@ -1,4 +1,5 @@ --The grand JUPITER +--The Grand Jupiter local s,id=GetID() function s.initial_effect(c) --equip @@ -29,7 +30,7 @@ function s.initial_effect(c) end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.eqfilter(c) return c:IsFaceup() and c:IsAbleToChangeControler() @@ -51,7 +52,7 @@ function s.equipop(c,e,tp,tc) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -81,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16255442.lua b/official/c16255442.lua index 4546174589..6c1a6e4441 100644 --- a/official/c16255442.lua +++ b/official/c16255442.lua @@ -1,4 +1,5 @@ --光の召集 +--Beckoning Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,7 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) local ct=sg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetCount() local tg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,nil) if ct>0 and #tg>=ct then @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sel,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sel) end -end +end \ No newline at end of file diff --git a/official/c16259549.lua b/official/c16259549.lua index e3ff71ed77..d63f943845 100644 --- a/official/c16259549.lua +++ b/official/c16259549.lua @@ -1,4 +1,5 @@ --No.49 秘鳥フォーチュンチュン +--Number 49: Fortune Tune local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_RECOVER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.reccon) @@ -48,7 +49,7 @@ function s.initial_effect(c) end s.xyz_number=49 function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -93,6 +94,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16261341.lua b/official/c16261341.lua index b3f16afc67..d257343319 100644 --- a/official/c16261341.lua +++ b/official/c16261341.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e3:SetRange(LOCATION_HAND|LOCATION_GRAVE) e3:SetCode(EVENT_CHAINING) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCondition(s.spcon1) @@ -35,13 +35,13 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x10a} +s.listed_series={SET_PARSHATH} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_COUNTER) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) local dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_PLAYER) - return dp==tp and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return dp==tp and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.cfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true,true)) @@ -51,7 +51,7 @@ function s.mzfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,c) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=-ft+1 if chk==0 then return ft>-2 and #rg>1 and (ft>0 or rg:IsExists(s.mzfilter,ct,nil)) end @@ -85,7 +85,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end function s.thfilter(c) - return (c:IsSetCard(0x10a) or c:IsType(TYPE_COUNTER)) and c:IsAbleToHand() + return (c:IsSetCard(SET_PARSHATH) or c:IsType(TYPE_COUNTER)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -98,4 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16268841.lua b/official/c16268841.lua index 73e8256501..beac93d8b4 100644 --- a/official/c16268841.lua +++ b/official/c16268841.lua @@ -1,4 +1,5 @@ --ゾルガ +--Zolga local s,id=GetID() function s.initial_effect(c) --recover @@ -26,4 +27,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16269385.lua b/official/c16269385.lua index a1ec9e69de..59eaf8bbc2 100644 --- a/official/c16269385.lua +++ b/official/c16269385.lua @@ -1,5 +1,5 @@ --プランキッズ・ハウス ---Prankids House +--Prank-Kids Place -- local s,id=GetID() function s.initial_effect(c) @@ -38,9 +38,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop2) c:RegisterEffect(e3) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x120) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_PRANK_KIDS) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -53,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp,sumt) - return c:IsFaceup() and c:IsSetCard(0x120) and c:IsSummonType(sumt) and c:IsSummonPlayer(tp) + return c:IsFaceup() and c:IsSetCard(SET_PRANK_KIDS) and c:IsSummonType(sumt) and c:IsSummonPlayer(tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp,SUMMON_TYPE_FUSION) @@ -69,7 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) end @@ -88,8 +88,8 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16272453.lua b/official/c16272453.lua index 193a491ec5..a88c9886cd 100644 --- a/official/c16272453.lua +++ b/official/c16272453.lua @@ -1,4 +1,5 @@ --機甲忍法ゴールド・コンバージョン +--Armor Ninjitsu Art of Alchemy local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,21 +12,21 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x61} +s.listed_series={SET_NINJITSU_ART} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x61),tp,LOCATION_ONFIELD,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NINJITSU_ART),tp,LOCATION_ONFIELD,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x61),tp,LOCATION_ONFIELD,0,e:GetHandler()) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NINJITSU_ART),tp,LOCATION_ONFIELD,0,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x61),tp,LOCATION_ONFIELD,0,e:GetHandler()) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NINJITSU_ART),tp,LOCATION_ONFIELD,0,e:GetHandler()) local ct=Duel.Destroy(g,REASON_EFFECT) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16278116.lua b/official/c16278116.lua index c06b6961b6..252d205b30 100644 --- a/official/c16278116.lua +++ b/official/c16278116.lua @@ -1,7 +1,8 @@ --竜の束縛 +--Dragon's Bind local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,s.filter,nil,nil,nil,0x1c0) + aux.AddPersistentProcedure(c,0,s.filter,nil,nil,nil,TIMINGS_CHECK_MONSTER) --cannot spsummon local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -35,4 +36,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16279989.lua b/official/c16279989.lua index 7bb2353dc1..19a2968dca 100644 --- a/official/c16279989.lua +++ b/official/c16279989.lua @@ -1,4 +1,5 @@ --ゴーストリック・シュタイン +--Ghostrick Stein local s,id=GetID() function s.initial_effect(c) --summon limit @@ -28,14 +29,14 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sumcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -48,7 +49,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c) - return c:IsSetCard(0x8d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_GHOSTRICK) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -61,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16304628.lua b/official/c16304628.lua index 9d699aa7e0..f909815705 100644 --- a/official/c16304628.lua +++ b/official/c16304628.lua @@ -1,9 +1,10 @@ --E・HERO ガイア +--Elemental HERO Gaia local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3008),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH)) --atk up local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -23,10 +24,10 @@ function s.initial_effect(c) e3:SetValue(aux.fuslimit) c:RegisterEffect(e3) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -44,7 +45,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() then local e2=Effect.CreateEffect(c) @@ -52,8 +53,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(atk/2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c16306932.lua b/official/c16306932.lua index ef5bab03bb..e794a17dc6 100644 --- a/official/c16306932.lua +++ b/official/c16306932.lua @@ -147,12 +147,12 @@ end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) g:DeleteGroup() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() and Duel.CheckLPCost(tp,500) end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) Duel.PayLPCost(tp,500) end function s.thfilter(c) @@ -178,13 +178,13 @@ function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler()) + local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,e:GetHandler()) if chk==0 then return #g>0 end Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,e:GetHandler()) + local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,e:GetHandler()) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16308000.lua b/official/c16308000.lua index 7443d32ffe..b5669e8657 100644 --- a/official/c16308000.lua +++ b/official/c16308000.lua @@ -1,7 +1,8 @@ --神の威光 +--Solemn Authority local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,0x4b),nil,nil,0x1c0,0x1c1,nil,nil,nil,s.operation) + aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,SET_AESIR),nil,nil,SET_DRAGONTAIL,SET_YUMMY,nil,nil,nil,s.operation) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) @@ -11,26 +12,26 @@ function s.initial_effect(c) e1:SetValue(1) c:RegisterEffect(e1) end -s.listed_series={0x4b} +s.listed_series={SET_AESIR} function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetLabel(2) e2:SetLabelObject(tc) e2:SetCondition(s.tgcon) e2:SetOperation(s.tgop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) c:RegisterEffect(e2) end end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -39,4 +40,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if ct==0 and e:GetHandler():IsHasCardTarget(e:GetLabelObject()) then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16310544.lua b/official/c16310544.lua index 94d839da96..92e01fda88 100644 --- a/official/c16310544.lua +++ b/official/c16310544.lua @@ -1,18 +1,18 @@ --- 御巫神楽 --- Mikanko Kagura --- Scripted by Hatter +--御巫神楽 +--Mikanko Kagura +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Ritual Summon + --Ritual Summon local e1=Ritual.AddProcGreater({ handler=c, - filter=aux.FilterBoolFunction(Card.IsSetCard,0x18e), + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_MIKANKO), stage2=s.stage2 }) e1:SetCategory(e1:GetCategory()|CATEGORY_DESTROY|CATEGORY_DAMAGE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) if #g==0 then return end diff --git a/official/c16312943.lua b/official/c16312943.lua index 5c50cd45f0..20c89e90aa 100644 --- a/official/c16312943.lua +++ b/official/c16312943.lua @@ -1,9 +1,9 @@ --- --- Libromancer Fire --- Scripted by Hatter +--リブロマンサー・ファイア +--Libromancer Fire +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Search 1 "Libromancer" monster + --Search 1 "Libromancer" monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.spcostfilter(c) return c:IsRitualMonster() and not c:IsPublic() end @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x17d) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_LIBROMANCER) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16313112.lua b/official/c16313112.lua index e4c8191d2f..a50b207ea6 100644 --- a/official/c16313112.lua +++ b/official/c16313112.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.atop) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} s.listed_names={38784726,id} function s.cfilter(c,fc,sumtype,tp) - return c:IsLinkMonster() and c:IsSetCard(0x119) + return c:IsLinkMonster() and c:IsSetCard(SET_SALAMANGREAT) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) @@ -39,14 +39,14 @@ end function s.atop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) and c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_BATTLE_START) e1:SetOwnerPlayer(tp) e1:SetCondition(s.descon2) e1:SetOperation(s.desop2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) end end @@ -63,7 +63,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReincarnationSummoned() end function s.desfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) end @@ -73,4 +73,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16317140.lua b/official/c16317140.lua index 20f1181831..9b7d05ae69 100644 --- a/official/c16317140.lua +++ b/official/c16317140.lua @@ -54,9 +54,9 @@ function s.atkcfilter(c) return c:IsTrap() and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,18 +64,18 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return c:GetFlagEffect(id)==0 end Duel.SetTargetCard(e:GetLabelObject()) e:SetLabelObject(nil) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsRelateToBattle() then - local atk=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsTrap),tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,nil)*1000 + local atk=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsTrap),tp,LOCATION_GRAVE|LOCATION_ONFIELD,LOCATION_GRAVE|LOCATION_ONFIELD,nil)*1000 --Change ATK/DEF local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -84,7 +84,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp,ft) return c:IsCode(6007213,32491822,69890967) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false))) diff --git a/official/c16329071.lua b/official/c16329071.lua index 6500a5d8b3..ad7812b419 100644 --- a/official/c16329071.lua +++ b/official/c16329071.lua @@ -1,4 +1,5 @@ --星遺物に蠢く罠 +--World Legacy Trap Globe local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,20 +13,20 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xfe) and not c:IsCode(id) and (c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck() + return c:IsSetCard(SET_WORLD_LEGACY) and not c:IsCode(id) and (c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,0,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_ONFIELD|LOCATION_REMOVED,0,nil) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and g:GetClassCount(Card.GetCode)>=5 end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_ONFIELD|LOCATION_REMOVED,0,nil) if g:GetClassCount(Card.GetCode)<5 then return end local sg=Group.CreateGroup() for i=1,5 do @@ -38,12 +39,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #cg>0 then Duel.ConfirmCards(1-tp,cg) end - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) local og=Duel.GetOperatedGroup() if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16360142.lua b/official/c16360142.lua index 99b5ad28f0..016d97d670 100644 --- a/official/c16360142.lua +++ b/official/c16360142.lua @@ -1,7 +1,6 @@ --斬機サブトラ --Mathmech Subtraction --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -32,7 +31,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_FIELD) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) e0:SetDescription(aux.Stringid(id,1)) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) @@ -46,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-1000) tc:RegisterEffect(e1) --Cannot attack this turn @@ -55,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end diff --git a/official/c16366810.lua b/official/c16366810.lua index a306afdeb9..091699d66f 100644 --- a/official/c16366810.lua +++ b/official/c16366810.lua @@ -50,6 +50,6 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16366944.lua b/official/c16366944.lua index c8bcdb88d3..31bb983e0e 100644 --- a/official/c16366944.lua +++ b/official/c16366944.lua @@ -1,4 +1,5 @@ --月光蝶 +--Moonlit Papillon local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6a} +s.listed_series={SET_BUTTERSPY} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x6a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_BUTTERSPY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c1637760.lua b/official/c1637760.lua index e4c8c7be99..8df4f52844 100644 --- a/official/c1637760.lua +++ b/official/c1637760.lua @@ -26,5 +26,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) Duel.BreakEffect() Duel.Draw(1-tp,1,REASON_EFFECT) - Duel.SkipPhase(1-tp,Duel.GetCurrentPhase(),RESET_PHASE+PHASE_END,1) -end + Duel.SkipPhase(1-tp,Duel.GetCurrentPhase(),RESET_PHASE|PHASE_END,1) +end \ No newline at end of file diff --git a/official/c16392422.lua b/official/c16392422.lua index 39442d666c..58ad3cba26 100644 --- a/official/c16392422.lua +++ b/official/c16392422.lua @@ -46,7 +46,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.sfilter(c) @@ -74,4 +74,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1639384.lua b/official/c1639384.lua index dbbafd6ffb..bb0036c0bd 100644 --- a/official/c1639384.lua +++ b/official/c1639384.lua @@ -1,6 +1,5 @@ --神竜騎士フェルグラント --Divine Dragon Knight Felgrand - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,16 +14,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -41,14 +36,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --Unaffected by other card effects local e3=Effect.CreateEffect(c) @@ -58,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetValue(s.efilter) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end diff --git a/official/c16404809.lua b/official/c16404809.lua index f7c7f83479..08a3415cd3 100644 --- a/official/c16404809.lua +++ b/official/c16404809.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c1641882.lua b/official/c1641882.lua index 14e9942923..8255be3e1d 100644 --- a/official/c1641882.lua +++ b/official/c1641882.lua @@ -5,4 +5,4 @@ function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,38142739,83464209) -end +end \ No newline at end of file diff --git a/official/c16428514.lua b/official/c16428514.lua index 8b5be04aa9..5a122959b2 100644 --- a/official/c16428514.lua +++ b/official/c16428514.lua @@ -32,10 +32,10 @@ function s.initial_effect(c) e3:SetCondition(s.setcon2) c:RegisterEffect(e3) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0xed) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SUBTERROR) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -50,10 +50,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.setcon1(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xed),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUBTERROR),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end function s.setcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xed),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SUBTERROR),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end function s.setfilter(c) return c:IsFaceup() and c:IsCanTurnSet() @@ -74,4 +74,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(c,tc) if g:IsExists(function(c,e) return not c:IsFaceup() or not c:IsRelateToEffect(e) end,1,nil,e) then return end Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c16430187.lua b/official/c16430187.lua index 9d4494edfc..88601d72a9 100644 --- a/official/c16430187.lua +++ b/official/c16430187.lua @@ -1,4 +1,5 @@ --頼もしき守護者 +--The Reliable Guardian local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsDefenseAbove(0) end @@ -31,8 +29,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(700) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16433136.lua b/official/c16433136.lua index fd132cbce0..11e4972076 100644 --- a/official/c16433136.lua +++ b/official/c16433136.lua @@ -1,9 +1,9 @@ --御巫の祓舞 ---Purifying Dance of the Mikanko +--Mikanko Purification Dance --scripted by Naim local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x18e)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_MIKANKO)) --Prevent destruction by effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.thcond(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) end diff --git a/official/c16435215.lua b/official/c16435215.lua index cfb8352924..10775c261c 100644 --- a/official/c16435215.lua +++ b/official/c16435215.lua @@ -34,10 +34,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local sg2=g2:Select(1-tp,1,1,nil) sg1:Merge(sg2) - Duel.SendtoGrave(sg1,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg1,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(tp) Duel.ShuffleHand(1-tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1644289.lua b/official/c1644289.lua index 08a9fe2dd8..c1f0dda587 100644 --- a/official/c1644289.lua +++ b/official/c1644289.lua @@ -2,7 +2,7 @@ --Vylon Segment local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x30)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_VYLON)) --Untargetable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -22,7 +22,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.tglimit(e,re,rp) return rp~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER) end @@ -31,7 +31,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and (e:GetHandler():GetPreviousLocation()&LOCATION_ONFIELD)~=0 end function s.thfilter(c) - return c:IsSetCard(0x30) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_VYLON) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16469012.lua b/official/c16469012.lua index db12bca73a..93be97b08a 100644 --- a/official/c16469012.lua +++ b/official/c16469012.lua @@ -1,4 +1,5 @@ --テーヴァ +--Teva local s,id=GetID() function s.initial_effect(c) --to deck @@ -11,13 +12,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c164710.lua b/official/c164710.lua index b5226e76ee..b884c4de93 100644 --- a/official/c164710.lua +++ b/official/c164710.lua @@ -15,14 +15,10 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetCost(s.lvcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local hg=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND,LOCATION_HAND,nil,1) @@ -32,13 +28,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_TO_HAND) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetOperation(s.hlvop) Duel.RegisterEffect(e2,tp) end @@ -50,7 +46,7 @@ function s.hlvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16474916.lua b/official/c16474916.lua index 81e46431a1..eec4975b2e 100644 --- a/official/c16474916.lua +++ b/official/c16474916.lua @@ -1,9 +1,9 @@ --- エクソシスター・エリス --- Exorsister Elise --- Scripted by Hatter +--エクソシスター・エリス +--Exosister Elis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special Summon Xyz + --Special Summon Xyz local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={43863925} -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.hspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x174),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_EXOSISTER),tp,LOCATION_MZONE,0,1,nil) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -48,7 +48,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x174) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_EXOSISTER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c16475472.lua b/official/c16475472.lua index 2f1a7cd6fd..258c1eef9f 100644 --- a/official/c16475472.lua +++ b/official/c16475472.lua @@ -1,4 +1,5 @@ --レッサー・デーモン +--Lesser Fiend local s,id=GetID() function s.initial_effect(c) --redirect @@ -9,4 +10,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c16480084.lua b/official/c16480084.lua index 4207b57d33..b421ccc693 100644 --- a/official/c16480084.lua +++ b/official/c16480084.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x304e} +s.listed_series={SET_EVOLTILE} function s.evoop(e) local c=e:GetHandler() --defup @@ -37,7 +37,7 @@ function s.evoop(e) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) @@ -48,7 +48,7 @@ function s.schcon(e,tp,eg,ep,ev,re,r,rp) and e:GetLabelObject():GetLabel()==1 end function s.sfilter(c) - return c:IsSetCard(0x304e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_EVOLTILE) and c:IsMonster() and c:IsAbleToHand() end function s.schtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end @@ -61,4 +61,4 @@ function s.schop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16494704.lua b/official/c16494704.lua index 9b38ed91d4..a461ab3266 100644 --- a/official/c16494704.lua +++ b/official/c16494704.lua @@ -2,16 +2,16 @@ --Odd-Eyes Advent local s,id=GetID() function s.initial_effect(c) - local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil,extrafil=s.extrafil,extraop=s.extraop,matfilter=s.forcedgroup,location=LOCATION_HAND+LOCATION_GRAVE}) + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_GREATER,filter=s.ritualfil,extrafil=s.extrafil,extraop=s.extraop,matfilter=s.forcedgroup,location=LOCATION_HAND|LOCATION_GRAVE}) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.ritualfil(c) return c:IsRace(RACE_DRAGON) end function s.exfilter0(c) - return c:IsSetCard(0x99) and c:IsLevelAbove(1) and c:IsAbleToGrave() + return c:IsSetCard(SET_ODD_EYES) and c:IsLevelAbove(1) and c:IsAbleToGrave() end function s.extrafil(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1 then @@ -25,5 +25,5 @@ function s.extraop(mg,e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) end function s.forcedgroup(c,e,tp) - return (c:IsType(TYPE_PENDULUM) and c:IsLocation(LOCATION_HAND+LOCATION_ONFIELD)) or (c:IsSetCard(0x99) and c:IsLocation(LOCATION_EXTRA)) -end + return (c:IsType(TYPE_PENDULUM) and c:IsLocation(LOCATION_HAND|LOCATION_ONFIELD)) or (c:IsSetCard(SET_ODD_EYES) and c:IsLocation(LOCATION_EXTRA)) +end \ No newline at end of file diff --git a/official/c16507828.lua b/official/c16507828.lua index 36d67da49f..511f1cedb2 100644 --- a/official/c16507828.lua +++ b/official/c16507828.lua @@ -1,7 +1,8 @@ --ブラキオレイドス +--Bracchio-raidus local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,94119974,38289717) -end +end \ No newline at end of file diff --git a/official/c16509093.lua b/official/c16509093.lua index 189590f729..110c3aeccb 100644 --- a/official/c16509093.lua +++ b/official/c16509093.lua @@ -1,4 +1,5 @@ --王族親衛隊 +--Royal Keeper local s,id=GetID() function s.initial_effect(c) --turn set @@ -21,7 +22,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -37,10 +38,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c16516630.lua b/official/c16516630.lua index c2c4a22754..4503f92d88 100644 --- a/official/c16516630.lua +++ b/official/c16516630.lua @@ -1,4 +1,5 @@ --BF-尖鋭のボーラ +--Blackwing - Boreas the Sharp local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,17 +9,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) @@ -43,10 +44,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_BATTLED) e3:SetOperation(s.desop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if d and d~=e:GetHandler() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16527176.lua b/official/c16527176.lua index 4bf59cbdfc..f33aa5729e 100644 --- a/official/c16527176.lua +++ b/official/c16527176.lua @@ -1,7 +1,8 @@ --ナチュル・ガオドレイク +--Naturia Leodrake local s,id=GetID() function s.initial_effect(c) --synchro summon Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_EARTH),1,99) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c16550875.lua b/official/c16550875.lua index 9e64eb00f1..3545dcee59 100644 --- a/official/c16550875.lua +++ b/official/c16550875.lua @@ -1,7 +1,8 @@ --甲虫装機の魔剣 ゼクトキャリバー +--Inzektor Sword - Zektkaliber local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x56)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_INZEKTOR)) --Atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -23,13 +24,13 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x56) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_INZEKTOR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -44,4 +45,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c16556849.lua b/official/c16556849.lua index 35a6f25546..28cf9e671c 100644 --- a/official/c16556849.lua +++ b/official/c16556849.lua @@ -1,4 +1,5 @@ --放浪の勇者 フリード +--Freed the Brave Wanderer local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -14,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.costfilter(c) @@ -39,4 +40,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) and tc:GetAttack()>c:GetAttack() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16589042.lua b/official/c16589042.lua index 7018fbbcf7..5a8e551083 100644 --- a/official/c16589042.lua +++ b/official/c16589042.lua @@ -1,4 +1,5 @@ --疾風の暗黒騎士ガイア +--Swift Gaia the Fierce Knight local s,id=GetID() function s.initial_effect(c) --summon @@ -14,4 +15,4 @@ function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)==1 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c16598965.lua b/official/c16598965.lua index 12a5bc2a80..f6533d1633 100644 --- a/official/c16598965.lua +++ b/official/c16598965.lua @@ -1,5 +1,5 @@ --聖邪のステンドグラス ---Stained Glass of the Valiant +--Stained Glass of Light & Dark --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsRace(RACE_FAIRY+RACE_FIEND) + return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsRace(RACE_FAIRY|RACE_FIEND) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) @@ -46,11 +46,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(1-tp,1,REASON_EFFECT)>0 then Duel.BreakEffect() local dg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0):RandomSelect(1-tp,1) - if Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then + if Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD)>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) end end end -end +end \ No newline at end of file diff --git a/official/c16605586.lua b/official/c16605586.lua index bc454fb09d..95bf4eb7bf 100644 --- a/official/c16605586.lua +++ b/official/c16605586.lua @@ -1,7 +1,6 @@ --D-HERO ディナイアルガイ --Destiny HERO - Denier --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -32,22 +31,21 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Destiny HERO" archetype -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} --Specifically lists itself s.listed_names={id} - --Check for a "Destiny HERO" monster function s.filter(c) - return c:IsSetCard(0xc008) and c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE+LOCATION_DECK)) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE|LOCATION_DECK)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED) end --Place on top of your Deck, 1 of your "Destiny HERO" monsters that is banished, in GY, or Deck function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) local tc=g:GetFirst() if not tc then return end if tc:IsLocation(LOCATION_DECK) then @@ -63,10 +61,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Destiny HERO" monster function s.spfilter(c) - return c:IsFaceup() and c:IsMonster() and c:IsSetCard(0xc008) and not c:IsCode(id) + return c:IsFaceup() and c:IsMonster() and c:IsSetCard(SET_DESTINY_HERO) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -81,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16616620.lua b/official/c16616620.lua index b7d16b1770..2bb4d4271b 100644 --- a/official/c16616620.lua +++ b/official/c16616620.lua @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16617334.lua b/official/c16617334.lua index 55a42ccb16..66a8f72b0e 100644 --- a/official/c16617334.lua +++ b/official/c16617334.lua @@ -1,6 +1,5 @@ --EMレインゴート --Performapal Rain Goat - local s,id=GetID() function s.initial_effect(c) --Reduce effect damage to 0 @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCondition(aux.damcon1) - e1:SetCost(s.effcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) --Targeted "Odd-Eyes" or "Performapal" monster cannot be destroyed by battle or card effects @@ -21,19 +20,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(s.condition2) - e2:SetCost(s.effcost) + e2:SetCondition(function() return Duel.IsMainPhase() end) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) c:RegisterEffect(e2) end -s.listed_series={0x9f,0x99} - -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.operation(e,tp,eg,ep,ev,re,r,rp) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local e1=Effect.CreateEffect(e:GetHandler()) @@ -53,11 +47,8 @@ function s.damcon(e,re,val,r,rp,rc) if cid==e:GetLabel() then return 0 end return val end -function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end function s.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) + return c:IsFaceup() and c:IsSetCard({SET_PERFORMAPAL,SET_ODD_EYES}) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.filter(chkc) end @@ -75,7 +66,7 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c1662004.lua b/official/c1662004.lua index 61a59967d5..7302ab1599 100644 --- a/official/c1662004.lua +++ b/official/c1662004.lua @@ -46,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1)) end -end +end \ No newline at end of file diff --git a/official/c16632144.lua b/official/c16632144.lua index 9fce5c6a62..d45827aa2d 100644 --- a/official/c16632144.lua +++ b/official/c16632144.lua @@ -1,5 +1,5 @@ --屈強の釣り師 ---Angrappler +--Grappler Angler -- local s,id=GetID() function s.initial_effect(c) @@ -34,5 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c16638212.lua b/official/c16638212.lua index a8125545cc..bfd0908625 100644 --- a/official/c16638212.lua +++ b/official/c16638212.lua @@ -31,12 +31,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY) - g:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + g:GetFirst():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetReset((RESET_EVENT|RESETS_STANDARD_DISABLE)&~RESET_TOFIELD|RESET_PHASE|PHASE_STANDBY) e1:SetOperation(s.retop) @@ -48,4 +48,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetLabelObject():GetFlagEffect(id)~=0 then Duel.ReturnToField(e:GetLabelObject()) end -end +end \ No newline at end of file diff --git a/official/c16643334.lua b/official/c16643334.lua index f1231fa643..935500f07b 100644 --- a/official/c16643334.lua +++ b/official/c16643334.lua @@ -46,18 +46,18 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) e4:SetCondition(s.spcon2) - e4:SetCost(s.spcost2) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x55} +s.listed_series={SET_PHOTON} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0x55) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_PHOTON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -73,14 +73,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.indcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp -end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -88,9 +84,9 @@ end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) @@ -98,4 +94,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16674846.lua b/official/c16674846.lua index ce82699001..da8b81e1e1 100644 --- a/official/c16674846.lua +++ b/official/c16674846.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.GetBattleDamage(tp)>0 + return Duel.IsTurnPlayer(1-tp) and Duel.GetBattleDamage(tp)>0 end function s.filter(c) return c:IsDefenseBelow(1500) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_WARRIOR) @@ -29,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE,0,nil) if #g~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c16678947.lua b/official/c16678947.lua index 5d886814d2..27a22b72f3 100644 --- a/official/c16678947.lua +++ b/official/c16678947.lua @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,e:GetLabel()*300,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16684346.lua b/official/c16684346.lua index 03e57d7d83..385744a394 100644 --- a/official/c16684346.lua +++ b/official/c16684346.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCountLimit(1,id) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.tetg) e3:SetOperation(s.teop) c:RegisterEffect(e3) diff --git a/official/c16691074.lua b/official/c16691074.lua index 6bbae79e68..b96d17437e 100644 --- a/official/c16691074.lua +++ b/official/c16691074.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -30,23 +30,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} s.listed_names={id} -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ODD_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) if #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -57,10 +53,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x99) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ODD_EYES) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -72,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16693254.lua b/official/c16693254.lua index 26a9ab2f59..d5e3cf1bce 100644 --- a/official/c16693254.lua +++ b/official/c16693254.lua @@ -1,4 +1,5 @@ --リチュア・アバンス +--Gishki Avance local s,id=GetID() function s.initial_effect(c) --search @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.filter(c) - return c:IsSetCard(0x3a) and c:IsMonster() + return c:IsSetCard(SET_GISHKI) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c1669772.lua b/official/c1669772.lua index f861798286..ca972e22e3 100644 --- a/official/c1669772.lua +++ b/official/c1669772.lua @@ -14,10 +14,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS + return c:IsFaceup() and c:IsContinuousSpell() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end @@ -27,4 +27,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16699558.lua b/official/c16699558.lua index d4cf48c3ac..fd2e4ceaf0 100644 --- a/official/c16699558.lua +++ b/official/c16699558.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.dxmcostgen(1,1)) + e3:SetCost(Cost.Detach(1,1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c16708652.lua b/official/c16708652.lua index d292f26469..45201108c6 100644 --- a/official/c16708652.lua +++ b/official/c16708652.lua @@ -1,4 +1,5 @@ --カラクリ粉 +--Karakuri Gold Dust local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,13 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsSetCard(0x11) + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsSetCard(SET_KARAKURI) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -40,8 +40,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc1:GetAttack()) tc2:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16719140.lua b/official/c16719140.lua index a8d9df8786..43b3be02db 100644 --- a/official/c16719140.lua +++ b/official/c16719140.lua @@ -101,4 +101,4 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c16719802.lua b/official/c16719802.lua index 8875786404..348d38dda3 100644 --- a/official/c16719802.lua +++ b/official/c16719802.lua @@ -28,7 +28,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16720314.lua b/official/c16720314.lua index 1d23b73cff..588f8f11ca 100644 --- a/official/c16720314.lua +++ b/official/c16720314.lua @@ -30,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16725505.lua b/official/c16725505.lua index 953b1d6823..cb81a6aeb1 100644 --- a/official/c16725505.lua +++ b/official/c16725505.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2016) and not c:IsCode(id) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_SPEEDROID) and not c:IsCode(id) and c:HasLevel() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -37,7 +37,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16751086.lua b/official/c16751086.lua index ec5fe8571b..ca3d5b183d 100644 --- a/official/c16751086.lua +++ b/official/c16751086.lua @@ -1,4 +1,5 @@ --ウォーム・ワーム +--Warm Worm local s,id=GetID() function s.initial_effect(c) --deckdes @@ -17,4 +18,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16759958.lua b/official/c16759958.lua index 21700831fd..eaa33f39f7 100644 --- a/official/c16759958.lua +++ b/official/c16759958.lua @@ -1,6 +1,5 @@ --アロマセラフィ-アンゼリカ --Aromaseraphy Angelica - local s,id=GetID() function s.initial_effect(c) --Gain LP equal to targeted "Aroma" monster in your GY @@ -12,10 +11,10 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.reccost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.rectg) e1:SetOperation(s.recop) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) c:RegisterEffect(e1) --Special summon itself from GY local e2=Effect.CreateEffect(c) @@ -29,14 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xc9} - -function s.reccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_AROMA} function s.recfilter(c) - return c:IsSetCard(0xc9) and c:GetAttack()>0 + return c:IsSetCard(SET_AROMA) and c:GetAttack()>0 end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.recfilter(chkc) end @@ -52,7 +46,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xc9),tp,LOCATION_MZONE,0,1,nil) + return Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AROMA),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -68,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c16762927.lua b/official/c16762927.lua index 567500eeda..77d83e905f 100644 --- a/official/c16762927.lua +++ b/official/c16762927.lua @@ -35,4 +35,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,1,REASON_COST) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c16768387.lua b/official/c16768387.lua index 65ec2dab4f..1c8236ce38 100644 --- a/official/c16768387.lua +++ b/official/c16768387.lua @@ -14,4 +14,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ct==0 then return end local ac=ct==1 and ct or Duel.AnnounceNumberRange(tp,1,ct) Duel.SortDecktop(tp,tp,ct) -end +end \ No newline at end of file diff --git a/official/c16769305.lua b/official/c16769305.lua index abea752181..89364f90dd 100644 --- a/official/c16769305.lua +++ b/official/c16769305.lua @@ -1,5 +1,5 @@ --魔界造車-GT19 ---Doom-Tune - GT19 +--Turbo-Tainted Hot Rod GT19 --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.lvltg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,7 +54,7 @@ function s.lvlop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -104,7 +104,7 @@ function s.syncsumop(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) e2:SetOperation(s.regop) e2:SetLabelObject(e1) sc:RegisterEffect(e2,true) diff --git a/official/c16780318.lua b/official/c16780318.lua index 33f11e3f84..3e1a26464c 100644 --- a/official/c16780318.lua +++ b/official/c16780318.lua @@ -1,5 +1,5 @@ --超勝負! ---Super All-In! +--Super All In! --Logical Nonsense --Substitute ID local s,id=GetID() @@ -22,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists the "Flower Cardian" archetype -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} --Check for synchro monster function s.exfilter(c,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -31,7 +31,7 @@ function s.exfilter(c,tp) end --Check for "Flower Cardian" monsters that can be special summoned function s.spfilter(c,e,tp) - return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -60,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end @@ -83,7 +83,7 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - return e:GetHandler():IsReason(REASON_EFFECT) and rc:IsSetCard(0xe6) and rc:IsMonster() + return e:GetHandler():IsReason(REASON_EFFECT) and rc:IsSetCard(SET_FLOWER_CARDIAN) and rc:IsMonster() end --Add 1 spell/trap card from GY to hand function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -97,7 +97,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.addtg) e1:SetOperation(s.addop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end --Activation legality @@ -113,4 +113,4 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16796157.lua b/official/c16796157.lua index 8c8982c1e1..132d891fae 100644 --- a/official/c16796157.lua +++ b/official/c16796157.lua @@ -1,4 +1,5 @@ --野獣戦士ピューマン +--Beast-Warrior Puma local s,id=GetID() function s.initial_effect(c) --salvage @@ -7,28 +8,24 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end s.listed_names={80208158} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsCode(80208158) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c16802689.lua b/official/c16802689.lua index 867f5ae970..af4976edca 100644 --- a/official/c16802689.lua +++ b/official/c16802689.lua @@ -35,10 +35,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c,tp) - return c:IsSetCard(0xe6) and c:GetLevel()==12 and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==12 and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -71,7 +71,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end @@ -93,4 +93,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16825874.lua b/official/c16825874.lua index 5846571f3a..a5b2dd5347 100644 --- a/official/c16825874.lua +++ b/official/c16825874.lua @@ -1,6 +1,5 @@ --エキセントリック・ボーイ --Eccentric Boy - local s,id=GetID() function s.initial_effect(c) --A synchro monster using this card cannot activate its effects, has its effects negated, and is banished @@ -48,7 +47,7 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+0x7e0000) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT-RESET_OVERLAY) rc:RegisterEffect(e1) --Cannot activate its effects local e2=Effect.CreateEffect(c) @@ -56,13 +55,13 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2) --Negate its effects local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3) end function s.synval(e,c,sc) diff --git a/official/c16828633.lua b/official/c16828633.lua index cccdf29f21..da643c6c08 100644 --- a/official/c16828633.lua +++ b/official/c16828633.lua @@ -1,4 +1,5 @@ --スペア・ジェネクス +--Genex Spare local s,id=GetID() function s.initial_effect(c) --cos @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2),tp,LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GENEX),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -22,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(68505803) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c16832845.lua b/official/c16832845.lua index 4462f772ef..71e285ac7c 100644 --- a/official/c16832845.lua +++ b/official/c16832845.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_TOGRAVE) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_TOGRAVE) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -69,4 +69,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c1683982.lua b/official/c1683982.lua index 25de797d4d..33941787b7 100644 --- a/official/c1683982.lua +++ b/official/c1683982.lua @@ -1,14 +1,14 @@ --- 毒蛇の怨念 --- Viper's Grudge --- Scripted by Hatter +--毒蛇の怨念 +--Viper's Grudge +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - -- Non-Reptiles cannot attack or activate their effects + --Non-Reptiles cannot attack or activate their effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TRIGGER) @@ -19,7 +19,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) c:RegisterEffect(e2) - -- Special Summon Reptile from Deck + --Special Summon Reptile from Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -40,7 +40,7 @@ function s.initial_effect(c) local e4a=e4:Clone() e4a:SetCode(EVENT_BE_MATERIAL) c:RegisterEffect(e4a) - -- Return banished Reptiles to GY + --Return banished Reptiles to GY local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,1)) e5:SetCategory(CATEGORY_TOGRAVE) @@ -94,6 +94,6 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_REPTILE),tp,LOCATION_REMOVED,0,nil) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c16849715.lua b/official/c16849715.lua index 3c212bc9d2..336263d4d2 100644 --- a/official/c16849715.lua +++ b/official/c16849715.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c1686814.lua b/official/c1686814.lua index 6450ee621b..a6a2b3e931 100644 --- a/official/c1686814.lua +++ b/official/c1686814.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e5:SetValue(1) c:RegisterEffect(e5) end -s.listed_series={0xc2} +s.listed_series={SET_POWER_TOOL} function s.sprfilter(c) return c:IsFaceup() and c:GetLevel()>4 and c:IsAbleToGraveAsCost() end @@ -90,7 +90,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,tp) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0xc2) or ((c:GetLevel()==7 or c:GetLevel()==8) and c:IsRace(RACE_DRAGON))) + return (c:IsSetCard(SET_POWER_TOOL) or ((c:GetLevel()==7 or c:GetLevel()==8) and c:IsRace(RACE_DRAGON))) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -106,4 +106,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.tgcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_SYNCHRO),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c1688285.lua b/official/c1688285.lua index 2de1de5436..9a5765cc80 100644 --- a/official/c1688285.lua +++ b/official/c1688285.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1)) + e2:SetCost(Cost.Detach(1,1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c16886617.lua b/official/c16886617.lua index 54842b538c..41e25b2c2e 100644 --- a/official/c16886617.lua +++ b/official/c16886617.lua @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c1689516.lua b/official/c1689516.lua index 9a967c5e4f..9debdfe0d6 100644 --- a/official/c1689516.lua +++ b/official/c1689516.lua @@ -9,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST),tp,LOCATION_MZONE,0,1,nil) end end @@ -24,13 +21,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_BEAST),tp,LOCATION_MZONE,0,nil) local atk=#g*200 local c=e:GetHandler() - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16898077.lua b/official/c16898077.lua index cb916ae455..a8a90280b5 100644 --- a/official/c16898077.lua +++ b/official/c16898077.lua @@ -1,4 +1,5 @@ --ジャイアント・ボマー・エアレイド +--Flying Fortress SKY FIRE local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -81,7 +82,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.dfilter(c,e,sp) return c:GetSummonPlayer()==sp and (not e or c:IsRelateToEffect(e)) @@ -100,7 +101,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp~=tp + return Duel.IsTurnPlayer(1-tp) and rp~=tp end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -115,7 +116,7 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon3(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp~=tp + return Duel.IsTurnPlayer(1-tp) and rp~=tp end function s.sfilter(c,e) return c:IsFacedown() and (not e or c:IsRelateToEffect(e)) @@ -132,4 +133,4 @@ function s.damop3(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and #g~=0 and Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Damage(1-tp,800,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16909657.lua b/official/c16909657.lua index b7e3bfae2f..c371117b36 100644 --- a/official/c16909657.lua +++ b/official/c16909657.lua @@ -1,4 +1,5 @@ --レプティレス・スキュラ +--Reptilianne Scylla local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,12 +31,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c16923472.lua b/official/c16923472.lua index 9089ece709..b7f6bea717 100644 --- a/official/c16923472.lua +++ b/official/c16923472.lua @@ -1,4 +1,5 @@ --ゼンマイハンター +--Wind-Up Hunter local s,id=GetID() function s.initial_effect(c) --handes @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:GetCode()~=id end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil) end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) Duel.SendtoGrave(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c16940215.lua b/official/c16940215.lua index 3d39acc352..597becdfb4 100644 --- a/official/c16940215.lua +++ b/official/c16940215.lua @@ -17,12 +17,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.discon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x2a) and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_NATURIA) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -43,4 +43,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c16946849.lua b/official/c16946849.lua index b1625f53bc..fb27573475 100644 --- a/official/c16946849.lua +++ b/official/c16946849.lua @@ -1,4 +1,5 @@ --人造天使 +--Synthetic Seraphim local s,id=GetID() function s.initial_effect(c) --activate @@ -22,4 +23,4 @@ end function s.tokenop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c16947147.lua b/official/c16947147.lua index 6c87863cc5..2c2a0328ca 100644 --- a/official/c16947147.lua +++ b/official/c16947147.lua @@ -1,4 +1,5 @@ --SRメンコート +--Speedroid Menko local s,id=GetID() function s.initial_effect(c) --spsummon @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c16955631.lua b/official/c16955631.lua index f47e8edc9f..f604cc64c6 100644 --- a/official/c16955631.lua +++ b/official/c16955631.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c16956455.lua b/official/c16956455.lua index 1c707cbfc9..1759db6320 100644 --- a/official/c16956455.lua +++ b/official/c16956455.lua @@ -1,4 +1,5 @@ --賢者ケイローン +--Chiron the Mage local s,id=GetID() function s.initial_effect(c) --special summon @@ -19,7 +20,7 @@ function s.cfilter(c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end diff --git a/official/c16958382.lua b/official/c16958382.lua index 7471bf5e86..50d7139a2c 100644 --- a/official/c16958382.lua +++ b/official/c16958382.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={27564031} -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} function s.spcon(e,c) return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,id),e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -40,7 +40,7 @@ function s.descon(e) return not (Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,27564031),e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(27564031)) end function s.costfilter(c) - return c:IsSetCard(0x23) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MALEFIC) and c:IsAbleToGraveAsCost() end function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,12 +63,12 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,0)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) @@ -84,5 +84,5 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end end function s.atktg(e,c) - return not c:IsSetCard(0x23) -end + return not c:IsSetCard(SET_MALEFIC) +end \ No newline at end of file diff --git a/official/c16960120.lua b/official/c16960120.lua index 30956ae10d..b8483bdeeb 100644 --- a/official/c16960120.lua +++ b/official/c16960120.lua @@ -1,5 +1,5 @@ --オラゴンメイド・レィルル ---Dragonmaid Tillroo +--Kitchen Dragonmaid local s,id=GetID() function s.initial_effect(c) --search @@ -20,20 +20,20 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} s.listed_names={} function s.thfilter(c) - return not c:IsCode(id) and c:IsSetCard(0x133) and c:IsAbleToHand() and c:IsMonster() + return not c:IsCode(id) and c:IsSetCard(SET_DRAGONMAID) and c:IsAbleToHand() and c:IsMonster() end function s.disfilter(c) - return c:IsSetCard(0x133) and c:IsMonster() + return c:IsSetCard(SET_DRAGONMAID) and c:IsMonster() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,19 +52,19 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter2(c,e,tp) - return c:IsLevel(8) and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevel(8) and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c16960351.lua b/official/c16960351.lua index 39e6094604..5485df25e0 100644 --- a/official/c16960351.lua +++ b/official/c16960351.lua @@ -1,4 +1,5 @@ --幻界突破 +--Dracocension local s,id=GetID() function s.initial_effect(c) --Activate @@ -51,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) e1:SetValue(LOCATION_DECKSHF) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c16968936.lua b/official/c16968936.lua index b21dd90d8e..4aad97c921 100644 --- a/official/c16968936.lua +++ b/official/c16968936.lua @@ -82,4 +82,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) rc:RegisterEffect(e2,true) end rc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) -end +end \ No newline at end of file diff --git a/official/c16970158.lua b/official/c16970158.lua index 0e3e44fe71..f4a5cdd725 100644 --- a/official/c16970158.lua +++ b/official/c16970158.lua @@ -23,4 +23,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c1697104.lua b/official/c1697104.lua index 20a083f2c6..3b21909afd 100644 --- a/official/c1697104.lua +++ b/official/c1697104.lua @@ -1,6 +1,5 @@ --PSYフレームギア・ε --PSY-Framegear Epsilon - local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -26,12 +25,11 @@ function s.initial_effect(c) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.listed_names={CARD_PSYFRAME_DRIVER} - function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return ep==1-tp and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,CARD_PSYFRAME_LAMBDA)) end function s.spfilter(c,e,tp) @@ -42,8 +40,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) @@ -53,15 +51,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g==0 then return end local tc=g:GetFirst() local c=e:GetHandler() local fid=c:GetFieldID() Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() g:AddCard(c) g:KeepAlive() diff --git a/official/c16984449.lua b/official/c16984449.lua index a3c5362810..acfefd1ba9 100644 --- a/official/c16984449.lua +++ b/official/c16984449.lua @@ -11,16 +11,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(Gemini.EffectStatusCondition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.filter(c,e,tp) return c:IsType(TYPE_GEMINI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -34,9 +29,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then tc:EnableGeminiStatus() - tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,64) + tc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,64) end Duel.SpecialSummonComplete() end \ No newline at end of file diff --git a/official/c16990348.lua b/official/c16990348.lua index ac41cf939b..7a25f76394 100644 --- a/official/c16990348.lua +++ b/official/c16990348.lua @@ -1,5 +1,5 @@ --猛進する剣闘獣 ---Mad Gladiator Beasts +--Gladiator Beast Charge --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=c end - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x19),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x19),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),tp,LOCATION_MZONE,0,nil) local ct=g:GetClassCount(Card.GetCode) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c) diff --git a/official/c17000165.lua b/official/c17000165.lua index 1f8dedee42..e2f8a5f576 100644 --- a/official/c17000165.lua +++ b/official/c17000165.lua @@ -1,14 +1,14 @@ --- レプティレス・リコイル --- Reptilianne Recoil --- Scripted by Hatter +--レプティレス・リコイル +--Reptilianne Recoil +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Destroy and Special Summon + --Destroy and Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Take control of opponent monster and Special Summon token + --Take control of opponent monster and Special Summon token local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) diff --git a/official/c17008760.lua b/official/c17008760.lua index 6bc674f034..69df09e82a 100644 --- a/official/c17008760.lua +++ b/official/c17008760.lua @@ -1,7 +1,6 @@ --原質の円環炉 --Materiactor Annulus --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) diff --git a/official/c17016131.lua b/official/c17016131.lua index f916ca9cb2..0497106e47 100644 --- a/official/c17016131.lua +++ b/official/c17016131.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCost(s.handcost) e3:SetTarget(s.handtg) e3:SetOperation(s.handop) - e3:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e3:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e3) --Look at opponent's extra deck and send 1 monster from it to GY local e4=e3:Clone() @@ -46,16 +46,16 @@ function s.initial_effect(c) e4:SetOperation(s.extdop) c:RegisterEffect(e4) end -s.listed_series={0x13f} +s.listed_series={SET_PLUNDER_PATROLL} function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not eg then return end for rc in aux.Next(eg) do if rc:IsStatus(STATUS_OPPO_BATTLE) then if rc:IsRelateToBattle() then - if rc:IsControler(tp) and rc:IsSetCard(0x13f) then return true end + if rc:IsControler(tp) and rc:IsSetCard(SET_PLUNDER_PATROLL) then return true end else - if rc:IsPreviousControler(tp) and rc:IsPreviousSetCard(0x13f) then return true end + if rc:IsPreviousControler(tp) and rc:IsPreviousSetCard(SET_PLUNDER_PATROLL) then return true end end end end @@ -74,7 +74,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x13f),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PLUNDER_PATROLL),tp,LOCATION_MZONE,0,1,nil) end function s.handcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -98,7 +98,7 @@ function s.handop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-p,g) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD) local sg=g:FilterSelect(1-p,Card.IsMonster,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(p) end end diff --git a/official/c17016362.lua b/official/c17016362.lua index 5a889c2c7b..f55a2efd72 100644 --- a/official/c17016362.lua +++ b/official/c17016362.lua @@ -1,6 +1,5 @@ --Emトラピーズ・マジシャン --Performage Trapeze Magician - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -25,7 +24,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetHintTiming(0,TIMING_MAIN_END) e2:SetCondition(s.mtcon) - e2:SetCost(s.mtcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.mttg) e2:SetOperation(s.mtop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,18 +39,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xc6} - +s.listed_series={SET_PERFORMAGE} function s.damval(e,re,val,r,rp,rc) local atk=e:GetHandler():GetAttack() if val<=atk then return 0 else return val end end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.IsAbleToEnterBP() -end -function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsPhase(PHASE_MAIN1) and Duel.IsAbleToEnterBP() end function s.mtfilter(c) return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) @@ -75,20 +69,20 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) --Destroy it at end of battle phase local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCountLimit(1) e2:SetLabel(fid) e2:SetLabelObject(tc) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end @@ -106,7 +100,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) or (rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAGE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c17032740.lua b/official/c17032740.lua index 529107e78c..5743d87a35 100644 --- a/official/c17032740.lua +++ b/official/c17032740.lua @@ -27,7 +27,7 @@ function s.contactfil(tp) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) diff --git a/official/c17052477.lua b/official/c17052477.lua index c9d48a6c0d..bb9a56e027 100644 --- a/official/c17052477.lua +++ b/official/c17052477.lua @@ -1,4 +1,5 @@ --守護神の宝札 +--Guarded Treasure local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,7 +23,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,5,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17063599.lua b/official/c17063599.lua index 74451f03bf..78a1e5e296 100644 --- a/official/c17063599.lua +++ b/official/c17063599.lua @@ -75,10 +75,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCondition(s.rcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c17078030.lua b/official/c17078030.lua index b69ad560c0..18a5a1d7f9 100644 --- a/official/c17078030.lua +++ b/official/c17078030.lua @@ -40,4 +40,4 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.atktarget(e,c) return c:GetAttack()<=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c17086528.lua b/official/c17086528.lua index 57d718f150..2ebf5b14ec 100644 --- a/official/c17086528.lua +++ b/official/c17086528.lua @@ -1,4 +1,5 @@ --相生の魔術師 +--Xiangsheng Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -67,7 +68,7 @@ function s.rkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RANK) e1:SetValue(lc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -95,7 +96,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c17092736.lua b/official/c17092736.lua index abf1777d14..ca6fd08797 100644 --- a/official/c17092736.lua +++ b/official/c17092736.lua @@ -1,4 +1,5 @@ --古代の遠眼鏡 +--Ancient Telescope local s,id=GetID() function s.initial_effect(c) --confirm @@ -23,4 +24,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ConfirmCards(p,g) end -end +end \ No newline at end of file diff --git a/official/c1710476.lua b/official/c1710476.lua index 6e11c353fd..dac0af40bc 100644 --- a/official/c1710476.lua +++ b/official/c1710476.lua @@ -35,4 +35,4 @@ function s.descon(e) end function s.antarget(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c1712616.lua b/official/c1712616.lua index 7efab97abb..775e0d76ae 100644 --- a/official/c1712616.lua +++ b/official/c1712616.lua @@ -1,5 +1,5 @@ +--騎甲虫空殺舞隊 --Beetrooper Fly & Sting ---Scripted by fiftyfour local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,13 +27,13 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x172} +s.listed_series={SET_BEETROOPER} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x172) + return c:IsFaceup() and c:IsSetCard(SET_BEETROOPER) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and ep==1-tp + return Duel.IsChainNegatable(ev) and re:IsMonsterEffect() and ep==1-tp end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -51,7 +51,7 @@ function s.setfilter(c) return c:IsFaceup() and c:IsRace(RACE_INSECT) and c:IsAttackAbove(3000) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END and Duel.IsTurnPlayer(tp) + return Duel.IsPhase(PHASE_END) and Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_MZONE,0,1,nil) end function s.costfilter(c) @@ -72,4 +72,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end +end \ No newline at end of file diff --git a/official/c17129783.lua b/official/c17129783.lua index a59686d92b..077482b74a 100644 --- a/official/c17129783.lua +++ b/official/c17129783.lua @@ -6,10 +6,10 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x53)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_CONSTELLAR)) c:RegisterEffect(e1) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} \ No newline at end of file diff --git a/official/c17132130.lua b/official/c17132130.lua index 9c824a2106..e72546a204 100644 --- a/official/c17132130.lua +++ b/official/c17132130.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.lpop) c:RegisterEffect(e3) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.spfilter(c,tp) - return c:IsSetCard(0xc008) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_DESTINY_HERO) and (c:IsControler(tp) or c:IsFaceup()) end function s.spcon(e,c) if c==nil then return true end @@ -73,7 +73,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_CONTROL)&~RESET_TOFIELD|RESET_PHASE|PHASE_STANDBY) @@ -86,4 +86,4 @@ function s.lpc(e,tp,eg,ep,ev,re,r,rp) end function s.lpcop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end +end \ No newline at end of file diff --git a/official/c17141718.lua b/official/c17141718.lua index ae397b534e..f2ca5b5073 100644 --- a/official/c17141718.lua +++ b/official/c17141718.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe6) and c:IsLevelBelow(7) + return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(7) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -57,10 +57,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c) - return not c:IsSetCard(0xe6) + return not c:IsSetCard(SET_FLOWER_CARDIAN) end function s.filter(c) - return c:IsSetCard(0xe6) and c:IsAbleToDeck() and not c:IsPublic() + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsAbleToDeck() and not c:IsPublic() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) @@ -80,4 +80,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,ct,REASON_EFFECT) Duel.ShuffleHand(p) end -end +end \ No newline at end of file diff --git a/official/c17151328.lua b/official/c17151328.lua index e6859241c7..bb5fe39759 100644 --- a/official/c17151328.lua +++ b/official/c17151328.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c17170970.lua b/official/c17170970.lua index f3da21664b..e815d03617 100644 --- a/official/c17170970.lua +++ b/official/c17170970.lua @@ -62,14 +62,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17178486.lua b/official/c17178486.lua index 83e7711e6c..9b0b6ad5eb 100644 --- a/official/c17178486.lua +++ b/official/c17178486.lua @@ -1,4 +1,5 @@ --ライフチェンジャー +--Life Equalizer local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,4 +16,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,3000) Duel.SetLP(1-tp,3000) -end +end \ No newline at end of file diff --git a/official/c17183908.lua b/official/c17183908.lua index 00cb189f86..c089f95258 100644 --- a/official/c17183908.lua +++ b/official/c17183908.lua @@ -1,4 +1,5 @@ --竜星の輝跡 +--Yang Zing Path local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.filter(c) - return c:IsSetCard(0x9e) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_YANG_ZING) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -28,12 +29,12 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17185260.lua b/official/c17185260.lua index 464688c0f6..d2782a33a4 100644 --- a/official/c17185260.lua +++ b/official/c17185260.lua @@ -1,4 +1,5 @@ --インフェルノ・ハンマー +--Inferno Hammer local s,id=GetID() function s.initial_effect(c) --pos @@ -28,4 +29,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c17189532.lua b/official/c17189532.lua index 1bf18f5469..8f790efcae 100644 --- a/official/c17189532.lua +++ b/official/c17189532.lua @@ -1,4 +1,5 @@ --ファントム・バウンサー +--Phantom Bounzer local s,id=GetID() function s.initial_effect(c) --search @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6b} +s.listed_series={SET_BOUNZER} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) end function s.filter(c) - return c:IsSetCard(0x6b) and c:IsAbleToHand() + return c:IsSetCard(SET_BOUNZER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,2,nil) end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=sg:Select(tp,2,2,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) -end +end \ No newline at end of file diff --git a/official/c17189677.lua b/official/c17189677.lua index 3147621abc..e3843a2839 100644 --- a/official/c17189677.lua +++ b/official/c17189677.lua @@ -1,4 +1,5 @@ --スネーク・レイン +--Snake Rain local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.tgfilter(c) return c:IsRace(RACE_REPTILE) and c:IsMonster() and c:IsAbleToGrave() @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,4,4,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17194258.lua b/official/c17194258.lua index 548d4287bc..126252b722 100644 --- a/official/c17194258.lua +++ b/official/c17194258.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter1(c,tp) - return c.material and c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) + return c.material and c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c) end function s.filter2(c,fc) if c:IsForbidden() or not c:IsAbleToHand() then return false end @@ -21,7 +21,7 @@ function s.filter2(c,fc) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) @@ -29,7 +29,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #cg==0 then return end Duel.ConfirmCards(1-tp,cg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,cg:GetFirst()) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,cg:GetFirst()) local tc=g:GetFirst() if not tc then return end if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -60,5 +60,5 @@ function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) end function s.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) -end + return re:GetHandler():IsCode(e:GetLabel()) and re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c17197110.lua b/official/c17197110.lua index 94a64d0b68..5cfff08e1c 100644 --- a/official/c17197110.lua +++ b/official/c17197110.lua @@ -1,7 +1,6 @@ --氷結界に至る晴嵐 ---The Calm After the Ice Barrier’s Storm +--Winds Over the Ice Barrier --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -23,17 +22,16 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end --Lists "Ice Barrier" archetype -s.listed_series={0x2f} - +s.listed_series={SET_ICE_BARRIER} --Check for level 4 or lower "Ice Barrier" monsters function s.spfilter(c,e,tp) - return c:IsSetCard(0x2f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsMonster() and c:IsLevelBelow(4) + return c:IsSetCard(SET_ICE_BARRIER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsMonster() and c:IsLevelBelow(4) end --Tribute up to the number of cards in s.spfilter function s.check(ct) @@ -48,10 +46,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=#cg if chk==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return false end - return ct>0 and Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,99,false,s.check(cg),nil,0x2f) + return ct>0 and Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,99,false,s.check(cg),nil,SET_ICE_BARRIER) end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,ct,false,s.check(cg),nil,0x2f) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,ct,false,s.check(cg),nil,SET_ICE_BARRIER) Duel.Release(g,REASON_COST) e:SetLabel(#g) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,#g,tp,LOCATION_DECK) @@ -73,15 +71,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for an "Ice Barrier" monster function s.thfilter(c) - return c:IsSetCard(0x2f) and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end --Add 1 of your "Ice Barrier" monsters, that is banished or in GY function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -89,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17201174.lua b/official/c17201174.lua index 7fcc738fe9..20925f5637 100644 --- a/official/c17201174.lua +++ b/official/c17201174.lua @@ -1,4 +1,5 @@ --ハンマー・シャーク +--Hammer Shark local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,7 +28,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17214465.lua b/official/c17214465.lua index a3191c2148..9f6199a59f 100644 --- a/official/c17214465.lua +++ b/official/c17214465.lua @@ -1,4 +1,5 @@ --海神の巫女 +--Maiden of the Aqua local s,id=GetID() function s.initial_effect(c) --field @@ -9,4 +10,4 @@ function s.initial_effect(c) e1:SetValue(CARD_UMI) c:RegisterEffect(e1) end -s.listed_names={CARD_UMI} +s.listed_names={CARD_UMI} \ No newline at end of file diff --git a/official/c17217034.lua b/official/c17217034.lua index 42256a9220..4081876999 100644 --- a/official/c17217034.lua +++ b/official/c17217034.lua @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17228908.lua b/official/c17228908.lua index ad722e50c6..d67cddaf0d 100644 --- a/official/c17228908.lua +++ b/official/c17228908.lua @@ -117,4 +117,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) end Duel.Destroy(tg,REASON_EFFECT|REASON_REPLACE) -end +end \ No newline at end of file diff --git a/official/c17236839.lua b/official/c17236839.lua index c0ca597168..2937a1f87f 100644 --- a/official/c17236839.lua +++ b/official/c17236839.lua @@ -10,7 +10,7 @@ end function s.stage2(e,tc,tp,sg,chk) if chk==1 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -34,4 +34,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17241370.lua b/official/c17241370.lua index b63855222c..1805fd3de8 100644 --- a/official/c17241370.lua +++ b/official/c17241370.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_FLIP) c:RegisterEffect(e3) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.tdfilter(c) - return c:IsSetCard(0x3a) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_GISHKI) and c:IsMonster() and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end @@ -37,6 +37,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17241941.lua b/official/c17241941.lua index 6e099443c9..c63dd7cadf 100644 --- a/official/c17241941.lua +++ b/official/c17241941.lua @@ -1,7 +1,6 @@ --ダイカミナリ・ジャイクロプス ---Daikaminari Gyclops +--Gigathunder Giclops --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) diff --git a/official/c17243896.lua b/official/c17243896.lua index 5810dca106..b1d751cfac 100644 --- a/official/c17243896.lua +++ b/official/c17243896.lua @@ -1,4 +1,5 @@ --グランド・スパイダー +--Ground Spider local s,id=GetID() function s.initial_effect(c) --pos @@ -32,4 +33,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c17255673.lua b/official/c17255673.lua index 75799ddd7e..a4211f12ae 100644 --- a/official/c17255673.lua +++ b/official/c17255673.lua @@ -1,14 +1,14 @@ --- 天御巫の闔 --- Doorway of the Celestial Mikanko --- Scripted by Hatter +--天御巫の闔 +--Heavenly Gate of the Mikanko +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - -- Opponent's monsters must attack equipped monsters + --Opponent's monsters must attack equipped monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_MUST_ATTACK) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) e2:SetValue(aux.TargetBoolFunction(s.atkfilter)) c:RegisterEffect(e2) - -- Prevent activations during battle + --Prevent activations during battle local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCondition(s.actcon) e3:SetValue(1) c:RegisterEffect(e3) - -- Attack another monster in a row + --Attack another monster in a row local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetOperation(s.caop) c:RegisterEffect(e4) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.atkfilter(c) return c:GetEquipCount()>0 end @@ -50,14 +50,14 @@ function s.atkcon(e) end function s.actcon(e) local bc=Duel.GetBattleMonster(e:GetHandlerPlayer()) - return bc and bc:IsFaceup() and bc:IsSetCard(0x18e) + return bc and bc:IsFaceup() and bc:IsSetCard(SET_MIKANKO) end function s.cacostfilter(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToGrave() end function s.cacon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsSetCard(0x18e) and bc==Duel.GetAttacker() and bc:CanChainAttack(0,true) + return bc and bc:IsSetCard(SET_MIKANKO) and bc==Duel.GetAttacker() and bc:CanChainAttack(0,true) end function s.cacost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cacostfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -72,7 +72,7 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) bc:RegisterEffect(e1) Duel.ChainAttack() end \ No newline at end of file diff --git a/official/c17257342.lua b/official/c17257342.lua index 9553dfea44..f5aee570aa 100644 --- a/official/c17257342.lua +++ b/official/c17257342.lua @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,5 +64,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c17259470.lua b/official/c17259470.lua index 603cd5fbcf..1519eb2b94 100644 --- a/official/c17259470.lua +++ b/official/c17259470.lua @@ -1,4 +1,5 @@ --ゾンビ・マスター +--Zombie Master local s,id=GetID() function s.initial_effect(c) --special summon @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17264592.lua b/official/c17264592.lua index 213fc8942c..ac70ae1917 100644 --- a/official/c17264592.lua +++ b/official/c17264592.lua @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetCondition(s.sscon) c:RegisterEffect(e3) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -62,21 +62,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.ssfilter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_UA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.ssop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ssfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ssfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.sscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp -end + return Duel.IsTurnPlayer(1-tp) +end \ No newline at end of file diff --git a/official/c17266660.lua b/official/c17266660.lua index 3316b5110a..31e8d491a9 100644 --- a/official/c17266660.lua +++ b/official/c17266660.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return ep~=tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.costfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() @@ -42,4 +42,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17285476.lua b/official/c17285476.lua index b73aaa7c1a..12224f0166 100644 --- a/official/c17285476.lua +++ b/official/c17285476.lua @@ -1,4 +1,5 @@ --ナチュル・モスキート +--Naturia Mosquito local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,10 +21,10 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.atcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2a),e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.reftg(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(0x2a) -end + return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(SET_NATURIA) +end \ No newline at end of file diff --git a/official/c17286057.lua b/official/c17286057.lua index ffdfc27d18..2108c89c08 100644 --- a/official/c17286057.lua +++ b/official/c17286057.lua @@ -83,7 +83,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) diff --git a/official/c17313545.lua b/official/c17313545.lua index 68663f5268..4634ac84e4 100644 --- a/official/c17313545.lua +++ b/official/c17313545.lua @@ -1,4 +1,5 @@ --ゴーレム +--Brain Golem local s,id=GetID() function s.initial_effect(c) --disable @@ -28,4 +29,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c17315396.lua b/official/c17315396.lua index 33d5d39af4..7f4f4812b7 100644 --- a/official/c17315396.lua +++ b/official/c17315396.lua @@ -22,7 +22,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,2)) @@ -30,7 +30,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spfilter(c,e,tp) return c:IsCode(78552773) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -54,10 +54,10 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) > 0 and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1))then + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1))then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17322533.lua b/official/c17322533.lua index 1e86984b58..3ecb7829f7 100644 --- a/official/c17322533.lua +++ b/official/c17322533.lua @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Draw(p,d,REASON_EFFECT)~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DRAW,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DRAW,0,1) end end function s.tgcon(e) @@ -54,4 +54,4 @@ function s.tgcon(e) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17328157.lua b/official/c17328157.lua index 3b80e25850..481526f39c 100644 --- a/official/c17328157.lua +++ b/official/c17328157.lua @@ -1,4 +1,5 @@ --SRバンブー・ホース +--Speedroid Horse Stilts local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,14 +19,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_SPEEDROID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,4 +54,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17330916.lua b/official/c17330916.lua index b3210702a5..96c42b2e53 100644 --- a/official/c17330916.lua +++ b/official/c17330916.lua @@ -1,4 +1,5 @@ --EMモンキーボード +--Performapal Monkeyboard local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCost(s.reg) c:RegisterEffect(e1) - --scale + --This card's Pendulum Scale becomes 4 local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_LSCALE) @@ -23,17 +24,17 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EFFECT_CHANGE_RSCALE) c:RegisterEffect(e3) - --lvdown + --Reduce the Levels of monsters in your hand by 1 local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_HAND) e4:SetCountLimit(1) - e4:SetCost(s.lvcost) + e4:SetCost(Cost.SelfDiscard) e4:SetTarget(s.lvtg) e4:SetOperation(s.lvop) c:RegisterEffect(e4) - --to hand + --Add 1 Level 4 or lower "Performapal" monster from your Deck to your hand local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e5:SetType(EFFECT_TYPE_IGNITION) @@ -44,26 +45,25 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.sccon(e) - return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x9f) + return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),SET_PERFORMAPAL) end function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.thfilter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x9f) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsSetCard(SET_PERFORMAPAL) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then @@ -71,12 +71,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD) -end function s.filter(c) - return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsMonster() and c:IsLevelAbove(2) + return c:IsSetCard({SET_PERFORMAPAL,SET_ODD_EYES}) and c:IsMonster() and c:IsLevelAbove(2) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end @@ -91,13 +87,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) local hg=Duel.GetMatchingGroup(s.afilter,tp,LOCATION_HAND,0,nil,g:GetFirst():GetCode()) - local tc=hg:GetFirst() - for tc in aux.Next(hg) do + for tc in hg:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c1735088.lua b/official/c1735088.lua index 49f302eae1..830fdc46ef 100644 --- a/official/c1735088.lua +++ b/official/c1735088.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x58),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WIND_UP),2,2) c:EnableReviveLimit() --search local e1=Effect.CreateEffect(c) @@ -39,12 +39,12 @@ function s.initial_effect(c) e3:SetOperation(s.matop) c:RegisterEffect(e3) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) - return c:IsSetCard(0x58) and c:IsAbleToHand() + return c:IsSetCard(SET_WIND_UP) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,7 +63,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end end function s.cfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsAbleToRemoveAsCost(POS_FACEDOWN) and Duel.GetMZoneCount(tp,c)>0 + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:IsAbleToRemoveAsCost(POS_FACEDOWN) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) @@ -95,7 +95,7 @@ function s.matcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:IsType(TYPE_XYZ) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.matfilter(chkc) end @@ -110,5 +110,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end - +end \ No newline at end of file diff --git a/official/c17363041.lua b/official/c17363041.lua index a48ee3403e..0b6ff3d612 100644 --- a/official/c17363041.lua +++ b/official/c17363041.lua @@ -1,4 +1,5 @@ --C・チッキー +--Chrysalis Chicky local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,25 +18,21 @@ s.listed_names={54959865,42015635} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(42015635) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(54959865) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not Duel.IsEnvironment(42015635) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17375316.lua b/official/c17375316.lua index 80e70115e0..cb4aa32d23 100644 --- a/official/c17375316.lua +++ b/official/c17375316.lua @@ -1,4 +1,5 @@ --押収 +--Confiscation local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end Duel.SetTargetPlayer(tp) @@ -28,7 +25,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(p,g) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD) local sg=g:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c17377751.lua b/official/c17377751.lua index a19dc83549..9459c2e5e9 100644 --- a/official/c17377751.lua +++ b/official/c17377751.lua @@ -1,4 +1,5 @@ --BF-煌星のグラム +--Blackwing - Gram the Shining Star local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.spcon(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c,e,tp) - return not c:IsType(TYPE_TUNER) and c:IsLevelBelow(4) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) + return not c:IsType(TYPE_TUNER) and c:IsLevelBelow(4) and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -44,13 +45,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c17382973.lua b/official/c17382973.lua index ee15418870..2b8c892396 100644 --- a/official/c17382973.lua +++ b/official/c17382973.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x120),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PRANK_KIDS),2,2) --Add from Deck to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -25,17 +25,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.thtg2) e2:SetOperation(s.thop2) c:RegisterEffect(e2) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} function s.thcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter1(c) - return c:IsSetCard(0x120) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_PRANK_KIDS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end @@ -49,12 +49,8 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.thfilter2(c,e) - return c:IsSetCard(0x120) and not c:IsLinkMonster() and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() + return c:IsSetCard(SET_PRANK_KIDS) and not c:IsLinkMonster() and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() end function s.thcheck(sg,e,tp) return sg:GetClassCount(Card.GetCode)==2 @@ -72,4 +68,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17390179.lua b/official/c17390179.lua index c6e743e30a..d0b9af9850 100644 --- a/official/c17390179.lua +++ b/official/c17390179.lua @@ -1,6 +1,7 @@ --閃光の騎士 +--Flash Knight local s,id=GetID() function s.initial_effect(c) --pendulum summon Pendulum.AddProcedure(c) -end +end \ No newline at end of file diff --git a/official/c17393207.lua b/official/c17393207.lua index c8a61195df..c93fb977a4 100644 --- a/official/c17393207.lua +++ b/official/c17393207.lua @@ -1,4 +1,5 @@ --墓守の司令官 +--Gravekeeper's Commandant local s,id=GetID() function s.initial_effect(c) --search @@ -7,17 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={CARD_NECROVALLEY} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(CARD_NECROVALLEY) and c:IsAbleToHand() end @@ -31,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c17412721.lua b/official/c17412721.lua index 4d459d722c..fbc94a4b0b 100644 --- a/official/c17412721.lua +++ b/official/c17412721.lua @@ -1,4 +1,5 @@ --旧神ノーデン +--Elder Entity Norden local s,id=GetID() function s.initial_effect(c) --fusion material @@ -41,12 +42,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() if c:IsRelateToEffect(e) then @@ -63,4 +64,4 @@ function s.leave(e,tp,eg,ep,ev,re,r,rp) if tc and c:IsRelateToCard(tc) and tc:IsRelateToCard(c) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17415895.lua b/official/c17415895.lua index f61e839fd4..fa69b1a9c5 100644 --- a/official/c17415895.lua +++ b/official/c17415895.lua @@ -1,6 +1,5 @@ --ヴォルカニック・エッジ --Volcanic Slicer - local s,id=GetID() function s.initial_effect(c) --Inflict 500 damage @@ -23,7 +22,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c17418744.lua b/official/c17418744.lua index 1337e2038c..808b346017 100644 --- a/official/c17418744.lua +++ b/official/c17418744.lua @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) @@ -40,23 +40,23 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,1)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsAttribute(0x6f) + return c:IsAttribute(ATTRIBUTE_ALL&~ATTRIBUTE_LIGHT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x55,TYPES_TOKEN,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_PHOTON,TYPES_TOKEN,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x55,TYPES_TOKEN,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_PHOTON,TYPES_TOKEN,2000,0,4,RACE_THUNDER,ATTRIBUTE_LIGHT) then for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) @@ -64,16 +64,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c17427333.lua b/official/c17427333.lua index 9375151fd0..76adf1c72e 100644 --- a/official/c17427333.lua +++ b/official/c17427333.lua @@ -1,9 +1,6 @@ --E.M.R. --E.M.R. --Scripted by DyXel - -DIDNT_SKIP_COST=0xDEADBEEF - local s,id=GetID() function s.initial_effect(c) --Tribute and destroy based on og ATK @@ -12,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e1:SetCost(s.descost) e1:SetTarget(s.destg) e1:SetOperation(s.desact) @@ -23,14 +20,14 @@ function s.costfilter(c,tc) and Duel.IsExistingTarget(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(tc,c)) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - e:SetLabel(DIDNT_SKIP_COST) + e:SetLabel(100) if chk==0 then return true end end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chk==0 then - if e:GetLabel()~=DIDNT_SKIP_COST then return false end + if e:GetLabel()~=100 then return false end return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,c) end local tg=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,c) diff --git a/official/c17444133.lua b/official/c17444133.lua index 46712dc55e..c8fed6a30c 100644 --- a/official/c17444133.lua +++ b/official/c17444133.lua @@ -1,4 +1,5 @@ --カイザー・シーホース +--Kaiser Sea Horse local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) -end +end \ No newline at end of file diff --git a/official/c17462320.lua b/official/c17462320.lua index 4f904d9a11..c0529720a0 100644 --- a/official/c17462320.lua +++ b/official/c17462320.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DESTROYED) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c17465972.lua b/official/c17465972.lua index 025bc7b448..a8976df347 100644 --- a/official/c17465972.lua +++ b/official/c17465972.lua @@ -24,16 +24,16 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_COUNTER) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.cttg) c:RegisterEffect(e3) end -s.counter_place_list={0x1002,0x10} -s.listed_series={0x33} -s.listed_names={9012916} +s.counter_place_list={0x1002,COUNTER_FEATHER} +s.listed_series={SET_BLACKWING} +s.listed_names={CARD_BLACK_WINGED_DRAGON} function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) - and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end @@ -53,7 +53,7 @@ function s.wcfilter(c) return c:IsFaceup() and c:GetCounter(0x1002)==0 end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,9012916),tp,LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 + local b1=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_BLACK_WINGED_DRAGON),tp,LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 local b2=Duel.IsExistingMatchingCard(s.wcfilter,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return b1 or b2 end local op=0 @@ -72,10 +72,10 @@ function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.bwop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsCode,9012916),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsCode,CARD_BLACK_WINGED_DRAGON),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) if tc and ct>0 then - tc:AddCounter(0x10,ct) + tc:AddCounter(COUNTER_FEATHER,ct) end end function s.wcop(e,tp,eg,ep,ev,re,r,rp) @@ -83,4 +83,4 @@ function s.wcop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do tc:AddCounter(0x1002,1) end -end +end \ No newline at end of file diff --git a/official/c17475251.lua b/official/c17475251.lua index 3d62e63ca8..21fb0b6401 100644 --- a/official/c17475251.lua +++ b/official/c17475251.lua @@ -19,19 +19,19 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCondition(s.atkcon) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x79)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FIRE_FIST)) e2:SetValue(500) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0x7c,0x79} +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.setcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and e:GetHandler():GetPreviousControler()==tp end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -44,7 +44,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() end function s.atkcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) diff --git a/official/c17484499.lua b/official/c17484499.lua index 09c4f61231..ace26adb04 100644 --- a/official/c17484499.lua +++ b/official/c17484499.lua @@ -1,4 +1,5 @@ --現世と冥界の逆転 +--Exchange of the Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_DRAW_PHASE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH+EFFECT_COUNT_CODE_DUEL) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetOperation(s.activate) c:RegisterEffect(e1) end @@ -16,11 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>=15 and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=15 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SwapDeckAndGrave(tp) Duel.SwapDeckAndGrave(1-tp) -end +end \ No newline at end of file diff --git a/official/c17490535.lua b/official/c17490535.lua index 0e2a12bc34..38bafd2905 100644 --- a/official/c17490535.lua +++ b/official/c17490535.lua @@ -1,4 +1,5 @@ --エーリアン・ブレイン +--Alien Brain local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,8 +32,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_REPTILE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c17494901.lua b/official/c17494901.lua index 7306c9ddf9..bcc233363d 100644 --- a/official/c17494901.lua +++ b/official/c17494901.lua @@ -1,4 +1,5 @@ --ガガガボルト +--Gagagabolt local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x54),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17502671.lua b/official/c17502671.lua index 9de62b2521..90f7ecef04 100644 --- a/official/c17502671.lua +++ b/official/c17502671.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.spcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c17509503.lua b/official/c17509503.lua index 682a8dae9e..b01515868c 100644 --- a/official/c17509503.lua +++ b/official/c17509503.lua @@ -1,5 +1,5 @@ --一色即発 ---Breaking Point of the Normal +--The Revenge of the Normal -- local s,id=GetID() function s.initial_effect(c) @@ -31,5 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,ft,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end - +end \ No newline at end of file diff --git a/official/c17521642.lua b/official/c17521642.lua index b5e9d40245..7c61b3112d 100644 --- a/official/c17521642.lua +++ b/official/c17521642.lua @@ -1,4 +1,5 @@ --ゼロ・フォース +--Zero Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,tp) - return c:IsPreviousControler(tp) and c:GetControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) + return c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c17530001.lua b/official/c17530001.lua index 09c18e81ea..d1e14a0898 100644 --- a/official/c17530001.lua +++ b/official/c17530001.lua @@ -31,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,1) e1:SetTarget(s.tglimit) e1:SetLabel(dc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.tglimit(e,c) return c:GetLevel()==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c17535764.lua b/official/c17535764.lua index 4d9419ffbb..dcc0a5ba7a 100644 --- a/official/c17535764.lua +++ b/official/c17535764.lua @@ -44,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end --They see me rollin' ---They hatin' +--They hatin' \ No newline at end of file diff --git a/official/c17536995.lua b/official/c17536995.lua index 6c0f3fb5d8..69ec1d113c 100644 --- a/official/c17536995.lua +++ b/official/c17536995.lua @@ -12,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -31,6 +31,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c17540705.lua b/official/c17540705.lua index d56e19e0c4..d37fd2b847 100644 --- a/official/c17540705.lua +++ b/official/c17540705.lua @@ -1,4 +1,5 @@ --EMダグ・ダガーマン +--Performapal Dag Daggerman local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -44,16 +45,16 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.threg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_OATH,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.thfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -70,16 +71,16 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.drreg(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id+1)~=0 end function s.cfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -94,4 +95,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17548456.lua b/official/c17548456.lua index 1164764563..f0dcbfa770 100644 --- a/official/c17548456.lua +++ b/official/c17548456.lua @@ -4,19 +4,19 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --Synchro Summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x22),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_DINOSAUR),2,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_JURRAC),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_DINOSAUR),2,99) --Destroy all cards on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x22} +s.listed_series={SET_JURRAC} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) diff --git a/official/c17550376.lua b/official/c17550376.lua index c3a057aa40..12b27f47cc 100644 --- a/official/c17550376.lua +++ b/official/c17550376.lua @@ -37,7 +37,7 @@ function s.spcon(e,c) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_DREAMING_NEMLERIA),tp,LOCATION_EXTRA,0,1,nil) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.cfilter(c) return c:IsFacedown() and c:IsAbleToRemoveAsCost(POS_FACEDOWN) @@ -61,6 +61,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c17559367.lua b/official/c17559367.lua index 0d39a8bf84..51070232f1 100644 --- a/official/c17559367.lua +++ b/official/c17559367.lua @@ -1,4 +1,5 @@ --ディープ・ダイバー +--Deep Diver local s,id=GetID() function s.initial_effect(c) --search @@ -16,10 +17,10 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetCountLimit(1) e1:SetOperation(s.operation) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c17573739.lua b/official/c17573739.lua index fadbdf683f..e52159c9c9 100644 --- a/official/c17573739.lua +++ b/official/c17573739.lua @@ -1,4 +1,5 @@ --神禽王アレクトール +--Alector, Sovereign of Birds local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,1,id) @@ -43,19 +44,19 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c17589298.lua b/official/c17589298.lua index b387e3f7ed..b80a5e48c4 100644 --- a/official/c17589298.lua +++ b/official/c17589298.lua @@ -35,4 +35,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c17597059.lua b/official/c17597059.lua index a4ff2f0fe5..85566333ce 100644 --- a/official/c17597059.lua +++ b/official/c17597059.lua @@ -1,4 +1,5 @@ --バイサー・ショック +--Byser Shock local s,id=GetID() function s.initial_effect(c) --to hand @@ -28,4 +29,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17601919.lua b/official/c17601919.lua index 0df7b306b0..a18011305b 100644 --- a/official/c17601919.lua +++ b/official/c17601919.lua @@ -23,7 +23,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) --counter @@ -32,11 +32,11 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetTarget(s.addct) e2:SetOperation(s.addc) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --addown local e3=Effect.CreateEffect(c) @@ -45,7 +45,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_SZONE) e3:SetTargetRange(0,LOCATION_MZONE) e3:SetValue(s.adval) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EFFECT_UPDATE_DEFENSE) @@ -62,4 +62,4 @@ function s.addc(e,tp,eg,ep,ev,re,r,rp) end function s.adval(e,c) return e:GetHandler():GetCounter(0x2f)*-100 -end +end \ No newline at end of file diff --git a/official/c17626381.lua b/official/c17626381.lua index ea55bb5d86..dfacda7477 100644 --- a/official/c17626381.lua +++ b/official/c17626381.lua @@ -1,4 +1,5 @@ --補給部隊 +--Supply Squad local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -35,4 +36,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17639150.lua b/official/c17639150.lua index b4d932f22b..3bcae7fdc3 100644 --- a/official/c17639150.lua +++ b/official/c17639150.lua @@ -1,7 +1,8 @@ --機殻の生贄 +--Saqlifice local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0xaa)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_QLI)) --Atk up local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) @@ -32,15 +33,15 @@ function s.initial_effect(c) e6:SetOperation(s.thop) c:RegisterEffect(e6) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.effcon(e,c) - return c:IsSetCard(0xaa) + return c:IsSetCard(SET_QLI) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xaa) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_QLI) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c176392.lua b/official/c176392.lua index e412ec26bb..f67aa50bf4 100644 --- a/official/c176392.lua +++ b/official/c176392.lua @@ -24,40 +24,40 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={176393} -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.rfilter(c) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x1d) and not c:IsReason(REASON_REPLACE) + return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_KOAKI_MEIRU) and not c:IsReason(REASON_REPLACE) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDestructable(e) and eg:IsExists(s.rfilter,1,e:GetHandler()) end if Duel.SelectEffectYesNo(tp,c,96) then - Duel.Destroy(c,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(c,REASON_EFFECT|REASON_REPLACE) return true else return false end end function s.repval(e,c) - return c:IsFaceup() and c:IsSetCard(0x1d) and c~=e:GetHandler() + return c:IsFaceup() and c:IsSetCard(SET_KOAKI_MEIRU) and c~=e:GetHandler() end function s.spfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x1d) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_KOAKI_MEIRU) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END and eg:IsExists(s.spfilter,1,nil) + return Duel.IsPhase(PHASE_END) and eg:IsExists(s.spfilter,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x1d,TYPES_TOKEN,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_KOAKI_MEIRU,TYPES_TOKEN,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x1d,TYPES_TOKEN,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_KOAKI_MEIRU,TYPES_TOKEN,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17643265.lua b/official/c17643265.lua index 03430ab989..d7623539e8 100644 --- a/official/c17643265.lua +++ b/official/c17643265.lua @@ -1,4 +1,5 @@ --ツーヘッド・シャーク +--Double Shark local s,id=GetID() function s.initial_effect(c) --lvup @@ -31,7 +32,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c1764972.lua b/official/c1764972.lua index dcb2954197..a34a48e184 100644 --- a/official/c1764972.lua +++ b/official/c1764972.lua @@ -62,14 +62,14 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -78,7 +78,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) de:SetCode(EVENT_PHASE+PHASE_END) de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) de:SetCountLimit(1) - de:SetReset(RESET_PHASE+PHASE_END) + de:SetReset(RESET_PHASE|PHASE_END) de:SetLabel(fid) de:SetLabelObject(g) de:SetCondition(s.descon) @@ -121,4 +121,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c17649753.lua b/official/c17649753.lua index 5fc9764729..6944e6a291 100644 --- a/official/c17649753.lua +++ b/official/c17649753.lua @@ -1,4 +1,5 @@ --ワーム・ルクイエ +--Worm Rakuyeh local s,id=GetID() function s.initial_effect(c) --attack limit @@ -15,7 +16,7 @@ function s.initial_effect(c) --to defense local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.poscon) @@ -23,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.atkcon(e) return e:GetHandler():GetFlagEffect(id)==0 @@ -36,4 +37,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c17653779.lua b/official/c17653779.lua index c0d8389106..d47b6f3924 100644 --- a/official/c17653779.lua +++ b/official/c17653779.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) + if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsSpellEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return false end @@ -35,4 +35,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if g:GetFirst():IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,g) end -end +end \ No newline at end of file diff --git a/official/c17655904.lua b/official/c17655904.lua index 0995b36442..5c2bb766e3 100644 --- a/official/c17655904.lua +++ b/official/c17655904.lua @@ -29,12 +29,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_BLUEEYES_W_DRAGON)) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -46,4 +46,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17663375.lua b/official/c17663375.lua index 8f6e90743f..1d681a384d 100644 --- a/official/c17663375.lua +++ b/official/c17663375.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) e3:SetCondition(s.actcon) c:RegisterEffect(e3) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} s.listed_names={} function s.thfilter(c) - return c:IsSetCard(0x7) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_ANCIENT_GEAR) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -49,7 +49,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_MSET) e1:SetTargetRange(1,0) e1:SetTarget(aux.TRUE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SSET) @@ -66,7 +66,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return (sumpos&POS_FACEDOWN)>0 end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() diff --git a/official/c17688543.lua b/official/c17688543.lua index 23c65954c7..90cdd3eb1a 100644 --- a/official/c17688543.lua +++ b/official/c17688543.lua @@ -36,11 +36,11 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) then return end - local res=(Duel.IsPhase(PHASE_STANDBY) and Duel.GetTurnPlayer()==tp) and 2 or 1 - local turn_asc=(Duel.GetCurrentPhase()0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.spfilter1(chkc,e,tp,loc) end if chk==0 then return Duel.IsExistingTarget(s.spfilter1,tp,0,LOCATION_MZONE,1,nil,e,tp,loc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -50,7 +51,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -61,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.mvfilter(c) - return c:IsFaceup() and c:IsSetCard(0x16) and c:IsAbleToHand() and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_ROID) and c:IsAbleToHand() and c:GetSequence()<5 end function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.mvfilter(chkc) end @@ -78,4 +79,4 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) local seq=tc:GetPreviousSequence() Duel.MoveSequence(c,seq) end -end +end \ No newline at end of file diff --git a/official/c17751597.lua b/official/c17751597.lua index c5d9d3e57e..872aabb09d 100644 --- a/official/c17751597.lua +++ b/official/c17751597.lua @@ -1,5 +1,5 @@ --烙印断罪 ---Branded Condemnation +--Branded Retribution --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -25,16 +25,16 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={CARD_ALBAZ,id} -s.listed_series={0x160} +s.listed_series={SET_BRANDED} function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsChainNegatable(ev) then return false end - if not re or (not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end + if not re or (not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) end function s.texfilter(c) @@ -46,7 +46,7 @@ function s.rescon(sg,e,tp,mg) or (#sg==2 and sg:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.texfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.texfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,2,s.rescon,0) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then @@ -55,18 +55,18 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,rg,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local rg=Duel.GetMatchingGroup(s.texfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.texfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if #rg==0 then return end local sg=aux.SelectUnselectGroup(rg,e,tp,1,2,s.rescon,1,tp,HINTMSG_TODECK,s.rescon) if #sg==0 then return end Duel.HintSelection(sg,true) - if Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)>0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) + if Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and sg:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end function s.thfilter(c) - return c:IsSetCard(0x160) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_BRANDED) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c17760003.lua b/official/c17760003.lua index 099847c662..465ebe7955 100644 --- a/official/c17760003.lua +++ b/official/c17760003.lua @@ -25,17 +25,16 @@ s.listed_names={68505803} function s.valcheck(e,c) local g=c:GetMaterial() local att=0 - local tc=g:GetFirst() for tc in aux.Next(g) do if not tc:IsCode(68505803) or not tc:IsType(TYPE_TUNER) then att=(att|tc:GetAttribute()) end end - att=(att&0x2a) + att=(att&ATTRIBUTE_WIND|ATTRIBUTE_WATER|ATTRIBUTE_DARK) e:SetLabel(att) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() and e:GetLabelObject():GetLabel()~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) @@ -50,9 +49,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.cost) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end if (att&ATTRIBUTE_WATER)~=0 then local e1=Effect.CreateEffect(c) @@ -65,9 +64,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.cost) e1:SetTarget(s.target2) e1:SetOperation(s.operation2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) end if (att&ATTRIBUTE_DARK)~=0 then local e1=Effect.CreateEffect(c) @@ -80,14 +79,14 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.cost) e1:SetTarget(s.target3) e1:SetOperation(s.operation3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5)) end end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end diff --git a/official/c17775525.lua b/official/c17775525.lua index 95d7391727..3375640813 100644 --- a/official/c17775525.lua +++ b/official/c17775525.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9a),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x9a),2,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),2,99) c:EnableReviveLimit() --defense attack local e1=Effect.CreateEffect(c) @@ -34,12 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end local rt=Duel.GetTargetCount(nil,tp,0,LOCATION_ONFIELD,nil) if rt>2 then rt=2 end - local cg=Duel.DiscardHand(tp,Card.IsDiscardable,1,rt,REASON_COST+REASON_DISCARD,nil) + local cg=Duel.DiscardHand(tp,Card.IsDiscardable,1,rt,REASON_COST|REASON_DISCARD,nil) e:SetLabel(cg) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c17787975.lua b/official/c17787975.lua index 1578d7edaa..de969b5ce3 100644 --- a/official/c17787975.lua +++ b/official/c17787975.lua @@ -1,4 +1,5 @@ --ディメンション・スフィンクス +--Dimension Sphinx local s,id=GetID() function s.initial_effect(c) aux.AddPersistentProcedure(c,0,aux.FilterBoolFunction(Card.IsPosition,POS_FACEUP_ATTACK)) @@ -24,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE_STEP + return Duel.IsPhase(PHASE_BATTLE_STEP) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -37,7 +38,7 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -56,4 +57,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17810268.lua b/official/c17810268.lua index 451fcac7cc..ad3c50e72c 100644 --- a/official/c17810268.lua +++ b/official/c17810268.lua @@ -36,20 +36,20 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x18} -s.counter_place_list={0x1019} +s.listed_series={SET_CLOUDIAN} +s.counter_place_list={COUNTER_FOG} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x18),tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x1019,ct) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_CLOUDIAN),tp,LOCATION_MZONE,LOCATION_MZONE,nil) + e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+COUNTER_FOG,ct) end end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x1019,2,REASON_COST) + if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_FOG,2,REASON_COST) end + e:GetHandler():RemoveCounter(tp,COUNTER_FOG,2,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end diff --git a/official/c1781310.lua b/official/c1781310.lua index 44b929d6b2..510aa30b89 100644 --- a/official/c1781310.lua +++ b/official/c1781310.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES+CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_TOHAND) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_TOHAND) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -59,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) elseif opval[op]==3 then local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(1-tp,2) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) elseif opval[op]==4 then Duel.Draw(tp,2,REASON_EFFECT) end diff --git a/official/c17814387.lua b/official/c17814387.lua index e550894702..0bdf656d81 100644 --- a/official/c17814387.lua +++ b/official/c17814387.lua @@ -1,4 +1,5 @@ --援軍 +--Reinforcements local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,16 +9,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -28,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c17825378.lua b/official/c17825378.lua index 48d8fbcbca..cd206f24aa 100644 --- a/official/c17825378.lua +++ b/official/c17825378.lua @@ -1,10 +1,10 @@ --- 捕食植物トリアンティス --- Predaplant Triantis --- Scripted by Hatter +--捕食植物トリアンティス +--Predaplant Triantis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Allow cards in the Pendulum Zones as fusion materials + --Allow cards in the Pendulum Zones as fusion materials local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_FUSION_MATERIAL) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTargetRange(LOCATION_PZONE,0) e1:SetValue(function(_,c) return c and c:IsAttribute(ATTRIBUTE_DARK) end) c:RegisterEffect(e1) - -- Place Predator Counters + --Place Predator Counters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_COUNTER) @@ -28,7 +28,7 @@ s.counter_place_list={COUNTER_PREDATOR} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (r&REASON_FUSION)==REASON_FUSION and c:IsFaceup() - and c:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) + and c:IsLocation(LOCATION_GRAVE|LOCATION_EXTRA) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 @@ -46,7 +46,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) diff --git a/official/c17827173.lua b/official/c17827173.lua index 36a39a787d..0bcb65c257 100644 --- a/official/c17827173.lua +++ b/official/c17827173.lua @@ -1,5 +1,5 @@ --ふわんだりぃず×とっかん ---Flundereeze x Toccan +--Floowandereeze & Toccan --Logical Nonsense --Substitute ID local s,id=GetID() @@ -40,8 +40,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Flundereeze" archetype -s.listed_series={0x16f} - +s.listed_series={SET_FLOOWANDEREEZE} --Cannot special summon the turn you activate e1 or e3 function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end @@ -49,19 +48,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end --Check for a card to banish function s.addfilter(c) - return c:IsSetCard(0x16f) and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_FLOOWANDEREEZE) and c:IsFaceup() and c:IsAbleToHand() end --Activation legality function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -81,7 +80,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) if not tc:IsLocation(LOCATION_HAND) then return end --Normal summon 1 winged beast monster - local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if #sg1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() Duel.ShuffleHand(tp) @@ -107,4 +106,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c17841097.lua b/official/c17841097.lua index 957ff92751..0c19046d01 100644 --- a/official/c17841097.lua +++ b/official/c17841097.lua @@ -1,4 +1,5 @@ --ニードル・ガンナー +--Needle Soldier local s,id=GetID() function s.initial_effect(c) --pierce @@ -18,6 +19,6 @@ function s.psop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c17841166.lua b/official/c17841166.lua index 2bba7c5663..b216c45dff 100644 --- a/official/c17841166.lua +++ b/official/c17841166.lua @@ -1,4 +1,5 @@ --マグネット・フォース +--Magnet Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,13 +16,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.etarget) e1:SetValue(s.efilter) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.etarget(e,c) - return (c:GetOriginalRace()&RACE_MACHINE+RACE_ROCK)~=0 + return (c:GetOriginalRace()&RACE_MACHINE|RACE_ROCK)~=0 end function s.efilter(e,te,c) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=c + return te:IsMonsterEffect() and te:GetOwner()~=c and te:GetOwnerPlayer()~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c1784686.lua b/official/c1784686.lua index 947c464161..65eb77459a 100644 --- a/official/c1784686.lua +++ b/official/c1784686.lua @@ -20,9 +20,9 @@ function s.initial_effect(c) e2:SetValue(10000050) c:RegisterEffect(e2) end -s.listed_series={0x10a2} +s.listed_series={SET_DARK_MAGICIAN} function s.tgfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10a2) and c:IsCanBeFusionMaterial() + return c:IsFaceup() and c:IsSetCard(SET_DARK_MAGICIAN) and c:IsCanBeFusionMaterial() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,mc) @@ -52,4 +52,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c17857780.lua b/official/c17857780.lua index 26648343e1..c1d03d57d8 100644 --- a/official/c17857780.lua +++ b/official/c17857780.lua @@ -1,4 +1,5 @@ --EMチアモール +--Performapal Cheermole local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -50,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) else e1:SetValue(-1000) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c17871506.lua b/official/c17871506.lua index a7ee28dbb1..16e96df7b8 100644 --- a/official/c17871506.lua +++ b/official/c17871506.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.indtg(e,c) - return c:IsSetCard(0x3b) and c~=e:GetHandler() -end + return c:IsSetCard(SET_RED_EYES) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c17874674.lua b/official/c17874674.lua index 437d1dd11b..48f1ae6f33 100644 --- a/official/c17874674.lua +++ b/official/c17874674.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.condition) @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetCountLimit(1) e4:SetCondition(s.costcon) e4:SetOperation(s.costop) @@ -44,26 +44,26 @@ end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsNegatable() end if chk==0 then return true end - if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY + if Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_STANDBY) and Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,94) then e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) else e:SetProperty(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsNegatable() end if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -76,14 +76,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetCondition(s.rcon) tc:RegisterEffect(e2) end @@ -96,7 +96,7 @@ function s.ctarget(e,tp,eg,ep,ev,re,r,rp) if tc then e:GetHandler():CancelCardTarget(tc) end end function s.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.costop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,500) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -104,4 +104,4 @@ function s.costop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c17881964.lua b/official/c17881964.lua index 05c49ad36b..8eb49c121c 100644 --- a/official/c17881964.lua +++ b/official/c17881964.lua @@ -1,7 +1,8 @@ --暗黒火炎龍 +--Darkfire Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,53293545,75356564) -end +end \ No newline at end of file diff --git a/official/c17888577.lua b/official/c17888577.lua index 3f532c450a..a8a0d7634f 100644 --- a/official/c17888577.lua +++ b/official/c17888577.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.gytg) e1:SetOperation(s.gyop) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(mat:GetSum(Card.GetLevel)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end function s.gyfilter1(c,tp) @@ -52,4 +52,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c17896384.lua b/official/c17896384.lua index bec6949a0d..31db5dcf7b 100644 --- a/official/c17896384.lua +++ b/official/c17896384.lua @@ -60,4 +60,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17932494.lua b/official/c17932494.lua index e3a6c14ca6..e8a523f657 100644 --- a/official/c17932494.lua +++ b/official/c17932494.lua @@ -1,4 +1,5 @@ --ソニック・ウォリアー +--Sonic Warrior local s,id=GetID() function s.initial_effect(c) --to grave @@ -18,7 +19,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c17943271.lua b/official/c17943271.lua index 3e481d7f29..0476549cae 100644 --- a/official/c17943271.lua +++ b/official/c17943271.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(s.untgcon) - e1:SetCost(s.untgcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.untgop) c:RegisterEffect(e1) --Send up to 2 "Memento" cards with different names from your Deck to the GY @@ -31,11 +31,6 @@ s.listed_names={CARD_MEMENTOAL_TECUHTLICA,id} function s.untgcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MEMENTOAL_TECUHTLICA),tp,LOCATION_ONFIELD,0,1,nil) end -function s.untgcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.untgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() --Your opponent cannot target "Memento" monsters you control with card effects diff --git a/official/c17946349.lua b/official/c17946349.lua index 4d3b680145..4f13665285 100644 --- a/official/c17946349.lua +++ b/official/c17946349.lua @@ -1,7 +1,6 @@ --斬機ダイア --Mathmech Diameter --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 4 cyberse from GY @@ -25,8 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.efop) c:RegisterEffect(e2) end -s.listed_series={0x132} - +s.listed_series={SET_MATHMECH} function s.spfilter(c,e,tp) return c:IsLevel(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -48,14 +46,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() end function s.efcon(e,tp,eg,ep,ev,re,r,rp) local rc=e:GetHandler():GetReasonCard() - return rc:IsSetCard(0x132) and (r==REASON_SYNCHRO or r==REASON_XYZ) + return rc:IsSetCard(SET_MATHMECH) and (r==REASON_SYNCHRO or r==REASON_XYZ) end function s.efop(e,tp,eg,ep,ev,re,r,rp) local rc=e:GetHandler():GetReasonCard() @@ -71,7 +69,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) rc:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c17947697.lua b/official/c17947697.lua index de25930019..713cccb1a4 100644 --- a/official/c17947697.lua +++ b/official/c17947697.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.plcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.pltg) e1:SetOperation(s.plop) c:RegisterEffect(e1) @@ -43,11 +43,6 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={62089826,CARD_BLUEEYES_W_DRAGON} --"True Light" -function s.plcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.plfilter(c,tp) return c:IsCode(62089826) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end diff --git a/official/c17948378.lua b/official/c17948378.lua index 8d85f144b6..45914ab7bb 100644 --- a/official/c17948378.lua +++ b/official/c17948378.lua @@ -1,4 +1,5 @@ --ジュラック・デイノ +--Jurrac Dino local s,id=GetID() function s.initial_effect(c) --reg @@ -24,14 +25,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x22) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x22) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_JURRAC) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_JURRAC) Duel.Release(g,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +44,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c17954937.lua b/official/c17954937.lua index 17e3d1ddd8..407841be85 100644 --- a/official/c17954937.lua +++ b/official/c17954937.lua @@ -1,4 +1,4 @@ ---Japanese name +--巳剣大祓 --Mitsurugi Great Purification --scripted by Naim local s,id=GetID() @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c17955766.lua b/official/c17955766.lua index 89cae90537..c262a5357c 100644 --- a/official/c17955766.lua +++ b/official/c17955766.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c17956906.lua b/official/c17956906.lua index 688f70bce4..85204cdbb4 100644 --- a/official/c17956906.lua +++ b/official/c17956906.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} function s.condition(e,tp,eg,ep,ev,re,r,rp) for _,te in ipairs({Duel.GetPlayerEffect(tp,EFFECT_LPCOST_CHANGE)}) do local val=te:GetValue() @@ -25,7 +25,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return true end function s.filter1(c,e,tp) - return c:IsMonster() and c:IsSetCard(0x122) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) + return c:IsMonster() and c:IsSetCard(SET_VALKYRIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then diff --git a/official/c17979378.lua b/official/c17979378.lua index 390aeed0c1..b93811d8c5 100644 --- a/official/c17979378.lua +++ b/official/c17979378.lua @@ -1,4 +1,5 @@ --DDプラウド・シュバリエ +--D/D Proud Chevalier local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_PZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -35,11 +36,7 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0xaf} -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end +s.listed_series={SET_DD} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -54,12 +51,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.sccon(e) - return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0xaf) + return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),SET_DD) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() @@ -75,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c17985575.lua b/official/c17985575.lua index 61fd9868cf..ce03ee4749 100644 --- a/official/c17985575.lua +++ b/official/c17985575.lua @@ -1,4 +1,5 @@ --ロード・オブ・ドラゴン-ドラゴンの支配者- +--Lord of D. local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -14,4 +15,4 @@ function s.initial_effect(c) end function s.etarget(e,c) return c:IsRace(RACE_DRAGON) -end +end \ No newline at end of file diff --git a/official/c17988746.lua b/official/c17988746.lua index c8a6b0f058..aeb100b1a2 100644 --- a/official/c17988746.lua +++ b/official/c17988746.lua @@ -1,4 +1,5 @@ --パーリィナイツ +--Parry Knights local s,id=GetID() function s.initial_effect(c) --special summon @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c1799464.lua b/official/c1799464.lua index d79d073348..53a99f6f5c 100644 --- a/official/c1799464.lua +++ b/official/c1799464.lua @@ -38,12 +38,12 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) --Lizard check local e2=aux.createContinuousLizardCheck(e:GetHandler(),LOCATION_MZONE,s.lizfilter) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) - token:RegisterEffect(e2,true) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end @@ -53,4 +53,4 @@ function s.splimit(e,c) end function s.lizfilter(e,c) return not c:IsOriginalRace(RACE_INSECT) -end +end \ No newline at end of file diff --git a/official/c17994645.lua b/official/c17994645.lua index c43d9d89cc..d080cd288a 100644 --- a/official/c17994645.lua +++ b/official/c17994645.lua @@ -1,4 +1,5 @@ --A BF-雨隠れのサヨ +--Assault Blackwing - Sayo the Rain Hider local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -28,17 +29,17 @@ function s.initial_effect(c) e3:SetValue(s.valcon) c:RegisterEffect(e3) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x33) then + if g:IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.tncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==1 end function s.tnop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -47,9 +48,9 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c18000338.lua b/official/c18000338.lua index 947d6cac51..4a16fc7adb 100644 --- a/official/c18000338.lua +++ b/official/c18000338.lua @@ -1,5 +1,5 @@ --Re:EX ---Scripted by Eerie Code +--Re: EX local s,id=GetID() function s.initial_effect(c) --increase atk/def diff --git a/official/c1801154.lua b/official/c1801154.lua index 5b74371c8b..7fb2ac6b45 100644 --- a/official/c1801154.lua +++ b/official/c1801154.lua @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18013090.lua b/official/c18013090.lua index 9d10155687..e2f022bbc2 100644 --- a/official/c18013090.lua +++ b/official/c18013090.lua @@ -34,13 +34,13 @@ function s.initial_effect(c) end s.material={96182448} s.listed_names={96182448} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,lc,stype,tp) return c:IsSummonCode(lc,stype,tp,96182448) or c:IsHasEffect(20932152) end function s.atcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetTurnPlayer()==tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return ep==tp and Duel.IsTurnPlayer(tp) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.atop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,13 +52,13 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.atkcon) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL+PHASE_END) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL|PHASE_END) c:RegisterEffect(e2) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.atkcon(e) local c=e:GetHandler() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and c==Duel.GetAttacker() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and c==Duel.GetAttacker() end function s.cacon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -81,4 +81,4 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(tc,POS_FACEUP_ATTACK) Duel.ChainAttack(tc) end -end +end \ No newline at end of file diff --git a/official/c1802450.lua b/official/c1802450.lua index 0f5e7e9bdc..2091537e13 100644 --- a/official/c1802450.lua +++ b/official/c1802450.lua @@ -26,20 +26,20 @@ function s.rmfilter(c,e) return c:IsAbleToRemove() and aux.SpElimFilter(c) and (not e or c:IsCanBeEffectTarget(e)) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - local dg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil,e) + local dg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil,e) if chk==0 then return Duel.CheckReleaseGroupCost(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),1,false,aux.ReleaseCheckTarget,nil,dg) end local cg=Duel.SelectReleaseGroupCost(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),1,1,false,aux.ReleaseCheckTarget,nil,dg) Duel.Release(cg,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetTargetCards(e) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18027138.lua b/official/c18027138.lua index 58da2050a9..d2ff8c02cc 100644 --- a/official/c18027138.lua +++ b/official/c18027138.lua @@ -1,6 +1,5 @@ --カバーカーニバル --Hippo Carnival - local s,id=GetID() function s.initial_effect(c) --Special summon 3 tokens to your field @@ -14,7 +13,6 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={TOKEN_HIPPO} - function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 @@ -36,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -49,11 +47,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetAbsoluteRange(tp,1,0) e3:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_EXTRA)) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e3) --Clock Lizard check local e4=aux.createContinuousLizardCheck(e:GetHandler(),LOCATION_MZONE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e4,true) end Duel.SpecialSummonComplete() @@ -63,6 +61,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(aux.NOT(aux.TargetBoolFunction(Card.IsCode,TOKEN_HIPPO))) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c18036057.lua b/official/c18036057.lua index cf5a37d61b..36f2fac5ae 100644 --- a/official/c18036057.lua +++ b/official/c18036057.lua @@ -1,4 +1,5 @@ --天空騎士パーシアス +--Airknight Parshath local s,id=GetID() function s.initial_effect(c) --draw @@ -30,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1804528.lua b/official/c1804528.lua index 684e560a29..36f7237b42 100644 --- a/official/c1804528.lua +++ b/official/c1804528.lua @@ -30,10 +30,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) else return end if opt==0 then local dg=g1:RandomSelect(1-tp,1) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) local dg=g2:Select(1-tp,1,1,nil) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18060565.lua b/official/c18060565.lua index 5f1e06128a..6f0950e07c 100644 --- a/official/c18060565.lua +++ b/official/c18060565.lua @@ -1,4 +1,5 @@ --ドラグニティ-プリムス・ピルス +--Dragunity Primus Pilus local s,id=GetID() function s.initial_effect(c) --equip @@ -15,9 +16,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsRace(RACE_WINGEDBEAST) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_WINGEDBEAST) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,7 +30,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK) end function s.eqfilter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(3) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and c:IsLevelBelow(3) and not c:IsForbidden() end function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end @@ -42,7 +43,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) eqc:RegisterEffect(e1) @@ -50,4 +51,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c18063928.lua b/official/c18063928.lua index badf723d53..4c9d4b7e2c 100644 --- a/official/c18063928.lua +++ b/official/c18063928.lua @@ -1,4 +1,5 @@ --ブリキンギョ +--Tin Goldfish local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,4 +27,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18094166.lua b/official/c18094166.lua index ae7e0a38bb..e3f6f35508 100644 --- a/official/c18094166.lua +++ b/official/c18094166.lua @@ -28,14 +28,14 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x8,0x5008} +s.listed_series={SET_HERO,SET_VISION_HERO} s.listed_names={} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x8) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_HERO) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x5008) and c:IsMonster() and not c:IsForbidden() and not c:IsCode(id) + return c:IsSetCard(SET_VISION_HERO) and c:IsMonster() and not c:IsForbidden() and not c:IsCode(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) @@ -64,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end @@ -75,14 +75,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x8) and c:IsLocation(LOCATION_EXTRA) + return not c:IsSetCard(SET_HERO) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x8) + return not c:IsOriginalSetCard(SET_HERO) end \ No newline at end of file diff --git a/official/c18096222.lua b/official/c18096222.lua index 67392dfb50..0a972febc8 100644 --- a/official/c18096222.lua +++ b/official/c18096222.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -27,9 +27,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_card_types={TYPE_GEMINI} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_GEMINI) end @@ -44,14 +41,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Gain 700 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -59,7 +56,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -89,6 +86,6 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and s.dafilter(tc) then tc:EnableGeminiStatus() - tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,64) + tc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,64) end -end +end \ No newline at end of file diff --git a/official/c18114794.lua b/official/c18114794.lua index b102458c1b..8e80c40bd6 100644 --- a/official/c18114794.lua +++ b/official/c18114794.lua @@ -54,19 +54,19 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local turnp=Duel.GetTurnPlayer() - Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE|PHASE_END,1) + Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1,1) + Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,turnp) -end +end \ No newline at end of file diff --git a/official/c18138630.lua b/official/c18138630.lua index 4649590748..452f3d0b61 100644 --- a/official/c18138630.lua +++ b/official/c18138630.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_SZONE|LOCATION_GRAVE) e2:SetValue(70245411) c:RegisterEffect(e2) --Draw 1 card. If "Edge Imp" monster, destroy 1 card, else return 1 card from hand to deck @@ -42,13 +42,13 @@ function s.initial_effect(c) c:RegisterEffect(e4) end --Lists "Edge Imp" archetype -s.listed_series={0xc3} +s.listed_series={SET_EDGE_IMP} --Specifically lists "Toy Vendor" s.listed_names={70245411} --Discard 1 card as a cost function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end --Activation legality function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -62,7 +62,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0xc3) and tc:IsMonster() then + if tc:IsSetCard(SET_EDGE_IMP) and tc:IsMonster() then if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local tg=dg:Select(tp,1,1,nil) @@ -74,9 +74,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) if Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))==0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end Duel.ShuffleHand(tp) @@ -95,7 +95,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end diff --git a/official/c18144506.lua b/official/c18144506.lua index 2455d7fe52..04411b10b1 100644 --- a/official/c18144506.lua +++ b/official/c18144506.lua @@ -1,4 +1,5 @@ --ハーピィの羽根帚 +--Harpie's Feather Duster local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18144507.lua b/official/c18144507.lua deleted file mode 100644 index 6e4cff98fb..0000000000 --- a/official/c18144507.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ハーピィの羽根帚(EU) -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_ONFIELD,1,c) end - local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,c) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/official/c18158393.lua b/official/c18158393.lua index 4fb0d56d6d..12770c1eb3 100644 --- a/official/c18158393.lua +++ b/official/c18158393.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c18158397.lua b/official/c18158397.lua index b983acfb15..c22d612e5e 100644 --- a/official/c18158397.lua +++ b/official/c18158397.lua @@ -18,12 +18,12 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x18} +s.listed_series={SET_CLOUDIAN} function s.cfilter(c,tp) return c:IsControler(tp) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 and re and re:GetHandler():IsSetCard(0x18) + return (r&SET_LV)==SET_LV and re and re:GetHandler():IsSetCard(SET_CLOUDIAN) and eg:IsExists(s.cfilter,1,nil,1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18161786.lua b/official/c18161786.lua index 7a45f57867..3ff4e518cd 100644 --- a/official/c18161786.lua +++ b/official/c18161786.lua @@ -1,4 +1,5 @@ --ダークゾーン +--Mystic Plasma Zone local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c18168997.lua b/official/c18168997.lua index 4b56129821..8a143e07d7 100644 --- a/official/c18168997.lua +++ b/official/c18168997.lua @@ -23,21 +23,17 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(s.cpcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.cptg) e2:SetOperation(s.cpop) c:RegisterEffect(e2) end --Lists "Darklord" archetype -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} --Pay 1000 LP -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end --Check for "Darklord" spell/trap function s.cpfilter(c) - return c:IsSetCard(0xef) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil + return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil end --Activation legality function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -69,5 +65,5 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) etc:ReleaseEffectRelation(te) end Duel.BreakEffect() - Duel.SendtoDeck(te:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c18175965.lua b/official/c18175965.lua index 79b150ec3b..cb3af4e178 100644 --- a/official/c18175965.lua +++ b/official/c18175965.lua @@ -64,7 +64,7 @@ end s.listed_names={34022290,81954378} function s.cfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsCode(34022290) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsCode(34022290) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -114,4 +114,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c18176525.lua b/official/c18176525.lua index 7229eab669..f998b95901 100644 --- a/official/c18176525.lua +++ b/official/c18176525.lua @@ -1,4 +1,4 @@ ---Japanese name +--巳剣之尊 佐士 --Mitsurugi no Mikoto, Saji --scripted by Naim local s,id=GetID() diff --git a/official/c18189187.lua b/official/c18189187.lua index d624de0bd8..5ac30a61be 100644 --- a/official/c18189187.lua +++ b/official/c18189187.lua @@ -1,7 +1,6 @@ --夢魔鏡の使徒-ネイロイ --Neiroy, the Dream Mirror Disciple --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from the hand @@ -28,11 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.op2) c:RegisterEffect(e2) end -s.listed_series={0x131} +s.listed_series={SET_DREAM_MIRROR} s.listed_names={CARD_DREAM_MIRROR_JOY,CARD_DREAM_MIRROR_TERROR} - function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x131),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DREAM_MIRROR),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,14 +47,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(ATTRIBUTE_DARK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end end function s.cond2(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c18190572.lua b/official/c18190572.lua index e777544bb6..062544ae14 100644 --- a/official/c18190572.lua +++ b/official/c18190572.lua @@ -1,4 +1,5 @@ --ミクロ光線 +--Micro Ray local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsDefenseAbove(0) end @@ -31,8 +29,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c18205590.lua b/official/c18205590.lua index 1efc9d1337..d3a265ddd8 100644 --- a/official/c18205590.lua +++ b/official/c18205590.lua @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x9c) and c:IsAbleToDeck() + return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x9c) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TELLARKNIGHT) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) if tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -48,10 +48,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1,true) end end function s.splimit(e,c) - return not c:IsSetCard(0x9c) -end + return not c:IsSetCard(SET_TELLARKNIGHT) +end \ No newline at end of file diff --git a/official/c18210764.lua b/official/c18210764.lua index d3b6237081..e95b471477 100644 --- a/official/c18210764.lua +++ b/official/c18210764.lua @@ -1,6 +1,5 @@ --ペンデュラムーチョ --Pendulumucho - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -40,10 +39,9 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={id} - function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.tecon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -53,10 +51,10 @@ function s.tefilter(c) and not c:IsCode(id) and not c:IsForbidden() end function s.tetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.tefilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tefilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.tefilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tefilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local g=Duel.SelectTarget(tp,s.tefilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.tefilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) if g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) end @@ -88,7 +86,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) g:GetFirst():RegisterEffect(e1,true) end diff --git a/official/c18214905.lua b/official/c18214905.lua index 5402645301..e5ab34de70 100644 --- a/official/c18214905.lua +++ b/official/c18214905.lua @@ -27,12 +27,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x400d} +s.listed_series={SET_ELEMENTSABER} function s.negcon(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.costfilter(c) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) local fg=Group.CreateGroup() @@ -40,7 +40,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) fg:AddCard(pe:GetHandler()) end local loc=LOCATION_HAND - if #fg>0 then loc=LOCATION_HAND+LOCATION_DECK end + if #fg>0 then loc=LOCATION_HAND|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil):GetFirst() @@ -52,7 +52,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) fc=fg:Select(tp,1,1,nil) end Duel.Hint(HINT_CARD,0,fc:GetCode()) - fc:RegisterFlagEffect(61557074,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + fc:RegisterFlagEffect(61557074,RESETS_STANDARD_PHASE_END,0,0) end Duel.SendtoGrave(tc,REASON_COST) end @@ -84,6 +84,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c18235309.lua b/official/c18235309.lua index 6de6099f0f..6d440baa8b 100644 --- a/official/c18235309.lua +++ b/official/c18235309.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_SZONE) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e3:SetCountLimit(1) e3:SetCondition(s.condition2) e3:SetTarget(s.target2) @@ -23,9 +23,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - local tn=Duel.GetTurnPlayer() - local ph=Duel.GetCurrentPhase() - return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.filter(c) return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) @@ -48,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.MSet(tp,tc,true,nil,1) end end -end +end \ No newline at end of file diff --git a/official/c18235577.lua b/official/c18235577.lua index 188b30c2dd..f9be1ac8f9 100644 --- a/official/c18235577.lua +++ b/official/c18235577.lua @@ -1,4 +1,5 @@ --寂々虫 +--Silent Strider local s,id=GetID() function s.initial_effect(c) --lvup @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.lvcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.lvtg) e1:SetOperation(s.lvop) c:RegisterEffect(e1) end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.lvfilter(c) return c:IsFaceup() and not c:IsType(TYPE_XYZ) end @@ -32,7 +29,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c18236002.lua b/official/c18236002.lua index d592041e64..668ea4efe6 100644 --- a/official/c18236002.lua +++ b/official/c18236002.lua @@ -14,27 +14,27 @@ function s.initial_effect(c) e1:SetOperation(s.recop) c:RegisterEffect(e1) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} s.listed_names={id} function s.reccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x120) and r&REASON_FUSION+REASON_LINK~=0 + return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(SET_PRANK_KIDS) and r&REASON_FUSION+REASON_LINK~=0 end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x120) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_PRANK_KIDS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.recop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,nil,e,tp) if Duel.Damage(1-tp,500,REASON_EFFECT)~=0 and #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c18239909.lua b/official/c18239909.lua index 0a87de106c..21f2ba331e 100644 --- a/official/c18239909.lua +++ b/official/c18239909.lua @@ -1,6 +1,5 @@ --爆竜剣士イグニスターP --Ignister Prominence, the Blasting Dracoslayer - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -29,18 +28,17 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xc7} - +s.listed_series={SET_DRACOSLAYER} function s.desfilter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_PZONE) and s.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE+LOCATION_PZONE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_PZONE) and s.desfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,LOCATION_MZONE|LOCATION_PZONE,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE+LOCATION_PZONE,LOCATION_MZONE+LOCATION_PZONE,1,1,nil) + local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE|LOCATION_PZONE,LOCATION_MZONE|LOCATION_PZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_ONFIELD) end @@ -56,7 +54,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DRACOSLAYER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -77,7 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c18249921.lua b/official/c18249921.lua index 2efe09d871..1ce54f1054 100644 --- a/official/c18249921.lua +++ b/official/c18249921.lua @@ -1,7 +1,6 @@ --電脳堺門-玄武 ---Virtual World Gate - Zhuangwoo +--Virtual World Gate - Xuanwu --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -33,18 +32,17 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,2}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end --Lists "Virtual World" and "Virtual World - Gate" archetypes -s.listed_series={0x150,0x1150} - +s.listed_series={SET_VIRTUAL_WORLD,SET_VIRTUAL_WORLD_GATE} --Check if battle phase and for another "Virtual World - Gate" card function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1150),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_VIRTUAL_WORLD_GATE),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end --Activation legality function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -67,7 +65,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end --Check for "Virtual World" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x150) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -85,12 +83,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then Duel.BreakEffect() diff --git a/official/c18252559.lua b/official/c18252559.lua index c5b8cdfdec..382c18147f 100644 --- a/official/c18252559.lua +++ b/official/c18252559.lua @@ -1,4 +1,5 @@ --仕込み爆弾 +--Secret Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -46,4 +47,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1825445.lua b/official/c1825445.lua index 4539581b81..fcb597ef5e 100644 --- a/official/c1825445.lua +++ b/official/c1825445.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xdc)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SUPER_QUANT)) e2:SetCondition(s.tgcon) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) @@ -32,17 +32,17 @@ function s.initial_effect(c) e3:SetOperation(s.matop) c:RegisterEffect(e3) end -s.listed_series={0xdc} +s.listed_series={SET_SUPER_QUANT} --Check if it's your main phase function s.tgcon(e) - return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and Duel.IsPhase(PHASE_MAIN1) end --Check for "Super Quant" Xyz monster function s.filter2(c) return c:IsFaceup() and not c:IsType(TYPE_TOKEN) end function s.filter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xdc) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANT) and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,c) end --Activation legality @@ -63,5 +63,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,mat,true) end end -end - +end \ No newline at end of file diff --git a/official/c1826676.lua b/official/c1826676.lua index 6dda172a88..5ab4d4c48c 100644 --- a/official/c1826676.lua +++ b/official/c1826676.lua @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18271561.lua b/official/c18271561.lua index d2a0d5e3c3..84735471e6 100644 --- a/official/c18271561.lua +++ b/official/c18271561.lua @@ -1,4 +1,5 @@ --ヘル・ブラスト +--Chthonian Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT,true) Duel.RDComplete() end -end +end \ No newline at end of file diff --git a/official/c18282103.lua b/official/c18282103.lua index 2e11f0642b..56cb0afd7a 100644 --- a/official/c18282103.lua +++ b/official/c18282103.lua @@ -1,4 +1,5 @@ --魔轟神獣ガナシア +--The Fabled Ganashia local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,15 +27,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(200) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) end -end +end \ No newline at end of file diff --git a/official/c1828513.lua b/official/c1828513.lua index 9d6f288fb7..47e348965a 100644 --- a/official/c1828513.lua +++ b/official/c1828513.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3d),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SIX_SAMURAI),4,2) c:EnableReviveLimit() --attack up local e1=Effect.CreateEffect(c) @@ -15,18 +15,14 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x3d} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_SIX_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetAttack()<2000 + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetAttack()<2000 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -42,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c18302224.lua b/official/c18302224.lua index 705f691ba4..9d6b67d374 100644 --- a/official/c18302224.lua +++ b/official/c18302224.lua @@ -1,4 +1,5 @@ --リバース・オブ・ネオス +--Reverse of Neos local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,11 +12,11 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9} +s.listed_series={SET_NEOS} s.listed_names={CARD_NEOS} function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) - and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) + and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(SET_NEOS) and c:IsType(TYPE_FUSION) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -38,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -46,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetCountLimit(1) tc:RegisterEffect(e2,true) end @@ -54,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18313046.lua b/official/c18313046.lua index e2840d4893..db35030b0f 100644 --- a/official/c18313046.lua +++ b/official/c18313046.lua @@ -12,8 +12,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) - e1:SetCost(aux.SelfTributeCost) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c18318842.lua b/official/c18318842.lua index d4b0885866..831e9770ca 100644 --- a/official/c18318842.lua +++ b/official/c18318842.lua @@ -1,4 +1,5 @@ --アビス・ソルジャー +--Abyss Soldier local s,id=GetID() function s.initial_effect(c) --to hand @@ -19,7 +20,7 @@ function s.filter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18319762.lua b/official/c18319762.lua index 740e3c7671..27420a1edb 100644 --- a/official/c18319762.lua +++ b/official/c18319762.lua @@ -1,5 +1,5 @@ --氷結界の照魔師 ---Mirror Master of the Ice Barrier +--Revealer of the Ice Barrier --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -37,13 +37,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.sumcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.tblimit(e,c,tp,sumtp) return (sumtp&SUMMON_TYPE_TRIBUTE)==SUMMON_TYPE_TRIBUTE end function s.filter(c,e,tp) - return c:IsSetCard(0x2f) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICE_BARRIER) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -67,7 +67,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) diff --git a/official/c18322364.lua b/official/c18322364.lua index 0a6a18e153..e7fff8c397 100644 --- a/official/c18322364.lua +++ b/official/c18322364.lua @@ -1,4 +1,5 @@ --ビッグ・ホエール +--Big Whale local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,17 +9,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return e:GetHandler():IsTributeSummoned() end function s.spfilter(c,e,tp) return c:IsLevel(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -43,13 +40,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c18325492.lua b/official/c18325492.lua index faac0dffee..d5531d8f31 100644 --- a/official/c18325492.lua +++ b/official/c18325492.lua @@ -1,4 +1,5 @@ --ジャイロイド +--Gyroid local s,id=GetID() function s.initial_effect(c) --battle indes @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c18326736.lua b/official/c18326736.lua index 55a0be52aa..2219a9ec93 100644 --- a/official/c18326736.lua +++ b/official/c18326736.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetOperation(s.mtop) c:RegisterEffect(e3) end -s.listed_series={0x48,0x109c} +s.listed_series={SET_NUMBER,SET_STELLARKNIGHT} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:CheckRemoveOverlayCard(tp,3,REASON_COST) and c:GetFlagEffect(id)==0 end @@ -45,7 +45,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) c:RegisterFlagEffect(id,RESET_CHAIN,0,1) end function s.filter(c,e,tp,rk,pg) - return c:IsRank(rk+1) and not c:IsSetCard(0x48) and e:GetHandler():IsCanBeXyzMaterial(c,tp) + return c:IsRank(rk+1) and not c:IsSetCard(SET_NUMBER) and e:GetHandler():IsCanBeXyzMaterial(c,tp) and (#pg<=0 or pg:IsContains(e:GetHandler())) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end @@ -84,7 +84,7 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_TURN) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) e1:SetCondition(s.skipcon) Duel.RegisterEffect(e1,tp) end @@ -92,7 +92,7 @@ function s.skipcon(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() end function s.mtfilter(c) - return c:IsSetCard(0x109c) + return c:IsSetCard(SET_STELLARKNIGHT) end function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) @@ -106,4 +106,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end +end \ No newline at end of file diff --git a/official/c1833916.lua b/official/c1833916.lua index e6ac5cf464..714ced3b69 100644 --- a/official/c1833916.lua +++ b/official/c1833916.lua @@ -28,19 +28,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsAttackPos() end function s.cfilter(c) - return c:IsSetCard(0x6f) and c:IsDiscardable() + return c:IsSetCard(SET_HEROIC) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0x6f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HEROIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,11 +65,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x6f) + return not c:IsSetCard(SET_HEROIC) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return ep==tp @@ -84,4 +84,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c1834107.lua b/official/c1834107.lua index d9d79098fa..3c1957a721 100644 --- a/official/c1834107.lua +++ b/official/c1834107.lua @@ -35,4 +35,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1834753.lua b/official/c1834753.lua index e6e0e124df..6d5118a3f6 100644 --- a/official/c1834753.lua +++ b/official/c1834753.lua @@ -17,15 +17,11 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.spcost) + e2:SetCost(Cost.PayLP(2000)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.filter(c,e,tp) return c:GetLevel()==3 and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -44,4 +40,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18372968.lua b/official/c18372968.lua index 93a4fdb471..ddc41bb0b5 100644 --- a/official/c18372968.lua +++ b/official/c18372968.lua @@ -1,4 +1,5 @@ --カミソーリトカゲ +--Razor Lizard local s,id=GetID() function s.initial_effect(c) --destroy @@ -27,4 +28,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_REPTILE),tp,LOCATION_MZONE,0,1,e:GetHandler()) then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18377261.lua b/official/c18377261.lua index 4ca2d4dc0d..0da8b4a893 100644 --- a/official/c18377261.lua +++ b/official/c18377261.lua @@ -1,25 +1,25 @@ --- 剣の御巫ハレ --- Hare the Sword Mikanko --- Scripted by Hatter +--剣の御巫ハレ +--Ha-Re the Sword Mikanko +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Take no battle damage + --Take no battle damage local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetCondition(aux.NOT(s.eqcon)) e1:SetValue(1) c:RegisterEffect(e1) - -- Cannot be destroyed by battle + --Cannot be destroyed by battle local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCondition(s.eqcon) c:RegisterEffect(e2) - -- Reflect battle damage + --Reflect battle damage local e3=e2:Clone() e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) - -- Search 1 "Mikanko" Equip Spell + --Search 1 "Mikanko" Equip Spell local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -31,12 +31,12 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.eqcon(e) return e:GetHandler():GetEquipCount()>0 end function s.thfilter(c) - return c:IsSetCard(0x18e) and c:IsType(TYPE_EQUIP) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_MIKANKO) and c:IsType(TYPE_EQUIP) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c18378582.lua b/official/c18378582.lua index 4c651038ea..1a5d280c3e 100644 --- a/official/c18378582.lua +++ b/official/c18378582.lua @@ -62,7 +62,7 @@ function s.cfilter(c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -75,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18378992.lua b/official/c18378992.lua index 4a3c7df5f2..30afd15bf2 100644 --- a/official/c18378992.lua +++ b/official/c18378992.lua @@ -53,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end rg:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c18386170.lua b/official/c18386170.lua index f379c05117..d9b4c574cc 100644 --- a/official/c18386170.lua +++ b/official/c18386170.lua @@ -42,16 +42,16 @@ function s.initial_effect(c) e4:SetOperation(s.hdop) c:RegisterEffect(e4) end -s.listed_series={0xb1} -s.material_setcode=0xb1 +s.listed_series={SET_BURNING_ABYSS} +s.material_setcode=SET_BURNING_ABYSS function s.ffilter(c,fc,sumtype,tp,sub,mg,sg) - return c:IsSetCard(0xb1,fc,sumtype,tp) and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetCode(fc,sumtype,tp),fc,sumtype,tp)) + return c:IsSetCard(SET_BURNING_ABYSS,fc,sumtype,tp) and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetCode(fc,sumtype,tp),fc,sumtype,tp)) end function s.fusfilter(c,code,fc,sumtype,tp) return c:IsSummonCode(fc,sumtype,tp,code) and not c:IsHasEffect(511002961) end function s.cfilter(c) - return c:IsSetCard(0xb1) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsAbleToGraveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end diff --git a/official/c18407024.lua b/official/c18407024.lua index a900edde2e..82187627d9 100644 --- a/official/c18407024.lua +++ b/official/c18407024.lua @@ -1,4 +1,5 @@ --エレキンギョ +--Wattbetta local s,id=GetID() function s.initial_effect(c) --handes @@ -24,5 +25,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c18426196.lua b/official/c18426196.lua index 6cd9c1bec9..6ac4953579 100644 --- a/official/c18426196.lua +++ b/official/c18426196.lua @@ -46,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c18430390.lua b/official/c18430390.lua index c42009c6f8..90941fb70e 100644 --- a/official/c18430390.lua +++ b/official/c18430390.lua @@ -1,4 +1,5 @@ --ウィングド・ライノ +--Winged Rhynos local s,id=GetID() function s.initial_effect(c) --to hand @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18438874.lua b/official/c18438874.lua index 659e2a8038..d9f4d49545 100644 --- a/official/c18438874.lua +++ b/official/c18438874.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_DARK_FUSION} -s.listed_series={0x8,0x46} +s.listed_series={SET_HERO,SET_FUSION} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,1,nil) and Duel.GetMatchingGroupCount(Card.IsMonster,tp,0,LOCATION_GRAVE,nil)>=e:GetLabel() @@ -55,7 +55,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.thfilter1(c) - return ((c:IsSetCard(0x8) and c:IsMonster()) or c:IsCode(CARD_DARK_FUSION)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_HERO) and c:IsMonster()) or c:IsCode(CARD_DARK_FUSION)) and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end @@ -70,7 +70,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter2(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -83,4 +83,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c18444733.lua b/official/c18444733.lua index f2eb8ffa78..b5f8c019de 100644 --- a/official/c18444733.lua +++ b/official/c18444733.lua @@ -34,14 +34,14 @@ function s.initial_effect(c) c:RegisterEffect(e4) aux.DoubleSnareValidity(c,LOCATION_SZONE) end -s.listed_series={0x11c} +s.listed_series={SET_THUNDER_DRAGON} function s.efilter(e,ct) local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) local tc=te:GetHandler() - return te:IsActiveType(TYPE_MONSTER) and tc:IsRace(RACE_THUNDER) + return te:IsMonsterEffect() and tc:IsRace(RACE_THUNDER) end function s.cncfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x11c) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_THUNDER_DRAGON) and c:IsControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cncfilter,1,nil,tp) @@ -50,7 +50,7 @@ function s.rmfilter(c) return c:IsAbleToRemove() and c:IsRace(RACE_THUNDER) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c18444902.lua b/official/c18444902.lua index d64bdd639e..ab780dd3e7 100644 --- a/official/c18444902.lua +++ b/official/c18444902.lua @@ -1,4 +1,5 @@ --タタカワナイト +--Tatakawa Knight local s,id=GetID() function s.initial_effect(c) --damage @@ -33,4 +34,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18446701.lua b/official/c18446701.lua index 73b7cfff7f..d4d905cc0b 100644 --- a/official/c18446701.lua +++ b/official/c18446701.lua @@ -1,4 +1,5 @@ --ガガガシールド +--Gagagashield local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCountLimit(2) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c:GetControler()==e:GetOwnerPlayer() and c:IsRace(RACE_SPELLCASTER) -end +end \ No newline at end of file diff --git a/official/c1845204.lua b/official/c1845204.lua index a449182c2e..ee02c146dc 100644 --- a/official/c1845204.lua +++ b/official/c1845204.lua @@ -8,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c,e,tp) return c:IsType(TYPE_FUSION) and c:GetLevel()<=5 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() @@ -38,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) tc:CompleteProcedure() --Destroy it during end phase diff --git a/official/c18458255.lua b/official/c18458255.lua index 8f7ac9e31e..30ee9141f4 100644 --- a/official/c18458255.lua +++ b/official/c18458255.lua @@ -90,4 +90,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT|REASON_REPLACE) Duel.Hint(HINT_CARD,0,id) -end +end \ No newline at end of file diff --git a/official/c18474999.lua b/official/c18474999.lua index 4f9ccc2dc8..56e13cba95 100644 --- a/official/c18474999.lua +++ b/official/c18474999.lua @@ -37,10 +37,10 @@ function s.initial_effect(c) --clock lizard aux.addContinuousLizardCheck(c,LOCATION_MZONE) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} s.listed_names={18474999} function s.filter(c,e,tp) - return c:IsSetCard(0x117) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.costfilter(c) return c:IsRitualSpell() and not c:IsPublic() @@ -57,7 +57,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -91,5 +91,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) -end - +end \ No newline at end of file diff --git a/official/c18478530.lua b/official/c18478530.lua index c1f720bcff..122f0d6b62 100644 --- a/official/c18478530.lua +++ b/official/c18478530.lua @@ -28,13 +28,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} function s.atkcon(e,c) local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x122),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsSetCard(0x122) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelAbove(5) and c:IsSetCard(SET_VALKYRIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -42,14 +42,14 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18482591.lua b/official/c18482591.lua index 5a804eacb5..ae24709faf 100644 --- a/official/c18482591.lua +++ b/official/c18482591.lua @@ -1,4 +1,5 @@ --氷結界の破術師 +--Warlock of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --cannot activate @@ -19,18 +20,17 @@ function s.initial_effect(c) e3:SetOperation(s.aclimset) c:RegisterEffect(e3) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.con(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.aclimit(e,re,tp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end + if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsSpellEffect() then return false end local c=re:GetHandler() return not c:IsLocation(LOCATION_SZONE) or c:GetFlagEffect(id)>0 end function s.aclimset(e,tp,eg,ep,ev,re,r,rp) - local tc=eg:GetFirst() - for tc in aux.Next(eg) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1) + for tc in eg:Iter() do + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,0,1) end -end +end \ No newline at end of file diff --git a/official/c18486927.lua b/official/c18486927.lua index 0fc182ff22..fcec4e3b6e 100644 --- a/official/c18486927.lua +++ b/official/c18486927.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetOperation(s.nameop) c:RegisterEffect(e3) end -s.listed_series={0x51} +s.listed_series={SET_GADGET} function s.dectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) @@ -49,7 +49,7 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabel(ct) e1:SetCondition(s.actcon) e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actlimit(e,re,tp) @@ -65,7 +65,7 @@ function s.nametg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local code=e:GetHandler():GetCode() --"Gadget" monster, except this card's current name - s.announce_filter={0x51,OPCODE_ISSETCARD,code,OPCODE_ISCODE,OPCODE_NOT,OPCODE_AND,TYPE_MONSTER,OPCODE_ISTYPE,OPCODE_AND} + s.announce_filter={SET_GADGET,OPCODE_ISSETCARD,code,OPCODE_ISCODE,OPCODE_NOT,OPCODE_AND,TYPE_MONSTER,OPCODE_ISTYPE,OPCODE_AND} local ac=Duel.AnnounceCard(tp,table.unpack(s.announce_filter)) Duel.SetTargetParam(ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER) @@ -79,7 +79,7 @@ function s.nameop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(ac) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c18489208.lua b/official/c18489208.lua index b8c2f86a6f..790e090127 100644 --- a/official/c18489208.lua +++ b/official/c18489208.lua @@ -1,4 +1,5 @@ --カースド・フィグ +--Cursed Fig local s,id=GetID() function s.initial_effect(c) --special summon @@ -32,7 +33,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -41,4 +42,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c18491580.lua b/official/c18491580.lua index b09fa673cc..1e973e6079 100644 --- a/official/c18491580.lua +++ b/official/c18491580.lua @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c18494511.lua b/official/c18494511.lua index 74b51d8371..aa1f0346c2 100644 --- a/official/c18494511.lua +++ b/official/c18494511.lua @@ -32,7 +32,7 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,c) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c18511384.lua b/official/c18511384.lua index 5907a26531..8cd855f98e 100644 --- a/official/c18511384.lua +++ b/official/c18511384.lua @@ -1,8 +1,10 @@ --融合回収 +--Fusion Recovery local s,id=GetID() function s.initial_effect(c) - --Activate + --Add 1 "Polymerization" and 1 monster in your GY that was used as material for a Fusion Summon to your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -16,7 +18,7 @@ function s.filter1(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.filter2(c) - return (c:GetReason()&0x40008)==0x40008 and c:IsMonster() and c:IsAbleToHand() + return (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))==(REASON_FUSION|REASON_MATERIAL) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -36,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c18511599.lua b/official/c18511599.lua index 685f2eadb9..89198c0359 100644 --- a/official/c18511599.lua +++ b/official/c18511599.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_MZONE) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -41,4 +41,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18514525.lua b/official/c18514525.lua index 84d22e357b..ff706e3d26 100644 --- a/official/c18514525.lua +++ b/official/c18514525.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x120),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PRANK_KIDS),2) --If fusion summoned, lose 1000 ATK, also can attack directly local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -26,15 +26,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x120} - +s.listed_series={SET_PRANK_KIDS} function s.atkcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,7 +43,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) if c:GetAttack()-atk==-1000 then --Can attack directly this turn @@ -53,21 +52,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x120) and not c:IsType(TYPE_FUSION) + return c:IsSetCard(SET_PRANK_KIDS) and not c:IsType(TYPE_FUSION) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcheck(sg,e,tp) return sg:GetClassCount(Card.GetCode)==2 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) @@ -90,9 +85,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c18517177.lua b/official/c18517177.lua index 44b6dfefb0..232eaf9497 100644 --- a/official/c18517177.lua +++ b/official/c18517177.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) @@ -20,11 +20,11 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x161),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WAR_ROCK),tp,LOCATION_MZONE,0,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,17 +68,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end - local atkg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x161),tp,LOCATION_MZONE,0,nil) - for tc in aux.Next(atkg) do + local atkg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_WAR_ROCK),tp,LOCATION_MZONE,0,nil) + for tc in atkg:Iter() do --Increase ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e2:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e2:SetValue(200) tc:RegisterEffect(e2) end @@ -107,7 +107,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c1855932.lua b/official/c1855932.lua index 740a52bed1..245dedb2c6 100644 --- a/official/c1855932.lua +++ b/official/c1855932.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetValue(s.repval) c:RegisterEffect(e2) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,19 +37,19 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,5,REASON_EFFECT) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - local ct=Duel.GetOperatedGroup():FilterCount(Card.IsSetCard,nil,0x88) + local ct=Duel.GetOperatedGroup():FilterCount(Card.IsSetCard,nil,SET_BUJIN) if ct>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -69,4 +69,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c18563744.lua b/official/c18563744.lua index a07f76d749..0cc0eaf19a 100644 --- a/official/c18563744.lua +++ b/official/c18563744.lua @@ -1,6 +1,5 @@ --沈黙の剣 --Silent Sword Slash - local s,id=GetID() function s.initial_effect(c) --Targeted "Silent Swordsman" gains 1500 ATK/DEF, also unaffected by opponent's card effects @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -21,17 +20,14 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xe7} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_SILENT_SWORDSMAN} function s.filter(c) - return c:IsSetCard(0xe7) and c:IsFaceup() + return c:IsSetCard(SET_SILENT_SWORDSMAN) and c:IsFaceup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -42,12 +38,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then --Gains 1500 ATK/DEF local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1500) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -61,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e3:SetRange(LOCATION_MZONE) e3:SetValue(s.efilter) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetOwnerPlayer(tp) tc:RegisterEffect(e3) end @@ -70,7 +66,7 @@ function s.efilter(e,re) return e:GetOwnerPlayer()~=re:GetOwnerPlayer() end function s.thfilter(c) - return c:IsSetCard(0xe7) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SILENT_SWORDSMAN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c18585765.lua b/official/c18585765.lua index 339a5c1afb..47275e1699 100644 --- a/official/c18585765.lua +++ b/official/c18585765.lua @@ -59,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c18590133.lua b/official/c18590133.lua index 6ed2df9880..eb1fed59be 100644 --- a/official/c18590133.lua +++ b/official/c18590133.lua @@ -1,4 +1,5 @@ --キングゴブリン +--Goblin King local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -28,4 +29,4 @@ function s.ccon(e) end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_FIEND),c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c)*1000 -end +end \ No newline at end of file diff --git a/official/c18591904.lua b/official/c18591904.lua index 827a429102..14f9cb31f1 100644 --- a/official/c18591904.lua +++ b/official/c18591904.lua @@ -1,4 +1,5 @@ --最終戦争 +--Final Destiny local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,5,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end @@ -23,4 +24,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18597560.lua b/official/c18597560.lua index 493115694e..9c84bf6895 100644 --- a/official/c18597560.lua +++ b/official/c18597560.lua @@ -1,6 +1,5 @@ --サイバネティック・レボリューション --Cybernetic Revolution - local s,id=GetID() function s.initial_effect(c) --Special summon 1 fusion monster, that lists "Cyber Dragon" as material, from extra deck @@ -12,11 +11,10 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(TIMING_BATTLE_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1) end s.listed_names={CARD_CYBER_DRAGON} - function s.cfilter(c,e,tp) return c:IsCode(CARD_CYBER_DRAGON) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end @@ -26,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c,e,tp,mc) - return c:IsType(TYPE_FUSION) and c:ListsArchetypeAsMaterial(0x1093) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_FUSION) and c:ListsArchetypeAsMaterial(SET_CYBER_DRAGON) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) --Cannot attack directly local e1=Effect.CreateEffect(c) e1:SetDescription(3207) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Destroy it during next end phase local e2=Effect.CreateEffect(c) @@ -53,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) e2:SetCountLimit(1) e2:SetLabel(Duel.GetTurnCount()) e2:SetLabelObject(tc) diff --git a/official/c18605135.lua b/official/c18605135.lua index 6410e95940..9e4c4ac07d 100644 --- a/official/c18605135.lua +++ b/official/c18605135.lua @@ -29,4 +29,4 @@ end s.listed_names={CARD_UMI} function s.umicheck() return Duel.IsEnvironment(CARD_UMI) -end +end \ No newline at end of file diff --git a/official/c1861629.lua b/official/c1861629.lua index d25c6d369a..5c5059d54b 100644 --- a/official/c1861629.lua +++ b/official/c1861629.lua @@ -59,4 +59,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18634367.lua b/official/c18634367.lua index 669c66933b..18c827165a 100644 --- a/official/c18634367.lua +++ b/official/c18634367.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_BATTLE_START) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_BATTLE_START) e1:SetTarget(s.target) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c18654201.lua b/official/c18654201.lua index 2205d8494c..691c89d5b1 100644 --- a/official/c18654201.lua +++ b/official/c18654201.lua @@ -1,4 +1,5 @@ --クリオスフィンクス +--Criosphinx local s,id=GetID() function s.initial_effect(c) --reg @@ -45,4 +46,4 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) else Duel.DiscardHand(ep,nil,1,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18658572.lua b/official/c18658572.lua index de5cb9f29c..3e5f3da803 100644 --- a/official/c18658572.lua +++ b/official/c18658572.lua @@ -1,4 +1,5 @@ --見世物ゴブリン +--Goblin Circus local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)~=0 + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)~=0 end function s.cfop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -31,4 +32,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) Duel.DisableShuffleCheck() Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18666161.lua b/official/c18666161.lua index 0d736aa67f..1b4cac35ce 100644 --- a/official/c18666161.lua +++ b/official/c18666161.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x166),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESPIA),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) --Banish or Special Summon local e1=Effect.CreateEffect(c) e1:SetCode(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x166} +s.listed_series={SET_DESPIA} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end @@ -79,4 +79,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if dam<0 then dam=0 end Duel.Damage(p,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18678554.lua b/official/c18678554.lua index 807f993586..f708477070 100644 --- a/official/c18678554.lua +++ b/official/c18678554.lua @@ -21,22 +21,22 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) end -s.listed_series={0x126} +s.listed_series={SET_TIME_THIEF} function s.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_TIME_THIEF) end function s.matfilter(c) - return c:IsSetCard(0x126) + return c:IsSetCard(SET_TIME_THIEF) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end + and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) end @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.Overlay(tc,g) end diff --git a/official/c18698739.lua b/official/c18698739.lua index 7a6ebf76ba..29c997749d 100644 --- a/official/c18698739.lua +++ b/official/c18698739.lua @@ -1,4 +1,5 @@ --ガーベージ・オーガ +--Garbage Ogre local s,id=GetID() function s.initial_effect(c) --search @@ -8,16 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={44682448} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsCode(44682448) and c:IsAbleToHand() end @@ -31,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c18712704.lua b/official/c18712704.lua index 9a99d4afc3..b1d9b4bc12 100644 --- a/official/c18712704.lua +++ b/official/c18712704.lua @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.condition(e,tp,eg,ep,ev,re,r,rp) local att=eg:GetFirst() - return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and att:IsFaceup() and att:IsSetCard(0xb) + return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and att:IsFaceup() and att:IsSetCard(SET_INFERNITY) end function s.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INFERNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -44,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c18716735.lua b/official/c18716735.lua index d2b3366478..1239478404 100644 --- a/official/c18716735.lua +++ b/official/c18716735.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.desfilter(c,tp) if c:IsFacedown() then return false end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -39,7 +39,7 @@ function s.desfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end @@ -73,11 +73,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsSetCard(0xe1) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_METALFOES) and c:IsMonster() and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) diff --git a/official/c18720257.lua b/official/c18720257.lua index 4620a22558..327d366268 100644 --- a/official/c18720257.lua +++ b/official/c18720257.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2a:SetRange(LOCATION_FZONE) e2a:SetTargetRange(LOCATION_SZONE,0) e2a:SetCondition(s.addtypecon) - e2a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x109)) + e2a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_THE_WEATHER)) e2a:SetValue(TYPE_MONSTER) c:RegisterEffect(e2a) --Normal Summon 1 "The Weather" monster from your hand @@ -41,9 +41,9 @@ function s.initial_effect(c) e3:SetOperation(s.nsop) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.plfilter(c,tp) - return c:IsType(TYPE_SPELL|TYPE_TRAP) and c:IsSetCard(0x109) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + return c:IsSpellTrap() and c:IsSetCard(SET_THE_WEATHER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsType(TYPE_FIELD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -57,12 +57,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x109) and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 end function s.extraval(chk,summon_type,e,...) if chk==0 then local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not (sc and sc:IsSetCard(0x109)) then + if summon_type~=SUMMON_TYPE_LINK or not (sc and sc:IsSetCard(SET_THE_WEATHER)) then return Group.CreateGroup() else Duel.RegisterFlagEffect(tp,id,0,0,1) @@ -76,16 +76,15 @@ function s.addtypecon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)>0 end function s.nsfilter(c) - return c:IsSetCard(0x109) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_THE_WEATHER) and c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() if tc then Duel.Summon(tp,tc,true,nil) end diff --git a/official/c18724123.lua b/official/c18724123.lua index 0273af1eb5..3abe3b41c7 100644 --- a/official/c18724123.lua +++ b/official/c18724123.lua @@ -1,4 +1,5 @@ --インフェルニティ・アーチャー +--Infernity Archer local s,id=GetID() function s.initial_effect(c) --direct attack @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.con(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end +end \ No newline at end of file diff --git a/official/c1872843.lua b/official/c1872843.lua index a8d3291d8d..a738e6d392 100644 --- a/official/c1872843.lua +++ b/official/c1872843.lua @@ -1,7 +1,6 @@ --夢魔鏡の白騎士-ルペウス --Morpheus, the Dream Mirror White Knight --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Make itself unable to be destroyed by battle or card effects @@ -18,22 +17,21 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={38267552,CARD_DREAM_MIRROR_TERROR} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.indcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -45,7 +43,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -53,13 +51,8 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_DREAM_MIRROR_TERROR),tp,LOCATION_FZONE,LOCATION_FZONE,1,nil,tp) - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.spfilter(c,e,tp) return c:IsCode(38267552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c18739764.lua b/official/c18739764.lua index 44ee423fea..18f5c78502 100644 --- a/official/c18739764.lua +++ b/official/c18739764.lua @@ -1,4 +1,5 @@ --デストラクト・ポーション +--Destruct Potion local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c18743376.lua b/official/c18743376.lua index 894d02b221..0ca6a38f94 100644 --- a/official/c18743376.lua +++ b/official/c18743376.lua @@ -1,4 +1,5 @@ --メタファイズ・タイラント・ドラゴン +--Metaphys Tyrant Dragon local s,id=GetID() function s.initial_effect(c) --summon success @@ -14,18 +15,18 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetRange(LOCATION_REMOVED) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x105) + return re and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_METAPHYS) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -35,24 +36,24 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BATTLED) e2:SetOperation(s.caop1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetOperation(s.caop2) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetLabelObject(e2) c:RegisterEffect(e3) end function s.efilter(e,re) - return re:IsActiveType(TYPE_TRAP) + return re:IsTrapEffect() end function s.caop1(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -69,12 +70,8 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x105) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_METAPHYS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -86,7 +83,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) @@ -111,4 +108,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18752707.lua b/official/c18752707.lua index d021c867cb..1f82ee2599 100644 --- a/official/c18752707.lua +++ b/official/c18752707.lua @@ -1,4 +1,5 @@ --マジカル・スター・イリュージョン +--Magical Star Illusion local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else e1:SetValue(val2) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c18752938.lua b/official/c18752938.lua index 86befc2945..8198e13654 100644 --- a/official/c18752938.lua +++ b/official/c18752938.lua @@ -1,4 +1,5 @@ --偽りの種 +--Seed of Deception local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18756904.lua b/official/c18756904.lua index 555c5767bf..38977fb01c 100644 --- a/official/c18756904.lua +++ b/official/c18756904.lua @@ -1,4 +1,5 @@ --馬の骨の対価 +--White Elephant's Gift local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18760514.lua b/official/c18760514.lua index e38668579e..3b34343a9b 100644 --- a/official/c18760514.lua +++ b/official/c18760514.lua @@ -1,7 +1,6 @@ --マッドマーダー ---Crazy Clown +--Mad Mauler --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(33420078) c:RegisterEffect(e1) --Reduce targeted monster's level by 2, Special Summon this card from GY @@ -27,7 +26,6 @@ function s.initial_effect(c) end --Specifically lists "Plaguespreader Zombie" s.listed_names={33420078} - --Check for a level 6+ monster function s.filter(c) return c:IsFaceup() and c:IsLevelAbove(6) @@ -51,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-2) tc:RegisterEffect(e1) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -65,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetRange(LOCATION_MZONE) e2:SetAbsoluteRange(tp,1,0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetTarget(function(_,c)return not c:IsRace(RACE_ZOMBIE)end) c:RegisterEffect(e2) end \ No newline at end of file diff --git a/official/c1876841.lua b/official/c1876841.lua index 319c3e0451..35c94bd045 100644 --- a/official/c1876841.lua +++ b/official/c1876841.lua @@ -37,9 +37,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation_d) c:RegisterEffect(e3) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cfilter(c) - return c:IsSetCard(0x26) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.thdfilter(c) - return c:IsSetCard(0x26) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target_a(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thdfilter,tp,LOCATION_DECK,0,1,nil) end @@ -85,7 +85,7 @@ function s.operation_a(e,tp,eg,ep,ev,re,r,rp) end end function s.thgfilter(c) - return c:IsMonster() and c:IsSetCard(0x26) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_MORPHTRONIC) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.target_d(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thgfilter,tp,LOCATION_GRAVE,0,1,nil) end diff --git a/official/c18789533.lua b/official/c18789533.lua index 8b1c10cfcb..f4d6ac13c7 100644 --- a/official/c18789533.lua +++ b/official/c18789533.lua @@ -1,4 +1,5 @@ --ドットスケーパー +--Dotscaper local s,id=GetID() function s.initial_effect(c) --spsummon @@ -20,7 +21,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c18803791.lua b/official/c18803791.lua index 39716732ae..422944f334 100644 --- a/official/c18803791.lua +++ b/official/c18803791.lua @@ -1,4 +1,5 @@ --黒竜降臨 +--Dark Dragon Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,4,nil,71408082) @@ -8,14 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(aux.exccon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.thfilter(c) - return c:IsSetCard(0x3b) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_RED_EYES) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +29,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c18807108.lua b/official/c18807108.lua index 43fa891636..5b9f1830f9 100644 --- a/official/c18807108.lua +++ b/official/c18807108.lua @@ -1,4 +1,5 @@ --六芒星の呪縛 +--Spellbinding Circle local s,id=GetID() function s.initial_effect(c) aux.AddPersistentProcedure(c,1,nil,CATEGORY_POSITION,nil,nil,nil,nil,nil,nil,nil,true) @@ -29,4 +30,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18809562.lua b/official/c18809562.lua index b4bc3dfab9..87ccb35c83 100644 --- a/official/c18809562.lua +++ b/official/c18809562.lua @@ -1,4 +1,5 @@ --魔導契約の扉 +--Magical Contract Door local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c18816758.lua b/official/c18816758.lua index 07d5f87b5a..1052e7de9f 100644 --- a/official/c18816758.lua +++ b/official/c18816758.lua @@ -1,4 +1,5 @@ --侵略の波動 +--Infestation Wave local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100a) - and c:IsSummonType(SUMMON_TYPE_TRIBUTE) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_STEELSWARM) + and c:IsTributeSummoned() and c:IsAbleToHandAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18828179.lua b/official/c18828179.lua index 7debf9d9ae..bd74e66ba6 100644 --- a/official/c18828179.lua +++ b/official/c18828179.lua @@ -49,7 +49,7 @@ function s.cfilter(c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFacedown() @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18832779.lua b/official/c18832779.lua index 06623066e3..50611b1f19 100644 --- a/official/c18832779.lua +++ b/official/c18832779.lua @@ -1,20 +1,19 @@ --海造賊-双翼のリュース号 --Plunder Patrollship Lys --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x13f),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PLUNDER_PATROLL),2) --Special summon 1 "Plunder Patroll" monster from hand or S/T zones local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCost(s.announcecost) @@ -37,8 +36,7 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) @@ -47,32 +45,32 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x13f) and (c:IsFaceup() or not c:IsLocation(LOCATION_SZONE)) + return c:IsSetCard(SET_PLUNDER_PATROLL) and (c:IsFaceup() or not c:IsLocation(LOCATION_SZONE)) and c:IsOriginalType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_SZONE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_SZONE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_SZONE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_SZONE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.negcfilter(c) - return c:IsSetCard(0x13f) and c:IsDiscardable() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsDiscardable() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.negcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.negcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.negcfilter,1,1,REASON_COST|REASON_DISCARD) s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -84,12 +82,12 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0x13f) and c:IsAbleToHand() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAbleToHand() end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) - and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x13f) then + and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_PLUNDER_PATROLL) then local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c18837926.lua b/official/c18837926.lua index 981f855d21..4cfeedf263 100644 --- a/official/c18837926.lua +++ b/official/c18837926.lua @@ -1,4 +1,5 @@ --切れぎみ隊長 +--Motivating Captain local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,13 +31,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c18842395.lua b/official/c18842395.lua index 7a2d698e53..0f363c0abc 100644 --- a/official/c18842395.lua +++ b/official/c18842395.lua @@ -1,4 +1,5 @@ --パワー・インベーダー +--Power Invader local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -14,4 +15,4 @@ function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>=2 -end +end \ No newline at end of file diff --git a/official/c18847598.lua b/official/c18847598.lua index 584820324b..036841e69b 100644 --- a/official/c18847598.lua +++ b/official/c18847598.lua @@ -60,7 +60,7 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.negatkcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() diff --git a/official/c18859369.lua b/official/c18859369.lua index 2c1053036d..2914540094 100644 --- a/official/c18859369.lua +++ b/official/c18859369.lua @@ -51,4 +51,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/official/c18861006.lua b/official/c18861006.lua index e4f7d56347..274003d8a2 100644 --- a/official/c18861006.lua +++ b/official/c18861006.lua @@ -61,7 +61,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(function(e,re,rp) return re:IsActivated() end) - e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END|RESET_CHAIN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_CHAIN) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c18865703.lua b/official/c18865703.lua index a82971610e..35a030f8bd 100644 --- a/official/c18865703.lua +++ b/official/c18865703.lua @@ -29,12 +29,12 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.eqcon(e) return e:GetHandler():CheckUniqueOnField(e:GetHandlerPlayer()) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -60,7 +60,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c18890039.lua b/official/c18890039.lua index b5b8750e46..69835c26b2 100644 --- a/official/c18890039.lua +++ b/official/c18890039.lua @@ -1,9 +1,9 @@ --- --- Libromancer First Appearance --- Scripted by Hatter +--リブロマンサー・ライジング +--Libromancer First Appearance +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -11,15 +11,15 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetOperation(s.activate) c:RegisterEffect(e1) - -- Ritual Summon 1 "Libromancer" monster - local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,0x17d),nil,aux.Stringid(id,1)) + --Ritual Summon 1 "Libromancer" monster + local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,SET_LIBROMANCER),nil,aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_FZONE) c:RegisterEffect(e2) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.thfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0x17d) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_LIBROMANCER) and c:IsAbleToHand() and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end \ No newline at end of file +end diff --git a/official/c18891691.lua b/official/c18891691.lua index fb29862185..55f74a63f1 100644 --- a/official/c18891691.lua +++ b/official/c18891691.lua @@ -1,4 +1,5 @@ --パーフェクト機械王 +--Perfect Machine King local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())*500 -end +end \ No newline at end of file diff --git a/official/c18895832.lua b/official/c18895832.lua index e1514b897d..c358907cbc 100644 --- a/official/c18895832.lua +++ b/official/c18895832.lua @@ -1,4 +1,5 @@ --システム・ダウン +--System Down local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,15 +7,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and aux.SpElimFilter(c,true,true) end @@ -23,13 +20,13 @@ function s.tfilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) return #g>0 and not g:IsExists(s.tfilter,1,nil) end - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c18897163.lua b/official/c18897163.lua index 19ec20c08a..a7700733ce 100644 --- a/official/c18897163.lua +++ b/official/c18897163.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10af),8,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DDD),8,2) --special summon 1 "D/D/D" from the Extra Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) - e4:SetCost(s.descost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) @@ -57,13 +57,13 @@ function s.initial_effect(c) e5:SetOperation(s.penop) c:RegisterEffect(e5) end -s.listed_series={0x10af,0xaf} +s.listed_series={SET_DDD,SET_DD} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xaf) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_DD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10af) and c:IsType(TYPE_XYZ) and not c:IsCode(id) + return c:IsSetCard(SET_DDD) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,10 +79,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaf) + return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_DD) end function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -97,10 +97,6 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,og) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_MZONE,0,nil) @@ -128,4 +124,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c18937875.lua b/official/c18937875.lua index 46866b23f3..f7e9821344 100644 --- a/official/c18937875.lua +++ b/official/c18937875.lua @@ -1,4 +1,5 @@ --灼熱の槍 +--Burning Spear local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.filter(c) return c:IsAttribute(ATTRIBUTE_FIRE) -end +end \ No newline at end of file diff --git a/official/c18940556.lua b/official/c18940556.lua index 9063e31bc7..5a0c58f4f6 100644 --- a/official/c18940556.lua +++ b/official/c18940556.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) @@ -48,11 +48,11 @@ end function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sprtg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) if #g>0 then g:KeepAlive() @@ -77,20 +77,20 @@ function s.filter(c) return not c:IsPublic() or c:IsMonster() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.posfilter,tp,0,LOCATION_MZONE,1,nil) end - local dg=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local dg=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil) if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND|LOCATION_MZONE) else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) end Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectMatchingCard(tp,Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g1=Duel.SelectMatchingCard(tp,Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g1>0 and Duel.Destroy(g1,REASON_EFFECT)~=0 then local g2=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil) if #g2>0 then @@ -111,4 +111,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(d,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c18940725.lua b/official/c18940725.lua index f5c0095e5d..68a21ecfa6 100644 --- a/official/c18940725.lua +++ b/official/c18940725.lua @@ -1,5 +1,5 @@ --ふわんだりぃず×ろびーな ---Flundereeze x Robina +--Floowandereeze & Robina --Logical Nonsense --Substitute ID local s,id=GetID() @@ -46,13 +46,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -77,7 +77,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) if not g:GetFirst():IsLocation(LOCATION_HAND) then return end --Normal summon 1 winged beast monster - local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if #sg1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() Duel.ShuffleHand(tp) @@ -103,4 +103,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18960169.lua b/official/c18960169.lua index 79efc36247..07e2321431 100644 --- a/official/c18960169.lua +++ b/official/c18960169.lua @@ -1,4 +1,5 @@ --ゴブリン陽動部隊 +--Goblin Decoy Squad local s,id=GetID() function s.initial_effect(c) --draw @@ -15,7 +16,7 @@ function s.initial_effect(c) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -47,6 +48,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c1896112.lua b/official/c1896112.lua index fc5b01b0cb..8f814ab4bb 100644 --- a/official/c1896112.lua +++ b/official/c1896112.lua @@ -21,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,ft) - Duel.SendtoDeck(g,nil,0,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -65,4 +65,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c18963306.lua b/official/c18963306.lua index f270768ac4..9d917157e8 100644 --- a/official/c18963306.lua +++ b/official/c18963306.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() end @@ -40,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1) then @@ -49,27 +45,27 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) e2:SetCondition(s.concon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetCondition(s.concon) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_SET_ATTACK_FINAL) e4:SetCondition(s.concon) e4:SetValue(3000) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_CHANGE_CODE) e5:SetCondition(s.concon) e5:SetValue(id) - e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e5:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e5) end end @@ -81,4 +77,4 @@ function s.concon(e) end function s.atktg(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c18964575.lua b/official/c18964575.lua index ea8b79fe64..90c40bbc13 100644 --- a/official/c18964575.lua +++ b/official/c18964575.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -17,12 +17,8 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() return at:GetControler()~=tp and Duel.GetAttackTarget()==nil end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c18967507.lua b/official/c18967507.lua index d60d0330db..3e3ff90cc1 100644 --- a/official/c18967507.lua +++ b/official/c18967507.lua @@ -18,8 +18,8 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetTarget(Cyberdark.EquipTarget(aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON+RACE_MACHINE),false,false)) - e2:SetOperation(Cyberdark.EquipOperation(aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON+RACE_MACHINE),s.equipop,false)) + e2:SetTarget(Cyberdark.EquipTarget(aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_MACHINE),false,false)) + e2:SetOperation(Cyberdark.EquipOperation(aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON|RACE_MACHINE),s.equipop,false)) c:RegisterEffect(e2) aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e2) --Negate @@ -36,12 +36,12 @@ function s.initial_effect(c) e3:SetOperation(s.negop) c:RegisterEffect(e3) end -s.material_setcode={0x93,0x4093} +s.material_setcode={SET_CYBER,SET_CYBERDARK} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsRace(RACE_DRAGON+RACE_MACHINE) + return ec:IsControler(tp) and ec:IsRace(RACE_DRAGON|RACE_MACHINE) end function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_EFFECT,fc,sumtype,tp) and c:IsSetCard(0x4093,fc,sumtype,tp) + return c:IsType(TYPE_EFFECT,fc,sumtype,tp) and c:IsSetCard(SET_CYBERDARK,fc,sumtype,tp) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st) @@ -54,7 +54,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -82,4 +82,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c18973184.lua b/official/c18973184.lua index a8cc5fb9be..206e7a7fb4 100644 --- a/official/c18973184.lua +++ b/official/c18973184.lua @@ -1,5 +1,5 @@ --失烙印 ---Paradise Branded +--Branded Lost --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -50,7 +50,7 @@ function s.efilter(e,ct) return tp==rp and te:IsHasCategory(CATEGORY_FUSION_SUMMON) end function s.limfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsSummonPlayer(tp) and c:IsFusionSummoned() end function s.limcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.limfilter,1,nil,tp) @@ -59,7 +59,7 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentChain()==0 then Duel.SetChainLimitTillChainEnd(s.chainlm) elseif Duel.GetCurrentChain()==1 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) @@ -85,7 +85,7 @@ function s.chainlm(e,rp,tp) return tp==rp end function s.cfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsType(TYPE_FUSION) + return c:IsSummonPlayer(tp) and c:IsFusionSummoned() and c:IsType(TYPE_FUSION) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -105,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c18988391.lua b/official/c18988391.lua index 4e92e8d82d..0d82522622 100644 --- a/official/c18988391.lua +++ b/official/c18988391.lua @@ -1,4 +1,5 @@ --アマリリース +--Amarylease local s,id=GetID() function s.initial_effect(c) --decrease tribute @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -18,6 +19,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_HAND,0) e1:SetCountLimit(1) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c19012345.lua b/official/c19012345.lua index 05ada9ce68..b40ea1b14f 100644 --- a/official/c19012345.lua +++ b/official/c19012345.lua @@ -1,4 +1,5 @@ --灰塵王 アッシュ・ガッシュ +--Gash the Dust Lord local s,id=GetID() function s.initial_effect(c) --lvup @@ -20,6 +21,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c19019586.lua b/official/c19019586.lua index f7a0a2bb71..c3a324120f 100644 --- a/official/c19019586.lua +++ b/official/c19019586.lua @@ -1,4 +1,5 @@ --ジェムエレファント +--Gem-Elephant local s,id=GetID() function s.initial_effect(c) --to hand @@ -45,14 +46,14 @@ function s.defcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.defop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(1000) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c19024706.lua b/official/c19024706.lua index 31aedd8e09..d78e3d63ed 100644 --- a/official/c19024706.lua +++ b/official/c19024706.lua @@ -1,4 +1,5 @@ --ヒーロー逆襲 +--Hero Counterattack local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.cfilter(c,tp) - return c:IsSetCard(0x3008) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x3008) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,SET_ELEMENTAL_HERO) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) @@ -27,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=sg:GetFirst() if tc then Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0x3008) and tc:IsMonster() then + if tc:IsSetCard(SET_ELEMENTAL_HERO) and tc:IsMonster() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) Duel.Destroy(dg,REASON_EFFECT) @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(tp) end end -end +end \ No newline at end of file diff --git a/official/c19025379.lua b/official/c19025379.lua index db820d2905..931fa14234 100644 --- a/official/c19025379.lua +++ b/official/c19025379.lua @@ -1,4 +1,5 @@ --ロード・オブ・ザ・レッド +--Lord of the Red local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -35,7 +36,7 @@ function s.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desfilter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter2(chkc) end @@ -56,4 +57,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19027895.lua b/official/c19027895.lua index 13f6be9a66..d403af3bcf 100644 --- a/official/c19027895.lua +++ b/official/c19027895.lua @@ -25,8 +25,8 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) - e2:SetCost(aux.bfgcost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c19028307.lua b/official/c19028307.lua index ca9338fbee..9ee475edb2 100644 --- a/official/c19028307.lua +++ b/official/c19028307.lua @@ -34,8 +34,8 @@ function s.spcon(e,c) local c=e:GetHandler() if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,RACE_MACHINE) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,RACE_BEASTWARRIOR) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,RACE_MACHINE) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,RACE_BEASTWARRIOR) local rg=rg1:Clone() rg:Merge(rg2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg1>0 and #rg2>0 @@ -43,8 +43,8 @@ function s.spcon(e,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,RACE_MACHINE) - rg:Merge(Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,RACE_BEASTWARRIOR)) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,RACE_MACHINE) + rg:Merge(Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,RACE_BEASTWARRIOR)) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() diff --git a/official/c19036557.lua b/official/c19036557.lua index d0bfa126a9..229ebbb7d1 100644 --- a/official/c19036557.lua +++ b/official/c19036557.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.attop) c:RegisterEffect(e2) end -s.listed_series={0x400d,0x113} +s.listed_series={SET_ELEMENTSABER,SET_ELEMENTAL_LORD} s.listed_names={} function s.costfilter(c,tp) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,7 +35,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) fg:AddCard(pe:GetHandler()) end local loc=LOCATION_HAND - if #fg>0 then loc=LOCATION_HAND+LOCATION_DECK end + if #fg>0 then loc=LOCATION_HAND|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,tp):GetFirst() @@ -47,12 +47,12 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) fc=fg:Select(tp,1,1,nil) end Duel.Hint(HINT_CARD,0,fc:GetCode()) - fc:RegisterFlagEffect(61557074,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + fc:RegisterFlagEffect(61557074,RESETS_STANDARD_PHASE_END,0,0) end Duel.SendtoGrave(tc,REASON_COST) end function s.thfilter(c) - return c:IsMonster() and not c:IsCode(id) and (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and c:IsAbleToHand() + return c:IsMonster() and not c:IsCode(id) and (c:IsSetCard(SET_ELEMENTSABER) or c:IsSetCard(SET_ELEMENTAL_LORD)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -83,6 +83,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c19041767.lua b/official/c19041767.lua index 9f9c9fce6c..4f23531ca7 100644 --- a/official/c19041767.lua +++ b/official/c19041767.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -32,20 +32,16 @@ function s.filter(c) return c:IsType(TYPE_GEMINI) and c:CanSummonOrSet(true,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() if tc then Duel.SummonOrSet(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c19048328.lua b/official/c19048328.lua index d8521663d1..ce80e3ce14 100644 --- a/official/c19048328.lua +++ b/official/c19048328.lua @@ -45,9 +45,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.matcheck(e,c) - local g=c:GetMaterial():Filter(Card.IsSetCard,nil,0x9e) + local g=c:GetMaterial():Filter(Card.IsSetCard,nil,SET_YANG_ZING) local att=0 local tc=g:GetFirst() for tc in aux.Next(g) do @@ -56,7 +56,7 @@ function s.matcheck(e,c) e:SetLabel(att) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -66,23 +66,23 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.aclimit) e1:SetLabelObject(e:GetLabelObject()) c:RegisterEffect(e1) local att=e:GetLabelObject():GetLabel() for _,str in aux.GetAttributeStrings(att) do - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,str) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,str) end end function s.aclimit(e,re,tp) local att=e:GetLabelObject():GetLabel() - return re:IsActiveType(TYPE_MONSTER) and (att&re:GetHandler():GetOriginalAttribute())~=0 + return re:IsMonsterEffect() and (att&re:GetHandler():GetOriginalAttribute())~=0 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.thfilter(c) return c:IsType(TYPE_TUNER) and c:IsAbleToHand() @@ -100,7 +100,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,p) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetOriginalAttribute()~=0 + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetOriginalAttribute()~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==p end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -131,4 +131,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c19050066.lua b/official/c19050066.lua index 51f2078f9c..fc2743ee0b 100644 --- a/official/c19050066.lua +++ b/official/c19050066.lua @@ -1,5 +1,5 @@ --EMバロックリボー ---Performapal BaroKuriboh +--Performapal Barokuriboh --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1) e1:SetTarget(s.thtg) @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetOperation(s.posop) c:RegisterEffect(e4) end -s.listed_series={0x99,0x9f} +s.listed_series={SET_ODD_EYES,SET_PERFORMAPAL} function s.thfilter(c) return c:IsAttack(300) and c:IsDefense(200) and c:IsMonster() and c:IsAbleToHand() end @@ -89,4 +89,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsDefensePos() then Duel.ChangePosition(c,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c19059929.lua b/official/c19059929.lua index 4a16e8e937..b69afc6650 100644 --- a/official/c19059929.lua +++ b/official/c19059929.lua @@ -1,4 +1,5 @@ --炎舞-「玉衝」 +--Fire Formation - Gyokkou local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -51,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c19066538.lua b/official/c19066538.lua index 612517617b..c4ad4551ac 100644 --- a/official/c19066538.lua +++ b/official/c19066538.lua @@ -1,7 +1,8 @@ --轟きの大海蛇 +--Roaring Ocean Snake local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,98049915,2118022) -end +end \ No newline at end of file diff --git a/official/c1906812.lua b/official/c1906812.lua index d82e48135d..4b37815dcc 100644 --- a/official/c1906812.lua +++ b/official/c1906812.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving - c:EnableReviveLimit() + c:EnableReviveLimit() --Fusion summon procedure Fusion.AddProcMix(c,true,true,CARD_ALBAZ,aux.FilterBoolFunctionEx(s.filter)) --Move itself to 1 of your unused MMZ @@ -26,10 +26,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Sprigguns" archetype -s.listed_series={0x158} +s.listed_series={SET_SPRINGANS} --Specifically lists "Fallen of Albaz" s.listed_names={CARD_ALBAZ} - --Check for an effect that was special summoned this turn function s.filter(c) return c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_EFFECT) and c:IsStatus(STATUS_SPSUMMON_TURN) @@ -67,12 +66,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,id) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end --Check for a "Sprigguns" monster or "Fallen of Albaz" function s.thfilter(c,e,tp,ft) - return c:IsMonster() and (c:IsSetCard(0x158) or c:IsCode(CARD_ALBAZ)) + return c:IsMonster() and (c:IsSetCard(SET_SPRINGANS) or c:IsCode(CARD_ALBAZ)) and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ft>0)) end --Activation legality @@ -94,4 +93,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,3)) end -end +end \ No newline at end of file diff --git a/official/c19086954.lua b/official/c19086954.lua index 34748dd199..9feedc2dd7 100644 --- a/official/c19086954.lua +++ b/official/c19086954.lua @@ -1,4 +1,5 @@ --セコンド・ゴブリン +--Second Goblin local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,73698349),true) @@ -25,4 +26,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.ChangePosition(c:GetEquipTarget(),POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c19089195.lua b/official/c19089195.lua index 28e5300b62..4f73789d09 100644 --- a/official/c19089195.lua +++ b/official/c19089195.lua @@ -38,7 +38,7 @@ function s.filter(c,tp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local tc=g:Select(tp,1,1,nil):GetFirst() @@ -68,7 +68,7 @@ function s.remcost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(g:GetFirst()) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -86,7 +86,7 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsSpellTrap)) e1:SetValue(aux.indoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -111,4 +111,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19096726.lua b/official/c19096726.lua index ba63d669e1..bca616987d 100644 --- a/official/c19096726.lua +++ b/official/c19096726.lua @@ -1,22 +1,22 @@ --- 鉄獣鳥 メルクーリエ --- Tri-Brigade Mercourier --- Scripted by Hatter +--鉄獣鳥 メルクーリエ +--Tri-Brigade Mercourier +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate + --Negate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) - -- Search + --Search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -33,14 +33,9 @@ function s.negconfilter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_ALBAZ) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsExistingMatchingCard(s.negconfilter,tp,LOCATION_MZONE,0,1,nil,tp) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsChainDisablable(ev) and not re:GetHandler():IsStatus(STATUS_DISABLED) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) @@ -63,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c19113101.lua b/official/c19113101.lua index cc45e551a8..334852d9c0 100644 --- a/official/c19113101.lua +++ b/official/c19113101.lua @@ -1,4 +1,5 @@ --プリベントマト +--Interceptomato local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,12 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -22,14 +23,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c19139516.lua b/official/c19139516.lua index 9feebc4a40..7468b9da5d 100644 --- a/official/c19139516.lua +++ b/official/c19139516.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.destg) @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c19153590.lua b/official/c19153590.lua index d75af280b6..c8760e6827 100644 --- a/official/c19153590.lua +++ b/official/c19153590.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x111} +s.listed_series={SET_ARMED_DRAGON} function s.tgfilter1(c) return (c:IsAttribute(ATTRIBUTE_WIND) or c:IsLevelAbove(7)) and c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() end @@ -49,12 +49,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter2(c) - return c:IsSetCard(0x111) and c:IsMonster() and c:IsAbleToGraveAsCost() and not c:IsCode(id) + return c:IsSetCard(SET_ARMED_DRAGON) and c:IsMonster() and c:IsAbleToGraveAsCost() and not c:IsCode(id) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) local atk=g:GetFirst():GetLevel()*300 e:SetLabel(atk) @@ -74,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end --Can only attack with 1 monster @@ -86,14 +86,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCondition(s.limitcon) e2:SetTarget(s.limittg) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetOperation(s.checkop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetLabelObject(e2) Duel.RegisterEffect(e3,tp) end @@ -106,4 +106,4 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local fid=eg:GetFirst():GetFieldID() e:GetLabelObject():SetLabel(fid) -end +end \ No newline at end of file diff --git a/official/c19153634.lua b/official/c19153634.lua index 8916de0e1a..18d60dbf4f 100644 --- a/official/c19153634.lua +++ b/official/c19153634.lua @@ -1,4 +1,5 @@ --ノーブル・ド・ノワール +--Patrician of Darkness local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,4 +10,4 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c19159413.lua b/official/c19159413.lua index 64580816a8..c4929f0845 100644 --- a/official/c19159413.lua +++ b/official/c19159413.lua @@ -1,4 +1,5 @@ --魔法除去 +--De-Spell local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end if tc:IsSpell() then Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c19162134.lua b/official/c19162134.lua index ae95eee888..e1a404f5a3 100644 --- a/official/c19162134.lua +++ b/official/c19162134.lua @@ -141,4 +141,4 @@ function s.damcon(p) tp=tp~p return ep==tp and Duel.GetLP(tp)<=500 and Duel.GetLP(tp)>0 end -end +end \ No newline at end of file diff --git a/official/c19163116.lua b/official/c19163116.lua index 5246b5723c..5a6bbff1d6 100644 --- a/official/c19163116.lua +++ b/official/c19163116.lua @@ -1,4 +1,5 @@ --ジェムナイト・オブシディア +--Gem-Knight Obsidian local s,id=GetID() function s.initial_effect(c) --spsummon @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c191749.lua b/official/c191749.lua index 713b3c2f81..43cc845a3f 100644 --- a/official/c191749.lua +++ b/official/c191749.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.cfilter(c,code) return c:IsCode(code) and c:IsAbleToRemoveAsCost() end @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -37,7 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.dfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsSetCard(0x3008) + return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then @@ -53,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c1918087.lua b/official/c1918087.lua index 824758f159..d6ac52a6ee 100644 --- a/official/c1918087.lua +++ b/official/c1918087.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) @@ -27,7 +27,7 @@ function s.actcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(1-tp)<=3000 end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,4 +38,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19182751.lua b/official/c19182751.lua index d8e8a61f8e..36fa7e45b1 100644 --- a/official/c19182751.lua +++ b/official/c19182751.lua @@ -1,4 +1,5 @@ --ジェネクス・ニュートロン +--Genex Neutron local s,id=GetID() function s.initial_effect(c) --search @@ -19,7 +20,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetReset(RESET_EVENT+0x16c0000+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_TOFIELD|RESET_PHASE|PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c) @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c19186123.lua b/official/c19186123.lua index 1ecbc0053f..5bb1ea3715 100644 --- a/official/c19186123.lua +++ b/official/c19186123.lua @@ -21,14 +21,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x5008} +s.listed_series={SET_VISION_HERO} function s.filter(c,e,sp) - return c:IsFaceup() and c:IsSetCard(0x5008) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_VISION_HERO) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c,e,tp) - return c:IsSetCard(0x5008) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_VISION_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19190082.lua b/official/c19190082.lua index c5bf9c8e97..5964019e90 100644 --- a/official/c19190082.lua +++ b/official/c19190082.lua @@ -29,4 +29,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c19204398.lua b/official/c19204398.lua index bb158cf4d5..e40a704fb4 100644 --- a/official/c19204398.lua +++ b/official/c19204398.lua @@ -1,4 +1,5 @@ --A・O・J ライト・ゲイザー +--Ally of Justice Light Gazer local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -15,4 +16,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),0,LOCATION_GRAVE,nil,ATTRIBUTE_LIGHT)*200 -end +end \ No newline at end of file diff --git a/official/c19211362.lua b/official/c19211362.lua index 75a57a4765..cdf947b4e9 100644 --- a/official/c19211362.lua +++ b/official/c19211362.lua @@ -1,5 +1,5 @@ --ネメシス・フラッグ ---Nemesis Flag +--Nemeses Flag --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -26,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x13d} +s.listed_series={SET_NEMESES} function s.tdfilter(c) return c:IsMonster() and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) end @@ -44,11 +44,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.thfilter(c) - return c:IsSetCard(0x13d) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NEMESES) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -61,5 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c19221310.lua b/official/c19221310.lua index 8448d07339..629ac4c2b2 100644 --- a/official/c19221310.lua +++ b/official/c19221310.lua @@ -26,10 +26,10 @@ end s.listed_names={53025096} function s.cfilter(c,tp) return c:IsAttribute(ATTRIBUTE_LIGHT) and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,1,c) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_DECK,0,1,c) end function s.tgfilter(c) - return c:IsCode(53025096) and c:IsAbleToGrave() and (c:IsLocation(LOCATION_HAND+LOCATION_DECK) or c:IsFaceup()) + return c:IsCode(53025096) and c:IsAbleToGrave() and (c:IsLocation(LOCATION_HAND|LOCATION_DECK) or c:IsFaceup()) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,tp) end @@ -40,13 +40,13 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19230407.lua b/official/c19230407.lua index d3eb0704c4..e007421868 100644 --- a/official/c19230407.lua +++ b/official/c19230407.lua @@ -1,4 +1,5 @@ --死者への供物 +--Offerings to the Doomed local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,10 +29,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_DP) e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) then + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c19230408.lua b/official/c19230408.lua deleted file mode 100644 index 40c68cbc40..0000000000 --- a/official/c19230408.lua +++ /dev/null @@ -1,37 +0,0 @@ ---死者への供物(EU) -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.Destroy(tc,REASON_EFFECT) - end - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EFFECT_SKIP_DP) - e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) - else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) - end - Duel.RegisterEffect(e1,tp) -end diff --git a/official/c19252988.lua b/official/c19252988.lua index a337891138..c066f6e453 100644 --- a/official/c19252988.lua +++ b/official/c19252988.lua @@ -1,4 +1,5 @@ --トラップ・ジャマー +--Trap Jammer local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE and tp~=ep and re:IsActiveType(TYPE_TRAP) + return Duel.IsBattlePhase() and rp==1-tp and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19254117.lua b/official/c19254117.lua index 1e1f5bca72..0fe0bdc9b9 100644 --- a/official/c19254117.lua +++ b/official/c19254117.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -23,15 +23,11 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.tgcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_names={19254117} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsDefenseAbove,0),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -46,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(tc:GetDefense()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --def to 0 local e2=Effect.CreateEffect(c) @@ -54,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_TURN_END) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetCountLimit(1) e2:SetOperation(s.ddop) tc:RegisterEffect(e2) @@ -67,12 +63,12 @@ function s.ddop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) e:Reset() end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:GetFlagEffect(id)==0 end @@ -83,18 +79,18 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_ONLY_ATTACK_MONSTER) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.atklimit) e1:SetLabel(tc:GetRealFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,0,1,aux.Stringid(id,2)) end end function s.atklimit(e,c) return c:GetRealFieldID()==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c19261966.lua b/official/c19261966.lua index d7b309b4ae..1dcbd70bff 100644 --- a/official/c19261966.lua +++ b/official/c19261966.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9d),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) --splimit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -32,17 +32,17 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x9d} -s.material_setcode=0x9d +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL function s.matfilter(c,lc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_WATER,lc,sumtype,tp) or c:IsHasEffect(4904633) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return se:IsActiveType(TYPE_SPELL+TYPE_TRAP) and se:IsHasType(EFFECT_TYPE_ACTIONS) - and c:IsLocation(LOCATION_GRAVE+LOCATION_HAND) and c:IsMonster() + return se:IsSpellTrapEffect() and se:IsHasType(EFFECT_TYPE_ACTIONS) + and c:IsLocation(LOCATION_GRAVE|LOCATION_HAND) and c:IsMonster() end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19272658.lua b/official/c19272658.lua index 5290c115be..47644d8c70 100644 --- a/official/c19272658.lua +++ b/official/c19272658.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.postg) e3:SetOperation(s.posop) c:RegisterEffect(e3) @@ -68,4 +68,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c19275188.lua b/official/c19275188.lua index 8f4f662ca5..8229c7decf 100644 --- a/official/c19275188.lua +++ b/official/c19275188.lua @@ -1,5 +1,5 @@ +--ウォークライ・ジェネレート --War Rock Generations ---Scripted by fiftyfour local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsBattlePhase() and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end function s.cfilter(c,e,tp) - return c:IsSetCard(0x161) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WAR_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.atklimit) e1:SetLabel(tc:GetRealFieldID()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -50,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.atklimit(e,c) return c:GetRealFieldID()==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c19280589.lua b/official/c19280589.lua index dd090e0854..ab68ae1dc7 100644 --- a/official/c19280589.lua +++ b/official/c19280589.lua @@ -1,7 +1,6 @@ --小天使テルス --Tellus the Little Angel --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -34,7 +33,7 @@ s.listed_names={19280590} --Stats for "Tellus Wing Token" function s.cansstk(tp) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) + Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end --If sent from monster zone to GY function s.tkcon(e,tp,eg,ep,ev,re,r,rp) @@ -99,10 +98,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end --Restricted to hand function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsLocation(LOCATION_HAND) -end +end \ No newline at end of file diff --git a/official/c19299793.lua b/official/c19299793.lua index 9d3bc8eaaa..49db349fb9 100644 --- a/official/c19299793.lua +++ b/official/c19299793.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(s.spcond) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c19301729.lua b/official/c19301729.lua index fd12154138..1839f1d5a4 100644 --- a/official/c19301729.lua +++ b/official/c19301729.lua @@ -1,6 +1,5 @@ --電子光虫-レジストライダー ---Digital Bug Resistrider - +--Digital Bug Registrider --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -73,7 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e1) end end @@ -114,7 +113,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -124,7 +123,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end -end +end \ No newline at end of file diff --git a/official/c19302550.lua b/official/c19302550.lua index fda865a3aa..b01a38e712 100644 --- a/official/c19302550.lua +++ b/official/c19302550.lua @@ -29,33 +29,29 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfDiscard) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) - aux.DoubleSnareValidity(c,LOCATION_PZONE+LOCATION_MZONE) + aux.DoubleSnareValidity(c,LOCATION_PZONE|LOCATION_MZONE) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} s.listed_names={id} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0xaf) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DD) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_TRAP) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetFlagEffect(id)==0 + return Duel.IsChainDisablable(ev) and re:IsTrapEffect() and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetFlagEffect(id)==0 end function s.disop(e,tp,eg,ep,ev,re,r,rp) if not Duel.SelectEffectYesNo(tp,e:GetHandler()) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) if not Duel.NegateEffect(ev) then return end Duel.BreakEffect() Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.thfilter(c) - return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and not c:IsCode(id) and c:IsAbleToHand() + return (c:IsSetCard(SET_DD) or c:IsSetCard(SET_DARK_CONTRACT)) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -69,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19307353.lua b/official/c19307353.lua index 439319306a..d782b3bd91 100644 --- a/official/c19307353.lua +++ b/official/c19307353.lua @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c19310321.lua b/official/c19310321.lua index 278969b495..d42ca386aa 100644 --- a/official/c19310321.lua +++ b/official/c19310321.lua @@ -1,4 +1,5 @@ --紋章獣ツインヘッド・イーグル +--Heraldic Beast Twin-Headed Eagle local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,17 +9,17 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.filter1(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetOverlayCount()==0 end function s.filter2(c) - return c:IsSetCard(0x76) + return c:IsSetCard(SET_HERALDIC_BEAST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(tc,g) end -end +end \ No newline at end of file diff --git a/official/c19312169.lua b/official/c19312169.lua index 6b4ca72eba..c36369a497 100644 --- a/official/c19312169.lua +++ b/official/c19312169.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_TRIGGER) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0xa,0xa) + e3:SetTargetRange(LOCATION_HAND|LOCATION_SZONE,LOCATION_HAND|LOCATION_SZONE) e3:SetTarget(aux.TargetBoolFunction(Card.IsTrap)) c:RegisterEffect(e3) --Negate traps @@ -59,7 +59,7 @@ function s.descon(e) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then + if tl==LOCATION_SZONE and re:IsTrapEffect() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c19316241.lua b/official/c19316241.lua index 78106ac9c1..f80da6e96b 100644 --- a/official/c19316241.lua +++ b/official/c19316241.lua @@ -97,4 +97,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local e2=e1:Clone() tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c19322865.lua b/official/c19322865.lua index 65152a439e..da907464a2 100644 --- a/official/c19322865.lua +++ b/official/c19322865.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.tdcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.tdtg) e3:SetOperation(s.tdop) c:RegisterEffect(e3) diff --git a/official/c19324993.lua b/official/c19324993.lua index acd8f11b8d..ceb7daa85a 100644 --- a/official/c19324993.lua +++ b/official/c19324993.lua @@ -1,10 +1,10 @@ --X・HERO ヘル・デバイサー ---Xtra HERO Hell Diviser +--Xtra HERO Infernal Devicer --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x8),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO),2) --Search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -32,12 +32,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.counterfilter(c) - return c:IsSetCard(0x8) + return c:IsSetCard(SET_HERO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -46,17 +46,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x8) + return not c:IsSetCard(SET_HERO) end function s.filter(c,tp) - return c:IsFacedown() and c:IsSetCard(0x8) and c.material and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) + return c:IsFacedown() and c:IsSetCard(SET_HERO) and c.material and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) end function s.thfilter(c,fc) if c:IsForbidden() or not c:IsAbleToHand() then return false end @@ -84,5 +84,4 @@ function s.tg(e,c) end function s.val(e,c) return c:GetLevel()*100 -end - +end \ No newline at end of file diff --git a/official/c19327348.lua b/official/c19327348.lua index 77d6370fde..bddc76d3b3 100644 --- a/official/c19327348.lua +++ b/official/c19327348.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.ctcon) tc:RegisterEffect(e1) end diff --git a/official/c19333131.lua b/official/c19333131.lua index d009bd62f3..68ad91e4fc 100644 --- a/official/c19333131.lua +++ b/official/c19333131.lua @@ -1,4 +1,5 @@ --No.12 機甲忍者クリムゾン・シャドー +--Number 12: Crimson Shadow Armor Ninja local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,16 +12,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} s.xyz_number=12 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -29,12 +26,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.etarget) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) Duel.RegisterEffect(e2,tp) end function s.etarget(e,c) - return c:IsFaceup() and c:IsSetCard(0x2b) -end + return c:IsFaceup() and c:IsSetCard(SET_NINJA) +end \ No newline at end of file diff --git a/official/c19337371.lua b/official/c19337371.lua index 01a07fc23c..5fe95c2d5c 100644 --- a/official/c19337371.lua +++ b/official/c19337371.lua @@ -32,32 +32,32 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} s.listed_names={90219263} function s.filter(c) return c:IsCode(90219263) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thfilter(c) - return c:IsSetCard(0x64) and c:IsAbleToHand() + return c:IsSetCard(SET_HARPIE) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c19338434.lua b/official/c19338434.lua index 5cb8ca4209..ee4ac36ef9 100644 --- a/official/c19338434.lua +++ b/official/c19338434.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c19353570.lua b/official/c19353570.lua index 72efe0af98..15bff716d5 100644 --- a/official/c19353570.lua +++ b/official/c19353570.lua @@ -1,4 +1,5 @@ --影無茶ナイト +--Kagemucha Knight local s,id=GetID() function s.initial_effect(c) --spsummon @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c19355597.lua b/official/c19355597.lua index 8d06e80688..f518085a81 100644 --- a/official/c19355597.lua +++ b/official/c19355597.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) c:SetSPSummonOnce(id) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),3) + Fusion.AddProcMixN(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),3) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -23,28 +23,28 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.tgfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1047) + return c:IsFaceup() and c:IsSetCard(SET_GEM_KNIGHT) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,mc) - return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.tgfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1047) + return c:IsFaceup() and c:IsSetCard(SET_GEM_KNIGHT) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.spfilter2(c,e,tp,mc) - return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c19357125.lua b/official/c19357125.lua index b07fe6b5c1..f37f424c24 100644 --- a/official/c19357125.lua +++ b/official/c19357125.lua @@ -1,4 +1,5 @@ --ダーク・アサシン +--Dark Hunter local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -30,10 +31,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsDisabled() and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,5,nil,ATTRIBUTE_DARK) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsFacedown() end @@ -45,4 +42,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19362568.lua b/official/c19362568.lua index d2d329e02c..9b6ac96436 100644 --- a/official/c19362568.lua +++ b/official/c19362568.lua @@ -1,5 +1,5 @@ --氷風のリフレイン ---Ice Wind's Refrain +--Icy Breeze Refrain --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0xf0} +s.listed_series={SET_WINDWITCH} function s.filter(c,e,tp) - return c:IsMonster() and c:IsSetCard(0xf0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsMonster() and c:IsSetCard(SET_WINDWITCH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -51,7 +51,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) local cplayer=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER) local ceff=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_EFFECT) if re:GetHandler():IsDisabled() or not Duel.IsChainDisablable(ev) then return false end - return ep==1-tp and cplayer==tp and ceff:GetHandler():IsSetCard(0xf0) and ceff:GetHandler():IsMonster() + return ep==1-tp and cplayer==tp and ceff:GetHandler():IsSetCard(SET_WINDWITCH) and ceff:GetHandler():IsMonster() end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end diff --git a/official/c19369609.lua b/official/c19369609.lua index c18a18e41e..ed7cb81f53 100644 --- a/official/c19369609.lua +++ b/official/c19369609.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c19384334.lua b/official/c19384334.lua index 9132d0b1fd..0f27418882 100644 --- a/official/c19384334.lua +++ b/official/c19384334.lua @@ -1,4 +1,5 @@ --バーニングブラッド +--Molten Destruction local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c19394153.lua b/official/c19394153.lua index 145aa34ee4..6d764e440c 100644 --- a/official/c19394153.lua +++ b/official/c19394153.lua @@ -1,6 +1,5 @@ --フェザー・ショット --Feather Shot - local s,id=GetID() function s.initial_effect(c) --Make 1 "Elemental HERO Avian" be able to attack multiple times @@ -14,7 +13,6 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={21844576} - function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end @@ -33,7 +31,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -46,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(ct-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot attack directly local e2=Effect.CreateEffect(e:GetHandler()) @@ -54,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c19403423.lua b/official/c19403423.lua index ccc028be83..919b037850 100644 --- a/official/c19403423.lua +++ b/official/c19403423.lua @@ -65,7 +65,7 @@ function s.gycost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Remove(c,POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id+1)==0 end diff --git a/official/c19406822.lua b/official/c19406822.lua index ff0302a7d7..82f96037ca 100644 --- a/official/c19406822.lua +++ b/official/c19406822.lua @@ -1,4 +1,5 @@ --コトダマ +--Kotodama local s,id=GetID() function s.initial_effect(c) --adjust @@ -23,7 +24,7 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local pg=e:GetLabelObject() if c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,1) pg:Clear() end local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -39,4 +40,4 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) pg:Sub(dg) Duel.Readjust() end -end +end \ No newline at end of file diff --git a/official/c19420830.lua b/official/c19420830.lua index 7625db5830..10f2ace1cf 100644 --- a/official/c19420830.lua +++ b/official/c19420830.lua @@ -1,5 +1,5 @@ --満天禍コルドー ---Cataclysmic Bellowing Colder +--Cataclysmic Cryonic Coldo --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,1,1,nil) Duel.BreakEffect() - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) end end end \ No newline at end of file diff --git a/official/c19439119.lua b/official/c19439119.lua index 75d9356419..598016488e 100644 --- a/official/c19439119.lua +++ b/official/c19439119.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0 end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x35) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) and chkc~=e:GetHandler() end @@ -33,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c19441018.lua b/official/c19441018.lua index 31247a42c5..b5ba52f101 100644 --- a/official/c19441018.lua +++ b/official/c19441018.lua @@ -33,18 +33,18 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.spfilter(c) - return c:IsSetCard(0x28) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_BATTERYMAN) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) if #g>0 then g:KeepAlive() @@ -63,16 +63,16 @@ function s.costfilter(c) return c:IsRace(RACE_THUNDER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter1(c) return Duel.IsExistingTarget(s.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -88,4 +88,4 @@ function s.desop(e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local dg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19451302.lua b/official/c19451302.lua index 43d597ecd0..a5145cd1ee 100644 --- a/official/c19451302.lua +++ b/official/c19451302.lua @@ -1,4 +1,5 @@ --スネーク・チョーク +--Serpent Suppression local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTarget(s.indtg) - e2:SetValue(aux.TargetBoolFunction(Card.IsSetCard,0x3c)) + e2:SetValue(aux.TargetBoolFunction(Card.IsSetCard,SET_REPTILIANNE)) c:RegisterEffect(e2) end -s.listed_series={0x3c} +s.listed_series={SET_REPTILIANNE} function s.indtg(e,c) return c:GetAttack()==0 and c:IsAttackPos() -end +end \ No newline at end of file diff --git a/official/c1945387.lua b/official/c1945387.lua index fa19f11e65..af73948bd5 100644 --- a/official/c1945387.lua +++ b/official/c1945387.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3008),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE)) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -24,8 +24,8 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) @@ -35,4 +35,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19462747.lua b/official/c19462747.lua index 264ce69f92..ec29e4507b 100644 --- a/official/c19462747.lua +++ b/official/c19462747.lua @@ -35,9 +35,9 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:HasLevel() and c:IsSetCard(0x33) + return c:IsFaceup() and c:HasLevel() and c:IsSetCard(SET_BLACKWING) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -61,7 +61,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) if e:GetLabel()==0 then e1:SetValue(1) else @@ -72,7 +72,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -86,4 +86,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19474136.lua b/official/c19474136.lua index e418be3cf6..0a3949caea 100644 --- a/official/c19474136.lua +++ b/official/c19474136.lua @@ -1,6 +1,7 @@ --マンドラゴン +--Mandragon local s,id=GetID() function s.initial_effect(c) --pendulum summon Pendulum.AddProcedure(c) -end +end \ No newline at end of file diff --git a/official/c19476824.lua b/official/c19476824.lua index eb762138b0..3131038940 100644 --- a/official/c19476824.lua +++ b/official/c19476824.lua @@ -1,4 +1,5 @@ --メタファイズ・ラグナロク +--Metaphys Ragnarok local s,id=GetID() function s.initial_effect(c) --remove @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.GetDecktopGroup(tp,3) if chk==0 then return rg:FilterCount(Card.IsAbleToRemove,nil)==3 end @@ -39,13 +40,13 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then local og=Duel.GetOperatedGroup() - local oc=og:FilterCount(Card.IsSetCard,nil,0x105) + local oc=og:FilterCount(Card.IsSetCard,nil,SET_METAPHYS) if oc==0 then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(oc*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -53,7 +54,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.spfilter(c,e,tp) - return c:IsSetCard(0x105) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_METAPHYS) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) @@ -90,4 +91,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1948619.lua b/official/c1948619.lua index ffa36ea217..5443f25960 100644 --- a/official/c1948619.lua +++ b/official/c1948619.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x8),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO),2,2) --set local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -31,16 +31,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x8,0x46,0xa5} +s.listed_series={SET_HERO,SET_FUSION,SET_CHANGE} function s.setcfilter(c,tp,lg) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x8) and lg:IsContains(c) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_HERO) and lg:IsContains(c) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) local lg=e:GetHandler():GetLinkedGroup() return eg:IsExists(s.setcfilter,1,nil,tp,lg) end function s.setfilter(c) - return ((c:IsSpell() and c:IsSetCard(0x46)) or (c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0xa5))) and c:IsSSetable() + return ((c:IsSpell() and c:IsSetCard(SET_FUSION)) or (c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(SET_CHANGE))) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end @@ -61,7 +61,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) or (rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -75,5 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c19502505.lua b/official/c19502505.lua index 73003dbca1..23dc3536d5 100644 --- a/official/c19502505.lua +++ b/official/c19502505.lua @@ -1,4 +1,5 @@ --沈黙の魔導剣士-サイレント・パラディン +--Silent Paladin local s,id=GetID() function s.initial_effect(c) --search @@ -35,7 +36,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x41} +s.listed_series={SET_LV} function s.cfilter(c) return c:IsCode(1995985,73665146) and c:IsAbleToHand() end @@ -55,7 +56,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and #g==1 and g:GetFirst():IsControler(tp) and g:GetFirst():IsLocation(LOCATION_MZONE) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -73,7 +74,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x41) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() + return c:IsSetCard(SET_LV) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -87,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19505896.lua b/official/c19505896.lua index ed42ed6f0d..d45b816790 100644 --- a/official/c19505896.lua +++ b/official/c19505896.lua @@ -1,4 +1,5 @@ --ウィード +--Nettles local s,id=GetID() function s.initial_effect(c) --Destroy replace @@ -30,5 +31,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c19508728.lua b/official/c19508728.lua index 5ea3362208..6bda7079b2 100644 --- a/official/c19508728.lua +++ b/official/c19508728.lua @@ -1,4 +1,5 @@ --月鏡の盾 +--Moon Mirror Shield local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -17,7 +18,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetCode(EVENT_TO_GRAVE) e4:SetCondition(s.tdcon) - e4:SetCost(s.tdcost) + e4:SetCost(Cost.PayLP(500)) e4:SetTarget(s.tdtg) e4:SetOperation(s.tdop) c:RegisterEffect(e4) @@ -37,7 +38,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(val+100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) ec:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -48,10 +49,6 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local opt=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) @@ -62,4 +59,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoDeck(e:GetHandler(),nil,e:GetLabel(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19516687.lua b/official/c19516687.lua index e612d7bf8c..61126133d5 100644 --- a/official/c19516687.lua +++ b/official/c19516687.lua @@ -1,9 +1,9 @@ --- --- Libromancer Agent --- Scripted by Hatter +--リブロマンサー・エージェント +--Libromancer Agent +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add 1 "Libromancer" card from the GY to the hand + --Add 1 "Libromancer" card from the GY to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.spcostfilter(c) return c:IsRitualMonster() and not c:IsPublic() end @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x17d) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_LIBROMANCER) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -67,7 +67,7 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 - and tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_SPELL+TYPE_TRAP) then + and tc:IsLocation(LOCATION_HAND) and tc:IsSpellTrap() then Duel.ShuffleHand(tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) diff --git a/official/c19523799.lua b/official/c19523799.lua index f0ba77aeed..73c8fcc21c 100644 --- a/official/c19523799.lua +++ b/official/c19523799.lua @@ -1,4 +1,5 @@ --昼夜の大火事 +--Ookazi local s,id=GetID() function s.initial_effect(c) --damage @@ -20,4 +21,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19535693.lua b/official/c19535693.lua index 2e0baf0147..5423ccf3c7 100644 --- a/official/c19535693.lua +++ b/official/c19535693.lua @@ -1,20 +1,20 @@ --- No-P.U.N.K.セアミン --- Noh P.U.N.K. Seamin --- Scripted by Hatter +--No-P.U.N.K.セアミン +--Noh-P.U.N.K. Ze Amin +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search "P.U.N.K." Monster + --Search "P.U.N.K." Monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- ATK up + --ATK up local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) @@ -26,13 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x173} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end +s.listed_series={SET_PUNK} function s.thfilter(c) - return c:IsSetCard(0x173) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PUNK) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,20 +43,20 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x173) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x173),tp,LOCATION_MZONE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_PUNK) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_PUNK),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x173),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_PUNK),tp,LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then - -- Gain ATK + --Gain ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c19578592.lua b/official/c19578592.lua index b74663ecf8..c1351ab9e8 100644 --- a/official/c19578592.lua +++ b/official/c19578592.lua @@ -1,4 +1,5 @@ --愚鈍の斧 +--Axe of Fools local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -18,7 +19,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,0)) e5:SetCategory(CATEGORY_DAMAGE) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetRange(LOCATION_SZONE) e5:SetCountLimit(1) e5:SetCondition(s.damcon) @@ -41,4 +42,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=e:GetHandler():GetEquipTarget():GetControler() local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19580308.lua b/official/c19580308.lua index b31f202101..23d0d3eb7a 100644 --- a/official/c19580308.lua +++ b/official/c19580308.lua @@ -1,52 +1,47 @@ --DDラミア --D/D Lamia - local s,id=GetID() function s.initial_effect(c) - --Special summon itself from hand or GY + --Special Summon this card, but banish it when it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} s.listed_names={id} - -function s.cfilter(c,ft) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) - and not c:IsCode(id) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) +function s.spcostfilter(c,tp) + return c:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsCode(id) and c:IsAbleToGraveAsCost() + and Duel.GetMZoneCount(tp,c)>0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local loc=LOCATION_HAND+LOCATION_ONFIELD - if ft==0 then loc=LOCATION_MZONE end - if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.cfilter,tp,loc,0,1,nil,ft) end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,loc,0,1,1,nil,ft) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - --Banish it if it leaves the field + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + --Banish it when it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end \ No newline at end of file +end diff --git a/official/c19590644.lua b/official/c19590644.lua index 84f732516d..4c1fb16f27 100644 --- a/official/c19590644.lua +++ b/official/c19590644.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.cfilter(c,e,tp) return c:IsAttackAbove(0) and c:IsReason(REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c:GetAttack()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,c:GetAttack()) end function s.spfilter(c,e,tp,atk) return c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) @@ -23,15 +23,15 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg and eg:IsExists(s.cfilter,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end local ec=eg:Filter(s.cfilter,nil,e,tp):GetFirst() if not ec then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,ec:GetAttack()) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,ec:GetAttack()) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c19594506.lua b/official/c19594506.lua index a29cb4b3e8..62230981b5 100644 --- a/official/c19594506.lua +++ b/official/c19594506.lua @@ -1,4 +1,5 @@ --ネオスペース・コンダクター +--Neo Space Pathfinder local s,id=GetID() function s.initial_effect(c) --search @@ -7,29 +8,24 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={42015635} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(42015635) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c19596712.lua b/official/c19596712.lua index 73976b2f8c..1827c747e7 100644 --- a/official/c19596712.lua +++ b/official/c19596712.lua @@ -2,7 +2,7 @@ --Abyss-scale of Cetus local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x74)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_MERMAIL)) --ATK increase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -19,13 +19,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_SZONE) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.negcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE - and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev) + and re:IsTrapEffect() and Duel.IsChainDisablable(ev) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19605133.lua b/official/c19605133.lua index fafdae1158..81680d240e 100644 --- a/official/c19605133.lua +++ b/official/c19605133.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.atop) c:RegisterEffect(e2) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() - return ec:IsSetCard(0x2a) and ec:IsSummonType(SUMMON_TYPE_SYNCHRO) and ec:IsSummonPlayer(tp) + return ec:IsSetCard(SET_NATURIA) and ec:IsSynchroSummoned() and ec:IsSummonPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -45,14 +45,14 @@ end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsReleasable() - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x2a),tp,LOCATION_MZONE,0,1,c) end + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),tp,LOCATION_MZONE,0,1,c) end Duel.Release(c,REASON_COST) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(0x2a) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x2a),tp,LOCATION_MZONE,0,1,nil) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(SET_NATURIA) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x2a),tp,LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),tp,LOCATION_MZONE,0,1,1,nil) end function s.atop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -62,7 +62,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c19612721.lua b/official/c19612721.lua index 1ba7de0169..c4e30c9ee0 100644 --- a/official/c19612721.lua +++ b/official/c19612721.lua @@ -1,4 +1,5 @@ --円盤闘士 +--Disc Fighter local s,id=GetID() function s.initial_effect(c) --destroy @@ -21,4 +22,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then Duel.Destroy(t,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19613556.lua b/official/c19613556.lua index 658ed4d028..bf04d63aaa 100644 --- a/official/c19613556.lua +++ b/official/c19613556.lua @@ -1,4 +1,5 @@ --大嵐 +--Heavy Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19636995.lua b/official/c19636995.lua index a983cbdfed..991dfe88e5 100644 --- a/official/c19636995.lua +++ b/official/c19636995.lua @@ -1,7 +1,6 @@ --急き兎馬 --Red Hared Hasty Horse --Scripted by edo9300 - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -37,7 +36,7 @@ function s.initial_effect(c) end function s.hspval(e,c) local tp=c:GetControler() - local zone=0x1f + local zone=ZONES_MMZ local lg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) for tc in aux.Next(lg) do zone=zone&(~tc:GetColumnZone(LOCATION_MZONE,0,0,tp)) @@ -49,7 +48,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -69,7 +68,7 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(c:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Can attack directly local e2=Effect.CreateEffect(c) @@ -77,7 +76,7 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c19642774.lua b/official/c19642774.lua index 14c65b8baf..86fd31cef4 100644 --- a/official/c19642774.lua +++ b/official/c19642774.lua @@ -32,4 +32,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c19642889.lua b/official/c19642889.lua index 2ec05f57c8..590344c260 100644 --- a/official/c19642889.lua +++ b/official/c19642889.lua @@ -1,4 +1,5 @@ --コアキメイル・パワーハンド +--Koa'ki Meiru Powerhand local s,id=GetID() function s.initial_effect(c) --cost @@ -23,13 +24,13 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() end function s.cfilter2(c) - return c:GetType()==TYPE_TRAP and not c:IsPublic() + return c:IsNormalTrap() and not c:IsPublic() end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -65,21 +66,21 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() if bc and bc:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsFaceup() then - c:CreateRelation(bc,RESET_EVENT+RESETS_STANDARD) + c:CreateRelation(bc,RESET_EVENT|RESETS_STANDARD) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetCondition(s.discon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCondition(s.discon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e2) end end function s.discon(e) return e:GetOwner():IsRelateToCard(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c1965724.lua b/official/c1965724.lua index 2869f5eb9a..9091345298 100644 --- a/official/c1965724.lua +++ b/official/c1965724.lua @@ -36,11 +36,11 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,27288416),tp,LOCATION_MZONE,0,1,nil) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + return e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.atkcon(e) return e:GetHandler():GetFlagEffect(id)~=0 end function s.atktg(e,c) return c:IsFaceup() and c:IsCode(27288416) -end +end \ No newline at end of file diff --git a/official/c1966438.lua b/official/c1966438.lua index 88b07b3b3b..7dc622a91b 100644 --- a/official/c1966438.lua +++ b/official/c1966438.lua @@ -1,6 +1,5 @@ --雙極の破械神 --Abominable Unchained Soul - local s,id=GetID() function s.initial_effect(c) --Can only be special summoned once per turn @@ -50,7 +49,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.spcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -69,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) @@ -88,7 +87,7 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -107,7 +106,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) c:RegisterEffect(e1,true) end diff --git a/official/c19665973.lua b/official/c19665973.lua index c44c946b3a..e2a96eec96 100644 --- a/official/c19665973.lua +++ b/official/c19665973.lua @@ -29,14 +29,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c19667590.lua b/official/c19667590.lua index 4293fceaf9..7b6d346357 100644 --- a/official/c19667590.lua +++ b/official/c19667590.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x59} +s.listed_series={SET_GOGOGO} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x59) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(SET_GOGOGO) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -31,7 +31,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c19671102.lua b/official/c19671102.lua index 35822ec1ef..4cb63fa732 100644 --- a/official/c19671102.lua +++ b/official/c19671102.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.cfilter(c,tp) - return c:IsSetCard(0x10b) and c:IsDiscardable(REASON_EFFECT) and not s.name_list[tp][c:GetCode()] + return c:IsSetCard(SET_TINDANGLE) and c:IsDiscardable(REASON_EFFECT) and not s.name_list[tp][c:GetCode()] end function s.posfilter(c) return c:IsCanChangePosition() and (c:IsPosition(POS_FACEUP_ATTACK) or c:IsPosition(POS_FACEDOWN_DEFENSE)) @@ -45,11 +45,11 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local dc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() - if not dc or Duel.SendtoGrave(dc,REASON_DISCARD+REASON_EFFECT)==0 then return end + if not dc or Duel.SendtoGrave(dc,REASON_DISCARD|REASON_EFFECT)==0 then return end s.name_list[tp][dc:GetCode()]=true Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE,0,0,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c19671433.lua b/official/c19671433.lua index 88e92327c6..6dffbfb79f 100644 --- a/official/c19671433.lua +++ b/official/c19671433.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tunertg) e2:SetOperation(s.tunerop) c:RegisterEffect(e2) diff --git a/official/c19673561.lua b/official/c19673561.lua index 667a4b0ab8..1b48ed9133 100644 --- a/official/c19673561.lua +++ b/official/c19673561.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetOperation(s.tfop) c:RegisterEffect(e4) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=eg:GetFirst() @@ -64,7 +64,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.tfcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()==tp + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end @@ -77,4 +77,4 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c19680539.lua b/official/c19680539.lua index aac378f591..6be106a168 100644 --- a/official/c19680539.lua +++ b/official/c19680539.lua @@ -1,4 +1,5 @@ --聖騎士ガウェイン +--Noble Knight Gawayn local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c19684740.lua b/official/c19684740.lua index 46c9e64926..fded0a04d8 100644 --- a/official/c19684740.lua +++ b/official/c19684740.lua @@ -1,4 +1,5 @@ --妖精騎士イングナル +--Fairy Knight Ingunar local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) @@ -32,4 +29,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c1969506.lua b/official/c1969506.lua index 2cf5d1ed25..17a237ac0d 100644 --- a/official/c1969506.lua +++ b/official/c1969506.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-2000 end @@ -27,11 +27,11 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x1083) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -51,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if ft>=#sg then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c19700943.lua b/official/c19700943.lua index a7ce7a569f..0e21406af0 100644 --- a/official/c19700943.lua +++ b/official/c19700943.lua @@ -1,4 +1,5 @@ --ドドドボット +--Dododo Bot local s,id=GetID() function s.initial_effect(c) --summon limit @@ -26,9 +27,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() -end +end \ No newline at end of file diff --git a/official/c197042.lua b/official/c197042.lua index c4f41b9f73..c9d8aae91f 100644 --- a/official/c197042.lua +++ b/official/c197042.lua @@ -1,42 +1,38 @@ --- エクソシスター・リタニア --- Exosister Litania --- Scripted by Hatter +--エクソシスター・リタニア +--Exosister Returnia +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Banish + --Banish local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.rmcon) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsSummonType(SUMMON_TYPE_XYZ) end) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return not c:IsXyzSummoned() end) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,0x174),nil)==#g -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) + return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,SET_EXOSISTER),nil)==#g end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.spfilter(c) - return c:IsSetCard(0x174) and c:IsXyzSummonable() + return c:IsSetCard(SET_EXOSISTER) and c:IsXyzSummonable() end function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) local tc=Duel.GetFirstTarget() diff --git a/official/c19712214.lua b/official/c19712214.lua index ed3a63dbd8..381f39ed33 100644 --- a/official/c19712214.lua +++ b/official/c19712214.lua @@ -21,13 +21,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.atcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.attg) e2:SetOperation(s.atop) c:RegisterEffect(e2) end s.listed_names={67712104} -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} --Negate attack and Special Summon function s.spfilter(c,e,tp) return c:IsCode(67712104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -35,13 +35,13 @@ function s.spfilter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if Duel.NegateAttack() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,loc,0,1,1,nil,e,tp) @@ -55,7 +55,7 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.atfilter(c) - return c:IsSetCard(0x12b) and c:IsType(TYPE_LINK) and c:IsLinkAbove(2) + return c:IsSetCard(SET_MARINCESS) and c:IsType(TYPE_LINK) and c:IsLinkAbove(2) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atfilter(chkc) end @@ -74,14 +74,14 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(ct-1) tc:RegisterEffect(e1) --No battle damage local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c19733961.lua b/official/c19733961.lua index 5799ba8c3c..8dca2d6a28 100644 --- a/official/c19733961.lua +++ b/official/c19733961.lua @@ -1,4 +1,5 @@ --電池メン-単二型 +--Batteryman C local s,id=GetID() function s.initial_effect(c) --atk,def @@ -24,4 +25,4 @@ function s.defval(e,c) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCode,id),c:GetControler(),LOCATION_MZONE,0,nil) if g:IsExists(Card.IsAttackPos,1,nil) then return 0 end return 500 -end +end \ No newline at end of file diff --git a/official/c19739265.lua b/official/c19739265.lua index 88abcc2408..dd8dcea011 100644 --- a/official/c19739265.lua +++ b/official/c19739265.lua @@ -1,17 +1,17 @@ --- +--サン・アンド・ムーン --Sol and Luna --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_POSITION) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -20,7 +20,7 @@ function s.filter(c,e) return c:IsFacedown() or (c:IsFaceup() and c:IsCanTurnSet()) and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c19740112.lua b/official/c19740112.lua index f154e2faf9..c7cb58a406 100644 --- a/official/c19740112.lua +++ b/official/c19740112.lua @@ -1,4 +1,5 @@ --干ばつの結界像 +--Barrier Statue of the Drought local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:GetAttribute()~=ATTRIBUTE_EARTH -end +end \ No newline at end of file diff --git a/official/c19747827.lua b/official/c19747827.lua index 9e6cb85f3b..bcf4ae4e4e 100644 --- a/official/c19747827.lua +++ b/official/c19747827.lua @@ -1,4 +1,5 @@ --真紅眼の黒竜剣 +--Red-Eyes Black Dragon Sword local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -41,19 +42,19 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(s.atkval) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EFFECT_UPDATE_DEFENSE) @@ -63,5 +64,5 @@ function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),0,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)*500 -end + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),0,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil)*500 +end \ No newline at end of file diff --git a/official/c19748583.lua b/official/c19748583.lua index a9a9b2890d..ed8a78f931 100644 --- a/official/c19748583.lua +++ b/official/c19748583.lua @@ -1,4 +1,5 @@ --聖剣を抱く王妃ギネヴィア +--Gwenhwyfar, Queen of Noble Arms local s,id=GetID() function s.initial_effect(c) --equip @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) @@ -37,9 +38,9 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -64,12 +65,12 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end function s.eqlimit(e,c) - return c:IsSetCard(0x107a) + return c:IsSetCard(SET_NOBLE_KNIGHT) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -78,7 +79,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(e:GetOwnerPlayer(),c,96) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tg=e:GetHandler():GetEquipTarget() @@ -99,4 +100,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c19763315.lua b/official/c19763315.lua index df216a4d1f..c47b1113b5 100644 --- a/official/c19763315.lua +++ b/official/c19763315.lua @@ -1,8 +1,10 @@ --不運なリポート +--An Unfortunate Report local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetOperation(s.activate) @@ -14,15 +16,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_BP_TWICE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then + if Duel.IsTurnPlayer() and Duel.IsBattlePhase() then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.bpcon) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|RESET_OPPO_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|RESET_OPPO_TURN,1) end Duel.RegisterEffect(e1,tp) end function s.bpcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c19771459.lua b/official/c19771459.lua index b12a0a0a6a..95838d7785 100644 --- a/official/c19771459.lua +++ b/official/c19771459.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_names={0x161} +s.listed_series={SET_WAR_ROCK} function s.spcfilter(c,tp) return c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) end @@ -51,17 +51,17 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x161) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WAR_ROCK) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #sg==0 then return end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end \ No newline at end of file diff --git a/official/c19801646.lua b/official/c19801646.lua index e368d4f977..8d4bb23cf0 100644 --- a/official/c19801646.lua +++ b/official/c19801646.lua @@ -1,4 +1,5 @@ --伝説のフィッシャーマン二世 +--The Legendary Fisherman II local s,id=GetID() function s.initial_effect(c) --code @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(3643300) c:RegisterEffect(e1) --immune @@ -32,7 +33,7 @@ function s.initial_effect(c) end s.listed_names={CARD_UMI} function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end function s.econ(e) return Duel.IsEnvironment(CARD_UMI) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -56,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c1980574.lua b/official/c1980574.lua index 7748404c9d..3dbec2e1a8 100644 --- a/official/c1980574.lua +++ b/official/c1980574.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.sccon) @@ -19,9 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) + return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.scfilter1(c,tp,mc) return c:IsFaceup() diff --git a/official/c19808608.lua b/official/c19808608.lua index d3f3bae6c4..196b95fc47 100644 --- a/official/c19808608.lua +++ b/official/c19808608.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and not c:IsCode(id) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_DD) and not c:IsCode(id) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,7 +34,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(e:GetHandler()) @@ -44,9 +44,9 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xaf) -end + return not c:IsSetCard(SET_DD) +end \ No newline at end of file diff --git a/official/c19814508.lua b/official/c19814508.lua index 45e24dcb72..6749bab511 100644 --- a/official/c19814508.lua +++ b/official/c19814508.lua @@ -1,4 +1,5 @@ --U.A.スタジアム +--U.A. Stadium local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,13 +31,13 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xb2} +s.listed_series={SET_UA} function s.filter(c) - return c:IsSetCard(0xb2) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_UA) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() - if chk==0 then return tc:IsSetCard(0xb2) and tc:IsControler(tp) + if chk==0 then return tc:IsSetCard(SET_UA) and tc:IsControler(tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -50,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_UA) and c:IsControler(tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -64,8 +65,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(500) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c19827717.lua b/official/c19827717.lua index 1e8e73dcd3..394383178c 100644 --- a/official/c19827717.lua +++ b/official/c19827717.lua @@ -1,4 +1,5 @@ --死者の生還 +--Return of the Doomed local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.costfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -24,7 +25,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c) diff --git a/official/c19828680.lua b/official/c19828680.lua index 445ad93d3f..1544386dc6 100644 --- a/official/c19828680.lua +++ b/official/c19828680.lua @@ -1,41 +1,40 @@ --煉獄の契約 --Contract with the Void --Scripted by Rundas - local s,id=GetID() function s.initial_effect(c) - --Discard + Special Summon + --Discard your entire hand, then you can Special Summon 1 "Infernity" monster or 1 Level 8 DARK Dragon Synchro Monster from your GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES) + e1:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) + e1:SetCondition(function(e,tp) return Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,e:GetHandler())>=3 end) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb} -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,0,e:GetHandler())>=3 -end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_HANDES,Duel.GetFieldGroup(tp,LOCATION_HAND,0),1,0,0) +s.listed_series={SET_INFERNITY} +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + if chk==0 then return #g==g:FilterCount(Card.IsDiscardable,nil,REASON_EFFECT) end + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,#g) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsMonster() and - (c:IsSetCard(0xb) or (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(8) and c:IsRace(RACE_DRAGON))) and - c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_INFERNITY) or (c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO))) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.SendtoGrave(Duel.GetFieldGroup(tp,LOCATION_HAND,0),REASON_EFFECT+REASON_DISCARD)==0 or - (not Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)) then return end - if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() +function s.activate(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end end end diff --git a/official/c19844995.lua b/official/c19844995.lua index e3f9a638bc..6a3d828bb4 100644 --- a/official/c19844995.lua +++ b/official/c19844995.lua @@ -1,4 +1,5 @@ --召喚制限-パワーフィルター +--Power Filter local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsAttackBelow(1000) -end +end \ No newline at end of file diff --git a/official/c1984618.lua b/official/c1984618.lua index b401f9c146..3631d61f7b 100644 --- a/official/c1984618.lua +++ b/official/c1984618.lua @@ -14,18 +14,18 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} s.listed_names={CARD_ALBAZ} function s.tgfilter(c,tp,necro) - return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(necro and aux.NecroValleyFilter(s.thfilter) or s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetAttack()) + return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(necro and aux.NecroValleyFilter(s.thfilter) or s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetAttack()) end function s.thfilter(c,atk) - return (c:IsCode(CARD_ALBAZ) or (c:IsMonster() and c:IsSetCard(0x146))) and c:GetAttack()<=atk and c:IsAbleToHand() + return (c:IsCode(CARD_ALBAZ) or (c:IsMonster() and c:IsSetCard(SET_DOGMATIKA))) and c:GetAttack()<=atk and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil,tp,false) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local og=Duel.GetOperatedGroup() if og:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,g1:GetFirst():GetAttack()) + local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,g1:GetFirst():GetAttack()) if #g2>0 then Duel.BreakEffect() Duel.SendtoHand(g2,nil,REASON_EFFECT) @@ -49,10 +49,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c19847532.lua b/official/c19847532.lua index 83c6c38842..e187a97cfa 100644 --- a/official/c19847532.lua +++ b/official/c19847532.lua @@ -1,4 +1,5 @@ --ヘルフレイムエンペラー +--Infernal Flame Emperor local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -19,19 +20,19 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local ct=#dg if ct>5 then ct=5 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,ct,nil) + local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,ct,nil) Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.SetTargetParam(#rg) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#rg,0,0) @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19870120.lua b/official/c19870120.lua index 02dbe75331..24ca044f7e 100644 --- a/official/c19870120.lua +++ b/official/c19870120.lua @@ -42,5 +42,5 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) end function s.target(e,c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) -end + return c:IsTributeSummoned() +end \ No newline at end of file diff --git a/official/c19877898.lua b/official/c19877898.lua index a1b41999d7..c612eb6265 100644 --- a/official/c19877898.lua +++ b/official/c19877898.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) end s.listed_names={34830502} s.LVnum=7 -s.LVset=0x5d +s.LVset=SET_ULTIMATE_INSECT function s.con(e) return e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c19882096.lua b/official/c19882096.lua index fc66de5445..4b90dafcdc 100644 --- a/official/c19882096.lua +++ b/official/c19882096.lua @@ -1,9 +1,9 @@ --- スケアクロー・ベロネア --- Scareclaw Belone --- Scripted by Hatter +--スケアクロー・ベロネア +--Scareclaw Belone +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon procedure + --Special Summon procedure local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetValue(s.hspval) c:RegisterEffect(e1) - -- Piercing damage + --Piercing damage local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_PIERCE) diff --git a/official/c19891131.lua b/official/c19891131.lua index e18d52b60a..78d13515ff 100644 --- a/official/c19891131.lua +++ b/official/c19891131.lua @@ -1,7 +1,6 @@ --クロノダイバー・レギュレーター --Time Thief Regulator --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon 2 "Time Thief" monsters from deck @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcond) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -29,18 +28,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x126} +s.listed_series={SET_TIME_THIEF} s.listed_names={id} - function s.spcond(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x126) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_TIME_THIEF) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -85,7 +79,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c19891310.lua b/official/c19891310.lua index c56a689808..7d6e147b27 100644 --- a/official/c19891310.lua +++ b/official/c19891310.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} function s.condition(e,tp,eg,ep,ev,re,r,rp) local bt=Duel.GetAttacker() if bt and bt:IsControler(tp) then return bt:IsRace(RACE_MACHINE) end @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(0,LOCATION_ONFIELD) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) @@ -52,17 +52,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetTargetRange(0,1) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x72) and c:IsAbleToHand() + return c:IsSetCard(SET_GEARGIA) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) and chkc~=e:GetHandler() end @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c19899073.lua b/official/c19899073.lua index 26a83d1af1..a1f9cc1f71 100644 --- a/official/c19899073.lua +++ b/official/c19899073.lua @@ -1,4 +1,4 @@ ---Japanese name +--天叢雲之巳剣 --Ame no Murakumo no Mitsurugi --scripted by Naim local s,id=GetID() diff --git a/official/c1992816.lua b/official/c1992816.lua index 44a5799d25..e7ce51ef2b 100644 --- a/official/c1992816.lua +++ b/official/c1992816.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.dacon) - e3:SetCost(s.dacost) + e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.daop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end @@ -46,7 +46,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() @@ -75,13 +75,9 @@ function s.dafilter(c,atk) return c:IsFaceup() and c:GetAttack()>atk end function s.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) and Duel.IsExistingMatchingCard(s.dafilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end -function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.daop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -91,7 +87,7 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c19932396.lua b/official/c19932396.lua index ea953a7041..5b02394492 100644 --- a/official/c19932396.lua +++ b/official/c19932396.lua @@ -1,4 +1,5 @@ --侵略の一手 +--First Step Towards Infestation local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100a) - and c:IsSummonType(SUMMON_TYPE_TRIBUTE) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_STEELSWARM) + and c:IsTributeSummoned() and c:IsAbleToHandAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -31,4 +32,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19942835.lua b/official/c19942835.lua index c4ec018b3a..36f15d2245 100644 --- a/official/c19942835.lua +++ b/official/c19942835.lua @@ -1,9 +1,9 @@ --- アンデット・リボーン --- Zombie Reborn --- Scripted by Hatter +--アンデット・リボーン +--Zombie Reborn +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Set self from GY + --Set self from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_LEAVE_GRAVE) @@ -30,7 +30,7 @@ function s.rmfilter(c,code) end function s.spfilter(c,e,tp) return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c:GetCode()) + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c:GetCode()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -38,14 +38,14 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not (tc and tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE)) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,tc:GetCode()) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetCode()) if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end @@ -65,16 +65,16 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_REMOVED,0,1,1,nil) if #g==0 then return end Duel.HintSelection(g,true) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c19943114.lua b/official/c19943114.lua index e93783dabd..945b3ce066 100644 --- a/official/c19943114.lua +++ b/official/c19943114.lua @@ -36,5 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c19959563.lua b/official/c19959563.lua index 0320487d3d..9062f754dd 100644 --- a/official/c19959563.lua +++ b/official/c19959563.lua @@ -1,5 +1,5 @@ --戒めの龍 ---unishment Dragon +--Punishment Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -43,9 +43,9 @@ function s.initial_effect(c) e5:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e5) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x38) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.spcon(e,c) if c==nil then return true end @@ -54,27 +54,23 @@ function s.spcon(e,c) local ct=g:GetClassCount(Card.GetCode) return ct>3 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) - return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and not (c:IsSetCard(0x38) and c:IsMonster()) and c:IsAbleToDeck() + return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and not (c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster()) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,1,e:GetHandler()) end + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c - and rc:IsSetCard(0x38) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c + and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsControler(tp) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -82,4 +78,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,4,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c19959742.lua b/official/c19959742.lua index 88cc592b4f..9d56d9705d 100644 --- a/official/c19959742.lua +++ b/official/c19959742.lua @@ -20,4 +20,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==1 then Duel.MoveToDeckBottom(3,tp) end -end +end \ No newline at end of file diff --git a/official/c1995985.lua b/official/c1995985.lua index e71f48516d..a84b61a8fb 100644 --- a/official/c1995985.lua +++ b/official/c1995985.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -36,7 +36,7 @@ function s.initial_effect(c) end s.listed_names={74388798} s.LVnum=3 -s.LVset=0xe7 +s.LVset=SET_SILENT_SWORDSMAN function s.disop(e,tp,eg,ep,ev,re,r,rp) if not re:GetHandler():IsSpell() or rp==tp then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end @@ -51,25 +51,21 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id)==0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(74388798) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c19963185.lua b/official/c19963185.lua index 5353ebf6c9..a3e7c2fbcf 100644 --- a/official/c19963185.lua +++ b/official/c19963185.lua @@ -57,7 +57,7 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.rdmgcond(e) local tp=e:GetHandlerPlayer() diff --git a/official/c19974580.lua b/official/c19974580.lua index 2a5cb415d1..23c833f7a5 100644 --- a/official/c19974580.lua +++ b/official/c19974580.lua @@ -31,7 +31,7 @@ function s.rfilter(c) return c:IsSetCard(SET_IRON_CHAIN) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) else @@ -41,7 +41,7 @@ end function s.atop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) if ct>0 then local e1=Effect.CreateEffect(c) diff --git a/official/c19980975.lua b/official/c19980975.lua index f2bebff90e..cddfe534e6 100644 --- a/official/c19980975.lua +++ b/official/c19980975.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.counter_list={0x1019} +s.counter_list={COUNTER_FOG} function s.filter(c) - return c:GetCounter(0x1019)>=4 + return c:GetCounter(COUNTER_FOG)>=4 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -27,9 +27,9 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - local ct=math.floor(tc:GetCounter(0x1019)/4) + local ct=math.floor(tc:GetCounter(COUNTER_FOG)/4) if Duel.Destroy(tc,REASON_EFFECT)~=0 and ct~=0 then Duel.Draw(tp,ct,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c20001443.lua b/official/c20001443.lua index 935d2f8cfd..0d4b5bc7ac 100644 --- a/official/c20001443.lua +++ b/official/c20001443.lua @@ -1,9 +1,9 @@ --- 相剣師-莫邪 --- Swordsoul of Mo Ye --- Scripted by Hatter +--相剣師-莫邪 +--Swordsoul of Mo Ye +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon token + --Special Summon token local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -18,7 +18,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Draw + --Draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DRAW) @@ -32,9 +32,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={TOKEN_SWORDSOUL} -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.tkcostfilter(c) - return (c:IsSetCard(0x16d) or (c:IsMonster() and c:IsRace(RACE_WYRM))) and not c:IsPublic() + return (c:IsSetCard(SET_SWORDSOUL) or (c:IsMonster() and c:IsRace(RACE_WYRM))) and not c:IsPublic() end function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tkcostfilter,tp,LOCATION_HAND,0,1,nil) end @@ -46,7 +46,7 @@ end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,0x16d,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,SET_SWORDSOUL,TYPES_TOKEN|TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) @@ -56,7 +56,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local token=Duel.CreateToken(tp,TOKEN_SWORDSOUL) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Cannot Special Summon non-Synchro monsters from Extra Deck + --Cannot Special Summon non-Synchro monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -64,11 +64,11 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) - -- Lizard check + --Lizard check local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -85,4 +85,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20003527.lua b/official/c20003527.lua index c60df4df9a..08d7cd642b 100644 --- a/official/c20003527.lua +++ b/official/c20003527.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e6:SetValue(s.atkval) c:RegisterEffect(e6) end -s.counter_place_list={0x1019} +s.counter_place_list={COUNTER_FOG} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end @@ -52,13 +52,13 @@ function s.valcheck(e,c) e:SetLabel(g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)) end function s.addcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x1019,e:GetLabelObject():GetLabel()) + e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+COUNTER_FOG,e:GetLabelObject():GetLabel()) end end function s.atkval(e,c) - return Duel.GetCounter(0,1,1,0x1019)*500 -end + return Duel.GetCounter(0,1,1,COUNTER_FOG)*500 +end \ No newline at end of file diff --git a/official/c20007374.lua b/official/c20007374.lua index c9ea2a0f75..bbc7852b46 100644 --- a/official/c20007374.lua +++ b/official/c20007374.lua @@ -1,4 +1,5 @@ --集いし願い +--Converging Wishes local s,id=GetID() function s.initial_effect(c) --Activate @@ -57,12 +58,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) @@ -108,9 +109,9 @@ function s.cafilter(c) return s.cfilter(c) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cafilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler():GetEquipTarget()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cafilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler():GetEquipTarget()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cafilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler():GetEquipTarget()) + local g=Duel.SelectMatchingCard(tp,s.cafilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler():GetEquipTarget()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.catg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -127,6 +128,6 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ec:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c20011655.lua b/official/c20011655.lua index 6c3fa018b5..95d8afd8df 100644 --- a/official/c20011655.lua +++ b/official/c20011655.lua @@ -1,4 +1,4 @@ ---Japanese name +--魔剣達士-タルワール・デーモン --Beast of Talwar - The Sword Summit --scripted by Naim local s,id=GetID() diff --git a/official/c20032555.lua b/official/c20032555.lua index ef68074793..7dce15dcc6 100644 --- a/official/c20032555.lua +++ b/official/c20032555.lua @@ -1,4 +1,5 @@ --ギミック・パペット-ボム・エッグ +--Gimmick Puppet Egg Head local s,id=GetID() function s.initial_effect(c) --effects @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.effop) c:RegisterEffect(e1) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.cfilter(c) - return c:IsSetCard(0x1083) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsMonster() and c:IsDiscardable() end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) local opt=0 if e:GetHandler():GetLevel()==8 then opt=Duel.SelectOption(tp,aux.Stringid(id,1)) @@ -40,7 +41,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c20036055.lua b/official/c20036055.lua index e011a51720..79aaf8974c 100644 --- a/official/c20036055.lua +++ b/official/c20036055.lua @@ -1,4 +1,5 @@ --旅人の到彼岸 +--The Traveler and the Burning Abyss local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.filter(c,e,tp,id) - return c:IsSetCard(0xb1) and c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_BURNING_ABYSS) and c:GetTurnID()==id and not c:IsReason(REASON_RETURN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp,Duel.GetTurnCount()) end @@ -38,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sg=sg:Select(tp,ft,ft,nil) end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c20050865.lua b/official/c20050865.lua index e451e7cbc7..66fb8e87b1 100644 --- a/official/c20050865.lua +++ b/official/c20050865.lua @@ -1,4 +1,5 @@ --水晶機巧-シトリィ +--Crystron Citree local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.sccon) @@ -17,9 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) + return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.scfilter1(c,e,tp,mc) local mg=Group.FromCards(c,mc) @@ -46,7 +45,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -63,10 +62,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) local e2=e1:Clone() tc:RegisterEffect(e2,true) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) end -end +end \ No newline at end of file diff --git a/official/c20056760.lua b/official/c20056760.lua index fcbc3dc791..0e31a8dc4c 100644 --- a/official/c20056760.lua +++ b/official/c20056760.lua @@ -1,11 +1,12 @@ --グレイドル・スライム +--Graydle Slime local s,id=GetID() function s.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg1) @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xd1} +s.listed_series={SET_GRAYDLE} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xd1) + return c:IsFaceup() and c:IsSetCard(SET_GRAYDLE) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.filter(chkc) end @@ -63,7 +64,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GRAYDLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -78,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c20057949.lua b/official/c20057949.lua index e9eacb7488..32003e0c4a 100644 --- a/official/c20057949.lua +++ b/official/c20057949.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.checkop1(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(eg) do - if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousPosition(POS_FACEUP) and tc:IsPreviousSetCard(0x31) then + if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousPosition(POS_FACEUP) and tc:IsPreviousSetCard(SET_FORTUNE_LADY) then s[tc:GetPreviousControler()]=true end end @@ -39,23 +39,23 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.spcon1) e1:SetOperation(s.spop1) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) then + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,tp) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp + return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsTurnPlayer(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FORTUNE_LADY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop1(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,11 +65,11 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetTarget(s.sptg2) e1:SetOperation(s.spop2) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) Duel.RegisterEffect(e1,tp) end end @@ -85,4 +85,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,ft,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c20065259.lua b/official/c20065259.lua index 6a07c7a656..15836a3f14 100644 --- a/official/c20065259.lua +++ b/official/c20065259.lua @@ -1,5 +1,5 @@ --銃の忍者-火光 ---Musket Ninja Kagero +--Kagero the Cannon Ninja --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -33,20 +33,20 @@ function s.initial_effect(c) e4:SetOperation(s.sspop) c:RegisterEffect(e4) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x2b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_NINJA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) @@ -57,7 +57,7 @@ function s.sspcon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not tg or #tg~=1 then return false end local tc=tg:GetFirst() - return tc:IsControler(tp) and tc:IsLocation(LOCATION_ONFIELD) and ((tc:IsSetCard(0x2b) and tc:IsFaceup()) or (tc:IsMonster() and tc:IsPosition(POS_FACEDOWN_DEFENSE))) + return tc:IsControler(tp) and tc:IsLocation(LOCATION_ONFIELD) and ((tc:IsSetCard(SET_NINJA) and tc:IsFaceup()) or (tc:IsMonster() and tc:IsPosition(POS_FACEDOWN_DEFENSE))) and tc:IsAbleToHand() end function s.ssptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c20065322.lua b/official/c20065322.lua index 0ec2a98803..10c5fa5a58 100644 --- a/official/c20065322.lua +++ b/official/c20065322.lua @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c20065549.lua b/official/c20065549.lua index a620964b89..383566baa4 100644 --- a/official/c20065549.lua +++ b/official/c20065549.lua @@ -1,4 +1,5 @@ --絶対魔法禁止区域 +--Non-Spellcasting Area local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,5 +21,5 @@ function s.etarget(e,c) return not c:IsType(TYPE_EFFECT) end function s.efilter(e,re) - return re:IsActiveType(TYPE_SPELL) -end + return re:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c20071842.lua b/official/c20071842.lua index 8ea8384433..048467cf6f 100644 --- a/official/c20071842.lua +++ b/official/c20071842.lua @@ -1,5 +1,5 @@ --ヘヴィ・トリガー ---Heavy Trigger +--Heavy Interlock --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -7,15 +7,15 @@ function s.initial_effect(c) end s.listed_names={7987191} s.fit_monster={7987191} --should be removed in hardcode overhaul -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.ritualfil(c) return c:IsCode(7987191) and c:IsRitualMonster() end function s.mfilter(c,e) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:HasLevel() and c:IsSetCard(0x102) and c:IsMonster() and c:IsDestructable(e) + return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:HasLevel() and c:IsSetCard(SET_ROKKET) and c:IsMonster() and c:IsDestructable(e) end function s.extrafil(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,e) + return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,nil,e) end function s.extraop(mg,e,tp,eg,ep,ev,re,r,rp) local rg=mg:Filter(s.mfilter,nil,e) @@ -37,7 +37,7 @@ function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) --Cannot be destroyed by battle local e2=e1:Clone() @@ -47,9 +47,9 @@ function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) end function s.efilter(e,te) local tc=te:GetOwner() - return tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:IsSummonLocation(LOCATION_EXTRA) and te:IsActiveType(TYPE_MONSTER) + return tc:IsSpecialSummoned() and tc:IsSummonLocation(LOCATION_EXTRA) and te:IsMonsterEffect() and te:IsActivated() and te:GetActivateLocation()==LOCATION_MZONE end function s.indval(e,c) return c:IsSummonLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c20073910.lua b/official/c20073910.lua index 8d05ad30bb..f49dba6792 100644 --- a/official/c20073910.lua +++ b/official/c20073910.lua @@ -63,4 +63,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2009101.lua b/official/c2009101.lua index 3bbb5137be..fd36309c36 100644 --- a/official/c2009101.lua +++ b/official/c2009101.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end @@ -43,14 +43,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(tc:GetDefense()/2) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c20101223.lua b/official/c20101223.lua index 8b8f281ebf..cc94fc2a73 100644 --- a/official/c20101223.lua +++ b/official/c20101223.lua @@ -1,4 +1,5 @@ --神の息吹 +--Breath of Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20137754.lua b/official/c20137754.lua index 73a43266de..fb973069fc 100644 --- a/official/c20137754.lua +++ b/official/c20137754.lua @@ -1,4 +1,5 @@ --流星方界器デューザ +--Duza the Meteor Cubic Vessel local s,id=GetID() function s.initial_effect(c) --send to grave @@ -37,9 +38,9 @@ function s.initial_effect(c) e4:SetOperation(s.regop) c:RegisterEffect(e4) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} function s.tgfilter(c) - return c:IsSetCard(0xe3) and c:IsAbleToGrave() + return c:IsSetCard(SET_CUBIC) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,8 +54,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)>0 - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return e:GetHandler():GetFlagEffect(id)>0 and aux.StatChangeDamageStepCondition() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMatchingGroupCount(Card.IsMonster,tp,LOCATION_GRAVE,0,nil)>0 end @@ -68,7 +68,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -79,5 +79,5 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.rfilter,1,nil,tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end \ No newline at end of file diff --git a/official/c20138923.lua b/official/c20138923.lua index 9032d58567..f119469e4e 100644 --- a/official/c20138923.lua +++ b/official/c20138923.lua @@ -1,4 +1,5 @@ --反魔鏡 +--Anti-Magic Prism local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20140382.lua b/official/c20140382.lua index 412508720d..1901edca71 100644 --- a/official/c20140382.lua +++ b/official/c20140382.lua @@ -1,4 +1,5 @@ --オーバーウェルム +--Overwhelm local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsFaceup() and c:IsLevelAbove(7) and c:IsTributeSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsChainNegatable(ev) - and (re:IsActiveType(TYPE_MONSTER) or (re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE))) + and (re:IsMonsterEffect() or (re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20154092.lua b/official/c20154092.lua index 2124baadc5..ff7cfa8860 100644 --- a/official/c20154092.lua +++ b/official/c20154092.lua @@ -1,4 +1,5 @@ --先史遺産カブレラの投石機 +--Chronomaly Cabrera Trebuchet local s,id=GetID() function s.initial_effect(c) --atk @@ -14,9 +15,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.cfilter(c) - return c:IsSetCard(0x70) + return c:IsSetCard(SET_CHRONOMALY) end function s.filter(c,e) return c:IsFaceup() and c:IsCanBeEffectTarget(e) @@ -40,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c20155904.lua b/official/c20155904.lua index 79c7bb7f97..680772c1eb 100644 --- a/official/c20155904.lua +++ b/official/c20155904.lua @@ -21,18 +21,18 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} s.listed_names={id} function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.tdfilter(c) - return c:IsSetCard(0xf1) and not c:IsCode(id) and c:IsAbleToDeck() + return c:IsSetCard(SET_ZOODIAC) and not c:IsCode(id) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end @@ -51,7 +51,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetOriginalRace()==RACE_BEASTWARRIOR and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) and Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):IsContains(c) end @@ -62,4 +62,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) -end +end \ No newline at end of file diff --git a/official/c20174189.lua b/official/c20174189.lua index 8a09235c66..cb7b126543 100644 --- a/official/c20174189.lua +++ b/official/c20174189.lua @@ -1,4 +1,5 @@ --ナチュル・バンブーシュート +--Naturia Bamboo Shoot local s,id=GetID() function s.initial_effect(c) --mat check @@ -17,15 +18,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) e2:SetLabelObject(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.valcheck(e,c) local g=c:GetMaterial() local flag=0 - if g:IsExists(Card.IsSetCard,1,nil,0x2a) then flag=1 end + if g:IsExists(Card.IsSetCard,1,nil,SET_NATURIA) then flag=1 end e:SetLabel(flag) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() and e:GetLabelObject():GetLabel()~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) @@ -36,9 +37,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e:GetHandler():RegisterEffect(e1) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c20188127.lua b/official/c20188127.lua index 5cf4bb8fef..faa4cdc7f0 100644 --- a/official/c20188127.lua +++ b/official/c20188127.lua @@ -1,4 +1,5 @@ --泉の精霊 +--Fairy of the Spring local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c20191720.lua b/official/c20191720.lua index 5fb861e6de..e737385329 100644 --- a/official/c20191720.lua +++ b/official/c20191720.lua @@ -26,13 +26,13 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={20191720} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end end function s.spfilter(c) - return c:IsSetCard(0xfc) and c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_GOUKI) and c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.spfilter(chkc) end @@ -56,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSetCard(0xfc) and c:IsLinkMonster() and c:IsAbleToExtra() + return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() and c:IsAbleToExtra() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -67,11 +67,11 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) end function s.thfilter(c) - return c:IsSetCard(0xfc) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and c:IsMonster() and c:IsAbleToHand() end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() @@ -81,4 +81,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c20193924.lua b/official/c20193924.lua index 1444bc249b..6c12f6fd8e 100644 --- a/official/c20193924.lua +++ b/official/c20193924.lua @@ -1,4 +1,5 @@ --白夜の女王 +--White Night Queen local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20201255.lua b/official/c20201255.lua index b20517062c..ecb956ab55 100644 --- a/official/c20201255.lua +++ b/official/c20201255.lua @@ -1,7 +1,6 @@ --再起する剣闘獣 --Gladiator Beast's Comeback --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Gladiator Beast" monster from hand or GY @@ -13,21 +12,20 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x19} - +s.listed_series={SET_GLADIATOR} function s.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,c:GetRace()),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then --Cannot be destroyed by battle local e1=Effect.CreateEffect(e:GetHandler()) @@ -36,7 +34,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c20210570.lua b/official/c20210570.lua index db4d1ca0de..e199585af4 100644 --- a/official/c20210570.lua +++ b/official/c20210570.lua @@ -1,4 +1,5 @@ --レグルス +--Regulus local s,id=GetID() function s.initial_effect(c) --salvage @@ -26,6 +27,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20212491.lua b/official/c20212491.lua index 4e05dd2ecb..2f2ea3622b 100644 --- a/official/c20212491.lua +++ b/official/c20212491.lua @@ -88,4 +88,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.Overlay(tc,g) end -end +end \ No newline at end of file diff --git a/official/c20216608.lua b/official/c20216608.lua index a9ae9c5199..e65f12174d 100644 --- a/official/c20216608.lua +++ b/official/c20216608.lua @@ -55,4 +55,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) and tc:IsLocation(LOCATION_DECK) then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20228463.lua b/official/c20228463.lua index 66057e04a7..51a4f55d5c 100644 --- a/official/c20228463.lua +++ b/official/c20228463.lua @@ -1,4 +1,5 @@ --セレモニーベル +--Ceremonial Bell local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c20246864.lua b/official/c20246864.lua index 842d482a71..b9ac023d23 100644 --- a/official/c20246864.lua +++ b/official/c20246864.lua @@ -1,7 +1,6 @@ --WW-フリーズ・ベル --Windwitch - Freeze Bell --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -33,10 +32,9 @@ function s.initial_effect(c) e3:SetOperation(s.efop) c:RegisterEffect(e3) end -s.listed_series={0xf0} - +s.listed_series={SET_WINDWITCH} function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xf0) + return c:IsFacedown() or not c:IsSetCard(SET_WINDWITCH) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -60,7 +58,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(1) c:RegisterEffect(e1) end @@ -78,6 +76,6 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c20248754.lua b/official/c20248754.lua index fa9cf08d07..dbb2a4efdb 100644 --- a/official/c20248754.lua +++ b/official/c20248754.lua @@ -1,7 +1,6 @@ --海造賊-静寂のメルケ号 --Plunder Patrollship Moerk --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -38,20 +37,19 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x13f) + return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_PLUNDER_PATROLL) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x13f) + return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_PLUNDER_PATROLL) end function s.cfilter(c) - return c:IsSetCard(0x13f) and c:IsDiscardable() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToRemove() @@ -65,7 +63,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0x13f) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -82,8 +80,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x13f) and c:IsControler(tp) and c:IsOnField() - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsControler(tp) and c:IsOnField() + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -95,4 +93,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20264508.lua b/official/c20264508.lua index 00536bd7ba..5ed91f9938 100644 --- a/official/c20264508.lua +++ b/official/c20264508.lua @@ -1,4 +1,5 @@ --サンダー・ショート +--Thunder Short local s,id=GetID() function s.initial_effect(c) --damage @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(p,LOCATION_MZONE,0)*400 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20265095.lua b/official/c20265095.lua index b2312d68ed..3e5e51ee0a 100644 --- a/official/c20265095.lua +++ b/official/c20265095.lua @@ -1,14 +1,13 @@ --慧炎星-コサンジャク --Brotherhood of the Fire Fist - Peacock --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Link summon procedure - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x79),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FIRE_FIST),2,2) --Cannot be targeted for attack while pointing to a "Fire Fist" monster local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -31,24 +30,23 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Fire Fist" archetype -s.listed_series={0x7c,0x79} - +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} --If this card is pointing to "Fire Fist" function s.lkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x79) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FIST) and c:IsMonster() end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetLinkedGroup():IsExists(s.lkfilter,1,nil) end --Check for "Fire Formation" S/T for cost function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end --Activation legality function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - local zone=c:GetLinkedZone()&0x1f - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==1-tp and chkc:IsControlerCanBeChanged(false,zone) end + local zone=c:GetLinkedZone()&ZONES_MMZ + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged(false,zone) end local nc=Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) local tgchk=Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil,false,zone) if chk==0 then @@ -70,9 +68,9 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() if c:IsRelateToEffect(e) and tc then - local zone=c:GetLinkedZone()&0x1f + local zone=c:GetLinkedZone()&ZONES_MMZ if Duel.GetControl(tc,tp,PHASE_END,1,zone)~=0 then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END --Cannot attack local e1=Effect.CreateEffect(c) e1:SetDescription(3206) diff --git a/official/c20277376.lua b/official/c20277376.lua index c880e04aab..728e9e9c4b 100644 --- a/official/c20277376.lua +++ b/official/c20277376.lua @@ -1,4 +1,5 @@ --神竜 アポカリプス +--Divine Dragon Apocralyph local s,id=GetID() function s.initial_effect(c) --salvage @@ -16,13 +17,13 @@ function s.initial_effect(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -34,4 +35,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c20281581.lua b/official/c20281581.lua index b0d8d3eabc..a6517cb07f 100644 --- a/official/c20281581.lua +++ b/official/c20281581.lua @@ -70,4 +70,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c20285786.lua b/official/c20285786.lua index c43a307fd5..ecbd756ad8 100644 --- a/official/c20285786.lua +++ b/official/c20285786.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x7f} +s.listed_series={SET_UTOPIC} function s.filter(c,e,tp) return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.xyzfilter(c,mg) - return c:IsSetCard(0x7f) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsXyzSummonable(nil,mg,2,2) + return c:IsSetCard(SET_UTOPIC) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsXyzSummonable(nil,mg,2,2) end function s.mfilter1(c,mg,exg) return mg:IsExists(s.mfilter2,1,c,c,exg) @@ -57,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -71,4 +71,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() Duel.XyzSummon(tp,xyz,nil,g) end -end +end \ No newline at end of file diff --git a/official/c20292186.lua b/official/c20292186.lua index ddec62f22a..9b2e7bde89 100644 --- a/official/c20292186.lua +++ b/official/c20292186.lua @@ -42,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.dcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.dop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -50,14 +50,13 @@ function s.dop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(id,2)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(0,1) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) --lizard check - aux.addTempLizardCheck(e:GetHandler(),tp,aux.TRUE,RESET_PHASE+PHASE_END,0,0xff) - + aux.addTempLizardCheck(e:GetHandler(),tp,aux.TRUE,RESET_PHASE|PHASE_END,0,0xff) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c20295753.lua b/official/c20295753.lua index 75609a9eb1..7c025eb190 100644 --- a/official/c20295753.lua +++ b/official/c20295753.lua @@ -1,9 +1,9 @@ --- --- Night Sword Serpent --- Scripted by Hatter +--夜刀蛇巳 +--Night Sword Serpent +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -25,14 +25,14 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c20318029.lua b/official/c20318029.lua index 17deff665e..f84457e4cb 100644 --- a/official/c20318029.lua +++ b/official/c20318029.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_THUNDRA) @@ -34,10 +34,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={20318029} -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.atkfilter(c) return c:IsFaceup() and c:IsRace(RACE_THUNDER) end @@ -53,7 +49,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) end @@ -74,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end +end \ No newline at end of file diff --git a/official/c20343502.lua b/official/c20343502.lua index 9913c08d81..83f5cb2258 100644 --- a/official/c20343502.lua +++ b/official/c20343502.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Xyz summon procedure - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x71),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MADOLCHE),4,2) --Targeted "Madolche" monster becomes unaffected by monster effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.immcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.immtg) e1:SetOperation(s.immop) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --Shuffle up to 2 cards from either GY into deck local e2=Effect.CreateEffect(c) @@ -33,13 +33,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x71} -function s.immcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_MADOLCHE} function s.immfilter(c) - return c:IsSetCard(0x71) and c:IsFaceup() + return c:IsSetCard(SET_MADOLCHE) and c:IsFaceup() end function s.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.immfilter(chkc) end @@ -58,15 +54,15 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetHandler() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetHandler() end function s.tdcfilter(c,tp) - return c:IsSetCard(0x71) and c:IsControler(tp) + return c:IsSetCard(SET_MADOLCHE) and c:IsControler(tp) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.tdcfilter,1,nil,tp) @@ -81,4 +77,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20345391.lua b/official/c20345391.lua index f586de9673..84938dffa4 100644 --- a/official/c20345391.lua +++ b/official/c20345391.lua @@ -1,5 +1,5 @@ --空牙団の参謀 シール ---Scripted by Eerie Code +--Seal, Strategist Fur Hire local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} s.listed_names={} function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,13 +45,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0x114) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FUR_HIRE) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -65,5 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c20349913.lua b/official/c20349913.lua index 30ed856765..c7e5d5d63f 100644 --- a/official/c20349913.lua +++ b/official/c20349913.lua @@ -14,16 +14,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x7b} +s.listed_series={SET_GALAXY} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY) and c:IsType(TYPE_XYZ) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -42,10 +42,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(0,1) e1:SetValue(s.val) - e1:SetReset(RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e1,tp) end end function s.val(e,re,val,r,rp,rc) return math.floor(val/2) -end +end \ No newline at end of file diff --git a/official/c20351153.lua b/official/c20351153.lua index 3b4ca69166..6cd4abfd21 100644 --- a/official/c20351153.lua +++ b/official/c20351153.lua @@ -1,4 +1,5 @@ --幻角獣フュプノコーン +--Hypnocorn local s,id=GetID() function s.initial_effect(c) --destroy @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20357457.lua b/official/c20357457.lua index d39655a49a..051624f7b2 100644 --- a/official/c20357457.lua +++ b/official/c20357457.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,2}) - e4:SetCost(aux.SelfBanishCost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.thsptg) e4:SetOperation(s.thspop) c:RegisterEffect(e4) diff --git a/official/c20358953.lua b/official/c20358953.lua index f1d59ef81f..b7db6587ca 100644 --- a/official/c20358953.lua +++ b/official/c20358953.lua @@ -1,4 +1,5 @@ --シャーク・ザ・クルー +--Shark Cruiser local s,id=GetID() function s.initial_effect(c) --special summon @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20366274.lua b/official/c20366274.lua index 77114e0067..0635a6de43 100644 --- a/official/c20366274.lua +++ b/official/c20366274.lua @@ -1,8 +1,9 @@ --エルシャドール・ネフィリム +--El Shaddoll Construct local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9d),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) --cannot spsummon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -42,13 +43,13 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x9d} -s.material_setcode=0x9d +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL function s.matfilter(c,lc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_LIGHT,lc,sumtype,tp) or c:IsHasEffect(4904633) end function s.tgfilter(c) - return c:IsSetCard(0x9d) and c:IsAbleToGrave() + return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,7 +65,7 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) + return bc and bc:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -77,7 +78,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -91,4 +92,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20374351.lua b/official/c20374351.lua index f1474f3487..c39e90a6a8 100644 --- a/official/c20374351.lua +++ b/official/c20374351.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -50,12 +50,12 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return tg and tg:IsContains(c) and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -69,4 +69,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20374520.lua b/official/c20374520.lua index 9d9cf053e3..d9b148e9bf 100644 --- a/official/c20374520.lua +++ b/official/c20374520.lua @@ -1,4 +1,5 @@ --門前払い +--Begone, Knave! local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20394040.lua b/official/c20394040.lua index c179d10c1b..852c75f7ba 100644 --- a/official/c20394040.lua +++ b/official/c20394040.lua @@ -1,4 +1,5 @@ --バーバリアン1号 +--Lava Battleguard local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,4 +13,4 @@ end s.listed_names={40453765} function s.value(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsCode,40453765),c:GetControler(),LOCATION_MZONE,0,nil)*500 -end +end \ No newline at end of file diff --git a/official/c20403123.lua b/official/c20403123.lua index f25f3b4101..36a24458ef 100644 --- a/official/c20403123.lua +++ b/official/c20403123.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.hspfilter(c,ft,tp) - return c:IsSetCard(0x9f) and not c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_PERFORMAPAL) and not c:IsType(TYPE_PENDULUM) end function s.hspcon(e,c) if c==nil then return true end @@ -50,7 +50,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFaceup() end @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20409757.lua b/official/c20409757.lua index 8d4d5b4af0..38273c3599 100644 --- a/official/c20409757.lua +++ b/official/c20409757.lua @@ -1,4 +1,5 @@ --時読みの魔術師 +--Timegazer Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -44,7 +45,7 @@ function s.initial_effect(c) e6:SetValue(s.indval) c:RegisterEffect(e6) end -s.listed_series={0x98,0x99} +s.listed_series={SET_MAGICIAN,SET_ODD_EYES} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end @@ -60,14 +61,14 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.slfilter(c) - return c:IsSetCard(0x98) or c:IsSetCard(0x99) + return c:IsSetCard({SET_MAGICIAN,SET_ODD_EYES}) end function s.slcon(e) return not Duel.IsExistingMatchingCard(s.slfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler()) @@ -76,4 +77,4 @@ function s.indval(e,re,r,rp) if (r&REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer() then return 1 else return 0 end -end +end \ No newline at end of file diff --git a/official/c20417688.lua b/official/c20417688.lua index 3173a485dd..9a3f0fde48 100644 --- a/official/c20417688.lua +++ b/official/c20417688.lua @@ -1,5 +1,5 @@ --星逢の天河 ---Star-Crossed Meeting +--Stars Align across the Milky Way --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.cptg) e2:SetOperation(s.cpop) c:RegisterEffect(e2) diff --git a/official/c20419926.lua b/official/c20419926.lua index 8c5fd34234..93b84d74f1 100644 --- a/official/c20419926.lua +++ b/official/c20419926.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x10f} +s.listed_series={SET_BORREL} function s.atkcon() return Duel.IsBattlePhase() end @@ -34,12 +34,12 @@ function s.atkcfilter(c) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10f) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_BORREL) and c:IsMonster() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil):GetFirst() Duel.Remove(tc,POS_FACEUP,REASON_COST) e:SetLabel(tc:GetBaseAttack()) end @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c20424878.lua b/official/c20424878.lua index a033316483..d1d1a36a9b 100644 --- a/official/c20424878.lua +++ b/official/c20424878.lua @@ -1,7 +1,6 @@ --スプリガンズ・ロッキー ---Sprigguns Rocky +--Springans Rockey --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) @@ -31,13 +30,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Sprigguns" archetype -s.listed_series={0x158} +s.listed_series={SET_SPRINGANS} --Specifically lists "Vast Desert – Gold Golgonda" and itself s.listed_names={60884672,id} - --Check for "Sprigguns" Xyz monster function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) end --Activation legality function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -59,7 +57,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Spriggun" monster or "Vast Desert – Gold Golgonda" function s.thfilter(c) - return ((c:IsMonster() and c:IsSetCard(0x158)) or c:IsCode(60884672)) and not c:IsCode(id) and c:IsAbleToHand() + return ((c:IsMonster() and c:IsSetCard(SET_SPRINGANS)) or c:IsCode(60884672)) and not c:IsCode(id) and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -76,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c20426907.lua b/official/c20426907.lua index a34440497d..035f724afa 100644 --- a/official/c20426907.lua +++ b/official/c20426907.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) then @@ -62,13 +62,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -91,26 +91,26 @@ function s.disop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+RESETS_REDIRECT) + e3:SetReset(RESET_EVENT|RESETS_REDIRECT) e3:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e3) end end function s.sdfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_QLI) and not c:IsCode(id) end function s.sdcon(e) return not Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end +end \ No newline at end of file diff --git a/official/c20436034.lua b/official/c20436034.lua index 4a43d99e9b..1b704786dd 100644 --- a/official/c20436034.lua +++ b/official/c20436034.lua @@ -1,4 +1,5 @@ --磁力の指輪 +--Ring of Magnetism local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,0,nil,s.eqlimit) @@ -29,4 +30,4 @@ function s.eqlimit(e,c) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget()~=nil -end +end \ No newline at end of file diff --git a/official/c20438745.lua b/official/c20438745.lua index e7553961a0..9fc6200741 100644 --- a/official/c20438745.lua +++ b/official/c20438745.lua @@ -25,4 +25,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20447641.lua b/official/c20447641.lua index 6b50cd6fde..b1a274fcbc 100644 --- a/official/c20447641.lua +++ b/official/c20447641.lua @@ -11,24 +11,24 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xaa,0x10aa} +s.listed_series={SET_QLI,SET_APOQLIPHORT} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xaa,0x21,1800,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_QLI,TYPE_MONSTER|TYPE_EFFECT,1800,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xaa,0x21,1800,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_QLI,TYPE_MONSTER|TYPE_EFFECT,1800,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then c:AddMonsterAttribute(TYPE_EFFECT) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_TRIPLE_TRIBUTE) - e1:SetValue(aux.TargetBoolFunction(Card.IsSetCard,0x10aa)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetValue(aux.TargetBoolFunction(Card.IsSetCard,SET_APOQLIPHORT)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -36,11 +36,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTarget(s.indtg) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end Duel.SpecialSummonComplete() end function s.indtg(e,c) - return c:IsSpellTrap() and c:IsSetCard(0xaa) + return c:IsSpellTrap() and c:IsSetCard(SET_QLI) end \ No newline at end of file diff --git a/official/c20450925.lua b/official/c20450925.lua index 05678fc1e1..17685ffa33 100644 --- a/official/c20450925.lua +++ b/official/c20450925.lua @@ -1,4 +1,5 @@ --ハネワタ +--Hanewata local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,14 +8,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -22,14 +19,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c20455229.lua b/official/c20455229.lua index e37e8e0f16..dd3e07ea9a 100644 --- a/official/c20455229.lua +++ b/official/c20455229.lua @@ -79,5 +79,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c20457551.lua b/official/c20457551.lua index 47ea5191bd..aeb8823df1 100644 --- a/official/c20457551.lua +++ b/official/c20457551.lua @@ -1,7 +1,8 @@ --鋼核収納 +--Iron Core Armor local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x1d)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_KOAKI_MEIRU)) --atk down local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -20,9 +21,9 @@ function s.initial_effect(c) e4:SetTarget(s.desreptg) c:RegisterEffect(e4) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return Duel.IsPhase(PHASE_DAMAGE_CAL) and e:GetHandler():GetEquipTarget():GetBattleTarget() end function s.atktg(e,c) @@ -33,9 +34,9 @@ function s.atkval(e,c) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return not c:GetEquipTarget():IsReason(REASON_REPLACE) and Duel.GetCurrentPhase()==PHASE_END end + if chk==0 then return not c:GetEquipTarget():IsReason(REASON_REPLACE) and Duel.IsPhase(PHASE_END) end if Duel.SelectEffectYesNo(tp,c,96) then Duel.SendtoGrave(c,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c20470500.lua b/official/c20470500.lua index 1a9415452f..b65d59f412 100644 --- a/official/c20470500.lua +++ b/official/c20470500.lua @@ -1,4 +1,5 @@ --アームズ・シーハンター +--Armed Sea Hunter local s,id=GetID() function s.initial_effect(c) --Disable @@ -56,5 +57,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c20474741.lua b/official/c20474741.lua index 4f9f4ea883..581d01574b 100644 --- a/official/c20474741.lua +++ b/official/c20474741.lua @@ -1,4 +1,5 @@ --トライデント・ウォリアー +--Trident Warrior local s,id=GetID() function s.initial_effect(c) --summon success @@ -26,4 +27,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2047519.lua b/official/c2047519.lua index eea5972d32..d8c10c908e 100644 --- a/official/c2047519.lua +++ b/official/c2047519.lua @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20501450.lua b/official/c20501450.lua index e1032de207..8ca819b056 100644 --- a/official/c20501450.lua +++ b/official/c20501450.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -34,16 +34,13 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 then s[ep]=s[ep]+1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.clear(e,tp,eg,ep,ev,re,r,rp) s[0]=0 s[1]=0 end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true @@ -69,7 +66,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,0,1,aux.Stringid(id,1),nil) end @@ -83,7 +80,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetDefense()) tc:RegisterEffect(e1) end diff --git a/official/c20513882.lua b/official/c20513882.lua index 49d4ffdc59..5da36699bc 100644 --- a/official/c20513882.lua +++ b/official/c20513882.lua @@ -1,4 +1,5 @@ --苦渋の黙札 +--Painful Escape local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.cfilter(c,tp) return c:GetOriginalLevel()>0 - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c) end function s.thfilter(c,tc) return c:IsMonster() @@ -36,14 +37,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,tp) e:SetLabelObject(g:GetFirst()) Duel.Release(g,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tc) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c20522190.lua b/official/c20522190.lua index e8efe96ca0..77aa99e24a 100644 --- a/official/c20522190.lua +++ b/official/c20522190.lua @@ -1,4 +1,5 @@ --邪悪なるバリア -ダーク・フォース- +--Dark Mirror Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsDefensePos() and c:IsAbleToRemove() @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20529766.lua b/official/c20529766.lua index 7b69c2d098..62938a28e1 100644 --- a/official/c20529766.lua +++ b/official/c20529766.lua @@ -35,7 +35,7 @@ function s.valcheck(e,c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()~=0 + return c:IsTributeSummoned() and e:GetLabel()~=0 end function s.operation(e,tp,eg,ep,ev,re,r,rp) local flag=e:GetLabel() @@ -46,21 +46,21 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(3682106) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end if flag&0x2~=0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end if flag&0x4~=0 then @@ -68,14 +68,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_MONSTER) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end + if re:IsMonsterEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if #g==1 and g:GetFirst()==e:GetHandler() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c20537097.lua b/official/c20537097.lua index 750e891b4a..d95bf42675 100644 --- a/official/c20537097.lua +++ b/official/c20537097.lua @@ -1,7 +1,6 @@ --蒼穹の機界騎士 --Mekk-Knight Blue Sky --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -29,9 +28,8 @@ function s.initial_effect(c) e3:SetCondition(s.thcon) c:RegisterEffect(e3) end -s.listed_series={0x10c} +s.listed_series={SET_MEKK_KNIGHT} s.listed_names={id} - function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -48,7 +46,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.thfilter(c) - return c:IsSetCard(0x10c) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) @@ -71,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoHand(hg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,hg) -end +end \ No newline at end of file diff --git a/official/c20546916.lua b/official/c20546916.lua index 36d3aa2634..c8b91e540f 100644 --- a/official/c20546916.lua +++ b/official/c20546916.lua @@ -1,4 +1,5 @@ --ボタニカル・ライオ +--Botanical Lion local s,id=GetID() function s.initial_effect(c) --atk @@ -19,4 +20,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),c:GetControler(),LOCATION_MZONE,0,nil)*300 -end +end \ No newline at end of file diff --git a/official/c2055403.lua b/official/c2055403.lua index 5910dd38c6..8a126ecb6d 100644 --- a/official/c2055403.lua +++ b/official/c2055403.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,tp) - return not c:IsSummonPlayer(tp) and (c:GetSummonLocation()&LOCATION_HAND+LOCATION_EXTRA)~=0 + return not c:IsSummonPlayer(tp) and (c:GetSummonLocation()&LOCATION_HAND|LOCATION_EXTRA)~=0 and c:IsAbleToDeck() and c:IsLocation(LOCATION_MZONE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -22,16 +22,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetTargetCard(eg) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,ct,0,0) end - function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,tp):Filter(Card.IsRelateToEffect,nil,e) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.SetLP(tp,Duel.GetLP(tp)-ct*1000) end end -end +end \ No newline at end of file diff --git a/official/c20560620.lua b/official/c20560620.lua index 80286005c4..68c61229e2 100644 --- a/official/c20560620.lua +++ b/official/c20560620.lua @@ -1,5 +1,5 @@ --お代狸様の代算様ー ---Overeager Mr. & Mrs. Tanuki +--Emperor Tanuki's Critter Count --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) diff --git a/official/c20563387.lua b/official/c20563387.lua index dbcb909a20..f7264ce05d 100644 --- a/official/c20563387.lua +++ b/official/c20563387.lua @@ -1,4 +1,5 @@ --CNo.80 葬装覇王レクイエム・イン・バーサーク +--Number C80: Requiem in Berserk local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.rmcon) - e2:SetCost(s.rmcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -51,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -60,7 +61,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(2000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --destroy sub local e3=Effect.CreateEffect(c) @@ -68,7 +69,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.eqlimit(e,c) @@ -77,10 +78,6 @@ end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,93568288) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -93,4 +90,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20579538.lua b/official/c20579538.lua index c007807c1e..5e8e739237 100644 --- a/official/c20579538.lua +++ b/official/c20579538.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local tg=dg:Select(tp,1,1,nil) Duel.HintSelection(tg,true) - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c20584712.lua b/official/c20584712.lua index f7f75a192f..ac863a8a9b 100644 --- a/official/c20584712.lua +++ b/official/c20584712.lua @@ -1,4 +1,5 @@ --SPYRAL Tough +--SPYRAL Tough local s,id=GetID() function s.initial_effect(c) --change name @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(41091257) c:RegisterEffect(e1) --destroy @@ -41,4 +42,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if (opt==0 and tc:IsMonster()) or (opt==1 and tc:IsSpell()) or (opt==2 and tc:IsTrap()) then Duel.Destroy(dc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20586572.lua b/official/c20586572.lua index 6c4a30648c..82a480c82d 100644 --- a/official/c20586572.lua +++ b/official/c20586572.lua @@ -1,4 +1,5 @@ --ボマー・ドラゴン +--Exploder Dragon local s,id=GetID() function s.initial_effect(c) --destroy @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e) return Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c20590515.lua b/official/c20590515.lua index 85281237ac..8193dabe6d 100644 --- a/official/c20590515.lua +++ b/official/c20590515.lua @@ -23,24 +23,24 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_END_PHASE) e2:SetCountLimit(1,id) e2:SetCondition(s.setcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x143} +s.listed_series={SET_ELDLIXIR} s.listed_names={CARD_GOLDEN_LORD} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x143,0x11,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_NORMAL,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x143,0x11,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end - c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_NORMAL,500,1800,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end + c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() @@ -56,10 +56,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.setcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.setfilter(c) - return c:IsSetCard(0x143) and c:IsSSetable() and not c:IsForbidden() + return c:IsSetCard(SET_ELDLIXIR) and c:IsSSetable() and not c:IsForbidden() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 diff --git a/official/c20590784.lua b/official/c20590784.lua index c5293e42f9..850d7ba0d5 100644 --- a/official/c20590784.lua +++ b/official/c20590784.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() return at:GetControler()~=tp and Duel.GetAttackTarget()==nil @@ -22,12 +22,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local at=Duel.GetAttacker() if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and at:IsOnField() and at:GetAttack()>=Duel.GetLP(tp) - and at:IsSummonType(SUMMON_TYPE_SPECIAL) end + and at:IsSpecialSummoned() end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) end function s.filter(c,e,tp) - return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STARDUST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)) end @@ -41,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c20612097.lua b/official/c20612097.lua index 99443d9e47..d3bbd427fa 100644 --- a/official/c20612097.lua +++ b/official/c20612097.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c20618081.lua b/official/c20618081.lua index 191015e1d6..6c23b11d6c 100644 --- a/official/c20618081.lua +++ b/official/c20618081.lua @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20618850.lua b/official/c20618850.lua index 7762d23071..7b6d48f679 100644 --- a/official/c20618850.lua +++ b/official/c20618850.lua @@ -1,13 +1,13 @@ --- まどろみの神碑 --- Mysterune of the Golden Droplets --- Scripted by Hatter +--まどろみの神碑 +--Runick Golden Droplet +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateMysteruneQPEffect(c,id,CATEGORY_DRAW,s.drtg,s.drop,4,EFFECT_FLAG_PLAYER_TARGET) c:RegisterEffect(e1) end -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>4 end Duel.SetTargetPlayer(1-tp) diff --git a/official/c2061963.lua b/official/c2061963.lua index 81a9ac47ea..2b2d454359 100644 --- a/official/c2061963.lua +++ b/official/c2061963.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,11 +33,7 @@ s.xyz_number=104 function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local ph=Duel.GetCurrentPhase() return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and (ph>PHASE_MAIN1 and ph0 + return re:IsMonsterEffect() and rc~=c and c:GetFlagEffect(1)>0 end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -63,10 +63,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +74,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20638610.lua b/official/c20638610.lua index e3bc5d4d24..a079798154 100644 --- a/official/c20638610.lua +++ b/official/c20638610.lua @@ -1,4 +1,5 @@ --竜の転生 +--Dragon's Rebirth local s,id=GetID() function s.initial_effect(c) --spsummon @@ -22,20 +23,20 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.rmfilter(chkc) end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return ft>-1 and Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE,0,1,nil,ft) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE,0,1,1,nil,ft) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c20654247.lua b/official/c20654247.lua index db38e4186e..9481009df3 100644 --- a/official/c20654247.lua +++ b/official/c20654247.lua @@ -1,6 +1,5 @@ --青眼の混沌龍 --Blue-Eyes Chaos Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -46,13 +45,12 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={21082832,CARD_BLUEEYES_W_DRAGON} - function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() end function s.poscon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)~=0 + return c:IsRitualSummoned() and c:GetFlagEffect(id)~=0 end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end @@ -69,13 +67,13 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -86,7 +84,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_PIERCE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e3) end end diff --git a/official/c20663556.lua b/official/c20663556.lua index 6bdd68d60b..94aa3cb130 100644 --- a/official/c20663556.lua +++ b/official/c20663556.lua @@ -1,4 +1,5 @@ --イレカエル +--Substitoad local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.indes(e,c) - return c:IsSetCard(0x12) + return c:IsSetCard(SET_FROG) end function s.cfilter(c,ft,tp) return ft>0 or (c:IsControler(tp) and c:GetSequence()<5) @@ -35,7 +36,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FROG) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c20665527.lua b/official/c20665527.lua index 650a017df6..250f772d42 100644 --- a/official/c20665527.lua +++ b/official/c20665527.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.descon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -78,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2067935.lua b/official/c2067935.lua index 44191c88d9..e19a7c7310 100644 --- a/official/c2067935.lua +++ b/official/c2067935.lua @@ -18,30 +18,30 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} function s.rmfilter(c) - return c:IsSetCard(0x19) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GLADIATOR) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then local code=tc:GetOriginalCode() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) if c:IsFacedown() or not c:IsRelateToEffect(e) then return end @@ -50,25 +50,19 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,112,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,112,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -77,6 +71,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,112,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c20686759.lua b/official/c20686759.lua index 0cae6fe94a..364ee59300 100644 --- a/official/c20686759.lua +++ b/official/c20686759.lua @@ -1,7 +1,8 @@ --D・レトロエンジン +--Morphtronic Rusty Engine local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x26)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_MORPHTRONIC)) --damage local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DAMAGE) @@ -12,7 +13,7 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() @@ -29,4 +30,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,e:GetLabel(),REASON_EFFECT,true) Duel.Damage(tp,e:GetLabel(),REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c20700531.lua b/official/c20700531.lua index ba7145135c..911a7f5649 100644 --- a/official/c20700531.lua +++ b/official/c20700531.lua @@ -1,4 +1,5 @@ --氷結界の修験者 +--Pilgrim of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --indes @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.indes(e,c) return c:GetAttack()>=1900 -end +end \ No newline at end of file diff --git a/official/c20720928.lua b/official/c20720928.lua index b3b4b2997f..ee443767da 100644 --- a/official/c20720928.lua +++ b/official/c20720928.lua @@ -27,16 +27,16 @@ function s.initial_effect(c) e3:SetOperation(s.chainop) c:RegisterEffect(e3) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.nttg(e,c) - return c:IsLevelAbove(5) and c:IsSetCard(0x105) + return c:IsLevelAbove(5) and c:IsSetCard(SET_METAPHYS) end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) @@ -46,7 +46,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetLabelObject(c) e2:SetCondition(s.rmcon) e2:SetOperation(s.rmop) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) @@ -63,10 +63,10 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end function s.chainop(e,tp,eg,ep,ev,re,r,rp) - if re:GetHandler():IsSetCard(0x105) and re:IsActiveType(TYPE_MONSTER) and re:GetOwnerPlayer()==tp then + if re:GetHandler():IsSetCard(SET_METAPHYS) and re:IsMonsterEffect() and re:GetOwnerPlayer()==tp then Duel.SetChainLimit(s.chainlm) end end function s.chainlm(e,rp,tp) return tp==rp -end +end \ No newline at end of file diff --git a/official/c20721759.lua b/official/c20721759.lua index 8a8d578ab3..376e9f6797 100644 --- a/official/c20721759.lua +++ b/official/c20721759.lua @@ -1,4 +1,5 @@ --ヘイト・クレバス +--Icy Crevasse local s,id=GetID() function s.initial_effect(c) --tograve @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local atk=tc:GetBaseAttack() if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20727787.lua b/official/c20727787.lua index faa60c1dab..e3c45d187a 100644 --- a/official/c20727787.lua +++ b/official/c20727787.lua @@ -1,4 +1,5 @@ --武装解除 +--Disarmament local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,LOCATION_SZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20735371.lua b/official/c20735371.lua index 706ddd9e27..ccfed9e916 100644 --- a/official/c20735371.lua +++ b/official/c20735371.lua @@ -20,12 +20,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetAttackTarget() if tc and tc:IsRelateToBattle() and tc:IsFaceup() then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.damcon) e2:SetOperation(s.damop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end end @@ -42,4 +42,4 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,ev*2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20745268.lua b/official/c20745268.lua index 763d3a6a6f..e2504d5917 100644 --- a/official/c20745268.lua +++ b/official/c20745268.lua @@ -1,5 +1,5 @@ --魔弾-デスペラード ---Magibullet - Death-perado +--Magical Musket - Desperado --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x108} +s.listed_series={SET_MAGICAL_MUSKET} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x108),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MAGICAL_MUSKET),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() diff --git a/official/c20747792.lua b/official/c20747792.lua index e51ccac834..14952ecd87 100644 --- a/official/c20747792.lua +++ b/official/c20747792.lua @@ -1,4 +1,5 @@ --ベリー・マジシャン・ガール +--Berry Magician Girl local s,id=GetID() function s.initial_effect(c) --search @@ -29,10 +30,10 @@ function s.initial_effect(c) e3:SetCondition(s.spcon2) c:RegisterEffect(e3) end -s.listed_series={0x20a2} +s.listed_series={SET_MAGICIAN_GIRL} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0x20a2) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MAGICIAN_GIRL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,7 +48,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x20a2) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGICIAN_GIRL) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return eg:IsContains(e:GetHandler()) and rp~=tp @@ -70,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20758643.lua b/official/c20758643.lua index 444c816f6b..ef60f80e3c 100644 --- a/official/c20758643.lua +++ b/official/c20758643.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 グラバースニッチ +--Graff, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -32,16 +33,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} s.listed_names={id} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -57,7 +58,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xb1) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BURNING_ABYSS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -71,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20765952.lua b/official/c20765952.lua index 91b344ce27..ea557d291a 100644 --- a/official/c20765952.lua +++ b/official/c20765952.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.damcon) @@ -73,4 +73,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20773176.lua b/official/c20773176.lua index 889fa1b7e0..48ee533e2d 100644 --- a/official/c20773176.lua +++ b/official/c20773176.lua @@ -1,4 +1,5 @@ --炎獣の影霊衣-セフィラエグザ +--Zefraxa, Flame Beast of the Nekroz local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -17,7 +18,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e3:SetRange(LOCATION_HAND|LOCATION_GRAVE) e3:SetCode(EVENT_DESTROYED) e3:SetCountLimit(1,id) e3:SetCondition(s.condition) @@ -25,15 +26,15 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xb4,0xc4} +s.listed_series={SET_NEKROZ,SET_ZEFRA} s.listed_names={id} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb4) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard({SET_NEKROZ,SET_ZEFRA}) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.filter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) - and (c:IsSetCard(0xb4) or c:IsSetCard(0xc4)) and not c:IsCode(id) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) + and c:IsSetCard({SET_NEKROZ,SET_ZEFRA}) and not c:IsCode(id) and c:IsPreviousControler(tp) and ((c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)) or c:IsPreviousLocation(LOCATION_PZONE)) @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c20781762.lua b/official/c20781762.lua index 311367907e..4765bdcc07 100644 --- a/official/c20781762.lua +++ b/official/c20781762.lua @@ -1,4 +1,5 @@ --岩投げアタック +--Rock Bombardment local s,id=GetID() function s.initial_effect(c) --send to grave @@ -31,4 +32,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20785975.lua b/official/c20785975.lua index 73f6fbe29e..f4fbb6902e 100644 --- a/official/c20785975.lua +++ b/official/c20785975.lua @@ -1,4 +1,5 @@ --CNo.103 神葬零嬢ラグナ・インフィニティ +--Number C103: Ragnafinity local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -31,10 +32,6 @@ function s.initial_effect(c) end s.xyz_number=103 s.listed_names={94380860} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() and c:IsAbleToRemove() end @@ -70,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20788863.lua b/official/c20788863.lua index 41b2b57316..2cac78dfe2 100644 --- a/official/c20788863.lua +++ b/official/c20788863.lua @@ -31,16 +31,16 @@ function s.initial_effect(c) e3:SetOperation(s.drop2) c:RegisterEffect(e3) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x119) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_SALAMANGREAT) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.gyfilter(c) - return c:IsMonster() and c:IsSetCard(0x119) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_SALAMANGREAT) and c:IsAbleToGrave() end function s.drtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -59,7 +59,7 @@ function s.drop1(e,tp,eg,ep,ev,re,r,rp) end end function s.lkfilter(c) - return c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsReincarnationSummoned() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsReincarnationSummoned() end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_MZONE,0,1,nil) @@ -74,4 +74,4 @@ function s.drop2(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c20797524.lua b/official/c20797524.lua index a7d05f9df0..777b00490d 100644 --- a/official/c20797524.lua +++ b/official/c20797524.lua @@ -1,4 +1,5 @@ --ヴィークラー +--Tricular local s,id=GetID() function s.initial_effect(c) --special summon @@ -21,14 +22,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20799347.lua b/official/c20799347.lua index 8dbf660d79..8e45c9209f 100644 --- a/official/c20799347.lua +++ b/official/c20799347.lua @@ -1,7 +1,6 @@ --電脳堺嫦-兎々 ---Datascape Rabbit - Tutu +--Virtual World Oto-Hime - Toutou --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Summon with no tribute @@ -39,7 +38,7 @@ function s.tgfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -55,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_ADD_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -63,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) --Restricted to level/rank 3+ monsters @@ -74,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end diff --git a/official/c20802187.lua b/official/c20802187.lua index 0aeb2acfb8..f21ad62e07 100644 --- a/official/c20802187.lua +++ b/official/c20802187.lua @@ -1,4 +1,5 @@ --スピリット変換装置 +--Spirit Converter local s,id=GetID() function s.initial_effect(c) --Activate @@ -82,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c20822520.lua b/official/c20822520.lua index 79bd9a753f..9fff883039 100644 --- a/official/c20822520.lua +++ b/official/c20822520.lua @@ -22,14 +22,14 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.checkop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e) then - Duel.RegisterFlagEffect(rp,id+1,RESET_PHASE+PHASE_END,0,1) + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and not re:GetHandler():IsSetCard(SET_SPELLBOOK) then + Duel.RegisterFlagEffect(rp,id+1,RESET_PHASE|PHASE_END,0,1) end end function s.cfilter(c) - return c:IsSpell() and c:IsSetCard(0x106e) + return c:IsSpell() and c:IsSetCard(SET_SPELLBOOK) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,5,nil) @@ -43,12 +43,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and not re:GetHandler():IsSetCard(0x106e) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and not re:GetHandler():IsSetCard(SET_SPELLBOOK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -60,7 +60,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) end function s.filter(c) - return c:IsSpell() and c:IsSetCard(0x106e) + return c:IsSpell() and c:IsSetCard(SET_SPELLBOOK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) @@ -79,4 +79,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleDeck(p) end -end +end \ No newline at end of file diff --git a/official/c20838380.lua b/official/c20838380.lua index 807bcbb060..ef5f705ba3 100644 --- a/official/c20838380.lua +++ b/official/c20838380.lua @@ -1,4 +1,5 @@ --シャーク・サッカー +--Shark Stickers local s,id=GetID() function s.initial_effect(c) --spsummon @@ -24,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + return c:IsFaceup() and c:IsControler(tp) and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -38,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c2084239.lua b/official/c2084239.lua index a56dca8ca6..36169f8a2a 100644 --- a/official/c2084239.lua +++ b/official/c2084239.lua @@ -20,4 +20,4 @@ end function s.tg(e,c) local lv=c:GetLevel() return lv>0 and lv<=2 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA) -end +end \ No newline at end of file diff --git a/official/c20849090.lua b/official/c20849090.lua index 7f7b0ae11e..2c4e770f4f 100644 --- a/official/c20849090.lua +++ b/official/c20849090.lua @@ -1,4 +1,5 @@ --Kozmo-フォアランナー +--Kozmo Forerunner local s,id=GetID() function s.initial_effect(c) --cannot be targeted @@ -13,7 +14,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCountLimit(1) @@ -33,7 +34,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.reccon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() end @@ -49,14 +50,14 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -70,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20855340.lua b/official/c20855340.lua index a368fca737..ff5247891e 100644 --- a/official/c20855340.lua +++ b/official/c20855340.lua @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousControler(tp) and e:GetHandler():IsReason(REASON_DESTROY) end function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,153,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,153,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,153,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c20858318.lua b/official/c20858318.lua index b2181cbb7a..c04ed78f66 100644 --- a/official/c20858318.lua +++ b/official/c20858318.lua @@ -27,14 +27,14 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) for tc in aux.Next(g) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.affected) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) @@ -43,7 +43,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,1) e2:SetCondition(s.rdcon) e2:SetValue(400) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.affected(e,c) @@ -51,5 +51,4 @@ function s.affected(e,c) end function s.rdcon(e) return Duel.GetAttacker():GetFlagEffect(id)~=0 and Duel.GetAttackTarget()==nil -end - +end \ No newline at end of file diff --git a/official/c20862918.lua b/official/c20862918.lua index c0a13d95d9..3ce8ee16a2 100644 --- a/official/c20862918.lua +++ b/official/c20862918.lua @@ -21,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.costfilter1(c,tp) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsMonster() and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c,c,tp) + and Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_HAND|LOCATION_MZONE,0,1,c,c,tp) end function s.costfilter2(c,tc,tp) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsMonster() and c:IsAbleToRemoveAsCost() @@ -37,13 +37,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=100 then return false end e:SetLabel(0) - return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(s.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) + return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingMatchingCard(s.costfilter1,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,s.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) + local g1=Duel.SelectMatchingCard(tp,s.costfilter1,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.costfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,g1:GetFirst(),g1:GetFirst(),tp) + local g2=Duel.SelectMatchingCard(tp,s.costfilter2,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,g1:GetFirst(),g1:GetFirst(),tp) g1:Merge(g2) Duel.SetTargetCard(g1) Duel.Remove(g1,POS_FACEUP,REASON_COST) @@ -59,5 +59,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c20871001.lua b/official/c20871001.lua index 521f66b6f6..35dedfdb8a 100644 --- a/official/c20871001.lua +++ b/official/c20871001.lua @@ -1,4 +1,5 @@ --ブルー・ポーション +--Blue Medicine local s,id=GetID() function s.initial_effect(c) --recover @@ -20,4 +21,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2088870.lua b/official/c2088870.lua index 2269a168cc..7ecb421353 100644 --- a/official/c2088870.lua +++ b/official/c2088870.lua @@ -18,9 +18,9 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.filter(c) - return c:IsFaceup() and not (c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)) + return c:IsFaceup() and not (c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE)) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,8 +32,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end function s.vfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.vfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*500 -end +end \ No newline at end of file diff --git a/official/c2089016.lua b/official/c2089016.lua index 8f41072f32..8c00f58a0b 100644 --- a/official/c2089016.lua +++ b/official/c2089016.lua @@ -83,4 +83,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end -end +end \ No newline at end of file diff --git a/official/c20899496.lua b/official/c20899496.lua index 39844c9666..2f464a74c9 100644 --- a/official/c20899496.lua +++ b/official/c20899496.lua @@ -1,5 +1,5 @@ --天龍雪獄 ---A Draconian Prison of Snow and Sky +--Ice Dragon's Prison --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -40,12 +40,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c20904475.lua b/official/c20904475.lua index b79eb036a7..85fa78a218 100644 --- a/official/c20904475.lua +++ b/official/c20904475.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c2091298.lua b/official/c2091298.lua index 3f97804652..c8fcd74696 100644 --- a/official/c2091298.lua +++ b/official/c2091298.lua @@ -1,9 +1,9 @@ --セイクリッド・ビーハイブ ---Constellar Praespe +--Constellar Praesepe local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x53),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CONSTELLAR),4,2) c:EnableReviveLimit() --attack up local e1=Effect.CreateEffect(c) @@ -16,22 +16,18 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.condition(e,tp,eg,ep,ev,re,r,rp) local phase=Duel.GetCurrentPhase() if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsSetCard(0x53) and tc:IsRelateToBattle() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return tc and tc:IsFaceup() and tc:IsSetCard(SET_CONSTELLAR) and tc:IsRelateToBattle() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -40,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c20920083.lua b/official/c20920083.lua index b8eb9f97dd..f543f691fa 100644 --- a/official/c20920083.lua +++ b/official/c20920083.lua @@ -65,5 +65,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c20932152.lua b/official/c20932152.lua index 5ae16d15ea..16779e1795 100644 --- a/official/c20932152.lua +++ b/official/c20932152.lua @@ -1,4 +1,5 @@ --クイック・シンクロン +--Quickdraw Synchron local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,7 +27,7 @@ function s.initial_effect(c) end function s.synlimit(e,c) if not c then return false end - return not c:ListsArchetypeAsMaterial(0x1017) + return not c:ListsArchetypeAsMaterial(SET_SYNCHRON) end function s.spfilter(c) return c:IsMonster() and c:IsAbleToGraveAsCost() @@ -41,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,c) Duel.SendtoGrave(g,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c20934683.lua b/official/c20934683.lua index 59814189a6..93f22d3f83 100644 --- a/official/c20934683.lua +++ b/official/c20934683.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.gysptg) e2:SetOperation(s.gyspop) c:RegisterEffect(e2) diff --git a/official/c20934852.lua b/official/c20934852.lua index 111897a760..a935db6624 100644 --- a/official/c20934852.lua +++ b/official/c20934852.lua @@ -1,12 +1,12 @@ --- 海晶乙女アクア・アルゴノート --- Marincess Aqua Argonaut --- Scripted by Hatter +--海晶乙女アクア・アルゴノート +--Marincess Aqua Argonaut +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2+ WATER monsters + --2+ WATER monsters Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),2) - -- Attack target limit + --Attack target limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(function(e,c)return c~=e:GetHandler()end) c:RegisterEffect(e1) - -- Return to hand + --Return to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Special Summon and negate + --Special Summon and negate local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE) diff --git a/official/c20936251.lua b/official/c20936251.lua index 56d4201319..4d0fd43c28 100644 --- a/official/c20936251.lua +++ b/official/c20936251.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x16b} +s.listed_series={SET_NUMEROUNIOUS} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x16b),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMEROUNIOUS),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end @@ -27,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(sg,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c20938824.lua b/official/c20938824.lua index ecc4a88d61..a20600518c 100644 --- a/official/c20938824.lua +++ b/official/c20938824.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetCode(EVENT_REMOVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.PayLPCost(300)) + e3:SetCost(Cost.PayLP(300)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c20939559.lua b/official/c20939559.lua index 6f883c4956..3d7bf792c6 100644 --- a/official/c20939559.lua +++ b/official/c20939559.lua @@ -1,4 +1,5 @@ --闇の住人シャドウキラー +--Shadowslayer local s,id=GetID() function s.initial_effect(c) --direct attack @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.con(e) return not Duel.IsExistingMatchingCard(Card.IsAttackPos,e:GetHandler():GetControler(),0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c20951752.lua b/official/c20951752.lua index 08f2ba2ba4..622af43d25 100644 --- a/official/c20951752.lua +++ b/official/c20951752.lua @@ -90,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=g:Select(tp,1,e:GetLabel(),nil) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2095764.lua b/official/c2095764.lua index 3470ac0f5c..cc3a1f619c 100644 --- a/official/c2095764.lua +++ b/official/c2095764.lua @@ -1,6 +1,5 @@ --水竜星-ビシキ --Bixi, Water of the Yang Zing - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Yang Zing" monster from deck @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1) e2:SetCondition(s.sccon) e2:SetTarget(s.sctg) @@ -37,15 +36,14 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x9e} - +s.listed_series={SET_YANG_ZING} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -59,19 +57,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9e),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_YANG_ZING),tp,LOCATION_MZONE,0,nil) return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9e),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_YANG_ZING),tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -92,9 +88,9 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) + return te:IsTrapEffect() end \ No newline at end of file diff --git a/official/c20960340.lua b/official/c20960340.lua index 037904ae2a..8e90469916 100644 --- a/official/c20960340.lua +++ b/official/c20960340.lua @@ -1,4 +1,5 @@ --クリスタル・アバター +--Krystal Avatar local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local atk=Duel.GetLP(tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -26,15 +27,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local atk=Duel.GetLP(tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end - c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT) + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,atk,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end + c:AddMonsterAttribute(TYPE_TRAP|TYPE_EFFECT) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) c:AddMonsterAttributeComplete() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --damage local e2=Effect.CreateEffect(c) @@ -45,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() local at=Duel.GetAttacker() @@ -67,4 +68,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,e:GetHandler():GetAttack(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c209710.lua b/official/c209710.lua index a48a86d744..9fe6cbad84 100644 --- a/official/c209710.lua +++ b/official/c209710.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.drcon) - e1:SetCost(s.drcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) @@ -19,10 +19,6 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_CYBERSE),tp,LOCATION_MZONE,0,2,e:GetHandler()) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -32,5 +28,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c20985997.lua b/official/c20985997.lua index d350f780ee..72bd3b0654 100644 --- a/official/c20985997.lua +++ b/official/c20985997.lua @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RDComplete() end end -end +end \ No newline at end of file diff --git a/official/c20989253.lua b/official/c20989253.lua index acce034863..65783a8be0 100644 --- a/official/c20989253.lua +++ b/official/c20989253.lua @@ -1,7 +1,6 @@ --アメイズメント・ファミリーフェイス ---Amazement Family Face +--Amazement Family Faces --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Equip this card to 1 monster @@ -32,7 +31,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_ADD_SETCODE) - e3:SetValue(0x15e) + e3:SetValue(SET_AMAZEMENT) e3:SetCondition(s.condition) c:RegisterEffect(e3) --control @@ -42,9 +41,9 @@ function s.initial_effect(c) e4:SetValue(function(e)return e:GetHandlerPlayer()end) c:RegisterEffect(e4) end -s.listed_series={0x15e,0x15f} +s.listed_series={SET_AMAZEMENT,SET_ATTRACTION} function s.eqcfilter(c,tp) - return c:IsSetCard(0x15f) and c:IsTrap() and c:IsControler(tp) + return c:IsSetCard(SET_ATTRACTION) and c:IsTrap() and c:IsControler(tp) end function s.eqfilter(c,e,tp) return aux.CheckStealEquip(c,e,tp) and c:GetEquipGroup():IsExists(s.eqcfilter,1,nil,tp) @@ -72,7 +71,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) else c:CancelToGrave(false) @@ -80,4 +79,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e) return e:GetHandler():GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c20994205.lua b/official/c20994205.lua index 4b54f96396..4ed00aa879 100644 --- a/official/c20994205.lua +++ b/official/c20994205.lua @@ -1,5 +1,5 @@ --ナンバーズ・エヴァイユ ---Numbers Evaille +--Numbers Eveil --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -13,16 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_EXTRA) + return c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_EXTRA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,0,nil)==0 end function s.xyzfilter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c.xyz_number + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and c.xyz_number end function s.spfilter(c,e,p,g) return Duel.GetLocationCountFromEx(p,p,g,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,p,false,false) @@ -53,12 +53,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(1,0) e1:SetCondition(function(e) return e:GetHandler():GetControler()==e:GetLabel() end) - e1:SetTarget(function(_,c) return not (c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)) end) + e1:SetTarget(function(_,c) return not (c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ)) end) e1:SetLabel(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) spc:RegisterEffect(e1,true) Duel.SpecialSummonComplete() spc:CompleteProcedure() if not spc:IsImmuneToEffect(e) then Duel.Overlay(spc,mg) end end -end +end \ No newline at end of file diff --git a/official/c2099841.lua b/official/c2099841.lua index a03a85d1b6..5273186332 100644 --- a/official/c2099841.lua +++ b/official/c2099841.lua @@ -23,7 +23,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c21007444.lua b/official/c21007444.lua index e7b0f07ce8..d2392d44ba 100644 --- a/official/c21007444.lua +++ b/official/c21007444.lua @@ -1,4 +1,5 @@ --諸刃の活人剣術 +--Double-Edged Sword Technique local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -38,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local fid=e:GetHandler():GetFieldID() for tc in aux.Next(sg) do if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end end Duel.SpecialSummonComplete() @@ -47,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetCondition(s.descon) e1:SetOperation(s.desop) @@ -84,4 +85,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tg2 and og:IsContains(tg2) then dam=dam+at2 end if dam~=0 then Duel.Damage(tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c21011044.lua b/official/c21011044.lua index a2c6a00dbf..0bf6335373 100644 --- a/official/c21011044.lua +++ b/official/c21011044.lua @@ -53,6 +53,6 @@ function s.sameatt(c,att) end function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE) end \ No newline at end of file diff --git a/official/c21015833.lua b/official/c21015833.lua index 02ae970e44..1bc15c35ea 100644 --- a/official/c21015833.lua +++ b/official/c21015833.lua @@ -1,4 +1,5 @@ --隼の騎士 +--Hayabusa Knight local s,id=GetID() function s.initial_effect(c) --double attack @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c21044178.lua b/official/c21044178.lua index aeea81441c..ce143a3c6a 100644 --- a/official/c21044178.lua +++ b/official/c21044178.lua @@ -1,4 +1,5 @@ --深淵に潜む者 +--Abyss Dweller local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,17 +23,13 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_DRAW_PHASE) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.atkcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -41,9 +38,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) return re:GetActivateLocation()==LOCATION_GRAVE -end +end \ No newline at end of file diff --git a/official/c21050476.lua b/official/c21050476.lua index f79fe640ee..1ff09d8be2 100644 --- a/official/c21050476.lua +++ b/official/c21050476.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_HAND) e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfRevealCost) + e3:SetCost(Cost.SelfReveal) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -33,7 +33,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.SelfBanishCost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.settg) e4:SetOperation(s.setop) c:RegisterEffect(e4) diff --git a/official/c21051146.lua b/official/c21051146.lua index 825cb61867..b2c8236e6d 100644 --- a/official/c21051146.lua +++ b/official/c21051146.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) end s.counter_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -54,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21051977.lua b/official/c21051977.lua index f357797694..948076557c 100644 --- a/official/c21051977.lua +++ b/official/c21051977.lua @@ -1,4 +1,5 @@ --コロボックリ +--Acorno local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c21056275.lua b/official/c21056275.lua index 7900e4aeba..21dcdfbb27 100644 --- a/official/c21056275.lua +++ b/official/c21056275.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DESTROYED) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.thcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c21057444.lua b/official/c21057444.lua index 2d4ec4e1ee..e0bbd890fe 100644 --- a/official/c21057444.lua +++ b/official/c21057444.lua @@ -1,9 +1,9 @@ --- 海晶乙女スプリンガール --- Marincess Springirl --- Scripted by Hatter +--海晶乙女スプリンガール +--Marincess Springirl +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon itself from the hand + --Special Summon itself from the hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Send cards from the top of your Deck to the GY + --Send cards from the top of your Deck to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE) diff --git a/official/c2106266.lua b/official/c2106266.lua index b157c6136b..94e834586d 100644 --- a/official/c2106266.lua +++ b/official/c2106266.lua @@ -37,13 +37,13 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={CARD_GAIA_CHAMPION} -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} function s.actcon(e) local tp=e:GetHandlerPlayer() return Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_GAIA_CHAMPION),tp,LOCATION_MZONE,0,1,nil) end function s.cfilter1(c) - return c:IsSetCard(0xbd) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_GAIA_THE_FIERCE_KNIGHT) and c:IsMonster() and not c:IsPublic() end function s.thcost1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND,0,1,nil) end @@ -78,7 +78,7 @@ function s.thcost2(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.thfilter2(c) - return c:IsSetCard(0xbd) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GAIA_THE_FIERCE_KNIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -91,4 +91,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c21065189.lua b/official/c21065189.lua index 4ea31853e5..c261312c9a 100644 --- a/official/c21065189.lua +++ b/official/c21065189.lua @@ -1,5 +1,5 @@ --ファイアウォール・X・ドラゴン ---Firewall X Dragon +--Firewall eXceed Dragon --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -21,13 +21,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.atkfilter(c,xc) return c:IsFaceup() and c:IsLinkMonster() and c:GetLinkedGroup():IsContains(xc) @@ -36,10 +36,6 @@ function s.atkval(e,c) local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil,c) return g:GetSum(Card.GetLink)*500 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.spfilter(c,e,tp,ec) local zone=ec:GetToBeLinkedZone(c,tp) return zone~=0 and c:IsLinkMonster() and c:IsRace(RACE_CYBERSE) and c:GetLink()==4 @@ -68,13 +64,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e2:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c21070956.lua b/official/c21070956.lua index 1bc5f68358..10e1d663e6 100644 --- a/official/c21070956.lua +++ b/official/c21070956.lua @@ -1,4 +1,5 @@ --生贄の祭壇 +--Altar for Tribute local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21074344.lua b/official/c21074344.lua index 1e3438bbc7..0af0bf8cac 100644 --- a/official/c21074344.lua +++ b/official/c21074344.lua @@ -1,4 +1,5 @@ --緑光の宣告者 +--Herald of Green Light local s,id=GetID() function s.initial_effect(c) --Negate @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return ep~=tp and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.costfilter(c) @@ -42,4 +43,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21076084.lua b/official/c21076084.lua index 06e3a4bba8..e0b35900ae 100644 --- a/official/c21076084.lua +++ b/official/c21076084.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) @@ -19,12 +19,12 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local gc=#g @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRICKSTAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21088856.lua b/official/c21088856.lua index 013ffc517e..fc68918e5c 100644 --- a/official/c21088856.lua +++ b/official/c21088856.lua @@ -24,10 +24,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) else Duel.Recover(tp,atk,REASON_EFFECT) end Duel.ShuffleExtra(1-tp) -end +end \ No newline at end of file diff --git a/official/c21105106.lua b/official/c21105106.lua index f205a09910..eaafe9f6e1 100644 --- a/official/c21105106.lua +++ b/official/c21105106.lua @@ -59,7 +59,7 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) diff --git a/official/c2111707.lua b/official/c2111707.lua index 9e66e0b669..250b0faea5 100644 --- a/official/c2111707.lua +++ b/official/c2111707.lua @@ -22,14 +22,14 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) + return not e:GetHandler():IsLocation(LOCATION_EXTRA|LOCATION_GRAVE) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsSpellTrap() @@ -46,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21123811.lua b/official/c21123811.lua index 3346c8e144..d890c51650 100644 --- a/official/c21123811.lua +++ b/official/c21123811.lua @@ -69,7 +69,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(c) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -101,13 +101,13 @@ function s.dsop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE,1) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c21140872.lua b/official/c21140872.lua index 5884ded1de..3b2f5597d9 100644 --- a/official/c21140872.lua +++ b/official/c21140872.lua @@ -49,11 +49,11 @@ function s.initial_effect(c) e3:SetLabelObject(e4) c:RegisterEffect(e3) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} s.listed_names={CARD_NECROVALLEY} -s.material_setcode=0x3b +s.material_setcode=SET_RED_EYES function s.eqcon(e) - return Duel.GetAttacker():IsSetCard(0x3b) + return Duel.GetAttacker():IsSetCard(SET_RED_EYES) end function s.eqfilter(c,tp) return c:IsRace(RACE_WARRIOR) and c:CheckUniqueOnField(tp) and c:IsMonster() and not c:IsForbidden() @@ -74,7 +74,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(c) tc:RegisterEffect(e1) @@ -83,7 +83,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(200) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -149,4 +149,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) sg=sg:Select(tp,ft,ft,nil) end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c21142671.lua b/official/c21142671.lua index 9517d29e81..79fe24a2f2 100644 --- a/official/c21142671.lua +++ b/official/c21142671.lua @@ -52,4 +52,4 @@ function s.spdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c21143940.lua b/official/c21143940.lua index 3f16ca9e81..754fc8b514 100644 --- a/official/c21143940.lua +++ b/official/c21143940.lua @@ -13,16 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa008,0x8} +s.listed_series={SET_MASKED_HERO,SET_HERO} function s.tfilter(c,att,e,tp,mc) - return c:IsSetCard(0xa008) and c:IsAttribute(att) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_MASKED_HERO) and c:IsAttribute(att) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x8) + return c:IsFaceup() and c:IsSetCard(SET_HERO) and Duel.IsExistingMatchingCard(s.tfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetAttribute(),e,tp,c) end function s.chkfilter(c,att) - return c:IsFaceup() and c:IsSetCard(0x8) and c:IsAttribute(att) + return c:IsFaceup() and c:IsSetCard(SET_HERO) and c:IsAttribute(att) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.chkfilter(chkc,e:GetLabel()) end @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) sg:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c21147203.lua b/official/c21147203.lua index cbb1d18cf3..fc1e0ebf8c 100644 --- a/official/c21147203.lua +++ b/official/c21147203.lua @@ -1,4 +1,4 @@ ---Japanese name +--ミニマリアン --Minimalian --scripted by Naim local s,id=GetID() @@ -42,7 +42,7 @@ end function s.selfspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function s.deckspcostfilter(c,e,tp) diff --git a/official/c21155323.lua b/official/c21155323.lua index 9d70ebd81c..46b23d225c 100644 --- a/official/c21155323.lua +++ b/official/c21155323.lua @@ -12,4 +12,4 @@ function s.initial_effect(c) e1:SetCondition(Gemini.EffectStatusCondition) e1:SetValue(2100) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c21159309.lua b/official/c21159309.lua index 27d67a0006..2acdc03882 100644 --- a/official/c21159309.lua +++ b/official/c21159309.lua @@ -1,4 +1,5 @@ --救世竜 セイヴァー・ドラゴン +--Majestic Dragon local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -8,8 +9,8 @@ function s.initial_effect(c) e1:SetValue(s.synlimit) c:RegisterEffect(e1) end -s.listed_series={0x3f} +s.listed_series={SET_MAJESTIC} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x3f) -end + return not c:IsSetCard(SET_MAJESTIC) +end \ No newline at end of file diff --git a/official/c21175632.lua b/official/c21175632.lua index e7128d470b..870d21b55d 100644 --- a/official/c21175632.lua +++ b/official/c21175632.lua @@ -1,8 +1,9 @@ --聖女ジャンヌ +--St. Joan local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,84080938,57579381) end -s.material_setcode=0xef +s.material_setcode=SET_DARKLORD \ No newline at end of file diff --git a/official/c21179143.lua b/official/c21179143.lua index 49f26ec869..957e613875 100644 --- a/official/c21179143.lua +++ b/official/c21179143.lua @@ -19,9 +19,9 @@ function s.cfilter(c) return c:IsSetCard(SET_REPTILIANNE) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c21187631.lua b/official/c21187631.lua index 12bf61f15d..d6c84ce844 100644 --- a/official/c21187631.lua +++ b/official/c21187631.lua @@ -30,13 +30,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:IsSummonType(SUMMON_TYPE_SPECIAL) and not at:IsControler(tp) + return at:IsSpecialSummoned() and not at:IsControler(tp) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x103) and c:IsMonster() and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) and c:IsMonster() and c:IsAbleToHandAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c21200905.lua b/official/c21200905.lua index 261d523c5d..89f2b9e764 100644 --- a/official/c21200905.lua +++ b/official/c21200905.lua @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c21208154.lua b/official/c21208154.lua index 8f306a4799..58b3a847b8 100644 --- a/official/c21208154.lua +++ b/official/c21208154.lua @@ -59,7 +59,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -68,7 +68,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.turncon) e2:SetOperation(s.turnop) e2:SetLabelObject(e1) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) Duel.RegisterEffect(e2,tp) local descnum=tp==c:GetOwner() and 0 or 1 local e3=Effect.CreateEffect(c) @@ -79,7 +79,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(e2) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) c:RegisterEffect(e3) end function s.reset(e,tp,eg,ep,ev,re,r,rp) @@ -89,7 +89,7 @@ function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.turnop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel()+1 diff --git a/official/c21219755.lua b/official/c21219755.lua index eede901ffd..ee3b32a516 100644 --- a/official/c21219755.lua +++ b/official/c21219755.lua @@ -1,4 +1,5 @@ --破壊指輪 +--Destruction Ring local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RDComplete() end end -end +end \ No newline at end of file diff --git a/official/c21223277.lua b/official/c21223277.lua index 15e888e510..ae0348359a 100644 --- a/official/c21223277.lua +++ b/official/c21223277.lua @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.filter(c,e,tp,ec) return c:IsSetCard(SET_NOBLE_ARMS) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) diff --git a/official/c21225115.lua b/official/c21225115.lua index 76c5d36f9d..b8db4029c1 100644 --- a/official/c21225115.lua +++ b/official/c21225115.lua @@ -56,17 +56,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bc:RegisterEffect(e2) end end function s.damcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetBattleTarget()~=nil -end + return c:IsFusionSummoned() and c:GetBattleTarget()~=nil +end \ No newline at end of file diff --git a/official/c2122975.lua b/official/c2122975.lua index 99bac9c8c9..df7bf9e695 100644 --- a/official/c2122975.lua +++ b/official/c2122975.lua @@ -12,11 +12,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) then @@ -24,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_TO_GRAVE) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) re:GetHandler():RegisterEffect(e1) end end @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21237481.lua b/official/c21237481.lua index 195abf9de3..da72f17c7f 100644 --- a/official/c21237481.lua +++ b/official/c21237481.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(cg,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21249921.lua b/official/c21249921.lua index 7a6b5de63e..519fdbef83 100644 --- a/official/c21249921.lua +++ b/official/c21249921.lua @@ -28,15 +28,15 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsLevelBelow(3) and ec:IsSetCard(0x29) and ec:IsRace(RACE_DRAGON) + return ec:IsControler(tp) and ec:IsLevelBelow(3) and ec:IsSetCard(SET_DRAGUNITY) and ec:IsRace(RACE_DRAGON) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) - return c:IsLevelBelow(3) and c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() + return c:IsLevelBelow(3) and c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -72,7 +72,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c21250202.lua b/official/c21250202.lua index 4b1100e138..1f180a11e8 100644 --- a/official/c21250202.lua +++ b/official/c21250202.lua @@ -1,4 +1,5 @@ --オッドアイズ・ペルソナ・ドラゴン +--Odd-Eyes Persona Dragon local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -41,15 +42,15 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} s.listed_names={id} function s.regfilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsSetCard(0x99) + and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsSetCard(SET_ODD_EYES) end function s.regop1(e,tp,eg,ep,ev,re,r,rp) if rp~=tp and #eg==1 and eg:IsExists(s.regfilter,1,nil,tp) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1,ev) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1,ev) end end function s.regop2(e,tp,eg,ep,ev,re,r,rp) @@ -57,13 +58,13 @@ function s.regop2(e,tp,eg,ep,ev,re,r,rp) local chain_ct={c:GetFlagEffectLabel(id)} for i=1,#chain_ct do if chain_ct[i]==ev then - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1) return end end end function s.penfilter(c) - return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() + return c:IsFaceup() and c:IsSetCard(SET_ODD_EYES) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id+1)~=0 @@ -101,13 +102,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c21254443.lua b/official/c21254443.lua index 6fa9cb2a5d..43304d3ea0 100644 --- a/official/c21254443.lua +++ b/official/c21254443.lua @@ -14,18 +14,18 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.cfilter(c,ft) - return c:IsSetCard(0xfe) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsMonster() and c:IsAbleToRemoveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and (ft>1 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 and ft>0)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,ft) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,ft) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,ft) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) @@ -65,8 +65,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c21291696.lua b/official/c21291696.lua index f1818e7950..1010aacb0e 100644 --- a/official/c21291696.lua +++ b/official/c21291696.lua @@ -87,7 +87,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c21293424.lua b/official/c21293424.lua index 33251158a0..7415c0c39c 100644 --- a/official/c21293424.lua +++ b/official/c21293424.lua @@ -54,7 +54,7 @@ function s.conttg(e,c) return c:IsSetCard(SET_GUNKAN) and c:IsSummonLocation(LOCATION_EXTRA) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()>0 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()>0 end function s.sfilter(c) return c:IsSetCard(SET_GUNKAN) and c:IsSpellTrap() and c:IsAbleToHand() diff --git a/official/c2129638.lua b/official/c2129638.lua index 82d63de810..d529c7f2af 100644 --- a/official/c2129638.lua +++ b/official/c2129638.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e7:SetOperation(s.rmop) c:RegisterEffect(e7) end -s.material_setcode=0xdd +s.material_setcode=SET_BLUE_EYES s.listed_names={CARD_BLUEEYES_W_DRAGON} function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION @@ -42,7 +42,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil) end function s.contactop(g) - Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,4 +59,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21296383.lua b/official/c21296383.lua index 7754e3d2e8..f3dc55923b 100644 --- a/official/c21296383.lua +++ b/official/c21296383.lua @@ -1,4 +1,5 @@ --ユニバード +--Unibird local s,id=GetID() function s.initial_effect(c) --spsummon @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21297224.lua b/official/c21297224.lua index 3306510670..c48ec76da0 100644 --- a/official/c21297224.lua +++ b/official/c21297224.lua @@ -1,4 +1,5 @@ --ヒステリック天使 +--Hysteric Fairy local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2130625.lua b/official/c2130625.lua index 1826580a50..cee39e281c 100644 --- a/official/c2130625.lua +++ b/official/c2130625.lua @@ -29,4 +29,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if gc>0 then Duel.Recover(p,500*gc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21313376.lua b/official/c21313376.lua index b6a9b3fdd3..dea37f26ca 100644 --- a/official/c21313376.lua +++ b/official/c21313376.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(aux.bdogcon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,10 +29,6 @@ s.xyz_number=14 function s.refcon(e,re,val,r,rp,rc) return (r&REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer() end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local atk=e:GetHandler():GetBattleTarget():GetBaseAttack() if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackBelow,atk),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,atk) end @@ -43,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local atk=e:GetHandler():GetBattleTarget():GetBaseAttack() local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsAttackBelow,atk),tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21323861.lua b/official/c21323861.lua index a02f1105cc..9841ea7e91 100644 --- a/official/c21323861.lua +++ b/official/c21323861.lua @@ -1,4 +1,5 @@ --酸の嵐 +--Acid Rain local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c213326.lua b/official/c213326.lua index 05cfd52bd3..fb991c0f05 100644 --- a/official/c213326.lua +++ b/official/c213326.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c) - return c:IsSetCard(0x3008) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c2133971.lua b/official/c2133971.lua index 9b0d03d221..6e0e577a4f 100644 --- a/official/c2133971.lua +++ b/official/c2133971.lua @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21340051.lua b/official/c21340051.lua index 5c603bb2af..bb1d6d6b50 100644 --- a/official/c21340051.lua +++ b/official/c21340051.lua @@ -1,4 +1,5 @@ --ボアソルジャー +--Boar Soldier local s,id=GetID() function s.initial_effect(c) --self destroy @@ -30,4 +31,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.con(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c2134346.lua b/official/c2134346.lua index fc3f6eb4dc..3f3ff0fea4 100644 --- a/official/c2134346.lua +++ b/official/c2134346.lua @@ -15,4 +15,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetValue(1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c21347668.lua b/official/c21347668.lua index 9a0fab904b..a4acb91984 100644 --- a/official/c21347668.lua +++ b/official/c21347668.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and e:GetHandler():IsSetCard(SET_PURRELY) end) e2:SetTarget(s.drwtg) @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)>0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then diff --git a/official/c21347810.lua b/official/c21347810.lua index 7513c99eef..707deb53fa 100644 --- a/official/c21347810.lua +++ b/official/c21347810.lua @@ -1,4 +1,5 @@ --レインボー・フラワー +--Rainbow Flower local s,id=GetID() function s.initial_effect(c) --direct attack @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c21350571.lua b/official/c21350571.lua index 90db70650c..43b4c3d501 100644 --- a/official/c21350571.lua +++ b/official/c21350571.lua @@ -1,4 +1,5 @@ --幻獣の角 +--Horn of the Phantom Beast local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,17 +9,14 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) + return c:IsFaceup() and c:IsRace(RACE_BEAST|RACE_BEASTWARRIOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -31,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --draw local e1=Effect.CreateEffect(c) @@ -44,14 +42,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.drcon) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Atkup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(800) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -59,14 +57,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.eqlimit(e,c) - return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) + return c:IsRace(RACE_BEAST|RACE_BEASTWARRIOR) end function s.drfilter(c,rc) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc @@ -84,4 +82,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21351206.lua b/official/c21351206.lua index 5b0e252e08..07ad694103 100644 --- a/official/c21351206.lua +++ b/official/c21351206.lua @@ -39,10 +39,10 @@ function s.initial_effect(c) end s.listed_names={id} --Lists "Noble Arms" archetype -s.listed_series={0x207a} +s.listed_series={SET_NOBLE_ARMS} --Check for FIRE warrior monster (except for this card's name) or "Noble Arms" card function s.tgfilter(c) - return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(0x207a)) and c:IsAbleToGrave() and not c:IsCode(id) + return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(SET_NOBLE_ARMS)) and c:IsAbleToGrave() and not c:IsCode(id) end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -81,7 +81,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -90,4 +90,4 @@ end --Target is valid function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c21362970.lua b/official/c21362970.lua index a61541537a..00734b598e 100644 --- a/official/c21362970.lua +++ b/official/c21362970.lua @@ -1,4 +1,5 @@ --ビーストライカー +--Beast Striker local s,id=GetID() function s.initial_effect(c) --spsummon @@ -16,7 +17,7 @@ end s.listed_names={94878265} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsCode(94878265) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21368442.lua b/official/c21368442.lua index 4ffcf713e9..376553cf96 100644 --- a/official/c21368442.lua +++ b/official/c21368442.lua @@ -1,5 +1,5 @@ --S-Force グラビティーノ ---Security Force Gravitino +--S-Force Gravitino --Scripted by edo9300 local s,id=GetID() function s.initial_effect(c) diff --git a/official/c2137678.lua b/official/c2137678.lua index 887d441d30..b8513c0e88 100644 --- a/official/c2137678.lua +++ b/official/c2137678.lua @@ -21,9 +21,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.val(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x13),0,LOCATION_MZONE,LOCATION_MZONE,c)*100 + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_MEKLORD),0,LOCATION_MZONE,LOCATION_MZONE,c)*100 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end @@ -37,8 +37,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c21377582.lua b/official/c21377582.lua index f1498d1aa3..34a50dcbe9 100644 --- a/official/c21377582.lua +++ b/official/c21377582.lua @@ -45,14 +45,13 @@ end function s.valcheck(e,c) local g=c:GetMaterial() local typ=0 - local tc=g:GetFirst() - for tc in aux.Next(g) do - typ=typ|(tc:GetOriginalType()&0x7) + for tc in g:Iter() do + typ=typ|(tc:GetOriginalType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) end e:SetLabel(typ) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -62,25 +61,25 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.efilter) e1:SetLabel(typ) c:RegisterEffect(e1) if typ&TYPE_MONSTER~=0 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end if typ&TYPE_SPELL~=0 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) end if typ&TYPE_TRAP~=0 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5)) end end function s.efilter(e,te) return te:IsActiveType(e:GetLabel()) and te:GetOwner()~=e:GetOwner() end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.costfilter(c) return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToRemoveAsCost() @@ -104,4 +103,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21390858.lua b/official/c21390858.lua index e699c4df15..c74e3064d7 100644 --- a/official/c21390858.lua +++ b/official/c21390858.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -90,4 +90,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c2139640.lua b/official/c2139640.lua index 0f298ed7b1..2754864ee3 100644 --- a/official/c2139640.lua +++ b/official/c2139640.lua @@ -1,7 +1,6 @@ --あまびえさん ---Amabie-San +--Amabie --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_RECOVER) e1:SetRange(LOCATION_HAND) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() end) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end) e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)if chk==0 then return not e:GetHandler():IsPublic()end end) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,300)end) @@ -19,4 +18,4 @@ function s.initial_effect(c) Duel.Recover(1-tp,300,REASON_EFFECT) end) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c21414674.lua b/official/c21414674.lua index 86fb3f8e3b..c91a048a4c 100644 --- a/official/c21414674.lua +++ b/official/c21414674.lua @@ -1,4 +1,5 @@ --プロミネンス・ハンド +--Prominence Hand local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,4 +18,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c21417692.lua b/official/c21417692.lua index 66d467a85d..1d8771ab87 100644 --- a/official/c21417692.lua +++ b/official/c21417692.lua @@ -1,4 +1,5 @@ --ダーク・エルフ +--Dark Elf local s,id=GetID() function s.initial_effect(c) --attack cost @@ -17,4 +18,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,1000) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c21420702.lua b/official/c21420702.lua index a425a9e234..03b97f181d 100644 --- a/official/c21420702.lua +++ b/official/c21420702.lua @@ -1,4 +1,5 @@ --ブレイズ・キャノン-トライデント +--Tri-Blaze Accelerator local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,7 +37,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.disfilter(c) @@ -63,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,500,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c21435914.lua b/official/c21435914.lua index 7f78ecc302..ea7c5fc55d 100644 --- a/official/c21435914.lua +++ b/official/c21435914.lua @@ -1,4 +1,5 @@ --冥界濁龍 ドラゴキュートス +--Dragocytos Corrupted Nethersoul Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.damcon) e3:SetTarget(s.damtg) @@ -43,11 +44,11 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:HasNonZeroAttack() end @@ -64,9 +65,9 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(atk/2) tc:RegisterEffect(e1) Duel.Damage(1-tp,atk/2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21438286.lua b/official/c21438286.lua index 1cc1f8d04b..ed398ada4b 100644 --- a/official/c21438286.lua +++ b/official/c21438286.lua @@ -1,7 +1,6 @@ --デーモンの杖 ---Archfiend Staff of Despair +--Archfiend's Staff of Despair --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,0) @@ -23,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.retcon) - e2:SetCost(s.retcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.rettg) e2:SetOperation(s.retop) c:RegisterEffect(e2) @@ -40,7 +39,7 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e:SetType(EFFECT_TYPE_SINGLE) e:SetCode(EFFECT_UPDATE_ATTACK) e:SetValue(v) - e:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e) end end @@ -48,10 +47,6 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsLocation(LOCATION_GRAVE) and c:GetEquipTarget()~=nil end -function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToHand() end diff --git a/official/c21441617.lua b/official/c21441617.lua index ab096f0fdf..20c4368c20 100644 --- a/official/c21441617.lua +++ b/official/c21441617.lua @@ -2,7 +2,7 @@ --Orcust Cymbal Skeleton local s,id=GetID() function s.initial_effect(c) - -- special summon + --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetCondition(s.spcon1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCondition(s.spcon2) c:RegisterEffect(e2) end -s.listed_series={0x11b} +s.listed_series={SET_ORCUST} s.listed_names={id} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) @@ -31,7 +31,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_ORCUST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -52,10 +52,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c2144946.lua b/official/c2144946.lua index 0fbe9acb8c..5f6f600ea1 100644 --- a/official/c2144946.lua +++ b/official/c2144946.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FA)) e2:SetValue(2) e2:SetCondition(s.lvcon) c:RegisterEffect(e2) @@ -43,13 +43,12 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={id} -s.listed_series={0x107} +s.listed_series={SET_FA} function s.lvcon(e) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE) and c:IsPreviousControler(tp) and c:IsPreviousSetCard(0x107) + return c:IsReason(REASON_BATTLE) and c:IsPreviousControler(tp) and c:IsPreviousSetCard(SET_FA) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -62,14 +61,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.thfilter2(c) - return c:IsSetCard(0x107) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_FA) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -82,4 +81,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c21452275.lua b/official/c21452275.lua index ff82c57aa6..3875490799 100644 --- a/official/c21452275.lua +++ b/official/c21452275.lua @@ -1,4 +1,5 @@ --アロマポット +--Aroma Jar local s,id=GetID() function s.initial_effect(c) --flip @@ -29,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.indcon(e) return e:GetHandler():GetFlagEffect(id)~=0 @@ -46,4 +47,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21454943.lua b/official/c21454943.lua index f635f251b5..d0dfd317df 100644 --- a/official/c21454943.lua +++ b/official/c21454943.lua @@ -1,4 +1,5 @@ --サイコ・コマンダー +--Psychic Commander local s,id=GetID() function s.initial_effect(c) --atkdown @@ -47,7 +48,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end Duel.PayLPCost(tp,alp) e:SetLabel(-alp) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tc=e:GetLabelObject() @@ -62,10 +63,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c21466326.lua b/official/c21466326.lua index 09216dcd61..bb57132e4a 100644 --- a/official/c21466326.lua +++ b/official/c21466326.lua @@ -1,4 +1,5 @@ --残骸爆破 +--Blasting the Ruins local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21481146.lua b/official/c21481146.lua index 30fb4f40a4..a40e3d5e36 100644 --- a/official/c21481146.lua +++ b/official/c21481146.lua @@ -1,4 +1,5 @@ --閃光のバリア-シャイニング・フォース- +--Radiant Mirror Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,3,nil,POS_FACEUP_ATTACK) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(Card.IsPosition,tp,0,LOCATION_MZONE,3,nil,POS_FACEUP_ATTACK) end function s.filter(c) return c:IsAttackPos() @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21488686.lua b/official/c21488686.lua index 121dba27aa..a631556696 100644 --- a/official/c21488686.lua +++ b/official/c21488686.lua @@ -1,4 +1,5 @@ --サイコ・ヒーリング +--Psychic Rejuvenation local s,id=GetID() function s.initial_effect(c) --recover @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local rec=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil)*1000 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,rec,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2148918.lua b/official/c2148918.lua index cc8f084075..9e5b86e250 100644 --- a/official/c2148918.lua +++ b/official/c2148918.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true) @@ -38,7 +38,7 @@ function s.tgfilter(c,e,tp) return c:IsFaceup() and c:IsControler(tp) and (not e or c:IsRelateToEffect(e)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.tgfilter,1,nil,nil,1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2b),tp,LOCATION_MZONE,0,1,nil) + return eg:IsExists(s.tgfilter,1,nil,nil,1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NINJA),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -61,4 +61,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) return function() s.spop(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c21495657.lua b/official/c21495657.lua index 01e58a4cbb..f525ae0faa 100644 --- a/official/c21495657.lua +++ b/official/c21495657.lua @@ -1,69 +1,67 @@ --宝竜星-セフィラフウシ --Zefraxi, Treasure of the Yang Zing - local s,id=GetID() function s.initial_effect(c) - --Enable pendulum summon + --Pendulum Summon procedure Pendulum.AddProcedure(c) - --Cannot pendulum summon monsters, except "Zefra" and "Yang Zing" monsters + --You cannot Pendulum Summon monsters, except "Yang Zing" and "Zefra" monsters + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetRange(LOCATION_PZONE) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return sumtype&SUMMON_TYPE_PENDULUM==SUMMON_TYPE_PENDULUM and not c:IsSetCard({SET_YANG_ZING,SET_ZEFRA}) end) + c:RegisterEffect(e1) + --Treat 1 "Yang Zing" or "Zefra" monster you control, except "Zefraxi, Treasure of the Yang Zing", as a Tuner this turn local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_PZONE) - e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) - e2:SetTargetRange(1,0) - e2:SetTarget(s.splimit) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetCondition(s.tunercon) + e2:SetTarget(s.tunertg) + e2:SetOperation(s.tunerop) c:RegisterEffect(e2) - --Treat 1 "Zefra" or "Yang Zing" monster as a tuner - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetCountLimit(1,id) - e3:SetCondition(s.condition) - e3:SetTarget(s.target) - e3:SetOperation(s.operation) - c:RegisterEffect(e3) end -s.listed_series={0x9e,0xc4} +s.listed_series={SET_YANG_ZING,SET_ZEFRA} s.listed_names={id} - -function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9e) or c:IsSetCard(0xc4) then return false end - return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():IsPreviousLocation(LOCATION_DECK) +function s.tunercon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return c:IsPendulumSummoned() or c:IsSummonLocation(LOCATION_DECK) end -function s.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x9e) or c:IsSetCard(0xc4)) and not c:IsType(TYPE_TUNER) and not c:IsCode(id) +function s.tunerfilter(c) + return c:IsSetCard({SET_YANG_ZING,SET_ZEFRA}) and not c:IsType(TYPE_TUNER) and c:IsFaceup() and not c:IsCode(id) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) +function s.tunertg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tunerfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tunerfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.tunerfilter,tp,LOCATION_MZONE,0,1,1,nil) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.tunerop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then + --That face-up monster is treated as a Tuner this turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetValue(TYPE_TUNER) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end if c:IsRelateToEffect(e) then - --Return it to deck if it leaves the field + --Place this card on the bottom of the Deck when it leaves the field local e2=Effect.CreateEffect(c) e2:SetDescription(3301) e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetValue(LOCATION_DECKBOT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e2) end -end \ No newline at end of file +end diff --git a/official/c21496848.lua b/official/c21496848.lua index 301e4a0e3f..bb924b44a3 100644 --- a/official/c21496848.lua +++ b/official/c21496848.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5)) @@ -26,7 +26,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsChainDisablable(0) and Duel.SelectYesNo(1-tp,aux.Stringid(id,4)) then - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) return end local ty=TYPE_MONSTER diff --git a/official/c21501505.lua b/official/c21501505.lua index fe32bab60a..7b8a9094fd 100644 --- a/official/c21501505.lua +++ b/official/c21501505.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,10 +26,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(tc) return tc:IsOnField() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,ct) return Duel.CheckChainTarget(ct,c) end @@ -55,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,Group.FromCards(tc)) end -end +end \ No newline at end of file diff --git a/official/c21502796.lua b/official/c21502796.lua index c1e1496e55..d69a4beffd 100644 --- a/official/c21502796.lua +++ b/official/c21502796.lua @@ -1,4 +1,5 @@ --ライトロード・ハンター ライコウ +--Ryko, Lightsworn Hunter local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) end Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21507589.lua b/official/c21507589.lua index f59661763e..669d33f0cb 100644 --- a/official/c21507589.lua +++ b/official/c21507589.lua @@ -1,4 +1,5 @@ --フィッシュアンドバックス +--Fish and Swaps local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,10 +15,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) and c:IsAbleToHand() + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_AQUA|RACE_SEASERPENT) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc) end @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c21516908.lua b/official/c21516908.lua index 19ef6da649..7f868efba7 100644 --- a/official/c21516908.lua +++ b/official/c21516908.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.lvcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.lvtg) e1:SetOperation(s.lvop) c:RegisterEffect(e1) @@ -27,11 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x2016} -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_SPEEDROID} function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end end @@ -43,12 +39,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.hsfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) + return c:IsFaceup() and c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.hsfilter,tp,LOCATION_MZONE,0,1,nil) @@ -73,6 +69,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c21521304.lua b/official/c21521304.lua index 86775e793d..c87108b4a1 100644 --- a/official/c21521304.lua +++ b/official/c21521304.lua @@ -2,7 +2,7 @@ --Number 39: Utopia Beyond local s,id=GetID() function s.initial_effect(c) - c:AddSetcodesRule(id,true,0x107f) --easier workaround so that Utopia Beyond (Anime) doesn't get the setcode + c:AddSetcodesRule(id,true,SET_UTOPIA) --easier workaround so that Utopia Beyond (Anime) doesn't get the setcode --xyz summon Xyz.AddProcedure(c,nil,6,2) c:EnableReviveLimit() @@ -24,15 +24,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} s.xyz_number=39 function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) @@ -42,19 +42,15 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rmfilter(c,ft) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAbleToRemove() and (ft>0 or c:GetSequence()<5) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UTOPIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c21524779.lua b/official/c21524779.lua index 065727687e..b43bc3c5b6 100644 --- a/official/c21524779.lua +++ b/official/c21524779.lua @@ -1,4 +1,5 @@ --OKaサンダー +--Mahunder local s,id=GetID() function s.initial_effect(c) --summon @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Summon(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c21558682.lua b/official/c21558682.lua index 79facc7fef..c7c6b58bf3 100644 --- a/official/c21558682.lua +++ b/official/c21558682.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) end s.listed_names={31709826} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()~=nil + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()~=nil end function s.filter(c,atg) return c:IsFaceup() and c:IsCode(31709826) and atg:IsContains(c) @@ -41,4 +41,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetAttacker():IsImmuneToEffect(e) then Duel.ChangeAttackTarget(tc) end -end +end \ No newline at end of file diff --git a/official/c21565445.lua b/official/c21565445.lua index 4e5f58ff18..0ba82c4b15 100644 --- a/official/c21565445.lua +++ b/official/c21565445.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x77} +s.listed_series={SET_ATLANTEAN} s.listed_names={id} function s.cfilter(c,tp) - return c:IsSetCard(0x77) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ATLANTEAN) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,7 +39,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x77) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_ATLANTEAN) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,11 +54,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x77) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ATLANTEAN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21570001.lua b/official/c21570001.lua index 4cc5555194..48e8254c1c 100644 --- a/official/c21570001.lua +++ b/official/c21570001.lua @@ -1,5 +1,5 @@ --新世壊 ---New Clear World +--Clear New World --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -43,14 +43,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c21576077.lua b/official/c21576077.lua index 6867a7964f..c592998378 100644 --- a/official/c21576077.lua +++ b/official/c21576077.lua @@ -1,5 +1,5 @@ --喰光の竜輝巧 ---Draitron Eclipse +--Drytron Eclipse --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x151) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_DRYTRON) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -45,9 +45,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -s.atkfilter=aux.FaceupFilter(Card.IsSetCard,0x151) +s.atkfilter=aux.FaceupFilter(Card.IsSetCard,SET_DRYTRON) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x151) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_DRYTRON) end if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) @@ -58,8 +58,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetValue(2000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c21579049.lua b/official/c21579049.lua index b695842cb9..93c2d76432 100644 --- a/official/c21579049.lua +++ b/official/c21579049.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -110,4 +110,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2158562.lua b/official/c2158562.lua index fc810d0ad3..49adc86fd7 100644 --- a/official/c2158562.lua +++ b/official/c2158562.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c21593977.lua b/official/c21593977.lua index 8e9c9f32d3..baa728bd6d 100644 --- a/official/c21593977.lua +++ b/official/c21593977.lua @@ -24,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_END) e1:SetDescription(aux.Stringid(id,0)) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c21597117.lua b/official/c21597117.lua index 0337362a23..1089d2ac4b 100644 --- a/official/c21597117.lua +++ b/official/c21597117.lua @@ -1,4 +1,5 @@ --ヒーロー見参 +--A Hero Emerges local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c21598948.lua b/official/c21598948.lua index 896dd70f26..3ecf83bee2 100644 --- a/official/c21598948.lua +++ b/official/c21598948.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c21607304.lua b/official/c21607304.lua index b3e7ee1166..303dffe4a7 100644 --- a/official/c21607304.lua +++ b/official/c21607304.lua @@ -1,4 +1,5 @@ --Subterror Behemoth Voltelluric +--Subterror Behemoth Voltelluric local s,id=GetID() function s.initial_effect(c) --flip @@ -45,8 +46,8 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local tct=1 - if Duel.GetTurnPlayer()~=tp then tct=2 - elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end + if Duel.IsTurnPlayer(1-tp) then tct=2 + elseif Duel.IsPhase(PHASE_END) then tct=3 end if tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,tct) end @@ -72,7 +73,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -80,4 +81,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c21620076.lua b/official/c21620076.lua index ccdd920cad..9489deeb98 100644 --- a/official/c21620076.lua +++ b/official/c21620076.lua @@ -1,4 +1,5 @@ --ペインペインター +--Pain Painter local s,id=GetID() function s.initial_effect(c) --alias @@ -41,13 +42,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e2:SetValue(s.synlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -55,4 +56,4 @@ end function s.synlimit(e,c) if not c then return false end return not c:IsRace(RACE_ZOMBIE) -end +end \ No newline at end of file diff --git a/official/c21623008.lua b/official/c21623008.lua index 872c628baa..7b64cd8b47 100644 --- a/official/c21623008.lua +++ b/official/c21623008.lua @@ -32,6 +32,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c21636650.lua b/official/c21636650.lua index fcb072bb52..51e0250cf3 100644 --- a/official/c21636650.lua +++ b/official/c21636650.lua @@ -31,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21637210.lua b/official/c21637210.lua index 33d19d8f4d..9f12281f6c 100644 --- a/official/c21637210.lua +++ b/official/c21637210.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c21648584.lua b/official/c21648584.lua index a63ed8c24a..71b9a40ab8 100644 --- a/official/c21648584.lua +++ b/official/c21648584.lua @@ -15,37 +15,37 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.damcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)==0 end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) --Cannot be destroyed by battle local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.indtg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) end function s.indtg(e,c) - return c:IsSetCard(0xba) + return c:IsSetCard(SET_RAIDRAPTOR) end function s.cfilter(c) - return c:IsSetCard(0xba) and c:IsMonster() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsMonster() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id+1)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end function s.damop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) --No damage local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -53,10 +53,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c21663205.lua b/official/c21663205.lua index 663360d902..ee7cc95355 100644 --- a/official/c21663205.lua +++ b/official/c21663205.lua @@ -1,5 +1,5 @@ --墓守の神職 ---Gravekeeper's Priest +--Gravekeeper's Headman local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,9 +25,9 @@ function s.initial_effect(c) e4:SetCode(EFFECT_NECRO_VALLEY_IM) c:RegisterEffect(e4) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.filter(c,e,tp) - return c:IsSetCard(0x2e) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -42,5 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c21672573.lua b/official/c21672573.lua index bf3c853892..896f663fd6 100644 --- a/official/c21672573.lua +++ b/official/c21672573.lua @@ -1,4 +1,5 @@ --エンペラー・ストゥム +--Emperor Sem local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -19,7 +20,7 @@ function s.initial_effect(c) end function s.tdcon1(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst()~=e:GetHandler() and ep==tp - and eg:GetFirst():IsSummonType(SUMMON_TYPE_TRIBUTE) + and eg:GetFirst():IsTributeSummoned() end function s.tdcon2(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst():GetMaterialCount()~=0 and ep==tp @@ -40,5 +41,5 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local g=Duel.GetTargetCards(e) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c21686473.lua b/official/c21686473.lua index 18b92beadc..d442d838f6 100644 --- a/official/c21686473.lua +++ b/official/c21686473.lua @@ -54,10 +54,10 @@ function s.initial_effect(c) e6:SetValue(s.damlimit) c:RegisterEffect(e6) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} s.listed_names={} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DDD) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -74,11 +74,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.hspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,nil,0x10af) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,nil,SET_DDD) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,nil,0x10af) + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,nil,SET_DDD) if g then g:KeepAlive() e:SetLabelObject(g) @@ -105,13 +105,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(bc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end end function s.valcon(e,re,r,rp) if (r&REASON_BATTLE)~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) return true else return false end end @@ -119,4 +119,4 @@ function s.damlimit(e,c) if e:GetHandler():GetFlagEffect(id)==0 then return 1 else return 0 end -end +end \ No newline at end of file diff --git a/official/c21698716.lua b/official/c21698716.lua index 9466a95481..841a4cf0ea 100644 --- a/official/c21698716.lua +++ b/official/c21698716.lua @@ -1,4 +1,5 @@ --宝玉獣 コバルト・イーグル +--Crystal Beast Cobalt Eagle local s,id=GetID() function s.initial_effect(c) --send replace @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.repcon(e) local c=e:GetHandler() return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) @@ -32,13 +33,13 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.filter(c) - return c:IsSetCard(0x1034) and c:IsAbleToDeck() and c:IsFaceup() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToDeck() and c:IsFaceup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.filter(chkc) end @@ -50,6 +51,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21702241.lua b/official/c21702241.lua index 28af0dace4..099e9856ab 100644 --- a/official/c21702241.lua +++ b/official/c21702241.lua @@ -1,4 +1,5 @@ --反目の従者 +--Vengeful Servant local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -30,4 +31,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local ec=c:GetEquipTarget() Duel.Damage(ec:GetControler(),ec:GetBaseAttack(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21715135.lua b/official/c21715135.lua index 6bf0618522..cca31d1eb2 100644 --- a/official/c21715135.lua +++ b/official/c21715135.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.counterfilter(c) - return c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsXyzSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -39,7 +39,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return sumtype~=SUMMON_TYPE_XYZ and e:GetLabelObject()~=se end function s.filter(c,e,tp) - return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21727231.lua b/official/c21727231.lua index 10fbbc3e33..3b62507916 100644 --- a/official/c21727231.lua +++ b/official/c21727231.lua @@ -1,9 +1,9 @@ --- セリオンズ“リーパー”ファム --- Therions' "Leaper" Fam --- Scripted by Hatter +--セリオンズ“リーパー”ファム +--Therion "Reaper" Fum +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) - -- Send to hand + --Send to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -29,25 +29,25 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Equipped monster gains ATK + --Equipped monster gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x17b) end) + e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_THERION) end) e3:SetValue(700) c:RegisterEffect(e3) - -- Equipped monster gains effect + --Equipped monster gains effect local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x17b) end) + e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(SET_THERION) end) e4:SetLabelObject(e2) c:RegisterEffect(e4) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.eqfilter(c) - return c:IsMonster() and (c:IsSetCard(0x17b) or c:IsRace(RACE_AQUA)) + return c:IsMonster() and (c:IsSetCard(SET_THERION) or c:IsRace(RACE_AQUA)) end function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) @@ -69,7 +69,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 + if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsRelateToEffect(e) and tc:IsMonster() and not tc:IsForbidden() then c:EquipByEffectAndLimitRegister(e,tp,tc) @@ -77,10 +77,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thfilter(c,e,tp) return c:IsCanBeEffectTarget(e) and c:IsAbleToHand() and (c:IsControler(1-tp) - or (c:GetSequence()<5 and c:IsFaceup() and c:IsSetCard(0x17b))) + or (c:GetSequence()<5 and c:IsFaceup() and c:IsSetCard(SET_THERION))) end function s.threscon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c21744288.lua b/official/c21744288.lua index e160713c85..0b74fdfe8f 100644 --- a/official/c21744288.lua +++ b/official/c21744288.lua @@ -24,15 +24,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x128) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsSetCard(0x128) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c21767650.lua b/official/c21767650.lua index 08f957342a..374198974b 100644 --- a/official/c21767650.lua +++ b/official/c21767650.lua @@ -7,14 +7,14 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.lvtg) e1:SetOperation(s.lvop) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_MERMAIL) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -30,7 +30,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(opt+1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c21768554.lua b/official/c21768554.lua index e202f675ed..0b7f8b9ea9 100644 --- a/official/c21768554.lua +++ b/official/c21768554.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_list={COUNTER_A} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xc),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ALIEN),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) return c:GetCounter(COUNTER_A)>0 and c:IsControlerCanBeChanged() @@ -55,12 +55,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetCondition(s.con) tc:RegisterEffect(e1) end end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.con(e) local c=e:GetOwner() @@ -78,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21770260.lua b/official/c21770260.lua index f9fa5ef44b..9f20321825 100644 --- a/official/c21770260.lua +++ b/official/c21770260.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.spcon) @@ -44,7 +44,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsCode(TOKEN_SLIME) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,TOKEN_SLIME) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c21770839.lua b/official/c21770839.lua index 4afc0c8bba..bc067c3238 100644 --- a/official/c21770839.lua +++ b/official/c21770839.lua @@ -41,13 +41,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.counterfilter(c) - return not c:IsSummonType(SUMMON_TYPE_PENDULUM) + return not c:IsPendulumSummoned() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() @@ -66,7 +66,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.exfilter(c) - return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_ODD_EYES) and c:IsType(TYPE_PENDULUM) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -75,7 +75,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,3)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) @@ -110,8 +110,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(-gc*1000) d:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c21772453.lua b/official/c21772453.lua index 634cfd911b..ab1582f9f4 100644 --- a/official/c21772453.lua +++ b/official/c21772453.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c,tp) - return c:IsSetCard(0xe6) and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -54,14 +54,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Draw(p,d,REASON_EFFECT)~=0 then local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() @@ -75,4 +75,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c21785144.lua b/official/c21785144.lua index 01a7318c06..2cb37742c2 100644 --- a/official/c21785144.lua +++ b/official/c21785144.lua @@ -1,4 +1,5 @@ --ライトロード・ドラゴン グラゴニス +--Gragonith, Lightsworn Dragon local s,id=GetID() function s.initial_effect(c) --atk def @@ -34,9 +35,9 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter(c) - return c:IsSetCard(0x38) and c:IsMonster() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.value(e,c) local g=Duel.GetMatchingGroup(s.filter,c:GetControler(),LOCATION_GRAVE,0,nil) @@ -52,4 +53,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21790410.lua b/official/c21790410.lua index 1518b60603..ef45344da7 100644 --- a/official/c21790410.lua +++ b/official/c21790410.lua @@ -32,17 +32,17 @@ function s.initial_effect(c) e3:SetOperation(s.shop) c:RegisterEffect(e3) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x56) + return ec:IsControler(tp) and ec:IsSetCard(SET_INZEKTOR) end function s.filter(c) - return c:IsSetCard(0x56) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_INZEKTOR) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.equipop(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) @@ -52,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) @@ -65,7 +65,7 @@ function s.shcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,e:GetHandler(),tp) end function s.tgfilter(c) - return c:IsSetCard(0x56) and c:IsAbleToHand() + return c:IsSetCard(SET_INZEKTOR) and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() @@ -79,4 +79,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c21830679.lua b/official/c21830679.lua index 7e343030d3..824f29b1eb 100644 --- a/official/c21830679.lua +++ b/official/c21830679.lua @@ -34,7 +34,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) if not c:IsImmuneToEffect(e1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_WIND) then @@ -42,4 +42,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c21831848.lua b/official/c21831848.lua index e749c836c9..21a78ad031 100644 --- a/official/c21831848.lua +++ b/official/c21831848.lua @@ -1,4 +1,5 @@ --ガガガドロー +--Gagagadraw local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.filter(c) - return c:IsSetCard(0x54) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GAGAGA) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,3,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,3,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -31,4 +32,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c21834870.lua b/official/c21834870.lua index ceb0bb723c..aa685b0458 100644 --- a/official/c21834870.lua +++ b/official/c21834870.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) then return false end - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21840375.lua b/official/c21840375.lua index ec825ead66..6890da343e 100644 --- a/official/c21840375.lua +++ b/official/c21840375.lua @@ -1,4 +1,5 @@ --隠された魔導書 +--Hidden Spellbook local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) return c:IsSpell() and c:IsAbleToDeck() @@ -28,5 +29,5 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c21843307.lua b/official/c21843307.lua index dffe4cbbec..8eb84a4388 100644 --- a/official/c21843307.lua +++ b/official/c21843307.lua @@ -19,7 +19,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ec=eg:GetFirst() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,0x11,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) end + Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,TYPE_MONSTER|TYPE_NORMAL,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) end ec:CreateEffectRelation(e) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end @@ -29,8 +29,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,0x11,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end - c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP,0,0,ec:GetLevel(),0,0) + or not Duel.IsPlayerCanSpecialSummonMonster(tp,ec:GetCode(),0,TYPE_MONSTER|TYPE_NORMAL,0,0,ec:GetLevel(),RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end + c:AddMonsterAttribute(TYPE_NORMAL|TYPE_TRAP,0,0,ec:GetLevel(),0,0) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() --change code @@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(ec:GetCode()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c21858819.lua b/official/c21858819.lua index df25e73391..9891b9e8f3 100644 --- a/official/c21858819.lua +++ b/official/c21858819.lua @@ -1,5 +1,5 @@ --No.XX インフィニティ・ダークホープ ---Number XX - Infinity Dark Hope +--Number XX: Utopic Dark Infinity --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,10 +28,6 @@ function s.initial_effect(c) e2:SetOperation(s.recop) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -51,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetBaseAttack()>0 + return c:IsFaceup() and c:IsSpecialSummoned() and c:GetBaseAttack()>0 end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -66,4 +62,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21862633.lua b/official/c21862633.lua index 8483d2c328..8c180d4216 100644 --- a/official/c21862633.lua +++ b/official/c21862633.lua @@ -47,7 +47,7 @@ end function s.valcheck(e,c) local g=c:GetMaterial() if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD,0,1) end end function s.drcfilter(c,tp) @@ -72,7 +72,7 @@ function s.atkfilter(c) return c:IsLevelAbove(5) else local summon_types={SUMMON_TYPE_RITUAL,SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ} - return c:GetFlagEffect(id)>0 and c:IsSummonType(table.unpack(summon_types)) + return c:GetFlagEffect(id)>0 and c:IsSummonType(table.unpack(summon_types)) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -96,7 +96,7 @@ function s.atkop(e,tp,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(d:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) a:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c218704.lua b/official/c218704.lua index 377caaa032..cc507dae7d 100644 --- a/official/c218704.lua +++ b/official/c218704.lua @@ -28,11 +28,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -53,6 +53,6 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c21879581.lua b/official/c21879581.lua index d1f9dd58cd..332f8dd112 100644 --- a/official/c21879581.lua +++ b/official/c21879581.lua @@ -22,16 +22,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) -end +end \ No newline at end of file diff --git a/official/c21887075.lua b/official/c21887075.lua index a90f2d5eb0..744abc3611 100644 --- a/official/c21887075.lua +++ b/official/c21887075.lua @@ -1,5 +1,5 @@ --無尽機関アルギロ・システム ---Perpetual Engine Argyro System +--Endless Engine Argyro System --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.tgfilter(c) - return c:IsSetCard(0x17b) and c:IsAbleToGrave() + return c:IsSetCard(SET_THERION) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c,hc) - if not c:IsSetCard(0x17b) then return false end + if not c:IsSetCard(SET_THERION) then return false end return (c:IsAbleToHand() and hc:IsAbleToDeck()) or (c:IsAbleToDeck() and hc:IsAbleToHand()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c21887175.lua b/official/c21887175.lua index ab66669ec6..95903c9e65 100644 --- a/official/c21887175.lua +++ b/official/c21887175.lua @@ -47,10 +47,10 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.condition(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.mfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_EXTRA) + return c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_EXTRA) end function s.csbtv(e,c) return e:GetHandler()~=c @@ -58,12 +58,12 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:IsControler(1-tp) + return bc and bc:IsSpecialSummoned() and bc:IsControler(1-tp) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -72,14 +72,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end end function s.tdcondition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsSummonType(SUMMON_TYPE_LINK) and rp==1-tp + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsLinkSummoned() and rp==1-tp end function s.tdtarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -91,4 +91,4 @@ function s.tdoperation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21887179.lua b/official/c21887179.lua index e4dddb54ed..56cdc70d81 100644 --- a/official/c21887179.lua +++ b/official/c21887179.lua @@ -1,4 +1,5 @@ --月風魔 +--Getsu Fuhma local s,id=GetID() function s.initial_effect(c) --destroy @@ -15,7 +16,7 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) local t=e:GetHandler():GetBattleTarget() e:SetLabelObject(t) - return t and t:IsRace(RACE_FIEND+RACE_ZOMBIE) and t:IsRelateToBattle() + return t and t:IsRace(RACE_FIEND|RACE_ZOMBIE) and t:IsRelateToBattle() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -26,4 +27,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21888494.lua b/official/c21888494.lua index c6d66bc220..cbe444607c 100644 --- a/official/c21888494.lua +++ b/official/c21888494.lua @@ -1,4 +1,5 @@ --選ばれし者 +--Chosen One local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoGrave(sg1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21893603.lua b/official/c21893603.lua index 299891cf1b..217d6b4169 100644 --- a/official/c21893603.lua +++ b/official/c21893603.lua @@ -1,4 +1,5 @@ --星杯の妖精リース +--Lee the World Chalice Fairy local s,id=GetID() function s.initial_effect(c) --search @@ -27,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop2) c:RegisterEffect(e3) end -s.listed_series={0xfd} +s.listed_series={SET_WORLD_CHALICE} function s.thfilter(c) - return c:IsSetCard(0xfd) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_WORLD_CHALICE) and c:IsMonster() and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,9 +48,9 @@ function s.thcfilter(c) return c:IsMonster() and c:IsAbleToGraveAsCost() end function s.thcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -62,4 +63,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21900719.lua b/official/c21900719.lua index 103a60e800..e5973985a2 100644 --- a/official/c21900719.lua +++ b/official/c21900719.lua @@ -1,4 +1,5 @@ --閃光の双剣-トライス +--Twin Swords of Flashing Light - Tryce local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,nil,nil,s.cost) @@ -18,4 +19,4 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c21903613.lua b/official/c21903613.lua index d1ba1abde5..22ab7e5c42 100644 --- a/official/c21903613.lua +++ b/official/c21903613.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end diff --git a/official/c21908319.lua b/official/c21908319.lua index bfc9004b1c..7cd12d746c 100644 --- a/official/c21908319.lua +++ b/official/c21908319.lua @@ -1,4 +1,5 @@ --コザッキーの自爆装置 +--Kozaky's Self-Destruct Button local s,id=GetID() function s.initial_effect(c) --damage @@ -24,4 +25,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2191144.lua b/official/c2191144.lua index 28ef429708..bebab854f3 100644 --- a/official/c2191144.lua +++ b/official/c2191144.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetOverlayCount(tp,1,1)>1 end end @@ -33,8 +29,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c21924381.lua b/official/c21924381.lua index a7d37fd978..40706b794a 100644 --- a/official/c21924381.lua +++ b/official/c21924381.lua @@ -1,4 +1,5 @@ --ヒロイック・アドバンス +--Heroic Advance local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(0x6f) + return d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(SET_HEROIC) end function s.filter(c) - return c:IsFaceup() and c:IsLevelBelow(4) and c:IsSetCard(0x6f) + return c:IsFaceup() and c:IsLevelBelow(4) and c:IsSetCard(SET_HEROIC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,16 +36,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e2) local e3=e2:Clone() a:RegisterEffect(e3) Duel.CalculateDamage(a,tc) end -end +end \ No newline at end of file diff --git a/official/c21947653.lua b/official/c21947653.lua index f658cd2dde..4bbd14dfc8 100644 --- a/official/c21947653.lua +++ b/official/c21947653.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} s.dark_calling=true s.listed_names={CARD_DARK_FUSION,20721928,84327329} function s.lizcon(e,tp,eg,ep,ev,re,r,rp) @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c21949879.lua b/official/c21949879.lua index 8b8b497380..89d2ce707a 100644 --- a/official/c21949879.lua +++ b/official/c21949879.lua @@ -1,10 +1,10 @@ --- EMジェントルード --- Performapal Gentrude --- Scripted by Hatter +--EMジェントルード +--Performapal Gentrude +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Search + --Search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Place in Pendulum Zone + --Place in Pendulum Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.pentg) e2:SetOperation(s.penop) c:RegisterEffect(e2) - -- Add to hand + --Add to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND) @@ -38,7 +38,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id,58938528} -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.thconfilter(c) return c:IsFacedown() or not c:IsType(TYPE_PENDULUM) end @@ -47,7 +47,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and not Duel.IsExistingMatchingCard(s.thconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) - return c:IsSetCard(0x99) and c:IsAbleToHand() + return c:IsSetCard(SET_ODD_EYES) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,10 +63,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.penfilter(c) - return c:IsSetCard(0x9f) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckPendulumZones(tp) and Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.CheckPendulumZones(tp) and Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_DECK,0,1,nil) end end function s.penop(e,tp,eg,ep,ev,re,r,rp) if not Duel.CheckPendulumZones(tp) then return end @@ -81,7 +81,7 @@ function s.rthcostfilter(c) end function s.rthcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.rthcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.rthcostfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.rthcostfilter,1,1,REASON_COST|REASON_DISCARD) end function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -89,7 +89,7 @@ function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) end function s.rthfilter(c) - return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsAbleToHand() + return (c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES)) and c:IsAbleToHand() end function s.rthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c21954587.lua b/official/c21954587.lua index 518f2fdbc9..a8ea29f4f9 100644 --- a/official/c21954587.lua +++ b/official/c21954587.lua @@ -1,6 +1,5 @@ --水精鱗-メガロアビス --Mermail Abyssmegalo - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -34,13 +33,13 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x75} +s.listed_series={SET_ABYSS} function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,2,2,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,2,2,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -56,7 +55,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.thfilter(c) - return c:IsSetCard(0x75) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_ABYSS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -94,7 +93,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c21960890.lua b/official/c21960890.lua index 6b0f388d36..14dde358dd 100644 --- a/official/c21960890.lua +++ b/official/c21960890.lua @@ -1,4 +1,4 @@ ---Japanese name +--大屍教 --Dark Necromancer --scripted by Naim local s,id=GetID() @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2196767.lua b/official/c2196767.lua index b575c3c8e3..1e5dc77896 100644 --- a/official/c2196767.lua +++ b/official/c2196767.lua @@ -26,13 +26,13 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) elseif total_heads==2 then local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) elseif total_heads==1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Destroy(g,REASON_EFFECT) elseif Duel.CountTails(c1,c2,c3)==3 then local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c21970285.lua b/official/c21970285.lua index e94bb95ca8..2333493d67 100644 --- a/official/c21970285.lua +++ b/official/c21970285.lua @@ -1,4 +1,5 @@ --竜角の狩猟者 +--Dragon Horn Hunter local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -25,4 +26,4 @@ function s.initial_effect(c) end function s.efilter(e,c) return c:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c21977828.lua b/official/c21977828.lua index 994939fb27..db52e05d7e 100644 --- a/official/c21977828.lua +++ b/official/c21977828.lua @@ -1,4 +1,5 @@ --甲虫装機 ギガウィービル +--Inzektor Giga-Weevil local s,id=GetID() function s.initial_effect(c) --equip @@ -30,9 +31,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -53,7 +54,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -66,7 +67,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INZEKTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -81,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21984400.lua b/official/c21984400.lua index 90bb8f2574..87537d9a39 100644 --- a/official/c21984400.lua +++ b/official/c21984400.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x10d} +s.listed_series={SET_MYTHICAL_BEAST} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetLabel() if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_SPELL,ct,REASON_COST) end @@ -40,7 +40,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,ct,REASON_COST) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MYTHICAL_BEAST) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -54,7 +54,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter1(c,e,tp,rp) - return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_MYTHICAL_BEAST) and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,rp) end @@ -82,4 +82,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c21985407.lua b/official/c21985407.lua index 73e12783b8..9d28cb5a35 100644 --- a/official/c21985407.lua +++ b/official/c21985407.lua @@ -1,7 +1,6 @@ --聖夜の降臨 ---Holy Night Advent +--Starry Knight Arrival --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c21999001.lua b/official/c21999001.lua index 0a89b1fee4..44ccb6762f 100644 --- a/official/c21999001.lua +++ b/official/c21999001.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -31,10 +31,10 @@ function s.sprcon(e,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function s.costfilter(c,e,tp) - return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp) + return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CIPHER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -47,21 +47,21 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(0) return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) else - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end end if e:GetLabel()~=0 then e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -73,9 +73,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xe5) -end + return not c:IsSetCard(SET_CIPHER) +end \ No newline at end of file diff --git a/official/c22007085.lua b/official/c22007085.lua index b9307e207f..21105b812a 100644 --- a/official/c22007085.lua +++ b/official/c22007085.lua @@ -1,50 +1,49 @@ --聖なる篝火 ---Holy Night Bellfire +--Starry Knight Balefire --Scripted by The Razgriz - local s,id=GetID() function s.initial_effect(c) - --Add Holy Night monster or Level 7 Light Dragon from Deck to hand + --dd 1 "Starry Knight" monster, or 1 Level 7 LIGHT Dragon monster, from your Deck to your hand, then, if you control no monsters and your opponent controls a DARK monster, you can Special Summon 1 Level 7 LIGHT Dragon monster from your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetTarget(s.thtg) - e1:SetOperation(s.thop) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x15b} -function s.ldlv7filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsLevel(7) +s.listed_series={SET_STARRY_KNIGHT} +function s.lv7lightdragonfilter(c) + return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) end function s.thfilter(c) - return ((c:IsSetCard(0x15b) and c:IsMonster()) or s.ldlv7filter(c)) and c:IsAbleToHand() + return (c:IsSetCard(SET_STARRY_KNIGHT) or s.lv7lightdragonfilter(c)) and c:IsMonster() and c:IsAbleToHand() end -function s.spconfilter(c) - return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) -end -function s.spfilter(c,e,tp) - return s.ldlv7filter(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end -function s.thop(e,tp,eg,ep,ev,re,r,rp) +function s.spfilter(c,e,tp) + return s.lv7lightdragonfilter(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g==0 then return end - Duel.SendtoHand(g,nil,REASON_EFFECT) + if #g==0 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) - if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 or - (not Duel.IsExistingMatchingCard(s.spconfilter,tp,0,LOCATION_MZONE,1,nil)) or - (not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)) then return end - if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - Duel.BreakEffect() + if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,0,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + if #sg>0 then + Duel.BreakEffect() + Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) + end end -end \ No newline at end of file +end diff --git a/official/c22009013.lua b/official/c22009013.lua index 0580b5d474..117c3bd0a4 100644 --- a/official/c22009013.lua +++ b/official/c22009013.lua @@ -1,4 +1,5 @@ --インヴェルズ・モース +--Steelswarm Moth local s,id=GetID() function s.initial_effect(c) --summon success @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,21 +22,17 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then + if g:IsExists(Card.IsSetCard,1,nil,SET_STEELSWARM) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -47,4 +44,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) Duel.SendtoHand(tg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22020907.lua b/official/c22020907.lua index 7880cc1a63..b36e723002 100644 --- a/official/c22020907.lua +++ b/official/c22020907.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.cfilter(c,tp) return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) end @@ -20,18 +20,18 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c22024279.lua b/official/c22024279.lua index a8f26997ec..b6dcdca58a 100644 --- a/official/c22024279.lua +++ b/official/c22024279.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.nstg) e2:SetOperation(s.nsop) c:RegisterEffect(e2) diff --git a/official/c2203790.lua b/official/c2203790.lua index 3471636ade..25b6210e49 100644 --- a/official/c2203790.lua +++ b/official/c2203790.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x100d),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_X_SABER),1,99) c:EnableReviveLimit() --special summon local e1=Effect.CreateEffect(c) @@ -17,12 +17,12 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -35,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2204038.lua b/official/c2204038.lua index 881037dbc5..5cdbc7b753 100644 --- a/official/c2204038.lua +++ b/official/c2204038.lua @@ -1,7 +1,6 @@ --ワルキューレ・ヴリュンヒルデ --Valkyrie Brunhilde --Scripted by Naim and AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Unaffected by opponent's spells diff --git a/official/c220414.lua b/official/c220414.lua index d5ae27a4c5..dab90a05b8 100644 --- a/official/c220414.lua +++ b/official/c220414.lua @@ -1,5 +1,5 @@ --EMターントルーパー ---Performapal Turntrooper +--Performapal Turn Trooper --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.countercon) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(function(e) return e:GetHandler():GetCounter(0x14a)==2 end) - e3:SetCost(s.rmcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) @@ -50,11 +50,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and e:GetHandler():GetCounter(0x14a)==1 end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,c) @@ -71,4 +66,4 @@ function s.retcon(ag,e,tp,eg,ep,ev,re,r,rp) if t==1 then return true end e:SetLabel(fid,1) return false -end +end \ No newline at end of file diff --git a/official/c2204140.lua b/official/c2204140.lua index ae2b5a4e3d..96b3826345 100644 --- a/official/c2204140.lua +++ b/official/c2204140.lua @@ -21,13 +21,13 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) + and Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g1=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g2=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tg2:GetFirst():IsRelateToEffect(e) then Duel.Remove(tg2,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22046459.lua b/official/c22046459.lua index e3127ea321..3a300281e9 100644 --- a/official/c22046459.lua +++ b/official/c22046459.lua @@ -1,4 +1,5 @@ --巨大化 +--Megamorph local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -20,4 +21,4 @@ function s.value(e,c) elseif Duel.GetLP(p)>Duel.GetLP(1-p) then return c:GetBaseAttack()/2 end -end +end \ No newline at end of file diff --git a/official/c22047978.lua b/official/c22047978.lua index 1c7d4da083..bcf614e075 100644 --- a/official/c22047978.lua +++ b/official/c22047978.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local tg=Duel.GetAttacker() @@ -48,6 +48,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:CanAttack() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Destroy(tc,REASON_EFFECT)>0 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c22061412.lua b/official/c22061412.lua index 89d56a72ca..cfde33cf56 100644 --- a/official/c22061412.lua +++ b/official/c22061412.lua @@ -1,9 +1,10 @@ --E・HERO The シャイニング +--Elemental HERO The Shining local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3008),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT)) --tohand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -31,19 +32,19 @@ function s.initial_effect(c) e4:SetValue(aux.fuslimit) c:RegisterEffect(e4) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkup(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x3008),c:GetControler(),LOCATION_REMOVED,0,nil)*300 + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ELEMENTAL_HERO),c:GetControler(),LOCATION_REMOVED,0,nil)*300 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (e:GetHandler():GetPreviousLocation()&LOCATION_ONFIELD)>0 end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,2,nil) @@ -53,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22070401.lua b/official/c22070401.lua index d8cc972e68..00d14739bf 100644 --- a/official/c22070401.lua +++ b/official/c22070401.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetRange(LOCATION_PZONE+LOCATION_MZONE) + e3:SetRange(LOCATION_PZONE|LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTarget(s.atktg) e3:SetValue(s.atkval) @@ -87,12 +87,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -109,4 +109,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c22073844.lua b/official/c22073844.lua index d7bc21ec1a..8a103e5afb 100644 --- a/official/c22073844.lua +++ b/official/c22073844.lua @@ -67,7 +67,7 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL) + return bc and bc:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -83,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,ct*800,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c22076135.lua b/official/c22076135.lua index a3bdc988de..3ede7428b3 100644 --- a/official/c22076135.lua +++ b/official/c22076135.lua @@ -1,4 +1,5 @@ --水精鱗-アビスタージ +--Mermail Abyssturge local s,id=GetID() function s.initial_effect(c) --salvage @@ -22,7 +23,7 @@ function s.cfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() @@ -40,4 +41,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c22082163.lua b/official/c22082163.lua index 5dfa890423..3a93409de2 100644 --- a/official/c22082163.lua +++ b/official/c22082163.lua @@ -1,4 +1,5 @@ --アマゾネスの意地 +--Amazoness Willpower local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,12 +27,12 @@ function s.initial_effect(c) e3:SetOperation(s.desop2) c:RegisterEffect(e3) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.filter(c,e,tp) - return c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AMAZONESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -48,13 +49,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.cpcon) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetCondition(s.cpcon) tc:RegisterEffect(e2) end @@ -74,4 +75,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22082432.lua b/official/c22082432.lua index 730e46975c..fb6134de6c 100644 --- a/official/c22082432.lua +++ b/official/c22082432.lua @@ -1,4 +1,4 @@ ---Japanese name +--神の怒り --Dangers of the Divine --scripted by pyrQ local s,id=GetID() @@ -91,4 +91,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(og,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c22091345.lua b/official/c22091345.lua index 064a67dc7d..2d9a952746 100644 --- a/official/c22091345.lua +++ b/official/c22091345.lua @@ -1,6 +1,5 @@ --EMスパイク・イーグル --Performapal Spikeagle - local s,id=GetID() function s.initial_effect(c) --Targeted monster inflicts piercing damage @@ -36,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c22093873.lua b/official/c22093873.lua index ee2a2abdce..8055018710 100644 --- a/official/c22093873.lua +++ b/official/c22093873.lua @@ -1,4 +1,5 @@ --M・HERO カミカゼ +--Masked HERO Divine Wind local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -53,7 +54,7 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id)~=0 then return end local fid=eg:GetFirst():GetFieldID() - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) e:GetLabelObject():SetLabel(fid) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,4 +66,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22110647.lua b/official/c22110647.lua index 234709bc88..4ac471067a 100644 --- a/official/c22110647.lua +++ b/official/c22110647.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c22123627.lua b/official/c22123627.lua index 4645bf98e4..49041ca786 100644 --- a/official/c22123627.lua +++ b/official/c22123627.lua @@ -1,4 +1,5 @@ --強欲なウツボ +--Moray of Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,9 +29,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,2,2,nil) Duel.ConfirmCards(1-p,sg) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,3,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22125101.lua b/official/c22125101.lua index eec6bbd544..2a7ecf2ccd 100644 --- a/official/c22125101.lua +++ b/official/c22125101.lua @@ -1,12 +1,12 @@ --- 軌跡の魔術師 --- Beyond the Pendulum --- Scripted by Hatter +--軌跡の魔術師 +--Beyond the Pendulum +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Effect Monsters, including a Pendulum Monster + --2 Effect Monsters, including a Pendulum Monster Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_EFFECT),2,2,s.lcheck) - -- Search 1 Pendulum Monster + --Search 1 Pendulum Monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -14,11 +14,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.thcon) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(1200)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Destroy 2 cards + --Destroy 2 cards local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -37,11 +37,7 @@ function s.lcheck(g,lc,sumtype,tp) end function s.thcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_LINK) and c:IsInExtraMZone() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1200) end - Duel.PayLPCost(tp,1200) + return c:IsLinkSummoned() and c:IsInExtraMZone() end function s.thfilter(c) return c:IsType(TYPE_PENDULUM) and c:IsMonster() and c:IsAbleToHand() @@ -58,7 +54,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end local c=e:GetHandler() - -- Cannot activate monster effects + --Cannot activate monster effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) @@ -68,14 +64,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(function(_,re) return re:IsMonsterEffect() end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - -- Pendulum effects are negated + --Pendulum effects are negated local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_DISABLE) e2:SetTargetRange(LOCATION_PZONE,0) e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) - -- Remove restrictions on Pendulum Summon + --Remove restrictions on Pendulum Summon local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -85,7 +81,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e0,tp) end function s.psfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local ef=e:GetLabelObject() @@ -96,7 +92,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end function s.pendfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:HasLevel() + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() and c:HasLevel() end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c22134079.lua b/official/c22134079.lua index bf397455d1..4da5de9d67 100644 --- a/official/c22134079.lua +++ b/official/c22134079.lua @@ -1,4 +1,5 @@ --墓守の伏兵 +--Gravekeeper's Ambusher local s,id=GetID() function s.initial_effect(c) --return to deck @@ -34,7 +35,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_NECRO_VALLEY_IM) c:RegisterEffect(e4) end -s.listed_series={0x91} +s.listed_series={SET_NECROVALLEY} function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end @@ -45,7 +46,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end function s.flipop(e,tp,eg,ep,ev,re,r,rp) @@ -55,7 +56,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.filter(c) - return c:IsSetCard(0x91) and c:IsAbleToHand() + return c:IsSetCard(SET_NECROVALLEY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -70,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c22138839.lua b/official/c22138839.lua index f670d54c2a..ce4dd407e2 100644 --- a/official/c22138839.lua +++ b/official/c22138839.lua @@ -57,7 +57,7 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -66,4 +66,4 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) end function s.lvcon(e) return e:GetHandler():GetCounter(COUNTER_PREDATOR)>0 -end +end \ No newline at end of file diff --git a/official/c22147147.lua b/official/c22147147.lua index 01db5a8829..33fa42d541 100644 --- a/official/c22147147.lua +++ b/official/c22147147.lua @@ -1,4 +1,5 @@ --旋風剣 +--Cyclone Blade local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -15,15 +16,15 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.filter(c) - return c:IsSetCard(0xc008) + return c:IsSetCard(SET_DESTINY_HERO) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -38,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22159429.lua b/official/c22159429.lua index 7c0fbca496..6e99391482 100644 --- a/official/c22159429.lua +++ b/official/c22159429.lua @@ -1,5 +1,5 @@ --トリックスター・マジカローラ ---c22159429.lua +--Trickstar Magical Laurel local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,9 +40,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.spfilter(c,e,tp) - return c:IsSetCard(0xfb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRICKSTAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -64,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -101,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c22160245.lua b/official/c22160245.lua index cdc323ee83..b5c99b98ff 100644 --- a/official/c22160245.lua +++ b/official/c22160245.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_PIERCE) c:RegisterEffect(e3) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} s.dark_calling=true s.listed_names={CARD_DARK_FUSION,58932615,21844576} function s.lizcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c22171591.lua b/official/c22171591.lua index 8e87486f55..e7edbcfe4a 100644 --- a/official/c22171591.lua +++ b/official/c22171591.lua @@ -1,4 +1,5 @@ --カバリスト +--Doctor Cranium local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -16,10 +17,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToHand() end @@ -34,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c22174866.lua b/official/c22174866.lua index 293578b8f7..7e92b90d52 100644 --- a/official/c22174866.lua +++ b/official/c22174866.lua @@ -1,4 +1,5 @@ --アロマージ-カナンガ +--Aromage Cananga local s,id=GetID() function s.initial_effect(c) --atk & def @@ -48,4 +49,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22198672.lua b/official/c22198672.lua index a053bd2e06..c698589015 100644 --- a/official/c22198672.lua +++ b/official/c22198672.lua @@ -30,7 +30,7 @@ end function s.filter(c) if not c:IsLinkMonster() then return false end local p=c:GetControler() - local zone=c:GetLinkedZone()&0x1f + local zone=c:GetLinkedZone()&ZONES_MMZ return Duel.GetLocationCount(p,LOCATION_MZONE,p,LOCATION_REASON_CONTROL,zone)>0 end function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -44,7 +44,7 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) then return end local p=tc:GetControler() - local zone=tc:GetLinkedZone()&0x1f + local zone=tc:GetLinkedZone()&ZONES_MMZ if Duel.GetLocationCount(p,LOCATION_MZONE,p,LOCATION_REASON_CONTROL,zone)>0 then local i=0 if not tc:IsControler(tp) then i=16 end @@ -75,4 +75,4 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g2) local tc2=g2:GetFirst() Duel.SwapSequence(tc1,tc2) -end +end \ No newline at end of file diff --git a/official/c22200403.lua b/official/c22200403.lua index 32c30dfaea..b260b9e1d7 100644 --- a/official/c22200403.lua +++ b/official/c22200403.lua @@ -69,7 +69,7 @@ function s.effcon(e) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and tc:IsFaceup() and tc:IsSummonType(SUMMON_TYPE_PENDULUM) end + if chk==0 then return tc and tc:IsFaceup() and tc:IsPendulumSummoned() end Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -98,4 +98,4 @@ end function s.drcon2(e,tp,eg,ep,ev,re,r,rp) return s.effcon(e) and (r&REASON_EFFECT)~=0 and re:GetHandler()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c22201234.lua b/official/c22201234.lua index 6064e855f0..6fd351eb15 100644 --- a/official/c22201234.lua +++ b/official/c22201234.lua @@ -20,10 +20,10 @@ function s.initial_effect(c) e2:SetOperation(s.qop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.qcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsSetCard(0x38) and d:IsControler(tp) + return d:IsFaceup() and d:IsSetCard(SET_LIGHTSWORN) and d:IsControler(tp) end function s.qcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) and e:GetHandler():GetFlagEffect(id)==0 end @@ -39,4 +39,4 @@ end function s.qop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c2220237.lua b/official/c2220237.lua index 93f4fd69ae..c11768ffce 100644 --- a/official/c2220237.lua +++ b/official/c2220237.lua @@ -1,6 +1,5 @@ --セキュア・ガードナー --Secure Gardna - local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -41,19 +40,19 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.matfilter(c,lc,sumtype,tp) return c:IsRace(RACE_CYBERSE,lc,sumtype,tp) and c:IsType(TYPE_LINK,lc,sumtype,tp) @@ -68,9 +67,9 @@ end function s.damval2(e,re,val,r,rp,rc) local c=e:GetHandler() if r&(REASON_BATTLE|REASON_EFFECT)~=0 and c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.Hint(HINT_CARD,0,id) return 0 end return val -end +end \ No newline at end of file diff --git a/official/c22205600.lua b/official/c22205600.lua index 85ac24800b..8f1b16684b 100644 --- a/official/c22205600.lua +++ b/official/c22205600.lua @@ -1,4 +1,5 @@ --連鎖旋風 +--Chain Whirlwind local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end @@ -31,4 +32,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22211622.lua b/official/c22211622.lua index 2084db1a3b..e63ab2f216 100644 --- a/official/c22211622.lua +++ b/official/c22211622.lua @@ -106,19 +106,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) --ATK/DEF becomes 0 local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e3,true) local e4=e3:Clone() e4:SetCode(EFFECT_SET_DEFENSE_FINAL) diff --git a/official/c22219822.lua b/official/c22219822.lua index 798310aa4f..db85548975 100644 --- a/official/c22219822.lua +++ b/official/c22219822.lua @@ -1,6 +1,5 @@ --トリックスター・マンドレイク --Trickstar Mandrake - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -28,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end @@ -47,14 +46,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0xfb) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_TRICKSTAR) end function s.desfilter(c,g) return g:IsContains(c) diff --git a/official/c22227683.lua b/official/c22227683.lua index 8a038f4003..ff375a0b20 100644 --- a/official/c22227683.lua +++ b/official/c22227683.lua @@ -22,13 +22,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattleTarget()~=nil end function s.tgfilter(c) - return c:IsSetCard(0xab) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_DESKBOT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 @@ -48,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(lv*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -61,34 +61,34 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,1)) e3:SetTargetRange(0,1) e3:SetValue(1) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xab) and c:IsMonster() + return c:IsSetCard(SET_DESKBOT) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,c,e,tp,c:GetLevel()) + and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,c,e,tp,c:GetLevel()) end function s.spfilter2(c,e,tp,lv) - return c:IsSetCard(0xab) and c:IsMonster() and c:GetLevel()~=lv + return c:IsSetCard(SET_DESKBOT) and c:IsMonster() and c:GetLevel()~=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g1>0 then local tc=g1:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,tc,e,tp,tc:GetLevel()) + local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,tc,e,tp,tc:GetLevel()) g1:Merge(g2) Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c22318971.lua b/official/c22318971.lua index dd23606023..8d721e0f62 100644 --- a/official/c22318971.lua +++ b/official/c22318971.lua @@ -1,4 +1,5 @@ --一角獣の使い魔 +--Uni-Horned Familiar local s,id=GetID() function s.initial_effect(c) --remove @@ -29,11 +30,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) @@ -43,14 +44,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) ac:RegisterEffect(e2) end end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetOwner()) -end +end \ No newline at end of file diff --git a/official/c22339232.lua b/official/c22339232.lua index 4bfa359654..408fe3433e 100644 --- a/official/c22339232.lua +++ b/official/c22339232.lua @@ -16,17 +16,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_HAND) - e2:SetCost(s.effcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) c:RegisterEffect(e2) end s.listed_names={CARD_SKULL_SERVANT,36021814,40991587,id} -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsCode(36021814,40991587) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c22346472.lua b/official/c22346472.lua index 24d7c0ff3e..c2a6be3f96 100644 --- a/official/c22346472.lua +++ b/official/c22346472.lua @@ -1,4 +1,5 @@ --破天荒な風 +--Blustering Winds local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,11 +24,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) e1:SetValue(1000) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c22359980.lua b/official/c22359980.lua index 194904d001..4172aa6598 100644 --- a/official/c22359980.lua +++ b/official/c22359980.lua @@ -1,4 +1,5 @@ --銀幕の鏡壁 +--Mirror Wall local s,id=GetID() function s.initial_effect(c) --activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -37,16 +38,13 @@ function s.initial_effect(c) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetCondition(s.mtcon) e4:SetOperation(s.mtop) c:RegisterEffect(e4) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end e:GetLabelObject():Clear() @@ -56,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if a and a:IsControler(1-tp) and a:IsFaceup() and a:IsLocation(LOCATION_MZONE) then e:GetLabelObject():AddCard(a) if a:GetFlagEffect(id)==0 then - a:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + a:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end @@ -67,7 +65,7 @@ function s.atkval(e,c) return c:GetAttack()/2 end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,2000) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -75,4 +73,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c22371016.lua b/official/c22371016.lua index a2ea199b27..45400f8d01 100644 --- a/official/c22371016.lua +++ b/official/c22371016.lua @@ -1,4 +1,5 @@ --A・O・J アンノウン・クラッシャー +--Ally of Justice Unknown Crusher local s,id=GetID() function s.initial_effect(c) --remove @@ -26,4 +27,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22377815.lua b/official/c22377815.lua index 977f526507..4961f5d5f2 100644 --- a/official/c22377815.lua +++ b/official/c22377815.lua @@ -26,5 +26,5 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c22382087.lua b/official/c22382087.lua index b77a12d4e6..dbadb2987f 100644 --- a/official/c22382087.lua +++ b/official/c22382087.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) end s.listed_names={id} function s.cfilter(c,ft) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsTributeSummoned() and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c22386234.lua b/official/c22386234.lua index 1d71c7bd66..4fbd4b9fdf 100644 --- a/official/c22386234.lua +++ b/official/c22386234.lua @@ -1,4 +1,5 @@ --オーロラ・アンギラス +--Aurora Paragon local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -29,4 +30,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22398665.lua b/official/c22398665.lua index 2256f2adae..413a117c36 100644 --- a/official/c22398665.lua +++ b/official/c22398665.lua @@ -1,7 +1,6 @@ --流星輝巧群 --Meteonis Drytron --Scripted by Eerie Code and edo9300 - local s,id=GetID() function s.initial_effect(c) --Ritual Summon @@ -18,7 +17,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.ritualfil(c) return c:GetAttack()>0 and c:IsRitualMonster() end @@ -26,7 +25,7 @@ function s.filter(c) return c:IsRace(RACE_MACHINE) and c:GetAttack()>0 end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x151) and c:GetAttack()>=1000 + return c:IsFaceup() and c:IsSetCard(SET_DRYTRON) and c:GetAttack()>=1000 end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end @@ -38,8 +37,8 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:UpdateAttack(-1000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,c)==-1000 + if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:UpdateAttack(-1000,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,c)==-1000 and c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22404675.lua b/official/c22404675.lua index 557dff4fd5..f1c4f06917 100644 --- a/official/c22404675.lua +++ b/official/c22404675.lua @@ -42,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) end) Duel.RegisterEffect(e1,tp) @@ -61,7 +61,7 @@ function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)>0 then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) --Additional Tribute Summon local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) @@ -69,7 +69,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTargetRange(LOCATION_HAND,0) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_EXTRA_SET_COUNT) diff --git a/official/c22419772.lua b/official/c22419772.lua index 6b7eb0c82c..929e790238 100644 --- a/official/c22419772.lua +++ b/official/c22419772.lua @@ -1,4 +1,5 @@ --ピクシーガーディアン +--Fairy Guardian local s,id=GetID() function s.initial_effect(c) --to deck @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,tp,tid) return c:IsAbleToDeck() and c:IsSpell() and c:GetTurnID()==tid and c:GetReasonPlayer()==1-tp end @@ -31,6 +28,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22420202.lua b/official/c22420202.lua index 92a7251de6..0b829f27bc 100644 --- a/official/c22420202.lua +++ b/official/c22420202.lua @@ -1,5 +1,5 @@ --竜輝巧-ルタδ ---Draitron Delta Altais +--Drytron Delta Altais --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(Drytron.TributeCost) e2:SetTarget(s.sptg) @@ -25,9 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.spconlimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(0x151) + return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(SET_DRYTRON) end function s.sumfilter(c) return not c:IsSummonableCard() @@ -54,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c22423493.lua b/official/c22423493.lua index c76c59bc8a..b1bf3ea7ea 100644 --- a/official/c22423493.lua +++ b/official/c22423493.lua @@ -40,10 +40,10 @@ function s.initial_effect(c) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.efilter(e,te) - if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then + if te:IsSpellTrapEffect() then return true else return te:IsActiveType(TYPE_LINK) and te:IsActivated() and te:GetOwner()~=e:GetOwner() @@ -71,21 +71,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -108,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c22431243.lua b/official/c22431243.lua index 6ed1659d81..a9987e3418 100644 --- a/official/c22431243.lua +++ b/official/c22431243.lua @@ -1,4 +1,5 @@ --超進化薬 +--Ultra Evolution Pill local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c22446869.lua b/official/c22446869.lua index 4d529a4e9d..b2c0562e21 100644 --- a/official/c22446869.lua +++ b/official/c22446869.lua @@ -24,13 +24,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,7 +46,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.thfilter(c) - return c:IsSetCard(0x74) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_MERMAIL) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c22454453.lua b/official/c22454453.lua index 50dcf81754..803e7e51f9 100644 --- a/official/c22454453.lua +++ b/official/c22454453.lua @@ -22,7 +22,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) else local opt=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) Duel.SendtoDeck(g,nil,opt,REASON_EFFECT) diff --git a/official/c22479888.lua b/official/c22479888.lua index fa51439de1..132fedc686 100644 --- a/official/c22479888.lua +++ b/official/c22479888.lua @@ -1,6 +1,5 @@ --クレイ・チャージ --Clay Charge - local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(Group.FromCards(a,at),REASON_EFFECT) Duel.Damage(1-tp,800,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22493811.lua b/official/c22493811.lua index ad3ba19e7b..c9d2a17c20 100644 --- a/official/c22493811.lua +++ b/official/c22493811.lua @@ -48,9 +48,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c22499034.lua b/official/c22499034.lua index 9814b2f527..d0e8be9e65 100644 --- a/official/c22499034.lua +++ b/official/c22499034.lua @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and rp~=tp + return e:GetHandler():IsTributeSummoned() and rp~=tp end function s.thfilter(c,tp) - return c:IsSetCard(0xf9) and c:GetType()==0x20002 + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsContinuousSpell() and (c:IsAbleToHand() or (c:GetActivateEffect():IsActivatable(tp,true,true) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end, aux.Stringid(id,2)) -end +end \ No newline at end of file diff --git a/official/c2250266.lua b/official/c2250266.lua index ef8ee224f9..49982a0b3e 100644 --- a/official/c2250266.lua +++ b/official/c2250266.lua @@ -1,5 +1,5 @@ --D・ステープラン ---Morphtronic Smartfon +--Morphtronic Staplen local s,id=GetID() function s.initial_effect(c) --atk @@ -59,7 +59,7 @@ function s.opa(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end end @@ -89,4 +89,4 @@ function s.opd2(e,tp,eg,ep,ev,re,r,rp) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 and c:IsRelateToBattle() then Duel.ChangePosition(e:GetHandler(),POS_FACEUP_ATTACK,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c22510667.lua b/official/c22510667.lua index 5d0a87d57d..cba238fb4d 100644 --- a/official/c22510667.lua +++ b/official/c22510667.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2) c:EnableReviveLimit() --indes local e1=Effect.CreateEffect(c) @@ -29,19 +29,19 @@ function s.initial_effect(c) e3:SetOperation(s.seqop) c:RegisterEffect(e3) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={22510667} function s.incon(e) return e:GetHandler():GetLinkedGroupCount()>0 - and e:GetHandler():GetLinkedGroup():IsExists(aux.FaceupFilter(Card.IsSetCard,0xfc),1,nil) + and e:GetHandler():GetLinkedGroup():IsExists(aux.FaceupFilter(Card.IsSetCard,SET_GOUKI),1,nil) end function s.seqfilter(c,zone) - return c:IsFaceup() and c:IsSetCard(0xfc) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:GetSequence()<5 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE,c:GetControler(),LOCATION_REASON_CONTROL,zone)>0 end function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - local zone=c:GetLinkedZone(tp)&0x1f + local zone=c:GetLinkedZone(tp)&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.seqfilter(chkc,zone) end if chk==0 then return Duel.IsExistingTarget(s.seqfilter,tp,LOCATION_MZONE,0,1,nil,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) @@ -49,7 +49,7 @@ function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.seqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local zone=c:GetLinkedZone(tp)&0x1f + local zone=c:GetLinkedZone(tp)&ZONES_MMZ local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(tc:GetControler(),LOCATION_MZONE,tc:GetControler(),LOCATION_REASON_CONTROL,zone)<=0 then return end local i=0 @@ -57,5 +57,4 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) local nseq=math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~(zone<Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT) then return end local g2=Duel.GetMatchingGroup(Card.IsDiscardable,tp,0,LOCATION_HAND,nil,REASON_EFFECT):Select(1-tp,rt,rt,nil) - Duel.SendtoGrave(g2,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g2,REASON_EFFECT|REASON_DISCARD) end function s.hdcon2(e) return e:GetHandler():IsExtraLinked() @@ -77,9 +77,9 @@ end function s.hdop2(e,tp,eg,ep,ev,re,r,rp) local ct=2 if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==1 then ct=1 end - if Duel.DiscardHand(1-tp,nil,ct,ct,REASON_EFFECT+REASON_DISCARD)~=0 + if Duel.DiscardHand(1-tp,nil,ct,ct,REASON_EFFECT|REASON_DISCARD)~=0 and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then Duel.BreakEffect() Duel.Damage(1-tp,3000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22609617.lua b/official/c22609617.lua index aec1fa691c..6e84ecb260 100644 --- a/official/c22609617.lua +++ b/official/c22609617.lua @@ -1,4 +1,5 @@ --不意打ち又佐 +--Mataza the Zapper local s,id=GetID() function s.initial_effect(c) --control @@ -14,4 +15,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c22610082.lua b/official/c22610082.lua index 149749818a..c682a3d9da 100644 --- a/official/c22610082.lua +++ b/official/c22610082.lua @@ -1,4 +1,5 @@ --遺言の仮面 +--The Mask of Remnants local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,6 +29,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22617205.lua b/official/c22617205.lua index 541cd39f9e..1ee6d6c65a 100644 --- a/official/c22617205.lua +++ b/official/c22617205.lua @@ -29,12 +29,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) local e4=e2:Clone() e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) end) + e4:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) c:RegisterEffect(e4) end s.listed_series={SET_TELLARKNIGHT,SET_ZEFRA} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(SET_TELLARKNIGHT) or c:IsSetCard(SET_ZEFRA) then return false end + if c:IsSetCard({SET_TELLARKNIGHT,SET_ZEFRA}) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.filter1(c) diff --git a/official/c22624373.lua b/official/c22624373.lua index a7ba414e0f..de4e63637d 100644 --- a/official/c22624373.lua +++ b/official/c22624373.lua @@ -1,4 +1,5 @@ --ライトロード・マジシャン ライラ +--Lyla, Lightsworn Sorceress local s,id=GetID() function s.initial_effect(c) --destroy @@ -29,7 +30,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -50,7 +51,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,2) c:RegisterEffect(e1) end end @@ -63,4 +64,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22628574.lua b/official/c22628574.lua index a1cb894c59..689d912b66 100644 --- a/official/c22628574.lua +++ b/official/c22628574.lua @@ -50,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not te then return end local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c22638495.lua b/official/c22638495.lua index 4f6c2112d1..8b50a5728c 100644 --- a/official/c22638495.lua +++ b/official/c22638495.lua @@ -1,6 +1,5 @@ --剛竜剣士ダイナスターP --Dinoster Power, the Mighty Dracoslayer - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -22,7 +21,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE+LOCATION_PZONE,0) + e4:SetTargetRange(LOCATION_MZONE|LOCATION_PZONE,0) e4:SetTarget(s.indtg) e4:SetValue(1) c:RegisterEffect(e4) @@ -30,37 +29,37 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_FIELD) e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e5:SetRange(LOCATION_MZONE) - e5:SetTargetRange(LOCATION_MZONE+LOCATION_PZONE,0) + e5:SetTargetRange(LOCATION_MZONE|LOCATION_PZONE,0) e5:SetTarget(s.indtg) e5:SetValue(aux.tgoval) c:RegisterEffect(e5) end -s.listed_series={0xc7} -s.material_setcode={0xc7} +s.listed_series={SET_DRACOSLAYER} +s.material_setcode={SET_DRACOSLAYER} function s.ffilter(c,fc,sumtype,tp) - return c:IsSetCard(0xc7,fc,sumtype,tp) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) + return c:IsSetCard(SET_DRACOSLAYER,fc,sumtype,tp) and c:IsType(TYPE_PENDULUM,fc,sumtype,tp) end function s.contactfil(tp) return Duel.GetReleaseGroup(tp) end function s.contactop(g) - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRACOSLAYER) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) @@ -71,7 +70,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c2263869.lua b/official/c2263869.lua index 5f9a85de5a..f5a1df46be 100644 --- a/official/c2263869.lua +++ b/official/c2263869.lua @@ -1,9 +1,9 @@ --- 月女神の鏃 --- Artemate Slay --- Scripted by Hatter +--月女神の鏃 +--Ultimate Slayer +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Return to the Deck + --Return to the Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK) @@ -37,7 +37,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=Duel.SelectTarget(tp,s.tdfilter,tp,0,LOCATION_MZONE,1,1,nil,e,extype) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - Duel.SetChainLimit(function(e,ep,tp) return ep==tp or not e:IsActiveType(TYPE_MONSTER) end) + Duel.SetChainLimit(function(e,ep,tp) return ep==tp or not e:IsMonsterEffect() end) end end function s.tdop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c22653490.lua b/official/c22653490.lua index ba68492e30..67b1972a13 100644 --- a/official/c22653490.lua +++ b/official/c22653490.lua @@ -1,4 +1,5 @@ --電光千鳥 +--Lightning Chidori local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,13 +23,13 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.tdcost2) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg2) e2:SetOperation(s.tdop2) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.tdcon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.tdfilter1(c) return c:IsFacedown() and c:IsAbleToDeck() @@ -43,13 +44,9 @@ end function s.tdop1(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFacedown() then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end -function s.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tdfilter2(c) return c:IsFaceup() and c:IsAbleToDeck() end @@ -63,6 +60,6 @@ end function s.tdop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and tc:IsFaceup() then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22657402.lua b/official/c22657402.lua index 089d3fe523..65006226a4 100644 --- a/official/c22657402.lua +++ b/official/c22657402.lua @@ -61,7 +61,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(e:GetHandler()) @@ -70,10 +70,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c) return c:GetRace()~=RACE_ZOMBIE -end +end \ No newline at end of file diff --git a/official/c22662014.lua b/official/c22662014.lua index afc8406ea0..3eb9d53fd6 100644 --- a/official/c22662014.lua +++ b/official/c22662014.lua @@ -1,5 +1,5 @@ --驚楽園の助手 ---Amazement Assistant +--Amazement Assistant Delia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -22,11 +22,11 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetCost(s.setcost) e2:SetOperation(s.setop) - c:RegisterEffect(e2) + c:RegisterEffect(e2) end -s.listed_series={0x15f} +s.listed_series={SET_ATTRACTION} function s.costfilter(c) - return c:IsSetCard(0x15f) and c:IsTrap() and not c:IsPublic() + return c:IsSetCard(SET_ATTRACTION) and c:IsTrap() and not c:IsPublic() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - if not (c:IsSetCard(0x15f) and c:IsTrap() and c:IsAbleToGraveAsCost()) then return false end + if not (c:IsSetCard(SET_ATTRACTION) and c:IsTrap() and c:IsAbleToGraveAsCost()) then return false end if not c:IsLocation(LOCATION_SZONE) then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) else @@ -56,12 +56,12 @@ function s.cfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0x15f) and c:IsTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_ATTRACTION) and c:IsTrap() and c:IsSSetable(ignore) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.setop(e,tp,eg,ep,ev,re,r,rp) @@ -70,4 +70,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c2266498.lua b/official/c2266498.lua index 5778c50aca..0a56f79186 100644 --- a/official/c2266498.lua +++ b/official/c2266498.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetOperation(s.registerloccount(e1:GetOperation())) c:RegisterEffect(e1) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.registerloccount(func) return function(e,tp,...) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -21,10 +21,10 @@ function s.registerloccount(func) end end function s.cfilter(c,e) - return c:IsSetCard(0x106) and not c:IsPublic() + return c:IsSetCard(SET_VENDREAD) and not c:IsPublic() end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x106) and Duel.IsPlayerCanRelease(tp,c) and c:IsLocation(LOCATION_REMOVED) + return c:IsFaceup() and c:IsSetCard(SET_VENDREAD) and Duel.IsPlayerCanRelease(tp,c) and c:IsLocation(LOCATION_REMOVED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.extrafil(e,tp,eg,ep,ev,re,r,rp) @@ -46,4 +46,4 @@ function s.customoperation(mg,e,tp,eg,ep,ev,re,r,rp,tc) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c22666164.lua b/official/c22666164.lua index d7393d3bd5..f4cf474d5c 100644 --- a/official/c22666164.lua +++ b/official/c22666164.lua @@ -1,4 +1,5 @@ --督戦官コヴィントン +--Commander Covington local s,id=GetID() function s.initial_effect(c) --special summon @@ -48,14 +49,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c22669793.lua b/official/c22669793.lua index f8efea86d6..d2fe200c4c 100644 --- a/official/c22669793.lua +++ b/official/c22669793.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_SZONE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(aux.PayLPCost(800)) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c22702055.lua b/official/c22702055.lua index 3dca2a1c7e..ab249bddc8 100644 --- a/official/c22702055.lua +++ b/official/c22702055.lua @@ -1,4 +1,5 @@ --海 +--Umi local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) end function s.val(e,c) local r=c:GetRace() - if (r&RACE_FISH+RACE_SEASERPENT+RACE_THUNDER+RACE_AQUA)>0 then return 200 - elseif (r&RACE_MACHINE+RACE_PYRO)>0 then return -200 + if (r&RACE_FISH|RACE_SEASERPENT|RACE_THUNDER|RACE_AQUA)>0 then return 200 + elseif (r&RACE_MACHINE|RACE_PYRO)>0 then return -200 else return 0 end -end +end \ No newline at end of file diff --git a/official/c2273734.lua b/official/c2273734.lua index 00fe91045c..3a95c14b94 100644 --- a/official/c2273734.lua +++ b/official/c2273734.lua @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return not c:IsSetCard(SET_TELLARKNIGHT) -end +end \ No newline at end of file diff --git a/official/c22747316.lua b/official/c22747316.lua index 58bcefe1b7..940d80df4c 100644 --- a/official/c22747316.lua +++ b/official/c22747316.lua @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c22748199.lua b/official/c22748199.lua index 95d89619aa..eb6cda549f 100644 --- a/official/c22748199.lua +++ b/official/c22748199.lua @@ -1,6 +1,5 @@ --神の氷結 --The Ice-Bound God - local s,id=GetID() function s.initial_effect(c) --1 of opponent's monsters cannot attack, also negate its effects @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetCondition(s.discon) e1:SetTarget(s.distg) e1:SetOperation(s.disop) @@ -51,13 +50,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) --Cannot attack local e3=Effect.CreateEffect(c) @@ -65,7 +64,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -90,7 +89,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c22751868.lua b/official/c22751868.lua index 55d6492ae0..1c636a7150 100644 --- a/official/c22751868.lua +++ b/official/c22751868.lua @@ -31,11 +31,11 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.poscon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return a:IsControler(tp) and a:IsSetCard(0x11) and d and d:IsFaceup() and d:IsControler(1-tp) + return a:IsControler(tp) and a:IsSetCard(SET_KARAKURI) and d and d:IsFaceup() and d:IsControler(1-tp) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local d=Duel.GetAttackTarget() @@ -54,7 +54,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.spfilter(c,e,tp) - return c:IsLevelAbove(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelAbove(4) and c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end diff --git a/official/c22754505.lua b/official/c22754505.lua index cf914b4647..0b0a3a80ba 100644 --- a/official/c22754505.lua +++ b/official/c22754505.lua @@ -1,4 +1,5 @@ --スモール・ピース・ゴーレム +--Small Piece Golem local s,id=GetID() function s.initial_effect(c) --spsummon @@ -39,13 +40,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c22765132.lua b/official/c22765132.lua index cbf5dd621b..2b57a798e1 100644 --- a/official/c22765132.lua +++ b/official/c22765132.lua @@ -1,4 +1,5 @@ --EMコール +--Performapal Call local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.filter(c,def) - return c:IsSetCard(0x9f) and c:IsDefenseBelow(def) and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsDefenseBelow(def) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local at=Duel.GetAttacker() @@ -53,17 +54,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) then + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) - --lizard check - aux.addTempLizardCheck(e:GetHandler(),tp,aux.TRUE,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0xff,0,Duel.GetTurnPlayer()==tp and 2 or 1) + aux.addTempLizardCheck(e:GetHandler(),tp,aux.TRUE,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0xff,0,Duel.IsTurnPlayer(tp) and 2 or 1) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c22790789.lua b/official/c22790789.lua index eee577a90d..3fcf715345 100644 --- a/official/c22790789.lua +++ b/official/c22790789.lua @@ -1,4 +1,5 @@ --巨大戦艦 クリスタル・コア +--B.E.S. Crystal Core local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x1f) @@ -93,4 +94,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c22790910.lua b/official/c22790910.lua index 40536daa7b..909deb620b 100644 --- a/official/c22790910.lua +++ b/official/c22790910.lua @@ -46,7 +46,7 @@ function s.spcfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c22796548.lua b/official/c22796548.lua index db7bd00f85..702e023d2b 100644 --- a/official/c22796548.lua +++ b/official/c22796548.lua @@ -14,15 +14,11 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c22802010.lua b/official/c22802010.lua index b7b5ce12f8..f43bb95985 100644 --- a/official/c22802010.lua +++ b/official/c22802010.lua @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22804410.lua b/official/c22804410.lua index 35b08b2b7e..5c7e4606f5 100644 --- a/official/c22804410.lua +++ b/official/c22804410.lua @@ -1,4 +1,5 @@ --ディープアイズ・ホワイト・ドラゴン +--Deep-Eyes White Dragon local s,id=GetID() function s.initial_effect(c) --spsummon @@ -37,7 +38,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.spfilter(c,tp) - return c:IsPreviousSetCard(0xdd) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) + return c:IsPreviousSetCard(SET_BLUE_EYES) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -77,7 +78,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -93,4 +94,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c22804644.lua b/official/c22804644.lua index 587ab143e6..0084b12e68 100644 --- a/official/c22804644.lua +++ b/official/c22804644.lua @@ -1,4 +1,5 @@ --デス・ウイルス・ドラゴン +--Doom Virus Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -31,7 +32,7 @@ function s.filter(c) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) + local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE|LOCATION_HAND) if #conf>0 then Duel.ConfirmCards(tp,conf) local dg=conf:Filter(s.filter,nil) @@ -44,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -52,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.turncon) e2:SetOperation(s.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e2,tp) e2:SetLabelObject(e1) local descnum=tp==c:GetOwner() and 0 or 1 @@ -64,7 +65,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(e2) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e3) end function s.reset(e,tp,eg,ep,ev,re,r,rp) @@ -80,7 +81,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(ep) end function s.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.turnop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -91,4 +92,4 @@ function s.turnop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():Reset() if re then re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c22812068.lua b/official/c22812068.lua index 22da29e97a..6103ecc79c 100644 --- a/official/c22812068.lua +++ b/official/c22812068.lua @@ -1,4 +1,5 @@ --機甲忍者アース +--Earth Armor Ninja local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,4 +16,4 @@ function s.spcon(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c22819092.lua b/official/c22819092.lua index 12383673d5..7f625585a3 100644 --- a/official/c22819092.lua +++ b/official/c22819092.lua @@ -1,9 +1,9 @@ --- 魚群探知機 --- Fish Sonar --- Scripted by Hatter +--魚群探知機 +--Fish Sonar +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Add to hand + --Add to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c22829942.lua b/official/c22829942.lua index a22608b590..5bf42c27e0 100644 --- a/official/c22829942.lua +++ b/official/c22829942.lua @@ -1,3 +1,4 @@ +--融合再生機構 --Fusion Recycling Plant local s,id=GetID() function s.initial_effect(c) @@ -33,26 +34,25 @@ end s.listed_names={CARD_POLYMERIZATION} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.thfilter2(c,id) - return (c:GetReason()&0x40008)==0x40008 and c:IsMonster() and c:GetTurnID()==id and c:IsAbleToHand() + return (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))==(REASON_FUSION|REASON_MATERIAL) and c:IsMonster() and c:GetTurnID()==id and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tid=Duel.GetTurnCount() @@ -63,9 +63,8 @@ function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22835145.lua b/official/c22835145.lua index 2fdebb111f..fafe1cb96a 100644 --- a/official/c22835145.lua +++ b/official/c22835145.lua @@ -1,4 +1,5 @@ --BF-極北のブリザード +--Blackwing - Blizzard the Far North local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -19,12 +20,12 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelBelow(4) and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c22837504.lua b/official/c22837504.lua index d67280a357..107a23c052 100644 --- a/official/c22837504.lua +++ b/official/c22837504.lua @@ -1,4 +1,5 @@ --霞の谷の戦士 +--Mist Valley Soldier local s,id=GetID() function s.initial_effect(c) --return hand @@ -28,4 +29,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetLabelObject():IsRelateToBattle() then Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22842126.lua b/official/c22842126.lua index 2558b51f4c..5363dcf96e 100644 --- a/official/c22842126.lua +++ b/official/c22842126.lua @@ -1,4 +1,5 @@ --汎神の帝王 +--Pantheism of the Monarchs local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,14 +20,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} function s.cfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,3,nil) end @@ -60,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c22842214.lua b/official/c22842214.lua index 17d249bab2..2027576c1b 100644 --- a/official/c22842214.lua +++ b/official/c22842214.lua @@ -34,10 +34,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) + return ec:IsControler(tp) and ec:IsRace(RACE_FISH|RACE_AQUA|RACE_SEASERPENT) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) and not c:IsForbidden() + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_AQUA|RACE_SEASERPENT) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -51,12 +51,12 @@ end function s.equipop(c,e,tp,tc,chk) local eff=false or chk Duel.Equip(tp,tc,c,false,eff) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(Card.EquipByEffectLimit) e1:SetLabelObject(e:GetLabelObject()) tc:RegisterEffect(e1) @@ -104,8 +104,8 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() g:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(g,REASON_EFFECT|REASON_REPLACE) end function s.atcon(e) return Duel.IsExistingMatchingCard(s.eqfilter,e:GetHandlerPlayer(),LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c22858242.lua b/official/c22858242.lua index 5318c18e2d..9ab309414b 100644 --- a/official/c22858242.lua +++ b/official/c22858242.lua @@ -1,4 +1,5 @@ --猿魔王ゼーマン +--Zeman the Ape King local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -40,9 +41,9 @@ function s.cfilter(c) return c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -53,4 +54,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c22862454.lua b/official/c22862454.lua index 8d834b1a88..ff12474c26 100644 --- a/official/c22862454.lua +++ b/official/c22862454.lua @@ -1,4 +1,5 @@ --プロキシー・ドラゴン +--Proxy Dragon local s,id=GetID() function s.initial_effect(c) --link summon @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.repfilter(c,tp) return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) return c:IsControler(tp) and c:IsMonster() and c:IsDestructable(e) @@ -42,5 +43,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c22865492.lua b/official/c22865492.lua index 57751ae580..342f943649 100644 --- a/official/c22865492.lua +++ b/official/c22865492.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) end s.listed_series={SET_HERO,SET_VISION_HERO} function s.recon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and r&(REASON_BATTLE+REASON_EFFECT)~=0 + return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)~=0 end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end diff --git a/official/c22869904.lua b/official/c22869904.lua index 4e9e16536c..4289eeeea0 100644 --- a/official/c22869904.lua +++ b/official/c22869904.lua @@ -1,4 +1,5 @@ --魔力誘爆 +--That Wacky Alchemy! local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22873798.lua b/official/c22873798.lua index 2b6e87de0d..f4967f4f59 100644 --- a/official/c22873798.lua +++ b/official/c22873798.lua @@ -1,4 +1,5 @@ --ハイエナ +--Hyena local s,id=GetID() function s.initial_effect(c) --special summon @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2287848.lua b/official/c2287848.lua index b10d64867c..ab479c9267 100644 --- a/official/c2287848.lua +++ b/official/c2287848.lua @@ -22,25 +22,26 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_VENDREAD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.thfilter(c) - return c:GetType()&TYPE_SPELL+TYPE_RITUAL ==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g1=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) @@ -75,12 +76,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22888900.lua b/official/c22888900.lua index 8163325896..76bd3e2790 100644 --- a/official/c22888900.lua +++ b/official/c22888900.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) end function s.cfilter(c) return c:IsFaceup() - and (c:IsSummonType(SUMMON_TYPE_TRIBUTE) or c:IsSummonType(SUMMON_TYPE_RITUAL) or c:IsSummonType(SUMMON_TYPE_FUSION)) + and (c:IsTributeSummoned() or c:IsRitualSummoned() or c:IsFusionSummoned()) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -24,10 +24,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.tg) e1:SetCode(EFFECT_DISABLE) - if Duel.GetTurnPlayer()~=tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + if Duel.IsTurnPlayer(1-tp) then + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) end Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -41,10 +41,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,1)) e3:SetTargetRange(1,1) e3:SetTarget(s.splimit) - if Duel.GetTurnPlayer()~=tp then - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + if Duel.IsTurnPlayer(1-tp) then + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) else - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) end Duel.RegisterEffect(e3,tp) end @@ -53,4 +53,4 @@ function s.tg(e,c) end function s.splimit(e,c,tp,sumtp,sumpos) return (sumtp&SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO or (sumtp&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end +end \ No newline at end of file diff --git a/official/c22900219.lua b/official/c22900219.lua index 0672b29fd8..8a11170c04 100644 --- a/official/c22900219.lua +++ b/official/c22900219.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0x11a)) + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DINOWRESTLER)) --actlimit upon attacking local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -46,10 +46,10 @@ function s.initial_effect(c) e5:SetOperation(s.desop) c:RegisterEffect(e5) end -s.listed_series={0x11a} -s.material_setcode={0x11a} +s.listed_series={SET_DINOWRESTLER} +s.material_setcode={SET_DINOWRESTLER} function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_LINK,fc,sumtype,tp) and c:IsSetCard(0x11a,fc,sumtype,tp) + return c:IsType(TYPE_LINK,fc,sumtype,tp) and c:IsSetCard(SET_DINOWRESTLER,fc,sumtype,tp) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) @@ -70,7 +70,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.filter(c) @@ -90,5 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c22908820.lua b/official/c22908820.lua index 3990931679..d5642186c8 100644 --- a/official/c22908820.lua +++ b/official/c22908820.lua @@ -1,58 +1,52 @@ ---E・HERO サンライザー ---Elemental HERO Sunriser +--E・HERO サンライザー +--Elemental HERO Sunrise --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) - --Fusion procedure c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,s.ffilter,2) - --spsummon condition + --Fusion Materials: 2 "HERO" monsters with different Attributes + Fusion.AddProcMixN(c,true,true,s.matfilter,2) + c:AddMustBeFusionSummoned() + --Monsters you control gain 200 ATK for each different Attribute you control local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EFFECT_SPSUMMON_CONDITION) - e1:SetValue(aux.fuslimit) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetRange(LOCATION_MZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetValue(function(e,c) return 200*Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil):GetBinClassCount(Card.GetAttribute) end) c:RegisterEffect(e1) - --Search + --Add 1 "Miracle Fusion" from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,id) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - --atk up + --Destroy 1 card on the field local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetCode(EFFECT_UPDATE_ATTACK) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetValue(s.val) + e3:SetCountLimit(1,{id,1}) + e3:SetCondition(s.descon) + e3:SetTarget(s.destg) + e3:SetOperation(s.desop) c:RegisterEffect(e3) - --destroy - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_DESTROY) - e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_ATTACK_ANNOUNCE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetRange(LOCATION_MZONE) - e4:SetCountLimit(1,{id,1}) - e4:SetCondition(s.descon) - e4:SetTarget(s.destg) - e4:SetOperation(s.desop) - c:RegisterEffect(e4) end -s.material_setcode={0x8} -s.listed_series={0x8} -s.listed_names={45906428} -function s.ffilter(c,fc,sumtype,tp,sub,mg,sg) - return c:IsSetCard(0x8,fc,sumtype,tp) and c:GetAttribute(fc,sumtype,tp)~=0 and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetAttribute(fc,sumtype,tp),fc,sumtype,tp)) +s.material_setcode={SET_HERO} +s.listed_series={SET_HERO} +s.listed_names={45906428} --"Miracle Fusion" +function s.matfilter(c,fc,sumtype,tp,sub,mg,sg) + return c:IsSetCard(SET_HERO,fc,sumtype,tp) and c:GetAttribute(fc,sumtype,tp)~=0 and (not sg or not sg:IsExists(s.diffattrfilter,1,c,c:GetAttribute(fc,sumtype,tp),fc,sumtype,tp)) end -function s.fusfilter(c,attr,fc,sumtype,tp) +function s.diffattrfilter(c,attr,fc,sumtype,tp) return c:IsAttribute(attr,fc,sumtype,tp) and not c:IsHasEffect(511002961) end function s.thfilter(c) @@ -70,32 +64,16 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.val(e,c) - local tp=e:GetHandlerPlayer() - local att=0 - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - for tc in aux.Next(g) do - att=(att|tc:GetAttribute()) - end - local ct=0 - while att~=0 do - if (att&0x1)~=0 then ct=ct+1 end - att=(att>>1) - end - return ct*200 -end function s.descon(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return a~=e:GetHandler() and a:IsControler(tp) and a:IsSetCard(0x8) - or at and at~=e:GetHandler() and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x8) + local bc=Duel.GetBattleMonster(tp) + return bc and bc~=e:GetHandler() and bc:IsSetCard(SET_HERO) and bc:IsFaceup() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() diff --git a/official/c22923081.lua b/official/c22923081.lua index 1130574b07..437247791c 100644 --- a/official/c22923081.lua +++ b/official/c22923081.lua @@ -56,7 +56,7 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp) end end function s.addcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.atkval(e,c) return c:GetCounter(COUNTER_SPELL)*400 @@ -66,7 +66,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,COUNTER_SPELL,1,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -80,4 +80,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22933016.lua b/official/c22933016.lua index 48eb26ac88..b0eb22369f 100644 --- a/official/c22933016.lua +++ b/official/c22933016.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x135,0x136} +s.listed_series={SET_IGNISTER,SET_AI} function s.spfilter(c,e,tp) - return c:IsSetCard(0x135) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IGNISTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -72,19 +72,19 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x136) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_AI) and c:IsSpellTrap() and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c22953211.lua b/official/c22953211.lua index 6642608c64..9712848cf5 100644 --- a/official/c22953211.lua +++ b/official/c22953211.lua @@ -31,4 +31,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) then return end local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c2295440.lua b/official/c2295440.lua index 8f15b8302e..78e0b81d2c 100644 --- a/official/c2295440.lua +++ b/official/c2295440.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end function s.costfilter(c,e,tp) return c:IsMonster() and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) end function s.filter(c,e,tp) return c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -30,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(0) return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) else - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end end if e:GetLabel()~=0 then @@ -39,11 +39,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) Duel.SendtoGrave(g,REASON_COST) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c2295831.lua b/official/c2295831.lua index a359edcf88..81be820936 100644 --- a/official/c2295831.lua +++ b/official/c2295831.lua @@ -22,7 +22,7 @@ end function s.regcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=3 - and Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_RULE) + and Duel.IsPhase(PHASE_DRAW) and c:IsReason(REASON_RULE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -30,13 +30,13 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_PHASE+PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) + c:RegisterFlagEffect(id,RESET_PHASE|PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end @@ -52,4 +52,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c22959079.lua b/official/c22959079.lua index 6de9864b6e..3d009a06b0 100644 --- a/official/c22959079.lua +++ b/official/c22959079.lua @@ -26,11 +26,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local seq=tc:GetSequence() if tc:IsControler(1-tp) then seq=seq+16 end - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,2) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.rtcon) @@ -63,4 +63,4 @@ end function s.disop(e,tp) local dis1=(0x1<0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23008320.lua b/official/c23008320.lua index 65721cbf40..2824b1232d 100644 --- a/official/c23008320.lua +++ b/official/c23008320.lua @@ -1,4 +1,5 @@ --コール・リゾネーター +--Resonator Call local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.filter(c) - return c:IsSetCard(0x57) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_RESONATOR) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c23015896.lua b/official/c23015896.lua index aa7687a09a..1d121c9f0e 100644 --- a/official/c23015896.lua +++ b/official/c23015896.lua @@ -1,4 +1,5 @@ --炎王神獣 ガルドニクス +--Fire King High Avatar Garunix local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -40,16 +41,16 @@ function s.initial_effect(c) e4:SetOperation(s.spop2) c:RegisterEffect(e4) end -s.listed_series={0x81} +s.listed_series={SET_FIRE_KING} function s.spreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 then return end - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) then return end + if Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -83,7 +84,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x81) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_KING) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -97,4 +98,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23020408.lua b/official/c23020408.lua index c56b53b374..9e082dc7c4 100644 --- a/official/c23020408.lua +++ b/official/c23020408.lua @@ -20,25 +20,25 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL,id} -s.listed_series={0x13a} +s.listed_series={SET_PALLADIUM} function s.filter(c,deckCount) return not c:IsCode(id) and (c:IsCode(CARD_DARK_MAGICIAN) or c:ListsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL)) and (c:IsLocation(LOCATION_DECK) and deckCount>1 or not c:IsLocation(LOCATION_DECK) and c:IsAbleToDeck()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,ct):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,ct):GetFirst() if tc then if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) @@ -54,16 +54,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.drfilter(c) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) - and ((c:IsSetCard(0x13a) and c:IsMonster()) or c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL)) + and ((c:IsSetCard(SET_PALLADIUM) and c:IsMonster()) or c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL)) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil):GetClassCount(Card.GetCode) + local ct=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil):GetClassCount(Card.GetCode) if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil):GetClassCount(Card.GetCode) + local ct=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil):GetClassCount(Card.GetCode) Duel.Draw(p,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23051413.lua b/official/c23051413.lua index fa50ddae4e..5296513350 100644 --- a/official/c23051413.lua +++ b/official/c23051413.lua @@ -1,4 +1,5 @@ --ナチュル・スタッグ +--Naturia Stag Beetle local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and e:GetHandler()==Duel.GetAttacker() end function s.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NATURIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23064604.lua b/official/c23064604.lua index 187c3d356e..a218bd41ae 100644 --- a/official/c23064604.lua +++ b/official/c23064604.lua @@ -31,27 +31,27 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.tgfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToGrave() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToGrave() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) return g:GetClassCount(Card.GetCode)>1 - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,1-tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if g:GetClassCount(Card.GetCode)<2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tg1=g:Select(tp,1,1,nil) @@ -98,19 +98,18 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,1,nil) Duel.HintSelection(sg) end - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.cfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsDiscardable() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsAbleToHand() @@ -127,4 +126,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23068051.lua b/official/c23068051.lua index bb863949bd..cb40d28af6 100644 --- a/official/c23068051.lua +++ b/official/c23068051.lua @@ -1,4 +1,5 @@ --幽麗なる幻滝 +--Waterfall of Dragon Souls local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,9 +44,9 @@ function s.filter2(c) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsRace(RACE_WYRM) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil) end local ft=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE+LOCATION_HAND,0,nil) + local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE|LOCATION_HAND,0,nil) local ct=math.min(ft-1,#g+1) local sg=g:Select(tp,1,ct,nil) e:SetLabel(#sg+1) @@ -60,4 +61,4 @@ end function s.activate2(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23085002.lua b/official/c23085002.lua index 73ed7b6716..b14da367b3 100644 --- a/official/c23085002.lua +++ b/official/c23085002.lua @@ -1,6 +1,5 @@ --No.68 魔天牢サンダルフォン --Number 68: Sanaphond the Sky Prison - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -24,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetOperation(s.operation) c:RegisterEffect(e3) end @@ -32,10 +31,6 @@ s.xyz_number=68 function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsMonster,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*100 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -47,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end --Neither player can special summon from the GYs @@ -58,9 +53,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetTargetRange(1,1) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) return c:IsLocation(LOCATION_GRAVE) -end +end \ No newline at end of file diff --git a/official/c23087070.lua b/official/c23087070.lua index a7646ce126..465a829a7c 100644 --- a/official/c23087070.lua +++ b/official/c23087070.lua @@ -1,4 +1,5 @@ --ローズ・ウィッチ +--Rose Witch local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsRace(RACE_PLANT) -end +end \ No newline at end of file diff --git a/official/c23093604.lua b/official/c23093604.lua index f5b520d65d..7b918686df 100644 --- a/official/c23093604.lua +++ b/official/c23093604.lua @@ -1,4 +1,5 @@ --X-セイバー パシウル +--X-Saber Pashuul local s,id=GetID() function s.initial_effect(c) --damage @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCondition(s.condition) e1:SetTarget(s.target) @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23099524.lua b/official/c23099524.lua index ec21decb98..3b75ca3c6b 100644 --- a/official/c23099524.lua +++ b/official/c23099524.lua @@ -57,10 +57,10 @@ function s.atkfilter(c) return c:IsTrap() and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)*300 + return Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil)*300 end function s.thcfilter(c) - return c:IsRace(RACE_FAIRY+RACE_FIEND+RACE_REPTILE) + return c:IsRace(RACE_FAIRY|RACE_FIEND|RACE_REPTILE) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.thcfilter,1,false,nil,nil) end @@ -88,6 +88,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c2311090.lua b/official/c2311090.lua index 848b3775fe..b23da211b3 100644 --- a/official/c2311090.lua +++ b/official/c2311090.lua @@ -1,9 +1,9 @@ --- スプライト・キャロット --- Splight Carrot --- Scripted by Hatter +--スプライト・キャロット +--Spright Carrot +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Negate Spell/Trap effect + --Negate Spell/Trap effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) @@ -35,7 +35,7 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev) + return rp==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end function s.discostfilter(c) return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2) diff --git a/official/c23116808.lua b/official/c23116808.lua index 59d79843bf..69c9444f84 100644 --- a/official/c23116808.lua +++ b/official/c23116808.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -92,7 +92,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c23118924.lua b/official/c23118924.lua index 82c22a522c..def45b86cc 100644 --- a/official/c23118924.lua +++ b/official/c23118924.lua @@ -1,4 +1,5 @@ --エレメント・デビル +--Element Doom local s,id=GetID() function s.initial_effect(c) --disable @@ -29,12 +30,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end function s.atcon(e,tp,eg,ep,ev,re,r,rp) @@ -43,4 +44,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c23122036.lua b/official/c23122036.lua index 0fdc4ed5a5..c2d2596195 100644 --- a/official/c23122036.lua +++ b/official/c23122036.lua @@ -32,13 +32,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) @@ -57,4 +57,4 @@ function s.valcon(e,re,r,rp) end function s.damcon(e) return e:GetHandler():GetEquipTarget():GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c2314238.lua b/official/c2314238.lua index 138d1b84ff..e788356efb 100644 --- a/official/c2314238.lua +++ b/official/c2314238.lua @@ -17,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_DARK_MAGICIAN),tp,LOCATION_ONFIELD,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -28,4 +28,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23147658.lua b/official/c23147658.lua index c0603f9fa4..f5bae8ba97 100644 --- a/official/c23147658.lua +++ b/official/c23147658.lua @@ -59,7 +59,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) end --Check if current phase is player's end phase function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end --Lose 600 ATK during each of your end phases function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -68,6 +68,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c23151193.lua b/official/c23151193.lua index 771b33ab57..5920d0e72a 100644 --- a/official/c23151193.lua +++ b/official/c23151193.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.PayLPCost(1/2)) + e2:SetCost(Cost.PayLP(1/2)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c23153227.lua b/official/c23153227.lua index 5bb0e92863..ff84b4554b 100644 --- a/official/c23153227.lua +++ b/official/c23153227.lua @@ -1,5 +1,5 @@ --七皇昇格 ---Ascension of the Seven Emperors +--Seventh Ascension --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -26,10 +26,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x177,0x1178,0x95} +s.listed_series={SET_SEVENTH,SET_BARIANS,SET_RANK_UP_MAGIC} function s.filter(c,dct) - return ((((c:IsSetCard(0x177) and not c:IsCode(id)) or c:IsSetCard(0x1178)) and c:IsSpellTrap()) - or (c:IsSetCard(0x95) and c:GetType()==TYPE_QUICKPLAY+TYPE_SPELL)) + return ((((c:IsSetCard(SET_SEVENTH) and not c:IsCode(id)) or c:IsSetCard(SET_BARIANS)) and c:IsSpellTrap()) + or (c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsQuickPlaySpell())) and (c:IsAbleToHand() or dct>1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -58,7 +58,7 @@ function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.copyfilter(c) - return c:IsAbleToGraveAsCost() and c:IsSetCard(0x95) and c:IsSpell() + return c:IsAbleToGraveAsCost() and c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() and c:CheckActivateEffect(true,true,false)~=nil end function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -97,4 +97,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) end -end +end \ No newline at end of file diff --git a/official/c23160024.lua b/official/c23160024.lua index c2ef288f49..ccc8791644 100644 --- a/official/c23160024.lua +++ b/official/c23160024.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe0)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_AMORPHAGE)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -33,13 +33,13 @@ function s.initial_effect(c) local e5=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsCode,98287529),lv=8,matfilter=aux.FilterBoolFunction(Card.IsType,TYPE_PENDULUM)}) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_GRAVE) - e5:SetCost(aux.bfgcost) + e5:SetCost(Cost.SelfBanish) c:RegisterEffect(e5) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} s.listed_names={98287529} function s.cfilter(c,tp) - return c:IsPreviousSetCard(0xe0) and c:IsReason(REASON_RELEASE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_AMORPHAGE) and c:IsReason(REASON_RELEASE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -47,4 +47,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,e:GetHandler():GetCode()) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2316186.lua b/official/c2316186.lua index 45ad5af9e6..df50d3bb6c 100644 --- a/official/c2316186.lua +++ b/official/c2316186.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) @@ -36,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) Duel.Damage(p,ct*600,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23166823.lua b/official/c23166823.lua index 897bee3d25..9795e5af33 100644 --- a/official/c23166823.lua +++ b/official/c23166823.lua @@ -1,4 +1,5 @@ --影霊獣使い-セフィラウェンディ +--Ritual Beast Tamer Zefrawendi local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -26,17 +27,17 @@ function s.initial_effect(c) e4:SetCondition(s.condition) c:RegisterEffect(e4) end -s.listed_series={0xb5,0xc4} +s.listed_series={SET_RITUAL_BEAST,SET_ZEFRA} s.listed_names={id} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb5) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard(SET_RITUAL_BEAST) or c:IsSetCard(SET_ZEFRA) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc4) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ZEFRA) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end @@ -49,4 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c23168060.lua b/official/c23168060.lua index fd25c01844..090712b694 100644 --- a/official/c23168060.lua +++ b/official/c23168060.lua @@ -1,4 +1,5 @@ --鍵戦士キーマン +--Key Man the Key Warrior local s,id=GetID() function s.initial_effect(c) --lv change @@ -22,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c23171610.lua b/official/c23171610.lua index e137029e8c..b7f5d48255 100644 --- a/official/c23171610.lua +++ b/official/c23171610.lua @@ -1,4 +1,5 @@ --リミッター解除 +--Limiter Removal local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),tp,LOCATION_MZONE,0,1,nil) end end @@ -31,17 +29,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end sg:KeepAlive() local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetCountLimit(1) e2:SetLabel(fid) e2:SetLabelObject(sg) @@ -65,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=g:Filter(s.desfilter,nil,e:GetLabel()) g:DeleteGroup() Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23187256.lua b/official/c23187256.lua index 95ecee92b3..3d7cea6512 100644 --- a/official/c23187256.lua +++ b/official/c23187256.lua @@ -28,10 +28,10 @@ function s.initial_effect(c) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e3) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=93 function s.xyzfilter(c,xyz,sumtype,tp) - return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsSetCard(0x48,xyz,sumtype,tp) and c:GetOverlayCount()>0 + return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) and c:GetOverlayCount()>0 end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) @@ -41,7 +41,7 @@ function s.check(c,rk) return c:GetRank()~=rk and not c:IsHasEffect(511001175) end function s.filter(c,e,tp,rp) - return c:IsRankBelow(9) and c:IsAttackBelow(3000) and c:IsSetCard(0x48) + return c:IsRankBelow(9) and c:IsAttackBelow(3000) and c:IsSetCard(SET_NUMBER) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -67,12 +67,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) g1:Match(s.gfilter,nil,tp,rp,tc:GetRank()) ct=ct-1 @@ -88,20 +88,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(0,1) e3:SetValue(HALF_DAMAGE) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,2)) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end function s.indfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) end function s.indcon(e) return Duel.IsExistingMatchingCard(s.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c23204029.lua b/official/c23204029.lua index 2d344351ac..ddc27c620a 100644 --- a/official/c23204029.lua +++ b/official/c23204029.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa008),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MASKED_HERO),2) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -34,8 +34,8 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xa008} -s.material_setcode={0x8,0xa008} +s.listed_series={SET_MASKED_HERO} +s.material_setcode={SET_HERO,SET_MASKED_HERO} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsNegatable() end if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -52,22 +52,22 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c23205979.lua b/official/c23205979.lua index 088b4c414c..e0ff259196 100644 --- a/official/c23205979.lua +++ b/official/c23205979.lua @@ -54,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end function s.sdcon(e) return e:GetHandler():GetOwnerTargetCount()>0 @@ -82,4 +82,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if c:GetFlagEffect(id)>0 and not c:IsHasEffect(EFFECT_DISABLE) and not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23212990.lua b/official/c23212990.lua index 88e0eecc90..d9b34087d3 100644 --- a/official/c23212990.lua +++ b/official/c23212990.lua @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) --Return 1 card your opponent controls to the hand Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23213239.lua b/official/c23213239.lua index 78ab78eae7..f2bb5144e3 100644 --- a/official/c23213239.lua +++ b/official/c23213239.lua @@ -1,5 +1,5 @@ --激動の未界域 ---Danger! Disaster! +--Danger! Disturbance! Disorder! --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} function s.cfilter(c,tp) local rc=c:GetReasonCard() - return c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp and c:IsSetCard(0x11e) + return c:IsReason(REASON_BATTLE) and c:GetPreviousControler()==tp and c:IsSetCard(SET_DANGER) and rc and rc:IsControler(1-tp) and rc:IsRelateToBattle() end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) @@ -55,7 +55,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.descfilter(c) - return c:IsSetCard(0x11e) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_DANGER) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.descfilter,tp,LOCATION_GRAVE,0,1,nil) @@ -82,9 +82,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x11e) -end + return not c:IsSetCard(SET_DANGER) +end \ No newline at end of file diff --git a/official/c23220533.lua b/official/c23220533.lua index e57185cbff..2191c3e704 100644 --- a/official/c23220533.lua +++ b/official/c23220533.lua @@ -1,10 +1,9 @@ --ホーリーナイツ・レイエル ---Holy Night Rayel +--Starry Knight Rayel --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) - --Search 1 "Holy Night" Spell/Trap when NS + --Add 1 "Starry Knight" Spell/Trap from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -14,23 +13,23 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Banish itself and Special Summon from GY + --Special Summon 1 "Starry Knight" monster from your GY, except "Starry Knight Rayel" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) - e2:SetTarget(s.sstg) - e2:SetOperation(s.ssop) + e2:SetCost(Cost.SelfBanish) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) c:RegisterEffect(e2) end +s.listed_series={SET_STARRY_KNIGHT} s.listed_names={id} -s.listed_series={0x15b} function s.thfilter(c) - return c:IsSetCard(0x15b) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_STARRY_KNIGHT) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,22 +43,20 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.ssfilter(c,e,tp) - return c:IsSetCard(0x15b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_STARRY_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end -function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.ssfilter(chkc,e,tp) end - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingTarget(s.ssfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) - end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tg=Duel.SelectTarget(tp,s.ssfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end -function s.ssop(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c23220863.lua b/official/c23220863.lua index bd9b4060b4..3d8dc94d3d 100644 --- a/official/c23220863.lua +++ b/official/c23220863.lua @@ -1,4 +1,5 @@ --シュルブの魔導騎兵 +--Magical Cavalry of Cxulub local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,5 +14,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and not te:GetOwner():IsType(TYPE_PENDULUM) -end + return te:IsMonsterEffect() and te:IsActivated() and not te:GetOwner():IsType(TYPE_PENDULUM) +end \ No newline at end of file diff --git a/official/c2322421.lua b/official/c2322421.lua index 0ed33bc97c..8a2c708fbb 100644 --- a/official/c2322421.lua +++ b/official/c2322421.lua @@ -18,12 +18,12 @@ function s.initial_effect(c) end s.material={71971554} s.listed_names={71971554} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,71971554) or c:IsHasEffect(20932152) end function s.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR+RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(2) and c:IsRace(RACE_WARRIOR|RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -37,4 +37,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23232295.lua b/official/c23232295.lua index c6cfa106fc..c6d23eff64 100644 --- a/official/c23232295.lua +++ b/official/c23232295.lua @@ -1,9 +1,10 @@ --BK 拘束蛮兵リードブロー +--Battlin' Boxer Lead Yoke local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x84),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BATTLIN_BOXER),4,2) c:EnableReviveLimit() --destroy replace local e1=Effect.CreateEffect(c) @@ -23,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x84) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_BATTLIN_BOXER) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -56,8 +57,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(800) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c23234094.lua b/official/c23234094.lua index b3fd89aa72..9d9fa0b6fb 100644 --- a/official/c23234094.lua +++ b/official/c23234094.lua @@ -1,4 +1,5 @@ --エヴォルダー・エリアス +--Evolsaur Elias local s,id=GetID() function s.initial_effect(c) --spsummon @@ -29,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,181,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23265313.lua b/official/c23265313.lua index fbfb48db08..8565dccaf5 100644 --- a/official/c23265313.lua +++ b/official/c23265313.lua @@ -1,4 +1,5 @@ --コストダウン +--Cost Down local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -22,13 +23,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_TO_HAND) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetOperation(s.hlvop) Duel.RegisterEffect(e2,tp) end @@ -43,7 +44,7 @@ function s.hlvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c23265594.lua b/official/c23265594.lua index bb83113169..5b16c732e9 100644 --- a/official/c23265594.lua +++ b/official/c23265594.lua @@ -1,4 +1,5 @@ --強化支援メカ・ヘビーウェポン +--Heavy Mech Support Platform local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)) diff --git a/official/c2326738.lua b/official/c2326738.lua index 1119e72ef9..adeaea4b19 100644 --- a/official/c2326738.lua +++ b/official/c2326738.lua @@ -25,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -43,4 +43,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23269426.lua b/official/c23269426.lua index 5a212b40ed..5d14a1821d 100644 --- a/official/c23269426.lua +++ b/official/c23269426.lua @@ -1,4 +1,5 @@ --最期の同調 +--Final Gesture local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.spfilter(c,e,tp,code) end function s.filter(c,e,tp) return c:IsFaceup() and c:GetLevel()==3 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -24,24 +25,24 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) if #sg>0 and Duel.SpecialSummonStep(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sg:GetFirst():RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sg:GetFirst():RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -50,10 +51,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23270035.lua b/official/c23270035.lua index 833efe4209..b102dae06d 100644 --- a/official/c23270035.lua +++ b/official/c23270035.lua @@ -1,8 +1,8 @@ --モンスターアソート ---Assorted Monsters +--Monster Assortment --Scripted by Eerie Code local s,id=GetID() -function s.initial_effect(c) +function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsMonster() and c:IsType(TYPE_NORMAL+TYPE_EFFECT) and c:HasLevel() and c:IsAbleToHand() + return c:IsMonster() and c:IsType(TYPE_NORMAL|TYPE_EFFECT) and c:HasLevel() and c:IsAbleToHand() end function s.check(sg,e,tp) return sg:GetClassCount(Card.GetRace)==1 and sg:GetClassCount(Card.GetAttribute)==1 diff --git a/official/c23274061.lua b/official/c23274061.lua index 1dffaf23ec..e558366e12 100644 --- a/official/c23274061.lua +++ b/official/c23274061.lua @@ -1,4 +1,5 @@ --エレキタリス +--Wattsquirrel local s,id=GetID() function s.initial_effect(c) --Extra attack @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_OVERLAY)&~(RESET_LEAVE|RESET_TOGRAVE)) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c23282832.lua b/official/c23282832.lua index 10ec472922..3aef4dd9d0 100644 --- a/official/c23282832.lua +++ b/official/c23282832.lua @@ -1,4 +1,5 @@ --オーバーリミット +--Over Limit local s,id=GetID() function s.initial_effect(c) --activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) @@ -16,10 +17,6 @@ function s.filter(c,e,tp,tid) return c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsType(TYPE_NORMAL) and c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,Duel.GetTurnCount()) end @@ -34,4 +31,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23289281.lua b/official/c23289281.lua index 9ff43a26a8..49dd67e6e2 100644 --- a/official/c23289281.lua +++ b/official/c23289281.lua @@ -1,4 +1,5 @@ --カラテマン +--Karate Man local s,id=GetID() function s.initial_effect(c) --atk @@ -18,7 +19,7 @@ function s.operaion(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,7 +29,7 @@ function s.operaion(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,4 +40,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23296404.lua b/official/c23296404.lua index 12752cb4a6..0f99c0b7cb 100644 --- a/official/c23296404.lua +++ b/official/c23296404.lua @@ -1,4 +1,5 @@ --イグナイト・アヴェンジャー +--Igknight Lancer local s,id=GetID() function s.initial_effect(c) --spsummon @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) end function s.desfilter2(c,e) return s.desfilter(c) and c:IsCanBeEffectTarget(e) @@ -48,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) and c:IsAbleToHand() end function s.tdfilter(c) return c:IsSpellTrap() and c:IsAbleToDeck() @@ -67,6 +68,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23297235.lua b/official/c23297235.lua index 69693035c5..a6c30d5e2a 100644 --- a/official/c23297235.lua +++ b/official/c23297235.lua @@ -1,4 +1,5 @@ --フレムベル・ヘルドッグ +--Flamvell Firedog local s,id=GetID() function s.initial_effect(c) --special summon @@ -28,4 +29,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23299957.lua b/official/c23299957.lua index 0d29050a85..d3297ff4d3 100644 --- a/official/c23299957.lua +++ b/official/c23299957.lua @@ -1,14 +1,12 @@ --ビークロイド・コネクション・ゾーン --Vehicroid Connection Zone - local s,id=GetID() function s.initial_effect(c) --Fusion summon 1 "Vehicroid" fusion monster --Using monsters from hand or field as fusion material - c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1016),nil,nil,nil,nil,s.stage2)) + c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_VEHICROID),nil,nil,nil,nil,s.stage2)) end -s.listed_series={0x1016} - +s.listed_series={SET_VEHICROID} function s.stage2(e,tc,tp,sg,chk) if chk==1 then local c=e:GetHandler() @@ -19,7 +17,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) --Cannot be negated local e2=Effect.CreateEffect(c) @@ -27,14 +25,14 @@ function s.stage2(e,tc,tp,sg,chk) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_DISEFFECT) e3:SetRange(LOCATION_MZONE) e3:SetValue(s.efilter) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) end end diff --git a/official/c23303072.lua b/official/c23303072.lua index ffe4a2cd86..15c182c2bc 100644 --- a/official/c23303072.lua +++ b/official/c23303072.lua @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c23309606.lua b/official/c23309606.lua index 82ee71a20d..d05311921e 100644 --- a/official/c23309606.lua +++ b/official/c23309606.lua @@ -51,12 +51,12 @@ function s.otop(e,tp,eg,ep,ev,re,r,rp,c) local sg=e:GetLabelObject() if not sg then return end local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)-c - Duel.SendtoGrave(hg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(hg,REASON_COST|REASON_DISCARD) c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) + Duel.Release(sg,REASON_SUMMON|REASON_MATERIAL) sg:DeleteGroup() end function s.val(e,c) local tp=c:GetControler() return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-500+500+Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*200 -end +end \ No newline at end of file diff --git a/official/c23314220.lua b/official/c23314220.lua index 8c1daf906b..9d6ca1d43f 100644 --- a/official/c23314220.lua +++ b/official/c23314220.lua @@ -1,4 +1,5 @@ --ルドラの魔導書 +--Spellbook of Knowledge local s,id=GetID() function s.initial_effect(c) --activate @@ -11,24 +12,24 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} s.listed_names={id} function s.filter(c) - return (((c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0x106e)) + return (((c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(SET_SPELLBOOK)) or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_SPELLCASTER))) and not c:IsCode(id) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,e:GetHandler()) local tc=g:GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23323812.lua b/official/c23323812.lua index c03246982d..ca798e9672 100644 --- a/official/c23323812.lua +++ b/official/c23323812.lua @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local atk=tc:GetPreviousAttackOnField() Duel.Recover(tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23327298.lua b/official/c23327298.lua index a70dbd6554..d059f872c9 100644 --- a/official/c23327298.lua +++ b/official/c23327298.lua @@ -1,4 +1,5 @@ --パラレル・セレクト +--Parallel Selection local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c23331400.lua b/official/c23331400.lua index 4221a60af0..4a023d70cf 100644 --- a/official/c23331400.lua +++ b/official/c23331400.lua @@ -37,4 +37,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2333365.lua b/official/c2333365.lua index 41e73e1103..94424b1595 100644 --- a/official/c2333365.lua +++ b/official/c2333365.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) e2:SetValue(s.atlimit) c:RegisterEffect(e2) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.descon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x42),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NORDIC),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end function s.atlimit(e,c) - return c:IsFaceup() and c:GetCode()~=id and c:IsSetCard(0x42) -end + return c:IsFaceup() and c:GetCode()~=id and c:IsSetCard(SET_NORDIC) +end \ No newline at end of file diff --git a/official/c23338098.lua b/official/c23338098.lua index 5c8a2f01c6..982a503167 100644 --- a/official/c23338098.lua +++ b/official/c23338098.lua @@ -1,4 +1,5 @@ --A BF-涙雨のチドリ +--Assault Blackwing - Chidori the Rain Sprinkling local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -38,18 +39,18 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} s.listed_names={id} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x33) then + if g:IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.tncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==1 end function s.tnop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -58,11 +59,11 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.atkfilter(c) - return c:IsMonster() and c:IsSetCard(0x33) + return c:IsMonster() and c:IsSetCard(SET_BLACKWING) end function s.value(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*300 @@ -86,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23361526.lua b/official/c23361526.lua index 711383ef49..bc83667d4c 100644 --- a/official/c23361526.lua +++ b/official/c23361526.lua @@ -1,5 +1,5 @@ --HSRコルク-10 ---Hi-Speedroid Cork Blaster +--Hi-Speedroid Cork Shooter --Scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) @@ -42,12 +42,12 @@ function s.initial_effect(c) --Cannot Summon non-WIND monsters the turn you activate effect Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.counterfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) end function s.syncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.syncost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -56,7 +56,7 @@ function s.syncost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -66,7 +66,7 @@ function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) end function s.thfilter(c) - return c:IsSetCard(0x2016) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -81,11 +81,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==2 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==2 end function s.spfilter(c,e,tp,sync) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and c:GetReason()&0x80008==0x80008 and c:GetReasonCard()==sync + and c:GetReason()&(REASON_SYNCHRO|REASON_MATERIAL)==(REASON_SYNCHRO|REASON_MATERIAL) and c:GetReasonCard()==sync and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -107,10 +107,10 @@ end function s.valcheck(e,c) local g=c:GetMaterial() if not g then return end - local ct=g:FilterCount(Card.IsSetCard,nil,0x2016) + local ct=g:FilterCount(Card.IsSetCard,nil,SET_SPEEDROID) if ct==#g then e:GetLabelObject():SetLabel(2) else e:GetLabelObject():SetLabel(1) end -end +end \ No newline at end of file diff --git a/official/c23377425.lua b/official/c23377425.lua index 8c02dbeb33..6135611d60 100644 --- a/official/c23377425.lua +++ b/official/c23377425.lua @@ -1,5 +1,5 @@ --S-Force ブリッジヘッド ---Security Force Bridgehead +--S-Force Bridgehead --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.cbop) c:RegisterEffect(e2) end -s.listed_series={0x15a} +s.listed_series={SET_S_FORCE} function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x15a) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_S_FORCE) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -38,15 +38,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.cbcon(e,tp,eg,ep,ev,re,r,rp) local bt=Duel.GetAttackTarget() - return bt and bt:IsLocation(LOCATION_MZONE) and bt:IsControler(tp) and bt:IsSetCard(0x15a) and Duel.GetAttacker():GetColumnGroup():IsContains(bt) + return bt and bt:IsLocation(LOCATION_MZONE) and bt:IsControler(tp) and bt:IsSetCard(SET_S_FORCE) and Duel.GetAttacker():GetColumnGroup():IsContains(bt) end function s.cbop(e,tp,eg,ep,ev,re,r,rp) local bt=Duel.GetAttackTarget() - if not (bt:IsRelateToBattle() and bt:IsControler(tp)) then return end + if not (bt:IsRelateToBattle() and bt:IsControler(tp)) then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bt:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c23377694.lua b/official/c23377694.lua index a462d694f2..00356a1142 100644 --- a/official/c23377694.lua +++ b/official/c23377694.lua @@ -1,4 +1,5 @@ --EMオオヤヤドカリ +--Performapal Sellshell Crab local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -25,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.filter1(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) end @@ -37,24 +38,24 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x9f),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_PERFORMAPAL),tp,LOCATION_MZONE,0,nil) if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.cfilter(c,tp) - return c:IsSetCard(0x9f) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and s.spfilter(chkc,e,tp) end @@ -69,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23379054.lua b/official/c23379054.lua index e780032e21..51f7587d77 100644 --- a/official/c23379054.lua +++ b/official/c23379054.lua @@ -29,14 +29,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -53,11 +53,11 @@ function s.filter2(c,e,tp,lv,mc) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter1(chkc,e,tp,c:GetLevel(),c) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter1(chkc,e,tp,c:GetLevel(),c) end if chk==0 then return c:IsAbleToRemove() - and Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel(),c) end + and Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel(),c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp,c:GetLevel(),c) + local g=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp,c:GetLevel(),c) g:AddCard(e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) @@ -75,4 +75,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c23384666.lua b/official/c23384666.lua index 689980b95d..ee98552721 100644 --- a/official/c23384666.lua +++ b/official/c23384666.lua @@ -1,5 +1,5 @@ --機巧蛙-磐盾多邇具久 ---Gizmek Taniguku +--Gizmek Taniguku, the Immobile Intellect --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -66,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c23401839.lua b/official/c23401839.lua index 6d763b7d00..aea74dea10 100644 --- a/official/c23401839.lua +++ b/official/c23401839.lua @@ -1,4 +1,5 @@ --センジュ・ゴッド +--Senju of the Thousand Hands local s,id=GetID() function s.initial_effect(c) --effect @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return (c:GetType()&0x81)==0x81 and c:IsAbleToHand() + return c:IsRitualMonster() and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +29,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c23408872.lua b/official/c23408872.lua index e84554808e..cb37d04353 100644 --- a/official/c23408872.lua +++ b/official/c23408872.lua @@ -1,4 +1,5 @@ --サシカエル +--Tradetoad local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -14,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,aux.ReleaseCheckMMZ,nil,RACE_AQUA) end @@ -22,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FROG) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23421244.lua b/official/c23421244.lua index 7eaea11a72..4ca49f1434 100644 --- a/official/c23421244.lua +++ b/official/c23421244.lua @@ -1,4 +1,5 @@ --リボーン・ゾンビ +--Reborn Zombie local s,id=GetID() function s.initial_effect(c) --cannot destroy @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.condition(e) return e:GetHandler():IsAttackPos() and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end +end \ No newline at end of file diff --git a/official/c23424603.lua b/official/c23424603.lua index 2d8ab6d481..3c770bb72a 100644 --- a/official/c23424603.lua +++ b/official/c23424603.lua @@ -1,4 +1,5 @@ --荒野 +--Wasteland local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,11 +13,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR+RACE_ZOMBIE+RACE_ROCK)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR|RACE_ZOMBIE|RACE_ROCK)) e2:SetValue(200) c:RegisterEffect(e2) --Def local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c23431858.lua b/official/c23431858.lua index 0f7656e33a..f7452e8bd0 100644 --- a/official/c23431858.lua +++ b/official/c23431858.lua @@ -1,5 +1,5 @@ --- ---Skyforce Dragon - Vishuta +--天威龍-ヴィシュダ +--Tenyi Spirit - Vishuda --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -19,11 +19,11 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -57,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23434538.lua b/official/c23434538.lua index 1b384572c7..cb13b2421c 100644 --- a/official/c23434538.lua +++ b/official/c23434538.lua @@ -1,4 +1,5 @@ --増殖するG +--Maxx "C" local s,id=GetID() function s.initial_effect(c) --draw @@ -10,14 +11,10 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -26,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.drcon1) e1:SetOperation(s.drop1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --sp_summon effect local e2=Effect.CreateEffect(c) @@ -34,14 +31,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(s.regcon) e2:SetOperation(s.regop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetCode(EVENT_CHAIN_SOLVED) e3:SetCondition(s.drcon2) e3:SetOperation(s.drop2) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.filter(c,sp) @@ -68,4 +65,4 @@ function s.drop2(e,tp,eg,ep,ev,re,r,rp) local n=Duel.GetFlagEffect(tp,id) Duel.ResetFlagEffect(tp,id) Duel.Draw(tp,n,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23440062.lua b/official/c23440062.lua index 5a7341544f..c085f074d8 100644 --- a/official/c23440062.lua +++ b/official/c23440062.lua @@ -1,4 +1,5 @@ --ウィキッド・リボーン +--Wicked Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,10 +28,6 @@ function s.initial_effect(c) e3:SetOperation(s.desop2) c:RegisterEffect(e3) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c,e,tp) return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -52,14 +49,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e1:SetRange(LOCATION_ONFIELD) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e2:SetRange(LOCATION_ONFIELD) e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -76,4 +73,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23442438.lua b/official/c23442438.lua index 04c2668178..2f1e325b7b 100644 --- a/official/c23442438.lua +++ b/official/c23442438.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) end s.listed_series={SET_WARRIOR,SET_SYNCHRON,SET_STARDUST} function s.cfilter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSynchroSummoned() and c:IsSetCard({SET_WARRIOR,SET_SYNCHRON,SET_STARDUST}) and c:IsControler(tp) and c:GetMaterial():IsExists(s.spfilter,1,nil,e,tp,c) end @@ -68,4 +68,4 @@ function s.chainop(e,tp,eg,ep,ev,re,r,rp) end function s.chainlm(e,rp,tp) return tp==rp -end +end \ No newline at end of file diff --git a/official/c23454876.lua b/official/c23454876.lua index 3fd34fefb6..3370cb5ed1 100644 --- a/official/c23454876.lua +++ b/official/c23454876.lua @@ -1,4 +1,5 @@ --CXダーク・フェアリー・チア・ガール +--CXyz Dark Fairy Cheer Girl local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCondition(s.damcon) - e2:SetCost(s.damcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -45,10 +46,6 @@ end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,51960178) and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -60,4 +57,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*400 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23459650.lua b/official/c23459650.lua index 1c630659d9..e58ff2f5a9 100644 --- a/official/c23459650.lua +++ b/official/c23459650.lua @@ -4,10 +4,10 @@ local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreater({handler=c,filter=s.ritualfil,stage2=s.stage2}) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} s.fit_monster={88176533,24175232} function s.ritualfil(c) - return c:IsSetCard(0x11f) and c:IsRitualMonster() + return c:IsSetCard(SET_NEPHTHYS) and c:IsRitualMonster() end function s.mfilter(c) if c:IsPreviousLocation(LOCATION_MZONE) then @@ -25,4 +25,4 @@ function s.stage2(mg,e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23469398.lua b/official/c23469398.lua index 04987a9cab..6be5b2e701 100644 --- a/official/c23469398.lua +++ b/official/c23469398.lua @@ -1,5 +1,5 @@ --マシンナーズ・エアレイダー ---Machina Airraider +--Machina Air Raider local s,id=GetID() function s.initial_effect(c) --special summon from hand @@ -28,13 +28,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x36) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_MACHINA) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,14 +48,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.tgfilter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) - return c:IsSetCard(0x36) and c:IsLevelBelow(tc:GetLevel()) and not c:IsCode(tc:GetCode()) + return c:IsSetCard(SET_MACHINA) and c:IsLevelBelow(tc:GetLevel()) and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -75,4 +75,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23471572.lua b/official/c23471572.lua index 5f22e4b604..53dfd99d92 100644 --- a/official/c23471572.lua +++ b/official/c23471572.lua @@ -1,4 +1,5 @@ --ソロモンの律法書 +--Solomon's Lawbook local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,15 +16,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetCode(EFFECT_SKIP_SP) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e1:SetCondition(s.skipcon) e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c2347477.lua b/official/c2347477.lua index cc5f80282a..a25f6d18f0 100644 --- a/official/c2347477.lua +++ b/official/c2347477.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x101,0x118} +s.listed_series={SET_CODE_TALKER,SET_CYNET} function s.extrafilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end @@ -46,7 +46,7 @@ function s.extraval(chk,summon_type,e,...) local c=e:GetHandler() if chk==0 then local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(0x101) or Duel.GetFlagEffect(tp,id)>0 then + if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_CODE_TALKER) or Duel.GetFlagEffect(tp,id)>0 then return Group.CreateGroup() else table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) @@ -56,7 +56,7 @@ function s.extraval(chk,summon_type,e,...) local sg,sc,tp=... if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end elseif chk==2 then for _,eff in ipairs(s.flagmap[c]) do @@ -69,10 +69,10 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() e:SetLabel(0) if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end - return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101) + return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_CODE_TALKER) end function s.thfilter(c,chk) - return ((c:IsSetCard(0x118) and c:IsSpellTrap()) or (chk==1 and c:IsRace(RACE_CYBERSE) and c:IsLevel(4))) and c:IsAbleToHand() + return ((c:IsSetCard(SET_CYNET) and c:IsSpellTrap()) or (chk==1 and c:IsRace(RACE_CYBERSE) and c:IsLevel(4))) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end @@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c2347656.lua b/official/c2347656.lua index d36fcec611..c6a81a5ad2 100644 --- a/official/c2347656.lua +++ b/official/c2347656.lua @@ -36,15 +36,15 @@ function s.initial_effect(c) end function s.chainop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if rp==tp and rc:GetType()==TYPE_TRAP and re:IsHasType(EFFECT_TYPE_ACTIVATE) then + if rp==tp and rc:IsNormalTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(s.chainlm) end end function s.chainlm(e,rp,tp) - return rp==tp or not e:IsActiveType(TYPE_MONSTER) + return rp==tp or not e:IsMonsterEffect() end function s.filter(c) - return c:GetType()==(TYPE_TRAP) and c:IsSSetable() + return c:IsNormalTrap() and c:IsSSetable() end function s.fgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -61,7 +61,7 @@ function s.fgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.triggercon) tc:RegisterEffect(e1) end @@ -74,12 +74,12 @@ function s.cfilter(c) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetOriginalType()==TYPE_TRAP + return rp==tp and re and re:IsTrapEffect() and re:GetHandler():GetOriginalType()==TYPE_TRAP and eg:IsExists(s.cfilter,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND) + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD|LOCATION_HAND,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD|LOCATION_HAND) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) diff --git a/official/c23499963.lua b/official/c23499963.lua index 4cc0549e6d..86b0f2fac3 100644 --- a/official/c23499963.lua +++ b/official/c23499963.lua @@ -1,7 +1,6 @@ --スプリガンズ・ウォッチ ---Sprigans Watch +--Springans Watch --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --Add 1 "Vast Desert Gold Golgonda" from deck diff --git a/official/c23516703.lua b/official/c23516703.lua index 2e4643376e..bad8c5ad3a 100644 --- a/official/c23516703.lua +++ b/official/c23516703.lua @@ -1,4 +1,5 @@ --サモンリミッター +--Summon Limit local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,4 +39,4 @@ end function s.countval(e,re,tp) local t1,t2,t3=Duel.GetActivityCount(tp,ACTIVITY_SUMMON,ACTIVITY_FLIPSUMMON,ACTIVITY_SPSUMMON) if t1+t2+t3>=2 then return 0 else return 2-t1-t2-t3 end -end +end \ No newline at end of file diff --git a/official/c23530726.lua b/official/c23530726.lua index c3a9716841..1197dcd8ca 100644 --- a/official/c23530726.lua +++ b/official/c23530726.lua @@ -70,4 +70,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c23535429.lua b/official/c23535429.lua index 939f9ebff2..5ba0bf1b7d 100644 --- a/official/c23535429.lua +++ b/official/c23535429.lua @@ -1,4 +1,5 @@ --牙城のガーディアン +--Stronghold Guardian local s,id=GetID() function s.initial_effect(c) --defup @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -21,17 +22,13 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return d and d:IsControler(tp) and d:IsDefensePos() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if not d:IsRelateToBattle() then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1500) d:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c23536866.lua b/official/c23536866.lua index 9b169b02ee..c61a6a600c 100644 --- a/official/c23536866.lua +++ b/official/c23536866.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -61,14 +61,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e3) local e4=e3:Clone() tc2:RegisterEffect(e4) @@ -80,4 +80,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() Duel.XyzSummon(tp,xyz,nil,g) end -end +end \ No newline at end of file diff --git a/official/c23545031.lua b/official/c23545031.lua index 5a13e97fb2..a37ea8adea 100644 --- a/official/c23545031.lua +++ b/official/c23545031.lua @@ -1,10 +1,10 @@ --水精鱗-サラキアビス ---Mermail Abyssaraki +--Mermail Abyssalacia -- local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_AQUA+RACE_FISH+RACE_SEASERPENT),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_AQUA|RACE_FISH|RACE_SEASERPENT),2,2) c:EnableReviveLimit() --atk/def local e1=Effect.CreateEffect(c) @@ -46,12 +46,12 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.indtg(e,c) return e:GetHandler():GetLinkedGroup():IsContains(c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end @@ -60,7 +60,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x74) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MERMAIL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -103,5 +103,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c23557835.lua b/official/c23557835.lua index d5b615341e..f79a05ccd8 100644 --- a/official/c23557835.lua +++ b/official/c23557835.lua @@ -1,4 +1,5 @@ --次元融合 +--Dimension Fusion local s,id=GetID() function s.initial_effect(c) --activate @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) @@ -14,10 +15,6 @@ end function s.filter(c,e,tp) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp)) or @@ -56,4 +53,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) end end if count>0 then Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c23558733.lua b/official/c23558733.lua index da9d93a5f1..e1e676b0cc 100644 --- a/official/c23558733.lua +++ b/official/c23558733.lua @@ -1,4 +1,5 @@ --フェニキシアン・クラスター・アマリリス +--Phoenixian Cluster Amaryllis local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -63,12 +64,12 @@ function s.cfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,true,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c23562407.lua b/official/c23562407.lua index be17885d02..9e008c2ca4 100644 --- a/official/c23562407.lua +++ b/official/c23562407.lua @@ -1,4 +1,5 @@ --聖剣カリバーン +--Noble Arms - Caliburn local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -32,7 +33,7 @@ function s.initial_effect(c) e5:SetOperation(s.eqop) c:RegisterEffect(e5) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() @@ -56,7 +57,7 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) end function s.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsRace(RACE_WARRIOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter2(chkc) end @@ -66,4 +67,4 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) -end +end \ No newline at end of file diff --git a/official/c23571046.lua b/official/c23571046.lua index 670598aa96..8fb9d23762 100644 --- a/official/c23571046.lua +++ b/official/c23571046.lua @@ -1,6 +1,5 @@ --ボルト・ヘッジホッグ --Quillbolt Hedgehog - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -32,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c23581825.lua b/official/c23581825.lua index 924d845dfc..8b3f38086b 100644 --- a/official/c23581825.lua +++ b/official/c23581825.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) end function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return #pg<=1 and c:IsSetCard(0xba) and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return #pg<=1 and c:IsSetCard(SET_RAIDRAPTOR) and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+2,pg) end function s.filter2(c,e,tp,mc,rk,pg) @@ -53,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c23587624.lua b/official/c23587624.lua index 3607053b7e..3f7fa74bb3 100644 --- a/official/c23587624.lua +++ b/official/c23587624.lua @@ -70,4 +70,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e5=e4:Clone() e5:SetCode(EFFECT_NO_EFFECT_DAMAGE) Duel.RegisterEffect(e5,tp) -end +end \ No newline at end of file diff --git a/official/c2359348.lua b/official/c2359348.lua index 258874a8fc..b411efadf0 100644 --- a/official/c2359348.lua +++ b/official/c2359348.lua @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,1) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return (sumtype&SUMMON_TYPE_PENDULUM)~=SUMMON_TYPE_PENDULUM -end +end \ No newline at end of file diff --git a/official/c23603403.lua b/official/c23603403.lua index a65bf485b0..0ca2478111 100644 --- a/official/c23603403.lua +++ b/official/c23603403.lua @@ -1,4 +1,5 @@ --RR-サテライト・キャノン・ファルコン +--Raidraptor - Satellite Cannon Falcon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -29,18 +30,18 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCondition(aux.StatChangeDamageStepCondition) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()==1 end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end @@ -59,21 +60,14 @@ function s.chainlm(e,rp,tp) end function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xba) then + if g:IsExists(Card.IsSetCard,1,nil,SET_RAIDRAPTOR) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkfilter(c) - return c:IsSetCard(0xba) and c:IsMonster() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsMonster() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -89,8 +83,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(ct*-800) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c23615409.lua b/official/c23615409.lua index ca0549d7f9..9ecea4331c 100644 --- a/official/c23615409.lua +++ b/official/c23615409.lua @@ -1,4 +1,5 @@ --虫除けバリアー +--Insect Barrier local s,id=GetID() function s.initial_effect(c) --activate @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.atktarget(e,c) return c:IsRace(RACE_INSECT) -end +end \ No newline at end of file diff --git a/official/c23617756.lua b/official/c23617756.lua index 318b62093f..c534879dd8 100644 --- a/official/c23617756.lua +++ b/official/c23617756.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) c:RegisterEffect(e2) diff --git a/official/c23619206.lua b/official/c23619206.lua index a541890585..e7dbfa389f 100644 --- a/official/c23619206.lua +++ b/official/c23619206.lua @@ -1,7 +1,6 @@ --招神鳥シムルグ --Simorgh, Bird of Calamity --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --When normal summoned, send 1 "Simorgh" card from deck to GY @@ -26,11 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.ssop) c:RegisterEffect(e2) end -s.listed_series={0x12d} +s.listed_series={SET_SIMORGH} s.listed_names={id} - function s.tgfilter(c) - return c:IsSetCard(0x12d) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_SIMORGH) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,7 +61,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -74,7 +72,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.sslimit) Duel.RegisterEffect(e1,tp) end diff --git a/official/c23623653.lua b/official/c23623653.lua index c8ecf80800..b0ab57dccb 100644 --- a/official/c23623653.lua +++ b/official/c23623653.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.nscost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.nstg) e1:SetOperation(s.nsop) c:RegisterEffect(e1) @@ -40,11 +40,6 @@ function s.initial_effect(c) end s.listed_series={SET_RITUAL_BEAST} s.listed_names={id} -function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.nsfilter(c) return c:IsSetCard(SET_RITUAL_BEAST) and c:IsSummonable(true,nil) end diff --git a/official/c2362787.lua b/official/c2362787.lua index e55ad8bca9..748e88a0ad 100644 --- a/official/c2362787.lua +++ b/official/c2362787.lua @@ -8,15 +8,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() end @@ -33,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c2364438.lua b/official/c2364438.lua index 85573fcc99..e59a883833 100644 --- a/official/c2364438.lua +++ b/official/c2364438.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.filter(c) - return c:IsSetCard(0x121) and not c:IsCode(id) and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard(SET_MAYAKASHI) and not c:IsCode(id) and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -25,5 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) local tc=g:GetFirst() aux.ToHandOrElse(tc,tp) -end - +end \ No newline at end of file diff --git a/official/c23649496.lua b/official/c23649496.lua index 09478a65fc..c8152653b2 100644 --- a/official/c23649496.lua +++ b/official/c23649496.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c23656668.lua b/official/c23656668.lua index a4189421dc..795801c5ff 100644 --- a/official/c23656668.lua +++ b/official/c23656668.lua @@ -36,7 +36,7 @@ function s.filter(c) end function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.indescon(e) return e:GetHandler():GetSequence()>4 @@ -58,7 +58,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=c:GetBattleTarget() if c:IsRelateToBattle() and tc:IsRelateToBattle() then - Duel.SendtoDeck(Group.FromCards(c,tc),nil,2,REASON_EFFECT) + Duel.SendtoDeck(Group.FromCards(c,tc),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c23657016.lua b/official/c23657016.lua index 5f013599ae..8a556b3daf 100644 --- a/official/c23657016.lua +++ b/official/c23657016.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.dsptg) e2:SetOperation(s.dspop) c:RegisterEffect(e2) diff --git a/official/c23672629.lua b/official/c23672629.lua index 92777167d7..b210223029 100644 --- a/official/c23672629.lua +++ b/official/c23672629.lua @@ -58,7 +58,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_WATER) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c23681456.lua b/official/c23681456.lua index d471f8be4e..ebf5e73bd2 100644 --- a/official/c23681456.lua +++ b/official/c23681456.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.filter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MADOLCHE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -30,8 +30,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() for tc in aux.Next(g) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -62,4 +62,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.retfilter,nil,e:GetLabel()) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2368215.lua b/official/c2368215.lua index 739166da73..ec134b041f 100644 --- a/official/c2368215.lua +++ b/official/c2368215.lua @@ -17,16 +17,16 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.matfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x10ec,lc,sumtype,tp) and c:IsType(TYPE_PENDULUM,lc,sumtype,tp) + return c:IsSetCard(SET_ABYSS_ACTOR,lc,sumtype,tp) and c:IsType(TYPE_PENDULUM,lc,sumtype,tp) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,c:GetCode()) + and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,c:GetCode()) end function s.pfilter(c,cd) - return c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and not c:IsForbidden() and not c:IsCode(cd) end @@ -42,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,tc:GetCode()) + local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc:GetCode()) if #g>0 then Duel.BreakEffect() Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) @@ -54,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -62,11 +62,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x10ec) -end - + return not c:IsSetCard(SET_ABYSS_ACTOR) +end \ No newline at end of file diff --git a/official/c23689428.lua b/official/c23689428.lua index 97acab24c5..818e22addc 100644 --- a/official/c23689428.lua +++ b/official/c23689428.lua @@ -1,5 +1,5 @@ --無限起動 ゴライアス ---Infinite Ignition Goliath +--Infinitrack Goliath local s,id=GetID() function s.initial_effect(c) --Link summon method @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) c:RegisterEffect(e1) - -- give effect + --give effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_XMATERIAL) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.matfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x127,lc,sumtype,tp) and not c:IsType(TYPE_LINK,lc,sumtype,tp) + return c:IsSetCard(SET_INFINITRACK,lc,sumtype,tp) and not c:IsType(TYPE_LINK,lc,sumtype,tp) end function s.matcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) @@ -52,4 +52,4 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetOriginalRace()==RACE_MACHINE and c:IsType(TYPE_XYZ) -end +end \ No newline at end of file diff --git a/official/c23689697.lua b/official/c23689697.lua index 5f38edd398..6029d38562 100644 --- a/official/c23689697.lua +++ b/official/c23689697.lua @@ -24,13 +24,13 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -59,4 +59,4 @@ function s.valcheck(e,c) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c23693634.lua b/official/c23693634.lua index ba96061d62..d5125f0953 100644 --- a/official/c23693634.lua +++ b/official/c23693634.lua @@ -1,4 +1,5 @@ --ギガンテック・ファイター +--Colossal Fighter local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -28,8 +29,7 @@ function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_WARRIOR)*100 end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetLocation()==LOCATION_GRAVE - and (e:GetHandler():GetReason()&REASON_BATTLE)~=0 + return e:GetHandler():IsLocation(LOCATION_GRAVE) and (e:GetHandler():GetReason()&REASON_BATTLE)~=0 end function s.filter(c,e,tp) return c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -47,4 +47,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2370081.lua b/official/c2370081.lua index 65558ac53d..9954c7eaa3 100644 --- a/official/c2370081.lua +++ b/official/c2370081.lua @@ -15,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-200) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c23701465.lua b/official/c23701465.lua index 77ba1e170e..e4490db398 100644 --- a/official/c23701465.lua +++ b/official/c23701465.lua @@ -1,4 +1,5 @@ --原初の種 +--Primal Seed local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c2371506.lua b/official/c2371506.lua index fe8c7ad5d0..5cb0303720 100644 --- a/official/c2371506.lua +++ b/official/c2371506.lua @@ -17,7 +17,7 @@ function s.cfilter(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(s.cfilter,1,nil) and Duel.IsChainNegatable(ev) end @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.BreakEffect() Duel.Damage(1-tp,800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23720856.lua b/official/c23720856.lua index 09fda51af1..d574fd08fa 100644 --- a/official/c23720856.lua +++ b/official/c23720856.lua @@ -1,5 +1,5 @@ --ズバババンチョー-GC ---Zubaba Leader - Gagaga Coat +--Zubababancho Gagagacoat --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={} -s.listed_series={0x54,0x8f,0x82,0x59} +s.listed_series={SET_GAGAGA,SET_ZUBABA,SET_DODODO,SET_GOGOGO} function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x54) or c:IsSetCard(0x8f)) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard({SET_GAGAGA,SET_ZUBABA}) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -45,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x82) or c:IsSetCard(0x59)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard({SET_DODODO,SET_GOGOGO}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -67,14 +67,14 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end diff --git a/official/c23732205.lua b/official/c23732205.lua index 74b0e2430d..c1e066ada9 100644 --- a/official/c23732205.lua +++ b/official/c23732205.lua @@ -1,7 +1,6 @@ --デリンジャラス・ドラゴン --Dillingerous Dragon --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -34,13 +33,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x102} - +s.listed_series={SET_ROKKET} function s.matfilter(c,scard,sumtype,tp) return c:IsRace(RACE_DRAGON,scard,sumtype,tp) and c:IsAttribute(ATTRIBUTE_DARK,scard,sumtype,tp) end function s.dmgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.dmgfilter(c) return c:GetAttackAnnouncedCount()==0 and c:IsFaceup() and c:IsPosition(POS_FACEUP_ATTACK) @@ -66,7 +64,7 @@ function s.dmgop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x102) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_ROKKET) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -85,8 +83,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c23740893.lua b/official/c23740893.lua index 25b1693b35..33f5541941 100644 --- a/official/c23740893.lua +++ b/official/c23740893.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -20,18 +20,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.sumcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sumtg) e2:SetOperation(s.sumop) c:RegisterEffect(e2) end s.counter_place_list={0x33} s.listed_names={27918963} -s.listed_series={0xb3} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_YOSENJU} function s.filter(c) return c:IsFaceup() and c:IsCode(27918963) and c:IsCanAddCounter(0x33,3) end @@ -61,8 +57,8 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetTargetRange(LOCATION_HAND,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb3)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_YOSENJU)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c23756165.lua b/official/c23756165.lua index 9464476f46..c860c5788d 100644 --- a/official/c23756165.lua +++ b/official/c23756165.lua @@ -36,11 +36,11 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and e:GetHandler():GetEquipGroup():IsExists(Card.HasFlagEffect,1,nil,id) end) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e1) @@ -100,11 +100,6 @@ end function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:IsLevelBelow(5) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(50140163) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c2376209.lua b/official/c2376209.lua index d19a083c93..92db007ce1 100644 --- a/official/c2376209.lua +++ b/official/c2376209.lua @@ -1,6 +1,5 @@ --バージェストマ・エルドニア --Paleozoic Eldonia - local s,id=GetID() function s.initial_effect(c) --Targeted monster gains 500 ATK/DEF @@ -9,10 +8,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMING_BATTLE_PHASE+TIMING_DAMAGE_STEP) + e1:SetHintTiming(0,TIMING_BATTLE_PHASE|TIMING_DAMAGE_STEP) c:RegisterEffect(e1) --Special summon itself from GY as a monster local e2=Effect.CreateEffect(c) @@ -26,9 +25,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -42,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -50,19 +46,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -75,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -83,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() @@ -91,5 +87,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c23770284.lua b/official/c23770284.lua index 37af18ba85..03d65d8f2d 100644 --- a/official/c23770284.lua +++ b/official/c23770284.lua @@ -1,4 +1,5 @@ --ストロング・ウィンド・ドラゴン +--Strong Wind Dragon local s,id=GetID() function s.initial_effect(c) --summon success @@ -39,7 +40,7 @@ function s.valcheck(e,c) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -51,11 +52,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end end function s.indval(e,c) return c:GetAttack()==e:GetHandler():GetAttack() -end +end \ No newline at end of file diff --git a/official/c2377034.lua b/official/c2377034.lua index 5460944fb3..62bab41650 100644 --- a/official/c2377034.lua +++ b/official/c2377034.lua @@ -28,10 +28,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -41,7 +41,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return (e:GetHandler():GetReason()&0x41)==0x41 + return (e:GetHandler():GetReason()&REASON_DESTROY|REASON_EFFECT)==(REASON_DESTROY|REASON_EFFECT) end function s.filter(c) local def=c:GetDefense() @@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c23776077.lua b/official/c23776077.lua index c21d4c0511..075f4b2dbd 100644 --- a/official/c23776077.lua +++ b/official/c23776077.lua @@ -1,4 +1,5 @@ --陽炎獣 バジリコック +--Hazy Flame Basiltrice local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -47,18 +48,14 @@ function s.initial_effect(c) e5:SetValue(1) c:RegisterEffect(e5) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,false,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -78,4 +75,4 @@ function s.tgcon(e) end function s.indcon(e) return e:GetHandler():GetOverlayCount()==5 -end +end \ No newline at end of file diff --git a/official/c23782705.lua b/official/c23782705.lua index 3b9113b9e8..ac521e2cac 100644 --- a/official/c23782705.lua +++ b/official/c23782705.lua @@ -1,4 +1,5 @@ --マシンナーズ・スナイパー +--Machina Sniper local s,id=GetID() function s.initial_effect(c) --atk limit @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetValue(aux.imval1) c:RegisterEffect(e1) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.tg(e,c) - return c:IsSetCard(0x36) and c:GetCode()~=id -end + return c:IsSetCard(SET_MACHINA) and c:GetCode()~=id +end \ No newline at end of file diff --git a/official/c23784496.lua b/official/c23784496.lua index 246b03dcf1..fcfc119373 100644 --- a/official/c23784496.lua +++ b/official/c23784496.lua @@ -1,4 +1,5 @@ --魔界台本「オープニング・セレモニー」 +--Abyss Script - Opening Ceremony local s,id=GetID() function s.initial_effect(c) --recover @@ -23,21 +24,21 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local rec=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x10ec),tp,LOCATION_MZONE,0,nil)*500 + local rec=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ABYSS_ACTOR),tp,LOCATION_MZONE,0,nil)*500 if chk==0 then return rec>0 end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(rec) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local rec=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x10ec),tp,LOCATION_MZONE,0,nil)*500 + local rec=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ABYSS_ACTOR),tp,LOCATION_MZONE,0,nil)*500 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,rec,REASON_EFFECT) end function s.filter2(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x10ec) + return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_ABYSS_ACTOR) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -58,4 +59,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Draw(p,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c23790299.lua b/official/c23790299.lua index 1f155774d3..06ba028d24 100644 --- a/official/c23790299.lua +++ b/official/c23790299.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) end s.listed_series={SET_ALTERGEIST} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsAttackAbove,1,false,nil,e:GetHandler(),1) end diff --git a/official/c23792058.lua b/official/c23792058.lua index a2ccc86d58..1f8ec28162 100644 --- a/official/c23792058.lua +++ b/official/c23792058.lua @@ -37,28 +37,28 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.tdfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_PZONE) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x2016) + return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_SPEEDROID) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -71,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23804920.lua b/official/c23804920.lua index 707725d490..5d148f9cd7 100644 --- a/official/c23804920.lua +++ b/official/c23804920.lua @@ -1,4 +1,4 @@ ---Japanese name +--聖神獣セルケト --Divine Scorpion Beast of Serket --Scripted by Eerie Code local s,id=GetID() @@ -53,4 +53,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) --This card gains ATK equal to half the banished monster's original ATK c:UpdateAttack(atk) end -end +end \ No newline at end of file diff --git a/official/c23837054.lua b/official/c23837054.lua index 45ff149baf..3a923dc273 100644 --- a/official/c23837054.lua +++ b/official/c23837054.lua @@ -1,9 +1,9 @@ --- 溟界の呼び蛟 --- Ogdoadic Calling --- Scripted by Hatter +--溟界の呼び蛟 +--Ogdoadic Calling +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -15,19 +15,19 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={23837055} -s.listed_series={0x163} +s.listed_series={SET_OGDOADIC} function s.spfilter(c,e,tp) return c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.setfitler(c) - return c:IsSetCard(0x163) and c:IsMonster() + return c:IsSetCard(SET_OGDOADIC) and c:IsMonster() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) - local g=Duel.GetMatchingGroup(s.setfitler,tp,LOCATION_GRAVE,0,nil,0x163) + local g=Duel.GetMatchingGroup(s.setfitler,tp,LOCATION_GRAVE,0,nil) local gysummon=g:GetClassCount(Card.GetCode)>=8 and sg:GetClassCount(Card.GetCode)>=2 - local tksummon=Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x163,TYPES_TOKEN,0,0,2,RACE_REPTILE,ATTRIBUTE_DARK) + local tksummon=Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_OGDOADIC,TYPES_TOKEN,0,0,2,RACE_REPTILE,ATTRIBUTE_DARK) return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and (tksummon or gysummon) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) @@ -37,17 +37,17 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) - local g=Duel.GetMatchingGroup(s.setfitler,tp,LOCATION_GRAVE,0,nil,0x163) + local g=Duel.GetMatchingGroup(s.setfitler,tp,LOCATION_GRAVE,0,nil) local gysummon=g:GetClassCount(Card.GetCode)>=8 and sg:GetClassCount(Card.GetCode)>=2 - local tksummon=Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x163,TYPES_TOKEN,0,0,2,RACE_REPTILE,ATTRIBUTE_DARK) - -- Choose option + local tksummon=Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_OGDOADIC,TYPES_TOKEN,0,0,2,RACE_REPTILE,ATTRIBUTE_DARK) + --Choose option local choice if tksummon and gysummon then choice=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) elseif tksummon then choice=0 elseif gysummon then choice=1 else return end - -- Apply effect + --Apply effect if choice==0 then for i=1,2 do local token=Duel.CreateToken(tp,id+1) @@ -60,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c23842445.lua b/official/c23842445.lua index 71b6999653..ff5ccc908e 100644 --- a/official/c23842445.lua +++ b/official/c23842445.lua @@ -1,4 +1,5 @@ --ニトロユニット +--Nitro Unit local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,1) @@ -29,4 +30,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23846921.lua b/official/c23846921.lua index 99363a429d..dc3009ae85 100644 --- a/official/c23846921.lua +++ b/official/c23846921.lua @@ -47,7 +47,7 @@ function s.arcanareg(c,coin) e2:SetDescription(aux.Stringid(id,2)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_DRAW) + e2:SetCode(EVENT_PHASE|PHASE_DRAW) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.thcon) diff --git a/official/c23848752.lua b/official/c23848752.lua index 85bf6ae9f5..5f7eb8e681 100644 --- a/official/c23848752.lua +++ b/official/c23848752.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,0}) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c23850421.lua b/official/c23850421.lua index 615edbdf51..6f12261569 100644 --- a/official/c23850421.lua +++ b/official/c23850421.lua @@ -1,4 +1,5 @@ --ジャック・ワイバーン +--Jack Wyvern local s,id=GetID() function s.initial_effect(c) --special summon @@ -42,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23851033.lua b/official/c23851033.lua index a5cb1a0567..ecb2571854 100644 --- a/official/c23851033.lua +++ b/official/c23851033.lua @@ -55,4 +55,4 @@ function s.costchk(e,te_or_c,tp) end function s.costop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,500) -end +end \ No newline at end of file diff --git a/official/c23857661.lua b/official/c23857661.lua index e80c4179fd..110958f2ef 100644 --- a/official/c23857661.lua +++ b/official/c23857661.lua @@ -1,4 +1,5 @@ --武神器-オキツ +--Bujingi Fox local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c) - return c:IsSetCard(0x88) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) @@ -28,10 +29,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c23869735.lua b/official/c23869735.lua index 8d1572b8bc..c30d712d56 100644 --- a/official/c23869735.lua +++ b/official/c23869735.lua @@ -1,4 +1,5 @@ --化石発掘 +--Fossil Excavation local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -54,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1,true) end @@ -74,4 +75,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c23874409.lua b/official/c23874409.lua index 970ed38866..f16adb3eab 100644 --- a/official/c23874409.lua +++ b/official/c23874409.lua @@ -1,4 +1,5 @@ --カラクリ将軍 無零 +--Karakuri Shogun mdl 00 "Burei" local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,12 +27,12 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -61,4 +62,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c23893227.lua b/official/c23893227.lua index 1a41938fe3..95a3b5f8bf 100644 --- a/official/c23893227.lua +++ b/official/c23893227.lua @@ -1,4 +1,5 @@ --サイバー・ドラゴン・コア +--Cyber Dragon Core local s,id=GetID() function s.initial_effect(c) --search @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -28,13 +29,13 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_CODE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e3) end -s.listed_series={0x93,0x94,0x1093} +s.listed_series={SET_CYBER,SET_CYBERNETIC,SET_CYBER_DRAGON} function s.filter(c) - return (c:IsSetCard(0x93) or c:IsSetCard(0x94)) and c:IsSpellTrap() and c:IsAbleToHand() + return (c:IsSetCard(SET_CYBER) or c:IsSetCard(SET_CYBERNETIC)) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -52,7 +53,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1093) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CYBER_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -66,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23898021.lua b/official/c23898021.lua index ecd72cdd1b..ff16f146d2 100644 --- a/official/c23898021.lua +++ b/official/c23898021.lua @@ -27,7 +27,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,7 +36,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.thfilter(c) - return c:GetType()==TYPE_TRAP and c:IsSSetable() + return c:IsNormalTrap() and c:IsSSetable() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -53,4 +53,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tg=sg:Select(1-tp,1,1,nil) Duel.SSet(tp,tg:GetFirst(),tp,false) end -end +end \ No newline at end of file diff --git a/official/c23899727.lua b/official/c23899727.lua index 184a6353a0..5b99651928 100644 --- a/official/c23899727.lua +++ b/official/c23899727.lua @@ -1,4 +1,5 @@ --水精鱗-アビスリンデ +--Mermail Abysslinde local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MERMAIL) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2390019.lua b/official/c2390019.lua index f508312a82..6e521bbac8 100644 --- a/official/c2390019.lua +++ b/official/c2390019.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) @@ -96,7 +96,7 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) diff --git a/official/c23912837.lua b/official/c23912837.lua index 2832363c8f..5aeee31e15 100644 --- a/official/c23912837.lua +++ b/official/c23912837.lua @@ -1,5 +1,5 @@ --影光の聖選士 ---Lashaddoll Incarnation +--Resh Shaddoll Incarnation --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetTarget(s.postg) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.filter(c,e,tp) - return c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) + return c:IsSetCard(SET_SHADDOLL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x9d) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToRemoveAsCost() end function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -90,4 +90,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c23915499.lua b/official/c23915499.lua index 337a6c93b6..d0cf59d0bb 100644 --- a/official/c23915499.lua +++ b/official/c23915499.lua @@ -1,4 +1,5 @@ --バグマンY +--Crashbug Y local s,id=GetID() function s.initial_effect(c) --spsummon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c23924608.lua b/official/c23924608.lua index 81e3787813..e27a02844c 100644 --- a/official/c23924608.lua +++ b/official/c23924608.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -21,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end diff --git a/official/c23927545.lua b/official/c23927545.lua index 9e1dfa4b6b..8da5d158de 100644 --- a/official/c23927545.lua +++ b/official/c23927545.lua @@ -1,4 +1,5 @@ --ジュラック・プロトプス +--Jurrac Protops local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,4 +12,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*100 -end +end \ No newline at end of file diff --git a/official/c23927567.lua b/official/c23927567.lua index 45ad2984ce..8136b60241 100644 --- a/official/c23927567.lua +++ b/official/c23927567.lua @@ -1,4 +1,5 @@ --幸運を告げるフクロウ +--An Owl of Luck local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,1) end end -end +end \ No newline at end of file diff --git a/official/c23931679.lua b/official/c23931679.lua index a9d47c253e..535b614195 100644 --- a/official/c23931679.lua +++ b/official/c23931679.lua @@ -133,4 +133,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c23935886.lua b/official/c23935886.lua index 2c6cfaf90c..786067ff34 100644 --- a/official/c23935886.lua +++ b/official/c23935886.lua @@ -1,5 +1,5 @@ --天威の龍拳聖 ---Tenyi Master of the Dragon Fist +--Draco Masters of the Tenyi --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -34,13 +34,13 @@ function s.cfilter(c) return (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsNonEffectMonster() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if ct>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,ct,nil) @@ -48,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c23950192.lua b/official/c23950192.lua index 684b65c08e..2c1c877467 100644 --- a/official/c23950192.lua +++ b/official/c23950192.lua @@ -1,4 +1,5 @@ --氷結界の術者 +--Cryomancer of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -11,10 +12,10 @@ function s.initial_effect(c) e2:SetCondition(s.con) c:RegisterEffect(e2) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.con(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.tg(e,c) return c:GetLevel()>=4 -end +end \ No newline at end of file diff --git a/official/c2396042.lua b/official/c2396042.lua index 5a2e0223c3..555b847a89 100644 --- a/official/c2396042.lua +++ b/official/c2396042.lua @@ -25,11 +25,11 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(c:GetDefense()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(c:GetAttack()/2) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c23965037.lua b/official/c23965037.lua index cce9e2eedc..8d6e742d8c 100644 --- a/official/c23965037.lua +++ b/official/c23965037.lua @@ -1,5 +1,6 @@ --ドリアードの祈り +--Doriado's Blessing local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,3,nil,99414168) -end +end \ No newline at end of file diff --git a/official/c23971061.lua b/official/c23971061.lua index f4c742c26b..35fc301a96 100644 --- a/official/c23971061.lua +++ b/official/c23971061.lua @@ -1,5 +1,5 @@ --ダブルバイト・ドラゴン ---Double Byte Dragon +--Doublebyte Dragon -- local s,id=GetID() function s.initial_effect(c) @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -45,13 +45,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() and not te:IsActiveType(TYPE_LINK) + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() and not te:IsActiveType(TYPE_LINK) end function s.indval(e,c) return not c:IsLinkMonster() -end - +end \ No newline at end of file diff --git a/official/c23979249.lua b/official/c23979249.lua index 2d265f52a0..9d4cf7a952 100644 --- a/official/c23979249.lua +++ b/official/c23979249.lua @@ -1,6 +1,5 @@ --武神-アラスダ --Bujin Arasuda - local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -37,11 +36,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x88} - +s.listed_series={SET_BUJIN} function s.cfilter(c,tp) - return c:IsSetCard(0x88) and c:IsPreviousControler(tp) - and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE) and c:IsPreviousPosition(POS_FACEUP) + return c:IsSetCard(SET_BUJIN) and c:IsPreviousControler(tp) + and c:IsPreviousLocation(LOCATION_MZONE|LOCATION_GRAVE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -58,14 +56,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end function s.regfilter(c,tp) - return c:IsSetCard(0x88) and c:IsControler(tp) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_BUJIN) and c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and not c:IsReason(REASON_DRAW) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.regfilter,1,nil,tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -82,6 +80,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)~=0 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c23995347.lua b/official/c23995347.lua deleted file mode 100644 index 73d44514d5..0000000000 --- a/official/c23995347.lua +++ /dev/null @@ -1,10 +0,0 @@ ---青眼の究極竜 ---Blue-Eyes Ultimate Dragon -local s,id=GetID() -function s.initial_effect(c) - --Fusion Procedure - c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,CARD_BLUEEYES_W_DRAGON,3) -end -s.material_setcode=SET_BLUE_EYES -s.listed_names={CARD_BLUEEYES_W_DRAGON} \ No newline at end of file diff --git a/official/c23995348.lua b/official/c23995348.lua deleted file mode 100644 index 73d44514d5..0000000000 --- a/official/c23995348.lua +++ /dev/null @@ -1,10 +0,0 @@ ---青眼の究極竜 ---Blue-Eyes Ultimate Dragon -local s,id=GetID() -function s.initial_effect(c) - --Fusion Procedure - c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,CARD_BLUEEYES_W_DRAGON,3) -end -s.material_setcode=SET_BLUE_EYES -s.listed_names={CARD_BLUEEYES_W_DRAGON} \ No newline at end of file diff --git a/official/c23998625.lua b/official/c23998625.lua index ca018ba1e5..83f667c5fc 100644 --- a/official/c23998625.lua +++ b/official/c23998625.lua @@ -49,7 +49,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c24010609.lua b/official/c24010609.lua index 574b0fee3d..531e2888c4 100644 --- a/official/c24010609.lua +++ b/official/c24010609.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e5:SetOperation(s.regop2) c:RegisterEffect(e5) end -s.listed_series={0x115} +s.listed_series={SET_SKY_STRIKER} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id+1)==0 end @@ -63,13 +63,13 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) e1:SetOperation(s.actop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.actop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() then Duel.SetChainLimit(s.chainlm) end end @@ -78,18 +78,18 @@ function s.chainlm(e,rp,tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if re:GetHandler():IsSetCard(0x115) and re:IsActiveType(TYPE_SPELL) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then + if re:GetHandler():IsSetCard(SET_SKY_STRIKER) and re:IsSpellEffect() and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then local flag=c:GetFlagEffectLabel(id) if flag then c:SetFlagEffectLabel(id,flag+1) else - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,1) end end end function s.regop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if re:GetHandler():IsSetCard(0x115) and re:IsActiveType(TYPE_SPELL) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then + if re:GetHandler():IsSetCard(SET_SKY_STRIKER) and re:IsSpellEffect() and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then local flag=c:GetFlagEffectLabel(id) if flag and flag>0 then c:SetFlagEffectLabel(id,flag-1) @@ -97,7 +97,7 @@ function s.regop2(e,tp,eg,ep,ev,re,r,rp) end end function s.setfilter(c) - return c:IsSetCard(0x115) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_SKY_STRIKER) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetHandler():GetFlagEffectLabel(id) @@ -126,7 +126,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c24019092.lua b/official/c24019092.lua index 3e69076506..02ce2864ab 100644 --- a/official/c24019092.lua +++ b/official/c24019092.lua @@ -1,4 +1,5 @@ --イグナイト・マスケット +--Igknight Paladin local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24019261.lua b/official/c24019261.lua index 61a5f714b6..f0dad3e27f 100644 --- a/official/c24019261.lua +++ b/official/c24019261.lua @@ -1,4 +1,5 @@ --救急救命 +--Emergency Assistance local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsPhase(PHASE_MAIN2) end function s.filter(c,e,tp,tid) - return (c:GetReason()&0x41)==0x41 and c:GetTurnID()==tid + return (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:GetTurnID()==tid and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24025620.lua b/official/c24025620.lua index 17eaf685a2..257545cd3f 100644 --- a/official/c24025620.lua +++ b/official/c24025620.lua @@ -1,4 +1,5 @@ --ダブル・プロテクター +--Twin-Shield Defender local s,id=GetID() function s.initial_effect(c) --atkdown @@ -29,7 +30,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c24027078.lua b/official/c24027078.lua index 6edc41fcac..5ab86cbd7d 100644 --- a/official/c24027078.lua +++ b/official/c24027078.lua @@ -12,23 +12,19 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x207a,0x107a} +s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_ARMS) and c:IsType(TYPE_EQUIP) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x107a),tp,LOCATION_MZONE,0,1,nil) + return ep~=tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NOBLE_KNIGHT),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_ONFIELD,0,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_ONFIELD,0,nil) @@ -43,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(eg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c24037702.lua b/official/c24037702.lua index b51d660ec6..acf4a764d9 100644 --- a/official/c24037702.lua +++ b/official/c24037702.lua @@ -1,4 +1,5 @@ --闇の進軍 +--March of the Dark Brigade local s,id=GetID() function s.initial_effect(c) --activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter(c,tp) - if not c:IsMonster() or not c:IsSetCard(0x38) or c:GetOriginalLevel()<=0 or not c:IsAbleToHand() then return false end + if not c:IsMonster() or not c:IsSetCard(SET_LIGHTSWORN) or c:GetOriginalLevel()<=0 or not c:IsAbleToHand() then return false end local g=Duel.GetDecktopGroup(tp,c:GetOriginalLevel()) return g:FilterCount(Card.IsAbleToRemove,nil)==c:GetOriginalLevel() end @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local rg=Duel.GetDecktopGroup(tp,ol) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2403771.lua b/official/c2403771.lua index 23c8429623..ad5f6d361e 100644 --- a/official/c2403771.lua +++ b/official/c2403771.lua @@ -62,5 +62,5 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_REPLACE) -end + Duel.SendtoGrave(tg,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c24040093.lua b/official/c24040093.lua index d640e59b06..e087a6f516 100644 --- a/official/c24040093.lua +++ b/official/c24040093.lua @@ -9,21 +9,17 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.con) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x35),tp,LOCATION_MZONE,0,1,nil) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FABLED),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -36,4 +32,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24050692.lua b/official/c24050692.lua index 4f0f74173b..d5e42cbd34 100644 --- a/official/c24050692.lua +++ b/official/c24050692.lua @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c2405631.lua b/official/c2405631.lua index 7fc62bd9c7..6f06b99c30 100644 --- a/official/c2405631.lua +++ b/official/c2405631.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) diff --git a/official/c24062258.lua b/official/c24062258.lua index 286d814ba6..b9d028e501 100644 --- a/official/c24062258.lua +++ b/official/c24062258.lua @@ -1,4 +1,5 @@ --暗躍のドルイド・ドリュース +--Secret Sect Druid Dru local s,id=GetID() function s.initial_effect(c) --spsummon @@ -32,13 +33,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c24068492.lua b/official/c24068492.lua index c8ebd0faea..e4adfd5b53 100644 --- a/official/c24068492.lua +++ b/official/c24068492.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DRAW_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_DRAW_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)*500 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24070330.lua b/official/c24070330.lua index 2ed1b324b3..b3ee56fb33 100644 --- a/official/c24070330.lua +++ b/official/c24070330.lua @@ -1,5 +1,5 @@ --- 音響戦士ロックス --- Symphonic Warrior Rocks +--音響戦士ロックス +--Symphonic Warrior Rockks local s,id=GetID() function s.initial_effect(c) --Synchro summon @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1,{id,1}) e1:SetTarget(s.thtg) @@ -95,7 +95,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not (c:IsRelateToEffect(e) and tc:IsRelateToBattle()) then return end Duel.Destroy(Group.FromCards(c,tc),REASON_EFFECT) end --- place itself in Pzone +--place itself in Pzone function s.pencon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (r&REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() diff --git a/official/c2407147.lua b/official/c2407147.lua index 9cba2a5000..9a7c236cbb 100644 --- a/official/c2407147.lua +++ b/official/c2407147.lua @@ -14,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.cfilter(c) - return c:IsSetCard(0x39) and c:GetCode()~=id + return c:IsSetCard(SET_LAVAL) and c:GetCode()~=id end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end function s.filter(c) - return c:IsSetCard(0x39) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_LAVAL) and c:IsMonster() and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2407234.lua b/official/c2407234.lua index dd0c8fcdd6..9dd40f5563 100644 --- a/official/c2407234.lua +++ b/official/c2407234.lua @@ -35,12 +35,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -63,8 +63,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c24073068.lua b/official/c24073068.lua index bece849e63..69d7b0d0ce 100644 --- a/official/c24073068.lua +++ b/official/c24073068.lua @@ -1,4 +1,5 @@ --剛鬼スープレックス +--Gouki Suprex local s,id=GetID() function s.initial_effect(c) --special summon @@ -23,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0xfc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,7 +46,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -58,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24082387.lua b/official/c24082387.lua index f3f99364c8..85cf4490a0 100644 --- a/official/c24082387.lua +++ b/official/c24082387.lua @@ -14,17 +14,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) return true end function s.filter1(c,e,tp,cg,minc) - return c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ALIEN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and cg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),minc,99) end function s.cgfilter(c) - return c:HasLevel() and c:IsAbleToGraveAsCost() and (c:GetOriginalType()&TYPE_MONSTER)~=0 + return c:HasLevel() and c:IsAbleToGraveAsCost() and c:IsMonsterCard() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local cg=Duel.GetMatchingGroup(s.cgfilter,tp,LOCATION_MZONE,0,nil) @@ -45,7 +45,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.filter2(c,e,tp,lv) - return c:IsSetCard(0xc) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ALIEN) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then Duel.Damage(tp,2000,REASON_EFFECT) return end @@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) else Duel.Damage(tp,2000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24087580.lua b/official/c24087580.lua index 8e5df3aa71..227e03b7fe 100644 --- a/official/c24087580.lua +++ b/official/c24087580.lua @@ -1,19 +1,19 @@ --- アマゾネスの銀剣使い --- Amazoness Silver Sword Master --- Scripted by Hatter +--アマゾネスの銀剣使い +--Amazoness Silver Sword Master +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Grant ATK + --Grant ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(0x4) and c:HasLevel() end) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_AMAZONESS) and c:HasLevel() end) e1:SetValue(function(e,c) return c:GetLevel()*100 end) c:RegisterEffect(e1) - -- Add 1 "Amazoness" Spell/Trap to the hand + --Add 1 "Amazoness" Spell/Trap to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Place in Pendulum Zone when destroyed + --Place in Pendulum Zone when destroyed local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.pentg) e3:SetOperation(s.penop) c:RegisterEffect(e3) - -- Place in Pendulum Zone on Special Summon + --Place in Pendulum Zone on Special Summon local e4=e3:Clone() e4:SetDescription(aux.Stringid(id,2)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -47,13 +47,13 @@ function s.initial_effect(c) e4:SetCondition(s.sppencon) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsFaceup() and bc:IsSetCard(0x4) + return bc and bc:IsFaceup() and bc:IsSetCard(SET_AMAZONESS) end function s.thfilter(c) - return c:IsSetCard(0x4) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_AMAZONESS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(c) end @@ -71,7 +71,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.despencon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end @@ -84,7 +84,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) end end function s.sppenconfilter(c,tp) - return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x4) + return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) end function s.sppencon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.sppenconfilter,1,nil,tp) diff --git a/official/c24094258.lua b/official/c24094258.lua index 28d7c5754f..3a5feb6b8f 100644 --- a/official/c24094258.lua +++ b/official/c24094258.lua @@ -1,5 +1,5 @@ --ヘビーメタルフォーゼ・エレクトラム ---Heavymetalfoes Electrum +--Heavymetalfoes Electrumite --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -41,7 +41,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.tecon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.tefilter(c) return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() @@ -96,5 +96,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c24094653.lua b/official/c24094653.lua index ada653a4a2..630c00f425 100644 --- a/official/c24094653.lua +++ b/official/c24094653.lua @@ -3,4 +3,4 @@ local s,id=GetID() function s.initial_effect(c) Fusion.RegisterSummonEff(c) -end +end \ No newline at end of file diff --git a/official/c24096228.lua b/official/c24096228.lua index 2195b0bd83..ca0e9b4fa9 100644 --- a/official/c24096228.lua +++ b/official/c24096228.lua @@ -12,18 +12,18 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x95} +s.listed_series={SET_RANK_UP_MAGIC} function s.cfilter(c) return c:IsDiscardable() and c:IsSpell() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter1(c,e,tp,eg,ep,ev,re,r,rp) local te=c:CheckActivateEffect(false,false,false) if c:IsSpell() and te then - if c:IsSetCard(0x95) then + if c:IsSetCard(SET_RANK_UP_MAGIC) then local tg=te:GetTarget() return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0) else @@ -34,8 +34,8 @@ function s.filter1(c,e,tp,eg,ep,ev,re,r,rp) end function s.filter2(c,e,tp,eg,ep,ev,re,r,rp) local te=c:CheckActivateEffect(false,false,false) - if c:IsSpell() and not c:IsType(TYPE_EQUIP+TYPE_CONTINUOUS) and te then - if c:IsSetCard(0x95) then + if c:IsSpell() and not c:IsType(TYPE_EQUIP|TYPE_CONTINUOUS) and te then + if c:IsSetCard(SET_RANK_UP_MAGIC) then local tg=te:GetTarget() return not tg or tg(e,tp,eg,ep,ev,re,r,rp,0) else @@ -82,7 +82,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:CreateEffectRelation(te) if co then co(te,tp,eg,ep,ev,re,r,rp,1) end if tg then - if tc:IsSetCard(0x95) then + if tc:IsSetCard(SET_RANK_UP_MAGIC) then tg(e,tp,eg,ep,ev,re,r,rp,1) else tg(te,tp,eg,ep,ev,re,r,rp,1) @@ -95,7 +95,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) etc:CreateEffectRelation(te) end if op then - if tc:IsSetCard(0x95) then + if tc:IsSetCard(SET_RANK_UP_MAGIC) then op(e,tp,eg,ep,ev,re,r,rp) else op(te,tp,eg,ep,ev,re,r,rp) @@ -106,4 +106,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) for etc in aux.Next(g) do etc:ReleaseEffectRelation(te) end -end +end \ No newline at end of file diff --git a/official/c24096499.lua b/official/c24096499.lua index e19c6569de..e340601df2 100644 --- a/official/c24096499.lua +++ b/official/c24096499.lua @@ -18,7 +18,7 @@ end s.listed_names={id} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsLevelBelow(2) and c:IsRace(RACE_BEAST) and not c:IsCode(id) @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c24101897.lua b/official/c24101897.lua index 1c9365464b..483a55bed8 100644 --- a/official/c24101897.lua +++ b/official/c24101897.lua @@ -32,14 +32,14 @@ function s.initial_effect(c) e4:SetCode(EVENT_SUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sumcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -49,7 +49,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end function s.filter(c,e) return c:IsFaceup() and c:IsLevelAbove(4) and c:IsCanTurnSet() and (not e or c:IsRelateToEffect(e)) @@ -61,7 +61,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) then return end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) then return end local g=eg:Filter(s.filter,nil,e) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end \ No newline at end of file diff --git a/official/c24103628.lua b/official/c24103628.lua index 4a3e34f239..faec83ed04 100644 --- a/official/c24103628.lua +++ b/official/c24103628.lua @@ -1,4 +1,5 @@ --幻影の魔術士 +--Phantom Magician local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsAttackBelow(1000) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsAttackBelow(1000) and c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c24104865.lua b/official/c24104865.lua index 8721656b6f..06e0788ce1 100644 --- a/official/c24104865.lua +++ b/official/c24104865.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -58,7 +58,7 @@ function s.checkop2(e,tp,eg,ep,ev,re,r,rp) end if aux.bdgcon(e,tp,eg,ep,ev,re,r,rp) then g:AddCard(t) - t:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) + t:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -90,8 +90,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() for tc in aux.Next(sg) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) - c:CreateRelation(tc,RESET_EVENT+0x1020000) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) + c:CreateRelation(tc,RESET_EVENT|RESET_TURN_SET|RESET_TOFIELD) end Duel.SpecialSummonComplete() end @@ -101,4 +101,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,0,nil,e:GetHandler()) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2411269.lua b/official/c2411269.lua index f4b93921a2..b0cf0ebc5f 100644 --- a/official/c2411269.lua +++ b/official/c2411269.lua @@ -19,16 +19,16 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT+RACE_WYRM) + local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_DRAGON|RACE_DINOSAUR|RACE_SEASERPENT|RACE_WYRM) if chk==0 then return #g>0 and (g:FilterCount(Card.IsRace,nil,RACE_SEASERPENT)<#g or Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)) end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:FilterCount(Card.IsRace,nil,RACE_DRAGON)*100) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:FilterCount(Card.IsRace,nil,RACE_WYRM)*400) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT+RACE_WYRM) + local g=Duel.GetMatchingGroup(Card.IsRace,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,RACE_DRAGON|RACE_DINOSAUR|RACE_SEASERPENT|RACE_WYRM) if #g==0 then return end local c=e:GetHandler() local ct1=g:FilterCount(Card.IsRace,nil,RACE_DRAGON) @@ -43,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct2*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end local og=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) @@ -53,12 +53,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(ct3*-300) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end if ct4>0 then Duel.Recover(tp,ct4*400,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c24128274.lua b/official/c24128274.lua index f245749655..1ae8d98b09 100644 --- a/official/c24128274.lua +++ b/official/c24128274.lua @@ -1,4 +1,5 @@ --深海の戦士 +--Deepsea Warrior local s,id=GetID() function s.initial_effect(c) --immune spell @@ -16,5 +17,5 @@ function s.econ(e) return Duel.IsEnvironment(CARD_UMI) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end + return te:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c24131534.lua b/official/c24131534.lua index 2d765c88f0..bfdd5402af 100644 --- a/official/c24131534.lua +++ b/official/c24131534.lua @@ -1,4 +1,5 @@ --イグナイト・マグナム +--Igknight Squire local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24137081.lua b/official/c24137081.lua index 3dbaf14430..8e540a6604 100644 --- a/official/c24137081.lua +++ b/official/c24137081.lua @@ -1,4 +1,5 @@ --ドリル・バーニカル +--Drill Barnacle local s,id=GetID() function s.initial_effect(c) --direct attack @@ -27,7 +28,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c24140059.lua b/official/c24140059.lua index 4853968214..512b8dc89d 100644 --- a/official/c24140059.lua +++ b/official/c24140059.lua @@ -1,4 +1,5 @@ --不幸を告げる黒猫 +--A Cat of Ill Omen local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,1) end end -end +end \ No newline at end of file diff --git a/official/c2414168.lua b/official/c2414168.lua index 1f855e20bf..a541b34aed 100644 --- a/official/c2414168.lua +++ b/official/c2414168.lua @@ -40,7 +40,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -59,13 +59,13 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(c:GetDefense()) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c24150026.lua b/official/c24150026.lua index d15992403c..238747196d 100644 --- a/official/c24150026.lua +++ b/official/c24150026.lua @@ -1,4 +1,5 @@ --カラクリ無双 八壱八 +--Karakuri Muso mdl 818 "Haipa" local s,id=GetID() function s.initial_effect(c) --must attack @@ -18,7 +19,7 @@ function s.initial_effect(c) --to defense local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.bpcon) @@ -42,4 +43,4 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c24151924.lua b/official/c24151924.lua index 5695e5c032..1545efdd41 100644 --- a/official/c24151924.lua +++ b/official/c24151924.lua @@ -61,7 +61,7 @@ function s.indtg(e,c) end function s.efilter(e,te) local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) - return te:IsActivated() and te:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and e:GetHandlerPlayer()==1-te:GetHandlerPlayer() + return te:IsActivated() and te:IsMonsterEffect() and loc==LOCATION_MZONE and e:GetHandlerPlayer()==1-te:GetHandlerPlayer() end --Functions for determining attack target function s.atklimit(e,c) @@ -76,7 +76,7 @@ function s.tgfilter(c) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_COST|REASON_DISCARD) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -100,18 +100,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end) diff --git a/official/c24158464.lua b/official/c24158464.lua index e681402153..4426c68554 100644 --- a/official/c24158464.lua +++ b/official/c24158464.lua @@ -26,14 +26,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={} -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,c) end function s.tgfilter(c) - return c:IsSetCard(0x10b) and c:IsAbleToGrave() and not c:IsCode(id) + return c:IsSetCard(SET_TINDANGLE) and c:IsAbleToGrave() and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -63,5 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local tc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() aux.ToHandOrElse(tc,tp) -end - +end \ No newline at end of file diff --git a/official/c24175232.lua b/official/c24175232.lua index eeaf5264b7..8635a9dde5 100644 --- a/official/c24175232.lua +++ b/official/c24175232.lua @@ -1,5 +1,5 @@ --ネフティスの蒼凰神 ---Sacred Azure Phoenix of Nephthys +--Cerulean Sacred Phoenix of Nephthys --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -33,18 +33,18 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} s.listed_names={23459650} function s.desfilter(c) - return c:IsSetCard(0x11f) and (c:IsFaceup() or not c:IsOnField()) + return c:IsSetCard(SET_NEPHTHYS) and (c:IsFaceup() or not c:IsOnField()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,2,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) local og=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) if #g*#og==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) @@ -58,12 +58,12 @@ end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if r & REASON_DESTROY==0 or r & REASON_BATTLE+REASON_EFFECT ==0 then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -81,5 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c24181936.lua b/official/c24181936.lua index 4bd40eb07c..1ac4a27f49 100644 --- a/official/c24181936.lua +++ b/official/c24181936.lua @@ -1,5 +1,5 @@ --闇味鍋パーティー ---Potluck Party +--Yaminabe Party --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -11,7 +11,7 @@ function s.initial_effect(c) --Choose attack targets and change ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) @@ -21,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) return cc==tc end) e1:SetLabelObject(e0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -55,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.atkcon) e2:SetTarget(s.atktg(tc)) e2:SetValue(s.atkval) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end function s.atop(e,tp,eg,ep,ev,re,r,rp) @@ -66,7 +66,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(1,0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -82,7 +82,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e:Reset() end function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.atktg(tc) return function(e,c) @@ -95,4 +95,4 @@ function s.atkval(e,c) local a=Duel.GetAttacker() if c==a then a=Duel.GetAttackTarget() end return a:GetBaseAttack() -end +end \ No newline at end of file diff --git a/official/c24184846.lua b/official/c24184846.lua index d441518a9e..27f15772d4 100644 --- a/official/c24184846.lua +++ b/official/c24184846.lua @@ -1,4 +1,5 @@ --BK リベージ・ガードナー +--Battlin' Boxer Rib Gardna local s,id=GetID() function s.initial_effect(c) --remove @@ -7,16 +8,16 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x84) and c:IsAbleToRemove() + return c:IsFaceup() and c:IsSetCard(SET_BATTLIN_BOXER) and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,15 +30,15 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end + if Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)==0 then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) then e1:SetLabel(0) else e1:SetLabel(Duel.GetTurnCount()) @@ -46,9 +47,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) e:Reset() -end +end \ No newline at end of file diff --git a/official/c2420921.lua b/official/c2420921.lua index 2b04632a9d..1b83250fda 100644 --- a/official/c2420921.lua +++ b/official/c2420921.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter(c) - return c:IsSetCard(0x38) and c:IsMonster() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.value(e,c) local g=Duel.GetMatchingGroup(s.filter,c:GetControler(),LOCATION_GRAVE,0,nil) @@ -41,4 +41,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24212820.lua b/official/c24212820.lua index 60f2c90669..68c8e06c45 100644 --- a/official/c24212820.lua +++ b/official/c24212820.lua @@ -1,6 +1,5 @@ --幻影騎士団ダーク・ガントレット --The Phantom Knights of Dark Gauntlets - local s,id=GetID() function s.initial_effect(c) --Send 1 "Phantom Knights" spell/trap from deck to GY @@ -33,10 +32,9 @@ function s.initial_effect(c) e3:SetValue(s.defval) c:RegisterEffect(e3) end -s.listed_series={0xdb} - +s.listed_series={SET_PHANTOM_KNIGHTS} function s.tgfilter(c) - return c:IsSetCard(0xdb) and c:IsSpellTrap() and c:IsAbleToGrave() + return c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap() and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -55,13 +53,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x21,300,600,4,RACE_WARRIOR,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_EFFECT,300,600,4,RACE_WARRIOR,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x21,300,600,4,RACE_WARRIOR,ATTRIBUTE_DARK) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_EFFECT,300,600,4,RACE_WARRIOR,ATTRIBUTE_DARK) then c:AddMonsterAttribute(TYPE_EFFECT) c:AssumeProperty(ASSUME_RACE,RACE_WARRIOR) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP_DEFENSE) @@ -72,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() @@ -82,7 +80,7 @@ function s.defcon(e) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.filter(c) - return c:IsSetCard(0xdb) and c:IsSpellTrap() + return c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap() end function s.defval(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*300 diff --git a/official/c242146.lua b/official/c242146.lua index b1d367fc1a..6209d35feb 100644 --- a/official/c242146.lua +++ b/official/c242146.lua @@ -17,4 +17,4 @@ function s.atkcon(e) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() return d and a==eqc and d:GetBattlePosition()==POS_FACEDOWN_DEFENSE -end +end \ No newline at end of file diff --git a/official/c24215921.lua b/official/c24215921.lua index 05095ef3ed..b1ef612803 100644 --- a/official/c24215921.lua +++ b/official/c24215921.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.hgysptg) e2:SetOperation(s.hgyspop) c:RegisterEffect(e2) diff --git a/official/c24218047.lua b/official/c24218047.lua index 9e31e029aa..7c5c398174 100644 --- a/official/c24218047.lua +++ b/official/c24218047.lua @@ -1,4 +1,5 @@ --破面竜 +--Unmasked Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24221739.lua b/official/c24221739.lua index 3a6b21157e..30876146ca 100644 --- a/official/c24221739.lua +++ b/official/c24221739.lua @@ -1,4 +1,5 @@ --神殿を守る者 +--Protector of the Sanctuary local s,id=GetID() function s.initial_effect(c) --cannot draw @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.con(e) return Duel.GetCurrentPhase()~=PHASE_DRAW -end +end \ No newline at end of file diff --git a/official/c24221808.lua b/official/c24221808.lua index f086a0f88f..ccb9243004 100644 --- a/official/c24221808.lua +++ b/official/c24221808.lua @@ -1,4 +1,5 @@ --メンタルオーバー・デーモン +--Overmind Archfiend local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -34,10 +35,10 @@ function s.rmfilter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -51,7 +52,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE|RESET_TOGRAVE|RESET_TURN_SET),0,1) end sg:AddCard(tc) - tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD) + tc:CreateRelation(c,RESET_EVENT|RESETS_STANDARD) end end end @@ -74,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=tg:Select(tp,ft,ft,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c24224830.lua b/official/c24224830.lua index 04dabf8623..6f71e55917 100644 --- a/official/c24224830.lua +++ b/official/c24224830.lua @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.distg) e1:SetLabel(tc:GetOriginalCodeRule()) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.discon) e2:SetOperation(s.disop) e2:SetLabel(tc:GetOriginalCodeRule()) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) end end @@ -53,9 +53,9 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() local code1,code2=re:GetHandler():GetOriginalCodeRule() - return re:IsActiveType(TYPE_MONSTER) and (code1==code or code2==code) + return re:IsMonsterEffect() and (code1==code or code2==code) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c24226942.lua b/official/c24226942.lua index d9f40c285c..9397a3afd6 100644 --- a/official/c24226942.lua +++ b/official/c24226942.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_DESTROYED) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) e2:SetCost(s.spcost) @@ -54,7 +54,7 @@ function s.sprescon(sg,e,tp,mg) return sg:IsExists(s.attrfilter,1,nil,sg) and aux.ChkfMMZ(1)(sg,e,tp,mg) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.sprescon,0) end local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.sprescon,1,tp,HINTMSG_REMOVE) Duel.Remove(sg,POS_FACEUP,REASON_COST) @@ -80,7 +80,7 @@ function s.rmfilter(c,e) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,e) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil,e) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,3,3,s.rmrescon,0) end local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rmrescon,1,tp,HINTMSG_REMOVE) Duel.SetTargetCard(sg) @@ -91,4 +91,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24268052.lua b/official/c24268052.lua index 9e1bfaae5d..f6108fdbc7 100644 --- a/official/c24268052.lua +++ b/official/c24268052.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.GetBattleDamage(tp)>0 and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_AVOID_BATTLE_DAMAGE) + return Duel.IsTurnPlayer(1-tp) and Duel.GetBattleDamage(tp)>0 and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_AVOID_BATTLE_DAMAGE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -25,7 +25,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24269961.lua b/official/c24269961.lua index e80a1af87b..09ffd33ffe 100644 --- a/official/c24269961.lua +++ b/official/c24269961.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c24285858.lua b/official/c24285858.lua index cee9ca49c7..2aa8a4d1e7 100644 --- a/official/c24285858.lua +++ b/official/c24285858.lua @@ -1,4 +1,5 @@ --グラディアル・リターン +--Gladiator's Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.filter(c) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) @@ -27,12 +28,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24291651.lua b/official/c24291651.lua index d5d3a30d87..94ee379efd 100644 --- a/official/c24291651.lua +++ b/official/c24291651.lua @@ -1,4 +1,5 @@ --ガンバラナイト +--Ganbara Knight local s,id=GetID() function s.initial_effect(c) --to defense @@ -19,4 +20,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c24294108.lua b/official/c24294108.lua index e5cad0ae0b..c2bd1af0e7 100644 --- a/official/c24294108.lua +++ b/official/c24294108.lua @@ -1,4 +1,5 @@ --燃えさかる大地 +--Burning Land local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) @@ -44,4 +45,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24299458.lua b/official/c24299458.lua index 26b0cd6e91..f3b4fa0dae 100644 --- a/official/c24299458.lua +++ b/official/c24299458.lua @@ -1,7 +1,6 @@ --禁じられた一滴 --Forbidden Droplet --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,15 +11,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) return true @@ -30,18 +26,18 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=100 then return false end e:SetLabel(0) - return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) + return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,ct,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,ct,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) local og=Duel.GetOperatedGroup() e:SetLabel(#og) local typ=0 - for tc in aux.Next(og) do + for tc in og:Iter() do typ = typ|tc:GetOriginalType() end - Duel.SetChainLimit(s.chainlimit(typ&0x7)) + Duel.SetChainLimit(s.chainlimit(typ&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP))) Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,#og,0,0) end function s.chainlimit(typ) @@ -61,21 +57,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_SET_ATTACK_FINAL) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) e0:SetValue(math.ceil(tc:GetAttack()/2)) tc:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c24311595.lua b/official/c24311595.lua index 308200fe43..0de6c4146e 100644 --- a/official/c24311595.lua +++ b/official/c24311595.lua @@ -1,4 +1,5 @@ --レスキューロイド +--Rescueroid local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.filter(c,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousControler(tp) - and c:IsSetCard(0x16) and c:IsAbleToHand() + and c:IsSetCard(SET_ROID) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24317029.lua b/official/c24317029.lua index b24505d834..da0e4ee396 100644 --- a/official/c24317029.lua +++ b/official/c24317029.lua @@ -1,4 +1,5 @@ --墓守の偵察者 +--Gravekeeper's Spy local s,id=GetID() function s.initial_effect(c) --flip @@ -10,13 +11,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsAttackBelow(1500) and c:IsSetCard(SET_GRAVEKEEPERS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24326617.lua b/official/c24326617.lua index 49b63f4298..10ac6a1f85 100644 --- a/official/c24326617.lua +++ b/official/c24326617.lua @@ -1,4 +1,5 @@ --氷帝家臣エッシャー +--Escher the Frost Vassal local s,id=GetID() function s.initial_effect(c) --spsummon @@ -18,4 +19,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_SZONE,2,nil) -end +end \ No newline at end of file diff --git a/official/c2434862.lua b/official/c2434862.lua index 721b1cd57c..e25f868707 100644 --- a/official/c2434862.lua +++ b/official/c2434862.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -50,15 +50,15 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end local count=(Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0) and 2 or 0 e:SetLabel(count) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft==0 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) if #g==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sc=g:Select(tp,1,1,nil):GetFirst() diff --git a/official/c24348804.lua b/official/c24348804.lua index f264453f5a..14ef24b79f 100644 --- a/official/c24348804.lua +++ b/official/c24348804.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -68,5 +68,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.distg(e,c) - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_SPECIAL) -end + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c24361622.lua b/official/c24361622.lua index f9d2442f75..e54ba5623b 100644 --- a/official/c24361622.lua +++ b/official/c24361622.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSequence()>4 and Duel.GetTurnPlayer()==1-tp + return e:GetHandler():GetSequence()>4 and Duel.IsTurnPlayer(1-tp) end function s.thcfilter(c,tp) return c:IsMonster() and c:IsReleasable() @@ -60,12 +60,12 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then @@ -73,11 +73,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c24362891.lua b/official/c24362891.lua index 8dd2851023..0b7dc3ea3d 100644 --- a/official/c24362891.lua +++ b/official/c24362891.lua @@ -1,4 +1,5 @@ --突然進化 +--Evo-Instant local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.cfilter(c,ft,tp) return c:IsRace(RACE_REPTILE) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) and (c:IsFaceup() or c:IsControler(tp)) end @@ -24,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c24382602.lua b/official/c24382602.lua index 664ab7c3d4..4dd4d83e12 100644 --- a/official/c24382602.lua +++ b/official/c24382602.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c24384095.lua b/official/c24384095.lua index a54b689911..974228f41b 100644 --- a/official/c24384095.lua +++ b/official/c24384095.lua @@ -1,4 +1,5 @@ --九蛇孔雀 +--Kujakujaku local s,id=GetID() function s.initial_effect(c) --search @@ -22,14 +23,14 @@ function s.filter(c) return c:IsLevelBelow(4) and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24393683.lua b/official/c24393683.lua index 6ee261ed6f..a20257dbfa 100644 --- a/official/c24393683.lua +++ b/official/c24393683.lua @@ -21,12 +21,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x168} +s.listed_series={SET_GUNKAN} s.listed_series={CARD_SUSHIP_SHARI} function s.cfilter(c) return c:IsCode(CARD_SUSHIP_SHARI) and not c:IsPublic() @@ -45,7 +45,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x168) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_GUNKAN) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,3,nil) end @@ -70,7 +70,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsMonster() and c:IsSetCard(0x168) and c:IsAbleToDeck() + return c:IsMonster() and c:IsSetCard(SET_GUNKAN) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -84,12 +84,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) diff --git a/official/c24413299.lua b/official/c24413299.lua index 0dcade0902..56ae451d78 100644 --- a/official/c24413299.lua +++ b/official/c24413299.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 @@ -45,8 +45,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(tc,true) if Duel.Destroy(tc,REASON_EFFECT)~=0 and (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) - and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) - and tc:IsType(TYPE_SPELL+TYPE_TRAP) and tc:IsSSetable() + and not tc:IsLocation(LOCATION_HAND|LOCATION_DECK) + and tc:IsSpellTrap() and tc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() Duel.SSet(tp,tc) @@ -55,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c24419823.lua b/official/c24419823.lua index 1385938a8f..9d453fb8c2 100644 --- a/official/c24419823.lua +++ b/official/c24419823.lua @@ -1,4 +1,5 @@ --マインフィールド +--Minefieldriller local s,id=GetID() function s.initial_effect(c) --salvage @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c24425055.lua b/official/c24425055.lua index fa508e7d30..8c911901af 100644 --- a/official/c24425055.lua +++ b/official/c24425055.lua @@ -20,7 +20,7 @@ function s.setfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.DiscardHand(tp,s.filter1,1,1,REASON_COST+REASON_DISCARD,nil,tp) + Duel.DiscardHand(tp,s.filter1,1,1,REASON_COST|REASON_DISCARD,nil,tp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) diff --git a/official/c24429467.lua b/official/c24429467.lua index b1db15eaeb..ae0f1c8636 100644 --- a/official/c24429467.lua +++ b/official/c24429467.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1,id) e4:SetCondition(s.thcon) - e4:SetCost(s.thcost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) @@ -48,17 +48,13 @@ end function s.acop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER) local c=e:GetHandler() - if re:IsActiveType(TYPE_MONSTER) and p~=tp and c:GetFlagEffect(1)>0 then + if re:IsMonsterEffect() and p~=tp and c:GetFlagEffect(1)>0 then c:AddCounter(COUNTER_SPELL,1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetCounter(COUNTER_SPELL)>=6 end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.thfilter(c) return c:IsSpell() and c:IsAbleToHand() end @@ -73,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24432029.lua b/official/c24432029.lua index 787f2ee59a..45c4766a7a 100644 --- a/official/c24432029.lua +++ b/official/c24432029.lua @@ -1,4 +1,5 @@ --ジェネクス・ブラスト +--Genex Blastfan local s,id=GetID() function s.initial_effect(c) --search @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.filter(c) - return c:IsSetCard(0x2) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() + return c:IsSetCard(SET_GENEX) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24435369.lua b/official/c24435369.lua index 9aa7a196ba..0659784651 100644 --- a/official/c24435369.lua +++ b/official/c24435369.lua @@ -1,4 +1,5 @@ --マーメイド・ナイト +--Mermaid Knight local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,4 +12,4 @@ end s.listed_names={CARD_UMI} function s.dircon(e) return Duel.IsEnvironment(CARD_UMI) -end +end \ No newline at end of file diff --git a/official/c24449083.lua b/official/c24449083.lua index faa6994447..3b87d078b4 100644 --- a/official/c24449083.lua +++ b/official/c24449083.lua @@ -1,4 +1,5 @@ --コート・オブ・ジャスティス +--Court of Justice local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24484270.lua b/official/c24484270.lua index 2fbe8a3b39..7ada9cf5ea 100644 --- a/official/c24484270.lua +++ b/official/c24484270.lua @@ -1,12 +1,11 @@ --ジェムナイト・ファントムルーツ --Gem-Knight Phantom Quartz - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Link Summon procedure - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x47),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM),2,2) --Add 1 "Gem-Knight" card from deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -20,7 +19,7 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) --Fusion Summon "Gem-Knight" fusion monster - local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0x1047),matfilter=aux.FALSE, + local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT),matfilter=aux.FALSE, extrafil=s.fextra,extraop=Fusion.ShuffleMaterial,stage2=s.stage2,extratg=s.extratarget} local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,18 +27,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(Fusion.SummonEffTG(params)) e2:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e2) end -s.listed_series={0x1047,0x47} - +s.listed_series={SET_GEM_KNIGHT,SET_GEM} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,12 +51,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.NecroValleyFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.NecroValleyFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end function s.stage2(e,tc,tp,mg,chk) if chk==1 then @@ -68,11 +62,11 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE+LOCATION_REMOVED) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE|LOCATION_REMOVED) end \ No newline at end of file diff --git a/official/c24487411.lua b/official/c24487411.lua index 56c8cbc8b6..16747f7ca6 100644 --- a/official/c24487411.lua +++ b/official/c24487411.lua @@ -61,4 +61,4 @@ function s.tdoperation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24506253.lua b/official/c24506253.lua index 65f7c51d96..c32b81c9af 100644 --- a/official/c24506253.lua +++ b/official/c24506253.lua @@ -1,5 +1,5 @@ --先史遺産アカンバロの土偶 ---Chronomaly Acámbaro Figure +--Chronomaly Acambaro Figures --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -25,13 +25,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.counterfilter(c) - return c:IsSetCard(0x70) + return c:IsSetCard(SET_CHRONOMALY) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x70) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:GetReasonPlayer()==1-tp + return c:IsFaceup() and c:IsSetCard(SET_CHRONOMALY) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) and c:GetReasonPlayer()==1-tp end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -41,7 +41,7 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT|REASON_DISCARD) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1000) @@ -52,19 +52,19 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x70) + return not c:IsSetCard(SET_CHRONOMALY) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -77,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then local fid=c:GetFieldID() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) --Return it to the hand during the End Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -100,4 +100,4 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24508238.lua b/official/c24508238.lua index b27532f85f..23cf4e0dc0 100644 --- a/official/c24508238.lua +++ b/official/c24508238.lua @@ -8,27 +8,22 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_REMOVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24514503.lua b/official/c24514503.lua index c282b9eb19..b540476ed8 100644 --- a/official/c24514503.lua +++ b/official/c24514503.lua @@ -62,4 +62,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) --Negate its effects tc:NegateEffects(e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c24521754.lua b/official/c24521754.lua index e0141220ea..758ad834c3 100644 --- a/official/c24521754.lua +++ b/official/c24521754.lua @@ -1,5 +1,5 @@ --百景戦都ゴルディロックス ---Landscaper Goldilocks +--Goldilocks the Battle Landscaper --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -66,5 +66,4 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Destroy(dg,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c24550676.lua b/official/c24550676.lua index 75a2744b54..4e178cccec 100644 --- a/official/c24550676.lua +++ b/official/c24550676.lua @@ -1,9 +1,10 @@ --月光舞獅子姫 +--Lunalight Leo Dancer local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,false,false,97165977,1,aux.FilterBoolFunctionEx(Card.IsSetCard,0xdf),2) + Fusion.AddProcMixN(c,false,false,97165977,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),2) --spsummon condition local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) @@ -41,8 +42,8 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0xdf} -s.material_setcode={0xdf} +s.listed_series={SET_LUNALIGHT} +s.material_setcode={SET_LUNALIGHT} function s.tgvalue(e,re,rp) return rp~=e:GetHandlerPlayer() end @@ -57,4 +58,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsSummonType,tp,0,LOCATION_MZONE,nil,SUMMON_TYPE_SPECIAL) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24557335.lua b/official/c24557335.lua index 4af3a2c174..f7686c3acc 100644 --- a/official/c24557335.lua +++ b/official/c24557335.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c24573625.lua b/official/c24573625.lua index 5fd3c92e4e..5a9e55a2f1 100644 --- a/official/c24573625.lua +++ b/official/c24573625.lua @@ -1,4 +1,5 @@ --ブンボーグ008 +--Deskbot 008 local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -40,16 +41,16 @@ function s.initial_effect(c) e5:SetValue(aux.tgoval) c:RegisterEffect(e5) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.splimcon(e) return not e:GetHandler():IsForbidden() end function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xab) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DESKBOT) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0xab)*500 + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_DESKBOT)*500 end function s.tglimit(e,c) - return c:IsSetCard(0xab) and c~=e:GetHandler() -end + return c:IsSetCard(SET_DESKBOT) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c24590232.lua b/official/c24590232.lua index c81c36b179..b06cb810ce 100644 --- a/official/c24590232.lua +++ b/official/c24590232.lua @@ -23,10 +23,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.filter1(c,e,tp) return c:IsType(TYPE_SYNCHRO) and c:GetLevel()<9 and (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION)) - and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp,c) + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.filter2(c,e,tp,sc) - local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c) + local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) return c:IsType(TYPE_TUNER) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) and aux.SelectUnselectGroup(rg,e,tp,nil,nil,s.rescon(c,sc),0) end @@ -50,9 +50,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local sc=g1:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp,sc) + local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp,sc) local tuner=g2:GetFirst() - local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,tuner) + local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE|LOCATION_GRAVE,0,tuner) local sg=aux.SelectUnselectGroup(rg,e,tp,nil,nil,s.rescon(tuner,sc),1,tp,HINTMSG_REMOVE,s.rescon(tuner,sc)) sg:AddCard(tuner) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) diff --git a/official/c2460565.lua b/official/c2460565.lua index 240b11674c..82ae0d0902 100644 --- a/official/c2460565.lua +++ b/official/c2460565.lua @@ -38,4 +38,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24610207.lua b/official/c24610207.lua index 760b24b6a8..3b58559ee1 100644 --- a/official/c24610207.lua +++ b/official/c24610207.lua @@ -1,4 +1,5 @@ --アステル・ドローン +--Star Drawing local s,id=GetID() function s.initial_effect(c) --xyzlv @@ -35,19 +36,19 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.drcon) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -58,4 +59,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2461031.lua b/official/c2461031.lua index 29943bd5bd..224acfcc6e 100644 --- a/official/c2461031.lua +++ b/official/c2461031.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_SZONE) e5:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e5:SetCost(s.lvcost) + e5:SetCost(Cost.SelfToGrave) e5:SetTarget(s.lvtg) e5:SetOperation(s.lvop) c:RegisterEffect(e5) @@ -67,10 +67,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) s.equipop(c,e,tp,tc) end end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.lvfilter(c) return c:IsFaceup() and c:HasLevel() end @@ -91,4 +87,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c24621460.lua b/official/c24621460.lua index b80ed2ac55..b2b600330a 100644 --- a/official/c24621460.lua +++ b/official/c24621460.lua @@ -20,15 +20,15 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD) e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e3:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e3:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x11)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_KARAKURI)) c:RegisterEffect(e3) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c24623598.lua b/official/c24623598.lua index ee48d36658..3bb4cea021 100644 --- a/official/c24623598.lua +++ b/official/c24623598.lua @@ -1,4 +1,5 @@ --ロスト +--Disappear local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,10 +16,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp,chk) @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2463794.lua b/official/c2463794.lua index 0f4ef8318a..51c1f39e00 100644 --- a/official/c2463794.lua +++ b/official/c2463794.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c24644634.lua b/official/c24644634.lua index 5700eed3e3..9b43607d2c 100644 --- a/official/c24644634.lua +++ b/official/c24644634.lua @@ -1,4 +1,5 @@ --ナチュル・ホワイトオーク +--Naturia White Oak local s,id=GetID() function s.initial_effect(c) --special summon @@ -9,23 +10,19 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.spcon(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsContains(e:GetHandler()) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x2a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_NATURIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) diff --git a/official/c24658418.lua b/official/c24658418.lua index ace549488b..6ec82e4723 100644 --- a/official/c24658418.lua +++ b/official/c24658418.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x7b} +s.listed_series={SET_GALAXY} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x7b) + return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(SET_GALAXY) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,10 +43,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.mfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7b) and not c:IsType(TYPE_TOKEN) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY) and not c:IsType(TYPE_TOKEN) end function s.xyzfilter(c,mg) - return c:IsSetCard(0x7b) and c:IsXyzSummonable(nil,mg) + return c:IsSetCard(SET_GALAXY) and c:IsXyzSummonable(nil,mg) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -63,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() Duel.XyzSummon(tp,xyz,nil,g,1,99) end -end +end \ No newline at end of file diff --git a/official/c24661486.lua b/official/c24661486.lua index ca6b964571..b85ae5bb48 100644 --- a/official/c24661486.lua +++ b/official/c24661486.lua @@ -25,7 +25,7 @@ end s.counter_list={0x1015} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsCanAddCounter(0x1015,1) end @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.atkval(e,c) return Duel.GetCounter(0,1,1,0x1015)*300 -end +end \ No newline at end of file diff --git a/official/c24668830.lua b/official/c24668830.lua index f890b25e59..825e8b3bba 100644 --- a/official/c24668830.lua +++ b/official/c24668830.lua @@ -1,4 +1,5 @@ --細菌感染 +--Germ Infection local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.NOT(aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE))) @@ -20,7 +21,7 @@ function s.initial_effect(c) --atkdown local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetLabelObject(e2) @@ -34,10 +35,10 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) pe:SetValue(0) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local pe=e:GetLabelObject() local atk=pe:GetValue() pe:SetValue(atk-300) -end +end \ No newline at end of file diff --git a/official/c24672164.lua b/official/c24672164.lua index 34d7a73b4a..3265803cee 100644 --- a/official/c24672164.lua +++ b/official/c24672164.lua @@ -1,9 +1,10 @@ --幻奏の華歌聖ブルーム・プリマ +--Bloom Prima the Melodious Choir local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9b),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,0x109b)) + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELODIOUS),1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELODIOUS_MAESTRA)) --summon success local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -28,8 +29,8 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x9b,0x109b} -s.material_setcode={0x9b} +s.listed_series={SET_MELODIOUS,SET_MELODIOUS_MAESTRA} +s.material_setcode={SET_MELODIOUS} function s.matcheck(e,c) local ct=c:GetMaterialCount() local e1=Effect.CreateEffect(c) @@ -41,10 +42,10 @@ function s.matcheck(e,c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() end function s.filter(c) - return c:IsSetCard(0x9b) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MELODIOUS) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -58,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24673894.lua b/official/c24673894.lua index 89aaef9c41..1e1695e841 100644 --- a/official/c24673894.lua +++ b/official/c24673894.lua @@ -1,6 +1,5 @@ --チェンジ・デステニー --Changing Destiny - local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tc=Duel.GetAttacker() @@ -32,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local val=tc:GetAttack()/2 local op=Duel.SelectOption(1-tp,aux.Stringid(id,0),aux.Stringid(id,1)) diff --git a/official/c24689197.lua b/official/c24689197.lua index 62c88a90fb..475fdbb511 100644 --- a/official/c24689197.lua +++ b/official/c24689197.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.reccost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.rectg) e1:SetOperation(s.recop) c:RegisterEffect(e1) @@ -33,11 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_AROMA} -function s.reccost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.recfilter(c) return c:IsSetCard(SET_AROMA) and c:IsFaceup() and c:GetAttack()>0 end diff --git a/official/c24694698.lua b/official/c24694698.lua index 5e5a32c4ee..dfd234d1d6 100644 --- a/official/c24694698.lua +++ b/official/c24694698.lua @@ -1,4 +1,5 @@ --ナチュル・マロン +--Naturia Marron local s,id=GetID() function s.initial_effect(c) --send to grave @@ -23,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x2a) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_NATURIA) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -39,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x2a) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_NATURIA) and c:IsMonster() and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,12 +53,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==2 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24696097.lua b/official/c24696097.lua index 3adaead442..8675c749d2 100644 --- a/official/c24696097.lua +++ b/official/c24696097.lua @@ -107,7 +107,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():GetControler()==1-tp + return Duel.GetAttacker():IsControler(1-tp) end function s.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() diff --git a/official/c24701066.lua b/official/c24701066.lua index 51aa39c7ad..b4d277de42 100644 --- a/official/c24701066.lua +++ b/official/c24701066.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtgtg) e2:SetOperation(s.thtgop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c24701235.lua b/official/c24701235.lua index e0f8ae9e04..89a18ec20f 100644 --- a/official/c24701235.lua +++ b/official/c24701235.lua @@ -54,4 +54,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_SPIRIT),tp,LOCATION_MZONE,0,1,nil) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24707869.lua b/official/c24707869.lua index d757ef4899..3ec11f1b2d 100644 --- a/official/c24707869.lua +++ b/official/c24707869.lua @@ -1,4 +1,5 @@ --ブライト・フューチャー +--Bright Future local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg~=2 then return end - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24721709.lua b/official/c24721709.lua index 2d7b8ae5cf..70d7362253 100644 --- a/official/c24721709.lua +++ b/official/c24721709.lua @@ -1,5 +1,5 @@ --救魔の標 ---Guidance of Spell Salvation +--Dwimmered Path --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.filter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_EFFECT) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -29,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsRace(RACE_SPELLCASTER) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c24725825.lua b/official/c24725825.lua index da5e7b2d61..59f4cfe922 100644 --- a/official/c24725825.lua +++ b/official/c24725825.lua @@ -1,4 +1,5 @@ --エレクトリック・ワーム +--Electric Virus local s,id=GetID() function s.initial_effect(c) --control @@ -15,10 +16,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_DRAGON) and c:IsControlerCanBeChanged() + return c:IsFaceup() and c:IsRace(RACE_MACHINE|RACE_DRAGON) and c:IsControlerCanBeChanged() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE+RACE_DRAGON) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE|RACE_DRAGON) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c24731391.lua b/official/c24731391.lua index 3ffa2cafa1..c92725331a 100644 --- a/official/c24731391.lua +++ b/official/c24731391.lua @@ -66,7 +66,7 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and bc and bc:IsLinkMonster() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and bc and bc:IsLinkMonster() end function s.thfilter(c) return c:IsRace(RACE_CYBERSE) and c:IsMonster() and c:IsAbleToHand() @@ -86,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24731453.lua b/official/c24731453.lua index 5b42846b14..9b7a397c72 100644 --- a/official/c24731453.lua +++ b/official/c24731453.lua @@ -1,4 +1,5 @@ --除雪機関車ハッスル・ラッセル +--Snow Plow Hustle Rustle local s,id=GetID() function s.initial_effect(c) --spsummon @@ -53,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,ct*200,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c24779554.lua b/official/c24779554.lua index 6d26737072..9d9cfc4e9a 100644 --- a/official/c24779554.lua +++ b/official/c24779554.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,2}) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e3:SetTarget(s.tdtg) e3:SetOperation(s.tdop) c:RegisterEffect(e3) diff --git a/official/c24793135.lua b/official/c24793135.lua index 0e690601d2..b89f0cdfc1 100644 --- a/official/c24793135.lua +++ b/official/c24793135.lua @@ -87,5 +87,5 @@ end function s.aclimit(e,re,tp) local loc=re:GetActivateLocation() local rc=re:GetHandler() - return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and rc:IsDefenseAbove(0) and not rc:IsDefense(rc:GetAttack()) -end + return loc==LOCATION_MZONE and re:IsMonsterEffect() and rc:IsDefenseAbove(0) and not rc:IsDefense(rc:GetAttack()) +end \ No newline at end of file diff --git a/official/c24799107.lua b/official/c24799107.lua index 20e93784d5..b863732b3d 100644 --- a/official/c24799107.lua +++ b/official/c24799107.lua @@ -1,17 +1,17 @@ --ドラゴンメイド・シュトラール ---Dragonmaid Strahl +--Dragonmaid Sheou --Scripted by King Yamato local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x133),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONMAID),s.matfilter) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -30,24 +30,24 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} s.listed_names={41232647} function s.matfilter(c,fc,sumtype,tp) return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsLevelAbove(5) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x133) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_DRAGONMAID) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) and chkc~=c end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -74,7 +74,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end if not c:IsRelateToEffect(e) then return end Duel.BreakEffect() - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT) if c:IsLocation(LOCATION_EXTRA) and Duel.IsExistingMatchingCard(s.house_filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then local tg=Duel.GetFirstMatchingCard(s.house_filter,tp,LOCATION_EXTRA,0,nil,e,tp) if tg then @@ -82,4 +82,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c24838456.lua b/official/c24838456.lua index 9161187a3e..c7bc61e7f4 100644 --- a/official/c24838456.lua +++ b/official/c24838456.lua @@ -1,4 +1,5 @@ --虚無を呼ぶ呪文 +--Vanity's Call local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) for i=1,ev do local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local tc=te:GetHandler() - if te:IsHasType(EFFECT_TYPE_ACTIVATE) or te:IsActiveType(TYPE_MONSTER) then + if te:IsHasType(EFFECT_TYPE_ACTIVATE) or te:IsMonsterEffect() then ng:AddCard(tc) if tc:IsRelateToEffect(te) then dg:AddCard(tc) @@ -42,10 +43,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) for i=1,ev do local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT) local tc=te:GetHandler() - if (te:IsHasType(EFFECT_TYPE_ACTIVATE) or te:IsActiveType(TYPE_MONSTER)) and Duel.NegateActivation(i) + if (te:IsHasType(EFFECT_TYPE_ACTIVATE) or te:IsMonsterEffect()) and Duel.NegateActivation(i) and tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then dg:AddCard(tc) end end Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24839398.lua b/official/c24839398.lua index ff666a604a..ac3315f4fa 100644 --- a/official/c24839398.lua +++ b/official/c24839398.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.setcon) - e2:SetCost(s.setcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) @@ -41,11 +41,6 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) local ex,_,damp=Duel.CheckEvent(EVENT_BATTLE_DAMAGE,true) return (bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and bc:IsControler(1-tp)) or (ex and damp==1-tp) end -function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.setfilter(c,ignore_zones) return c:IsTrap() and c:IsSSetable(ignore_zones) end diff --git a/official/c24842059.lua b/official/c24842059.lua index d56461607c..ebb09472a7 100644 --- a/official/c24842059.lua +++ b/official/c24842059.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -33,17 +33,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.matfilter(c,lc,sumtype,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE,lc,sumtype,tp) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return ep==1-tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return ep==1-tp and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainDisablable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -59,7 +55,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,ft,tp) - return c:IsSetCard(0x135) and c:IsControler(tp) and c:GetSummonLocation()==LOCATION_EXTRA + return c:IsSetCard(SET_IGNISTER) and c:IsControler(tp) and c:GetSummonLocation()==LOCATION_EXTRA and (ft>0 or c:GetSequence()<5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24857466.lua b/official/c24857466.lua index a6fe9dfe56..027d8eacc3 100644 --- a/official/c24857466.lua +++ b/official/c24857466.lua @@ -1,4 +1,5 @@ --冥王竜ヴァンダルギオン +--Van'Dalgyon the Dark Dragon Lord local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -55,13 +56,13 @@ function s.initial_effect(c) end function s.chop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if rp==tp or (not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return end + if rp==tp or (not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return end local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER) if de and dp==tp and de:GetHandler():IsType(TYPE_COUNTER) then local ty=re:GetActiveType() local flag=c:GetFlagEffectLabel(id) if not flag then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0,ty) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0,ty) e:SetLabelObject(de) elseif de~=e:GetLabelObject() then e:SetLabelObject(de) @@ -141,4 +142,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c24861088.lua b/official/c24861088.lua index de75f81603..af6964a719 100644 --- a/official/c24861088.lua +++ b/official/c24861088.lua @@ -26,13 +26,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} s.listed_names={id} function s.chainfilter(re,tp,cid) - return re:GetHandler():IsSetCard(0x70) + return re:GetHandler():IsSetCard(SET_CHRONOMALY) end function s.filter(c) - return c:IsSetCard(0x70) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_CHRONOMALY) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -47,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x70) + return c:IsFacedown() or not c:IsSetCard(SET_CHRONOMALY) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 @@ -62,11 +62,11 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return not re:GetHandler():IsSetCard(0x70) + return not re:GetHandler():IsSetCard(SET_CHRONOMALY) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -78,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c24874630.lua b/official/c24874630.lua index 02ced97321..63dadc4bc0 100644 --- a/official/c24874630.lua +++ b/official/c24874630.lua @@ -27,28 +27,28 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.descon) e3:SetOperation(s.desop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e3,true) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,1000) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -56,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c24882256.lua b/official/c24882256.lua index 8d04ce25a1..f225e6f877 100644 --- a/official/c24882256.lua +++ b/official/c24882256.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetRange(LOCATION_GRAVE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetCountLimit(1,{id,2}) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) @@ -68,7 +68,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -89,13 +89,13 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not (c:IsSummonType(SUMMON_TYPE_LINK) and (r&REASON_DESTROY)==REASON_DESTROY) then return end - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if not (c:IsLinkSummoned() and (r&REASON_DESTROY)==REASON_DESTROY) then return end + if Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -110,5 +110,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c24892828.lua b/official/c24892828.lua index 1d7d482234..c1b8d7c462 100644 --- a/official/c24892828.lua +++ b/official/c24892828.lua @@ -1,4 +1,4 @@ --- +--ティスティナの還り仔 --Returned of the Tistina --Scripted by Hatter local s,id=GetID() @@ -64,7 +64,7 @@ function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.matfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp) - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0) end function s.matop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c24903843.lua b/official/c24903843.lua index 338066e16c..f95bd340f5 100644 --- a/official/c24903843.lua +++ b/official/c24903843.lua @@ -1,6 +1,5 @@ --バージェストマ・ピカイア --Paleozoic Pikaia - local s,id=GetID() function s.initial_effect(c) --Discard 1 "Paleozoic" card, draw 2 @@ -22,10 +21,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xd4} - +s.listed_series={SET_PALEOZOIC} function s.filter(c) - return c:IsSetCard(0xd4) and c:IsDiscardable(REASON_EFFECT) + return c:IsSetCard(SET_PALEOZOIC) and c:IsDiscardable(REASON_EFFECT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) @@ -33,25 +31,25 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.filter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then + if Duel.DiscardHand(tp,s.filter,1,1,REASON_EFFECT|REASON_DISCARD,nil)~=0 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -64,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -72,12 +70,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c24907044.lua b/official/c24907044.lua index 1f221ab171..5d1d8713bf 100644 --- a/official/c24907044.lua +++ b/official/c24907044.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e4:SetOperation(s.setop) c:RegisterEffect(e4) end -s.listed_series={0x10ec,0x20ec} +s.listed_series={SET_ABYSS_ACTOR,SET_ABYSS_SCRIPT} function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() return ep==tp and a:IsControler(1-tp) and a:IsFaceup() and a:IsRelateToBattle() @@ -60,13 +60,13 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-ev) tc:RegisterEffect(e1) end end function s.thfilter(c,atk) - return c:IsFaceup() and c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsAttackBelow(atk) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsAttackBelow(atk) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil,ev) end @@ -95,7 +95,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -105,7 +105,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)) end function s.cfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end @@ -116,4 +116,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c24915933.lua b/official/c24915933.lua index e6a5e89603..b2c306493f 100644 --- a/official/c24915933.lua +++ b/official/c24915933.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c24919805.lua b/official/c24919805.lua index cfd98fb1b4..65f2cf9c68 100644 --- a/official/c24919805.lua +++ b/official/c24919805.lua @@ -22,13 +22,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -53,7 +53,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,id) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.filter(c) @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c24920410.lua b/official/c24920410.lua index b9c02564ac..1749c4770d 100644 --- a/official/c24920410.lua +++ b/official/c24920410.lua @@ -1,4 +1,5 @@ --オーバー・レンチ +--Overwind local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,17 +10,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x58} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_WIND_UP} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,20 +33,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(atk) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(def) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetRange(LOCATION_MZONE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetCountLimit(1) e3:SetOperation(s.retop) tc:RegisterEffect(e3) @@ -56,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24940422.lua b/official/c24940422.lua index 2c59fbe24f..fcfd4feb5d 100644 --- a/official/c24940422.lua +++ b/official/c24940422.lua @@ -1,5 +1,5 @@ --雪花の光 ---Light of Sekka +--Sekka's Light -- local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.aclimit(e,re,tp) - return not re:GetHandler():IsCode(id) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return not re:GetHandler():IsCode(id) and re:IsSpellTrapEffect() end function s.tdfilter(c) return c:IsMonster() and c:IsAbleToDeck() @@ -70,7 +70,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,1,1,nil) Duel.ConfirmCards(1-p,sg) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,1,REASON_EFFECT) diff --git a/official/c24943456.lua b/official/c24943456.lua index 133c977b48..2f477a53bd 100644 --- a/official/c24943456.lua +++ b/official/c24943456.lua @@ -1,8 +1,9 @@ --TG パワー・グラディエイター +--T.G. Power Gladiator local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x27),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_TG),1,99) c:EnableReviveLimit() --pierce local e1=Effect.CreateEffect(c) @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) end @@ -34,4 +35,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c24996659.lua b/official/c24996659.lua index 89dae1455e..906fb23fdd 100644 --- a/official/c24996659.lua +++ b/official/c24996659.lua @@ -1,4 +1,5 @@ --エレキーウィ +--Wattkiwi local s,id=GetID() function s.initial_effect(c) --indes @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetValue(1) c:RegisterEffect(e1) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.indtg(e,c) - return c:IsSetCard(0xe) and c==Duel.GetAttacker() -end + return c:IsSetCard(SET_WATT) and c==Duel.GetAttacker() +end \ No newline at end of file diff --git a/official/c25005816.lua b/official/c25005816.lua index 696ba228e6..91a8220349 100644 --- a/official/c25005816.lua +++ b/official/c25005816.lua @@ -1,4 +1,5 @@ --鼓舞 +--Inspiration local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -28,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(700) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25034083.lua b/official/c25034083.lua index bddd8a16a1..2f264ff050 100644 --- a/official/c25034083.lua +++ b/official/c25034083.lua @@ -1,4 +1,5 @@ --デコイロイド +--Decoyroid local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -13,4 +14,4 @@ end s.listed_names={id} function s.atlimit(e,c) return not c:IsCode(id) and c:IsFaceup() -end +end \ No newline at end of file diff --git a/official/c2504891.lua b/official/c2504891.lua index 5125483a8d..918f74b364 100644 --- a/official/c2504891.lua +++ b/official/c2504891.lua @@ -5,4 +5,4 @@ function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,28725004,42431843) -end +end \ No newline at end of file diff --git a/official/c25050038.lua b/official/c25050038.lua index ea1a8b728e..c85b288bd5 100644 --- a/official/c25050038.lua +++ b/official/c25050038.lua @@ -1,4 +1,5 @@ --チェーン・ヒーリング +--Chain Healing local s,id=GetID() function s.initial_effect(c) --recover @@ -28,6 +29,6 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) elseif ct>1 then c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25067275.lua b/official/c25067275.lua index 5e7e80cdd3..a35717dca1 100644 --- a/official/c25067275.lua +++ b/official/c25067275.lua @@ -21,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) @@ -61,10 +61,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) ec:RegisterEffect(e1) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c25090294.lua b/official/c25090294.lua index a034aa2acc..c0d5e26bf8 100644 --- a/official/c25090294.lua +++ b/official/c25090294.lua @@ -1,4 +1,5 @@ --ブルーメンブラット +--Rose Bud local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,15 +30,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c25096909.lua b/official/c25096909.lua index 48b0e0a650..b8fce53a65 100644 --- a/official/c25096909.lua +++ b/official/c25096909.lua @@ -69,4 +69,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Remove(opp_rg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25109950.lua b/official/c25109950.lua index ec467306cd..2bae52e310 100644 --- a/official/c25109950.lua +++ b/official/c25109950.lua @@ -1,4 +1,5 @@ --陽アイルの小剣士 +--The Little Swordsman of Aile local s,id=GetID() function s.initial_effect(c) --atkup @@ -23,7 +24,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c2511.lua b/official/c2511.lua index efe012bffd..3eaae9860d 100644 --- a/official/c2511.lua +++ b/official/c2511.lua @@ -1,9 +1,9 @@ --- 白銀の城の狂時計 --- Labrynth Cooclock --- Scripted by Hatter +--白銀の城の狂時計 +--Labrynth Cooclock +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Allow Trap activation in the same turn it's set + --Allow Trap activation in the same turn it's set local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_QUICK_O) @@ -11,10 +11,10 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCountLimit(1,id) - e1:SetCost(s.accost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.acop) c:RegisterEffect(e1) - -- Add to hand or Special Summon + --Add to hand or Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) @@ -30,11 +30,6 @@ function s.initial_effect(c) end s.listed_names={id} s.listed_series={SET_LABRYNTH} -function s.accost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.acop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) diff --git a/official/c2511717.lua b/official/c2511717.lua index 44ab04c1bf..fa6e209f1f 100644 --- a/official/c2511717.lua +++ b/official/c2511717.lua @@ -21,9 +21,9 @@ function s.initial_effect(c) e2:SetValue(1500) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -39,9 +39,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id end function s.atkcon(e) local c=e:GetHandler() return Duel.IsExistingMatchingCard(s.atkfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c25119460.lua b/official/c25119460.lua index d4aebed3bb..d6f78c25f3 100644 --- a/official/c25119460.lua +++ b/official/c25119460.lua @@ -1,4 +1,5 @@ --YZ-キャタピラー・ドラゴン +--YZ-Tank Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,14 +22,14 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) + return not e:GetHandler():IsLocation(LOCATION_EXTRA|LOCATION_GRAVE) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFacedown() @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25123082.lua b/official/c25123082.lua index 69e90985f5..4c67c16ad4 100644 --- a/official/c25123082.lua +++ b/official/c25123082.lua @@ -1,4 +1,5 @@ --ヒュグロの魔導書 +--Spellbook of Power local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) end @@ -28,10 +29,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TODECK|RESET_TEMP_REMOVE|RESET_REMOVE|RESET_TOGRAVE)+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TODECK|RESET_TEMP_REMOVE|RESET_REMOVE|RESET_TOGRAVE)|RESET_PHASE|PHASE_END,0,1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -42,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.shcon) e2:SetTarget(s.shtg) e2:SetOperation(s.shop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end @@ -51,7 +52,7 @@ function s.shcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsContains(tc) and tc:GetFlagEffect(id)~=0 end function s.shfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.shfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,4 +65,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c25123713.lua b/official/c25123713.lua index 0514a76890..2ef8446d62 100644 --- a/official/c25123713.lua +++ b/official/c25123713.lua @@ -1,5 +1,5 @@ --空牙団の豪傑 ダイナ --- +--Dyna, Hero Fur Hire --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -22,15 +22,15 @@ function s.initial_effect(c) e2:SetValue(s.atlimit) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x114),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_FUR_HIRE),tp,LOCATION_MZONE,0,nil) if chk==0 then return #g~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local cg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x114),tp,LOCATION_MZONE,0,nil) + local cg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_FUR_HIRE),tp,LOCATION_MZONE,0,nil) local ct=cg:GetClassCount(Card.GetCode) if ct==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -40,6 +40,5 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x114) and c~=e:GetHandler() -end - + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c25131968.lua b/official/c25131968.lua index 3cda766f1c..0b319ed9a5 100644 --- a/official/c25131968.lua +++ b/official/c25131968.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(s.thtg) diff --git a/official/c25132288.lua b/official/c25132288.lua index 4a454d1589..fe3556970b 100644 --- a/official/c25132288.lua +++ b/official/c25132288.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) c:RegisterEffect(e1) @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(-1500) tc:RegisterEffect(e3) @@ -54,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e4) end end -end +end \ No newline at end of file diff --git a/official/c25137581.lua b/official/c25137581.lua index 61ced7ab1b..d26cde9c9f 100644 --- a/official/c25137581.lua +++ b/official/c25137581.lua @@ -51,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25140659.lua b/official/c25140659.lua index 0053333ddc..88a92aee9c 100644 --- a/official/c25140659.lua +++ b/official/c25140659.lua @@ -1,5 +1,5 @@ --Danger! Response Team ---scripted by Naim +--Danger! Response Team local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} function s.filter1(c,tp) - return c:IsFaceup() and c:IsSetCard(0x11e) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DANGER) and c:IsAbleToHand() and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.filter2(c) @@ -49,11 +49,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c) - return c:IsSetCard(0x11e) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_DANGER) and c:IsMonster() and c:IsDiscardable() end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end @@ -62,9 +62,8 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c25148255.lua b/official/c25148255.lua index 4ae767732c..25a01b5c95 100644 --- a/official/c25148255.lua +++ b/official/c25148255.lua @@ -1,4 +1,5 @@ --ジャンク・アンカー +--Junk Anchor local s,id=GetID() function s.initial_effect(c) --synchro @@ -20,18 +21,18 @@ function s.initial_effect(c) e2:SetCode(20932152) c:RegisterEffect(e2) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST) end function s.mfilter(c,e,tp,mc) local mg=Group.FromCards(c,mc) - return c:IsSetCard(0x43) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_JUNK) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg,tp) end function s.scfilter(c,mg,tp) - return c:ListsArchetypeAsMaterial(0x1017) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 and c:IsSynchroSummonable(nil,mg) + return c:ListsArchetypeAsMaterial(SET_SYNCHRON) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 and c:IsSynchroSummonable(nil,mg) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -59,10 +60,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) local e2=e1:Clone() tc:RegisterEffect(e2,true) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) end -end +end \ No newline at end of file diff --git a/official/c25163248.lua b/official/c25163248.lua index a1b1eda657..d18b1ac809 100644 --- a/official/c25163248.lua +++ b/official/c25163248.lua @@ -1,4 +1,5 @@ --先史遺産マヤン・マシーン +--Chronomaly Mayan Machine local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsRace(RACE_MACHINE) -end +end \ No newline at end of file diff --git a/official/c25163979.lua b/official/c25163979.lua index 1e86a1a920..d96d9ae1a0 100644 --- a/official/c25163979.lua +++ b/official/c25163979.lua @@ -1,5 +1,5 @@ --星遺物へ誘う悪夢 ---World Legacy Nightmare +--World Legacy's Nightmare local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,19 +27,19 @@ function s.initial_effect(c) e3:SetOperation(s.mvop) c:RegisterEffect(e3) end -s.listed_series={0x112} +s.listed_series={SET_KNIGHTMARE} function s.efilter(e,c) return c:GetMutualLinkedGroupCount()>0 end function s.mvfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x112) + return c:IsFaceup() and c:IsSetCard(SET_KNIGHTMARE) end function s.mvfilter2(c,tp) - return c:IsFaceup() and c:IsSetCard(0x112) and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_KNIGHTMARE) and c:GetSequence()<5 and Duel.IsExistingMatchingCard(s.mvfilter3,tp,LOCATION_MZONE,0,1,c) end function s.mvfilter3(c) - return c:IsFaceup() and c:IsSetCard(0x112) and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_KNIGHTMARE) and c:GetSequence()<5 end function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.IsExistingMatchingCard(s.mvfilter1,tp,LOCATION_MZONE,0,1,nil) @@ -76,4 +76,4 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) local tc2=g2:GetFirst() Duel.SwapSequence(tc1,tc2) end -end +end \ No newline at end of file diff --git a/official/c25165047.lua b/official/c25165047.lua index 04b0b797e5..78f75da693 100644 --- a/official/c25165047.lua +++ b/official/c25165047.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function (e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function (e) return e:GetHandler():IsSynchroSummoned() end) e1:SetOperation(s.lpop) c:RegisterEffect(e1) --Take no effect damage diff --git a/official/c25166510.lua b/official/c25166510.lua index a6a4e7bf33..e3a831d31d 100644 --- a/official/c25166510.lua +++ b/official/c25166510.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} --Defining what to check function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x119) + return c:IsMonster() and c:IsSetCard(SET_SALAMANGREAT) end --Check for 3+ "Salamangreat" monsters in your GY function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -79,25 +79,24 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end end end -end - +end \ No newline at end of file diff --git a/official/c25171661.lua b/official/c25171661.lua index cfeedf70f2..6c7e8d18aa 100644 --- a/official/c25171661.lua +++ b/official/c25171661.lua @@ -1,4 +1,5 @@ --インフェルニティ・ドワーフ +--Infernity Dwarf local s,id=GetID() function s.initial_effect(c) --pierce @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.condition(e) return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)==0 -end +end \ No newline at end of file diff --git a/official/c25191307.lua b/official/c25191307.lua index 19e33b59d0..f7ca6e5f46 100644 --- a/official/c25191307.lua +++ b/official/c25191307.lua @@ -91,4 +91,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c2519690.lua b/official/c2519690.lua index 5dfcf8b6ae..ac138a6aff 100644 --- a/official/c2519690.lua +++ b/official/c2519690.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xbd),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GAIA_THE_FIERCE_KNIGHT),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) --change name local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -33,19 +33,19 @@ function s.initial_effect(c) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} s.listed_names={49328340} -s.material_setcode=0xbd +s.material_setcode=SET_GAIA_THE_FIERCE_KNIGHT function s.thfilter(c) return c:IsCode(49328340) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -61,4 +61,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if d and d:IsRelateToBattle() then Duel.ChangePosition(d,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c25200959.lua b/official/c25200959.lua index c34d5eff1d..f983a15273 100644 --- a/official/c25200959.lua +++ b/official/c25200959.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- draw + --draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW) @@ -31,20 +31,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) @@ -63,7 +63,7 @@ function s.splimit(e,c,tp,sumtp,sumpos) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -74,5 +74,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c25206027.lua b/official/c25206027.lua index 228fdacb6b..fdc5f557ea 100644 --- a/official/c25206027.lua +++ b/official/c25206027.lua @@ -1,4 +1,5 @@ --異界の棘紫竜 +--Interplanetarypurplythorny Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -29,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c2521011.lua b/official/c2521011.lua index 16e64a9b69..58c361b0b0 100644 --- a/official/c2521011.lua +++ b/official/c2521011.lua @@ -36,9 +36,9 @@ function s.initial_effect(c) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -63,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c25221249.lua b/official/c25221249.lua index ec77d00af6..ad83b4cf02 100644 --- a/official/c25221249.lua +++ b/official/c25221249.lua @@ -34,27 +34,27 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x12f} +s.listed_series={SET_BATTLEWASP} function s.spfilter(c,e,tp) - return c:IsSetCard(0x12f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BATTLEWASP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x12f) + return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SET_BATTLEWASP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsCanAddCounter(0x14b,1) and c:AddCounter(0x14b,1) then Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end end diff --git a/official/c25231813.lua b/official/c25231813.lua index f9480baa38..3351788d83 100644 --- a/official/c25231813.lua +++ b/official/c25231813.lua @@ -1,4 +1,5 @@ --白銀の翼 +--Silver Wing local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -33,5 +34,5 @@ function s.reptg2(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop2(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c25236056.lua b/official/c25236056.lua index 27d186e94b..bee33d143e 100644 --- a/official/c25236056.lua +++ b/official/c25236056.lua @@ -1,5 +1,6 @@ --レアメタル・ドラゴン +--Rare Metal Dragon local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() -end +end \ No newline at end of file diff --git a/official/c25244515.lua b/official/c25244515.lua index 836d184749..a5252431a6 100644 --- a/official/c25244515.lua +++ b/official/c25244515.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) --atk up @@ -31,18 +31,14 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.condition(e,tp,eg,ep,ev,re,r,rp) local phase=Duel.GetCurrentPhase() if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsSetCard(0xb3) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return tc and tc:IsSetCard(SET_YOSENJU) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetLabelObject() @@ -51,12 +47,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb3) + return c:IsFaceup() and c:IsSetCard(SET_YOSENJU) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -72,7 +68,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -98,4 +94,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25247218.lua b/official/c25247218.lua index 0ba34c9f0c..9277a5ace2 100644 --- a/official/c25247218.lua +++ b/official/c25247218.lua @@ -1,4 +1,5 @@ --ビッグ・ピース・ゴーレム +--Big Piece Golem local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -15,4 +16,4 @@ function s.ntcon(e,c,minc) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c2525268.lua b/official/c2525268.lua index 76500ed1df..f1ad318d91 100644 --- a/official/c2525268.lua +++ b/official/c2525268.lua @@ -46,9 +46,9 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function s.value(e,c) - return c:IsFaceup() and c:GetLocation()==LOCATION_MZONE and c:IsRace(RACE_SPELLCASTER) + return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_SPELLCASTER) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local count=e:GetLabel() Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,count,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c25259669.lua b/official/c25259669.lua index f1bea3abae..3f65368082 100644 --- a/official/c25259669.lua +++ b/official/c25259669.lua @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c2526224.lua b/official/c2526224.lua index fdaf824de3..3948cbf764 100644 --- a/official/c2526224.lua +++ b/official/c2526224.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1,id) e1:SetCondition(function() return Duel.IsMainPhase() end) e1:SetTarget(s.selfsptg) @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c25262697.lua b/official/c25262697.lua index 52dbf837d1..8f9ab18a28 100644 --- a/official/c25262697.lua +++ b/official/c25262697.lua @@ -1,4 +1,5 @@ --墓守の暗殺者 +--Gravekeeper's Assailant local s,id=GetID() function s.initial_effect(c) --pos @@ -32,4 +33,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c25273572.lua b/official/c25273572.lua index 6206c41afe..20c98d9c00 100644 --- a/official/c25273572.lua +++ b/official/c25273572.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x187} +s.listed_series={SET_G_GOLEM} function s.thfilter(c,e,tp,ft) return c:IsCode(id) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end @@ -59,8 +59,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) return not c:IsRace(RACE_CYBERSE) @@ -69,7 +69,7 @@ function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.thfilter2(c) - return c:IsSetCard(0x187) and c:IsAbleToHand() + return c:IsSetCard(SET_G_GOLEM) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c25274141.lua b/official/c25274141.lua index fee292c20d..9a52cb6bbd 100644 --- a/official/c25274141.lua +++ b/official/c25274141.lua @@ -1,4 +1,4 @@ ---緊急ダイヤ +--緊急ダイヤ --Urgent Schedule --Scripted by AlphaKretin local s,id=GetID() @@ -44,7 +44,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -76,12 +76,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -105,5 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c25280974.lua b/official/c25280974.lua index 4b733ca52e..1e63a0fee7 100644 --- a/official/c25280974.lua +++ b/official/c25280974.lua @@ -32,14 +32,14 @@ function s.filter(c) return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c25290459.lua b/official/c25290459.lua index 2c4243aed6..9bb26defbb 100644 --- a/official/c25290459.lua +++ b/official/c25290459.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x41} +s.listed_series={SET_LV} function s.costfilter(c,e,tp) - if not c:IsSetCard(0x41) or not c:IsAbleToGraveAsCost() or not c:IsFaceup() then return false end - return c.listed_names and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c,e,tp) + if not c:IsSetCard(SET_LV) or not c:IsAbleToGraveAsCost() or not c:IsFaceup() then return false end + return c.listed_names and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,c,e,tp) end function s.spfilter(c,class,e,tp) return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,true) @@ -36,7 +36,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) local code=g:GetFirst():GetOriginalCode() Duel.SetTargetParam(code) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -44,10 +44,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local class=Duel.GetMetatable(code) if class==nil or class.listed_names==nil then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,class,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,class,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) if tc:GetPreviousLocation()==LOCATION_DECK then Duel.ShuffleDeck(tp) end end -end +end \ No newline at end of file diff --git a/official/c2530830.lua b/official/c2530830.lua index 6c7fa89992..3ca6362e04 100644 --- a/official/c2530830.lua +++ b/official/c2530830.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -36,14 +36,10 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x107b} +s.listed_series={SET_GALAXY_EYES} s.listed_names={18963306} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0x107b,lc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==8 -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,lc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==8 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -62,7 +58,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsSummonType(SUMMON_TYPE_XYZ) + and c:IsXyzSummoned() end function s.filter(c,e,tp) return c:IsCode(18963306) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -80,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c25311006.lua b/official/c25311006.lua index 8068bb38c7..8d7e87addb 100644 --- a/official/c25311006.lua +++ b/official/c25311006.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end function s.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_MONSTER) and Duel.IsMainPhase()) + return not (re:IsMonsterEffect() and Duel.IsMainPhase()) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0 @@ -79,7 +79,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(p,g) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c25334372.lua b/official/c25334372.lua index 8f2d9c5d38..8fb9e69ace 100644 --- a/official/c25334372.lua +++ b/official/c25334372.lua @@ -1,4 +1,5 @@ --九十九スラッシュ +--Tsukumo Slash local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,8 +25,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(atk) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25339070.lua b/official/c25339070.lua index fcc18d2454..a81a12d341 100644 --- a/official/c25339070.lua +++ b/official/c25339070.lua @@ -22,18 +22,18 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(s.cpcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.cptg) e2:SetOperation(s.cpop) c:RegisterEffect(e2) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.cfilter(c) - return c:IsSetCard(0xef) and c:IsDiscardable() + return c:IsSetCard(SET_DARKLORD) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,2,2,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,2,2,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,12 +45,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.cpfilter(c) - return c:IsSetCard(0xef) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil + return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil end function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.cpfilter(chkc) end @@ -80,5 +76,5 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) etc:ReleaseEffectRelation(te) end Duel.BreakEffect() - Duel.SendtoDeck(te:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c25341652.lua b/official/c25341652.lua index d035cc2f2a..ab3ab2b1a8 100644 --- a/official/c25341652.lua +++ b/official/c25341652.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c25342956.lua b/official/c25342956.lua index 60b45e0780..e5f61870b5 100644 --- a/official/c25342956.lua +++ b/official/c25342956.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -35,11 +35,6 @@ function s.initial_effect(c) end s.listed_series={SET_GEM,SET_GEM_KNIGHT} s.material_setcode={SET_GEM} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,e,tp,hc) if not (c:IsSetCard(SET_GEM) and not c:IsRace(RACE_ROCK) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end if c:IsLocation(LOCATION_EXTRA) then diff --git a/official/c25343017.lua b/official/c25343017.lua index 199a64bcc9..5f8c8a473e 100644 --- a/official/c25343017.lua +++ b/official/c25343017.lua @@ -1,4 +1,5 @@ --寡黙なるサイコプリースト +--Hushed Psychic Cleric local s,id=GetID() function s.initial_effect(c) --to defense @@ -59,17 +60,17 @@ function s.filter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) e:GetLabelObject():SetLabel(1) if c:GetFlagEffect(id)==0 then c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE|RESET_TOGRAVE|RESET_TURN_SET),0,0) @@ -107,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c25343280.lua b/official/c25343280.lua index f59c480745..61f48016c3 100644 --- a/official/c25343280.lua +++ b/official/c25343280.lua @@ -1,4 +1,5 @@ --スピリッツ・オブ・ファラオ +--Spirit of the Pharaoh local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<#g then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and #g>1 then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c25345186.lua b/official/c25345186.lua index d55ddcb4db..70bb2d108a 100644 --- a/official/c25345186.lua +++ b/official/c25345186.lua @@ -1,4 +1,5 @@ --ジェノサイド・ウォー +--After the Struggle local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) --destroy @@ -18,22 +19,22 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLED) e1:SetOperation(s.regop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) tc=Duel.GetAttackTarget() if tc then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.filter(c) @@ -42,4 +43,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c25366484.lua b/official/c25366484.lua index 0109321b2a..474f0b2a32 100644 --- a/official/c25366484.lua +++ b/official/c25366484.lua @@ -1,4 +1,5 @@ --E・HERO シャイニング・フレア・ウィングマン +--Elemental HERO Shining Flare Wingman local s,id=GetID() function s.initial_effect(c) --fusion material @@ -31,8 +32,8 @@ function s.initial_effect(c) e3:SetValue(s.atkup) c:RegisterEffect(e3) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local bc=e:GetHandler():GetBattleTarget() @@ -53,5 +54,5 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3008)*300 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_ELEMENTAL_HERO)*300 +end \ No newline at end of file diff --git a/official/c25373678.lua b/official/c25373678.lua index 1fee74e9b2..0f204541f3 100644 --- a/official/c25373678.lua +++ b/official/c25373678.lua @@ -1,4 +1,5 @@ --旋風のボルテクス +--Vortex the Whirlwind local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c25377819.lua b/official/c25377819.lua index e60e3ab49a..f7a1397d84 100644 --- a/official/c25377819.lua +++ b/official/c25377819.lua @@ -1,4 +1,5 @@ --召集の聖刻印 +--Hieratic Seal of Convocation local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.filter(c) - return c:IsSetCard(0x69) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_HIERATIC) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c25388971.lua b/official/c25388971.lua index d96e255046..b7f2681c47 100644 --- a/official/c25388971.lua +++ b/official/c25388971.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) e2:SetCondition(function() return Duel.GetFlagEffect(0,id)+Duel.GetFlagEffect(1,id)>=3 end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) diff --git a/official/c25396150.lua b/official/c25396150.lua index 3ac15a3542..68d76efd2c 100644 --- a/official/c25396150.lua +++ b/official/c25396150.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -26,20 +26,20 @@ function s.initial_effect(c) e2:SetOperation(s.lpop) c:RegisterEffect(e2) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) end function s.pendfilter(c,tp) return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and Duel.CheckPendulumZones(tp) end function s.cfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0x4) and c:IsFaceup() and (c:IsAbleToHand() or s.pendfilter(c,tp)) + return c:IsMonster() and c:IsSetCard(SET_AMAZONESS) and c:IsFaceup() and (c:IsAbleToHand() or s.pendfilter(c,tp)) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.cfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.cfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,0,nil,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local tc=g:Select(tp,1,1,nil) @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.amzfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4) and c:IsOriginalType(TYPE_MONSTER) + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and c:IsOriginalType(TYPE_MONSTER) end function s.lpcond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.amzfilter,tp,LOCATION_ONFIELD,0,1,nil) diff --git a/official/c25397880.lua b/official/c25397880.lua index ae98e1cb14..3c098e37fe 100644 --- a/official/c25397880.lua +++ b/official/c25397880.lua @@ -1,5 +1,5 @@ --ネフティスの語り手 ---Speaker of Nephthys +--Chronicler of Nephthys local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,17 +26,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.thcon2) e3:SetTarget(s.thtg2) e3:SetOperation(s.thop2) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} s.listed_names={} function s.filter(c) - return c:IsSetCard(0x11f) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_NEPHTHYS) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -58,13 +58,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) then return end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) @@ -84,5 +84,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c25401880.lua b/official/c25401880.lua index a997d2f48e..38ccf1b9fe 100644 --- a/official/c25401880.lua +++ b/official/c25401880.lua @@ -1,4 +1,5 @@ --サイコパス +--Psychic Path local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_PSYCHIC) and c:IsAbleToHand() end @@ -33,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c25407406.lua b/official/c25407406.lua index 90ff097f73..d3a4b12828 100644 --- a/official/c25407406.lua +++ b/official/c25407406.lua @@ -2,7 +2,7 @@ --Gladiator Beast's Battle Gladius local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x19)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_GLADIATOR)) --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() diff --git a/official/c25407643.lua b/official/c25407643.lua index 24f248f1a9..9a8a67b721 100644 --- a/official/c25407643.lua +++ b/official/c25407643.lua @@ -1,6 +1,5 @@ --魔法族の聖域 --Secret Sanctuary of the Spellcasters - local s,id=GetID() function s.initial_effect(c) --Activate @@ -63,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot activate its effects local e2=Effect.CreateEffect(c) @@ -71,7 +70,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c25415052.lua b/official/c25415052.lua index a2decdece7..97162c748f 100644 --- a/official/c25415052.lua +++ b/official/c25415052.lua @@ -34,7 +34,7 @@ end s.listed_names={73055622,TOKEN_SHINOBIRD} s.listed_card_types={TYPE_SPIRIT} function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.tdfilter(c) return c:IsSpellTrap() and c:IsAbleToDeck() diff --git a/official/c25419323.lua b/official/c25419323.lua index d60471d38f..5c737abe32 100644 --- a/official/c25419323.lua +++ b/official/c25419323.lua @@ -1,5 +1,5 @@ --ダイノルフィア・シェル ---Dinoruffia Shell +--Dinomorphia Shell --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -23,13 +23,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end s.listed_names={25419324} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE_START and Duel.IsTurnPlayer(1-tp) + return Duel.IsPhase(PHASE_BATTLE_START) and Duel.IsTurnPlayer(1-tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.tgtg) token:RegisterEffect(e1) end @@ -73,6 +73,6 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c2542230.lua b/official/c2542230.lua index 87def3d052..f831ad0590 100644 --- a/official/c2542230.lua +++ b/official/c2542230.lua @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) diff --git a/official/c25435080.lua b/official/c25435080.lua index 86d0a0bbae..4ffe36ec8b 100644 --- a/official/c25435080.lua +++ b/official/c25435080.lua @@ -1,4 +1,5 @@ --BF-アンカー +--Blackwing - Bombardment local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,19 +9,16 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) e1:SetLabel(0) c:RegisterEffect(e1) end -s.listed_series={0x33} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_BLACKWING} function s.cfilter(c,tp) - return c:IsSetCard(0x33) and Duel.IsExistingTarget(s.tfilter,tp,LOCATION_MZONE,0,1,c) + return c:IsSetCard(SET_BLACKWING) and Duel.IsExistingTarget(s.tfilter,tp,LOCATION_MZONE,0,1,c) end function s.tfilter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) @@ -49,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25449584.lua b/official/c25449584.lua index d4bcb5fdb6..05a41ff340 100644 --- a/official/c25449584.lua +++ b/official/c25449584.lua @@ -1,9 +1,9 @@ --- 地葬星カイザ --- Kaiza the Funeral Star --- Scripted by Hatter +--地葬星カイザ +--Kaiza the Hidden Star +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Send to GY + --Send to GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOGRAVE) @@ -48,12 +48,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local atk=g:GetFirst():GetBaseAttack() if atk>0 then local c=e:GetHandler() - -- Gain ATK + --Gain ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) end g:DeleteGroup() @@ -62,9 +62,9 @@ function s.tgcostfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgcostfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local sg=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + local sg=Duel.SelectMatchingCard(tp,s.tgcostfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) Duel.Remove(sg,POS_FACEUP,REASON_COST) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,4 +77,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25451383.lua b/official/c25451383.lua index 9b175987cb..cb9816ed2d 100644 --- a/official/c25451383.lua +++ b/official/c25451383.lua @@ -8,14 +8,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_ALBAZ) c:RegisterEffect(e1) --Apply the appropriate effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(s.spcost) e2:SetTarget(s.sptg) @@ -23,9 +23,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_ALBAZ} -s.listed_series={0x160} +s.listed_series={SET_BRANDED} function s.cfilter(c,e,tp) - if not ((c:IsCode(CARD_ALBAZ) or (c:IsSetCard(0x160) and c:IsSpellTrap())) and c:IsAbleToGraveAsCost()) then return false end + if not ((c:IsCode(CARD_ALBAZ) or (c:IsSetCard(SET_BRANDED) and c:IsSpellTrap())) and c:IsAbleToGraveAsCost()) then return false end local hc=e:GetHandler() if c:IsLocation(LOCATION_HAND) then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 and hc:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,9 +34,9 @@ function s.cfilter(c,e,tp) end end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() local label=tc:IsLocation(LOCATION_DECK) and 1 or 0 e:SetLabel(label) Duel.SendtoGrave(tc,REASON_COST) diff --git a/official/c25451652.lua b/official/c25451652.lua index 88d9115be9..ed18588379 100644 --- a/official/c25451652.lua +++ b/official/c25451652.lua @@ -1,4 +1,5 @@ --堕天使ルシフェル +--Darklord Morningstar local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -38,25 +39,25 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.ctfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xef) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DARKLORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetMatchingGroup(s.ctfilter,tp,0,LOCATION_MZONE,nil) - local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) local ct=5 if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end ct=math.min(ct,#g1,Duel.GetLocationCount(tp,LOCATION_MZONE)) @@ -67,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xef) + return c:IsFaceup() and c:IsSetCard(SET_DARKLORD) end function s.tgcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) @@ -79,7 +80,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*1000) end function s.ctfilter2(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0xef) + return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(SET_DARKLORD) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local ct1=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -92,4 +93,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c25460258.lua b/official/c25460258.lua index 255e44544e..1750bf6bbb 100644 --- a/official/c25460258.lua +++ b/official/c25460258.lua @@ -37,15 +37,15 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg1>0 and #rg2>0 and aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -77,10 +77,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -88,4 +88,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25472513.lua b/official/c25472513.lua index daeda192ea..c69d0d22da 100644 --- a/official/c25472513.lua +++ b/official/c25472513.lua @@ -18,15 +18,15 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:GetLevel()==2 and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),4) @@ -34,7 +34,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if ft<=0 then return end local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,ft,nil,e,tp) if #g>0 then local tc=g:GetFirst() for tc in aux.Next(g) do @@ -42,12 +42,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c25484449.lua b/official/c25484449.lua index c8006e8496..e8258276a2 100644 --- a/official/c25484449.lua +++ b/official/c25484449.lua @@ -1,4 +1,5 @@ --ゼンマイシャーク +--Wind-Up Shark local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,9 +26,9 @@ function s.initial_effect(c) e3:SetOperation(s.lvop) c:RegisterEffect(e3) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x58) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_WIND_UP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -59,7 +60,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) else e1:SetValue(-1) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25494711.lua b/official/c25494711.lua index fde12e0723..56ce4f474a 100644 --- a/official/c25494711.lua +++ b/official/c25494711.lua @@ -30,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} s.listed_names={} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xab) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) and not c:IsCode(id) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -47,7 +47,7 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -58,7 +58,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(atk) tc:RegisterEffect(e1) end @@ -70,7 +70,7 @@ function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0xab) + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -88,5 +88,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(g,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c25518020.lua b/official/c25518020.lua index 8c5ff6856b..d9d4f8b7a2 100644 --- a/official/c25518020.lua +++ b/official/c25518020.lua @@ -69,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c25524823.lua b/official/c25524823.lua index 6ee8cf49b8..8834fb1339 100644 --- a/official/c25524823.lua +++ b/official/c25524823.lua @@ -33,9 +33,9 @@ function s.initial_effect(c) e3:SetLabelObject(e4) e4:SetLabelObject(e3) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.otfilter(c,tp,relzone) - return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(0x2e) and aux.IsZone(c,relzone,tp) + return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(SET_GRAVEKEEPERS) and aux.IsZone(c,relzone,tp) end function s.otcon(e,c,minc,zone,relzone,exeff) if c==nil then return true end @@ -57,18 +57,18 @@ end function s.otop(e,tp,eg,ep,ev,re,r,rp,c) local sg=e:GetLabelObject() c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) + Duel.Release(sg,REASON_SUMMON|REASON_MATERIAL) sg:DeleteGroup() end function s.valcheck(e,c) local g=c:GetMaterial() - local ct=g:FilterCount(Card.IsSetCard,nil,0x2e) + local ct=g:FilterCount(Card.IsSetCard,nil,SET_GRAVEKEEPERS) local lv=g:GetSum(Card.GetLevel) e:SetLabel(lv) e:GetLabelObject():SetLabel(ct) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c) return c:IsFacedown() @@ -128,7 +128,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end if (sel&2)~=0 then @@ -142,7 +142,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-2000) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -150,4 +150,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c25531465.lua b/official/c25531465.lua index 35370dd2aa..4a9ed76aba 100644 --- a/official/c25531465.lua +++ b/official/c25531465.lua @@ -1,4 +1,5 @@ --マジキャット +--Magicat local s,id=GetID() function s.initial_effect(c) --todeck @@ -30,6 +31,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25533642.lua b/official/c25533642.lua index d2366101ba..57141114ed 100644 --- a/official/c25533642.lua +++ b/official/c25533642.lua @@ -1,4 +1,5 @@ --オルターガイスト・メリュシーク +--Altergeist Meluseek local s,id=GetID() function s.initial_effect(c) --direct attack @@ -30,7 +31,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} s.listed_names={id} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp @@ -52,7 +53,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x103) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_ALTERGEIST) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c25538345.lua b/official/c25538345.lua index f5dfa87efc..aa2456c671 100644 --- a/official/c25538345.lua +++ b/official/c25538345.lua @@ -1,7 +1,6 @@ --幻影騎士団ティアースケイル ---The Phantom Knights of Tear Scale +--The Phantom Knights of Torn Scales --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Send 1 "Phantom Knights" card from deck to GY @@ -30,14 +29,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xdb} - +s.listed_series={SET_PHANTOM_KNIGHTS} function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.tgfilter(c) - return ((c:IsSetCard(0x10db) and c:IsMonster()) or (c:IsSetCard(0xdb) and c:IsSpellTrap())) + return ((c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster()) or (c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap())) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,7 +50,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return ((c:IsSetCard(0x10db) and c:IsMonster()) or (c:IsSetCard(0xdb) and c:IsSpellTrap())) + return ((c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster()) or (c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap())) and c:IsPreviousLocation(LOCATION_GRAVE) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -72,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c25542642.lua b/official/c25542642.lua index 7b93d87578..7fa96d23dc 100644 --- a/official/c25542642.lua +++ b/official/c25542642.lua @@ -1,9 +1,8 @@ --幻影霧剣 --Phantom Knights' Fog Blade - local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,nil,aux.FaceupFilter(Card.IsType,TYPE_EFFECT),CATEGORY_DISABLE,nil,nil,0x1c0,nil,nil,s.target) + aux.AddPersistentProcedure(c,nil,aux.FaceupFilter(Card.IsType,TYPE_EFFECT),CATEGORY_DISABLE,nil,nil,TIMINGS_CHECK_MONSTER,nil,nil,s.target) --Targeted monster has its effects negated, also cannot attack local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -40,13 +39,13 @@ function s.initial_effect(c) e7:SetCode(EVENT_FREE_CHAIN) e7:SetRange(LOCATION_GRAVE) e7:SetCountLimit(1,id) - e7:SetCost(aux.bfgcost) + e7:SetCost(Cost.SelfBanish) e7:SetTarget(s.sptg) e7:SetOperation(s.spop) e7:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e7) end -s.listed_series={0x10db} +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.target(e,tp,eg,ep,ev,re,r,rp,tc,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) @@ -61,7 +60,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -80,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c25573054.lua b/official/c25573054.lua index 5ad41758a8..f9ca3c0808 100644 --- a/official/c25573054.lua +++ b/official/c25573054.lua @@ -1,4 +1,5 @@ --進化する翼 +--Transcendent Wings local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ function s.rescon(sg,e,tp,mg) end function s.chk(c,sg,e,tp) return c:IsCode(57116033) and c:IsLocation(LOCATION_ONFIELD) and sg:IsExists(Card.IsLocation,2,c,LOCATION_HAND) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,sg,e,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,sg,e,tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -43,16 +44,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(0) return true else - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c25573115.lua b/official/c25573115.lua index 9867686a84..d83971f8a4 100644 --- a/official/c25573115.lua +++ b/official/c25573115.lua @@ -1,9 +1,9 @@ --- --- Apex Predation --- Scripted by Hatter +--絶対なる捕食 +--Apex Predation +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy + --Destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) @@ -30,17 +30,17 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - -- Cannot Normal Summon/Set monsters + --Cannot Normal Summon/Set monsters local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_MSET) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c25577965.lua b/official/c25577965.lua index 934b849c03..1a8255e056 100644 --- a/official/c25577965.lua +++ b/official/c25577965.lua @@ -52,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/official/c25578802.lua b/official/c25578802.lua index d237351878..3a260aa873 100644 --- a/official/c25578802.lua +++ b/official/c25578802.lua @@ -1,4 +1,5 @@ --ツーマンセルバトル +--Two-Man Cell Battle local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c25586143.lua b/official/c25586143.lua index 54fe819b69..7905765ebe 100644 --- a/official/c25586143.lua +++ b/official/c25586143.lua @@ -1,9 +1,10 @@ --捕食植物キメラフレシア +--Predaplant Chimerafflesia local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10f3),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PREDAPLANT),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) --remove local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -37,7 +38,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1) e4:SetCondition(s.thcon) @@ -45,8 +46,8 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x46,0x10f3} -s.material_setcode={0xf3,0x10f3} +s.listed_series={SET_FUSION,SET_PREDAPLANT} +s.material_setcode={SET_PREDAP,SET_PREDAPLANT} function s.rmfilter(c,lv) return c:IsFaceup() and c:IsLevelBelow(lv) and c:IsAbleToRemove() end @@ -82,23 +83,23 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() and not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_STANDBY then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount()) + if Duel.IsPhase(PHASE_STANDBY) then + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2,Duel.GetTurnCount()) else - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1,0) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -106,7 +107,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return tid and tid~=Duel.GetTurnCount() end function s.thfilter(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -119,4 +120,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c255998.lua b/official/c255998.lua index e0b9c10dc5..0b06e5fc17 100644 --- a/official/c255998.lua +++ b/official/c255998.lua @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25607552.lua b/official/c25607552.lua index ce6dbf3de5..cf0bea28de 100644 --- a/official/c25607552.lua +++ b/official/c25607552.lua @@ -1,5 +1,5 @@ --華信龍-ノウルーズ・エリーズ ---Nowruz Elise the Dragon of Beauty and Faith +--Nowru Aries the Vernal Dragon --Scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) @@ -50,14 +50,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) + return rp==1-tp and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end @@ -71,4 +71,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25614410.lua b/official/c25614410.lua index b8b50b3a3e..75770f72a2 100644 --- a/official/c25614410.lua +++ b/official/c25614410.lua @@ -1,4 +1,5 @@ --HEROの遺産 +--Legacy of a HERO local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,8 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end +s.listed_series={SET_HERO} function s.cfilter(c) - return c:ListsArchetypeAsMaterial(0x8) and c:IsType(TYPE_FUSION) and c:IsAbleToExtraAsCost() + return c:ListsArchetypeAsMaterial(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsAbleToExtraAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,2,nil) end @@ -31,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2561846.lua b/official/c2561846.lua index db7b2248ad..a05ac663fa 100644 --- a/official/c2561846.lua +++ b/official/c2561846.lua @@ -25,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then tc:AddCounter(COUNTER_A,1) end -end +end \ No newline at end of file diff --git a/official/c25629622.lua b/official/c25629622.lua index e37c3a93b6..a56c24a330 100644 --- a/official/c25629622.lua +++ b/official/c25629622.lua @@ -1,4 +1,5 @@ --魔界劇団-ビッグ・スター +--Abyss Actor - Superstar local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -38,14 +39,14 @@ function s.initial_effect(c) e4:SetOperation(s.setop) c:RegisterEffect(e4) end -s.listed_series={0x20ec} +s.listed_series={SET_ABYSS_SCRIPT} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x10ec) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x10ec) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_ABYSS_ACTOR) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_ABYSS_ACTOR) Duel.Release(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -64,11 +65,11 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentChain()==0 then Duel.SetChainLimitTillChainEnd(s.chlimit) elseif Duel.GetCurrentChain()==1 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.chlimit(e,rp,tp) - return tp==rp or e:IsActiveType(TYPE_MONSTER) + return tp==rp or e:IsMonsterEffect() end function s.limop2(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id)~=0 then @@ -77,7 +78,7 @@ function s.limop2(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():ResetFlagEffect(id) end function s.setfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -90,7 +91,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() local fid=c:GetFieldID() Duel.SSet(tp,tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -100,7 +101,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -111,4 +112,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoGrave(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2563463.lua b/official/c2563463.lua index 12ff2a17db..d981e7801a 100644 --- a/official/c2563463.lua +++ b/official/c2563463.lua @@ -1,9 +1,9 @@ --- 流離のグリフォンライダー --- Wandering Gryphon Rider --- Scripted by Hatter +--流離のグリフォンライダー +--Wandering Gryphon Rider +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon itself from the hand + --Special Summon itself from the hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Negate the activation of a card or effect + --Negate the activation of a card or effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_NEGATE+CATEGORY_DESTROY) diff --git a/official/c25642998.lua b/official/c25642998.lua index 5ce2d57a3d..a2788f948f 100644 --- a/official/c25642998.lua +++ b/official/c25642998.lua @@ -14,10 +14,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.dfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c25643346.lua b/official/c25643346.lua index 85d0989608..810ee7d691 100644 --- a/official/c25643346.lua +++ b/official/c25643346.lua @@ -1,7 +1,6 @@ --悪魔嬢マリス --Malice, Lady of Lament --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Set 1 of your traps, that is banished or in GY @@ -25,13 +24,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(sg,REASON_COST) end function s.filter(c) - return c:GetType()==TYPE_TRAP and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsSSetable() + return c:IsNormalTrap() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsSSetable() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -43,8 +42,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) tc:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c25652655.lua b/official/c25652655.lua index 4f8becb40e..6fa65b808a 100644 --- a/official/c25652655.lua +++ b/official/c25652655.lua @@ -1,4 +1,5 @@ --チェンジ・シンクロン +--Changer Synchron local s,id=GetID() function s.initial_effect(c) --position @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c25654671.lua b/official/c25654671.lua index d4fc501e90..aadc963866 100644 --- a/official/c25654671.lua +++ b/official/c25654671.lua @@ -1,4 +1,5 @@ --ナチュル・スパイダーファング +--Naturia Spiderfang local s,id=GetID() function s.initial_effect(c) --atk limit @@ -11,4 +12,4 @@ function s.initial_effect(c) end function s.atkcon(e) return Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 -end +end \ No newline at end of file diff --git a/official/c25655502.lua b/official/c25655502.lua index 7395c31dbb..2f40d2fca0 100644 --- a/official/c25655502.lua +++ b/official/c25655502.lua @@ -1,7 +1,8 @@ --デビル・ボックス +--Bickuribox local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,93889755,13215230) -end +end \ No newline at end of file diff --git a/official/c25669282.lua b/official/c25669282.lua index 78a6e70f73..f6ef744644 100644 --- a/official/c25669282.lua +++ b/official/c25669282.lua @@ -20,15 +20,15 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xeb} +s.listed_series={SET_CHEMICRITTER} s.listed_card_types={TYPE_GEMINI} function s.cfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xeb) and c:IsAbleToRemoveAsCost() and (ft>1 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_CHEMICRITTER) and c:IsAbleToRemoveAsCost() and (ft>1 or c:GetSequence()<5) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -39,11 +39,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xeb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CHEMICRITTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter2(c,e,tp,code) - return c:IsSetCard(0xeb) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CHEMICRITTER) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then tc:EnableGeminiStatus() end -end +end \ No newline at end of file diff --git a/official/c25682811.lua b/official/c25682811.lua index c1a0075738..a7182536dd 100644 --- a/official/c25682811.lua +++ b/official/c25682811.lua @@ -26,15 +26,15 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x29) and ec:IsRace(RACE_DRAGON) + return ec:IsControler(tp) and ec:IsSetCard(SET_DRAGUNITY) and ec:IsRace(RACE_DRAGON) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -53,7 +53,7 @@ function s.equipop(c,e,tp,tc,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(Card.EquipByEffectLimit) e1:SetLabelObject(e:GetLabelObject()) tc:RegisterEffect(e1) @@ -68,5 +68,5 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkval(e,c) - return c:GetEquipGroup():FilterCount(Card.IsSetCard,nil,0x29)*300 -end + return c:GetEquipGroup():FilterCount(Card.IsSetCard,nil,SET_DRAGUNITY)*300 +end \ No newline at end of file diff --git a/official/c25700114.lua b/official/c25700114.lua index 66f3c13723..9998b0fe31 100644 --- a/official/c25700114.lua +++ b/official/c25700114.lua @@ -1,6 +1,5 @@ --ダストンローラー --Duston Roller - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot be tributed, or be used as fusion/synchro/Xyz material @@ -24,8 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x80} - +s.listed_series={SET_DUSTON} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -43,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -55,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) --Cannot be used as synchro material local e4=e3:Clone() @@ -71,11 +69,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp~=tp and (r&0x41)==0x41 and c:IsPreviousControler(tp) + return rp~=tp and (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.filter(c) - return c:IsSetCard(0x80) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DUSTON) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c25704359.lua b/official/c25704359.lua index 90fcca6f9c..112d4b94f3 100644 --- a/official/c25704359.lua +++ b/official/c25704359.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --Prevent destruction local e2=Effect.CreateEffect(c) @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xbf)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_CHARMER)) e2:SetValue(1) c:RegisterEffect(e2) --Increase ATK @@ -42,18 +42,15 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10c0,0xbf} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_FAMILIAR_POSSESSED,SET_CHARMER} function s.atktg(e,c) - return c:IsSetCard(0x10c0) and Duel.GetAttacker()==c + return c:IsSetCard(SET_FAMILIAR_POSSESSED) and Duel.GetAttacker()==c end function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget()~=nil end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetOriginalAttribute()~=0 + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetOriginalAttribute()~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -85,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c25716180.lua b/official/c25716180.lua index 3c4c619667..bae749ccc9 100644 --- a/official/c25716180.lua +++ b/official/c25716180.lua @@ -1,4 +1,5 @@ --ゼンマイニャンコ +--Wind-Up Kitten local s,id=GetID() function s.initial_effect(c) --to hand @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25726386.lua b/official/c25726386.lua index fc2a4f3bfa..402afb3981 100644 --- a/official/c25726386.lua +++ b/official/c25726386.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(Ritual.Target(ritual_target_params)) e1:SetOperation(Ritual.Operation(ritual_operation_params)) c:RegisterEffect(e1) @@ -69,4 +69,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25727454.lua b/official/c25727454.lua index 0a418ee16b..a75b47720b 100644 --- a/official/c25727454.lua +++ b/official/c25727454.lua @@ -1,4 +1,5 @@ --名匠 ガミル +--Master Craftsman Gamil local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -22,18 +23,14 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return (a:IsControler(tp) and a:IsRelateToBattle()) or (d and d:IsControler(tp) and d:IsRelateToBattle()) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end + if Duel.IsTurnPlayer(1-tp) then a=Duel.GetAttackTarget() end if not a:IsRelateToBattle() or a:IsFacedown() then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(300) a:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c2572890.lua b/official/c2572890.lua index b5869361a8..be64c46293 100644 --- a/official/c2572890.lua +++ b/official/c2572890.lua @@ -46,7 +46,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -59,4 +59,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25733157.lua b/official/c25733157.lua index bdd20e0eef..6a8ae1898c 100644 --- a/official/c25733157.lua +++ b/official/c25733157.lua @@ -1,6 +1,5 @@ --閃刀機-イーグルブースター --Sky Striker Mecha - Eagle Booster - local s,id=GetID() function s.initial_effect(c) --Targeted monster becomes unaffected by other card effects @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.cfilter(c) @@ -36,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if Duel.GetMatchingGroupCount(Card.IsSpell,tp,LOCATION_GRAVE,0,nil)>=3 then --Cannot be destroyed by battle if 3+ spells in GY @@ -46,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c25750986.lua b/official/c25750986.lua index a74cf35e5b..f886e93d37 100644 --- a/official/c25750986.lua +++ b/official/c25750986.lua @@ -1,7 +1,6 @@ --エターナル・カオス --Eternal Chaos --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Send 1 LIGHT and 1 DARK monster from deck to GY @@ -14,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.rescon(atk) @@ -43,7 +42,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCode(EVENT_CHAINING) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetOperation(s.aclimit) Duel.RegisterEffect(e1,tp) --activate limit @@ -53,7 +52,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetCondition(s.econ) e2:SetValue(s.elimit) Duel.RegisterEffect(e2,tp) @@ -66,12 +65,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.aclimit(e,tp,eg,ep,ev,re,r,rp) - if ep~=tp or not (re:GetActivateLocation()==LOCATION_GRAVE and re:IsActiveType(TYPE_MONSTER)) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + if ep~=tp or not (re:GetActivateLocation()==LOCATION_GRAVE and re:IsMonsterEffect()) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.econ(e) return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)~=0 end function s.elimit(e,te,tp) - return te:GetActivateLocation()==LOCATION_GRAVE and te:IsActiveType(TYPE_MONSTER) -end + return te:GetActivateLocation()==LOCATION_GRAVE and te:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c25769732.lua b/official/c25769732.lua index 60c19edef8..34044310f9 100644 --- a/official/c25769732.lua +++ b/official/c25769732.lua @@ -1,4 +1,5 @@ --機械改造工場 +--Machine Conversion Factory local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)) diff --git a/official/c25771826.lua b/official/c25771826.lua index 55aa336cea..aedcc51cb6 100644 --- a/official/c25771826.lua +++ b/official/c25771826.lua @@ -1,4 +1,5 @@ --A・O・J ガラドホルグ +--Ally of Justice Garadholg local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,4 +16,4 @@ function s.condtion(e) local d=Duel.GetAttackTarget() return (a==e:GetHandler() and d and d:IsFaceup() and d:IsAttribute(ATTRIBUTE_LIGHT)) or (d==e:GetHandler() and a:IsAttribute(ATTRIBUTE_LIGHT)) -end +end \ No newline at end of file diff --git a/official/c25773409.lua b/official/c25773409.lua index c9b91160c7..8644b87888 100644 --- a/official/c25773409.lua +++ b/official/c25773409.lua @@ -1,4 +1,5 @@ --伝説の柔術家 +--Legendary Jujitsu Master local s,id=GetID() function s.initial_effect(c) --to deck @@ -22,5 +23,5 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end - Duel.SendtoDeck(a,nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(a,nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c25788011.lua b/official/c25788011.lua index a7c33b6bdc..12e8024fe4 100644 --- a/official/c25788011.lua +++ b/official/c25788011.lua @@ -1,4 +1,5 @@ --調星師ライズベルト +--Risebell the Star Adjuster local s,id=GetID() function s.initial_effect(c) --lv up @@ -29,8 +30,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(lv+1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25789292.lua b/official/c25789292.lua index 9ac93f0a69..fe16d781bd 100644 --- a/official/c25789292.lua +++ b/official/c25789292.lua @@ -6,17 +6,14 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -27,24 +24,24 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(400) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c25793414.lua b/official/c25793414.lua index 28808edcd5..3564859353 100644 --- a/official/c25793414.lua +++ b/official/c25793414.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,14577226,aux.FilterBoolFunctionEx(Card.IsSetCard,0xf0)) + Fusion.AddProcMix(c,true,true,14577226,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WINDWITCH)) --copy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -27,10 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xf0} +s.listed_series={SET_WINDWITCH} s.listed_names={14577226} s.miracle_synchro_fusion=true -s.material_setcode=0xf0 +s.material_setcode=SET_WINDWITCH function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsMonster() end if chk==0 then return Duel.IsExistingTarget(Card.IsMonster,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end @@ -47,9 +47,9 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -60,7 +60,7 @@ function s.spfilter1(c,e,tp) return c:IsCode(14577226) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xf0) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WINDWITCH) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c25795273.lua b/official/c25795273.lua index 4bff592579..8bf6ccf803 100644 --- a/official/c25795273.lua +++ b/official/c25795273.lua @@ -1,4 +1,5 @@ --イルミラージュ +--Al-Lumi'raj local s,id=GetID() function s.initial_effect(c) --atk down @@ -23,4 +24,4 @@ function s.val(e,c) else return c:GetLevel()*-300 end -end +end \ No newline at end of file diff --git a/official/c25796442.lua b/official/c25796442.lua index 0d930f6d1f..46e7368401 100644 --- a/official/c25796442.lua +++ b/official/c25796442.lua @@ -1,4 +1,5 @@ --儀式の檻 +--Ritual Cage local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.tgval(e,re,rp) end function s.efilter(e,re) return re:IsActiveType(TYPE_EFFECT) -end +end \ No newline at end of file diff --git a/official/c25800447.lua b/official/c25800447.lua index e9a19dbd16..e8427d76a0 100644 --- a/official/c25800447.lua +++ b/official/c25800447.lua @@ -3,11 +3,11 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x119),nil,s.fextra) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_SALAMANGREAT),nil,s.fextra) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) end \ No newline at end of file diff --git a/official/c25807544.lua b/official/c25807544.lua index d5f6b058bf..425746f03e 100644 --- a/official/c25807544.lua +++ b/official/c25807544.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_FZONE) e3:SetCountLimit(1) - e3:SetCost(s.thcost) + e3:SetCost(Cost.PayLP(1200)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -43,10 +43,6 @@ function s.initial_effect(c) end s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} s.listed_names={id,CARD_INFERNOBLE_CHARLES} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1200) end - Duel.PayLPCost(tp,1200) -end function s.thfilter(c) return c:IsSetCard(SET_NOBLE_ARMS) and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c25833572.lua b/official/c25833572.lua index 5900b9207a..b9422b39ff 100644 --- a/official/c25833572.lua +++ b/official/c25833572.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_names={25955164,62340868,98434877} +s.listed_names={CARD_SANGA_OF_THE_THUNDER,CARD_KAZEJIN,CARD_SUIJIN} function s.rescon(sg,e,tp,mg) - return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg,Group.CreateGroup(),25955164,62340868,98434877) + return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg,Group.CreateGroup(),CARD_SANGA_OF_THE_THUNDER,CARD_KAZEJIN,CARD_SUIJIN) end function s.chk(c,sg,g,code,...) if not c:IsCode(code) then return false end @@ -34,9 +34,9 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local rg=Duel.GetReleaseGroup(tp) - local g1=rg:Filter(Card.IsCode,nil,25955164) - local g2=rg:Filter(Card.IsCode,nil,62340868) - local g3=rg:Filter(Card.IsCode,nil,98434877) + local g1=rg:Filter(Card.IsCode,nil,CARD_SANGA_OF_THE_THUNDER) + local g2=rg:Filter(Card.IsCode,nil,CARD_KAZEJIN) + local g3=rg:Filter(Card.IsCode,nil,CARD_SUIJIN) local g=g1:Clone() g:Merge(g2) g:Merge(g3) @@ -45,9 +45,9 @@ function s.spcon(e,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local rg=Duel.GetReleaseGroup(tp) - local g1=rg:Filter(Card.IsCode,nil,25955164) - local g2=rg:Filter(Card.IsCode,nil,62340868) - local g3=rg:Filter(Card.IsCode,nil,98434877) + local g1=rg:Filter(Card.IsCode,nil,CARD_SANGA_OF_THE_THUNDER) + local g2=rg:Filter(Card.IsCode,nil,CARD_KAZEJIN) + local g3=rg:Filter(Card.IsCode,nil,CARD_SUIJIN) g1:Merge(g2) g1:Merge(g3) local g1=aux.SelectUnselectGroup(g1,e,tp,3,3,s.rescon,1,tp,HINTMSG_RELEASE,s.rescon,nil,true) @@ -63,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g1 then return end Duel.Release(g1,REASON_COST) g1:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c2584136.lua b/official/c2584136.lua index b53b60a18c..d1dc1d4259 100644 --- a/official/c2584136.lua +++ b/official/c2584136.lua @@ -38,19 +38,19 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_ATTACK) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c25845518.lua b/official/c25845518.lua index cb82c26f6a..efc85d90ab 100644 --- a/official/c25845518.lua +++ b/official/c25845518.lua @@ -21,23 +21,22 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x29} -s.listed_names={0x29} +s.listed_series={SET_DRAGUNITY} function s.thfilter(c) - return c:IsLevelAbove(5) and c:IsSetCard(0x29) and c:IsAbleToHand() + return c:IsLevelAbove(5) and c:IsSetCard(SET_DRAGUNITY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -45,7 +44,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,e,tp) local ec=c:GetEquipTarget() - return c:IsOriginalType(TYPE_MONSTER) and ec and ec:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsOriginalType(TYPE_MONSTER) and ec and ec:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -60,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c25847467.lua b/official/c25847467.lua index 0e23b69c36..4882245173 100644 --- a/official/c25847467.lua +++ b/official/c25847467.lua @@ -1,4 +1,5 @@ --暗黒界の刺客 カーキ +--Kahkki, Guerilla of Dark World local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&0x4040)==0x4040 + return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -28,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25853045.lua b/official/c25853045.lua index e2adc21aa2..da42b2df01 100644 --- a/official/c25853045.lua +++ b/official/c25853045.lua @@ -1,4 +1,5 @@ --FA-ブラック・レイ・ランサー +--Full Armored Black Ray Lancer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -48,7 +49,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) else return false end end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -62,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c25857246.lua b/official/c25857246.lua index 04dbc83175..badd75a7ae 100644 --- a/official/c25857246.lua +++ b/official/c25857246.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.mat_filter(c) return c:GetLevel()~=8 end @@ -40,19 +40,19 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end function s.cfilter(c) - return c:IsSetCard(0xb4) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NEKROZ) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end function s.filter(c) diff --git a/official/c25857977.lua b/official/c25857977.lua index 669e16bb56..3533307ab2 100644 --- a/official/c25857977.lua +++ b/official/c25857977.lua @@ -1,5 +1,5 @@ --DDD死謳王バイス・レイクエム ---D/D/D Eulogy King Vice Requiem +--D/D/D Vice King Requiem --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -34,12 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.efop) c:RegisterEffect(e3) end -s.listed_series={0x10af,0xae} +s.listed_series={SET_DDD,SET_DARK_CONTRACT} function s.splimit(e,c) - return not c:IsSetCard(0x10af) + return not c:IsSetCard(SET_DDD) end function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xae) + return c:IsFaceup() and c:IsSetCard(SET_DARK_CONTRACT) end function s.desfilter2(c,e) return s.desfilter(c) and c:IsCanBeEffectTarget(e) @@ -72,7 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -80,7 +80,7 @@ end function s.efcon(e,tp,eg,ep,ev,re,r,rp) local p=e:GetHandler() return (r&REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK)~=0 and p:IsPreviousLocation(LOCATION_ONFIELD) - and p:GetReasonCard():IsSetCard(0x10af) + and p:GetReasonCard():IsSetCard(SET_DDD) end function s.efop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -95,14 +95,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) --register the hint local e2=Effect.CreateEffect(rc) e2:SetDescription(aux.Stringid(id,5)) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) --in case the monster did not have an effect if not rc:IsType(TYPE_EFFECT) then @@ -110,16 +110,16 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end end function s.tdfilter(c) - return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0xae) and c:IsAbleToDeck() + return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) @@ -129,8 +129,8 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,1,nil) - if Duel.SendtoDeck(td,nil,2,REASON_EFFECT)~=0 then + local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,1,1,nil) + if Duel.SendtoDeck(td,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then if tc and tc:IsRelateToEffect(e) then if Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.BreakEffect() @@ -138,4 +138,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c25861589.lua b/official/c25861589.lua index 649b162cd7..f779733036 100644 --- a/official/c25861589.lua +++ b/official/c25861589.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(Fusion.SummonEffTG(params)) e2:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e2) diff --git a/official/c25866285.lua b/official/c25866285.lua index fee967f899..98f295b821 100644 --- a/official/c25866285.lua +++ b/official/c25866285.lua @@ -9,21 +9,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.condition(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() - return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(0x2a) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return ec:IsFaceup() and ec:IsControler(tp) and ec:IsSetCard(SET_NATURIA) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c25880422.lua b/official/c25880422.lua index 197223add7..5cf5a924ef 100644 --- a/official/c25880422.lua +++ b/official/c25880422.lua @@ -1,4 +1,5 @@ --『攻撃』封じ +--Block Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c25904894.lua b/official/c25904894.lua index f7f1271e22..e673943bd0 100644 --- a/official/c25904894.lua +++ b/official/c25904894.lua @@ -1,5 +1,5 @@ --カラクリ大権現 無零武 ---Karakuri Daigongen mdl 00X Bureibu +--Karakuri Super Shogun mdl 00N "Bureibu" local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -39,12 +39,12 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,7 +62,7 @@ end function s.cfilter(c,tp) local np=c:GetPosition() local pp=c:GetPreviousPosition() - return c:IsSetCard(0x11) and c:IsControler(tp) and ((pp==POS_FACEUP_ATTACK and np==POS_FACEUP_DEFENSE) or (pp==POS_FACEUP_DEFENSE and np==POS_FACEUP_ATTACK)) + return c:IsSetCard(SET_KARAKURI) and c:IsControler(tp) and ((pp==POS_FACEUP_ATTACK and np==POS_FACEUP_DEFENSE) or (pp==POS_FACEUP_DEFENSE and np==POS_FACEUP_ATTACK)) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -79,5 +79,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c25908748.lua b/official/c25908748.lua index 9ad199d2c3..ba42ec21fd 100644 --- a/official/c25908748.lua +++ b/official/c25908748.lua @@ -1,5 +1,5 @@ --鉄獣の戦線 ---Tribrigade Line +--Tri-Brigade Stand-Off --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -38,21 +38,21 @@ function s.initial_effect(c) e4:SetOperation(s.limop) c:RegisterEffect(e4) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.splimit(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACES_BEAST_BWARRIOR_WINGB) end function s.thfilter(c,typ) - return c:IsSetCard(0x14f) and c:IsMonster() and c:GetOriginalRace()~=typ and c:IsAbleToHand() + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsMonster() and c:GetOriginalRace()~=typ and c:IsAbleToHand() end function s.cstfilter(c,tp) return c:IsMonster() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetOriginalRace()) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cstfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cstfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,s.cstfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) + local sg=Duel.SelectMatchingCard(tp,s.cstfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(sg,REASON_COST) e:SetLabel(sg:GetFirst():GetOriginalRace()) end @@ -81,6 +81,6 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c25919316.lua b/official/c25919316.lua index 3d233999f5..7182746467 100644 --- a/official/c25919316.lua +++ b/official/c25919316.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcon) diff --git a/official/c25920413.lua b/official/c25920413.lua index 01f198b257..e5df98c74e 100644 --- a/official/c25920413.lua +++ b/official/c25920413.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e5:SetOperation(s.spcop) c:RegisterEffect(e5) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.spcost(e,c,tp,sumtype) return sumtype ~= SUMMON_TYPE_SPECIAL+1 or Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 @@ -46,7 +46,7 @@ function s.spcop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -63,12 +63,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c25924653.lua b/official/c25924653.lua index e159a9687b..8ba1ba4316 100644 --- a/official/c25924653.lua +++ b/official/c25924653.lua @@ -18,10 +18,10 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) - e2:SetCost(s.dspcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.dsptg) e2:SetOperation(s.dspop) c:RegisterEffect(e2) @@ -75,16 +75,11 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end e:Reset() end -function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) -end function s.dspfilter(c,e,tp) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsCanBeSpecialSummoned(e,104,tp,false,false) and not c:IsCode(id) end function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end @@ -95,4 +90,4 @@ function s.dspop(e,tp,eg,ep,ev,re,r,rp) if sc and Duel.SpecialSummon(sc,104,tp,tp,false,false,POS_FACEUP)>0 then sc:RegisterFlagEffect(sc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c259314.lua b/official/c259314.lua index f7272c2b18..5a537d6f22 100644 --- a/official/c259314.lua +++ b/official/c259314.lua @@ -9,18 +9,15 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x56} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_INZEKTOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -34,13 +31,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atk/def local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1000) c:RegisterEffect(e1) --Equip limit @@ -49,12 +46,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(s.efilter) c:RegisterEffect(e3,true) else @@ -62,8 +59,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.eqlimit(e,c) - return c:IsSetCard(0x56) + return c:IsSetCard(SET_INZEKTOR) end function s.efilter(e,re,rp) return e:GetHandlerPlayer()~=rp -end +end \ No newline at end of file diff --git a/official/c25935625.lua b/official/c25935625.lua index afca799376..2746846da8 100644 --- a/official/c25935625.lua +++ b/official/c25935625.lua @@ -1,4 +1,5 @@ --闇竜星-ジョクト +--Jiaotu, Darkness of the Yang Zing local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,15 +27,15 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,18 +54,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 end function s.cfilter(c) - return c:IsSetCard(0x9e) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_YANG_ZING) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,2,nil) end Duel.DiscardHand(tp,s.cfilter,2,2,REASON_COST) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x9e) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x9e) and c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -85,7 +86,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g1:GetFirst() for tc in aux.Next(g1) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end Duel.SpecialSummonComplete() g1:KeepAlive() @@ -116,4 +117,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.rmfilter,nil,e:GetLabel()) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c25955164.lua b/official/c25955164.lua index 1847616506..deb3186831 100644 --- a/official/c25955164.lua +++ b/official/c25955164.lua @@ -1,4 +1,5 @@ --雷魔神-サンガ +--Sanga of the Thunder local s,id=GetID() function s.initial_effect(c) --atkdown @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler() + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==e:GetHandler() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end @@ -28,8 +29,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c25955749.lua b/official/c25955749.lua index 6414f5d6e4..f3cb6ff006 100644 --- a/official/c25955749.lua +++ b/official/c25955749.lua @@ -1,5 +1,5 @@ --閃刀術式-ジャミングウェーブ ---Brandish Skill Jamming Wave +--Sky Striker Maneuver - Jamming Waves! -- local s,id=GetID() function s.initial_effect(c) @@ -42,5 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c25958491.lua b/official/c25958491.lua index 2377749b7d..fe55ef010f 100644 --- a/official/c25958491.lua +++ b/official/c25958491.lua @@ -1,4 +1,5 @@ --エンシェント・ホーリー・ワイバーン +--Ancient Sacred Wyvern local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCode(EVENT_BATTLE_DESTROYED) e2:SetCondition(s.sumcon) - e2:SetCost(s.sumcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.sumtg) e2:SetOperation(s.sumop) c:RegisterEffect(e2) @@ -37,10 +38,6 @@ end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end -function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -50,4 +47,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c25988873.lua b/official/c25988873.lua index 344c73e654..ea64e136b1 100644 --- a/official/c25988873.lua +++ b/official/c25988873.lua @@ -1,4 +1,5 @@ --ドラグニティ-パルチザン +--Dragunity Partisan local s,id=GetID() function s.initial_effect(c) --equip @@ -17,9 +18,9 @@ function s.initial_effect(c) e2:SetValue(TYPE_TUNER) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.filter(c,e,tp) - return c:IsSetCard(0x29) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -43,11 +44,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) end function s.eqlimit(e,c) return e:GetLabelObject()==c -end +end \ No newline at end of file diff --git a/official/c26016357.lua b/official/c26016357.lua index 4ad16656dc..dd7fb2364f 100644 --- a/official/c26016357.lua +++ b/official/c26016357.lua @@ -1,4 +1,5 @@ --マドルチェ・マーマメイド +--Madolche Marmalmaide local s,id=GetID() function s.initial_effect(c) --to deck @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -33,11 +34,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.filter(c) - return c:IsSetCard(0x71) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MADOLCHE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,4 +53,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c26022485.lua b/official/c26022485.lua index 6e151ae4e1..c8501fa261 100644 --- a/official/c26022485.lua +++ b/official/c26022485.lua @@ -1,4 +1,5 @@ --衰弱の霧 +--Enervating Mist local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetTargetRange(0,1) e2:SetValue(5) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c2602411.lua b/official/c2602411.lua index 3f76c36df7..526bacfaea 100644 --- a/official/c2602411.lua +++ b/official/c2602411.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) - e3:SetCost(aux.SelfToGraveCost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c26046205.lua b/official/c26046205.lua index b1ea6dd920..37f695f6f7 100644 --- a/official/c26046205.lua +++ b/official/c26046205.lua @@ -1,4 +1,5 @@ --悪シノビ +--Vengeful Shinobi local s,id=GetID() function s.initial_effect(c) --draw @@ -21,4 +22,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26077387.lua b/official/c26077387.lua index b2652f747c..fd19a0f48a 100644 --- a/official/c26077387.lua +++ b/official/c26077387.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -30,15 +30,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x1115} -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end +s.listed_series={SET_SKY_STRIKER_ACE} function s.spfilter1(c,e,tp) - return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c,0x60)>0 + return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c,ZONES_EMZ)>0 end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -48,12 +43,12 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) if #g>0 then - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,0x60) + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,ZONES_EMZ) end end function s.cfilter(c,tp,rp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetPreviousTypeOnField()&TYPE_LINK~=0 and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousSetCard(0x1115) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT))) + and c:IsPreviousSetCard(SET_SKY_STRIKER_ACE) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT))) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp,rp) diff --git a/official/c26082117.lua b/official/c26082117.lua index dbf2836a99..e6ac8bd93b 100644 --- a/official/c26082117.lua +++ b/official/c26082117.lua @@ -1,4 +1,5 @@ --ガガガマジシャン +--Gagaga Magician local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -32,7 +33,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c26082229.lua b/official/c26082229.lua index 2e7e02dc80..f6a7778c38 100644 --- a/official/c26082229.lua +++ b/official/c26082229.lua @@ -1,4 +1,5 @@ --侵略の炎 +--Invasion of Flames local s,id=GetID() function s.initial_effect(c) --summon success @@ -13,4 +14,4 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) end function s.chlimit(re,rp,tp) return not re:GetHandler():IsTrap() or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c26084285.lua b/official/c26084285.lua index 20cab1f9ee..472765a6f9 100644 --- a/official/c26084285.lua +++ b/official/c26084285.lua @@ -11,22 +11,18 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsActiveType(TYPE_MONSTER)) + if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsMonsterEffect()) or (not Duel.IsChainNegatable(ev)) then return false end local ex,tg,tc,p=Duel.GetOperationInfo(ev,CATEGORY_HANDES) return ex and (p==ep or p==PLAYER_ALL) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -38,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2609443.lua b/official/c2609443.lua index ff82db40d4..01f3621c08 100644 --- a/official/c2609443.lua +++ b/official/c2609443.lua @@ -15,8 +15,8 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE) - e1:SetCondition(s.atkcon) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -30,17 +30,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x70} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_CHRONOMALY} function s.gyfilter(c) - return (c:IsSetCard(0x70) or c:IsType(TYPE_XYZ)) and c:IsMonster() + return (c:IsSetCard(SET_CHRONOMALY) or c:IsType(TYPE_XYZ)) and c:IsMonster() and c:GetAttack()>0 and not c:IsForbidden() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -65,7 +62,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.floor(tc2:GetAttack()/2)) tc1:RegisterEffect(e1) if not tc1:IsHasEffect(EFFECT_REVERSE_UPDATE) and c:IsRelateToEffect(e) then @@ -75,11 +72,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) + return rp==1-tp and re:IsMonsterEffect() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -89,4 +82,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26096328.lua b/official/c26096328.lua index 0d6bc99dec..41175fb7e7 100644 --- a/official/c26096328.lua +++ b/official/c26096328.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --multi attack diff --git a/official/c26099457.lua b/official/c26099457.lua index 974fcfed7c..19acfc6b9f 100644 --- a/official/c26099457.lua +++ b/official/c26099457.lua @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c26118970.lua b/official/c26118970.lua index 39c31c934d..16a9211c6a 100644 --- a/official/c26118970.lua +++ b/official/c26118970.lua @@ -16,18 +16,18 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_BLACK_ROSE_DRAGON} -s.listed_series={0x1123} +s.listed_series={SET_ROSE_DRAGON} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1123) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROSE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) local rc=e:GetHandler():GetReasonCard() if rc and (rc:IsCode(CARD_BLACK_ROSE_DRAGON) or (rc:IsRace(RACE_PLANT) and rc:IsType(TYPE_SYNCHRO))) then e:SetLabel(1) @@ -44,7 +44,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and e:GetLabel()==1 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -54,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g2) end end -end +end \ No newline at end of file diff --git a/official/c26120084.lua b/official/c26120084.lua index 8278fb9b93..19dffeae8b 100644 --- a/official/c26120084.lua +++ b/official/c26120084.lua @@ -32,10 +32,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26157485.lua b/official/c26157485.lua index 31626e7165..40619506f7 100644 --- a/official/c26157485.lua +++ b/official/c26157485.lua @@ -1,4 +1,5 @@ --C・シューター +--Iron Chain Blaster local s,id=GetID() function s.initial_effect(c) --damage @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -s.listed_series={0x25} +s.listed_series={SET_IRON_CHAIN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x25) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_IRON_CHAIN) and c:IsAbleToGraveAsCost() end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -33,4 +34,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2618045.lua b/official/c2618045.lua index 1d51b8eb46..684af470c8 100644 --- a/official/c2618045.lua +++ b/official/c2618045.lua @@ -1,6 +1,5 @@ --フォトン・チャージマン --Photon Chargeman - local s,id=GetID() function s.initial_effect(c) --ATK becomes double of its original ATK @@ -22,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -32,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY,2) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c26185991.lua b/official/c26185991.lua index e827fadd58..47ca73cd7a 100644 --- a/official/c26185991.lua +++ b/official/c26185991.lua @@ -1,4 +1,5 @@ --代打バッター +--Pinch Hopper local s,id=GetID() function s.initial_effect(c) --special summon @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2619149.lua b/official/c2619149.lua index aa87bc3253..d809ea4847 100644 --- a/official/c2619149.lua +++ b/official/c2619149.lua @@ -2,73 +2,63 @@ --Gladiator Beast Samnite local s,id=GetID() function s.initial_effect(c) - --search + --Add 1 "Gladiator Beast" card from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCondition(s.scon) - e1:SetTarget(s.stg) - e1:SetOperation(s.sop) + e1:SetCode(EVENT_BATTLE_DESTROYING) + e1:SetCondition(s.thcon) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) - --special summon + --Special Summon 1 "Gladiator Beast" monster from your Deck, except "Gladiator Beast Samnite" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_series={SET_GLADIATOR_BEAST} s.listed_names={id} -function s.scon(e,tp,eg,ep,ev,re,r,rp) +function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:GetFlagEffect(id)>0 and aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) + return c:HasFlagEffect(id) and aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) end -function s.sfilter(c) +function s.thfilter(c) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsAbleToHand() end -function s.stg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.sop(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsCanBeSpecialSummoned(e,108,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GLADIATOR_BEAST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,108,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if tc then - Duel.SpecialSummon(tc,108,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,108,tp,tp,false,false,POS_FACEUP)>0 then + sc:RegisterFlagEffect(sc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,1) end end diff --git a/official/c26194151.lua b/official/c26194151.lua index e0bbd0c5db..7a5433120d 100644 --- a/official/c26194151.lua +++ b/official/c26194151.lua @@ -11,11 +11,11 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} function s.filter1(c,e,tp) local lv=c:GetLevel() - return c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp,c) + return c:IsSetCard(SET_STARDUST) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp,c) end function s.rescon(tuner,scard) return function(sg,e,tp,mg) @@ -27,7 +27,7 @@ function s.rescon(tuner,scard) end end function s.filter2(c,tp,sc) - local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c) + local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) return c:IsType(TYPE_TUNER) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) and aux.SelectUnselectGroup(rg,e,tp,nil,2,s.rescon(c,sc),0) end @@ -48,9 +48,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sc=g1:GetFirst() if sc then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp,sc) + local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp,sc) local tuner=g2:GetFirst() - local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,tuner) + local rg=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE|LOCATION_GRAVE,0,tuner) local sg=aux.SelectUnselectGroup(rg,e,tp,1,2,s.rescon(tuner,sc),1,tp,HINTMSG_REMOVE,s.rescon(tuner,sc)) sg:AddCard(tuner) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) @@ -58,14 +58,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) sc:CompleteProcedure() end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c26202165.lua b/official/c26202165.lua index 228529a078..1d6a8f9d7f 100644 --- a/official/c26202165.lua +++ b/official/c26202165.lua @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -47,4 +47,4 @@ end function s.aclimit(e,re,tp) local tc=e:GetLabelObject() return re:GetHandler():IsCode(tc:GetCode()) -end +end \ No newline at end of file diff --git a/official/c26205777.lua b/official/c26205777.lua index 0a8884475c..2175fa4817 100644 --- a/official/c26205777.lua +++ b/official/c26205777.lua @@ -1,4 +1,5 @@ --炎帝テスタロス +--Thestalos the Firestorm Monarch local s,id=GetID() function s.initial_effect(c) --handes @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -23,10 +24,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) local tc=sg:GetFirst() if tc:IsMonster() then Duel.Damage(1-tp,tc:GetLevel()*100,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c26211048.lua b/official/c26211048.lua index 83458792f1..c158673f49 100644 --- a/official/c26211048.lua +++ b/official/c26211048.lua @@ -1,4 +1,5 @@ --甲虫装機 エクサスタッグ +--Inzektor Exa-Stag local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,25 +13,21 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) aux.AddEREquipLimit(c,nil,function(ec,_,tp) return ec:IsControler(1-tp) end,s.equipop,e1) end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.eqfilter(c) return c:IsLocation(LOCATION_MZONE) or c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(1-tp) and s.eqfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_MZONE) and chkc:IsControler(1-tp) and s.eqfilter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(s.eqfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end + and Duel.IsExistingTarget(s.eqfilter,tp,0,LOCATION_GRAVE|LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,s.eqfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil) + local g=Duel.SelectTarget(tp,s.eqfilter,tp,0,LOCATION_GRAVE|LOCATION_MZONE,1,1,nil) if g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) end @@ -43,7 +40,7 @@ function s.equipop(c,e,tp,tc) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) local def=tc:GetTextDefense()/2 @@ -51,7 +48,7 @@ function s.equipop(c,e,tp,tc) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_DEFENSE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(def) tc:RegisterEffect(e3) end @@ -61,4 +58,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsMonster() then return end if not s.equipop(c,e,tp,tc) then return end -end +end \ No newline at end of file diff --git a/official/c26232916.lua b/official/c26232916.lua index 7d4f693f81..58f369d93a 100644 --- a/official/c26232916.lua +++ b/official/c26232916.lua @@ -38,15 +38,15 @@ function s.initial_effect(c) e5:SetOperation(s.repop) c:RegisterEffect(e5) end -s.listed_series={0x2b,0x61} +s.listed_series={SET_NINJA,SET_NINJITSU_ART} function s.thcfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x2b) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_NINJA) and c:IsControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thcfilter,1,nil,tp) end function s.thfilter(c) - return ((c:IsMonster() and c:IsSetCard(0x2b)) or c:IsSetCard(0x61)) + return ((c:IsMonster() and c:IsSetCard(SET_NINJA)) or c:IsSetCard(SET_NINJITSU_ART)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -69,7 +69,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -78,12 +78,12 @@ function s.aclimit(e,re,tp) return re:GetHandler():IsCode(tc:GetCode()) end function s.repfilter(c,tp,rp) - return c:IsFaceup() and ((c:IsMonster() and c:IsSetCard(0x2b)) or c:IsSetCard(0x61)) + return c:IsFaceup() and ((c:IsMonster() and c:IsSetCard(SET_NINJA)) or c:IsSetCard(SET_NINJITSU_ART)) and c:IsOnField() and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp~=tp)) end function s.rmfilter(c) - return c:IsSetCard(0x2b) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NINJA) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer(),c:GetReasonPlayer()) @@ -102,5 +102,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=e:GetLabelObject() - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c26236560.lua b/official/c26236560.lua index 537cf9401e..8dca63a7fc 100644 --- a/official/c26236560.lua +++ b/official/c26236560.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={} -s.listed_series={0x130} +s.listed_series={SET_UNCHAINED} function s.desfilter(c,tp) return Duel.GetMZoneCount(tp,c)>0 end @@ -50,12 +50,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 @@ -71,18 +71,18 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) and not (re and re:GetHandler():IsCode(id)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26237713.lua b/official/c26237713.lua index faa7eae239..aeda0c0391 100644 --- a/official/c26237713.lua +++ b/official/c26237713.lua @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoExtraP(g,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26254876.lua b/official/c26254876.lua index 1289dc3950..278877807e 100644 --- a/official/c26254876.lua +++ b/official/c26254876.lua @@ -9,4 +9,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_PIERCE) e1:SetCondition(Gemini.EffectStatusCondition) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c26257572.lua b/official/c26257572.lua index 1e51d79ebb..93953dfd5c 100644 --- a/official/c26257572.lua +++ b/official/c26257572.lua @@ -1,4 +1,5 @@ --苦痛の回廊 +--Corridor of Agony local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsSummonLocation(LOCATION_DECK) -end +end \ No newline at end of file diff --git a/official/c26268488.lua b/official/c26268488.lua index c9315a068d..62204ce75e 100644 --- a/official/c26268488.lua +++ b/official/c26268488.lua @@ -1,4 +1,5 @@ --聖珖神竜 スターダスト・シフル +--Stardust Sifr Divine Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -39,12 +40,12 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} s.synchro_tuner_required=1 s.synchro_nt_required=2 function s.indct(e,re,r,rp) @@ -53,7 +54,7 @@ function s.indct(e,re,r,rp) else return 0 end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -71,7 +72,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xa3) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STARDUST) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -86,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26270847.lua b/official/c26270847.lua index b5d42e9e69..fb89b7a464 100644 --- a/official/c26270847.lua +++ b/official/c26270847.lua @@ -1,4 +1,5 @@ --EMシルバー・クロウ +--Performapal Silver Claw local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -22,15 +23,15 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.atktg(e,c) - return c:IsSetCard(0x9f) + return c:IsSetCard(SET_PERFORMAPAL) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x9f),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PERFORMAPAL),tp,LOCATION_MZONE,0,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9f),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_PERFORMAPAL),tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() for tc in aux.Next(g) do local e1=Effect.CreateEffect(e:GetHandler()) @@ -38,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c26273196.lua b/official/c26273196.lua index 5ea051559d..3dbc7f0151 100644 --- a/official/c26273196.lua +++ b/official/c26273196.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) end s.toss_coin=true function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c26285557.lua b/official/c26285557.lua index aa40686d2c..a7be3b69cb 100644 --- a/official/c26285557.lua +++ b/official/c26285557.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.desfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xfc) and Duel.GetMZoneCount(tp,c)>0 + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) and Duel.GetMZoneCount(tp,c)>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -39,5 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc1:IsControler(tp) and tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)>0 and tc2:IsRelateToEffect(e) then Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c26285788.lua b/official/c26285788.lua index 977ad7b759..6b98db3ea2 100644 --- a/official/c26285788.lua +++ b/official/c26285788.lua @@ -27,7 +27,7 @@ function s.addcount(e,tp,eg,ep,ev,re,r,rp) p=tc:GetReasonPlayer() if tc:IsMonster() and not tc:IsType(TYPE_TOKEN) and (tc:IsPreviousLocation(LOCATION_MZONE) or (tc:IsPreviousLocation(LOCATION_HAND) and tc:IsPreviousControler(p))) then - Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(p,id,RESET_PHASE|PHASE_END,0,1) end end end @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.GetFlagEffect(tp,id)>0 end) e1:SetOperation(s.effectop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) diff --git a/official/c26293219.lua b/official/c26293219.lua index ad3540a0b2..3856936249 100644 --- a/official/c26293219.lua +++ b/official/c26293219.lua @@ -1,4 +1,5 @@ --バーニング・スカルヘッド +--Burning Skull Head local s,id=GetID() function s.initial_effect(c) --damage @@ -17,12 +18,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(s.rtgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rtgtg) e2:SetOperation(s.rtgop) c:RegisterEffect(e2) end -s.listed_names={99899504} +s.listed_names={99899504} --"Skull Flame" function s.damcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end @@ -36,10 +37,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -function s.rtgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsCode(99899504) end @@ -53,6 +50,6 @@ end function s.rtgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c26302522.lua b/official/c26302522.lua index 60e3ae5a8d..aab942d312 100644 --- a/official/c26302522.lua +++ b/official/c26302522.lua @@ -29,7 +29,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) --Destroy and deal damage @@ -37,20 +37,20 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_OPPO_TURN+RESET_PHASE+PHASE_STANDBY) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_OPPO_TURN|RESET_PHASE|PHASE_STANDBY) c:RegisterEffect(e2) end function s.eqlimit(e,c) return e:GetOwner()==c end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c26304459.lua b/official/c26304459.lua index bd932ea9fa..ba12e5504f 100644 --- a/official/c26304459.lua +++ b/official/c26304459.lua @@ -1,4 +1,5 @@ --エンシェント・ゴッド・フレムベル +--Ancient Flamvell Deity local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -16,12 +17,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.remcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - if Duel.IsPlayerAffectedByEffect(1-tp,69832741) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE+LOCATION_GRAVE) + if Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE|LOCATION_GRAVE) else Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE) end @@ -33,7 +34,7 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) local ht=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) if ht==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,ht,nil) + local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,ht,nil) local c=e:GetHandler() if #rg>0 then Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) @@ -42,7 +43,7 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(#rg*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c26308721.lua b/official/c26308721.lua index 07e588794c..8c6b5fa72d 100644 --- a/official/c26308721.lua +++ b/official/c26308721.lua @@ -41,7 +41,7 @@ function s.ctop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -66,4 +66,4 @@ function s.ctop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c26326541.lua b/official/c26326541.lua index 3f0ccc203d..1223fdc851 100644 --- a/official/c26326541.lua +++ b/official/c26326541.lua @@ -45,16 +45,15 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0xd9,TYPES_TOKEN,0,0,1,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SHIRANUI,TYPES_TOKEN,0,0,1,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0xd9,TYPES_TOKEN,0,0,1,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP) + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SHIRANUI,TYPES_TOKEN,0,0,1,RACE_ZOMBIE,ATTRIBUTE_FIRE,POS_FACEUP) then return end local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) -end - +end \ No newline at end of file diff --git a/official/c26329679.lua b/official/c26329679.lua index 633ed12d2d..d2ad848c86 100644 --- a/official/c26329679.lua +++ b/official/c26329679.lua @@ -1,6 +1,5 @@ --セイクリッド・オメガ --Constellar Omega - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -14,18 +13,14 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x53} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_CONSTELLAR} function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x53),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_CONSTELLAR),tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() for tc in aux.Next(g) do --Unaffected by spells/traps @@ -35,11 +30,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.efilter) tc:RegisterEffect(e1) end end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return te:IsSpellTrapEffect() end \ No newline at end of file diff --git a/official/c26334139.lua b/official/c26334139.lua index 60107a46e5..4584418b38 100644 --- a/official/c26334139.lua +++ b/official/c26334139.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c26345570.lua b/official/c26345570.lua index 93198caf38..04de3849f0 100644 --- a/official/c26345570.lua +++ b/official/c26345570.lua @@ -1,4 +1,5 @@ --先史遺産-ピラミッド・アイ・タブレット +--Chronomaly Pyramid Eye Tablet local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,8 +13,8 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x70)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_CHRONOMALY)) e2:SetValue(800) c:RegisterEffect(e2) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} \ No newline at end of file diff --git a/official/c26357901.lua b/official/c26357901.lua index 9c839031aa..9df1cf1349 100644 --- a/official/c26357901.lua +++ b/official/c26357901.lua @@ -1,5 +1,5 @@ --死償不知 ---Recklessness and Punishment +--Imprudent Intrusion --Scripted by Neo Yuno local s,id=GetID() function s.initial_effect(c) @@ -57,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26372118.lua b/official/c26372118.lua index 2a02c8b9c8..7da956abf3 100644 --- a/official/c26372118.lua +++ b/official/c26372118.lua @@ -15,23 +15,23 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={CARD_R_ACE_HYDRANT} function s.thfilter(c) - return c:IsSetCard(0x18c) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_RESCUE_ACE) and c:IsMonster() and c:IsAbleToHand() end function s.hydrant_chk(tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_R_ACE_HYDRANT),tp,LOCATION_ONFIELD,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_GRAVE - if s.hydrant_chk(tp) then loc=loc+LOCATION_DECK end + if s.hydrant_chk(tp) then loc=loc|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,loc,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_GRAVE - if s.hydrant_chk(tp) then loc=loc+LOCATION_DECK end + if s.hydrant_chk(tp) then loc=loc|LOCATION_DECK end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,loc,0,1,1,nil) if #g>0 then diff --git a/official/c26376390.lua b/official/c26376390.lua index 0f53185ddc..ff0283656e 100644 --- a/official/c26376390.lua +++ b/official/c26376390.lua @@ -1,4 +1,5 @@ --ものマネ幻想師 +--Copycat local s,id=GetID() function s.initial_effect(c) --atk def @@ -32,13 +33,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(tc:GetBaseDefense()) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c26381750.lua b/official/c26381750.lua index 15a7aedb5b..9d601131d6 100644 --- a/official/c26381750.lua +++ b/official/c26381750.lua @@ -1,6 +1,5 @@ --紅蓮地帯を飛ぶ鷹 --Soaring Eagle Above the Searing Land - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -14,11 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x39} - +s.listed_series={SET_LAVAL} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 + and Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_LAVAL):GetClassCount(Card.GetCode)>=3 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -26,7 +24,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)<3 then return end + if Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_LAVAL):GetClassCount(Card.GetCode)<3 then return end local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then --Banish it if it leaves the field @@ -35,7 +33,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c263926.lua b/official/c263926.lua index 0997c3497b..aeac15507a 100644 --- a/official/c263926.lua +++ b/official/c263926.lua @@ -64,7 +64,7 @@ end --Activation legality function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) end --Self-destruction diff --git a/official/c26400609.lua b/official/c26400609.lua index b09d96500e..aa7e790aec 100644 --- a/official/c26400609.lua +++ b/official/c26400609.lua @@ -91,7 +91,7 @@ function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.tgfilter(c) return c:IsMonster() and c:IsAbleToGrave() diff --git a/official/c26412047.lua b/official/c26412047.lua index dbc71b6390..177faff0ea 100644 --- a/official/c26412047.lua +++ b/official/c26412047.lua @@ -1,4 +1,5 @@ --ハンマーシュート +--Hammer Shot local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) else Duel.Destroy(tg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c26420373.lua b/official/c26420373.lua index b7a996e7f6..b9bfa41c10 100644 --- a/official/c26420373.lua +++ b/official/c26420373.lua @@ -42,14 +42,14 @@ function s.initial_effect(c) e4:SetValue(s.atlimit) c:RegisterEffect(e4) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.costfilter(c) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() end function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) e:SetLabel(g:GetFirst():GetOriginalLevel()) Duel.SendtoGrave(g,REASON_COST) end @@ -70,7 +70,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) @@ -82,10 +82,10 @@ function s.hspcon(e,c) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -102,5 +102,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.atlimit(e,c) - return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(0x2016) -end + return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(SET_SPEEDROID) +end \ No newline at end of file diff --git a/official/c26434972.lua b/official/c26434972.lua index 430724fe28..283b5eba29 100644 --- a/official/c26434972.lua +++ b/official/c26434972.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(Fusion.SummonEffTG(params)) e2:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e2) diff --git a/official/c26435595.lua b/official/c26435595.lua index 17f4366fd5..224dea91f7 100644 --- a/official/c26435595.lua +++ b/official/c26435595.lua @@ -1,13 +1,13 @@ --- --- Patissciel Couverture --- Scripted by Hatter +--聖菓使クーベル +--Patissciel Couverture +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) --- 2 Pendulum monsters Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM),2) - -- Place 1 Pendulum Card in the Pendulum Zone + --Place 1 Pendulum Card in the Pendulum Zone local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.pctg) e1:SetOperation(s.pcop) c:RegisterEffect(e1) - -- Place this card in the Pendulum Zone + --Place this card in the Pendulum Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -54,4 +54,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c26439287.lua b/official/c26439287.lua index 8624c73e12..ebcdcc7071 100644 --- a/official/c26439287.lua +++ b/official/c26439287.lua @@ -1,4 +1,5 @@ --プロト・サイバー・ドラゴン +--Proto-Cyber Dragon local s,id=GetID() function s.initial_effect(c) --code @@ -9,4 +10,4 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c26443791.lua b/official/c26443791.lua index 56cf33cc85..48cb3874e8 100644 --- a/official/c26443791.lua +++ b/official/c26443791.lua @@ -38,7 +38,7 @@ function s.cfilter(c) return c:IsRace(RACE_INSECT) and c:IsMonster() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return #g>0 and g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==#g end Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -57,7 +57,7 @@ function s.op(tc,c,atk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -65,7 +65,7 @@ function s.op(tc,c,atk) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return rp==1-tp and c:IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(11) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2645637.lua b/official/c2645637.lua index 8519078aca..7183ad44e4 100644 --- a/official/c2645637.lua +++ b/official/c2645637.lua @@ -69,4 +69,4 @@ end function s.atkchaincon(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return loc==LOCATION_GRAVE and re:IsMonsterEffect() -end +end \ No newline at end of file diff --git a/official/c2648201.lua b/official/c2648201.lua index e77e5d19e2..4708ba8bf1 100644 --- a/official/c2648201.lua +++ b/official/c2648201.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.eqcon) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) @@ -27,12 +27,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.eqcon(e) return e:GetHandler():CheckUniqueOnField(e:GetHandlerPlayer()) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -59,7 +59,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -69,7 +69,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_LOST_TARGET) and c:IsPreviousControler(tp) and ec:IsReason(REASON_DESTROY) and ec:GetReasonPlayer()==1-tp end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UTOPIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26493435.lua b/official/c26493435.lua index 98eef79bd4..b7b6582f93 100644 --- a/official/c26493435.lua +++ b/official/c26493435.lua @@ -1,14 +1,15 @@ --希望郷-オノマトピア- --Onomatopia local s,id=GetID() +local COUNTER_HI_FIVE=0x30 function s.initial_effect(c) - c:EnableCounterPermit(0x30) + c:EnableCounterPermit(COUNTER_HI_FIVE) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --add counter + --Place 1 Hi-Five the Sky Counter on this card local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_DELAY) @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetCondition(s.ctcon) e2:SetOperation(s.ctop) c:RegisterEffect(e2) - --atk/def + --Monsters you control gain 200 ATK and DEF for each Hi-Five the Sky Counter on this card local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_UPDATE_ATTACK) @@ -28,7 +29,7 @@ function s.initial_effect(c) local e4=e3:Clone() e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e4) - --special summon + --Special Summon 1 "Zubaba", "Gagaga", "Gogogo", or "Dododo" monster from your Deck local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,0)) e5:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -40,27 +41,26 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x107f,0x8f,0x54,0x59,0x82} -s.counter_place_list={0x30} +s.listed_series={SET_UTOPIA,SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO} +s.counter_place_list={COUNTER_HI_FIVE} function s.ctfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and c:IsControler(tp) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.ctfilter,1,nil,tp) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():AddCounter(0x30,1) + e:GetHandler():AddCounter(COUNTER_HI_FIVE,1) end function s.val(e,c) - return e:GetHandler():GetCounter(0x30)*200 + return e:GetHandler():GetCounter(COUNTER_HI_FIVE)*200 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x30,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x30,2,REASON_COST) + if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_HI_FIVE,2,REASON_COST) end + e:GetHandler():RemoveCounter(tp,COUNTER_HI_FIVE,2,REASON_COST) end function s.filter(c,e,tp) - return (c:IsSetCard(0x8f) or c:IsSetCard(0x54) or c:IsSetCard(0x59) or c:IsSetCard(0x82)) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26495087.lua b/official/c26495087.lua index 04ec3d5597..0fac4b84e3 100644 --- a/official/c26495087.lua +++ b/official/c26495087.lua @@ -1,4 +1,5 @@ --ヴァンパイア・レディ +--Vampire Lady local s,id=GetID() function s.initial_effect(c) --to grave diff --git a/official/c26509612.lua b/official/c26509612.lua index 7ba8ef08da..9d75ce105d 100644 --- a/official/c26509612.lua +++ b/official/c26509612.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end s.listed_names={74711057} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,74711057),tp,LOCATION_MZONE,0,1,nil) @@ -26,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_MUST_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTarget(s.attg) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) @@ -38,4 +38,4 @@ function s.attg(e,c) end function s.attg2(e,c) return c:IsCode(74711057) -end +end \ No newline at end of file diff --git a/official/c26517393.lua b/official/c26517393.lua index ce54f59626..c6b9e5a38e 100644 --- a/official/c26517393.lua +++ b/official/c26517393.lua @@ -1,4 +1,5 @@ --裏風の精霊 +--Spirit of the Fall Wind local s,id=GetID() function s.initial_effect(c) --search @@ -25,4 +26,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c26533075.lua b/official/c26533075.lua index 116b4d5b6f..13a784d9a2 100644 --- a/official/c26533075.lua +++ b/official/c26533075.lua @@ -1,4 +1,5 @@ --セキュリティー・ボール +--Security Orb local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -40,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_DESTROY)~=0 and rp~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return (r&REASON_DESTROY)~=0 and rp~=tp and re:IsSpellTrapEffect() and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) end @@ -56,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26534688.lua b/official/c26534688.lua index aac7e077a4..c9f43a8af2 100644 --- a/official/c26534688.lua +++ b/official/c26534688.lua @@ -1,5 +1,5 @@ --深海の都 マガラニカ ---Magallanica, the Deep Sea City +--Magellanica, the Deep Sea City --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -63,7 +63,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(lv) tc:RegisterEffect(e1) end @@ -72,7 +72,7 @@ function s.rmcfilter(c,tp) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_SYNCHRO) and c:GetSummonPlayer()==tp end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and Duel.GetTurnPlayer()==tp and eg:IsExists(s.rmcfilter,1,nil,tp) + return Duel.IsMainPhase() and Duel.IsTurnPlayer(tp) and eg:IsExists(s.rmcfilter,1,nil,tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end @@ -97,9 +97,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -113,4 +113,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoHand(tc,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26556950.lua b/official/c26556950.lua index 5bcec6ed4a..61522cd59e 100644 --- a/official/c26556950.lua +++ b/official/c26556950.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) @@ -51,7 +51,7 @@ function s.defval(e,c) end function s.regop(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -75,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,c:GetDefense()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26557451.lua b/official/c26557451.lua index 65014e7393..2430234698 100644 --- a/official/c26557451.lua +++ b/official/c26557451.lua @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c26561172.lua b/official/c26561172.lua index 6d6b98b4c6..c25ae00232 100644 --- a/official/c26561172.lua +++ b/official/c26561172.lua @@ -1,9 +1,9 @@ --- 変異体ミュートリア --- Myutant Mutator --- Scripted by Hatter +--変異体ミュートリア +--Myutant Mutant +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special Summon from hand or Deck + --Special Summon from hand or Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x159} +s.listed_series={SET_MYUTANT} s.listed_names={CARD_MYUTANT_BEAST,CARD_MYUTANT_MIST,CARD_MYUTANT_ARSENAL} function s.hspcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x159),tp,LOCATION_ONFIELD,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MYUTANT),tp,LOCATION_ONFIELD,0,1,nil) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -53,30 +53,30 @@ function s.getspcode(c) return type&TYPE_TRAP==TYPE_TRAP and CARD_MYUTANT_ARSENAL or -1 end function s.spcostfilter(c,e,tp) - return c:IsSetCard(0x159) and c:IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,c,e,tp,s.getspcode(c)) + return c:IsSetCard(SET_MYUTANT) and c:IsAbleToRemoveAsCost() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,c,e,tp,s.getspcode(c)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp) end + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) end Duel.Release(c,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,c,e,tp) + local rg=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,c,e,tp) e:SetLabel(s.getspcode(rg:GetFirst())) Duel.Remove(rg,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not code then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,code) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,code) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then local atk=g:GetFirst():GetBaseAttack() if atk>0 then Duel.SetLP(tp,Duel.GetLP(tp)-atk) end end -end +end \ No newline at end of file diff --git a/official/c26563200.lua b/official/c26563200.lua index 78670f0e5b..a80a4b8ffb 100644 --- a/official/c26563200.lua +++ b/official/c26563200.lua @@ -1,4 +1,5 @@ --弦魔人ムズムズリズム +--Muzurhythm the String Djinn local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -15,20 +16,16 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x6d} +s.listed_series={SET_DJINN} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() if ph~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local tc=Duel.GetAttacker() - return tc:IsControler(tp) and tc:IsRelateToBattle() and tc:IsSetCard(0x6d) and tc:IsType(TYPE_XYZ) and Duel.GetAttackTarget()~=nil -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return tc:IsControler(tp) and tc:IsRelateToBattle() and tc:IsSetCard(SET_DJINN) and tc:IsType(TYPE_XYZ) and Duel.GetAttackTarget()~=nil end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() @@ -37,8 +34,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c2656842.lua b/official/c2656842.lua index 5d470c187b..90dafe2d20 100644 --- a/official/c2656842.lua +++ b/official/c2656842.lua @@ -1,10 +1,9 @@ --- +--騎甲虫スカウト・バギー --Beetrooper Scout Buggy --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) - --Can only Special Summon Insect monsters. + --You cannot Special Summon monsters, except Insect monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) @@ -13,7 +12,7 @@ function s.initial_effect(c) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c,_,_,_)return not c:IsRace(RACE_INSECT)end) c:RegisterEffect(e1) - --Special Summon. + --Special Summon 1 "Beetrooper Scout Buggy" from your hand, Deck, or GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -34,12 +33,12 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26570480.lua b/official/c26570480.lua index d8fcad6a5c..14f1bf8b4c 100644 --- a/official/c26570480.lua +++ b/official/c26570480.lua @@ -1,6 +1,5 @@ --マドルチェ・ピョコレート --Madolche Chickolates - local s,id=GetID() function s.initial_effect(c) --When sent to GY, shuffle itself into deck @@ -26,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -37,14 +36,14 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.cfilter(c,tp) local np=c:GetPosition() local pp=c:GetPreviousPosition() return ((np==POS_FACEUP_DEFENSE and pp==POS_FACEUP_ATTACK) or ((pp&POS_DEFENSE)~=0 and np==POS_FACEUP_ATTACK)) - and c:IsControler(tp) and c:IsSetCard(0x71) + and c:IsControler(tp) and c:IsSetCard(SET_MADOLCHE) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -63,25 +62,25 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and not tc:IsPosition(POS_FACEUP_DEFENSE) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) - if not tc:IsSetCard(0x71) then + if not tc:IsSetCard(SET_MADOLCHE) then --Cannot attack local e1=Effect.CreateEffect(c) e1:SetDescription(3206) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Negate its effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end diff --git a/official/c26577155.lua b/official/c26577155.lua index 2700a4b83c..b4f327c15b 100644 --- a/official/c26577155.lua +++ b/official/c26577155.lua @@ -1,7 +1,6 @@ --ドラグニティーレムス --Dragunity Remus --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Cannot be used as synchro material, except for "Dragunity" synchro monsters @@ -18,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -35,16 +34,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={62265044} -s.listed_series={0x29} - +s.listed_series={SET_DRAGUNITY} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x29) -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) + return not c:IsSetCard(SET_DRAGUNITY) end function s.thfilter(c) return c:IsCode(62265044) and c:IsAbleToHand() @@ -61,7 +54,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x29),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end @@ -76,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then --Banish it if it leaves the field @@ -85,7 +78,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c26582143.lua b/official/c26582143.lua index 2df3d54bc7..454a648198 100644 --- a/official/c26582143.lua +++ b/official/c26582143.lua @@ -8,10 +8,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) - e1:SetCost(s.deckspcost) + e1:SetCost(Cost.SelfToDeck) e1:SetTarget(s.decksptg) e1:SetOperation(s.deckspop) c:RegisterEffect(e1) @@ -41,11 +41,6 @@ function s.initial_effect(c) end s.listed_series={SET_GLADIATOR_BEAST,SET_GLADIATOR} s.listed_names={id} -function s.deckspcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) -end function s.deckspfilter(c,e,tp) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) and not c:IsCode(id) end diff --git a/official/c26586849.lua b/official/c26586849.lua index 8126bfaed2..4de4dcc26b 100644 --- a/official/c26586849.lua +++ b/official/c26586849.lua @@ -1,4 +1,5 @@ --王宮の牢獄 +--Royal Prison local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_GRAVE) and c:IsMonster() -end +end \ No newline at end of file diff --git a/official/c26631975.lua b/official/c26631975.lua index 1e6bdc1d67..5d221135f1 100644 --- a/official/c26631975.lua +++ b/official/c26631975.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x175),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DINOMORPHIA),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function()return Duel.IsMainPhase() end) @@ -17,17 +17,17 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_MZONE) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,14 +44,14 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c26638543.lua b/official/c26638543.lua index cf2b04ee3a..c933d2106d 100644 --- a/official/c26638543.lua +++ b/official/c26638543.lua @@ -1,4 +1,5 @@ --メトロンノーム +--Metrognome local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -61,7 +62,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(tc:GetLeftScale()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -93,4 +94,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26640671.lua b/official/c26640671.lua index 4a9555c3a1..4e2c6e59bc 100644 --- a/official/c26640671.lua +++ b/official/c26640671.lua @@ -1,4 +1,5 @@ --蜘蛛の領域 +--Spiders' Lair local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,7 +27,7 @@ function s.initial_effect(c) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetRange(LOCATION_SZONE) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetCountLimit(1) e4:SetOperation(s.posop) c:RegisterEffect(e4) @@ -58,9 +59,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if d and d:IsControler(1-tp) and e:GetHandler():IsHasCardTarget(a) then - d:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + d:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) elseif d and a:IsControler(1-tp) and e:GetHandler():IsHasCardTarget(d) then - a:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + a:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.pfilter(c) @@ -71,9 +72,9 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) local tc=g:GetFirst() for tc in aux.Next(g) do - tc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.postg(e,c) return c:GetFlagEffect(id+1)~=0 -end +end \ No newline at end of file diff --git a/official/c26647858.lua b/official/c26647858.lua index 50335d383b..8ce325bc57 100644 --- a/official/c26647858.lua +++ b/official/c26647858.lua @@ -1,4 +1,5 @@ --ヒーロー・ヘイロー +--Hero Ring local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e1:SetValue(s.atval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -53,4 +54,4 @@ function s.eqlimit(e,c) end function s.atval(e,c) return c:IsAttackAbove(1900) and not c:IsImmuneToEffect(e) -end +end \ No newline at end of file diff --git a/official/c2665273.lua b/official/c2665273.lua index aa28fedcd5..86648dac87 100644 --- a/official/c2665273.lua +++ b/official/c2665273.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -60,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,tc,true) end end -end +end \ No newline at end of file diff --git a/official/c26655293.lua b/official/c26655293.lua index 09228eed5b..7f891301e7 100644 --- a/official/c26655293.lua +++ b/official/c26655293.lua @@ -1,5 +1,5 @@ --マグナヴァレット・ドラゴン ---Magnavullet Dragon +--Magnarokket Dragon local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} s.listed_names={id} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -50,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -60,12 +60,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c26669055.lua b/official/c26669055.lua index 7e83681e74..8acad53d6c 100644 --- a/official/c26669055.lua +++ b/official/c26669055.lua @@ -1,4 +1,5 @@ --静寂の聖者 +--Sage of Silence local s,id=GetID() function s.initial_effect(c) --destroy @@ -19,12 +20,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.accon) e1:SetValue(s.aclimit) e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.accon(e) return e:GetLabel()~=Duel.GetTurnCount() end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c26674724.lua b/official/c26674724.lua index a67d8c9495..1b9b691fbe 100644 --- a/official/c26674724.lua +++ b/official/c26674724.lua @@ -1,4 +1,5 @@ --ブリューナクの影霊衣 +--Nekroz of Brionac local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -32,17 +33,13 @@ function s.initial_effect(c) e3:SetOperation(s.tdop) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} s.listed_names={id} function s.mat_filter(c) return not c:IsCode(id) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.thfilter(c) - return c:IsSetCard(0xb4) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -71,4 +68,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26684111.lua b/official/c26684111.lua index 20a5161752..079e4d098d 100644 --- a/official/c26684111.lua +++ b/official/c26684111.lua @@ -1,91 +1,64 @@ --- 天空の聖水 --- The Sacred Water of the Sky --- Scripted by Hatter +--天空の聖水 +--The Sacred Waters in the Sky +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate "The Sanctuary in the Sky" or search a monster that lists it + --Activate 1 "The Sanctuary in the Sky" directly from your Deck, or add 1 monster that mentions "The Sanctuary in the Sky" from your Deck to your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetTarget(s.acthtg) - e1:SetOperation(s.acthop) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) c:RegisterEffect(e1) - -- Banish self from GY to replace destruction + --If your monster that mentions "The Sanctuary in the Sky" would be destroyed by battle, you can banish this card from your GY instead local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.reptg) - e2:SetValue(s.repval) - e2:SetOperation(s.repop) + e2:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end) + e2:SetOperation(function(e) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end) c:RegisterEffect(e2) end -s.listed_series={0x44,0x171} s.listed_names={CARD_SANCTUARY_SKY} -function s.acfilter(c,tp) - return c:IsCode(CARD_SANCTUARY_SKY) and c:GetActivateEffect() - and c:GetActivateEffect():IsActivatable(tp,true,true) +s.listed_series={SET_HYPERION,SET_THE_AGENT} +function s.actthfilter(c,tp) + return (c:IsCode(CARD_SANCTUARY_SKY) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)) + or (c:ListsCode(CARD_SANCTUARY_SKY) and c:IsMonster() and c:IsAbleToHand()) end -function s.thfilter(c) - return c:IsMonster() and c:ListsCode(CARD_SANCTUARY_SKY) and c:IsAbleToHand() +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.actthfilter,tp,LOCATION_DECK,0,1,nil,tp) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,500) end -function s.acthtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - return Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_DECK,0,1,nil,tp) - or Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) +function s.activate(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) + local sc=Duel.SelectMatchingCard(tp,s.actthfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() + if not sc then return end + local gainlp_chk=false + if sc:IsCode(CARD_SANCTUARY_SKY) then + gainlp_chk=Duel.ActivateFieldSpell(sc,e,tp,eg,ep,ev,re,r,rp) + else + gainlp_chk=Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 + if gainlp_chk then Duel.ConfirmCards(1-tp,sc) end end -end -function s.lpfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x44) or c:IsSetCard(0x171)) -end -function s.acthop(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_DECK,0,1,nil,tp) - local th=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) - -- Choose effect to apply - local op - if ac and th then - op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) - elseif ac then - op=Duel.SelectOption(tp,aux.Stringid(id,0)) - elseif th then - op=Duel.SelectOption(tp,aux.Stringid(id,1))+1 - end - -- Apply chosen effect - local gainlp=nil - if op==0 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,s.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() - if tc then gainlp=Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) end - elseif op==1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - gainlp=Duel.SendtoHand(g,nil,REASON_EFFECT)>0 - Duel.ConfirmCards(1-tp,g) - end - end - -- Gain LP - if gainlp and (Duel.IsEnvironment(CARD_SANCTUARY_SKY) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),0,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)) - and Duel.IsExistingMatchingCard(s.lpfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + if not (gainlp_chk and (Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),0,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) + or Duel.IsEnvironment(CARD_SANCTUARY_SKY))) then return end + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,{SET_HYPERION,SET_THE_AGENT}),tp,LOCATION_MZONE,0,nil) + if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() - Duel.Recover(tp,Duel.GetMatchingGroupCount(s.lpfilter,tp,LOCATION_MZONE,0,nil)*500,REASON_EFFECT) + Duel.Recover(tp,ct*500,REASON_EFFECT) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsReason(REASON_BATTLE) and c:ListsCode(CARD_SANCTUARY_SKY) + return c:ListsCode(CARD_SANCTUARY_SKY) and c:IsReason(REASON_BATTLE) and c:IsControler(tp) and c:IsFaceup() end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end - return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) -end -function s.repval(e,c) - return s.repfilter(c,e:GetHandlerPlayer()) -end -function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) + local c=e:GetHandler() + if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end + return Duel.SelectEffectYesNo(tp,c,96) end diff --git a/official/c26700718.lua b/official/c26700718.lua index 4c98a89bdf..a236111242 100644 --- a/official/c26700718.lua +++ b/official/c26700718.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c26701483.lua b/official/c26701483.lua index 12ab69f89d..69bed66cde 100644 --- a/official/c26701483.lua +++ b/official/c26701483.lua @@ -1,4 +1,5 @@ --カードエクスクルーダー +--Card Ejector local s,id=GetID() function s.initial_effect(c) --remove @@ -17,10 +18,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:GetControler()~=tp and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:GetControler()~=tp and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -28,4 +29,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26704411.lua b/official/c26704411.lua index b4bbf30c7b..ac9f778315 100644 --- a/official/c26704411.lua +++ b/official/c26704411.lua @@ -1,4 +1,5 @@ --魔轟神獣コカトル +--The Fabled Kokkator local s,id=GetID() function s.initial_effect(c) --draw @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.costfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -31,4 +32,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26708437.lua b/official/c26708437.lua index 9789bc5b1e..5c3d0f50ee 100644 --- a/official/c26708437.lua +++ b/official/c26708437.lua @@ -1,4 +1,5 @@ --エクシーズ・リボーン +--Xyz Reborn local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) c:CancelToGrave() Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c2671330.lua b/official/c2671330.lua index 652cfbe47f..8ae04b64e7 100644 --- a/official/c2671330.lua +++ b/official/c2671330.lua @@ -26,4 +26,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetLabelObject():IsRelateToBattle() then Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26722601.lua b/official/c26722601.lua index 76f0d79dd8..273488af13 100644 --- a/official/c26722601.lua +++ b/official/c26722601.lua @@ -10,21 +10,21 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.sumop(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() local c=e:GetHandler() - if ec~=e:GetHandler() and ec:IsSetCard(0x100a) and ec:IsSummonType(SUMMON_TYPE_TRIBUTE) then + if ec~=e:GetHandler() and ec:IsSetCard(SET_STEELSWARM) and ec:IsTributeSummoned() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetDescription(aux.Stringid(id,0)) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_EXTRA_SET_COUNT) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c26725158.lua b/official/c26725158.lua index 8fd1d0b76f..6abc46ae85 100644 --- a/official/c26725158.lua +++ b/official/c26725158.lua @@ -1,4 +1,5 @@ --悪魔払い +--Exile of the Wicked local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26732909.lua b/official/c26732909.lua index 8976a5527d..7fb11e6dfe 100644 --- a/official/c26732909.lua +++ b/official/c26732909.lua @@ -1,4 +1,5 @@ --魔導教士 システィ +--Justice of Prophecy local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,12 +17,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e)) + return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:GetHandler():IsSetCard(SET_SPELLBOOK)) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 and e:GetHandler():IsAbleToRemoveAsCost() end @@ -31,7 +32,7 @@ function s.filter1(c) return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() end function s.filter2(c) - return c:IsSpell() and c:IsSetCard(0x106e) and c:IsAbleToHand() + return c:IsSpell() and c:IsSetCard(SET_SPELLBOOK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil) @@ -50,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg1) end -end +end \ No newline at end of file diff --git a/official/c2674965.lua b/official/c2674965.lua index 8d38d4892c..83e8526b62 100644 --- a/official/c2674965.lua +++ b/official/c2674965.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_FZONE) e1:SetCountLimit(1) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -43,10 +43,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_ARGOSTARS} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.thfilter(c) return c:IsSetCard(SET_ARGOSTARS) and c:IsFaceup() and c:IsAbleToHand() end diff --git a/official/c26773909.lua b/official/c26773909.lua index a87a86366a..e1a2a88444 100644 --- a/official/c26773909.lua +++ b/official/c26773909.lua @@ -1,7 +1,6 @@ --才呼粉身 --Psychic Fervor --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,12 +26,11 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 and Duel.GetAttackTarget()==nil then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.filter(c,tp) return c:IsFaceup() and c:GetAttack()0 then g:KeepAlive() @@ -96,4 +95,4 @@ function s.rmvop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c26885836.lua b/official/c26885836.lua index 04177536d6..f283959840 100644 --- a/official/c26885836.lua +++ b/official/c26885836.lua @@ -41,7 +41,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -55,4 +55,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return e:GetOwner()==c -end +end \ No newline at end of file diff --git a/official/c26889158.lua b/official/c26889158.lua index 1c0761f32f..e60888dd83 100644 --- a/official/c26889158.lua +++ b/official/c26889158.lua @@ -33,11 +33,11 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} s.listed_names={id} --If a "Salamangreat" monster, besides itself, is sent to GY function s.cfilter(c,tp) - return c:IsSetCard(0x119) and c:IsMonster() and not c:IsCode(id) and c:IsControler(tp) + return c:IsSetCard(SET_SALAMANGREAT) and c:IsMonster() and not c:IsCode(id) and c:IsControler(tp) end --If it ever happened function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Salamangreat" card to send to GY, besides itself function s.tgfilter(c) - return c:IsSetCard(0x119) and c:IsAbleToGrave() and not c:IsCode(id) + return c:IsSetCard(SET_SALAMANGREAT) and c:IsAbleToGrave() and not c:IsCode(id) end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -71,4 +71,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c269012.lua b/official/c269012.lua index 8206a16f91..8ce13305d5 100644 --- a/official/c269012.lua +++ b/official/c269012.lua @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c26902560.lua b/official/c26902560.lua index 9cccad4f21..235dc53399 100644 --- a/official/c26902560.lua +++ b/official/c26902560.lua @@ -1,4 +1,5 @@ --融合賢者 +--Fusion Sage local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c26905245.lua b/official/c26905245.lua index e840d7187f..73d48f94e2 100644 --- a/official/c26905245.lua +++ b/official/c26905245.lua @@ -1,4 +1,5 @@ --メタル・リフレクト・スライム +--Metal Reflect Slime local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,22 +14,22 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) then return end - c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,3000,10,RACE_AQUA,ATTRIBUTE_WATER) then return end + c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) c:AddMonsterAttributeComplete() --cannot attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c26914168.lua b/official/c26914168.lua index ce6c02f426..1b3600061d 100644 --- a/official/c26914168.lua +++ b/official/c26914168.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCondition(s.con) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfToGrave) e2:SetOperation(s.aop) c:RegisterEffect(e2) end @@ -43,12 +43,8 @@ function s.con(e,tp,eg,ep,ev,re,r,rp) if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsAttribute(ATTRIBUTE_DARK) and a:IsRelateToBattle()) - or (d:GetControler()==tp and d:IsAttribute(ATTRIBUTE_DARK) and d:IsRelateToBattle())) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return d~=nil and d:IsFaceup() and ((a:IsControler(tp) and a:IsAttribute(ATTRIBUTE_DARK) and a:IsRelateToBattle()) + or (d:IsControler(tp) and d:IsAttribute(ATTRIBUTE_DARK) and d:IsRelateToBattle())) end function s.aop(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() @@ -58,12 +54,12 @@ function s.aop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - if a:GetControler()==tp then + e1:SetReset(RESETS_STANDARD_PHASE_END) + if a:IsControler(tp) then e1:SetValue(-d:GetAttack()) d:RegisterEffect(e1) else e1:SetValue(-a:GetAttack()) a:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c26920296.lua b/official/c26920296.lua index 33992a6763..b546492119 100644 --- a/official/c26920296.lua +++ b/official/c26920296.lua @@ -51,7 +51,7 @@ function s.cfilter(c,type) return c:IsFaceup() and c:IsType(type) end function s.drcfilter(c,tp) - return c:IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) and c:IsMonster() and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE) and c:IsMonster() and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.drcfilter,1,nil,tp) diff --git a/official/c26932788.lua b/official/c26932788.lua index 6147e1a350..508469bc1b 100644 --- a/official/c26932788.lua +++ b/official/c26932788.lua @@ -1,4 +1,5 @@ --ジャベリンビートル +--Javelin Beetle local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c2694423.lua b/official/c2694423.lua index f933882518..fad0464a6e 100644 --- a/official/c2694423.lua +++ b/official/c2694423.lua @@ -25,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c26949946.lua b/official/c26949946.lua index b04a5065c5..78e8d99bb3 100644 --- a/official/c26949946.lua +++ b/official/c26949946.lua @@ -1,8 +1,9 @@ --幻獣機ヤクルスラーン +--Mecha Phantom Beast Jaculuslan local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x101b),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x101b),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MECHA_PHANTOM_BEAST),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_MECHA_PHANTOM_BEAST),1,99) c:EnableReviveLimit() --handes local e1=Effect.CreateEffect(c) @@ -38,10 +39,10 @@ function s.initial_effect(c) e4:SetOperation(s.setop) c:RegisterEffect(e4) end -s.listed_series={0x101b} +s.listed_series={SET_MECHA_PHANTOM_BEAST} s.listed_names={TOKEN_MECHA_PHANTOM_BEAST} function s.hdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsCode,1,false,nil,nil,TOKEN_MECHA_PHANTOM_BEAST) @@ -59,17 +60,17 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then local sg=g:RandomSelect(1-tp,e:GetLabel()) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end end function s.indtg(e,c) - return c:IsSetCard(0x101b) and c~=e:GetHandler() + return c:IsSetCard(SET_MECHA_PHANTOM_BEAST) and c~=e:GetHandler() end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and e:GetHandler():IsPreviousControler(tp) end function s.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsSSetable() + return c:IsQuickPlaySpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -81,4 +82,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c269510.lua b/official/c269510.lua index aa380492a2..67157854f5 100644 --- a/official/c269510.lua +++ b/official/c269510.lua @@ -85,7 +85,7 @@ function s.cfilter(c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)>1 - and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_CYBERSE) + and re:IsMonsterEffect() and re:GetHandler():IsRace(RACE_CYBERSE) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) @@ -95,4 +95,4 @@ function s.limcon(e) end function s.atlimit(e,c) return c:IsFaceup() and c:IsRace(RACE_CYBERSE) -end +end \ No newline at end of file diff --git a/official/c26956670.lua b/official/c26956670.lua index 7fc285a6e8..24e4370faf 100644 --- a/official/c26956670.lua +++ b/official/c26956670.lua @@ -1,4 +1,5 @@ --化石岩の解放 +--Release from Stone local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,7 +31,7 @@ function s.filter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_REMOVED and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -58,4 +59,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c26964762.lua b/official/c26964762.lua index 2a3b5ed3b8..0154fb097b 100644 --- a/official/c26964762.lua +++ b/official/c26964762.lua @@ -1,4 +1,5 @@ --D-HERO ダークエンジェル +--Destiny HERO - Dark Angel local s,id=GetID() function s.initial_effect(c) --special summon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.deckcon) e3:SetCost(s.deckcost) @@ -33,16 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.deckop) c:RegisterEffect(e3) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0xc008) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,SET_DESTINY_HERO) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -59,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if rp==tp and re:IsActiveType(TYPE_SPELL) then + if rp==tp and re:IsSpellEffect() then local rc=re:GetHandler() if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) @@ -67,10 +64,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.deckcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter(c) - return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsAbleToRemoveAsCost() end function s.deckcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -82,7 +79,7 @@ function s.deckcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) - return c:GetType()==TYPE_SPELL + return c:IsNormalSpell() end function s.decktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 @@ -105,4 +102,4 @@ function s.deckop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc2,0) Duel.ConfirmDecktop(1-tp,1) end -end +end \ No newline at end of file diff --git a/official/c26973555.lua b/official/c26973555.lua index d6547c8d9b..195ddbf9c5 100644 --- a/official/c26973555.lua +++ b/official/c26973555.lua @@ -1,5 +1,5 @@ --FNo.0 未来龍皇ホープ ---Number F0: Utopic Future Dragon +--Number F0: Utopic Draco Future --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.discon) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.distg) e4:SetOperation(s.disop) c:RegisterEffect(e4) @@ -62,4 +62,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.GetControl(rc,tp) end -end +end \ No newline at end of file diff --git a/official/c26988374.lua b/official/c26988374.lua index 0d80db8788..a602d85698 100644 --- a/official/c26988374.lua +++ b/official/c26988374.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.damcon) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c26993374.lua b/official/c26993374.lua index dc2c004d4c..57b34dc323 100644 --- a/official/c26993374.lua +++ b/official/c26993374.lua @@ -1,4 +1,5 @@ --X-セイバー ウルズ +--X-Saber Uruz local s,id=GetID() function s.initial_effect(c) --to deck @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCondition(s.tdcon) - e1:SetCost(s.tdcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) @@ -18,10 +19,6 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(t) return aux.bdogcon(e,tp,eg,ep,ev,re,r,rp) end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) local t=e:GetLabelObject() if chk==0 then return t:IsAbleToDeck() end @@ -31,6 +28,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27001740.lua b/official/c27001740.lua index de3f54b382..26337d92ff 100644 --- a/official/c27001740.lua +++ b/official/c27001740.lua @@ -31,4 +31,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 then return end Duel.SendtoDeck(tg,tp,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27004302.lua b/official/c27004302.lua index 750aa647c2..ae79764f82 100644 --- a/official/c27004302.lua +++ b/official/c27004302.lua @@ -1,4 +1,5 @@ --ジェムレシス +--Gem-Armadillo local s,id=GetID() function s.initial_effect(c) --search @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.filter(c) - return c:IsSetCard(0x1047) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c27012990.lua b/official/c27012990.lua index 6d02db1d74..a83e6a978c 100644 --- a/official/c27012990.lua +++ b/official/c27012990.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) @@ -25,9 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_MARINCESS} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c,tp) return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_MARINCESS) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) @@ -48,7 +45,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabelObject(g) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) if Duel.IsPhase(PHASE_STANDBY) then e1:SetLabel(Duel.GetTurnCount()) end e1:SetLabelObject(g) e1:SetCountLimit(1) diff --git a/official/c27015862.lua b/official/c27015862.lua index 31cc00944c..46bf7cc5d4 100644 --- a/official/c27015862.lua +++ b/official/c27015862.lua @@ -84,7 +84,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c27024795.lua b/official/c27024795.lua index 9b482604a7..ecad871a1c 100644 --- a/official/c27024795.lua +++ b/official/c27024795.lua @@ -25,35 +25,35 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e2:SetCondition(s.spcon2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x42,0x4b} +s.listed_series={SET_NORDIC,SET_AESIR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return #eg==1 and eg:IsContains(e:GetHandler()) and r&REASON_EFFECT>0 and re and re:IsActiveType(TYPE_LINK) and re:GetHandler():IsSetCard(0x42) + return #eg==1 and eg:IsContains(e:GetHandler()) and r&REASON_EFFECT>0 and re and re:IsActiveType(TYPE_LINK) and re:GetHandler():IsSetCard(SET_NORDIC) end function s.matfilter(c) - return c:IsSetCard(0x42) and c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) and c:IsLevelAbove(1) + return c:IsSetCard(SET_NORDIC) and c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) and c:IsLevelAbove(1) end function s.spcheck(sg,e,tp,mg) return #sg==3 and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)==2 and sg:GetSum(Card.GetLevel)==10 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg) end function s.spfilter(c,e,tp,mg) - return c:IsSetCard(0x4b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not mg or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) + return c:IsSetCard(SET_AESIR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not mg or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_DECK|LOCATION_MZONE,0,nil) return aux.SelectUnselectGroup(g,e,tp,3,3,s.spcheck,0) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_DECK+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_DECK|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_DECK|LOCATION_MZONE,0,nil) local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.spcheck,1,tp,HINTMSG_TOGRAVE) if #rg==3 and Duel.SendtoGrave(rg,REASON_EFFECT)==3 then Duel.BreakEffect() @@ -63,13 +63,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsPreviousSetCard(0x4b) and c:IsSetCard(0x4b) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_AESIR) and c:IsSetCard(SET_AESIR) and c:IsPreviousControler(tp) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter2(c,e,tp,rp) - return c:IsSetCard(0x4b) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AESIR) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c27036706.lua b/official/c27036706.lua index e0a5e15166..ef3f2fc605 100644 --- a/official/c27036706.lua +++ b/official/c27036706.lua @@ -22,18 +22,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x15b} +s.listed_series={SET_STARRY_KNIGHT} function s.ldlv7filter(c) return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) end function s.spcfilter(c,tp) - return (s.ldlv7filter(c) or c:IsSetCard(0x15b)) and c:IsFaceup() and c:IsAbleToHandAsCost() and not c:IsCode(id) + return (s.ldlv7filter(c) or c:IsSetCard(SET_STARRY_KNIGHT)) and c:IsFaceup() and c:IsAbleToHandAsCost() and not c:IsCode(id) and Duel.GetMZoneCount(tp,c)>0 end function s.spselfcost(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c27053506.lua b/official/c27053506.lua index b6b2f58b9e..d2cfadeeae 100644 --- a/official/c27053506.lua +++ b/official/c27053506.lua @@ -1,4 +1,5 @@ --仕込みマシンガン +--Secret Barrel local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,14 +13,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,0xe,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_HAND|LOCATION_ONFIELD,1,nil) end Duel.SetTargetPlayer(1-tp) - local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200 + local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND|LOCATION_ONFIELD,0)*200 Duel.SetTargetParam(dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local dam=Duel.GetFieldGroupCount(1-tp,0xe,0)*200 + local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND|LOCATION_ONFIELD,0)*200 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27062594.lua b/official/c27062594.lua index 5a29aac228..d9173a5d26 100644 --- a/official/c27062594.lua +++ b/official/c27062594.lua @@ -1,4 +1,5 @@ --運命の扉 +--The Door of Destiny local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -26,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() if not c:IsRelateToEffect(e) - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -36,24 +37,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCondition(s.damcon) e1:SetCost(s.damcost) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter(c) - return c:IsSetCard(0x107f) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_UTOPIA) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) local rg=Group.CreateGroup() repeat Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -79,7 +80,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c27068117.lua b/official/c27068117.lua index d77621fe57..d5c32ee2b3 100644 --- a/official/c27068117.lua +++ b/official/c27068117.lua @@ -1,4 +1,5 @@ --オーバーレイ・リジェネレート +--Overlay Regen local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) c:CancelToGrave() Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c27069566.lua b/official/c27069566.lua index b9bdc9ce5a..3520b7b3cc 100644 --- a/official/c27069566.lua +++ b/official/c27069566.lua @@ -1,5 +1,5 @@ --電脳堺凰-凰々 ---Datascape Phoenix - Fengfeng +--Virtual World Phoenix - Fanfan --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.rmvcost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.rmvtg) e1:SetOperation(s.rmvop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -30,11 +30,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x150} -function s.rmvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end +s.listed_series={SET_VIRTUAL_WORLD} function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) @@ -44,7 +40,7 @@ function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) g1:Merge(g2) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,2,0,LOCATION_ONFIELD|LOCATION_GRAVE) end function s.rmvop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) @@ -56,10 +52,10 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsSummonType(SUMMON_TYPE_XYZ) and rp==1-tp + and c:IsXyzSummoned() and rp==1-tp end function s.spfilter(c,e,tp) - return c:IsSetCard(0x150) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.rescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetRace)==1 and sg:GetClassCount(Card.GetAttribute)==1 @@ -80,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if sg and #sg==2 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27103517.lua b/official/c27103517.lua index f0f3769b4f..bb9012c27b 100644 --- a/official/c27103517.lua +++ b/official/c27103517.lua @@ -1,4 +1,5 @@ --邪神官チラム・サバク +--Wicked Acolyte Chilam Sabak local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -42,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_ADD_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c27104921.lua b/official/c27104921.lua index e33495fdb7..ffacc5c59e 100644 --- a/official/c27104921.lua +++ b/official/c27104921.lua @@ -1,19 +1,19 @@ --- 運命の囚人 --- Prisoner of Destiny --- Scripted by Hatter +--運命の囚人 +--Forge a New Future +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Allow counter placement and limit it to 3 + --Allow counter placement and limit it to 3 c:EnableCounterPermit(0x20b) c:SetCounterLimit(0x20b,3) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) e0:SetHintTiming(TIMING_SPSUMMON) e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e0) - -- Place counter and apply effect + --Place counter and apply effect local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_COUNTER+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) @@ -28,7 +28,7 @@ function s.initial_effect(c) end s.counter_place_list={0x20b} function s.ctconfilter(c) - return c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsLink(4) + return c:IsType(TYPE_LINK) and c:IsLinkSummoned() and c:IsLink(4) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.ctconfilter,1,nil) @@ -36,28 +36,28 @@ end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanAddCounter(0x20b,1) and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x20b) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not (c:IsRelateToEffect(e) and c:IsFaceup() and c:AddCounter(0x20b,1)) then return end local ct=c:GetCounter(0x20b) - -- Declare card name and negate effects + --Declare card name and negate effects if ct==1 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) local ac=Duel.AnnounceCard(tp) Duel.BreakEffect() - -- Negate effects + --Negate effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTarget(s.distg) e1:SetLabel(ac) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -65,13 +65,13 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.discon) e2:SetOperation(s.disop) e2:SetLabel(ac) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=e1:Clone() e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) Duel.RegisterEffect(e3,tp) - -- Special Summon from the GY + --Special Summon from the GY elseif ct==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spgyfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -80,7 +80,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.BreakEffect() Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) - -- Send self to the GY and Special Summon a Link monster + --Send self to the GY and Special Summon a Link monster elseif ct==3 and c:IsAbleToGrave() and Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(s.spexfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then diff --git a/official/c27107590.lua b/official/c27107590.lua index 263b242083..f845307bca 100644 --- a/official/c27107590.lua +++ b/official/c27107590.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x4a} +s.listed_series={SET_TIMELORD} function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -45,14 +45,10 @@ function s.sprcon(e,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function s.dtcon(e,c) - return c:IsSetCard(0x4a) -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return c:IsSetCard(SET_TIMELORD) end function s.thfilter(c) - return c:IsSetCard(0x4a) and c:IsMonster() and c:GetAttack()==0 and c:IsAbleToHand() + return c:IsSetCard(SET_TIMELORD) and c:IsMonster() and c:GetAttack()==0 and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -77,7 +73,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetLabelObject(e) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -85,7 +81,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return se~=e:GetLabelObject() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x4a) and c:IsMonster() and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_TIMELORD) and c:IsMonster() and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -99,4 +95,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27132350.lua b/official/c27132350.lua index 45079e9200..fbc5564b9f 100644 --- a/official/c27132350.lua +++ b/official/c27132350.lua @@ -1,4 +1,5 @@ --ファイヤーソーサラー +--Fire Sorcerer local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27134689.lua b/official/c27134689.lua index fb269755b0..48beabeea3 100644 --- a/official/c27134689.lua +++ b/official/c27134689.lua @@ -1,7 +1,8 @@ --マスター・オブ・OZ +--Master of Oz local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,42129512,78613627) -end +end \ No newline at end of file diff --git a/official/c27143874.lua b/official/c27143874.lua index ca39a2482b..c20d4affcf 100644 --- a/official/c27143874.lua +++ b/official/c27143874.lua @@ -1,4 +1,5 @@ --ダイナソーイング +--Dino-Sewing local s,id=GetID() function s.initial_effect(c) --indes @@ -31,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -43,4 +44,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():ResetEffect(RESET_DISABLE,RESET_EVENT) -end +end \ No newline at end of file diff --git a/official/c27170599.lua b/official/c27170599.lua index 471ffc9790..246abe730e 100644 --- a/official/c27170599.lua +++ b/official/c27170599.lua @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetCode(EVENT_PHASE|PHASE_END) + e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCountLimit(1) e4:SetLabel(fid) e4:SetLabelObject(tc) diff --git a/official/c27174286.lua b/official/c27174286.lua index 291f2adad8..70c204a18b 100644 --- a/official/c27174286.lua +++ b/official/c27174286.lua @@ -1,4 +1,5 @@ --異次元からの帰還 +--Return from the Different Dimension local s,id=GetID() function s.initial_effect(c) --activate @@ -34,7 +35,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() for tc in aux.Next(g) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -65,4 +66,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.rmfilter,nil,e:GetLabel()) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27178262.lua b/official/c27178262.lua index bc4283979f..da91a95745 100644 --- a/official/c27178262.lua +++ b/official/c27178262.lua @@ -1,4 +1,5 @@ --六武衆の理 +--Cunning of the Six Samurai local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.costfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -24,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27182739.lua b/official/c27182739.lua index 7bf2fac3c3..da126f712f 100644 --- a/official/c27182739.lua +++ b/official/c27182739.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) end -end +end \ No newline at end of file diff --git a/official/c27189308.lua b/official/c27189308.lua index e3fc4dd4a3..4efaabe093 100644 --- a/official/c27189308.lua +++ b/official/c27189308.lua @@ -1,4 +1,5 @@ --ぴよコッコ +--Cheepcheepcheep local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27191436.lua b/official/c27191436.lua index 2910c88c96..4817746c28 100644 --- a/official/c27191436.lua +++ b/official/c27191436.lua @@ -1,4 +1,5 @@ --バースト・リターン +--Burst Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} s.listed_names={58932615} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,58932615),tp,LOCATION_ONFIELD,0,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) and not c:IsCode(58932615) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) and not c:IsCode(58932615) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -27,4 +28,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27196937.lua b/official/c27196937.lua index aecbfc07ab..80b87cd726 100644 --- a/official/c27196937.lua +++ b/official/c27196937.lua @@ -1,4 +1,5 @@ --星屑の残光 +--Stardust Flash local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} function s.filter(c,e,tp) - return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STARDUST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27198001.lua b/official/c27198001.lua index e547f6dbd9..3e8b45c2e1 100644 --- a/official/c27198001.lua +++ b/official/c27198001.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -50,7 +50,7 @@ function s.pcon(e) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c27204311.lua b/official/c27204311.lua index 2aae455314..a32cd692f6 100644 --- a/official/c27204311.lua +++ b/official/c27204311.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_SUMMON+TIMING_SPSUMMON) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_SUMMON|TIMING_SPSUMMON) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) e1:SetTarget(s.target) diff --git a/official/c27207573.lua b/official/c27207573.lua index 9a54b0c9b6..d3cc525b83 100644 --- a/official/c27207573.lua +++ b/official/c27207573.lua @@ -1,4 +1,5 @@ --侵略の手段 +--Infestation Tool local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,18 +9,15 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x100a} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_STEELSWARM} function s.cfilter(c) - return c:IsSetCard(0x100a) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_STEELSWARM) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end @@ -28,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x100a) + return c:IsFaceup() and c:IsSetCard(SET_STEELSWARM) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -42,8 +40,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c27217742.lua b/official/c27217742.lua index 8f6a65586a..cb55d13670 100644 --- a/official/c27217742.lua +++ b/official/c27217742.lua @@ -1,4 +1,5 @@ --ONiサンダー +--Brohunder local s,id=GetID() function s.initial_effect(c) --search @@ -26,4 +27,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c27240101.lua b/official/c27240101.lua index f13ef38aa3..e7f1f8fb39 100644 --- a/official/c27240101.lua +++ b/official/c27240101.lua @@ -1,6 +1,5 @@ --キキナガシ風鳥 --Kikinagashi Fucho - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -22,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.indcost) + e2:SetCost(Cost.Detach(2)) e2:SetOperation(s.indop) e2:SetHintTiming(0,TIMING_BATTLE_START) c:RegisterEffect(e2) @@ -30,10 +29,6 @@ end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then @@ -44,7 +39,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Take no battle damage involving this card local e2=e1:Clone() diff --git a/official/c27243130.lua b/official/c27243130.lua index 21c52c7b26..85bf96636b 100644 --- a/official/c27243130.lua +++ b/official/c27243130.lua @@ -1,6 +1,5 @@ --禁じられた聖槍 --Forbidden Lance - local s,id=GetID() function s.initial_effect(c) --Targeted monster becomes unaffected by spells/traps @@ -10,14 +9,11 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -32,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-800) tc:RegisterEffect(e1) --Unaffected by spells/traps @@ -42,11 +38,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(s.efilter) tc:RegisterEffect(e2) end end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner() + return te:IsSpellTrapEffect() and te:GetOwner()~=e:GetOwner() end \ No newline at end of file diff --git a/official/c27268998.lua b/official/c27268998.lua index 1e4e9d2309..a72fa6d44f 100644 --- a/official/c27268998.lua +++ b/official/c27268998.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfRevealCost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) diff --git a/official/c27275398.lua b/official/c27275398.lua index 3d50031ace..e1a5002bcf 100644 --- a/official/c27275398.lua +++ b/official/c27275398.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) diff --git a/official/c27279764.lua b/official/c27279764.lua index 321e47bef8..0c3b657eee 100644 --- a/official/c27279764.lua +++ b/official/c27279764.lua @@ -1,5 +1,5 @@ --アポクリフォート・キラー ---Apoqliporth Towers +--Apoqliphort Towers local s,id=GetID() function s.initial_effect(c) --Cannot be Special Summoned @@ -23,7 +23,7 @@ function s.initial_effect(c) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE) e5:SetRange(LOCATION_MZONE) e5:SetCode(EFFECT_IMMUNE_EFFECT) - e5:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) end) + e5:SetCondition(function(e) return e:GetHandler():IsNormalSummoned() end) e5:SetValue(s.efilter) c:RegisterEffect(e5) --Decrease the ATK/DEF of Special Summoned monsters by 500 @@ -61,7 +61,7 @@ function s.efilter(e,te) end end function s.adtg(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE|LOCATION_HAND)>0 end diff --git a/official/c2729285.lua b/official/c2729285.lua index 3b927fb56a..3b485a2ec7 100644 --- a/official/c2729285.lua +++ b/official/c2729285.lua @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27308231.lua b/official/c27308231.lua index b287929f64..6a95d1521c 100644 --- a/official/c27308231.lua +++ b/official/c27308231.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) diff --git a/official/c27315304.lua b/official/c27315304.lua index a049b005c7..f1a84b4ff0 100644 --- a/official/c27315304.lua +++ b/official/c27315304.lua @@ -1,4 +1,5 @@ --ミスト・ウォーム +--Mist Wurm local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -17,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -32,4 +33,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2732323.lua b/official/c2732323.lua index 5e196906f5..25c01f0db9 100644 --- a/official/c2732323.lua +++ b/official/c2732323.lua @@ -32,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(a,tc) end end -end +end \ No newline at end of file diff --git a/official/c27331568.lua b/official/c27331568.lua index 70c741fa3e..c0a5c224b3 100644 --- a/official/c27331568.lua +++ b/official/c27331568.lua @@ -18,14 +18,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2093} +s.listed_series={SET_CYBER_ANGEL} function s.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end + if Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated() then return false end return true end --Defining cost function s.costfilter(c,tp) - return c:IsRitualMonster() and c:IsReleasable() and c:IsSetCard(0x2093) + return c:IsRitualMonster() and c:IsReleasable() and c:IsSetCard(SET_CYBER_ANGEL) and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,c) end --Check for LIGHT fairy monster @@ -49,12 +49,12 @@ end --Performing the effect of ATK/DEF change function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -65,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_BATTLE_START) e3:SetCondition(s.discon) e3:SetOperation(s.disop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end --Check if battling monster is special summoned from extra deck @@ -81,11 +81,11 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c27340877.lua b/official/c27340877.lua index 1b1d117747..55b76de74d 100644 --- a/official/c27340877.lua +++ b/official/c27340877.lua @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c27345070.lua b/official/c27345070.lua index 960c1fb056..29729f0285 100644 --- a/official/c27345070.lua +++ b/official/c27345070.lua @@ -12,16 +12,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_series={SET_VANQUISH_SOUL} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.tgfilter(c,e,tp,ft) return c:IsSetCard(SET_VANQUISH_SOUL) and c:IsMonster() and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))) @@ -48,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end, aux.Stringid(id,1) ) -end +end \ No newline at end of file diff --git a/official/c27346636.lua b/official/c27346636.lua index 075219e7a0..0fb6971194 100644 --- a/official/c27346636.lua +++ b/official/c27346636.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,78868776,1,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19),2) + Fusion.AddProcMixN(c,true,true,78868776,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR),2) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) --negate local e1=Effect.CreateEffect(c) @@ -21,14 +21,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x19} -s.material_setcode={0x19} +s.listed_series={SET_GLADIATOR} +s.material_setcode={SET_GLADIATOR} function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA @@ -39,7 +39,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,4 +54,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27352108.lua b/official/c27352108.lua index c4cdeb77b4..0cb1536ffd 100644 --- a/official/c27352108.lua +++ b/official/c27352108.lua @@ -46,14 +46,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Halve battle damage involving this card local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetValue(aux.ChangeBattleDamage(0,HALF_DAMAGE)) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end diff --git a/official/c27354732.lua b/official/c27354732.lua index a3a9eb3212..368e5d086a 100644 --- a/official/c27354732.lua +++ b/official/c27354732.lua @@ -47,13 +47,13 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x10d} +s.listed_series={SET_MYTHICAL_BEAST} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) == 1 end function s.spfilter(c,e,tp,rp) - return c:IsSetCard(0x10d) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 + return c:IsSetCard(SET_MYTHICAL_BEAST) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -73,14 +73,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,2) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) + return rp~=tp and re:IsMonsterEffect() and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -98,4 +98,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27381364.lua b/official/c27381364.lua index 638ed7c2f2..dd3cc31c2f 100644 --- a/official/c27381364.lua +++ b/official/c27381364.lua @@ -45,7 +45,7 @@ function s.lcheck(g,lc,sumtype,tp) end function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.spfilter(c,e,tp,ex) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsLevel(2) or (ex and (c:IsRank(2) or c:IsLink(2)))) diff --git a/official/c27383110.lua b/official/c27383110.lua index 00f6e42005..294d9b49cf 100644 --- a/official/c27383110.lua +++ b/official/c27383110.lua @@ -1,4 +1,5 @@ --宣告者の預言 +--Dawn of the Herald local s,id=GetID() function s.initial_effect(c) local e1=Ritual.AddProcEqual(c,s.ritualfil,6,nil,nil,nil,nil,s.stage2) @@ -67,4 +68,4 @@ function s.evop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.RaiseEvent(tc,EVENT_CUSTOM+id,e,0,tp,tp,0) e:SetLabelObject(nil) -end +end \ No newline at end of file diff --git a/official/c27383719.lua b/official/c27383719.lua index 968ba45a1a..c4f99def1b 100644 --- a/official/c27383719.lua +++ b/official/c27383719.lua @@ -1,9 +1,9 @@ --- S-Force ラプスウェル --- S-Force Lapcewell --- Scripted by Hatter +--S-Force ラプスウェル +--S-Force Lapcewell +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon 1 "S-Force" monster from the GY + --Special Summon 1 "S-Force" monster from the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Destroy all monsters in the same column as your "S-Force" monsters + --Destroy all monsters in the same column as your "S-Force" monsters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) diff --git a/official/c27407330.lua b/official/c27407330.lua index 7a5dce33a6..88d4c8bbc0 100644 --- a/official/c27407330.lua +++ b/official/c27407330.lua @@ -47,7 +47,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) g:DeleteGroup() end function s.costfilter(c) @@ -55,7 +55,7 @@ function s.costfilter(c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove() @@ -70,4 +70,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27408609.lua b/official/c27408609.lua index c008bb9dbe..1e9cc60a05 100644 --- a/official/c27408609.lua +++ b/official/c27408609.lua @@ -1,4 +1,5 @@ --黄金のホムンクルス +--Golden Homunculus local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.value(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,0)*300 -end +end \ No newline at end of file diff --git a/official/c27412542.lua b/official/c27412542.lua index 2f25d842ba..db0c6a2163 100644 --- a/official/c27412542.lua +++ b/official/c27412542.lua @@ -1,5 +1,5 @@ --雙王の械 ---The Shackles of Souoh +--Abomination's Prison --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x130} +s.listed_series={SET_UNCHAINED} function s.thfilter(c) - return c:IsSetCard(0x130) and c:IsAbleToHand() + return c:IsSetCard(SET_UNCHAINED) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c27416701.lua b/official/c27416701.lua index d5e8384c4e..ea81c3167a 100644 --- a/official/c27416701.lua +++ b/official/c27416701.lua @@ -1,4 +1,5 @@ --柴戦士タロ +--Shiba-Warrior Taro local s,id=GetID() function s.initial_effect(c) --battle indestructable @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil) @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27420823.lua b/official/c27420823.lua index 8af3cd3c9d..bfff541a46 100644 --- a/official/c27420823.lua +++ b/official/c27420823.lua @@ -68,4 +68,4 @@ end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) -end +end \ No newline at end of file diff --git a/official/c2743001.lua b/official/c2743001.lua index b6aef3959f..1098cb05f7 100644 --- a/official/c2743001.lua +++ b/official/c2743001.lua @@ -31,25 +31,25 @@ end s.synchro_tuner_required=1 s.synchro_nt_required=1 function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.rmfilter(c) return c:IsSpellTrap() and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,nil) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and (r&REASON_EFFECT+REASON_BATTLE)~=0 + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27439792.lua b/official/c27439792.lua index a92059d395..7a982663dd 100644 --- a/official/c27439792.lua +++ b/official/c27439792.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -21,16 +21,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={6007213,32491822,69890967,13301895} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(6007213,32491822,69890967) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end @@ -62,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c27450400.lua b/official/c27450400.lua index f56ad64d62..ac980f6704 100644 --- a/official/c27450400.lua +++ b/official/c27450400.lua @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then ctn=false end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c27483935.lua b/official/c27483935.lua index 06a961a4ab..cb49916fca 100644 --- a/official/c27483935.lua +++ b/official/c27483935.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,2}) - e4:SetCost(aux.SelfBanishCost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.pltg) e4:SetOperation(s.plop) c:RegisterEffect(e4) diff --git a/official/c27491571.lua b/official/c27491571.lua index 582576c6b9..766c8cf409 100644 --- a/official/c27491571.lua +++ b/official/c27491571.lua @@ -1,4 +1,5 @@ --ゴーストリックの魔女 +--Ghostrick Witch local s,id=GetID() function s.initial_effect(c) --summon limit @@ -28,14 +29,14 @@ function s.initial_effect(c) e3:SetOperation(s.posop2) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sumcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -59,4 +60,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c27503418.lua b/official/c27503418.lua index 1509f12d47..79f16ce4e8 100644 --- a/official/c27503418.lua +++ b/official/c27503418.lua @@ -18,14 +18,14 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_MZONE|LOCATION_GRAVE) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.filter1(c,e,tp,tc,lv) local rlv=c:GetLevel()-lv return rlv>0 and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0 - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c,tp,rlv) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c,tp,rlv) end function s.filter2(c,tp,lv) local rlv=lv-c:GetLevel() @@ -41,11 +41,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetLevel()) local lv=g1:GetFirst():GetLevel()-tc:GetLevel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp,lv) + local g2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp,lv) g2:AddCard(tc) if Duel.Remove(g2,POS_FACEUP,REASON_EFFECT)==2 then Duel.SpecialSummon(g1,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) g1:GetFirst():CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c2752099.lua b/official/c2752099.lua index e6947496d2..76b143c7b0 100644 --- a/official/c2752099.lua +++ b/official/c2752099.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c27527047.lua b/official/c27527047.lua index 173641130c..a2f6776013 100644 --- a/official/c27527047.lua +++ b/official/c27527047.lua @@ -1,4 +1,5 @@ --氷結界の御庭番 +--Secret Guards of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --untargetable @@ -8,11 +9,11 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ICE_BARRIER)) e1:SetValue(s.tgval) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.tgval(e,re,rp) - return rp~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER) -end + return rp~=e:GetHandlerPlayer() and re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c27541267.lua b/official/c27541267.lua index dd7e7144ea..097657179d 100644 --- a/official/c27541267.lua +++ b/official/c27541267.lua @@ -1,6 +1,5 @@ --侵略の汎発感染 --Infestation Pandemic - local s,id=GetID() function s.initial_effect(c) --All your "lswarm" monsters are unaffected by other card effects @@ -9,13 +8,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0xa} - +s.listed_series={SET_LSWARM} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xa) + return c:IsFaceup() and c:IsSetCard(SET_LSWARM) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -31,11 +29,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.efilter) tc:RegisterEffect(e1) end end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner() + return te:IsSpellTrapEffect() and te:GetOwner()~=e:GetOwner() end \ No newline at end of file diff --git a/official/c27541563.lua b/official/c27541563.lua index 4f14d7bc87..ff9cfe1a4f 100644 --- a/official/c27541563.lua +++ b/official/c27541563.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --negate local e2=Effect.CreateEffect(c) @@ -40,16 +40,13 @@ function s.initial_effect(c) e5:SetValue(s.effectfilter) c:RegisterEffect(e5) end -s.listed_series={0x103} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_ALTERGEIST} function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.discfilter(c) - return c:IsFaceup() and c:IsSetCard(0x103) and c:IsAbleToGraveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToGraveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -74,5 +71,5 @@ end function s.effectfilter(e,ct) local p=e:GetHandler():GetControler() local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) - return p==tp and te:GetHandler():IsSetCard(0x103) and loc&LOCATION_ONFIELD~=0 -end + return p==tp and te:GetHandler():IsSetCard(SET_ALTERGEIST) and loc&LOCATION_ONFIELD~=0 +end \ No newline at end of file diff --git a/official/c27548199.lua b/official/c27548199.lua index a162aee335..a8f4a88df4 100644 --- a/official/c27548199.lua +++ b/official/c27548199.lua @@ -42,7 +42,7 @@ function s.filter(c) return c:IsLinkMonster() and not c:IsForbidden() end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -62,7 +62,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -96,5 +96,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c27551.lua b/official/c27551.lua index ffcfcb763a..02e52fd926 100644 --- a/official/c27551.lua +++ b/official/c27551.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_ATTACK) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_ATTACK) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -77,4 +77,4 @@ function s.desop3(e,tp,eg,ep,ev,re,r,rp) local tc=c:GetFirstCardTarget() local g=Group.FromCards(tc,c) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27552504.lua b/official/c27552504.lua index 191e3c431e..333fa65f89 100644 --- a/official/c27552504.lua +++ b/official/c27552504.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,12 +28,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xb1,0xd5} +s.listed_series={SET_BURNING_ABYSS,SET_DANTE} function s.cfilter(c) - return c:IsSetCard(0xb1) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0xd5,lc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsSetCard(SET_DANTE,lc,SUMMON_TYPE_XYZ,tp) end function s.xyzop(e,tp,chk,mc) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -41,14 +41,10 @@ function s.xyzop(e,tp,chk,mc) local tc=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) if tc then Duel.SendtoGrave(tc,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) return true else return false end end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) end @@ -66,7 +62,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xb1) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_BURNING_ABYSS) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -78,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27561302.lua b/official/c27561302.lua index 03fec2a4d5..d2f7ec5d8e 100644 --- a/official/c27561302.lua +++ b/official/c27561302.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() diff --git a/official/c27564031.lua b/official/c27564031.lua index 8332746a54..773f06944d 100644 --- a/official/c27564031.lua +++ b/official/c27564031.lua @@ -1,4 +1,5 @@ --Sin World +--Malefic World local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,13 +19,13 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 end function s.filter(c) - return c:IsSetCard(0x23) and c:IsAbleToHand() + return c:IsSetCard(SET_MALEFIC) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,3,nil) end @@ -37,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -55,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=sg:RandomSelect(1-tp,1) Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27565379.lua b/official/c27565379.lua index 1213774078..c5029ad3c6 100644 --- a/official/c27565379.lua +++ b/official/c27565379.lua @@ -1,6 +1,5 @@ --B・F-霊弓のアズサ --Battlewasp - Azusa the Ghost Bow - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -32,10 +31,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x12f} - +s.listed_series={SET_BATTLEWASP} function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and (r&REASON_BATTLE)==0 and re and re:GetHandler():IsSetCard(0x12f) and not (re:GetHandler()==e:GetHandler()) + return ep~=tp and (r&REASON_BATTLE)==0 and re and re:GetHandler():IsSetCard(SET_BATTLEWASP) and not (re:GetHandler()==e:GetHandler()) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) end @@ -50,8 +48,8 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.filter(c,tp) local rc=c:GetReasonCard() - return (rc:IsSetCard(0x12f) and rc:IsControler(tp)) - or (c:IsSetCard(0x12f) and c:IsControler(tp)) + return (rc:IsSetCard(SET_BATTLEWASP) and rc:IsControler(tp)) + or (c:IsSetCard(SET_BATTLEWASP) and c:IsControler(tp)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.filter,1,nil,tp) @@ -71,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c27581098.lua b/official/c27581098.lua index 01cbf95408..ddd1c5236a 100644 --- a/official/c27581098.lua +++ b/official/c27581098.lua @@ -1,4 +1,5 @@ --融合禁止エリア +--Non-Fusion Area local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.splimit(e,c,tp,sumtp,sumpos) return (sumtp&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end +end \ No newline at end of file diff --git a/official/c2759860.lua b/official/c2759860.lua index 34946b33d4..83771f8a5f 100644 --- a/official/c2759860.lua +++ b/official/c2759860.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xd1} +s.listed_series={SET_GRAYDLE} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd1) + return c:IsFaceup() and c:IsSetCard(SET_GRAYDLE) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -52,10 +52,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) - return c:IsSetCard(0xd1) and c:IsAbleToHand() + return c:IsSetCard(SET_GRAYDLE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c27618634.lua b/official/c27618634.lua index 55d2355182..d3135f02eb 100644 --- a/official/c27618634.lua +++ b/official/c27618634.lua @@ -1,4 +1,5 @@ --薄幸の乙女 +--The Unhappy Girl local s,id=GetID() function s.initial_effect(c) --battle indestructable @@ -46,11 +47,11 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() if bc and c:IsPosition(POS_FACEUP_ATTACK) then if c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) e:GetLabelObject():Clear() end e:GetLabelObject():AddCard(bc) - bc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1) + bc:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.atlcon(e) @@ -61,4 +62,4 @@ function s.atltg(e,c) end function s.posop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():ResetFlagEffect(id) -end +end \ No newline at end of file diff --git a/official/c27632240.lua b/official/c27632240.lua index 0785e3e14c..0ff6b8ad9a 100644 --- a/official/c27632240.lua +++ b/official/c27632240.lua @@ -1,4 +1,5 @@ --虚空の騎士 +--Altitude Knight local s,id=GetID() function s.initial_effect(c) --send to grave @@ -45,4 +46,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c276357.lua b/official/c276357.lua index 7e77809748..262717ad68 100644 --- a/official/c276357.lua +++ b/official/c276357.lua @@ -69,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27642961.lua b/official/c27642961.lua index ff9ea15217..a941ad8cf8 100644 --- a/official/c27642961.lua +++ b/official/c27642961.lua @@ -1,4 +1,5 @@ --SPYRAL MISSION - Assault +--SPYRAL MISSION - Assault local s,id=GetID() function s.initial_effect(c) --activate @@ -26,12 +27,12 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() @@ -44,12 +45,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) c:SetTurnCounter(0) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -67,11 +68,11 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) local des=eg:GetFirst() if des:IsReason(REASON_BATTLE) then local rc=des:GetReasonCard() - return rc and rc:IsSetCard(0xee) and rc:IsControler(tp) and rc:IsRelateToBattle() + return rc and rc:IsSetCard(SET_SPYRAL) and rc:IsControler(tp) and rc:IsRelateToBattle() elseif re then local rc=re:GetHandler() return eg:IsExists(s.cfilter,1,nil,tp) - and rc and rc:IsSetCard(0xee) and rc:IsControler(tp) and re:IsActiveType(TYPE_MONSTER) + and rc and rc:IsSetCard(SET_SPYRAL) and rc:IsControler(tp) and re:IsMonsterEffect() end return false end @@ -86,7 +87,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xee) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPYRAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -100,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c27655513.lua b/official/c27655513.lua index 47f721b153..7c6822d904 100644 --- a/official/c27655513.lua +++ b/official/c27655513.lua @@ -1,4 +1,5 @@ --スクリーチ +--Skreech local s,id=GetID() function s.initial_effect(c) --to grave @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27657173.lua b/official/c27657173.lua index ea130034a5..f0e3201a67 100644 --- a/official/c27657173.lua +++ b/official/c27657173.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - c:RegisterEffect(e1) + c:RegisterEffect(e1) --Search 1 "Red-Eyes Fusion" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -32,9 +32,9 @@ function s.spcfilter(c) return c:IsLevelAbove(5) and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -61,14 +61,14 @@ function s.thfilter(c) return c:IsCode(6172122) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c27660735.lua b/official/c27660735.lua index 4caf89ea35..b81c9513f2 100644 --- a/official/c27660735.lua +++ b/official/c27660735.lua @@ -1,4 +1,5 @@ --SR三つ目のダイス +--Speedroid Tri-Eyed Dice local s,id=GetID() function s.initial_effect(c) --disable attack @@ -9,12 +10,12 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_ATTACK) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetAttacker() then Duel.NegateAttack() @@ -22,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.disop) Duel.RegisterEffect(e1,tp) @@ -31,4 +32,4 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c27664101.lua b/official/c27664101.lua index 62e35eed0a..000b646301 100644 --- a/official/c27664101.lua +++ b/official/c27664101.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.filter(c,e,tp) return c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -35,4 +35,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c2766877.lua b/official/c2766877.lua index 0c7ccb0f9e..f6ccff0f5d 100644 --- a/official/c2766877.lua +++ b/official/c2766877.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -21,10 +21,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end @@ -41,8 +37,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c27699122.lua b/official/c27699122.lua index 46721685e5..56bbd1bee3 100644 --- a/official/c27699122.lua +++ b/official/c27699122.lua @@ -1,7 +1,6 @@ --トゥーン・フリップ --Toon Page-Flip --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Reveal 3 toon monsters from deck, special summon 1 of them @@ -14,11 +13,10 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end s.listed_names={15259703} - function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,15259703),tp,LOCATION_ONFIELD,0,1,nil) end diff --git a/official/c27704731.lua b/official/c27704731.lua index d7653b2c1a..aca47b8193 100644 --- a/official/c27704731.lua +++ b/official/c27704731.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfRevealCost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c27705190.lua b/official/c27705190.lua index 5c9760f54c..435cb0f31f 100644 --- a/official/c27705190.lua +++ b/official/c27705190.lua @@ -1,76 +1,72 @@ --星遺物の交心 ---World Legacy Communion +--World Legacy's Mind Meld local s,id=GetID() function s.initial_effect(c) - --change effect + --Make an opponent's monster effect become "return 1 face-up monster your opponent controls to the hand" local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCountLimit(1,id) - e1:SetCondition(s.cecon) - e1:SetTarget(s.cetg) - e1:SetOperation(s.ceop) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_KRAWLER),tp,LOCATION_MZONE,0,1,nil) end) + e1:SetTarget(s.chngtg) + e1:SetOperation(s.chngop) c:RegisterEffect(e1) - --special summon + --Special Summon 1 "Krawler" monster from your hand, Deck, or GY to your zone a Link Monster points to local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x104} -function s.repop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,0,LOCATION_MZONE,1,1,nil) - if #sg>0 then - Duel.SendtoHand(sg,nil,REASON_EFFECT) - end -end -function s.cecon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x104),tp,LOCATION_MZONE,0,1,nil) +s.listed_series={SET_KRAWLER} +function s.chngtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToHand),rp,0,LOCATION_MZONE,1,nil) end end -function s.thfilter(c) - return c:IsFaceup() and c:IsAbleToHand() -end -function s.cetg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,rp,0,LOCATION_MZONE,1,nil) end -end -function s.ceop(e,tp,eg,ep,ev,re,r,rp) +function s.chngop(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() Duel.ChangeTargetCard(ev,g) Duel.ChangeChainOperation(ev,s.repop) end -function s.spfilter1(c,e,tp) - local zone = c:GetLinkedZone(tp)&0x1f - return c:IsFaceup() and c:IsLinkMonster() and zone>0 and Duel.IsExistingMatchingCard(s.spfilter2,tp,0x13,0,1,c,e,tp,zone) +function s.repop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_MZONE,1,1,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.SendtoHand(g,nil,REASON_EFFECT) + end +end +function s.tgfilter(c,e,tp) + local zone=c:GetLinkedZone(tp)&ZONES_MMZ + return c:IsLinkMonster() and c:IsFaceup() and zone>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,zone) end -function s.spfilter2(c,e,tp,zone) - return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,tp,zone) +function s.spfilter(c,e,tp,zone) + return c:IsSetCard(SET_KRAWLER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return s.spfilter1(chkc,e,tp) and chkc:IsLocation(LOCATION_MZONE) end - if chk == 0 then return Duel.IsExistingTarget(s.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - local zone = tc:GetLinkedZone(tp)&0x1f + if tc:IsRelateToEffect(e) then + local zone=tc:GetLinkedZone(tp)&ZONES_MMZ Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg = Duel.SelectMatchingCard(tp,s.spfilter2,tp,0x13,0,1,1,c,e,tp,zone) - if #sg>0 then - Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE,zone) - Duel.ConfirmCards(1-tp,sg) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,zone) + if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE,zone)>0 then + Duel.ConfirmCards(1-tp,g) end end end - diff --git a/official/c2772236.lua b/official/c2772236.lua index ede2d96570..4f52666c43 100644 --- a/official/c2772236.lua +++ b/official/c2772236.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_THUNDER),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WATT),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_THUNDER),1,99) c:EnableReviveLimit() --direct attack local e1=Effect.CreateEffect(c) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.GetAttackTarget()==nil end @@ -33,5 +33,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c27744077.lua b/official/c27744077.lua index 0b356118c5..a0f625ceb4 100644 --- a/official/c27744077.lua +++ b/official/c27744077.lua @@ -1,4 +1,5 @@ --絶体絶命 +--Absolute End local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c27753563.lua b/official/c27753563.lua index 4976931d14..a1507dea26 100644 --- a/official/c27753563.lua +++ b/official/c27753563.lua @@ -10,15 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -72,4 +68,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(tp,ct*1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27756115.lua b/official/c27756115.lua index 261625eed9..fa3bc3bfe1 100644 --- a/official/c27756115.lua +++ b/official/c27756115.lua @@ -1,4 +1,5 @@ --超重武者装留マカルガエシ +--Superheavy Samurai Soulbeads local s,id=GetID() function s.initial_effect(c) --equip @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -19,14 +20,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetRange(LOCATION_HAND) e2:SetCode(EVENT_TO_GRAVE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -48,7 +49,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) @@ -56,19 +57,15 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e2:SetCountLimit(1) e2:SetValue(s.valcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) - return c:IsSetCard(0x9a) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.valcon(e,re,r,rp) return (r&REASON_EFFECT)~=0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.cfilter(c,e,tp) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_DEFENSE) @@ -86,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c27762803.lua b/official/c27762803.lua index 6df92de4d5..e32b436648 100644 --- a/official/c27762803.lua +++ b/official/c27762803.lua @@ -1,4 +1,5 @@ --ナチュル・ビートル +--Naturia Beetle local s,id=GetID() function s.initial_effect(c) --ad change @@ -20,11 +21,11 @@ function s.con(e) return e:GetHandler():GetFlagEffect(id)~=0 end function s.adop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() then if e:GetHandler():GetFlagEffect(id)==0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) else e:GetHandler():ResetFlagEffect(id) end end -end +end \ No newline at end of file diff --git a/official/c27769400.lua b/official/c27769400.lua index 941076f9ef..6b381a44d4 100644 --- a/official/c27769400.lua +++ b/official/c27769400.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) s[1]=0 local ge1=Effect.GlobalEffect() ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - ge1:SetCode(EVENT_PHASE_START+PHASE_BATTLE_START) + ge1:SetCode(EVENT_PHASE_START|PHASE_BATTLE_START) ge1:SetOperation(s.checkop1) Duel.RegisterEffect(ge1,0) local ge2=Effect.GlobalEffect() @@ -53,7 +53,7 @@ function s.checkop2(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -82,7 +82,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabel(rc) c:RegisterEffect(e1) local e2=e1:Clone() @@ -92,4 +92,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c) return c:IsAttribute(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c27770341.lua b/official/c27770341.lua index 9bc959075a..f38a9a140d 100644 --- a/official/c27770341.lua +++ b/official/c27770341.lua @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.droperation) Duel.RegisterEffect(e1,tp) @@ -53,4 +53,4 @@ end function s.droperation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Draw(tp,s[tp],REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27780618.lua b/official/c27780618.lua index 6131570299..c9b138c392 100644 --- a/official/c27780618.lua +++ b/official/c27780618.lua @@ -1,4 +1,5 @@ --V・HEROヴァイオン +--Vision HERO Vyon local s,id=GetID() function s.initial_effect(c) --Tograve @@ -27,10 +28,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x8} +s.listed_series={SET_HERO} s.listed_names={CARD_POLYMERIZATION} function s.tgfilter(c) - return c:IsSetCard(0x8) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,12 +45,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcfilter(c) - return c:IsSetCard(0x8) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) @@ -66,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c27782503.lua b/official/c27782503.lua index db29eeff3a..7838dc3dd9 100644 --- a/official/c27782503.lua +++ b/official/c27782503.lua @@ -1,4 +1,5 @@ --六武衆-イロウ +--The Six Samurai - Irou local s,id=GetID() function s.initial_effect(c) --destroy @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id end function s.descon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() @@ -41,7 +42,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -59,5 +60,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c27784944.lua b/official/c27784944.lua index 19f7249e64..b71c84e40c 100644 --- a/official/c27784944.lua +++ b/official/c27784944.lua @@ -39,40 +39,40 @@ function s.initial_effect(c) e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e5:SetRange(LOCATION_REMOVED) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetCondition(s.spcon) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) e5:SetLabelObject(e4) c:RegisterEffect(e5) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.tffilter(c,tp) - return c:IsSpellTrap() and c:IsSetCard(0x109) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + return c:IsSpellTrap() and c:IsSetCard(SET_THE_WEATHER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsType(TYPE_FIELD) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.tffilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,tp) end + and Duel.IsExistingMatchingCard(s.tffilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,nil,tp) end end function s.tfop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tffilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tffilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil,tp):GetFirst() if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end end function s.immtg(e,c) - return c:IsSetCard(0x109) and c:IsSpellTrap() + return c:IsSetCard(SET_THE_WEATHER) and c:IsSpellTrap() end function s.spreg(e,tp,eg,ep,ev,re,r,rp) if not re then return end local c=e:GetHandler() local rc=re:GetHandler() - if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) then + if c:IsReason(REASON_COST) and rc:IsSetCard(SET_THE_WEATHER) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c27796375.lua b/official/c27796375.lua index 4cfc8382b7..5a64948cdf 100644 --- a/official/c27796375.lua +++ b/official/c27796375.lua @@ -1,4 +1,5 @@ --影霊衣の大魔道士 +--Great Sorcerer of the Nekroz local s,id=GetID() function s.initial_effect(c) --tohand @@ -27,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} s.listed_names={id} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,7 +38,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 end function s.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,7 +53,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsSetCard(0xb4) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_NEKROZ) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,4 +65,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2779999.lua b/official/c2779999.lua index 2998844ea9..389672950d 100644 --- a/official/c2779999.lua +++ b/official/c2779999.lua @@ -29,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27813661.lua b/official/c27813661.lua index 83daeb44bb..e8adb9ef2b 100644 --- a/official/c27813661.lua +++ b/official/c27813661.lua @@ -1,4 +1,5 @@ --天空の虹彩 +--Sky Iris local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,12 +29,12 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x98,0x9f,0x99} +s.listed_series={SET_MAGICIAN,SET_PERFORMAPAL,SET_ODD_EYES} function s.tgtg(e,c) - return c:IsSetCard(0x98) or c:IsSetCard(0x9f) or c:IsSetCard(0x99) + return c:IsSetCard(SET_MAGICIAN) or c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES) end function s.thfilter(c) - return c:IsSetCard(0x99) and c:IsAbleToHand() + return c:IsSetCard(SET_ODD_EYES) and c:IsAbleToHand() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end @@ -55,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c27821104.lua b/official/c27821104.lua index 685032e34f..27dfbee7a7 100644 --- a/official/c27821104.lua +++ b/official/c27821104.lua @@ -1,4 +1,5 @@ --六武衆の荒行 +--Asceticism of the Six Samurai local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.tfilter(c,atk,code,e,tp) - return c:IsSetCard(0x3d) and not c:IsCode(code) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and not c:IsCode(code) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and Duel.IsExistingMatchingCard(s.tfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),c:GetCode(),e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -41,10 +42,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27827272.lua b/official/c27827272.lua index 1c7f56ec15..f2b76dd144 100644 --- a/official/c27827272.lua +++ b/official/c27827272.lua @@ -1,4 +1,5 @@ --魔霧雨 +--Makiu, the Magical Mist local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,13 +15,13 @@ function s.initial_effect(c) end s.listed_names={CARD_SUMMONED_SKULL} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c,tp) @@ -44,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(s.filter2,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27827903.lua b/official/c27827903.lua index 69a3998e7a..fc53a1e0bc 100644 --- a/official/c27827903.lua +++ b/official/c27827903.lua @@ -1,4 +1,5 @@ --A・ジェネクス・クラッシャー +--Genex Ally Crusher local s,id=GetID() function s.initial_effect(c) --destroy @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2783661.lua b/official/c2783661.lua index 2edbb196d6..a896f19fdb 100644 --- a/official/c2783661.lua +++ b/official/c2783661.lua @@ -1,6 +1,5 @@ --青き眼の威光 --Majesty with Eyes of Blue - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot attack @@ -12,18 +11,17 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0xdd} - +s.listed_series={SET_BLUE_EYES} function s.filter(c) - return c:IsSetCard(0xdd) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BLUE_EYES) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -41,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c27847700.lua b/official/c27847700.lua index 3c872df2c6..2c8ba0b7d9 100644 --- a/official/c27847700.lua +++ b/official/c27847700.lua @@ -1,3 +1,3 @@ --融合 --Polymerization -Duel.LoadCardScriptAlias(CARD_POLYMERIZATION) +Duel.LoadCardScriptAlias(CARD_POLYMERIZATION) \ No newline at end of file diff --git a/official/c27863269.lua b/official/c27863269.lua index 79f1a0acd5..a2d107075e 100644 --- a/official/c27863269.lua +++ b/official/c27863269.lua @@ -1,4 +1,5 @@ --ロケット・パイルダー +--Rocket Pilder local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -36,6 +37,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) at:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c27869883.lua b/official/c27869883.lua index 1916ac0fe5..a4686ab362 100644 --- a/official/c27869883.lua +++ b/official/c27869883.lua @@ -1,4 +1,5 @@ --プリーステス・オーム +--Shadowpriestess of Ohm local s,id=GetID() function s.initial_effect(c) --damage @@ -27,4 +28,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27870033.lua b/official/c27870033.lua index 1d98447ea5..ed32a9db18 100644 --- a/official/c27870033.lua +++ b/official/c27870033.lua @@ -1,4 +1,5 @@ --チェイス・スカッド +--Pursuit Chaser local s,id=GetID() function s.initial_effect(c) --damage @@ -30,4 +31,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27870337.lua b/official/c27870337.lua index 0cc7a00741..e0c101a264 100644 --- a/official/c27870337.lua +++ b/official/c27870337.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) end s.listed_series={SET_SOLFACHORD} function s.zones(e,tp,eg,ep,ev,re,r,rp) - local zone=0xff + local zone=0xff --all S/T zones local place_g=Duel.GetMatchingGroup(s.plfilter,tp,LOCATION_DECK,0,nil) local left_pend=Duel.CheckLocation(tp,LOCATION_PZONE,0) local right_pend=Duel.CheckLocation(tp,LOCATION_PZONE,1) @@ -25,7 +25,7 @@ function s.zones(e,tp,eg,ep,ev,re,r,rp) local b2=Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_HAND,0,1,nil) and left_pend and right_pend and aux.SelectUnselectGroup(place_g,e,tp,2,2,s.rescon,0,tp,nil) if b1 and not b2 and not (left_pend and right_pend) then - zone=0xe + zone=0xe --S/T zones without the right and left most ones end return zone end @@ -94,4 +94,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c27873305.lua b/official/c27873305.lua index 39acf7aacd..9e867e5d3c 100644 --- a/official/c27873305.lua +++ b/official/c27873305.lua @@ -1,9 +1,10 @@ --DDD怒濤壊薙王カエサル・ラグナロク +--D/D/D Wave Oblivion King Caesar Ragnarok local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10af),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DDD),2) --tohand local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_EQUIP) @@ -18,14 +19,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,function(ec,_,tp) return ec:IsControler(1-tp) end,s.equipop,e1) end -s.listed_series={0xaf,0xae,0x10af} -s.material_setcode={0xaf,0x10af} +s.listed_series={SET_DD,SET_DARK_CONTRACT,SET_DDD} +s.material_setcode={SET_DD,SET_DDD} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (Duel.GetAttacker()==c or Duel.GetAttackTarget()==c) end function s.thfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToHand() + return c:IsFaceup() and (c:IsSetCard(SET_DD) or c:IsSetCard(SET_DARK_CONTRACT)) and c:IsAbleToHand() end function s.eqfilter(c) return c:IsFaceup() and c:IsAbleToChangeControler() @@ -48,7 +49,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -67,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) s.equipop(c,e,tp,ec) end end -end +end \ No newline at end of file diff --git a/official/c27877771.lua b/official/c27877771.lua index 5b5acd87ea..8b9e8f986e 100644 --- a/official/c27877771.lua +++ b/official/c27877771.lua @@ -1,4 +1,5 @@ --スニッフィング・ドラゴン +--Sniffer Dragon local s,id=GetID() function s.initial_effect(c) --search @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c27882993.lua b/official/c27882993.lua index 3253af4d68..e51df1c1d3 100644 --- a/official/c27882993.lua +++ b/official/c27882993.lua @@ -36,13 +36,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c27895597.lua b/official/c27895597.lua index 23fd4ff925..4abc1788ad 100644 --- a/official/c27895597.lua +++ b/official/c27895597.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x31),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FORTUNE_LADY),tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and + return c:IsSetCard(SET_FORTUNE_LADY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -42,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c27911549.lua b/official/c27911549.lua index 1ea96f53f4..0efb5d3a38 100644 --- a/official/c27911549.lua +++ b/official/c27911549.lua @@ -1,4 +1,5 @@ --寄生虫パラサイド +--Parasite Paracide local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) @@ -18,7 +19,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_BATTLE_DESTROYED) then return end - Duel.SendtoDeck(c,1-tp,2,REASON_EFFECT) + Duel.SendtoDeck(c,1-tp,SEQ_DECKSHUFFLE,REASON_EFFECT) if not c:IsLocation(LOCATION_DECK) then return end Duel.ShuffleDeck(1-tp) c:ReverseInDeck() @@ -47,8 +48,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(RACE_INSECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c27918365.lua b/official/c27918365.lua index 624ac8a57a..0c5be5a456 100644 --- a/official/c27918365.lua +++ b/official/c27918365.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.negcon) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_RELEASE) e3:SetCountLimit(1,{id,1}) - e3:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) end) + e3:SetCondition(function(e) return e:GetHandler():IsNormalSummoned() end) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c27918963.lua b/official/c27918963.lua index 093335c322..e7d195b536 100644 --- a/official/c27918963.lua +++ b/official/c27918963.lua @@ -30,25 +30,25 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.counter_place_list={0x33} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(aux.FaceupFilter(Card.IsSetCard,0xb3),1,nil) + return eg:IsExists(aux.FaceupFilter(Card.IsSetCard,SET_YOSENJU),1,nil) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x33,1) end function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xb3) + return c:IsFaceup() and c:IsSetCard(SET_YOSENJU) end function s.filter2(c) - return c:IsSetCard(0xb3) and c:IsAbleToHand() + return c:IsSetCard(SET_YOSENJU) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local b1=e:GetHandler():IsCanRemoveCounter(tp,0x33,1,REASON_COST) and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil) local b2=e:GetHandler():IsCanRemoveCounter(tp,0x33,3,REASON_COST) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) if chk==0 then return b1 or b2 end local op=0 if b1 and b2 then @@ -65,7 +65,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) else e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e:GetHandler():RemoveCounter(tp,0x33,3,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -79,15 +79,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c2792265.lua b/official/c2792265.lua index 8df4cf67b5..2f9b2fde21 100644 --- a/official/c2792265.lua +++ b/official/c2792265.lua @@ -7,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c27927359.lua b/official/c27927359.lua index 2eec9700a2..45012b4809 100644 --- a/official/c27927359.lua +++ b/official/c27927359.lua @@ -1,4 +1,5 @@ --ハーピィ・レディ2 +--Harpie Lady 2 local s,id=GetID() function s.initial_effect(c) --Disable @@ -17,12 +18,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c27944249.lua b/official/c27944249.lua index bb3de83646..3977ff91df 100644 --- a/official/c27944249.lua +++ b/official/c27944249.lua @@ -1,4 +1,5 @@ --ガスタの賢者 ウィンダール +--Windaar, Sage of Gusto local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelBelow(3) and c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c27946124.lua b/official/c27946124.lua index bccfbb4b16..57eb62f85d 100644 --- a/official/c27946124.lua +++ b/official/c27946124.lua @@ -1,6 +1,5 @@ --聖蔓の社 --Sunvine Shrine - local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,15 +39,14 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) e4:SetCondition(s.setcon) - e4:SetCost(s.setcost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.settg) e4:SetOperation(s.setop) c:RegisterEffect(e4) end -s.listed_series={0x1157} - +s.listed_series={SET_SUNAVALON} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) + return c:IsFaceup() and c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -84,14 +82,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --set function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.setfilter(c) - return c:GetType()&0x20004==0x20004 and c:IsSSetable(true) + return c:IsContinuousTrap() and c:IsSSetable(true) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end diff --git a/official/c27967615.lua b/official/c27967615.lua index 4ce347aa84..f5c9408300 100644 --- a/official/c27967615.lua +++ b/official/c27967615.lua @@ -1,4 +1,5 @@ --フュージョン・ウェポン +--Fusion Weapon local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.filter(c) return c:IsType(TYPE_FUSION) and c:IsLevelBelow(6) -end +end \ No newline at end of file diff --git a/official/c27970830.lua b/official/c27970830.lua index b797e94643..1925ef508a 100644 --- a/official/c27970830.lua +++ b/official/c27970830.lua @@ -2,7 +2,7 @@ --Gateway of the Six local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x3) + c:EnableCounterPermit(COUNTER_BUSHIDO) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -51,20 +51,20 @@ function s.initial_effect(c) e6:SetOperation(s.op3) c:RegisterEffect(e6) end -s.listed_series={0x3d,0x20} -s.counter_place_list={0x3} +s.listed_series={SET_SIX_SAMURAI,SET_SHIEN} +s.counter_place_list={COUNTER_BUSHIDO} function s.ctop(e,tp,eg,ep,ev,re,r,rp) - if eg:IsExists(aux.FaceupFilter(Card.IsSetCard,0x3d),1,nil) then - e:GetHandler():AddCounter(0x3,2) + if eg:IsExists(aux.FaceupFilter(Card.IsSetCard,SET_SIX_SAMURAI),1,nil) then + e:GetHandler():AddCounter(COUNTER_BUSHIDO,2) end end function s.cost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3,2,REASON_COST) end + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_BUSHIDO,2,REASON_COST) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3,2,REASON_COST) + Duel.RemoveCounter(tp,1,0,COUNTER_BUSHIDO,2,REASON_COST) end function s.filter1(c) - return c:IsFaceup() and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) and c:IsType(TYPE_EFFECT) + return c:IsFaceup() and c:IsSetCard({SET_SIX_SAMURAI,SET_SHIEN}) and c:IsType(TYPE_EFFECT) end function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc) end @@ -74,45 +74,43 @@ function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500) end function s.op1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) end end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3,4,REASON_COST) end + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_BUSHIDO,4,REASON_COST) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3,4,REASON_COST) + Duel.RemoveCounter(tp,1,0,COUNTER_BUSHIDO,4,REASON_COST) end function s.filter2(c) - return c:IsMonster() and c:IsSetCard(0x3d) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsAbleToHand() end function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.op2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3,6,REASON_COST) end + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_BUSHIDO,6,REASON_COST) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.RemoveCounter(tp,1,0,0x3,6,REASON_COST) + Duel.RemoveCounter(tp,1,0,COUNTER_BUSHIDO,6,REASON_COST) end function s.filter3(c,e,tp) - return c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SHIEN) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter3(chkc,e,tp) end @@ -123,10 +121,9 @@ function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.op3(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end \ No newline at end of file diff --git a/official/c27971137.lua b/official/c27971137.lua index cebbaebc54..571d505439 100644 --- a/official/c27971137.lua +++ b/official/c27971137.lua @@ -1,4 +1,5 @@ --腐乱犬 +--Zombowwow local s,id=GetID() function s.initial_effect(c) --atkup @@ -25,7 +26,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -46,16 +47,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local de=Effect.CreateEffect(e:GetHandler()) de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -65,21 +66,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) de:SetLabelObject(tc) de:SetCondition(s.descon) de:SetOperation(s.desop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_END) then de:SetLabel(Duel.GetTurnCount()) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + de:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else de:SetLabel(0) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + de:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end Duel.RegisterEffect(de,tp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0 + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0 end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27978707.lua b/official/c27978707.lua index 5f2fe05c7a..338db23fd8 100644 --- a/official/c27978707.lua +++ b/official/c27978707.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -23,18 +23,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x9a} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -51,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.negfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9a) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -69,4 +65,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27979109.lua b/official/c27979109.lua index e50cf8a40a..c457a029b5 100644 --- a/official/c27979109.lua +++ b/official/c27979109.lua @@ -35,14 +35,14 @@ function s.initial_effect(c) end s.listed_card_types={TYPE_GEMINI} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 end function s.thfilter(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -55,12 +55,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -79,7 +79,7 @@ function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -91,4 +91,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c27980138.lua b/official/c27980138.lua index 4337b5fbed..0cd5b41a19 100644 --- a/official/c27980138.lua +++ b/official/c27980138.lua @@ -33,8 +33,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #dg~=2 then return end local hg=tg:Filter(Card.IsLocation,nil,LOCATION_ONFIELD) if Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and dg:IsExists(Card.IsLocation,2,nil,LOCATION_DECK+LOCATION_EXTRA) + and dg:IsExists(Card.IsLocation,2,nil,LOCATION_DECK|LOCATION_EXTRA) and #hg>0 then Duel.SendtoHand(hg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c27993919.lua b/official/c27993919.lua index 8223cd6e97..239b7a568f 100644 --- a/official/c27993919.lua +++ b/official/c27993919.lua @@ -1,18 +1,18 @@ --- ラドレミコード・エンジェリア --- LaSolfachord Angelia --- scripted by Hatter +--ラドレミコード・エンジェリア +--LaSolfachord Angelia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Pendulum procedure + --Pendulum procedure Pendulum.AddProcedure(c) - -- Prevent the activation of Spell/Traps or monster effects when you Pendulum Summon + --Prevent the activation of Spell/Traps or monster effects when you Pendulum Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_PZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetOperation(s.sucop) c:RegisterEffect(e1) - -- Special Summon 1 "Solfachord" monster from the Deck + --Special Summon 1 "Solfachord" monster from the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Prevent the activation of Spell/Traps or monster effects when "Solfachord" monsters attack + --Prevent the activation of Spell/Traps or monster effects when "Solfachord" monsters attack local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_ATTACK_ANNOUNCE) @@ -33,7 +33,7 @@ function s.initial_effect(c) end s.listed_series={SET_SOLFACHORD} function s.sucfilter(c,tp) - return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsPendulumSummoned() end function s.sucop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.sucfilter,1,nil,tp) then diff --git a/official/c27995943.lua b/official/c27995943.lua index 746df67bc3..c272940a13 100644 --- a/official/c27995943.lua +++ b/official/c27995943.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -18,10 +18,6 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end end @@ -51,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/official/c28002611.lua b/official/c28002611.lua index 960cd73a8e..eb625bc6c7 100644 --- a/official/c28002611.lua +++ b/official/c28002611.lua @@ -1,4 +1,5 @@ --ガジェット・トレーラー +--Gadget Hauler local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.filter(c) - return c:IsSetCard(0x26) and c:IsMonster() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -30,6 +31,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(#g*800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c28004531.lua b/official/c28004531.lua index 38365145cb..5762ab26da 100644 --- a/official/c28004531.lua +++ b/official/c28004531.lua @@ -1,9 +1,9 @@ --- 空牙団の積荷 レクス --- Rex, Cargo Fur Hire --- Scripted by Hatter +--空牙団の積荷 レクス +--Rex, Freight Fur Hire +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search 1 Spell/Trap "Fur Hire" + --Search 1 Spell/Trap "Fur Hire" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Add 1 card "Fur Hire" from the GY to the hand + --Add 1 card "Fur Hire" from the GY to the hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) @@ -26,16 +26,16 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetCondition(s.gthcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.gthtg) e3:SetOperation(s.gthop) c:RegisterEffect(e3) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.thfilter(c) - return c:IsSetCard(0x114) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_FUR_HIRE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -50,10 +50,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.gthcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x114),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FUR_HIRE),tp,LOCATION_MZONE,0,1,nil) end function s.gthfilter(c,ft,e,tp) - return c:IsSetCard(0x114) + return c:IsSetCard(SET_FUR_HIRE) and (c:IsAbleToHand() or (ft>0 and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.gthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c28016193.lua b/official/c28016193.lua index 62834ddc2d..49e0c809b4 100644 --- a/official/c28016193.lua +++ b/official/c28016193.lua @@ -4,14 +4,14 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe1),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_METALFOES),2) --pierce local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_PIERCE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe1)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_METALFOES)) e1:SetValue(DOUBLE_DAMAGE) c:RegisterEffect(e1) --destroy @@ -25,8 +25,8 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xe1} -s.material_setcode=0xe1 +s.listed_series={SET_METALFOES} +s.material_setcode=SET_METALFOES function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end @@ -42,4 +42,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2801664.lua b/official/c2801664.lua index 8a0d64d962..ce418d2fae 100644 --- a/official/c2801664.lua +++ b/official/c2801664.lua @@ -34,9 +34,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.sscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,2,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,2,nil) end function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -70,7 +70,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c28031913.lua b/official/c28031913.lua index cbf1fed4ac..dc8952e1d5 100644 --- a/official/c28031913.lua +++ b/official/c28031913.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} function s.spval(e,c) return 0,aux.GetMMZonesPointedTo(c:GetControler()) end @@ -34,7 +34,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x116) and c:IsLinkMonster() and not c:IsHasEffect(EFFECT_PIERCE) + return c:IsFaceup() and c:IsSetCard(SET_CRUSADIA) and c:IsLinkMonster() and not c:IsHasEffect(EFFECT_PIERCE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end @@ -51,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c28039390.lua b/official/c28039390.lua index ca0074f825..ec355db077 100644 --- a/official/c28039390.lua +++ b/official/c28039390.lua @@ -1,4 +1,5 @@ --デストーイ・リニッチ +--Frightfur Reborn local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,14 +20,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0xad,0xa9} +s.listed_series={SET_FRIGHTFUR,SET_FLUFFAL} function s.filter(c,e,tp) - return c:IsSetCard(0xad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FRIGHTFUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xa9) or c:IsSetCard(0xad)) and c:IsMonster() + return c:IsFaceup() and (c:IsSetCard(SET_FLUFFAL) or c:IsSetCard(SET_FRIGHTFUR)) and c:IsMonster() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.tgfilter(chkc) end @@ -55,6 +56,6 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c28053106.lua b/official/c28053106.lua index 17f611be00..d2792ef66c 100644 --- a/official/c28053106.lua +++ b/official/c28053106.lua @@ -1,9 +1,9 @@ ---サイバー・エッグ・エンジェル-- +--サイバー・エッグ・エンジェル --Cyber Egg Angel --scripted by unknow local s,id=GetID() function s.initial_effect(c) - --add a machine ritual from deck to hand when normal/flip/special summoned + --Add 1 "Machine Angel" Spell or 1 "Ritual Sanctuary" from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -21,10 +21,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x124} -s.listed_names={95658967} +s.listed_series={SET_MACHINE_ANGEL} +s.listed_names={95658967} --"Ritual Sanctuary" function s.thfilter(c) - return ((c:IsSetCard(0x124) and c:IsSpell()) or c:IsCode(95658967)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_MACHINE_ANGEL) and c:IsSpell()) or c:IsCode(95658967)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -37,5 +37,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c28053763.lua b/official/c28053763.lua index 9f0824086a..174a02126f 100644 --- a/official/c28053763.lua +++ b/official/c28053763.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) c:RegisterEffect(e1) --Special Summon local e2=Effect.CreateEffect(c) @@ -20,10 +20,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={28053764} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,300,300,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) end @@ -40,11 +36,10 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_EXTRA)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,300,300,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP_ATTACK) then return end local token=Duel.CreateToken(tp,id+1) @@ -56,7 +51,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,0)) e2:SetCountLimit(1) e2:SetOperation(s.tkop2) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.tkop2(e,tp,eg,ep,ev,re,r,rp) @@ -65,4 +60,4 @@ function s.tkop2(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,PLAYER_ALL,id) local token=Duel.CreateToken(1-tp,id+1) Duel.SpecialSummon(token,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c28062325.lua b/official/c28062325.lua index ac6d8b6083..27c31ef001 100644 --- a/official/c28062325.lua +++ b/official/c28062325.lua @@ -41,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c28066831.lua b/official/c28066831.lua index df16dbfcf0..ebdd24a046 100644 --- a/official/c28066831.lua +++ b/official/c28066831.lua @@ -1,4 +1,5 @@ --ガスタ・サンボルト +--Gusto Thunbolt local s,id=GetID() function s.initial_effect(c) --destroyed @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetOperation(s.flagop) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.flagop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_GRAVE) or (c:GetReason()&REASON_BATTLE)==0 then return end @@ -17,23 +18,23 @@ function s.flagop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.costfilter(c,tp) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) @@ -51,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28106077.lua b/official/c28106077.lua index edec202c2b..d142a99517 100644 --- a/official/c28106077.lua +++ b/official/c28106077.lua @@ -1,4 +1,5 @@ --ダグラの剣 +--Cestus of Dagla local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY)) @@ -33,4 +34,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2810642.lua b/official/c2810642.lua index 35f03e404b..b42935d61f 100644 --- a/official/c2810642.lua +++ b/official/c2810642.lua @@ -23,7 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_PSYFRAME_DRIVER} - function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end @@ -38,24 +37,24 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetAttacker():IsRelateToBattle() and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetTargetCard(Duel.GetAttacker()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g==0 then return end local tc=g:GetFirst() local c=e:GetHandler() local fid=c:GetFieldID() Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() g:AddCard(c) g:KeepAlive() @@ -72,7 +71,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dc=Duel.GetFirstTarget() if dc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 then Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end function s.rmfilter(c,fid) diff --git a/official/c28115467.lua b/official/c28115467.lua index a3f144eb7d..10eee78d8b 100644 --- a/official/c28115467.lua +++ b/official/c28115467.lua @@ -1,11 +1,11 @@ --- ミドレミコード・エリーティア --- Midoremichord Elitea --- scripted by Hatter +--ミドレミコード・エリーティア +--MiSolfachord Eliteia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- pendulum summon + --pendulum summon Pendulum.AddProcedure(c) - -- cannot disable pendulum summon + --cannot disable pendulum summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTargetRange(1,0) e1:SetTarget(s.target) c:RegisterEffect(e1) - -- return target to hand + --return target to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND) @@ -28,7 +28,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - -- no battle damage + --no battle damage local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) @@ -40,9 +40,9 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.target(e,c) - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) + return c:IsPendulumSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) end function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() @@ -64,5 +64,5 @@ function s.damcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEvenScale),e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil) end function s.efilter(e,c) - return c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) -end + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) +end \ No newline at end of file diff --git a/official/c28118128.lua b/official/c28118128.lua index afb44d7898..4b6ea05e4b 100644 --- a/official/c28118128.lua +++ b/official/c28118128.lua @@ -1,4 +1,5 @@ --子狸たんたん +--Baby Raccoon Tantan local s,id=GetID() function s.initial_effect(c) --flip @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28120197.lua b/official/c28120197.lua index 9f88423642..ae803df567 100644 --- a/official/c28120197.lua +++ b/official/c28120197.lua @@ -29,5 +29,4 @@ end function s.dcon2(e) local a,d=Duel.GetAttacker(),Duel.GetAttackTarget() return a:GetControler()==1-e:GetHandlerPlayer() and d and d:IsDefensePos() and d:IsRace(RACE_ROCK) -end - +end \ No newline at end of file diff --git a/official/c28121403.lua b/official/c28121403.lua index a573b7fb88..57830ab7c7 100644 --- a/official/c28121403.lua +++ b/official/c28121403.lua @@ -1,4 +1,5 @@ --大成仏 +--Really Eternal Rest local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28124263.lua b/official/c28124263.lua index 29f80f0754..60d5d9bce8 100644 --- a/official/c28124263.lua +++ b/official/c28124263.lua @@ -1,4 +1,5 @@ --D・キャメラン +--Morphtronic Cameran local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,11 +27,11 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetCondition(s.cond) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MORPHTRONIC)) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} s.listed_names={id} function s.check(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,20 +42,20 @@ function s.cona(e,tp,eg,ep,ev,re,r,rp) return e:GetLabelObject():GetLabel()==1 end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x26) and not c:IsCode(id) + return c:IsLevelBelow(4) and c:IsSetCard(SET_MORPHTRONIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.tga(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.opa(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end function s.cond(e) return e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c28126717.lua b/official/c28126717.lua index f7944b6a59..74b3452338 100644 --- a/official/c28126717.lua +++ b/official/c28126717.lua @@ -1,5 +1,5 @@ --ふわんだりぃずと謎の地図 ---Flundereeze and the Mysterious Map +--Floowandereeze and the Magnificent Map --Scripted by Zefile local s,id=GetID() function s.initial_effect(c) @@ -30,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.nsop) c:RegisterEffect(e3) end -s.listed_series={0x16f} +s.listed_series={SET_FLOOWANDEREEZE} function s.filter(c,tp) - return c:IsSetCard(0x16f) and c:IsLevel(1) and c:IsSummonable(true,nil) and not c:IsPublic() + return c:IsSetCard(SET_FLOOWANDEREEZE) and c:IsLevel(1) and c:IsSummonable(true,nil) and not c:IsPublic() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode()) end function s.filter2(c,code) - return c:IsSetCard(0x16f) and c:IsAbleToRemove() and not c:IsCode(code) + return c:IsSetCard(SET_FLOOWANDEREEZE) and c:IsAbleToRemove() and not c:IsCode(code) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,tp) end @@ -61,17 +61,17 @@ function s.nscon(e,tp,eg,ep,ev,re,r,rp) return eg and ep==1-tp end function s.nsfilter(c) - return c:IsSetCard(0x16f) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_FLOOWANDEREEZE) and c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.nsop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g>0 then local sg=g:GetFirst(tp,1,1,nil) Duel.Summon(tp,sg,true,nil) end -end +end \ No newline at end of file diff --git a/official/c28139785.lua b/official/c28139785.lua index 5896821043..dfc90939e6 100644 --- a/official/c28139785.lua +++ b/official/c28139785.lua @@ -8,9 +8,9 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DECKDES) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - e1:SetCost(s.ddcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.ddtg) e1:SetOperation(s.ddop) c:RegisterEffect(e1) @@ -26,10 +26,6 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -function s.ddcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) @@ -44,7 +40,7 @@ function s.ddop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetLevel()*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -73,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c28143384.lua b/official/c28143384.lua index ff5c94045e..d906ab4b8c 100644 --- a/official/c28143384.lua +++ b/official/c28143384.lua @@ -1,4 +1,4 @@ ---Japanese name +--エアリアル・イーター --Aerial Eater --scripted by Naim local s,id=GetID() diff --git a/official/c28143906.lua b/official/c28143906.lua index 2401785ae0..e74d330f27 100644 --- a/official/c28143906.lua +++ b/official/c28143906.lua @@ -1,4 +1,5 @@ --霞の谷の大怪鳥 +--Roc from the Valley of Haze local s,id=GetID() function s.initial_effect(c) --to deck @@ -21,6 +22,6 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28150174.lua b/official/c28150174.lua index 7e9d09f1fb..d8229cf017 100644 --- a/official/c28150174.lua +++ b/official/c28150174.lua @@ -1,4 +1,5 @@ --フォトン・バタフライ・アサシン +--Photon Papilloperative local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.poscost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefensePos() end if chk==0 then return Duel.IsExistingTarget(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -37,8 +34,8 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c28151978.lua b/official/c28151978.lua index e6432da70e..aaa6260503 100644 --- a/official/c28151978.lua +++ b/official/c28151978.lua @@ -1,4 +1,5 @@ --SRドミノバタフライ +--Speedroid Dominobutterfly local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -48,7 +49,7 @@ function s.cfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsAbleToHand() @@ -69,10 +70,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.synlimit(e,c) if not c then return false end - return not c:IsAttribute(ATTRIBUTE_WIND) or not c:IsRace(RACE_DRAGON+RACE_MACHINE) + return not c:IsAttribute(ATTRIBUTE_WIND) or not c:IsRace(RACE_DRAGON|RACE_MACHINE) end function s.rmcon(e) local c=e:GetHandler() return c:IsSummonLocation(LOCATION_EXTRA) and (c:GetReason()&REASON_MATERIAL+REASON_SYNCHRO)==REASON_MATERIAL+REASON_SYNCHRO -end +end \ No newline at end of file diff --git a/official/c28168762.lua b/official/c28168762.lua index af98637857..ae00b26492 100644 --- a/official/c28168762.lua +++ b/official/c28168762.lua @@ -34,12 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1157} +s.listed_series={SET_SUNAVALON} function s.matfilter(c,lc,st,tp) return c:IsRace(RACE_PLANT,lc,st,tp) and c:IsType(TYPE_NORMAL,lc,st,tp) end function s.cfilter(c,tp,rp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) + return c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -56,7 +56,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.dmgfilter(c,cc) - return c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(cc) + return c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(cc) end function s.dmgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,7 +70,7 @@ function s.dmgop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -79,13 +79,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_ADJUST) e2:SetOperation(s.skop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) Duel.RegisterEffect(e2,tp) end function s.skop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentPhase()~=PHASE_DAMAGE then local p=Duel.GetTurnPlayer() - Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) e:Reset() end end \ No newline at end of file diff --git a/official/c28174796.lua b/official/c28174796.lua index 0a5f75182c..2a684f7fb1 100644 --- a/official/c28174796.lua +++ b/official/c28174796.lua @@ -9,19 +9,19 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x12b),tp,LOCATION_MZONE,0,2,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MARINCESS),tp,LOCATION_MZONE,0,2,nil) end function s.spfilter(c,e,tp,sc) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLinkMonster() - and (c:GetLinkedZone()&0x1f)~=0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,c:GetLinkedZone()&0x1f) + and (c:GetLinkedZone()&ZONES_MMZ)~=0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,c:GetLinkedZone()&ZONES_MMZ) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -35,7 +35,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not (c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - local zone=tc:GetLinkedZone()&0x1f + local zone=tc:GetLinkedZone()&ZONES_MMZ if zone~=0 and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP,zone) then --Banish it if it leaves the field local e1=Effect.CreateEffect(c) @@ -44,8 +44,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c28183605.lua b/official/c28183605.lua index 3909ff7509..40ebad5447 100644 --- a/official/c28183605.lua +++ b/official/c28183605.lua @@ -22,18 +22,18 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsLevelBelow(3) and ec:IsSetCard(0x29) and ec:IsRace(RACE_DRAGON) + return ec:IsControler(tp) and ec:IsLevelBelow(3) and ec:IsSetCard(SET_DRAGUNITY) and ec:IsRace(RACE_DRAGON) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*200 end function s.filter(c) - return c:IsLevelBelow(3) and c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() + return c:IsLevelBelow(3) and c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -51,4 +51,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then c:EquipByEffectAndLimitRegister(e,tp,tc) end -end +end \ No newline at end of file diff --git a/official/c28189908.lua b/official/c28189908.lua index 482f8d3112..59a21e57e6 100644 --- a/official/c28189908.lua +++ b/official/c28189908.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c28190303.lua b/official/c28190303.lua index 517b161482..0f8870b5b1 100644 --- a/official/c28190303.lua +++ b/official/c28190303.lua @@ -1,4 +1,5 @@ --BF-白夜のグラディウス +--Blackwing - Gladius the Midnight Sun local s,id=GetID() function s.initial_effect(c) --special summon @@ -19,15 +20,15 @@ function s.initial_effect(c) e2:SetValue(s.valcon) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() - return #g==1 and tc:IsSetCard(0x33) and tc:GetCode()~=id + return #g==1 and tc:IsSetCard(SET_BLACKWING) and tc:GetCode()~=id end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c28194325.lua b/official/c28194325.lua index e97cdac39e..a8d5c28032 100644 --- a/official/c28194325.lua +++ b/official/c28194325.lua @@ -1,4 +1,5 @@ --H・C クラスプ・ナイフ +--Heroic Challenger - Clasp Sword local s,id=GetID() function s.initial_effect(c) --search @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x106f} +s.listed_series={SET_HEROIC_CHALLENGER} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x106f) + return re and re:GetHandler():IsSetCard(SET_HEROIC_CHALLENGER) end function s.filter(c) - return c:IsSetCard(0x106f) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_HEROIC_CHALLENGER) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c2819435.lua b/official/c2819435.lua index 7e640221cd..a5afd33220 100644 --- a/official/c2819435.lua +++ b/official/c2819435.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - --Special Summon 1 "Phantasm Spiral Token" + --Special Summon 1 "Phantasm Spiral Token" local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) diff --git a/official/c28201945.lua b/official/c28201945.lua index 5001333098..ebc4a0ac6a 100644 --- a/official/c28201945.lua +++ b/official/c28201945.lua @@ -24,17 +24,17 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x4c,0x89,0x108a} +s.listed_series={SET_TRAP_HOLE,SET_HOLE,SET_TRAPTRIX} function s.efilter(e,te) local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=re:GetHandler() - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end function s.filter(c,e,tp,ft) - return c:IsSetCard(0x108a) and c:GetCode()~=id and c:IsMonster() and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) + return c:IsSetCard(SET_TRAPTRIX) and c:GetCode()~=id and c:IsMonster() and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c28234578.lua b/official/c28234578.lua index aebdefd9d2..f93e14ef37 100644 --- a/official/c28234578.lua +++ b/official/c28234578.lua @@ -25,12 +25,12 @@ end --Banish opponent's monster until end phase function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -45,4 +45,4 @@ end --Return banished monster function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c28240337.lua b/official/c28240337.lua index 96f1cd0a81..d9cb1f3f88 100644 --- a/official/c28240337.lua +++ b/official/c28240337.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.atkval(e,c) - local LOCATION_GRAVE_MZONE=LOCATION_GRAVE+LOCATION_MZONE + local LOCATION_GRAVE_MZONE=LOCATION_GRAVE|LOCATION_MZONE return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_ZOMBIE),0,LOCATION_GRAVE_MZONE,LOCATION_GRAVE_MZONE,nil)*100 end function s.cfilter(c) diff --git a/official/c28265983.lua b/official/c28265983.lua index 04b40a72ba..9914924071 100644 --- a/official/c28265983.lua +++ b/official/c28265983.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop2) c:RegisterEffect(e3) end -s.listed_series={0xc9} +s.listed_series={SET_AROMA} function s.descon1(e,tp,eg,ep,ev,re,r,rp) return ep==tp end @@ -54,7 +54,7 @@ function s.desop1(e,tp,eg,ep,ev,re,r,rp) end end function s.descon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xc9),tp,LOCATION_MZONE,0,1,nil) and Duel.GetLP(tp)-Duel.GetLP(1-tp)>=3000 + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AROMA),tp,LOCATION_MZONE,0,1,nil) and Duel.GetLP(tp)-Duel.GetLP(1-tp)>=3000 end function s.descost2(e,tp,eg,ep,ev,re,r,rp,chk) local lp=Duel.GetLP(tp)-Duel.GetLP(1-tp) @@ -96,4 +96,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local dg=aux.SelectUnselectGroup(g,e,tp,1,nil,s.rescon(num),1,tp,HINTMSG_DESTROY) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28270534.lua b/official/c28270534.lua index 056f9cda0e..0a7b41f70e 100644 --- a/official/c28270534.lua +++ b/official/c28270534.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.bpop) c:RegisterEffect(e3) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.filter(c,e,tp) - return c:IsSetCard(0x135) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IGNISTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x135) and c:IsAttackAbove(2300) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_IGNISTER) and c:IsAttackAbove(2300) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -68,10 +68,10 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.indtg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) end function s.indtg(e,c) - return c:IsSetCard(0x135) and c:IsAttackAbove(2300) -end + return c:IsSetCard(SET_IGNISTER) and c:IsAttackAbove(2300) +end \ No newline at end of file diff --git a/official/c28273805.lua b/official/c28273805.lua index 3a00ff90c8..cfb0da2612 100644 --- a/official/c28273805.lua +++ b/official/c28273805.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c28279365.lua b/official/c28279365.lua index d968e1d6fd..13a458a2a6 100644 --- a/official/c28279365.lua +++ b/official/c28279365.lua @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local mg=tc:GetMaterial() local ct=#mg local sumtype=tc:GetSummonType() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 and (sumtype&SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and (sumtype&SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK and ct>0 and tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:IsExists(aux.NecroValleyFilter(s.mgfilter),1,nil,e,tp,tc) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then diff --git a/official/c28284902.lua b/official/c28284902.lua index b3d0562e92..d24feb2ac4 100644 --- a/official/c28284902.lua +++ b/official/c28284902.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x26) and c:IsAttackPos() and c:IsCanChangePosition() + return c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) and c:IsAttackPos() and c:IsCanChangePosition() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.cfilter,1,nil) end @@ -34,10 +34,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,#eg,0,0) end function s.filter(c,e) - return c:IsFaceup() and c:IsSetCard(0x26) and c:IsAttackPos() and c:IsRelateToEffect(e) + return c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) and c:IsAttackPos() and c:IsRelateToEffect(e) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=eg:Filter(s.filter,nil,e) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c282886.lua b/official/c282886.lua index f43601e5f9..05f91ba160 100644 --- a/official/c282886.lua +++ b/official/c282886.lua @@ -15,16 +15,16 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MERMAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c28290705.lua b/official/c28290705.lua index 0b70d50467..e3c9a861e2 100644 --- a/official/c28290705.lua +++ b/official/c28290705.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c28292031.lua b/official/c28292031.lua index f0a7fd863e..001facc807 100644 --- a/official/c28292031.lua +++ b/official/c28292031.lua @@ -1,5 +1,5 @@ --ダイノルフィア・リヴァージョン ---Dinoruffia Reversion +--Dinomorphia Reversion --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -32,13 +32,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x175) and c:IsType(TYPE_FUSION) + return c:IsFaceup() and c:IsSetCard(SET_DINOMORPHIA) and c:IsType(TYPE_FUSION) end function s.condition1(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -99,6 +99,6 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c28297833.lua b/official/c28297833.lua index c085110ab8..49b036e306 100644 --- a/official/c28297833.lua +++ b/official/c28297833.lua @@ -1,4 +1,5 @@ --ネクロフェイス +--Necroface local s,id=GetID() function s.initial_effect(c) --atkup @@ -33,7 +34,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct*100) c:RegisterEffect(e1) end @@ -53,7 +54,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) c:RegisterEffect(e1) end diff --git a/official/c2830693.lua b/official/c2830693.lua index fe1dd90ee0..071d5b84f3 100644 --- a/official/c2830693.lua +++ b/official/c2830693.lua @@ -1,6 +1,5 @@ --虹クリボー --Rainbow Kuriboh - local s,id=GetID() function s.initial_effect(c) --Equip this card to opponent's attacking monster @@ -48,13 +47,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end end @@ -78,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c28325165.lua b/official/c28325165.lua index b098a58ffb..082bdb3931 100644 --- a/official/c28325165.lua +++ b/official/c28325165.lua @@ -1,6 +1,5 @@ --水物語-ウラシマ --Aqua Story - Urashima - local s,id=GetID() function s.initial_effect(c) --Targeted monster has its effects negate, its ATK/DEF becomes 100, and is unaffected by opponent's card effects @@ -15,13 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10cd} +s.listed_series={SET_AQUAACTRESS} function s.cfilter(c) - return c:IsSetCard(0x10cd) and c:IsMonster() + return c:IsSetCard(SET_AQUAACTRESS) and c:IsMonster() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) + return aux.StatChangeDamageStepCondition() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -39,20 +37,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --ATK/DEF becomes 100 local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(100) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) local e4=e3:Clone() e4:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -65,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetRange(LOCATION_MZONE) e5:SetCode(EFFECT_IMMUNE_EFFECT) e5:SetValue(s.efilter) - e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e5:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e5) end end diff --git a/official/c2833249.lua b/official/c2833249.lua index a99a4a1630..e75b136e9a 100644 --- a/official/c2833249.lua +++ b/official/c2833249.lua @@ -1,4 +1,5 @@ --竜の血族 +--D. Tribe local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,8 +20,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(RACE_DRAGON) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c28332833.lua b/official/c28332833.lua index ff724ca8e8..eee86fd231 100644 --- a/official/c28332833.lua +++ b/official/c28332833.lua @@ -1,4 +1,5 @@ --フレムベル・パウン +--Flamvell Poun local s,id=GetID() function s.initial_effect(c) --search @@ -30,4 +31,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c28340377.lua b/official/c28340377.lua index 670baf3845..53617c420a 100644 --- a/official/c28340377.lua +++ b/official/c28340377.lua @@ -1,13 +1,13 @@ --- Court of Cards --- Scripted by Hatter +--Court of Cards +--Court of Cards local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Draw + --Draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DRAW) @@ -43,13 +43,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -63,7 +63,7 @@ function s.rescon(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==#sg end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - local cg=Duel.GetMatchingGroup(s.drcostfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local cg=Duel.GetMatchingGroup(s.drcostfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(cg,e,tp,1,1,s.rescon,0) end local g=aux.SelectUnselectGroup(cg,e,tp,1,3,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -74,4 +74,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2834264.lua b/official/c2834264.lua index 9906a606de..b373b2d554 100644 --- a/official/c2834264.lua +++ b/official/c2834264.lua @@ -1,5 +1,5 @@ --Beetrooper Armor Horn ---Scripted by Zefile +--Beetrooper Armor Horn local s,id=GetID() function s.initial_effect(c) --link summon @@ -41,12 +41,12 @@ function s.nsfilter(c) return c:IsRace(RACE_INSECT) and c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.Summon(tp,tc,true,nil) @@ -57,9 +57,9 @@ function s.rmfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,c) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,3,c) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,3,3,c) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,8 +76,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c28346136.lua b/official/c28346136.lua index d93fceb054..4a09ce68c5 100644 --- a/official/c28346136.lua +++ b/official/c28346136.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.cannottgtg) e1:SetOperation(s.cannottgop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c28348537.lua b/official/c28348537.lua index 0c05db51ce..4d02f58817 100644 --- a/official/c28348537.lua +++ b/official/c28348537.lua @@ -22,7 +22,7 @@ function s.actlimit(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(0,1) e1:SetValue(s.elimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.elimit(e,te,tp) diff --git a/official/c28348939.lua b/official/c28348939.lua index aa9b4fcad5..e34b8ffc43 100644 --- a/official/c28348939.lua +++ b/official/c28348939.lua @@ -1,4 +1,5 @@ --白虎の召喚士 +--White Tiger Summoner local s,id=GetID() function s.initial_effect(c) --spsummon @@ -37,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28355718.lua b/official/c28355718.lua index ebee666875..082288d666 100644 --- a/official/c28355718.lua +++ b/official/c28355718.lua @@ -32,16 +32,16 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,1) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -58,4 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c28357177.lua b/official/c28357177.lua index 6753a3b92c..eb66ad5f9d 100644 --- a/official/c28357177.lua +++ b/official/c28357177.lua @@ -1,4 +1,5 @@ --派手ハネ +--Hade-Hane local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c28358902.lua b/official/c28358902.lua index d4b5acf934..0c4565e466 100644 --- a/official/c28358902.lua +++ b/official/c28358902.lua @@ -1,4 +1,5 @@ --紅蓮の女守護兵 +--Crimson Sentry local s,id=GetID() function s.initial_effect(c) --to deck @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,tid) return c:IsMonster() and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToDeck() end @@ -30,6 +27,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28363749.lua b/official/c28363749.lua index 4a30ddee33..1e62accca3 100644 --- a/official/c28363749.lua +++ b/official/c28363749.lua @@ -1,8 +1,8 @@ --ファイヤーオパールヘッド ---Fire Opalhead +--Fire Opal Head -- local s,id=GetID() function s.initial_effect(c) --pendulum summon Pendulum.AddProcedure(c) -end +end \ No newline at end of file diff --git a/official/c28369508.lua b/official/c28369508.lua index c1a910f677..144acf17ef 100644 --- a/official/c28369508.lua +++ b/official/c28369508.lua @@ -27,20 +27,20 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER_E+TIMING_BATTLE_PHASE) - e3:SetCost(aux.bfgcost) + e3:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER_E|TIMING_BATTLE_PHASE) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.postg) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} function s.cfilter(c) - return c:IsSetCard(0xed) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SUBTERROR) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,0) e1:SetTarget(s.tgfilter) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) @@ -67,7 +67,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xed) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SUBTERROR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -82,7 +82,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xed) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_SUBTERROR) and c:IsCanTurnSet() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -96,4 +96,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c28373620.lua b/official/c28373620.lua index e10d508812..e3c5507762 100644 --- a/official/c28373620.lua +++ b/official/c28373620.lua @@ -1,14 +1,13 @@ --神碑の牙ゲーリ ---Geri, Fangs of the Mysterune +--Geri the Runick Fangs --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --2 "Mysterune" monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x180),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RUNICK),2) --If Special Summoned from the Extra Deck, add 1 "Mysterune" non-Quick-Play Spell from GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -40,11 +39,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Mysterune" archetype -s.listed_series={0x180} - +s.listed_series={SET_RUNICK} --Check for a non-Quick-Play "Mysterune" Spell function s.thfilter(c) - return c:IsSetCard(0x180) and not c:IsType(TYPE_QUICKPLAY) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_RUNICK) and not c:IsType(TYPE_QUICKPLAY) and c:IsSpell() and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c28378427.lua b/official/c28378427.lua index 8341e7eb7c..05dadb320c 100644 --- a/official/c28378427.lua +++ b/official/c28378427.lua @@ -1,4 +1,5 @@ --ダメージ・コンデンサー +--Damage Condenser local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp,dam) return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c28388296.lua b/official/c28388296.lua index 789a2c2a7c..9d2d0ae521 100644 --- a/official/c28388296.lua +++ b/official/c28388296.lua @@ -1,4 +1,5 @@ --スクラップ・ファクトリー +--Scrap Factory local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x24)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SCRAP)) e2:SetValue(200) c:RegisterEffect(e2) local e3=e2:Clone() @@ -31,16 +32,16 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.cfilter(c,tp) - return c:IsSetCard(0x24) and c:IsMonster() and (c:GetReason()&0x41)==0x41 + return c:IsSetCard(SET_SCRAP) and c:IsMonster() and (c:GetReason()&SET_LV)==SET_LV and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SCRAP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -55,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28388927.lua b/official/c28388927.lua index 5484ac2b5a..f5f28a839b 100644 --- a/official/c28388927.lua +++ b/official/c28388927.lua @@ -31,10 +31,10 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x12f} +s.listed_series={SET_BATTLEWASP} s.listed_names={} function s.thfilter(c) - return c:IsSetCard(0x12f) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_BATTLEWASP) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -74,12 +74,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c28400508.lua b/official/c28400508.lua index d629564f5d..777aaf8b9f 100644 --- a/official/c28400508.lua +++ b/official/c28400508.lua @@ -21,16 +21,16 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.listed_names={id} s.xyz_number=97 function s.spfilter(c) - return c:IsRace(RACE_DRAGON) and c:IsSetCard(0x48) and not c:IsCode(id) + return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_NUMBER) and not c:IsCode(id) end function s.spchk(c,e,tp) if not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end @@ -43,13 +43,13 @@ function s.rescon(sg,e,tp,mg) return sg:IsExists(s.spchk,1,nil,e,tp) and sg:GetClassCount(Card.GetCode)==#sg end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) if aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) then local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_SELECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -65,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetLabelObject(tc) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -76,9 +76,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.atktg(e,c) return e:GetLabelObject()~=c -end +end \ No newline at end of file diff --git a/official/c28403802.lua b/official/c28403802.lua index a6f7d17d58..d11139c9d9 100644 --- a/official/c28403802.lua +++ b/official/c28403802.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.thgcon) - e1:SetCost(s.thgcost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.thgtg) e1:SetOperation(s.thgop) c:RegisterEffect(e1) @@ -33,14 +33,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} function s.thgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) or - (re and re:GetHandler():IsSetCard(0x173)) -end -function s.thgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) + return e:GetHandler():IsSynchroSummoned() or + (re and re:GetHandler():IsSetCard(SET_PUNK)) end function s.thgfilter(c) return c:IsLevel(3) and c:IsRace(RACE_PSYCHIC) and (c:IsAbleToHand() or c:IsAbleToGrave()) @@ -59,7 +55,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) if ch<=0 then return false end local cplayer=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER) local ceff=Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_EFFECT) - return ep==1-tp and cplayer==tp and ceff:GetHandler():IsSetCard(0x173) + return ep==1-tp and cplayer==tp and ceff:GetHandler():IsSetCard(SET_PUNK) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -71,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c28406301.lua b/official/c28406301.lua index cba1089993..743d8b0c65 100644 --- a/official/c28406301.lua +++ b/official/c28406301.lua @@ -1,10 +1,11 @@ --- DDグリフォン --- D/D Griffon --- Scripted by Hatter +--DDグリフォン +--D/D Gryphon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) + --Pendulum Summon procedure Pendulum.AddProcedure(c) - -- Gain ATK + --Make 1 Fiend monster you control gainx 500 ATK (until the end of this turn) for each "Dark Contract" Spell/Trap with different names currently on your field or in your GY, then destroy this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) @@ -15,18 +16,18 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon this card from your hand in Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.spcon) + e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DD),tp,LOCATION_MZONE,0,1,nil) end) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Draw + --Draw 1 card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DRAW) @@ -34,64 +35,62 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCountLimit(1,{id,2}) - e3:SetCondition(s.drcon) - e3:SetCost(s.drcost) + e3:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) + e3:SetCost(Cost.Discard(function(c) return c:IsSetCard({SET_DD,SET_DARK_CONTRACT}) end)) e3:SetTarget(s.drtg) e3:SetOperation(s.drop) c:RegisterEffect(e3) - -- Search + --Add 1 "D/D" card from your Deck to your hand, except "D/D Gryphon" local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) + e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCountLimit(1,{id,3}) - e4:SetCondition(s.thcon) + e4:SetCondition(function(e) return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) end) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end s.listed_names={id} -s.listed_series={0xae,0xaf} -function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xae) and c:IsSpellTrap() +s.listed_series={SET_DARK_CONTRACT,SET_DD} +function s.atkctfilter(c) + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsSpellTrap() and c:IsFaceup() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsRace(RACE_FIEND) end - if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkctfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then - local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) - if #g<1 then return end - -- Update ATK + if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then + local g=Duel.GetMatchingGroup(s.atkctfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) + if #g==0 then return end + local c=e:GetHandler() + --It gains 500 ATK (until the end of this turn) for each "Dark Contract" Spell/Trap with different names currently on your field or in your GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(g:GetClassCount(Card.GetCode)*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - Duel.BreakEffect() - Duel.Destroy(c,REASON_EFFECT) + if c:IsRelateToEffect(e) then + Duel.BreakEffect() + Duel.Destroy(c,REASON_EFFECT) + end end end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xaf),tp,LOCATION_MZONE,0,1,nil) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -99,16 +98,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) -end -function s.drcostfilter(c) - return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsDiscardable() -end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.drcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.drcostfilter,1,1,REASON_DISCARD+REASON_COST) -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -119,11 +108,8 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) -end function s.thfilter(c) - return c:IsSetCard(0xaf) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DD) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -136,4 +122,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end \ No newline at end of file +end diff --git a/official/c284224.lua b/official/c284224.lua index 059e130d4a..c0fd930038 100644 --- a/official/c284224.lua +++ b/official/c284224.lua @@ -1,14 +1,13 @@ --双天将 密迹 ---Dual Avatar - Empowered Mi-Gyo +--Dual Avatar - Empowered Mitsu-Jaku --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcMixN(c,true,true,11759079,1,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14e),2) + Fusion.AddProcMixN(c,true,true,11759079,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DUAL_AVATAR),2) --Each "Dual Avatar" fusion monster get protected once by battle, each turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -42,13 +41,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Dual Avatar" archetype in fusion recipe -s.material_setcode={0x14e} +s.material_setcode={SET_DUAL_AVATAR} --Lists "Dual Avatar" archetype -s.listed_series={0x14e} - +s.listed_series={SET_DUAL_AVATAR} --Check for "Dual Avatar" fusion monsters function s.indtg(e,c) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x14e) + return c:IsType(TYPE_FUSION) and c:IsSetCard(SET_DUAL_AVATAR) end --Cannot be destroy by battle, once per turn function s.indct(e,re,r,rp) @@ -73,7 +71,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) end --If a monster effect is activated on opponent's field, while you control 2+ fusion monsters function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsOnField() and re:IsActiveType(TYPE_MONSTER) and ep==1-tp + return re:GetHandler():IsOnField() and re:IsMonsterEffect() and ep==1-tp and Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_FUSION),tp,LOCATION_MZONE,0,nil)>=2 end --Activation legality diff --git a/official/c28423537.lua b/official/c28423537.lua index 4c8743e226..686200b792 100644 --- a/official/c28423537.lua +++ b/official/c28423537.lua @@ -1,4 +1,5 @@ --戦慄の凶皇-ジェネシス・デーモン +--Archfiend Emperor, the First Lord of Horror local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -32,7 +33,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 @@ -69,12 +70,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.rfilter(c) - return c:IsSetCard(0x45) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) + return c:IsSetCard(SET_ARCHFIEND) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -89,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28427869.lua b/official/c28427869.lua index 92d549fb37..211896a666 100644 --- a/official/c28427869.lua +++ b/official/c28427869.lua @@ -45,9 +45,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end function s.lvfilter(c,lv) @@ -68,7 +68,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c28429121.lua b/official/c28429121.lua index e34e5d92f5..dde4b8f941 100644 --- a/official/c28429121.lua +++ b/official/c28429121.lua @@ -3,11 +3,11 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Ritual.CreateProc(c,RITPROC_EQUAL,aux.FilterBoolFunction(Card.IsSetCard,0x3a),nil,nil,s.extrafil,s.extraop,aux.FilterBoolFunction(Card.IsOnField)) + local e1=Ritual.CreateProc(c,RITPROC_EQUAL,aux.FilterBoolFunction(Card.IsSetCard,SET_GISHKI),nil,nil,s.extrafil,s.extraop,aux.FilterBoolFunction(Card.IsOnField)) e1:SetCost(s.cost) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end local e1=Effect.CreateEffect(e:GetHandler()) @@ -15,7 +15,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.mfilter(c,e) @@ -30,6 +30,6 @@ function s.extraop(mat,e,tp,eg,ep,ev,re,r,rp,sc) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(sc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) sc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c2843014.lua b/official/c2843014.lua index 9e387a84be..8031a7151f 100644 --- a/official/c2843014.lua +++ b/official/c2843014.lua @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c28465301.lua b/official/c28465301.lua index 525d122708..7e45f1cc2f 100644 --- a/official/c28465301.lua +++ b/official/c28465301.lua @@ -1,4 +1,5 @@ --ワーム・オペラ +--Worm Opera local s,id=GetID() function s.initial_effect(c) --flip @@ -8,9 +9,9 @@ function s.initial_effect(c) e1:SetOperation(s.valop) c:RegisterEffect(e1) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.filter(c) - return c:IsFaceup() and not (c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)) + return c:IsFaceup() and not (c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE)) end function s.valop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -20,7 +21,7 @@ function s.valop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c28470714.lua b/official/c28470714.lua index 8ed4c2d62e..17efb8e24b 100644 --- a/official/c28470714.lua +++ b/official/c28470714.lua @@ -1,4 +1,5 @@ --ブレードフライ +--Bladefly local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -19,4 +20,4 @@ function s.tg1(e,c) end function s.tg2(e,c) return c:IsAttribute(ATTRIBUTE_EARTH) -end +end \ No newline at end of file diff --git a/official/c28486799.lua b/official/c28486799.lua index 6b3ce10ce8..5f607193b2 100644 --- a/official/c28486799.lua +++ b/official/c28486799.lua @@ -1,4 +1,5 @@ --補充部隊 +--Backup Squad local s,id=GetID() function s.initial_effect(c) --activate @@ -35,4 +36,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if d>0 then Duel.Draw(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28506708.lua b/official/c28506708.lua index a87e2f825e..d02076287d 100644 --- a/official/c28506708.lua +++ b/official/c28506708.lua @@ -1,4 +1,5 @@ --ワーム・コール +--Worm Call local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,13 +19,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 end function s.filter(c,e,sp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c2851070.lua b/official/c2851070.lua index 818f3aaf81..73138dc02d 100644 --- a/official/c2851070.lua +++ b/official/c2851070.lua @@ -1,4 +1,5 @@ --魔鏡導士リフレクト・バウンダー +--Reflect Bounder local s,id=GetID() function s.initial_effect(c) --damage @@ -36,7 +37,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,Duel.GetAttacker():GetAttack(),REASON_EFFECT) local lp2=Duel.GetLP(p) if lp20 and lv<=2 and c:IsRace(RACE_PLANT) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,lv+3,e,tp) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,lv+3,e,tp) end function s.filter(c,lv,e,tp) return c:IsLevelBelow(lv) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -39,14 +40,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,e,tp,ft) e:SetLabel(rg:GetFirst():GetLevel()+3) Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) @@ -65,4 +66,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28534130.lua b/official/c28534130.lua index 12aa92e2ee..3c12c07c29 100644 --- a/official/c28534130.lua +++ b/official/c28534130.lua @@ -1,7 +1,6 @@ --転生炎獣の炎虞 --Salamangreat Burning Shell --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Salamangreat" monster from hand, then link summon 1 "Salamangreat" monster @@ -19,25 +18,24 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x119} - +s.listed_series={SET_SALAMANGREAT} function s.spfilter2(c,mc,fg) - return c:IsSetCard(0x119) and c:IsLinkSummonable(mc,fg+mc) + return c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkSummonable(mc,fg+mc) end function s.spfilter(c,e,tp,fg) - return c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,c,fg) + return c:IsSetCard(SET_SALAMANGREAT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,c,fg) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local fg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCanBeLinkMaterial),tp,LOCATION_MZONE,0,nil) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,fg) and Duel.IsPlayerCanSpecialSummonCount(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -52,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -66,7 +64,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) e3:SetOperation(s.regop) sc:RegisterEffect(e3) Duel.LinkSummon(tp,sc,tc,nil) @@ -81,7 +79,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Cannot activate its effects local e2=e1:Clone() @@ -91,7 +89,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e:Reset() end function s.tdfilter(c) - return c:IsSetCard(0x119) and c:IsType(TYPE_LINK) and c:IsAbleToExtra() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsType(TYPE_LINK) and c:IsAbleToExtra() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -103,6 +101,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c28563545.lua b/official/c28563545.lua index 8a4c757124..a6a58c3e4a 100644 --- a/official/c28563545.lua +++ b/official/c28563545.lua @@ -1,4 +1,5 @@ --竜殺者 +--Dragon Seeker local s,id=GetID() function s.initial_effect(c) --destroy @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and s.filter(tc) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28565527.lua b/official/c28565527.lua index 7b415b0b74..e4b440a08a 100644 --- a/official/c28565527.lua +++ b/official/c28565527.lua @@ -1,4 +1,5 @@ --黄龍の召喚士 +--Golden Dragon Summoner local s,id=GetID() function s.initial_effect(c) --tohand @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28566710.lua b/official/c28566710.lua index 1cd6c902e1..7bcb9e094d 100644 --- a/official/c28566710.lua +++ b/official/c28566710.lua @@ -27,7 +27,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local tg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil) local tc=tg:GetFirst() - local hg=Duel.GetFieldGroup(tp,0xe,0xe) + local hg=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD) if tc then hg:RemoveCard(tc) end Duel.SendtoGrave(hg,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetTargetRange(1,1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) if tc then Duel.ForceAttack(sc,tc) end end @@ -49,10 +49,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - if Duel.GetCurrentPhase()==PHASE_END then - e1:SetReset(RESET_PHASE+PHASE_END,2) + if Duel.IsPhase(PHASE_END) then + e1:SetReset(RESET_PHASE|PHASE_END,2) else - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) end e1:SetOperation(s.checkop) Duel.RegisterEffect(e1,tp) @@ -67,4 +67,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) else Duel.Win(PLAYER_NONE,WIN_REASON_LAST_TURN) end -end +end \ No newline at end of file diff --git a/official/c28570310.lua b/official/c28570310.lua index ae3086c3af..ef9701f023 100644 --- a/official/c28570310.lua +++ b/official/c28570310.lua @@ -70,7 +70,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end diff --git a/official/c28573958.lua b/official/c28573958.lua index 022f466886..e9b0d3ca0f 100644 --- a/official/c28573958.lua +++ b/official/c28573958.lua @@ -28,10 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x44} +s.listed_series={SET_THE_AGENT} s.listed_names={CARD_SANCTUARY_SKY} function s.cfilter1(c) - return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_THE_AGENT) and c:IsAbleToRemoveAsCost() end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_GRAVE,0,1,nil) end @@ -56,7 +56,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -71,7 +71,7 @@ function s.cfilter2(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter2,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter2,1,1,REASON_COST|REASON_DISCARD) end function s.filter2(c,e,tp) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2857636.lua b/official/c2857636.lua index f63f4500d2..2f20eede1e 100644 --- a/official/c2857636.lua +++ b/official/c2857636.lua @@ -31,17 +31,17 @@ function s.lcheck(g,lc) return g:GetClassCount(Card.GetCode)==#g end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) if e:GetHandler():GetMutualLinkedGroupCount()>0 then e:SetLabel(1) @@ -63,5 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indtg(e,c) return c:GetMutualLinkedGroupCount()>0 -end - +end \ No newline at end of file diff --git a/official/c28577986.lua b/official/c28577986.lua index 15cccf64e6..3cdb85f7cf 100644 --- a/official/c28577986.lua +++ b/official/c28577986.lua @@ -14,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.cfilter(c,e,tp) local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and c:IsSetCard(0x74) + return lv>0 and c:IsFaceup() and c:IsSetCard(SET_MERMAIL) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,lv,e,tp) end function s.spfilter(c,lv,e,tp) if lv>4 then lv=4 end - return c:IsLevelBelow(lv) and c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(lv) and c:IsSetCard(SET_MERMAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.cfilter(chkc,e,tp) end @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) Duel.BreakEffect() Duel.SendtoGrave(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28593329.lua b/official/c28593329.lua index a81c86f17f..f33ac0a751 100644 --- a/official/c28593329.lua +++ b/official/c28593329.lua @@ -1,4 +1,5 @@ --ダーク・エンジェル +--Dark Angel local s,id=GetID() function s.initial_effect(c) --atkup @@ -38,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c28593363.lua b/official/c28593363.lua index a9767994a4..60fa00f6af 100644 --- a/official/c28593363.lua +++ b/official/c28593363.lua @@ -1,7 +1,8 @@ --深海に潜むサメ +--Deepsea Shark local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,81386177,69572024) -end +end \ No newline at end of file diff --git a/official/c28596933.lua b/official/c28596933.lua index df46aa32ea..f2103540a1 100644 --- a/official/c28596933.lua +++ b/official/c28596933.lua @@ -1,4 +1,5 @@ --巨竜の羽ばたき +--A Wingbeat of Giant Dragon local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLevelAbove(5) and c:IsAbleToHand() end function s.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28601770.lua b/official/c28601770.lua index 9329360f98..57151202dc 100644 --- a/official/c28601770.lua +++ b/official/c28601770.lua @@ -27,7 +27,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_TEMP_REMOVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD-RESET_TEMP_REMOVE) c:RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +40,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Destroy(c,REASON_EFFECT)~=0 then Duel.Damage(tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28604635.lua b/official/c28604635.lua index 76a114f758..6560847641 100644 --- a/official/c28604635.lua +++ b/official/c28604635.lua @@ -1,4 +1,5 @@ --ふるい落とし +--Weed Out local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,15 +7,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:GetLevel()==3 end @@ -26,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28617139.lua b/official/c28617139.lua index 7a45ded050..47aedce165 100644 --- a/official/c28617139.lua +++ b/official/c28617139.lua @@ -1,5 +1,5 @@ --神鳥の来寇 ---Simorgh Arrival +--Simorgh Onslaught --scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -18,21 +18,21 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rvtg) e2:SetOperation(s.rvop) c:RegisterEffect(e2) end -s.listed_series={0x12d} +s.listed_series={SET_SIMORGH} function s.cfilter(c) return c:IsDiscardable() and c:IsRace(RACE_WINGEDBEAST) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0x12d) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SIMORGH) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -71,13 +71,13 @@ function s.rvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_TO_HAND) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabel(g:GetFirst():GetCode()) e2:SetOperation(s.hlvop) Duel.RegisterEffect(e2,tp) @@ -93,7 +93,7 @@ function s.hlvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c28630501.lua b/official/c28630501.lua index e70f7c760a..7386e91ac3 100644 --- a/official/c28630501.lua +++ b/official/c28630501.lua @@ -32,10 +32,10 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xb3) and not c:IsCode(id) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_YOSENJU) and not c:IsCode(id) and c:IsSummonable(true,nil) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -50,10 +50,10 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(0xb3) and tc~=e:GetHandler() + return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(SET_YOSENJU) and tc~=e:GetHandler() end function s.thfilter(c) - return c:IsSetCard(0xb3) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_YOSENJU) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -90,4 +90,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28637168.lua b/official/c28637168.lua index 212bf4932e..29b40ee42f 100644 --- a/official/c28637168.lua +++ b/official/c28637168.lua @@ -1,4 +1,5 @@ --クレーンクレーン +--Crane Crane local s,id=GetID() function s.initial_effect(c) --spsummon @@ -31,13 +32,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c286392.lua b/official/c286392.lua index f073794b18..f8e81f7b88 100644 --- a/official/c286392.lua +++ b/official/c286392.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) end s.material={9742784} s.listed_names={9742784} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,9742784) or c:IsHasEffect(20932152) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -73,8 +73,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c28643791.lua b/official/c28643791.lua index fc6b552712..0378ea4d98 100644 --- a/official/c28643791.lua +++ b/official/c28643791.lua @@ -1,6 +1,5 @@ --最後の進軍 --March Towards Ragnarok - local s,id=GetID() function s.initial_effect(c) --Targeted "Aesir" monster has its effects negated, also unaffected by spells/traps @@ -13,10 +12,9 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x4b} - +s.listed_series={SET_AESIR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) + return c:IsFaceup() and c:IsSetCard(SET_AESIR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -32,12 +30,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --Unaffected by spells/traps local e3=Effect.CreateEffect(c) @@ -46,10 +44,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetValue(s.imfilter) - e3:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) tc:RegisterEffect(e3) end end function s.imfilter(e,re) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetOwner()~=e:GetOwner() + return re:IsSpellTrapEffect() and re:GetOwner()~=e:GetOwner() end \ No newline at end of file diff --git a/official/c28645123.lua b/official/c28645123.lua index 771a91b13f..f72d7265e8 100644 --- a/official/c28645123.lua +++ b/official/c28645123.lua @@ -1,8 +1,8 @@ --果たし-Ai- ---Mano A.I. Mano +--A.I. Challenge You --Scripted by Eerie Code local s,id=GetID() -function s.initial_effect(c) +function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetTargetRange(0,1) e3:SetValue(1) e3:SetCondition(s.actcon) - c:RegisterEffect(e3) + c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) @@ -43,9 +43,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.acfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x135) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_IGNISTER) and c:IsControler(tp) end function s.actcon(e) local tp=e:GetHandlerPlayer() @@ -54,7 +54,7 @@ function s.actcon(e) return (a and s.acfilter(a,tp)) or (d and s.acfilter(d,tp)) end function s.cfilter(c,tp) - return c:IsSetCard(0x135) and c:IsReason(REASON_BATTLE) + return c:IsSetCard(SET_IGNISTER) and c:IsReason(REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28649820.lua b/official/c28649820.lua index 0e5cbadbbd..a3cadb5902 100644 --- a/official/c28649820.lua +++ b/official/c28649820.lua @@ -1,4 +1,5 @@ --アポピスの化神 +--Embodiment of Apophis local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,20 +14,20 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c28651380.lua b/official/c28651380.lua index 734dfe19c6..0c2200b503 100644 --- a/official/c28651380.lua +++ b/official/c28651380.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) - e3:SetCondition(s.adcon) - e3:SetCost(s.adcost) + e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) + e3:SetCondition(aux.StatChangeDamageStepCondition) + e3:SetCost(Cost.SelfDiscard) e3:SetTarget(s.adtg) e3:SetOperation(s.adop) c:RegisterEffect(e3) @@ -79,13 +79,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end Duel.Release(g,REASON_COST) end -function s.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsFaceup() and c:IsCode(69890967) end @@ -98,19 +91,19 @@ end function s.adop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetValue(1) e2:SetCode(EFFECT_ATTACK_ALL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -127,4 +120,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28654932.lua b/official/c28654932.lua index bf0921fdc8..1f8d2bfbdc 100644 --- a/official/c28654932.lua +++ b/official/c28654932.lua @@ -26,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28674152.lua b/official/c28674152.lua index 511859be1b..cffe2a6b05 100644 --- a/official/c28674152.lua +++ b/official/c28674152.lua @@ -16,11 +16,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={28674153} -s.counter_list={0x37} -s.listed_series={0xd3} +s.counter_list={COUNTER_KAIJU} +s.listed_series={SET_KAIJU} function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,8 +35,8 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) token:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c28677304.lua b/official/c28677304.lua index 8d9fcd079a..83e32d6c9a 100644 --- a/official/c28677304.lua +++ b/official/c28677304.lua @@ -1,5 +1,5 @@ --E・HERO ブラック・ネオス ---Elemental Hero Darkneos +--Elemental HERO Dark Neos local s,id=GetID() function s.initial_effect(c) --Fusion Material @@ -20,13 +20,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -54,7 +54,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) end diff --git a/official/c28692962.lua b/official/c28692962.lua index 2e3a71ab2d..5f1b10d6f3 100644 --- a/official/c28692962.lua +++ b/official/c28692962.lua @@ -1,7 +1,6 @@ --紫宵の機界騎士 --Mekk-Knight Purple Nightfall --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -27,9 +26,8 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10c} +s.listed_series={SET_MEKK_KNIGHT} s.listed_names={id} - function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -43,10 +41,10 @@ function s.hspval(e,c) return 0,zone end function s.rmfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10c) and c:IsAbleToRemove() + return c:IsFaceup() and c:IsSetCard(SET_MEKK_KNIGHT) and c:IsAbleToRemove() end function s.thfilter(c) - return c:IsSetCard(0x10c) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.rmfilter(chkc) end @@ -59,20 +57,20 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 + if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY)~=0 and tc:IsLocation(LOCATION_REMOVED) then - local ct=(Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY) and 2 or 1 - local val=(Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY) and Duel.GetTurnCount() or (Duel.GetTurnCount()-1) + local ct=(Duel.IsTurnPlayer(tp) and Duel.GetCurrentPhase()<=PHASE_STANDBY) and 2 or 1 + local val=(Duel.IsTurnPlayer(tp) and Duel.GetCurrentPhase()<=PHASE_STANDBY) and Duel.GetTurnCount() or (Duel.GetTurnCount()-1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) e1:SetLabel(val) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,ct) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,ct) Duel.RegisterEffect(e1,tp) tc:CreateEffectRelation(e1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -84,11 +82,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetLabel() then return false end + if Duel.IsTurnPlayer(1-tp) or Duel.GetTurnCount()==e:GetLabel() then return false end local tc=e:GetLabelObject() return tc:IsRelateToEffect(e) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.ReturnToField(tc) -end +end \ No newline at end of file diff --git a/official/c28711704.lua b/official/c28711704.lua index 81f61d5376..7535a4cca9 100644 --- a/official/c28711704.lua +++ b/official/c28711704.lua @@ -1,7 +1,6 @@ --トゥーン・カオス・ソルジャー --Toon Black Luster Soldier --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -37,7 +36,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={15259703} - function s.spfilter(c) return c:IsMonster() and c:IsType(TYPE_TOON) and c:HasLevel() and c:IsLevelAbove(1) and c:IsReleasable() end @@ -51,14 +49,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,e:GetHandler()) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,e:GetHandler()) return aux.SelectUnselectGroup(rg,e,tp,1,99,s.rescon,0) end function s.breakcon(sg,e,tp,mg) return sg:GetSum(Card.GetLevel)>=8 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,e:GetHandler()) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,e:GetHandler()) local mg=aux.SelectUnselectGroup(rg,e,tp,1,99,s.rescon,1,tp,HINTMSG_RELEASE,s.breakcon,s.breakcon,true) if #mg>0 then mg:KeepAlive() @@ -90,7 +88,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c28715905.lua b/official/c28715905.lua index a973173971..6c585cf898 100644 --- a/official/c28715905.lua +++ b/official/c28715905.lua @@ -1,5 +1,5 @@ --ベアルクティ-メガポーラ ---Ursarctic Megapola +--Ursarctic Megapolar --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -19,10 +19,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} --Pop function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x165) + return c:IsFaceup() and c:IsSetCard(SET_URSARCTIC) end function s.pfilter(c) return c:IsSpellTrap() and c:IsDestructable() @@ -42,4 +42,4 @@ function s.popop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28720123.lua b/official/c28720123.lua index 9697d3bcee..572c2c1d54 100644 --- a/official/c28720123.lua +++ b/official/c28720123.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xd8,0xc7} +s.listed_series={SET_DINOMIST,SET_DRACOSLAYER} function s.spfilter(c,e,tp) - return (c:IsSetCard(0xd8) or c:IsSetCard(0xc7)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_DINOMIST) or c:IsSetCard(SET_DRACOSLAYER)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return (c:IsSetCard(0xd8) or c:IsSetCard(0xc7)) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsFaceup() and c:IsAbleToHand() + return (c:IsSetCard(SET_DINOMIST) or c:IsSetCard(SET_DRACOSLAYER)) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsFaceup() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end diff --git a/official/c28725004.lua b/official/c28725004.lua index c0117fff2e..8616967bd3 100644 --- a/official/c28725004.lua +++ b/official/c28725004.lua @@ -1,4 +1,5 @@ --悪魔の知恵 +--Tainted Wisdom local s,id=GetID() function s.initial_effect(c) --shuffle @@ -15,4 +16,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(tp) -end +end \ No newline at end of file diff --git a/official/c28741524.lua b/official/c28741524.lua index 6c78e40994..3aa0dfbb5d 100644 --- a/official/c28741524.lua +++ b/official/c28741524.lua @@ -1,4 +1,5 @@ --念動収集機 +--Telekinetic Power Well local s,id=GetID() function s.initial_effect(c) --activate @@ -38,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(tp,lv*300,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28754338.lua b/official/c28754338.lua index 733cf7da00..02b8b1435c 100644 --- a/official/c28754338.lua +++ b/official/c28754338.lua @@ -1,4 +1,5 @@ --真海皇 トライドン +--Legendary Atlantean Tridon local s,id=GetID() function s.initial_effect(c) --special summon @@ -34,14 +35,14 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.BreakEffect() local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) @@ -51,8 +52,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c28762303.lua b/official/c28762303.lua index a460587611..5af8d1d965 100644 --- a/official/c28762303.lua +++ b/official/c28762303.lua @@ -1,9 +1,9 @@ --- 氷水のアクティ --- Icejade Tinola --- Scripted by Hatter +--氷水のアクティ +--Icejade Tinola +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Send itself to GY and Special Summon 1 WATER monster from the GY + --Send itself to GY and Special Summon 1 WATER monster from the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) - -- Special Summon 1 "Icejade" monster from the hand or Deck + --Special Summon 1 "Icejade" monster from the hand or Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -60,7 +60,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.spconfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c28770951.lua b/official/c28770951.lua index 2f55eb57c0..c5751aff6d 100644 --- a/official/c28770951.lua +++ b/official/c28770951.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} function s.matfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsType(TYPE_XYZ) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.matfilter(chkc) end @@ -46,7 +46,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c,e) - return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) + return (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -61,13 +61,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c28776350.lua b/official/c28776350.lua index 22385f04ab..68b90ae733 100644 --- a/official/c28776350.lua +++ b/official/c28776350.lua @@ -42,7 +42,7 @@ function s.spcheck(g,lc,tp) return g:CheckSameProperty(Card.GetRace,lc,SUMMON_TYPE_LINK,tp) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -58,7 +58,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsCode(id) and sumtype&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local lg=e:GetHandler():GetLinkedGroup():Filter(Card.IsAbleToHand,nil) diff --git a/official/c28781003.lua b/official/c28781003.lua index f532818051..f16dd480a7 100644 --- a/official/c28781003.lua +++ b/official/c28781003.lua @@ -13,18 +13,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x10db,0xba,0x2073} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR,SET_XYZ_DRAGON} function s.spfilter(c,e,tp,mc,rk,pg) - return c:IsType(TYPE_XYZ) and (c:IsSetCard(0xba) or c:IsSetCard(0x2073) or c:IsSetCard(0x10db)) + return c:IsType(TYPE_XYZ) and (c:IsSetCard(SET_RAIDRAPTOR) or c:IsSetCard(SET_XYZ_DRAGON) or c:IsSetCard(SET_THE_PHANTOM_KNIGHTS)) and (c:IsRank(rk-1) or c:IsRank(rk+1)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and (#pg<=0 or pg:IsContains(mc)) @@ -60,8 +56,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(sc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) + sc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) Duel.RegisterEffect(e1,tp) end end @@ -73,4 +69,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() Duel.Destroy(sc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28798938.lua b/official/c28798938.lua index 620c64aea7..a02cc4b9f8 100644 --- a/official/c28798938.lua +++ b/official/c28798938.lua @@ -51,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetCondition(function() return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL end) + e1:SetCondition(function() return Duel.IsPhase(PHASE_DAMAGE_CAL) end) e1:SetTarget(function(_,c) return c:IsSetCard(SET_DUAL_AVATAR) and c:IsRelateToBattle() end) e1:SetValue(3000) e1:SetReset(RESET_EVENT|RESETS_STANDARD) diff --git a/official/c28806532.lua b/official/c28806532.lua index 0d9c1c4a68..676a37ebe6 100644 --- a/official/c28806532.lua +++ b/official/c28806532.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) diff --git a/official/c2881864.lua b/official/c2881864.lua index e7e6c302d6..64e1727940 100644 --- a/official/c2881864.lua +++ b/official/c2881864.lua @@ -1,5 +1,5 @@ --炎の王 ナグルファー ---Naglfar, Generaid of Flames +--Naglfar, Generaider Boss of Fire --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -15,17 +15,17 @@ function s.initial_effect(c) e1:SetOperation(s.desrepop) c:RegisterEffect(e1) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.repfilter(c,tp) return c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) return c:IsControler(tp) and c:IsMonster() and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x134) or c:IsRace(RACE_BEASTWARRIOR)) + return c:IsFaceup() and (c:IsSetCard(SET_GENERAIDER) or c:IsRace(RACE_BEASTWARRIOR)) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) @@ -46,5 +46,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c28827503.lua b/official/c28827503.lua index c28a8a522d..2290ffd464 100644 --- a/official/c28827503.lua +++ b/official/c28827503.lua @@ -1,5 +1,5 @@ --Into the VRAINS! ---Into the VRAINS! +--Link into the VRAINS! --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DESTROYED) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -37,7 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,fg) and Duel.IsPlayerCanSpecialSummonCount(tp,2) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -82,7 +82,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.effcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.spsumsuc(e,tp,eg,ep,ev,re,r,rp) Duel.SetChainLimitTillChainEnd(s.chlimit) @@ -93,7 +93,7 @@ function s.chlimit(e,ep,tp) return tp==ep end function s.thcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField() & TYPE_LINK ~=0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetOriginalRace()) end diff --git a/official/c28859794.lua b/official/c28859794.lua index c60769c97c..e0d0f97277 100644 --- a/official/c28859794.lua +++ b/official/c28859794.lua @@ -1,4 +1,5 @@ --シールド・ウィング +--Shield Wing local s,id=GetID() function s.initial_effect(c) --battle indes @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c28865322.lua b/official/c28865322.lua index 53c0d3cabe..b7214d1074 100644 --- a/official/c28865322.lua +++ b/official/c28865322.lua @@ -1,4 +1,5 @@ --魔装邪龍 イーサルウェポン +--Aether, the Evil Empowering Dragon local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -27,15 +28,15 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0xca} +s.listed_series={SET_EMPOWERED_WARRIOR} function s.cfilter(c) - return c:IsSetCard(0xca) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_EMPOWERED_WARRIOR) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -64,4 +65,4 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28868394.lua b/official/c28868394.lua index 0d677bb3b0..80b6aeaf78 100644 --- a/official/c28868394.lua +++ b/official/c28868394.lua @@ -1,7 +1,6 @@ --ジーナの蟲惑魔 ---Traptrix Ginalloa +--Traptrix Vesiculo --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -31,19 +30,18 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetCondition(s.setcon) e3:SetTarget(s.settg) e3:SetOperation(s.setop) c:RegisterEffect(e3) end --Lists "Hole" archetype -s.listed_series={0x4c,0x89} - +s.listed_series={SET_TRAP_HOLE,SET_HOLE} --Unaffected by "Hole" normal trap cards function s.efilter(e,te) local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end --Check for a set trap function s.cfilter(c) @@ -71,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Hole" normal trap function s.setfilter(c) - return c:GetType()==TYPE_TRAP and c:IsSSetable() and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return c:IsNormalTrap() and c:IsSSetable() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end --If you have no cards in your S/T zones function s.filter(c) diff --git a/official/c28877100.lua b/official/c28877100.lua index 6273af6988..b42215dc08 100644 --- a/official/c28877100.lua +++ b/official/c28877100.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x19),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),tp,LOCATION_MZONE,0,1,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -23,17 +23,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) if e:GetHandler():IsRelateToEffect(e) then e:GetHandler():CancelToGrave() - Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28877602.lua b/official/c28877602.lua index b9774a7f57..0343eea185 100644 --- a/official/c28877602.lua +++ b/official/c28877602.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,152,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,152,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -28,4 +28,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,152,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28884172.lua b/official/c28884172.lua index 4c4c76ed28..01a9e1ccae 100644 --- a/official/c28884172.lua +++ b/official/c28884172.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x54) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAGAGA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -48,11 +48,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x54) + return not c:IsSetCard(SET_GAGAGA) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -74,8 +74,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c28890974.lua b/official/c28890974.lua index c4d859e269..f9b4806558 100644 --- a/official/c28890974.lua +++ b/official/c28890974.lua @@ -1,4 +1,5 @@ --光神化 +--Celestial Transformation local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -39,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetCountLimit(1) tc:RegisterEffect(e2,true) end @@ -48,4 +49,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c28912357.lua b/official/c28912357.lua index 251e2e6821..0c42580478 100644 --- a/official/c28912357.lua +++ b/official/c28912357.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,21 +28,17 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x72} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_GEARGIA} function s.filter(c) return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -53,7 +49,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x72) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(3) and c:IsSetCard(SET_GEARGIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -68,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28927782.lua b/official/c28927782.lua index f0e1057e7b..940315f8fa 100644 --- a/official/c28927782.lua +++ b/official/c28927782.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.efop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.select(e,tp,b1,b2) local op=0 if b1 and b2 then @@ -44,15 +44,14 @@ function s.select(e,tp,b1,b2) end end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.eqfilter1(c,tp) - return c:IsFaceup() and c:IsSetCard(0x29) and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_GRAVE,0,1,nil,c,tp) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_GRAVE,0,1,nil,c,tp) end function s.eqfilter2(c,tc,tp) - return c:IsSetCard(0x29) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonster() and not c:IsForbidden() end - function s.eftg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then if e:GetLabel()==0 then @@ -90,7 +89,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit2) e1:SetLabelObject(ec) tc:RegisterEffect(e1) @@ -100,7 +99,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -108,8 +107,8 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x29) + return not c:IsSetCard(SET_DRAGUNITY) end function s.eqlimit2(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c28929131.lua b/official/c28929131.lua index ab1398dd7c..9387499b5a 100644 --- a/official/c28929131.lua +++ b/official/c28929131.lua @@ -1,4 +1,5 @@ --時械神ザフィオン +--Zaphion, the Timelord local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -35,7 +36,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_TODECK) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.tdcon) @@ -59,7 +60,7 @@ function s.initial_effect(c) e8:SetDescription(aux.Stringid(id,3)) e8:SetCategory(CATEGORY_TODECK) e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e8:SetCode(EVENT_PHASE+PHASE_STANDBY) + e8:SetCode(EVENT_PHASE|PHASE_STANDBY) e8:SetCountLimit(1) e8:SetRange(LOCATION_MZONE) e8:SetCondition(s.rtdcon) @@ -104,7 +105,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.rtdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -113,6 +114,6 @@ end function s.rtdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28933734.lua b/official/c28933734.lua index 0492d18b50..1844b4962c 100644 --- a/official/c28933734.lua +++ b/official/c28933734.lua @@ -1,4 +1,5 @@ --闇の仮面 +--Mask of Darkness local s,id=GetID() function s.initial_effect(c) --flip @@ -14,7 +15,7 @@ function s.filter(c) return c:IsTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c28954097.lua b/official/c28954097.lua index cf41844458..cecde526f7 100644 --- a/official/c28954097.lua +++ b/official/c28954097.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.negcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3) diff --git a/official/c28957126.lua b/official/c28957126.lua index e14e48afa9..eb19915df1 100644 --- a/official/c28957126.lua +++ b/official/c28957126.lua @@ -1,9 +1,9 @@ --ゴルゴネイオの呪眼 ---Evil Eye of Gorgone +--Evil Eye of Gorgoneio --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - local e0=aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x129)) + local e0=aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_EVIL_EYE)) e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) --change name local e1=Effect.CreateEffect(c) @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_EVIL_EYE_SELENE} -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} function s.atkcon(e) local tp=e:GetHandlerPlayer() return Duel.GetLP(tp)3 + return c:IsFaceup() and c:IsSetCard(SET_FORTUNE_LADY) and c:GetLevel()>3 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -38,8 +39,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c1:RegisterEffect(e1) if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2896663.lua b/official/c2896663.lua index 15fb8829d5..8f9832521d 100644 --- a/official/c2896663.lua +++ b/official/c2896663.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -48,14 +48,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x7e,0x107e,0x107f} - -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_ZEXAL,SET_ZW,SET_UTOPIA} function s.thfilter(c) - return c:IsSetCard(0x7e) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_ZEXAL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,7 +65,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -96,7 +91,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -105,7 +100,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ec==e:GetHandler():GetEquipTarget() and ec:IsStatus(STATUS_OPPO_BATTLE) and bc:IsMonster() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ZW) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -125,4 +120,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if #spg>0 then Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c28981598.lua b/official/c28981598.lua index 27ddff794b..6cd2b19b01 100644 --- a/official/c28981598.lua +++ b/official/c28981598.lua @@ -1,7 +1,6 @@ --九魂猫 --Nine-Lives Cat --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -25,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,10 +32,6 @@ end function s.tgfilter(e,c) return c:IsSummonLocation(LOCATION_GRAVE) and c~=e:GetHandler() end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsControler(1-tp) or c:IsLevel(9)) end diff --git a/official/c28985331.lua b/official/c28985331.lua index 638d414dbc..5dc20b3163 100644 --- a/official/c28985331.lua +++ b/official/c28985331.lua @@ -1,4 +1,5 @@ --終末の騎士 +--Armageddon Knight local s,id=GetID() function s.initial_effect(c) --send to grave @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c28990150.lua b/official/c28990150.lua index 86a0385951..1dc332679a 100644 --- a/official/c28990150.lua +++ b/official/c28990150.lua @@ -1,4 +1,5 @@ --フォトン・ケルベロス +--Photon Cerberus local s,id=GetID() function s.initial_effect(c) --actlimit @@ -17,9 +18,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsTrap() -end +end \ No newline at end of file diff --git a/official/c29013526.lua b/official/c29013526.lua index a6816f549a..d222c35e93 100644 --- a/official/c29013526.lua +++ b/official/c29013526.lua @@ -1,4 +1,5 @@ --吹き荒れるウィン +--Storming Wynn local s,id=GetID() function s.initial_effect(c) --spsummon @@ -40,7 +41,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end @@ -48,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(Card.IsCode,1,nil,id) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29021114.lua b/official/c29021114.lua index d8a773ef21..7a1ed0efdb 100644 --- a/official/c29021114.lua +++ b/official/c29021114.lua @@ -1,4 +1,5 @@ --シルバー・ガジェット +--Silver Gadget local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x51} +s.listed_series={SET_GADGET} s.listed_names={id} function s.spfilter1(c,e,tp) return c:IsRace(RACE_MACHINE) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -49,7 +50,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x51) and c:GetLevel()==4 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GADGET) and c:GetLevel()==4 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -63,4 +64,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2903036.lua b/official/c2903036.lua index f0777d3f1b..94f84a1f8f 100644 --- a/official/c2903036.lua +++ b/official/c2903036.lua @@ -1,6 +1,5 @@ --生け贄人形 --Tribute Doll - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 7 monster, that can be normal summoned/set, from hand @@ -40,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) g:GetFirst():RegisterEffect(e1,true) end Duel.SpecialSummonComplete() diff --git a/official/c29062925.lua b/official/c29062925.lua index 0fc02438db..7c1ea56749 100644 --- a/official/c29062925.lua +++ b/official/c29062925.lua @@ -26,4 +26,4 @@ end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) -end +end \ No newline at end of file diff --git a/official/c29071332.lua b/official/c29071332.lua index f6753c62c3..9f834f9442 100644 --- a/official/c29071332.lua +++ b/official/c29071332.lua @@ -1,4 +1,5 @@ --アームズ・エイド +--Armory Arm local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -22,7 +23,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_REDIRECT-RESET_OVERLAY|RESET_PHASE|PHASE_END,0,1) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,14 +42,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_SZONE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --damage local e3=Effect.CreateEffect(c) @@ -61,7 +62,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetCondition(s.damcon) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) --eqlimit local e4=Effect.CreateEffect(c) @@ -69,7 +70,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_EQUIP_LIMIT) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetValue(s.eqlimit) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) e4:SetLabelObject(tc) c:RegisterEffect(e4) end @@ -80,7 +81,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_REDIRECT-RESET_OVERLAY|RESET_PHASE|PHASE_END,0,1) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -106,4 +107,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if dam<0 then dam=0 end Duel.Damage(p,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29085954.lua b/official/c29085954.lua index 28285eab5b..97ac782f12 100644 --- a/official/c29085954.lua +++ b/official/c29085954.lua @@ -13,22 +13,18 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=78 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp,mc,pg) local m=c:GetMetatable(true) if not m then return false end local no=m.xyz_number - return no and no>=1 and no<=99 and c:IsSetCard(0x48) and mc:IsCanBeXyzMaterial(c,tp) + return no and no>=1 and no<=99 and c:IsSetCard(SET_NUMBER) and mc:IsCanBeXyzMaterial(c,tp) and (#pg<=0 or pg:IsContains(mc)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,c) Duel.SpecialSummon(tc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) tc:CompleteProcedure() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -71,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -84,4 +80,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29088922.lua b/official/c29088922.lua index 5ca532d443..58bba2ff36 100644 --- a/official/c29088922.lua +++ b/official/c29088922.lua @@ -1,4 +1,5 @@ --フォーチュンレディ・ウォーテリー +--Fortune Lady Water local s,id=GetID() function s.initial_effect(c) --atk,def @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -33,12 +34,12 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.value(e,c) return c:GetLevel()*300 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -47,11 +48,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x31) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_FORTUNE_LADY) and c:GetCode()~=id end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -62,4 +63,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29092121.lua b/official/c29092121.lua index d65336bab8..c62df21122 100644 --- a/official/c29092121.lua +++ b/official/c29092121.lua @@ -38,14 +38,14 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e4:SetCountLimit(1,{id,1}) e4:SetCondition(s.thcon) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.spfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xe5) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_CIPHER) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spfilter,1,nil,tp) @@ -62,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter(c) - return c:IsFaceup() and c:HasLevel() and c:GetLevel()~=8 and c:IsSetCard(0xe5) + return c:IsFaceup() and c:HasLevel() and c:GetLevel()~=8 and c:IsSetCard(SET_CIPHER) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -78,16 +78,16 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0xe5) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CIPHER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -100,4 +100,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29095552.lua b/official/c29095552.lua index 731bf964ff..d9b7ef418b 100644 --- a/official/c29095552.lua +++ b/official/c29095552.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,8 +38,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c29107423.lua b/official/c29107423.lua index 566b89f241..fe04c0d37b 100644 --- a/official/c29107423.lua +++ b/official/c29107423.lua @@ -1,5 +1,5 @@ --紅蓮薔薇の魔女 ---Bloodrose Witch +--Ruddy Rose Witch --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tedtg) e2:SetOperation(s.tedop) c:RegisterEffect(e2) @@ -37,10 +37,6 @@ end function s.sfilter(c) return c:IsCode(17720747) and c:IsSummonable(true,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_EFFECT) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) @@ -75,12 +71,12 @@ function s.tedfilter(c,tp) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) end function s.tedtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tedfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + if chk==0 then return Duel.IsExistingMatchingCard(s.tedfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.tedop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tedfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tedfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,tp):GetFirst() if tc then - Duel.SendtoDeck(tc,tp,2,REASON_EFFECT) + Duel.SendtoDeck(tc,tp,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29114773.lua b/official/c29114773.lua index 1e906b0ca6..541f45dede 100644 --- a/official/c29114773.lua +++ b/official/c29114773.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.costfilter(c) - return c:IsSetCard(0x2016) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_SPEEDROID) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -24,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x2016) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29116732.lua b/official/c29116732.lua index 5723af6153..35a6e542d6 100644 --- a/official/c29116732.lua +++ b/official/c29116732.lua @@ -1,4 +1,5 @@ --デイブレーカー +--Daybreaker local s,id=GetID() function s.initial_effect(c) --spsummon success @@ -27,4 +28,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29139104.lua b/official/c29139104.lua index 7d7aee0215..c4df35b24f 100644 --- a/official/c29139104.lua +++ b/official/c29139104.lua @@ -1,4 +1,5 @@ --荒ぶるアウス +--Avalanching Aussa local s,id=GetID() function s.initial_effect(c) --spsummon @@ -40,7 +41,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end @@ -48,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(Card.IsCode,1,nil,id) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c291414.lua b/official/c291414.lua index f309b99e03..94530fe75c 100644 --- a/official/c291414.lua +++ b/official/c291414.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetValue(21159309) c:RegisterEffect(e2) --special summon @@ -33,10 +33,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={21159309} -s.listed_series={0x3f} +s.listed_series={SET_MAJESTIC} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x3f) + return not c:IsSetCard(SET_MAJESTIC) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end @@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29143457.lua b/official/c29143457.lua index 12a59b5a97..14a5f3a209 100644 --- a/official/c29143457.lua +++ b/official/c29143457.lua @@ -1,7 +1,6 @@ --炎舞-「隠元」 --Fire Formation - Ingen --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --When activated, fusion summon 1 beast-warrior fusion monster @@ -22,8 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x79} - +s.listed_series={SET_FIRE_FIST} function s.target(sptg,spop) return function (e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -42,7 +40,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsPreviousLocation(LOCATION_SZONE) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x79) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_FIRE_FIST) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c29143726.lua b/official/c29143726.lua index 4fc5b72214..0a9ff54d34 100644 --- a/official/c29143726.lua +++ b/official/c29143726.lua @@ -1,4 +1,5 @@ --転生竜 サンサーラ +--Samsara, Dragon of Rebirth local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -45,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29146185.lua b/official/c29146185.lua index 584ad3e2ae..5ae1fcd150 100644 --- a/official/c29146185.lua +++ b/official/c29146185.lua @@ -25,11 +25,11 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.retcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - return rc:IsRace(RACE_SPELLCASTER) or (rc:IsSetCard(0x106e) and rc:IsSpell()) + return rc:IsRace(RACE_SPELLCASTER) or (rc:IsSetCard(SET_SPELLBOOK) and rc:IsSpell()) end function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==1 end @@ -38,12 +38,12 @@ function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) end function s.filter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToHand() end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -63,7 +63,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end end function s.cffilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and not c:IsPublic() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and not c:IsPublic() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.cffilter,tp,LOCATION_HAND,0,nil) @@ -86,4 +86,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29155212.lua b/official/c29155212.lua index 4889f95828..e5c4c3bd5d 100644 --- a/official/c29155212.lua +++ b/official/c29155212.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.atkcon) @@ -31,9 +31,9 @@ function s.adval(e,c) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(id)<=4 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,62121),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetFlagEffect(id)<=4 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,62121),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,1) -end + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,1) +end \ No newline at end of file diff --git a/official/c29157292.lua b/official/c29157292.lua index d2484ad129..a2fe95bd7f 100644 --- a/official/c29157292.lua +++ b/official/c29157292.lua @@ -69,7 +69,7 @@ function s.changetypeop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END|RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c29169993.lua b/official/c29169993.lua index bb9f32c023..133f10c097 100644 --- a/official/c29169993.lua +++ b/official/c29169993.lua @@ -1,4 +1,5 @@ --EMギッタンバッタ +--Performapal Teeter Totter Hopper local s,id=GetID() function s.initial_effect(c) --indes @@ -37,15 +38,15 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.valcon(e,re,r,rp) - return (r&REASON_BATTLE)~=0 and e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) + return (r&REASON_BATTLE)~=0 and e:GetHandler():IsSpecialSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.thfilter(c) - return c:IsSetCard(0x9f) and c:IsLevelBelow(3) and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsLevelBelow(3) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -64,7 +65,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x9f) and c:IsPreviousLocation(LOCATION_HAND) + return c:IsMonster() and c:IsSetCard(SET_PERFORMAPAL) and c:IsPreviousLocation(LOCATION_HAND) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) and not eg:IsContains(e:GetHandler()) @@ -79,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29177818.lua b/official/c29177818.lua index 3066861cac..8ec163f6c3 100644 --- a/official/c29177818.lua +++ b/official/c29177818.lua @@ -1,7 +1,6 @@ --バラガール --Rose Girl --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand diff --git a/official/c29185231.lua b/official/c29185231.lua index 8de220df29..06952e16ac 100644 --- a/official/c29185231.lua +++ b/official/c29185231.lua @@ -17,7 +17,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local turnp=Duel.GetTurnPlayer() - Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) -end - + Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1,1) + Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) +end \ No newline at end of file diff --git a/official/c29189613.lua b/official/c29189613.lua index 50b13b17ad..82c16b8e02 100644 --- a/official/c29189613.lua +++ b/official/c29189613.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - --spsummon + --Special Summon 1 "Aroma" monster from your Deck local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -37,9 +37,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xc9} +s.listed_series={SET_AROMA} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xc9) and c:IsSummonPlayer(tp) + return c:IsFaceup() and c:IsSetCard(SET_AROMA) and c:IsSummonPlayer(tp) end function s.rccon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -56,10 +56,10 @@ function s.rcop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetLP(tp)0 @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29208536.lua b/official/c29208536.lua index 02e33b1664..a2f3030f95 100644 --- a/official/c29208536.lua +++ b/official/c29208536.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,10 +29,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=45 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=e:GetHandler() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end @@ -48,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.disablecon) tc:RegisterEffect(e1) end diff --git a/official/c29216198.lua b/official/c29216198.lua index 8b25081518..4f8be21ae9 100644 --- a/official/c29216198.lua +++ b/official/c29216198.lua @@ -1,4 +1,5 @@ --グラビティ・ボール +--Gravitic Orb local s,id=GetID() function s.initial_effect(c) --flip @@ -20,4 +21,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c29216967.lua b/official/c29216967.lua index 7ba172342f..85ed300fdd 100644 --- a/official/c29216967.lua +++ b/official/c29216967.lua @@ -1,4 +1,5 @@ --ギミック・パペット-シザー・アーム +--Gimmick Puppet Scissor Arms local s,id=GetID() function s.initial_effect(c) --send to grave @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x1083) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29223325.lua b/official/c29223325.lua index f42e2b9748..f31905886e 100644 --- a/official/c29223325.lua +++ b/official/c29223325.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -22,12 +22,12 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.filter(c) - return c:IsSetCard(0x97) and c:IsMonster() and c:IsSSetable(true) + return c:IsSetCard(SET_ARTIFACT) and c:IsMonster() and c:IsSSetable(true) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.desfilter2(c) return c:IsSpellTrap() and c:GetSequence()<5 @@ -70,18 +70,17 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SKIP_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp and ph>PHASE_MAIN1 and ph0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsEnvironment(42015635) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2926176.lua b/official/c2926176.lua index 5112a51f93..fc71ea33dc 100644 --- a/official/c2926176.lua +++ b/official/c2926176.lua @@ -1,4 +1,5 @@ --王家の呪い +--Curse of Royal local s,id=GetID() function s.initial_effect(c) --Negate @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29267084.lua b/official/c29267084.lua index bfc4714d88..fe4fec2d8a 100644 --- a/official/c29267084.lua +++ b/official/c29267084.lua @@ -1,7 +1,8 @@ --闇の呪縛 +--Shadow Spell local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,1,aux.FilterBoolFunction(Card.IsFaceup),CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,s.condition) + aux.AddPersistentProcedure(c,1,aux.FilterBoolFunction(Card.IsFaceup),CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,aux.StatChangeDamageStepCondition) --eff local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -26,9 +27,6 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end @@ -36,5 +34,5 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return tc and eg:IsContains(tc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c29280589.lua b/official/c29280589.lua index 55ae048aa0..b17682283a 100644 --- a/official/c29280589.lua +++ b/official/c29280589.lua @@ -40,7 +40,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsSetCard(SET_FRIGHTFUR) and c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_MZONE) - and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) + and c:IsControler(tp) and c:IsReason(REASON_EFFECT|REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -51,5 +51,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c29284413.lua b/official/c29284413.lua index 35d9639111..e0b28e7905 100644 --- a/official/c29284413.lua +++ b/official/c29284413.lua @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) end @@ -73,7 +73,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then + and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29296344.lua b/official/c29296344.lua index 7d87af7341..b7a9d41029 100644 --- a/official/c29296344.lua +++ b/official/c29296344.lua @@ -19,13 +19,13 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x102,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_ROKKET,lc,sumtype,tp) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -33,10 +33,10 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -48,22 +48,22 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) ge1:SetTargetRange(1,0) ge1:SetTarget(function(_,c) return c:IsLinkBelow(2) and c:IsLocation(LOCATION_EXTRA) end) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp,function(_,c) return not c:IsLinkBelow(2) end) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:IsLinkMonster() and tc:GetLink()>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local lk=tc:GetLink() ft=math.min(ft,lk) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) ft=math.min(ft,g:GetClassCount(Card.GetCode)) local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29303524.lua b/official/c29303524.lua index 60d41fa62f..22077b9f65 100644 --- a/official/c29303524.lua +++ b/official/c29303524.lua @@ -1,5 +1,5 @@ --眩月龍セレグレア ---Dazzling Lunar Dragon Selegrea +--Seleglare the Luminous Lunar Dragon --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetCondition(s.concon) e3:SetTarget(s.contg) e3:SetOperation(s.conop) @@ -37,13 +37,13 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1500) c:RegisterEffect(e1) end function s.concon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.confilter(c,atk) return c:IsFaceup() and c:GetAttack()<=atk and c:IsControlerCanBeChanged() @@ -64,4 +64,4 @@ function s.conop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~0 and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c2930675.lua b/official/c2930675.lua index e10436d589..9c40d11a3e 100644 --- a/official/c2930675.lua +++ b/official/c2930675.lua @@ -1,5 +1,5 @@ --星遺物へと至る鍵 ---Key to World Legacy +--World Legacy Key local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,9 +18,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_SZONE) end -s.listed_series={0x10c,0xfe} +s.listed_series={SET_MEKK_KNIGHT,SET_WORLD_LEGACY} function s.thfilter(c) - return ((c:IsSetCard(0x10c) and c:IsMonster()) or c:IsSetCard(0xfe)) and c:IsFaceup() and c:IsAbleToHand() + return ((c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster()) or c:IsSetCard(SET_WORLD_LEGACY)) and c:IsFaceup() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -47,10 +47,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,seq,p) - return c:IsFaceup() and c:IsSetCard(0x10c) and c:IsColumn(seq,p,LOCATION_SZONE) + return c:IsFaceup() and c:IsSetCard(SET_MEKK_KNIGHT) and c:IsColumn(seq,p,LOCATION_SZONE) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_TRAP) then return false end + if rp==tp or not re:IsTrapEffect() then return false end local rc=re:GetHandler() local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) if re:IsHasType(EFFECT_TYPE_ACTIVATE) and (loc&LOCATION_SZONE==0 or rc:IsControler(1-p)) then @@ -66,4 +66,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c29307554.lua b/official/c29307554.lua index 7926990cc1..69d806e685 100644 --- a/official/c29307554.lua +++ b/official/c29307554.lua @@ -1,4 +1,5 @@ --破壊神の系譜 +--Lineage of Destruction local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,12 +29,12 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if tc:GetReasonPlayer()==1 and tc:IsPreviousControler(0) then p2=true end end end - if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,0,1) end + if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end + if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetFlagEffect(tp,id)~=0 and Duel.GetTurnPlayer()==tp - and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) + return Duel.GetFlagEffect(tp,id)~=0 and Duel.IsTurnPlayer(tp) + and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) end function s.filter(c) return c:IsFaceup() and c:IsLevelAbove(8) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 @@ -50,8 +51,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c29311166.lua b/official/c29311166.lua index 85c38cfeef..f7127854d2 100644 --- a/official/c29311166.lua +++ b/official/c29311166.lua @@ -1,4 +1,5 @@ --アサルトワイバーン +--Assault Wyvern local s,id=GetID() function s.initial_effect(c) --search @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(aux.bdocon) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -17,21 +18,17 @@ s.listed_names={id} function s.filter(c,e,tp) return c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29325276.lua b/official/c29325276.lua index bb062493a8..639093bd7b 100644 --- a/official/c29325276.lua +++ b/official/c29325276.lua @@ -88,4 +88,4 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29330706.lua b/official/c29330706.lua index a3fd6e1cb0..3dca15bbe2 100644 --- a/official/c29330706.lua +++ b/official/c29330706.lua @@ -1,4 +1,5 @@ --武装神竜プロテクト・ドラゴン +--Armed Protector Dragon local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -20,4 +21,4 @@ function s.initial_effect(c) end function s.val(e,c) return c:GetEquipCount()*500 -end +end \ No newline at end of file diff --git a/official/c29343734.lua b/official/c29343734.lua index f3a74b4ff2..853ddbc6e8 100644 --- a/official/c29343734.lua +++ b/official/c29343734.lua @@ -1,4 +1,5 @@ --E・HERO エリクシーラー +--Elemental HERO Electrum local s,id=GetID() function s.initial_effect(c) --fusion material @@ -38,9 +39,9 @@ function s.initial_effect(c) e5:SetValue(s.val) c:RegisterEffect(e5) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,4 +54,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsAttribute,c:GetAttribute()),c:GetControler(),0,LOCATION_MZONE,nil)*300 -end +end \ No newline at end of file diff --git a/official/c29348048.lua b/official/c29348048.lua index d0d643d475..ac0b8203a9 100644 --- a/official/c29348048.lua +++ b/official/c29348048.lua @@ -1,5 +1,5 @@ --ヴェンデット・スカヴェンジャー ---Vendread Scarvenger +--Vendread Scavenger --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} s.listed_names={4388680} function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -46,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -67,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c293542.lua b/official/c293542.lua index 992a476dd1..be7fbc22c5 100644 --- a/official/c293542.lua +++ b/official/c293542.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(aux.FaceupFilter(Card.IsLevelBelow,4),1,nil) @@ -48,12 +48,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x27) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TG) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -66,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29354228.lua b/official/c29354228.lua index 5b56437f6c..53e4c70807 100644 --- a/official/c29354228.lua +++ b/official/c29354228.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} s.listed_names={CARD_ALBAZ} function s.filter(c,e,tp) - return (c:IsCode(CARD_ALBAZ) or (c:IsMonster() and c:IsSetCard(0x146))) + return (c:IsCode(CARD_ALBAZ) or (c:IsMonster() and c:IsSetCard(SET_DOGMATIKA))) end function s.spfilter(c,e,tp) return s.filter(c,e,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,2)) end -end +end \ No newline at end of file diff --git a/official/c29357687.lua b/official/c29357687.lua index 828718d024..c868af5e85 100644 --- a/official/c29357687.lua +++ b/official/c29357687.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.descon) e3:SetTarget(s.destg) diff --git a/official/c29357956.lua b/official/c29357956.lua index 70a7aee4aa..66cebe1cd5 100644 --- a/official/c29357956.lua +++ b/official/c29357956.lua @@ -1,9 +1,10 @@ --剣闘獣ネロキウス +--Gladiator Beast Nerokius local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR),3) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) --battle indestructable local e3=Effect.CreateEffect(c) @@ -26,7 +27,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.spcon) e6:SetCost(s.spcost) @@ -34,14 +35,14 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x19} -s.material_setcode=0x19 +s.listed_series={SET_GLADIATOR} +s.material_setcode=SET_GLADIATOR function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA @@ -55,10 +56,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,122,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,122,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -78,10 +79,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) local tc=sg:GetFirst() Duel.SpecialSummonStep(tc,122,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) tc=sg:GetNext() Duel.SpecialSummonStep(tc,122,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c29374928.lua b/official/c29374928.lua index 099fcfc374..31281796e1 100644 --- a/official/c29374928.lua +++ b/official/c29374928.lua @@ -1,7 +1,6 @@ --アーマード・ビットロン --Armored Bitron --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Special summon 1 cyberse monster from deck @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,11 +29,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} - -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -52,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -61,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -94,7 +88,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c29380133.lua b/official/c29380133.lua index 6121e8526a..c9837abed6 100644 --- a/official/c29380133.lua +++ b/official/c29380133.lua @@ -1,4 +1,5 @@ --ヤドカリュー +--Yado Karu local s,id=GetID() function s.initial_effect(c) --todeck @@ -22,5 +23,5 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,99,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) -end + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c29389368.lua b/official/c29389368.lua index fd2b9a530a..ed2e0c943f 100644 --- a/official/c29389368.lua +++ b/official/c29389368.lua @@ -1,4 +1,5 @@ --体力増強剤スーパーZ +--Nutrient Z local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,4000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29400787.lua b/official/c29400787.lua index a4a036722e..c90af459d3 100644 --- a/official/c29400787.lua +++ b/official/c29400787.lua @@ -1,4 +1,5 @@ --ゴーストリック・パレード +--Ghostrick Parade local s,id=GetID() function s.initial_effect(c) --Activate @@ -46,7 +47,7 @@ function s.initial_effect(c) e6:SetCode(EFFECT_NO_EFFECT_DAMAGE) c:RegisterEffect(e6) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.dirtg(e,c) return not Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,1,nil) end @@ -54,7 +55,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.filter(c) - return c:IsSetCard(0x8d) and c:IsAbleToHand() + return c:IsSetCard(SET_GHOSTRICK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -68,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29401950.lua b/official/c29401950.lua index 0c3c8f3a40..dfaac4d1d2 100644 --- a/official/c29401950.lua +++ b/official/c29401950.lua @@ -1,4 +1,5 @@ --奈落の落とし穴 +--Bottomless Trap Hole local s,id=GetID() function s.initial_effect(c) --Activate(summon) @@ -61,4 +62,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED) end -end +end \ No newline at end of file diff --git a/official/c29415459.lua b/official/c29415459.lua index ea970f7e2e..a4cfc15682 100644 --- a/official/c29415459.lua +++ b/official/c29415459.lua @@ -1,7 +1,6 @@ --黄華の機界騎士 --Mekk-Knight Yellow Star --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -25,8 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x10c} - +s.listed_series={SET_MEKK_KNIGHT} function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -40,7 +38,7 @@ function s.hspval(e,c) return 0,zone end function s.costfilter(c) - return c:IsSetCard(0x10c) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -64,4 +62,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29417188.lua b/official/c29417188.lua index 6a66b36e98..f3fc1792a8 100644 --- a/official/c29417188.lua +++ b/official/c29417188.lua @@ -1,4 +1,5 @@ --サイキック・ブロッカー +--Psi-Blocker local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,9 +30,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0x7f,0x7f) e1:SetTarget(s.bantg) e1:SetLabel(ac) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end function s.bantg(e,c) return c:IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c29423048.lua b/official/c29423048.lua index 71658e0282..355c269400 100644 --- a/official/c29423048.lua +++ b/official/c29423048.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtgtg) e1:SetOperation(s.thtgop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c29424328.lua b/official/c29424328.lua index aa5b6c1e05..c0a98202dd 100644 --- a/official/c29424328.lua +++ b/official/c29424328.lua @@ -1,4 +1,5 @@ --魔王ディアボロス +--Diabolos, King of the Abyss local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -35,7 +36,7 @@ function s.tlimit(e,c) return not c:IsAttribute(ATTRIBUTE_DARK) end function s.cfcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>0 + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>0 end function s.cfop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetDecktopGroup(1-tp,1) @@ -45,4 +46,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) if opt==1 then Duel.MoveSequence(tc,opt) end -end +end \ No newline at end of file diff --git a/official/c29432356.lua b/official/c29432356.lua index 3ae23c1662..bab5a3cd0d 100644 --- a/official/c29432356.lua +++ b/official/c29432356.lua @@ -46,9 +46,9 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0xc4} +s.listed_series={SET_ZEFRA} function s.scfilter(c,pc) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xc4) and not c:IsForbidden() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_ZEFRA) and not c:IsForbidden() and c:GetLeftScale()~=pc:GetLeftScale() end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,7 +65,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(tc:GetLeftScale()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -79,7 +79,7 @@ function s.hspcon(e,c) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local rg=Duel.GetReleaseGroup(tp) return (#g>0 or #rg>0) and g:FilterCount(Card.IsReleasable,nil)==#g - and g:FilterCount(Card.IsSetCard,nil,0xc4)>=3 + and g:FilterCount(Card.IsSetCard,nil,SET_ZEFRA)>=3 end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.GetReleaseGroup(tp) @@ -91,7 +91,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCode(EVENT_ADJUST) e1:SetOperation(s.checkop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) s.checkop(e,tp) end @@ -107,9 +107,9 @@ function s.checkop(e,tp) e1:SetCondition(s.pencon1) e1:SetOperation(s.penop1) e1:SetValue(SUMMON_TYPE_PENDULUM) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) lpz:RegisterEffect(e1) - lpz:RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1) + lpz:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) end local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0) local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) @@ -125,13 +125,13 @@ function s.checkop(e,tp) e2:SetCondition(s.pencon2) e2:SetOperation(s.penop2) e2:SetValue(SUMMON_TYPE_PENDULUM) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) olpz:RegisterEffect(e2) - olpz:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + olpz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.penfilter(c,e,tp,lscale,rscale) - return c:IsSetCard(0xc4) and Pendulum.Filter(c,e,tp,lscale,rscale) + return c:IsSetCard(SET_ZEFRA) and Pendulum.Filter(c,e,tp,lscale,rscale) end function s.pencon1(e,c,og) if c==nil then return true end @@ -142,8 +142,8 @@ function s.pencon1(e,c,og) local rscale=rpz:GetRightScale() if lscale>rscale then lscale,rscale=rscale,lscale end local loc=0 - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end - if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end + if Duel.GetLocationCountFromEx(tp)>0 then loc=loc|LOCATION_EXTRA end if loc==0 then return false end local g=nil if og then @@ -167,8 +167,8 @@ function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) ft=1 end local loc=0 - if ft1>0 then loc=loc+LOCATION_HAND end - if ft2>0 then loc=loc+LOCATION_EXTRA end + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end local tg=nil if og then tg=og:Filter(Card.IsLocation,nil,loc):Filter(s.penfilter,nil,e,tp,lscale,rscale) @@ -185,8 +185,8 @@ function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) if ct1>ft1 then ct=math.min(ct,ft1) end if ct2>ft2 then ct=math.min(ct,ft2) end local loc=0 - if ft1>0 then loc=loc+LOCATION_HAND end - if ft2>0 then loc=loc+LOCATION_EXTRA end + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end local g=tg:Filter(Card.IsLocation,sg,loc) if #g==0 or ft==0 then break end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -212,7 +212,7 @@ function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) end if #sg>0 then Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(rpz)) end @@ -251,7 +251,7 @@ function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) if #sg>0 then Duel.Hint(HINT_CARD,0,31531170) Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(rpz)) end @@ -266,7 +266,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(sg,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ZEFRA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -279,4 +279,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29432790.lua b/official/c29432790.lua index 5375874e45..c10953ee05 100644 --- a/official/c29432790.lua +++ b/official/c29432790.lua @@ -26,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -42,15 +42,15 @@ function s.spfilter(c,e,tp) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp,POS_FACEDOWN) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil,tp,POS_FACEDOWN) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and #g>0 and Duel.GetMZoneCount(tp,g)>0 end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp,POS_FACEDOWN) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil,tp,POS_FACEDOWN) if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)>0 then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end @@ -62,4 +62,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c29436665.lua b/official/c29436665.lua index dff3efc293..899567d846 100644 --- a/official/c29436665.lua +++ b/official/c29436665.lua @@ -63,4 +63,4 @@ function s.dmgcon(e,tp,eg,ep,ev,re,r,rp) end function s.dmgop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29455728.lua b/official/c29455728.lua index 14c2320e4d..9da6546401 100644 --- a/official/c29455728.lua +++ b/official/c29455728.lua @@ -1,29 +1,26 @@ --ツイン・フォトン・リザード +--Twin Photon Lizard local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x55),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PHOTON),2) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x55} -s.material_setcode=0x55 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_PHOTON} +s.material_setcode=SET_PHOTON function s.mgfilter(c,e,tp,fusc,mg) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and (c:GetReason()&0x40008)==0x40008 and c:GetReasonCard()==fusc + and (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))==(REASON_FUSION|REASON_MATERIAL) and c:GetReasonCard()==fusc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE+65536) end @@ -34,7 +31,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end return ct>0 and ft>=ct and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + and e:GetHandler():IsFusionSummoned() and g:FilterCount(s.mgfilter,nil,e,tp,e:GetHandler(),g)==ct end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0) @@ -47,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and g:FilterCount(s.mgfilter,nil,e,tp,e:GetHandler(),g)==ct then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29477860.lua b/official/c29477860.lua index 80387115cf..f9b58cf550 100644 --- a/official/c29477860.lua +++ b/official/c29477860.lua @@ -57,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29479265.lua b/official/c29479265.lua index 4ae3653a8f..b7c882d0d5 100644 --- a/official/c29479265.lua +++ b/official/c29479265.lua @@ -60,4 +60,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.descon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsReason,1,e:GetHandler(),REASON_BATTLE) -end +end \ No newline at end of file diff --git a/official/c2948263.lua b/official/c2948263.lua index 30209d4e32..f0ff83785e 100644 --- a/official/c2948263.lua +++ b/official/c2948263.lua @@ -40,13 +40,13 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0x59} +s.listed_series={SET_GOGOGO} function s.spcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,e:GetHandler(),0x59) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,e:GetHandler(),SET_GOGOGO) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,e:GetHandler(),0x59) + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,e:GetHandler(),SET_GOGOGO) if g then g:KeepAlive() e:SetLabelObject(g) @@ -71,7 +71,7 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) - and tgp~=tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE + and tgp~=tp and re:IsMonsterEffect() and loc==LOCATION_MZONE end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -86,8 +86,8 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1500) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c29491334.lua b/official/c29491334.lua index c9491fe21c..69cdb9d700 100644 --- a/official/c29491334.lua +++ b/official/c29491334.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetTarget(s.tktg) e1:SetOperation(s.tkop) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={29491335} -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2000,2400,6,RACE_MACHINE,ATTRIBUTE_DARK) end @@ -43,14 +43,14 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29508346.lua b/official/c29508346.lua index 4afa7570a0..b2b22ccec1 100644 --- a/official/c29508346.lua +++ b/official/c29508346.lua @@ -1,4 +1,5 @@ --ライバル・アライバル +--Arrivalrivals local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,20 +15,20 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.filter(c) return c:IsSummonable(true,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.Summon(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c29510428.lua b/official/c29510428.lua index 2d4bd80b6e..e90cceddd3 100644 --- a/official/c29510428.lua +++ b/official/c29510428.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -86,4 +86,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end, aux.Stringid(id,5) ) -end +end \ No newline at end of file diff --git a/official/c29515122.lua b/official/c29515122.lua index eb063b7371..2b8f4ebcf2 100644 --- a/official/c29515122.lua +++ b/official/c29515122.lua @@ -1,4 +1,5 @@ --重機王ドボク・ザーク +--Digvorzhak, King of Heavy Industry local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(1-tp,3) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,3) @@ -36,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29537493.lua b/official/c29537493.lua index 2091fa97d6..8821f06133 100644 --- a/official/c29537493.lua +++ b/official/c29537493.lua @@ -1,5 +1,5 @@ --ベアルクティ-ミクポーラ ---Ursarctic Micpola +--Ursarctic Mikpolar --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -17,9 +17,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} function s.thfilter(c) - return c:IsSetCard(0x165) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_URSARCTIC) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29549364.lua b/official/c29549364.lua index 8db763141b..a58dd7be6c 100644 --- a/official/c29549364.lua +++ b/official/c29549364.lua @@ -1,4 +1,5 @@ --生贄封じの仮面 +--Mask of Restrict local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,4 +15,4 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c295517.lua b/official/c295517.lua index bce7e8a3a4..15e44d93ca 100644 --- a/official/c295517.lua +++ b/official/c295517.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,LOCATION_HAND+LOCATION_MZONE) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,LOCATION_HAND|LOCATION_MZONE) e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) e2:SetValue(-1) c:RegisterEffect(e2) @@ -26,4 +26,4 @@ function s.initial_effect(c) local e4=e3:Clone() e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e4) -end +end \ No newline at end of file diff --git a/official/c29552709.lua b/official/c29552709.lua index 3cf9a8c301..dad48994cf 100644 --- a/official/c29552709.lua +++ b/official/c29552709.lua @@ -1,8 +1,9 @@ --ダイガスタ・スフィアード +--Daigusto Sphreez local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x10),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_GUSTO),1,99) c:EnableReviveLimit() --to hand local e1=Effect.CreateEffect(c) @@ -31,15 +32,15 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.reftg(e,c) - return c:IsSetCard(0x10) + return c:IsSetCard(SET_GUSTO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) - return c:IsSetCard(0x10) and c:IsAbleToHand() + return c:IsSetCard(SET_GUSTO) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -53,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c2956282.lua b/official/c2956282.lua index fc1a41b72f..5a9a9f58d7 100644 --- a/official/c2956282.lua +++ b/official/c2956282.lua @@ -21,15 +21,15 @@ function s.initial_effect(c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,4 +45,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29587993.lua b/official/c29587993.lua index 5c1287b4ee..a55cd872c9 100644 --- a/official/c29587993.lua +++ b/official/c29587993.lua @@ -39,4 +39,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29590752.lua b/official/c29590752.lua index 78787967aa..fc3dcd334e 100644 --- a/official/c29590752.lua +++ b/official/c29590752.lua @@ -1,4 +1,5 @@ --剣闘獣オクタビウス +--Gladiator Beast Octavius local s,id=GetID() function s.initial_effect(c) --destroy @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_HANDES+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.dcon) e2:SetTarget(s.dtg) @@ -41,19 +42,19 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.dcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 and Duel.GetTurnPlayer()==tp + return e:GetHandler():GetBattledGroupCount()>0 and Duel.IsTurnPlayer(tp) end function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id+1)==0 end - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,EFFECT_FLAG_OATH,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,tp,0) end function s.dop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) else - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29590905.lua b/official/c29590905.lua index 756bd74039..b66464a24c 100644 --- a/official/c29590905.lua +++ b/official/c29590905.lua @@ -36,6 +36,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local d=gd:GetFirst() if a:CanAttack() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then Duel.CalculateDamage(a,d) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c29595202.lua b/official/c29595202.lua index bdc210d2bf..21e4e17b45 100644 --- a/official/c29595202.lua +++ b/official/c29595202.lua @@ -1,5 +1,5 @@ --神碑の誑かし ---Deceit of the Mysterune +--Runick Allure --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -23,7 +23,7 @@ function s.initial_effect(c) end s.listed_names={id} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsType(TYPE_QUICKPLAY) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsSpellEffect() and re:GetHandler():IsType(TYPE_QUICKPLAY) and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c29596581.lua b/official/c29596581.lua index 0aafa9d67b..acdf07be1e 100644 --- a/official/c29596581.lua +++ b/official/c29596581.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_THUNDRA) @@ -27,34 +27,28 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EVENT_TO_GRAVE) - e3:SetCondition(s.spcon) + e3:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) c:RegisterEffect(e3) end -s.listed_series={0x11c} +s.listed_series={SET_THUNDER_DRAGON} s.listed_names={id} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.thfilter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x11c) and c:IsAbleToHand() and not c:IsCode(id) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_THUNDER_DRAGON) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.thop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) if #tc>0 then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THUNDER_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,11 +59,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -92,4 +85,4 @@ function s.thcon2(e,tp,eg,ep,ev,re,r,rp) end function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29599813.lua b/official/c29599813.lua index 7b226ccb97..fb12f1230b 100644 --- a/official/c29599813.lua +++ b/official/c29599813.lua @@ -43,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then @@ -79,4 +79,4 @@ function s.atchop(e,tp,eg,ep,ev,re,r,rp) tc:CancelToGrave() Duel.Overlay(c,tc,true) end -end +end \ No newline at end of file diff --git a/official/c29601381.lua b/official/c29601381.lua index 7602eba8d4..e1d344342e 100644 --- a/official/c29601381.lua +++ b/official/c29601381.lua @@ -1,7 +1,6 @@ --スプリガンズ・キャプテン サルガス ---Sprigguns Captain Sargus +--Springans Captain Sargas --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) @@ -41,11 +40,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Sprigguns" archetype -s.listed_series={0x158} - +s.listed_series={SET_SPRINGANS} --Check for "Sprigguns" Xyz monster function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) end --Activation legality function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -67,7 +65,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) end --Check if it's opponent's turn function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end --Detach 1 Xyz material from your field as cost function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -91,5 +89,5 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end --Check if Xyz monster this card is attached to is "Spriggun" card function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSetCard(0x158) -end + return e:GetHandler():IsSetCard(SET_SPRINGANS) +end \ No newline at end of file diff --git a/official/c29612557.lua b/official/c29612557.lua index 972cf1ab48..0f74faca36 100644 --- a/official/c29612557.lua +++ b/official/c29612557.lua @@ -1,4 +1,5 @@ --サイクロン・ブーメラン +--Cyclone Boomerang local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,86188410)) @@ -23,10 +24,10 @@ s.listed_names={86188410} function s.descon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetPreviousEquipTarget() return e:GetHandler():IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_GRAVE) - and (ec:GetReason()&0x41)==0x41 + and (ec:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*100,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c29618570.lua b/official/c29618570.lua index 418a96f67f..a7b01ef738 100644 --- a/official/c29618570.lua +++ b/official/c29618570.lua @@ -1,4 +1,5 @@ --グレイ・ウイング +--Gray Wing local s,id=GetID() function s.initial_effect(c) --multiatk @@ -17,7 +18,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end @@ -30,7 +31,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c29628180.lua b/official/c29628180.lua index 2ec81e9ff5..a491c27aa7 100644 --- a/official/c29628180.lua +++ b/official/c29628180.lua @@ -1,5 +1,5 @@ --魔弾-デッドマンズ・バースト ---Magibullet - Deadman's Burst +--Magical Musket - Last Stand --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x108} +s.listed_series={SET_MAGICAL_MUSKET} function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x108),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MAGICAL_MUSKET),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29649320.lua b/official/c29649320.lua index 4d13d7cc51..4993490bb8 100644 --- a/official/c29649320.lua +++ b/official/c29649320.lua @@ -39,7 +39,7 @@ function s.thcfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.thcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.thcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsCode(44095762) and c:IsAbleToHand() diff --git a/official/c296499.lua b/official/c296499.lua index 1af53d2323..5db0994e96 100644 --- a/official/c296499.lua +++ b/official/c296499.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.mtcon) @@ -39,7 +39,7 @@ function s.atktarget(e,c) return c:GetRace()==e:GetLabelObject():GetLabel() end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckReleaseGroupCost(tp,Card.IsReleasable,1,false,nil,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -48,4 +48,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c29650040.lua b/official/c29650040.lua index 655e040f15..2304e6808d 100644 --- a/official/c29650040.lua +++ b/official/c29650040.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetTarget(s.target) c:RegisterEffect(e2) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local b1=s.thtg(e,tp,eg,ep,ev,re,r,rp,0) local b2=s.pentg(e,tp,eg,ep,ev,re,r,rp,0) @@ -58,11 +58,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -75,11 +75,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.penfilter(c) - return c:IsSetCard(0x164) and c:GetOriginalLevel()>0 + return c:IsSetCard(SET_SOLFACHORD) and c:GetOriginalLevel()>0 end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id+1)==0 and Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_PZONE,0,1,nil) end - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.penop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -90,7 +90,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(tc:GetOriginalLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) @@ -98,7 +98,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) end end function s.descfilter(c,f) - return c:IsFaceup() and c:IsSetCard(0x164) and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and f(c) + return c:IsFaceup() and c:IsSetCard(SET_SOLFACHORD) and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and f(c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) @@ -109,7 +109,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) (pg1:GetClassCount(Card.GetLeftScale)>=3 or pg2:GetClassCount(Card.GetLeftScale)>=3 or pg1:GetClassCount(Card.GetRightScale)>=3 or pg2:GetClassCount(Card.GetRightScale)>=3) end - Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -120,4 +120,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29654737.lua b/official/c29654737.lua index bcdf896b88..077b0e32bb 100644 --- a/official/c29654737.lua +++ b/official/c29654737.lua @@ -1,4 +1,5 @@ --アマゾネスの鎖使い +--Amazoness Chain Master local s,id=GetID() function s.initial_effect(c) --get card @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1500)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -15,10 +16,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then @@ -31,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c29666221.lua b/official/c29666221.lua index 777ecbb968..01fbdd3724 100644 --- a/official/c29666221.lua +++ b/official/c29666221.lua @@ -1,10 +1,11 @@ --オルフェゴール・アタック ---Orphegel Attack +--Orcustrated Attack --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) --activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) @@ -14,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11b,0xfe} +s.listed_series={SET_ORCUST,SET_WORLD_LEGACY} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true @@ -23,7 +24,7 @@ function s.spcheck(sg,tp,exg,dg) return dg:IsExists(aux.TRUE,1,sg) end function s.cfilter(c) - return c:IsSetCard(0x11b) or c:IsSetCard(0xfe) + return c:IsSetCard({SET_ORCUST,SET_WORLD_LEGACY}) end function s.filter(c,e) return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) @@ -53,5 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c29669359.lua b/official/c29669359.lua index d5eed3641f..9019f1ba1e 100644 --- a/official/c29669359.lua +++ b/official/c29669359.lua @@ -1,6 +1,5 @@ --No.61 ヴォルカザウルス --Number 61: Volcasaurus - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -21,7 +20,6 @@ function s.initial_effect(c) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=61 - function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and not e:GetHandler():IsDirectAttacked() end @@ -32,7 +30,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c) diff --git a/official/c29687169.lua b/official/c29687169.lua index 120b29829a..cd8e9f012d 100644 --- a/official/c29687169.lua +++ b/official/c29687169.lua @@ -1,4 +1,5 @@ --魔装戦士 アルニス +--Arnis, the Empowered Warrior local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c2971446.lua b/official/c2971446.lua index 0a04028f8a..29eee0f412 100644 --- a/official/c2971446.lua +++ b/official/c2971446.lua @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -51,4 +51,4 @@ end function s.aclimit(e,re,tp) local tc=e:GetLabelObject() return re:GetHandler():IsCode(tc:GetCode()) -end +end \ No newline at end of file diff --git a/official/c29716911.lua b/official/c29716911.lua index f2223cfc0e..92f5c79993 100644 --- a/official/c29716911.lua +++ b/official/c29716911.lua @@ -62,4 +62,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,800,REASON_EFFECT,true) Duel.Damage(1-tp,800,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c29719112.lua b/official/c29719112.lua index 0b8e498e5e..8bdd897fd8 100644 --- a/official/c29719112.lua +++ b/official/c29719112.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCode(EVENT_DESTROYED) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetCondition(s.thcon) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29724053.lua b/official/c29724053.lua index 799a3cdf13..c7c2e58817 100644 --- a/official/c29724053.lua +++ b/official/c29724053.lua @@ -1,4 +1,5 @@ --サモン・ゲート +--Summon Gate local s,id=GetID() function s.initial_effect(c) --activate @@ -52,4 +53,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) s[p]=s[p]-1 end end -end +end \ No newline at end of file diff --git a/official/c29726552.lua b/official/c29726552.lua index a4acce41d3..941c7b990c 100644 --- a/official/c29726552.lua +++ b/official/c29726552.lua @@ -1,6 +1,5 @@ --粘糸壊獣クモグス --Kumongous, the Sticky String Kaiju - local s,id=GetID() function s.initial_effect(c) local e1,e2=aux.AddKaijuProcedure(c) @@ -18,14 +17,13 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.counter_list={0x37} - +s.counter_list={COUNTER_KAIJU} function s.filter(c,tp) return c:IsSummonPlayer(tp) and c:IsFaceup() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter,1,nil,1-tp) and not eg:IsContains(e:GetHandler()) end @@ -43,18 +41,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) --Negate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e3:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e3) end end \ No newline at end of file diff --git a/official/c29735721.lua b/official/c29735721.lua index 04ad8efe2b..81391a5d7f 100644 --- a/official/c29735721.lua +++ b/official/c29735721.lua @@ -14,28 +14,28 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_DECK)>0 end + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND|LOCATION_DECK)>0 end local rc=re:GetHandler() Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if rc:IsDestructable() and rc:IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end - local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_DECK) + local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND|LOCATION_DECK) if #g==0 then return end Duel.BreakEffect() Duel.ConfirmCards(tp,g) diff --git a/official/c29765339.lua b/official/c29765339.lua index 752eb45721..c2410a2afb 100644 --- a/official/c29765339.lua +++ b/official/c29765339.lua @@ -1,8 +1,9 @@ --エレキリム +--Watthydra local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_THUNDER),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WATT),1,1,Synchro.NonTunerEx(Card.IsRace,RACE_THUNDER),1,99) c:EnableReviveLimit() --direct attack local e1=Effect.CreateEffect(c) @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.GetAttackTarget()==nil end @@ -37,16 +38,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) e1:SetLabel(0) tg:RegisterEffect(e1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -54,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) else e:SetLabel(1) end -end +end \ No newline at end of file diff --git a/official/c2978414.lua b/official/c2978414.lua index ed8ffdd128..f53ba48ac3 100644 --- a/official/c2978414.lua +++ b/official/c2978414.lua @@ -88,9 +88,9 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTarget(s.actfilter) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) end function s.actfilter(e,c) return c:IsRace(RACE_DRAGON) -end +end \ No newline at end of file diff --git a/official/c29795530.lua b/official/c29795530.lua index edd4762f30..f0f8cfcd73 100644 --- a/official/c29795530.lua +++ b/official/c29795530.lua @@ -1,4 +1,5 @@ --妖怪のいたずら +--Mischief of the Yokai local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(s.lvcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) @@ -31,20 +32,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -58,7 +54,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c2980764.lua b/official/c2980764.lua index 34da2d9bd1..445841fe47 100644 --- a/official/c2980764.lua +++ b/official/c2980764.lua @@ -38,4 +38,4 @@ function s.tglimit(e,c) end function s.sumlimit(e,c) return c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c29826127.lua b/official/c29826127.lua index a71c44ae05..fa02b4d641 100644 --- a/official/c29826127.lua +++ b/official/c29826127.lua @@ -1,4 +1,5 @@ --暗黒よりの軍勢 +--The Forces of Darkness local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} function s.filter(c) - return c:IsSetCard(0x6) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DARK_WORLD) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,2,2,nil) @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c29834183.lua b/official/c29834183.lua index 8f635bb283..3638e6b4aa 100644 --- a/official/c29834183.lua +++ b/official/c29834183.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re and re:IsActiveType(TYPE_MONSTER))) + return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re and re:IsMonsterEffect())) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -39,7 +39,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -48,7 +48,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Destroy local e3=Effect.CreateEffect(c) @@ -56,13 +56,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EVENT_LEAVE_FIELD_P) e3:SetOperation(s.checkop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e4:SetCode(EVENT_LEAVE_FIELD) e4:SetOperation(s.desop) - e4:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD) + e4:SetReset(RESET_EVENT|RESET_OVERLAY|RESET_TOFIELD) e4:SetLabelObject(e3) c:RegisterEffect(e4) end diff --git a/official/c29838323.lua b/official/c29838323.lua index 03a9b8bf78..263c65d6bd 100644 --- a/official/c29838323.lua +++ b/official/c29838323.lua @@ -20,18 +20,18 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} s.listed_names={id} function s.desfilter(c,ft) return c:IsFaceup() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xea) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTRON) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -73,7 +73,7 @@ function s.lizfilter(e,c) return not (c:IsOriginalRace(RACE_MACHINE) and c:IsOriginalType(TYPE_SYNCHRO)) end function s.thfilter(c) - return c:IsSetCard(0xea) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_CRYSTRON) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -86,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29843091.lua b/official/c29843091.lua index d878389b99..c5fb60e240 100644 --- a/official/c29843091.lua +++ b/official/c29843091.lua @@ -1,6 +1,5 @@ --おジャマトリオ --Ojama Trio - local s,id=GetID() function s.initial_effect(c) --Special summon 3 tokens to opponent's field @@ -16,13 +15,13 @@ end s.listed_names={TOKEN_OJAMA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,0xf,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,SET_OJAMA,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<3 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,0xf,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_OJAMA,SET_OJAMA,TYPES_TOKEN,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENSE,1-tp) then return end for i=0,2 do local token=Duel.CreateToken(tp,TOKEN_OJAMA+i) if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) then @@ -32,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) token:RegisterEffect(e1,true) --Inflict 300 damage when destroyed diff --git a/official/c29863101.lua b/official/c29863101.lua index 959c726a15..ac56351381 100644 --- a/official/c29863101.lua +++ b/official/c29863101.lua @@ -1,4 +1,5 @@ --バスター・テレポート +--Assault Teleport local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x104f} +s.listed_series={SET_ASSAULT_MODE} function s.filter(c) - return c:IsSetCard(0x104f) and c:IsAbleToDeck() + return c:IsSetCard(SET_ASSAULT_MODE) and c:IsAbleToDeck() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -32,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c2986553.lua b/official/c2986553.lua index 29da383424..19f9b10b4e 100644 --- a/official/c2986553.lua +++ b/official/c2986553.lua @@ -1,4 +1,5 @@ --夜薔薇の騎士 +--Twilight Rose Knight local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -37,4 +38,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c29867611.lua b/official/c29867611.lua index c148397080..a98908398a 100644 --- a/official/c29867611.lua +++ b/official/c29867611.lua @@ -1,7 +1,6 @@ --A・Ɐ・MM ---Amaze Ɐttraction Majestic Menage +--Amaze Attraction Majestic Merry-Go-Round --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --From cards_specific_functions.lua @@ -20,9 +19,9 @@ function s.initial_effect(c) e3:SetTarget(s.desreptg) c:RegisterEffect(e3) end -s.listed_series={0x15e,0x15f} +s.listed_series={SET_AMAZEMENT,SET_ATTRACTION} function s.atkfilter(c) - return c:IsTrap() and c:IsSetCard(0x15f) and c:GetEquipTarget() + return c:IsTrap() and c:IsSetCard(SET_ATTRACTION) and c:GetEquipTarget() end function s.atkval(e,c) local et=e:GetHandler():GetEquipTarget() @@ -37,9 +36,9 @@ end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tc=c:GetEquipTarget() - if chk==0 then return tc:GetControler()==tp and not tc:IsReason(REASON_REPLACE) end + if chk==0 then return tc:IsControler(tp) and not tc:IsReason(REASON_REPLACE) end if Duel.SelectEffectYesNo(tp,c,96) then Duel.SendtoGrave(c,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c29876529.lua b/official/c29876529.lua index 9bdd863151..5cfb723e87 100644 --- a/official/c29876529.lua +++ b/official/c29876529.lua @@ -1,4 +1,5 @@ --闇の閃光 +--Darklight local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,4 +44,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c298846.lua b/official/c298846.lua index 5cf52d1f93..0e45a7ab3d 100644 --- a/official/c298846.lua +++ b/official/c298846.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.damcond) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) diff --git a/official/c29884951.lua b/official/c29884951.lua index 3c1de6f119..7ac2d9b7f5 100644 --- a/official/c29884951.lua +++ b/official/c29884951.lua @@ -1,9 +1,9 @@ --- 相剣瑞獣-純鈞 --- Swordsoul Auspice Chunjun --- Scripted by Hatter +--相剣瑞獣-純鈞 +--Swordsoul Auspice Chunjun +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy itself and an opponent's monster that battles your Wyrm monster + --Destroy itself and an opponent's monster that battles your Wyrm monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - -- Special Summon itself from hand + --Special Summon itself from hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Banish 1 card from the field or GY + --Banish 1 card from the field or GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_REMOVE) diff --git a/official/c29888389.lua b/official/c29888389.lua index c8285b24dd..181f7b4953 100644 --- a/official/c29888389.lua +++ b/official/c29888389.lua @@ -1,4 +1,5 @@ --シャドウ・リチュア +--Gishki Shadow local s,id=GetID() function s.initial_effect(c) --search @@ -7,21 +8,16 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) --ritual level Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) end -s.listed_series={0x3a} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_GISHKI} function s.filter(c) - return c:IsSetCard(0x3a) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() + return c:IsSetCard(SET_GISHKI) and c:IsRitualSpell() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -34,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c29905795.lua b/official/c29905795.lua index bf92d583fc..e2622fbe6e 100644 --- a/official/c29905795.lua +++ b/official/c29905795.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.disfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsDiscardable() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -27,13 +27,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.disfilter,tp,LOCATION_HAND,0,nil) if #g==0 then return end if #g==1 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=g:Select(tp,1,1,e:GetHandler()) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) end local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c29913783.lua b/official/c29913783.lua index ae7197cbc1..62a561f902 100644 --- a/official/c29913783.lua +++ b/official/c29913783.lua @@ -2,7 +2,7 @@ --Super Anti-Kaiju War Machine Mecha-Thunder-King local s,id=GetID() function s.initial_effect(c) - c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0xd3),LOCATION_MZONE) + c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,SET_KAIJU),LOCATION_MZONE) --Banish 1 "Kaiju" monster and Special Summon 1 monster from the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -20,7 +20,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(function (e,c) return c:IsSetCard(0xd3) end) + e2:SetValue(function (e,c) return c:IsSetCard(SET_KAIJU) end) c:RegisterEffect(e2) --Unnaffected by other "Kaiju" cards' effects local e3=Effect.CreateEffect(c) @@ -43,16 +43,12 @@ function s.initial_effect(c) e4:SetOperation(s.spop2) c:RegisterEffect(e4) end -s.listed_series={0xd3} +s.listed_series={SET_KAIJU} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return Duel.IsMainPhase() end function s.rmfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0xd3) and c:IsAbleToRemove() and c:GetOwner()~=e:GetHandler():GetControler() + return c:IsFaceup() and c:IsSetCard(SET_KAIJU) and c:IsAbleToRemove() and c:GetOwner()~=e:GetHandler():GetControler() end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) @@ -76,7 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.efilter(e,te) - return te:GetHandler():IsSetCard(0xd3) + return te:GetHandler():IsSetCard(SET_KAIJU) end function s.spcond2(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() @@ -90,4 +86,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c2992036.lua b/official/c2992036.lua index d57228ffd2..a0511a5649 100644 --- a/official/c2992036.lua +++ b/official/c2992036.lua @@ -25,14 +25,14 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.descond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x13,0x9013} +s.listed_series={SET_MEKLORD,SET_MEKLORD_ASTRO} function s.tgfilter(c,e,tp,ft) - return c:IsMonster() and c:IsSetCard(0x13) and c:IsCanBeEffectTarget(e) + return c:IsMonster() and c:IsSetCard(SET_MEKLORD) and c:IsCanBeEffectTarget(e) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -70,11 +70,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c) return not c:IsRace(RACE_MACHINE) end) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,reset_ct) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,reset_ct) Duel.RegisterEffect(e1,tp) end function s.descond(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x9013),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MEKLORD_ASTRO),tp,LOCATION_MZONE,0,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_SYNCHRO),tp,0,LOCATION_MZONE,nil) diff --git a/official/c29925614.lua b/official/c29925614.lua index e1929c02e0..058e5ae24e 100644 --- a/official/c29925614.lua +++ b/official/c29925614.lua @@ -109,4 +109,4 @@ function s.equipop(c,e,tp,tc) end function s.eqval(ec,c,tp) return ec:IsMonster() -end +end \ No newline at end of file diff --git a/official/c29929832.lua b/official/c29929832.lua index fe5bdb1a35..e6e3364320 100644 --- a/official/c29929832.lua +++ b/official/c29929832.lua @@ -1,7 +1,8 @@ --マリン・ビースト +--Marine Beast local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,93343894,94022093) -end +end \ No newline at end of file diff --git a/official/c29947751.lua b/official/c29947751.lua index 1fa64de723..1d4ac58fb2 100644 --- a/official/c29947751.lua +++ b/official/c29947751.lua @@ -1,4 +1,5 @@ --D・マグネンU +--Morphtronic Magnen local s,id=GetID() function s.initial_effect(c) --atk @@ -40,4 +41,4 @@ function s.cond(e) end function s.atlimit(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c29948294.lua b/official/c29948294.lua index 1e23d88ba5..648f4d5f44 100644 --- a/official/c29948294.lua +++ b/official/c29948294.lua @@ -1,9 +1,9 @@ --- 烙印の気炎 --- Branded in High Spirits --- Scripted by Hatter +--烙印の気炎 +--Branded in High Spirits +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Send to GY, discard, and search + --Send to GY, discard, and search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_HANDES+CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) - -- Add self to hand + --Add self to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Check for Fusion Monsters sent to the GY + --Check for Fusion Monsters sent to the GY aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -39,7 +39,7 @@ s.listed_names={CARD_ALBAZ} function s.checkop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(eg) do if tc:IsType(TYPE_FUSION) then - Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end end @@ -72,7 +72,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and cc:IsDiscardable(REASON_EFFECT) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() - if Duel.SendtoGrave(cc,REASON_EFFECT+REASON_DISCARD)>0 then + if Duel.SendtoGrave(cc,REASON_EFFECT|REASON_DISCARD)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local hg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #hg>0 then @@ -93,4 +93,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c29951323.lua b/official/c29951323.lua index 90d8a7d095..631314a425 100644 --- a/official/c29951323.lua +++ b/official/c29951323.lua @@ -1,4 +1,5 @@ --放電ムスタンガン +--Zap Mustung local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -44,13 +45,13 @@ function s.initial_effect(c) end function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) and Duel.GetActivityCount(e:GetHandlerPlayer(),ACTIVITY_SPSUMMON)==0 - and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==e:GetHandlerPlayer() + and Duel.IsPhase(PHASE_MAIN1) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 end function s.limittg(e,c,tp) - return Duel.GetTurnPlayer()==tp and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)>=Duel.GetBattledCount(tp) + return Duel.IsTurnPlayer(tp) and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)>=Duel.GetBattledCount(tp) end function s.countcon1(e) return Duel.GetTurnPlayer()==e:GetHandlerPlayer() @@ -62,4 +63,4 @@ function s.countval(e,re,tp) local t1=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON) local t2=Duel.GetBattledCount(tp) if t1>=t2 then return 0 else return t2-t1 end -end +end \ No newline at end of file diff --git a/official/c29975188.lua b/official/c29975188.lua index 0ad3f57498..99db70ea0f 100644 --- a/official/c29975188.lua +++ b/official/c29975188.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e1) --spsummon @@ -58,5 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c29981921.lua b/official/c29981921.lua index bab71c5e0d..468e25c4dc 100644 --- a/official/c29981921.lua +++ b/official/c29981921.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x3d),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_SIX_SAMURAI),1,99) c:EnableReviveLimit() --Negate activation local e1=Effect.CreateEffect(c) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) @@ -46,7 +46,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,5 +66,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c29981935.lua b/official/c29981935.lua index 2ba07ae40a..fa5ddbadaa 100644 --- a/official/c29981935.lua +++ b/official/c29981935.lua @@ -1,7 +1,6 @@ --武神-トリフネ --Bujin Torifune --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -35,16 +34,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Bujin" archetype -s.listed_series={0x88} - - --Tribute itself as cost -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_BUJIN} --Check for "Bujin" monsters, except "Bujin Torifune" function s.spfilter(c,e,tp) - return c:IsSetCard(0x88) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_BUJIN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end --The 2 "Bujin" monsters have different types from each other function s.spcheck(sg,e,tp,mg) @@ -75,12 +68,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check if a "Bujin" Xyz mosnter was Xyz summoned function s.eqcfilter(c,tp) - return c:IsSetCard(0x88) and c:IsType(TYPE_XYZ) and c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsSummonPlayer(tp) + return c:IsSetCard(SET_BUJIN) and c:IsType(TYPE_XYZ) and c:IsXyzSummoned() and c:IsSummonPlayer(tp) end --If it ever happened function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.eqcfilter,1,nil,tp) - end --Activation legality function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -101,7 +93,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) diff --git a/official/c29996433.lua b/official/c29996433.lua index a8b348b598..4de1ac661b 100644 --- a/official/c29996433.lua +++ b/official/c29996433.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1,id) e3:SetCondition(function(e) return e:GetHandler():IsDefensePos() end) e3:SetTarget(s.sptg) diff --git a/official/c29999161.lua b/official/c29999161.lua index d5f5af0984..240d7a425d 100644 --- a/official/c29999161.lua +++ b/official/c29999161.lua @@ -1,4 +1,5 @@ --発条の巻き戻し +--Zenmairch local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -25,7 +26,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.spfilter(c,lv,e,tp) - return c:IsSetCard(0x58) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WIND_UP) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c30010480.lua b/official/c30010480.lua index 969fc9a483..e510b4f7d6 100644 --- a/official/c30010480.lua +++ b/official/c30010480.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2) c:EnableReviveLimit() --extra summon local e1=Effect.CreateEffect(c) @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.sumval(e,c) if c:IsControler(e:GetHandlerPlayer()) then local sumzone=e:GetHandler():GetLinkedZone() @@ -41,7 +41,7 @@ end function s.cfilter(c,tp,zone) local seq=c:GetPreviousSequence() if not c:IsPreviousControler(tp) then seq=seq+16 end - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0 end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -55,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c30012506.lua b/official/c30012506.lua index 4c51cff3e0..bae42e3d14 100644 --- a/official/c30012506.lua +++ b/official/c30012506.lua @@ -1,4 +1,5 @@ --A-アサルト・コア +--A-Assault Core local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,s.unfilter) @@ -24,7 +25,7 @@ function s.unfilter(c) end function s.efilter(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner() - and te:IsActiveType(TYPE_MONSTER) + and te:IsMonsterEffect() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) diff --git a/official/c30013902.lua b/official/c30013902.lua index 9dedf22bf6..54993f4ca3 100644 --- a/official/c30013902.lua +++ b/official/c30013902.lua @@ -5,6 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) @@ -15,12 +16,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) --special summon copy from extra local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.spextg) e2:SetOperation(s.spexop) c:RegisterEffect(e2) @@ -42,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.filter1(c,e,tp) - return c:IsLinkMonster() and c:IsLinkBelow(2) and c:IsLinked() and (c:IsSetCard(0x1157) or c:IsSetCard(0x2157)) + return c:IsLinkMonster() and c:IsLinkBelow(2) and c:IsLinked() and c:IsSetCard({SET_SUNAVALON,SET_SUNVINE}) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) end function s.filter2(c,e,tp,code) @@ -59,7 +61,7 @@ end function s.spexop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCountFromEx(tp)>0 then + if tc:IsRelateToEffect(e) and Duel.GetLocationCountFromEx(tp)>0 then local code=tc:GetCode() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sc=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,code):GetFirst() @@ -67,12 +69,12 @@ function s.spexop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) Duel.SpecialSummonComplete() end @@ -84,7 +86,7 @@ function s.spexop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,tp,sumtp,sumpos) diff --git a/official/c30037118.lua b/official/c30037118.lua index d93d988210..b53d668c51 100644 --- a/official/c30037118.lua +++ b/official/c30037118.lua @@ -1,9 +1,9 @@ --- 死製棺サルコファガス --- Entombing Casket Sarcophagus --- Scripted by Hatter +--死製棺サルコファガス +--Devouring Sarcoughagus +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Take control when self is destroyed by battle + --Take control when self is destroyed by battle local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_CONTROL) @@ -13,14 +13,14 @@ function s.initial_effect(c) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) - -- Take control when another Zombie is destroyed by battle + --Take control when another Zombie is destroyed by battle local e2=e1:Clone() e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.gctcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) c:RegisterEffect(e2) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) @@ -39,14 +39,14 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if not dc then return end local tc=dc:GetBattleTarget() if tc and tc:IsControler(1-tp) and Duel.GetControl(tc,tp) then - -- Treat as Zombie + --Treat as Zombie local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_ZOMBIE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - -- ATK/DEF becomes 0 + --ATK/DEF becomes 0 local e2=e1:Clone() e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(0) diff --git a/official/c30042158.lua b/official/c30042158.lua index 7688fd28f2..5a0aeb45b8 100644 --- a/official/c30042158.lua +++ b/official/c30042158.lua @@ -27,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30068120.lua b/official/c30068120.lua index d1ec48a19d..b1aca2da46 100644 --- a/official/c30068120.lua +++ b/official/c30068120.lua @@ -1,4 +1,5 @@ --エッジインプ・シザー +--Edge Imp Sabres local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,7 +18,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c30069398.lua b/official/c30069398.lua index cee6c6cb0f..22be65013b 100644 --- a/official/c30069398.lua +++ b/official/c30069398.lua @@ -36,4 +36,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(c:GetPreviousControler(),300,REASON_EFFECT) end e:Reset() -end +end \ No newline at end of file diff --git a/official/c30079770.lua b/official/c30079770.lua index c36836ec6c..1f019a0468 100644 --- a/official/c30079770.lua +++ b/official/c30079770.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.damcon) @@ -31,4 +31,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local atk=c:GetBaseAttack() Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30086349.lua b/official/c30086349.lua index 31a5e0a631..7081019737 100644 --- a/official/c30086349.lua +++ b/official/c30086349.lua @@ -1,4 +1,5 @@ --流星竜メテオ・ブラック・ドラゴン +--Meteor Black Comet Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -27,26 +28,26 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.material_setcode=0x3b +s.material_setcode=SET_RED_EYES function s.mfilter1(c,fc,sumtype,tp) - return c:IsSetCard(0x3b,fc,sumtype,tp) and c:GetLevel()==7 + return c:IsSetCard(SET_RED_EYES,fc,sumtype,tp) and c:GetLevel()==7 end function s.mfilter2(c,fc,sumtype,tp) return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:GetLevel()==6 end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.damfilter(c,fc,tp) - return c:IsSetCard(0x3b,fc,SUMMON_TYPE_FUSION,tp) and c:GetBaseAttack()>0 and c:IsAbleToGrave() + return c:IsSetCard(SET_RED_EYES,fc,SUMMON_TYPE_FUSION,tp) and c:GetBaseAttack()>0 and c:IsAbleToGrave() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e:GetHandler(),tp) end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.damfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.damfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e:GetHandler(),tp) local tc=g:GetFirst() if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then Duel.Damage(1-tp,math.ceil(g:GetFirst():GetBaseAttack()/2),REASON_EFFECT) @@ -71,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30095833.lua b/official/c30095833.lua index 70243c03e5..96bc89af61 100644 --- a/official/c30095833.lua +++ b/official/c30095833.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.dxmcostgen(1,1)) + e3:SetCost(Cost.Detach(1,1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -101,4 +101,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c30100551.lua b/official/c30100551.lua index 28a11f9525..eefaa6f78e 100644 --- a/official/c30100551.lua +++ b/official/c30100551.lua @@ -1,4 +1,5 @@ --ライトロード・セイント ミネルバ +--Minerva, the Exalted Lightsworn local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.drcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.drop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,11 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x38} -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_LIGHTSWORN} function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end Duel.SetTargetPlayer(tp) @@ -38,7 +35,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) end function s.cfilter(c) - return c:IsSetCard(0x38) and c:IsLocation(LOCATION_GRAVE) + return c:IsSetCard(SET_LIGHTSWORN) and c:IsLocation(LOCATION_GRAVE) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) @@ -67,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sdg) Duel.Destroy(sdg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30106950.lua b/official/c30106950.lua index b90b922bc0..896dd2a79a 100644 --- a/official/c30106950.lua +++ b/official/c30106950.lua @@ -1,4 +1,5 @@ --炎竜星-シュンゲイ +--Suanni, Fire of the Yang Zing local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1) e2:SetCondition(s.sccon) e2:SetTarget(s.sctg) @@ -34,15 +35,15 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -56,19 +57,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9e),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_YANG_ZING),tp,LOCATION_MZONE,0,nil) return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9e),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_YANG_ZING),tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -86,9 +85,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) rc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c30114823.lua b/official/c30114823.lua index 06dff8ba48..ba9116e739 100644 --- a/official/c30114823.lua +++ b/official/c30114823.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.extrafilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end @@ -47,7 +47,7 @@ function s.extraval(chk,summon_type,e,...) local c=e:GetHandler() if chk==0 then local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(0x101) or Duel.GetFlagEffect(tp,id)>0 then + if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_CODE_TALKER) or Duel.GetFlagEffect(tp,id)>0 then return Group.CreateGroup() else table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) @@ -57,7 +57,7 @@ function s.extraval(chk,summon_type,e,...) local sg,sc,tp=... if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end elseif chk==2 then for _,eff in ipairs(s.flagmap[c]) do @@ -70,7 +70,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() e:SetLabel(0) if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end - return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101) + return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_CODE_TALKER) end function s.tgfilter(c,chk) return c:IsRace(RACE_CYBERSE) and c:IsAttackBelow(1200) and (c:IsAbleToGrave() or (chk==1 and c:IsAbleToHand())) @@ -91,4 +91,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c30118200.lua b/official/c30118200.lua index 71113d0235..d0d53b7d6c 100644 --- a/official/c30118200.lua +++ b/official/c30118200.lua @@ -48,7 +48,7 @@ end s.listed_series={SET_APPLIANCER} function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.dacon(e) return e:GetHandler():GetMutualLinkedGroupCount()==0 diff --git a/official/c30118701.lua b/official/c30118701.lua index 318ace524b..b78834ef88 100644 --- a/official/c30118701.lua +++ b/official/c30118701.lua @@ -22,11 +22,11 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - local TIMING_BATTLE_START_END=TIMING_BATTLE_START+TIMING_BATTLE_END - e2:SetHintTiming(TIMING_BATTLE_START_END,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START_END) + local TIMING_BATTLE_START_END=TIMING_BATTLE_START|TIMING_BATTLE_END + e2:SetHintTiming(TIMING_BATTLE_START_END,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_START_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function() return Duel.IsBattlePhase() end) - e2:SetCost(s.fuscost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e2:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e2) @@ -60,11 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) g:DeleteGroup() end -function s.fuscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end \ No newline at end of file diff --git a/official/c30123142.lua b/official/c30123142.lua index 188c510a62..16b68fb1dc 100644 --- a/official/c30123142.lua +++ b/official/c30123142.lua @@ -1,4 +1,5 @@ --シンクロ・ストライク +--Synchro Strike local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,16 +9,13 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterialCount()~=0 + return c:IsFaceup() and c:IsSynchroSummoned() and c:GetMaterialCount()~=0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -31,8 +29,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetMaterialCount()*500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c30126992.lua b/official/c30126992.lua index e8b6b06685..7bf2ebd5a6 100644 --- a/official/c30126992.lua +++ b/official/c30126992.lua @@ -1,4 +1,5 @@ --ライトレイ ディアボロス +--Lightray Diabolos local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -34,9 +35,9 @@ function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -56,4 +57,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30127518.lua b/official/c30127518.lua index 1c9d242872..3bc806303f 100644 --- a/official/c30127518.lua +++ b/official/c30127518.lua @@ -1,4 +1,5 @@ --落とし大穴 +--Darkfall local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,10 +28,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g1:GetFirst() for tc in aux.Next(g1) do if tc:IsLocation(LOCATION_GRAVE) then - local fg=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK+LOCATION_HAND,nil,tc:GetCode()) + local fg=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK|LOCATION_HAND,nil,tc:GetCode()) exg:Merge(fg) end end Duel.BreakEffect() Duel.SendtoGrave(exg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30128445.lua b/official/c30128445.lua index 0a009b504f..e36ccc8803 100644 --- a/official/c30128445.lua +++ b/official/c30128445.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c30131474.lua b/official/c30131474.lua index 8fd105dbba..73e78b257a 100644 --- a/official/c30131474.lua +++ b/official/c30131474.lua @@ -15,22 +15,22 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10f,0x102} +s.listed_series={SET_BORREL,SET_ROKKET} function s.cfilter(c) - return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(0x10f) + return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_BORREL) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) Duel.RegisterEffect(e1,tp) end end @@ -68,4 +68,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30155789.lua b/official/c30155789.lua index 916a8dfe99..83202cce48 100644 --- a/official/c30155789.lua +++ b/official/c30155789.lua @@ -1,4 +1,5 @@ --サディスティック・ポーション +--Brutal Potion local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_DAMAGE) e1:SetRange(LOCATION_SZONE) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Atkup local e2=Effect.CreateEffect(c) @@ -40,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(1000) e2:SetCondition(s.atkcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -49,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) @@ -63,6 +64,6 @@ function s.atkcon(e) end function s.damop(e,tp,eg,ep,ev,re,r,rp) if r&REASON_EFFECT~=0 and ep~=tp and rp==tp then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_DISABLE_PHASE_END,0,1) end -end +end \ No newline at end of file diff --git a/official/c30163008.lua b/official/c30163008.lua index 963df5ff18..f2eeb59021 100644 --- a/official/c30163008.lua +++ b/official/c30163008.lua @@ -1,5 +1,5 @@ --Ra'ten, the Heavenly General ---Scripted by Eerie Code +--Ra'ten, the Heavenly General local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(s.sptg) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetTarget(s.destg) @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30170981.lua b/official/c30170981.lua index 5e7c4e3ff8..38ae87339f 100644 --- a/official/c30170981.lua +++ b/official/c30170981.lua @@ -1,4 +1,5 @@ --死のメッセージ「H」 +--Spirit Message "L" local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) diff --git a/official/c30190809.lua b/official/c30190809.lua index 6942407bfe..74d02ede02 100644 --- a/official/c30190809.lua +++ b/official/c30190809.lua @@ -1,4 +1,5 @@ --機動砦のギア・ゴーレム +--Gear Golem the Moving Fortress local s,id=GetID() function s.initial_effect(c) --direct attack @@ -7,22 +8,18 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandler():GetEffectCount(EFFECT_DIRECT_ATTACK)==0 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) + return Duel.IsPhase(PHASE_MAIN1) and e:GetHandler():GetEffectCount(EFFECT_DIRECT_ATTACK)==0 end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c30194529.lua b/official/c30194529.lua index e6a7663003..eef761c6c3 100644 --- a/official/c30194529.lua +++ b/official/c30194529.lua @@ -1,5 +1,5 @@ --星杯戦士ニンギルス ---Star Grail Warrior Ningirsu +--Ningirsu the World Chalice Warrior local s,id=GetID() function s.initial_effect(c) --link summon @@ -39,19 +39,19 @@ function s.initial_effect(c) e5:SetOperation(s.spop2) c:RegisterEffect(e5) end -s.listed_series={0xfd} +s.listed_series={SET_WORLD_CHALICE} function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local gc=e:GetHandler():GetLinkedGroup():FilterCount(aux.FaceupFilter(Card.IsSetCard,0xfd),nil) + local gc=e:GetHandler():GetLinkedGroup():FilterCount(aux.FaceupFilter(Card.IsSetCard,SET_WORLD_CHALICE),nil) Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,gc) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local gc=e:GetHandler():GetLinkedGroup():FilterCount(aux.FaceupFilter(Card.IsSetCard,0xfd),nil) + local gc=e:GetHandler():GetLinkedGroup():FilterCount(aux.FaceupFilter(Card.IsSetCard,SET_WORLD_CHALICE),nil) if gc>0 then Duel.Draw(p,gc,REASON_EFFECT) end @@ -74,7 +74,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xfd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_CHALICE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -88,4 +88,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3019642.lua b/official/c3019642.lua index 1f966a2879..8a1cb94bc4 100644 --- a/official/c3019642.lua +++ b/official/c3019642.lua @@ -39,13 +39,13 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(s.repval) tc:RegisterEffect(e3) end @@ -61,4 +61,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30208479.lua b/official/c30208479.lua index 9c83b335ef..37801ece22 100644 --- a/official/c30208479.lua +++ b/official/c30208479.lua @@ -1,4 +1,5 @@ --マジシャン・オブ・ブラックカオス +--Magician of Black Chaos local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c30213599.lua b/official/c30213599.lua index 37244ae60f..77183a7370 100644 --- a/official/c30213599.lua +++ b/official/c30213599.lua @@ -1,4 +1,5 @@ --墓守の末裔 +--Gravekeeper's Descendant local s,id=GetID() function s.initial_effect(c) --destroy @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2e) + return c:IsFaceup() and c:IsSetCard(SET_GRAVEKEEPERS) end function s.filter(c,e) return c:IsCanBeEffectTarget(e) @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30221870.lua b/official/c30221870.lua index f88d9544b7..9eeb6b56f5 100644 --- a/official/c30221870.lua +++ b/official/c30221870.lua @@ -1,7 +1,6 @@ --機皇帝ワイゼル∞-S・アブソープション --Meklord Emperor Wisel - Synchro Absorption --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -42,18 +41,17 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.negcon) - e4:SetCost(s.negcost) + e4:SetCost(Cost.SelfTribute) e4:SetTarget(s.negtg) e4:SetOperation(s.negop) c:RegisterEffect(e4) end -s.listed_series={0x13} - +s.listed_series={SET_MEKLORD} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.cfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x13) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -88,7 +86,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -99,10 +97,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and (tc+tg:FilterCount(Card.IsOnField,nil)-#tg)>0 end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) diff --git a/official/c30227494.lua b/official/c30227494.lua index 78ef389a56..ab7da329db 100644 --- a/official/c30227494.lua +++ b/official/c30227494.lua @@ -41,7 +41,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sync:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c30230789.lua b/official/c30230789.lua index e31915ccca..9739181916 100644 --- a/official/c30230789.lua +++ b/official/c30230789.lua @@ -1,4 +1,5 @@ --カラクリ商人 壱七七 +--Karakuri Merchant mdl 177 "Inashichi" local s,id=GetID() function s.initial_effect(c) --must attack @@ -25,7 +26,7 @@ function s.initial_effect(c) e4:SetOperation(s.op) c:RegisterEffect(e4) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsAttackPos() end @@ -36,7 +37,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x11) and c:IsAbleToHand() + return c:IsSetCard(SET_KARAKURI) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -49,4 +50,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30241314.lua b/official/c30241314.lua index f03c580f18..68582aea69 100644 --- a/official/c30241314.lua +++ b/official/c30241314.lua @@ -23,14 +23,14 @@ end s.listed_names={54493213} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.filter(c,e,sp) return c:IsCode(54493213) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local cg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) + local cg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,nil,e,tp) if #cg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.SelectYesNo(tp, aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c30243636.lua b/official/c30243636.lua index 512b910686..9a37b53a58 100644 --- a/official/c30243636.lua +++ b/official/c30243636.lua @@ -1,4 +1,5 @@ --ハングリーバーガー +--Hungry Burger local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c3026686.lua b/official/c3026686.lua index f629540832..5f5d8e562e 100644 --- a/official/c3026686.lua +++ b/official/c3026686.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={id} -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} function s.thfilter(c) - return c:IsSetCard(0x122) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_VALKYRIE) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -48,4 +48,4 @@ function s.rmfilter(c) end function s.atkvalue(e,c) return Duel.GetMatchingGroupCount(s.rmfilter,c:GetControler(),0,LOCATION_REMOVED,nil)*200 -end +end \ No newline at end of file diff --git a/official/c3027001.lua b/official/c3027001.lua index 7ba8fcffb6..58e4aec89e 100644 --- a/official/c3027001.lua +++ b/official/c3027001.lua @@ -1,4 +1,5 @@ --偽物のわな +--Fake Trap local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local reg=tg:Filter(s.cfilter,e:GetHandler(),tp) local tc=reg:GetFirst() for tc in aux.Next(reg) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -42,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(s.repvalue) e1:SetOperation(s.repop) e1:SetLabelObject(re) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.repfilter(c) @@ -56,5 +57,5 @@ function s.repvalue(e,c) return c:GetFlagEffect(id)~=0 end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c30270176.lua b/official/c30270176.lua index be5bec0d46..0ffe3b7d8c 100644 --- a/official/c30270176.lua +++ b/official/c30270176.lua @@ -1,6 +1,5 @@ --暗黒方界神クリムゾン・ノヴァ --Crimson Nova the Dark Cubic Lord - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -52,10 +51,9 @@ function s.initial_effect(c) e5:SetOperation(s.damop) c:RegisterEffect(e5) end -s.listed_series={0xe3} - +s.listed_series={SET_CUBIC} function s.spcfilter(c) - return c:IsSetCard(0xe3) and not c:IsPublic() + return c:IsSetCard(SET_CUBIC) and not c:IsPublic() end function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==#sg,sg:GetClassCount(Card.GetCode)~=#sg @@ -86,7 +84,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.immval(e,te) - return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() + return te:GetOwner()~=e:GetHandler() and te:IsMonsterEffect() and te:IsActivated() and te:GetOwner():GetBaseAttack()<=3000 and te:GetOwner():GetBaseAttack()>=0 end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -105,11 +103,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c30276969.lua b/official/c30276969.lua index b71e2f5568..71307d126c 100644 --- a/official/c30276969.lua +++ b/official/c30276969.lua @@ -1,4 +1,5 @@ --氷弾使いレイス +--Reese the Ice Mistress local s,id=GetID() function s.initial_effect(c) --indes @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.indes(e,c) return c:IsLevelAbove(4) -end +end \ No newline at end of file diff --git a/official/c30284022.lua b/official/c30284022.lua index 7debe61f3e..e0e970f5fa 100644 --- a/official/c30284022.lua +++ b/official/c30284022.lua @@ -1,9 +1,9 @@ --- 暗黒界の傀儡 --- Dark World Puppet --- Scripted by Hatter +--暗黒界の傀儡 +--Dark World Puppetry +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Banish up to 3 cards + --Banish up to 3 cards local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_HANDES) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - -- Add 1 banished Fiend monster to the hand + --Add 1 banished Fiend monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -34,7 +34,7 @@ function s.tgfilter(c) return c:IsRace(RACE_FIEND) and c:IsDiscardable(REASON_EFFECT) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local loc=LOCATION_GRAVE+LOCATION_MZONE + local loc=LOCATION_GRAVE|LOCATION_MZONE if chkc then return chkc:IsLocation(loc) and s.rmfilter(chkc,tp) end if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,loc,loc,1,nil,tp) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,nil) end @@ -51,7 +51,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND,0,1,1,nil) if #dg>0 then Duel.BreakEffect() - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) end end end diff --git a/official/c30286474.lua b/official/c30286474.lua index e3a9c7fa0f..d4794a4aa7 100644 --- a/official/c30286474.lua +++ b/official/c30286474.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2) c:EnableReviveLimit() --disable local e1=Effect.CreateEffect(c) @@ -39,13 +39,13 @@ function s.initial_effect(c) e4:SetCondition(s.atcon) c:RegisterEffect(e4) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.costfilter(c,g) - return c:IsFaceup() and c:IsSetCard(0xfc) and g:IsContains(c) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) and g:IsContains(c) and c:IsAbleToHandAsCost() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local lg=e:GetHandler():GetLinkedGroup() @@ -80,21 +80,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -106,5 +106,4 @@ function s.atlimit(e,c) local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil) local tg=g:GetMaxGroup(Card.GetAttack) return not tg:IsContains(c) or c:IsFacedown() -end - +end \ No newline at end of file diff --git a/official/c30291086.lua b/official/c30291086.lua index 0802016924..f19648f8d1 100644 --- a/official/c30291086.lua +++ b/official/c30291086.lua @@ -52,7 +52,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) if op==2 then local tg=Duel.GetTargetCards(e) if #tg>0 then - ct=Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN) + ct=Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN) end elseif op~=1 then return end if not ct or ct==0 then return end @@ -64,6 +64,6 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) {b1,aux.Stringid(id,3)}, {b2,aux.Stringid(id,4)}) if lvop then - c:UpdateLevel(lvop==1 and ct or -ct,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:UpdateLevel(lvop==1 and ct or -ct,RESETS_STANDARD_DISABLE_PHASE_END) end -end +end \ No newline at end of file diff --git a/official/c30299166.lua b/official/c30299166.lua index 7808a0ca22..2a6da4f735 100644 --- a/official/c30299166.lua +++ b/official/c30299166.lua @@ -1,4 +1,5 @@ --ワーム・テンタクルス +--Worm Tentacles local s,id=GetID() function s.initial_effect(c) --multi atk @@ -13,17 +14,17 @@ function s.initial_effect(c) e1:SetOperation(s.mtop) c:RegisterEffect(e1) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.costfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,7 +37,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c30303854.lua b/official/c30303854.lua index 2039aa49d2..893465bfc9 100644 --- a/official/c30303854.lua +++ b/official/c30303854.lua @@ -1,7 +1,6 @@ --ラヴァル・アーチャー --Laval Archer --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -25,21 +24,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Laval" archetype -s.listed_series={0x39} - +s.listed_series={SET_LAVAL} --Gain an extra normal summon for "Laval" monsters function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(s.estg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.estg(e,c) - return c:IsSetCard(0x39) + return c:IsSetCard(SET_LAVAL) end --Check for FIRE monsters function s.filter(c,ft) @@ -68,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -80,11 +78,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,3),nil) end --Restricted to FIRE monsters function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsAttribute(ATTRIBUTE_FIRE) -end +end \ No newline at end of file diff --git a/official/c3030892.lua b/official/c3030892.lua index 5b1a23a343..7dd9621a6d 100644 --- a/official/c3030892.lua +++ b/official/c3030892.lua @@ -1,4 +1,5 @@ --スレイブ・エイプ +--Test Ape local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30312361.lua b/official/c30312361.lua index ce18f80d32..f82852ec3e 100644 --- a/official/c30312361.lua +++ b/official/c30312361.lua @@ -22,16 +22,16 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.filter(c) return c:IsType(TYPE_EFFECT) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -44,18 +44,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetLabelObject(e1) e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetValue(ba) c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c30314994.lua b/official/c30314994.lua index 0001c5f274..395c706445 100644 --- a/official/c30314994.lua +++ b/official/c30314994.lua @@ -1,4 +1,5 @@ --エレメント・ドラゴン +--Element Dragon local s,id=GetID() function s.initial_effect(c) --atk @@ -28,4 +29,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c30328508.lua b/official/c30328508.lua index 99c8ee9139..0dd25b700a 100644 --- a/official/c30328508.lua +++ b/official/c30328508.lua @@ -1,4 +1,5 @@ --シャドール・リザード +--Shaddoll Squamata local s,id=GetID() function s.initial_effect(c) --flip @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} s.listed_names={id} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -43,7 +44,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.filter(c) - return c:IsSetCard(0x9d) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_SHADDOLL) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -55,4 +56,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30334522.lua b/official/c30334522.lua index 6db659ea67..51a7d1ebcc 100644 --- a/official/c30334522.lua +++ b/official/c30334522.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE) @@ -30,6 +30,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,tc) local rc,at=e:GetLabel() if tc:IsRace(rc) and tc:IsAttribute(at) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) else Duel.ShuffleHand(1-tp) end end \ No newline at end of file diff --git a/official/c30336082.lua b/official/c30336082.lua index e9d7517008..ec73593d2d 100644 --- a/official/c30336082.lua +++ b/official/c30336082.lua @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c30338466.lua b/official/c30338466.lua index e8094b2244..3f2f833a46 100644 --- a/official/c30338466.lua +++ b/official/c30338466.lua @@ -1,4 +1,5 @@ --剣現する武神 +--Bujin Regalia - The Sword local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.activate2) c:RegisterEffect(e2) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.filter(c) - return c:IsSetCard(0x88) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -40,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and c:IsMonster() end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.filter2(chkc) end @@ -51,6 +52,6 @@ end function s.activate2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c30339825.lua b/official/c30339825.lua index f2adcebdb0..52e0d93fb9 100644 --- a/official/c30339825.lua +++ b/official/c30339825.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg(true)) e2:SetOperation(s.spop(true)) c:RegisterEffect(e2) @@ -56,4 +56,4 @@ function s.spop(water) Duel.SpecialSummon(tc,0,tp,tc:GetControler(),false,false,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c30341772.lua b/official/c30341772.lua index a68b99c461..f1f3d2cc32 100644 --- a/official/c30341772.lua +++ b/official/c30341772.lua @@ -1,4 +1,5 @@ --ホープ・バスター +--Utopia Buster local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c30342076.lua b/official/c30342076.lua index 5727969044..7060daf66c 100644 --- a/official/c30342076.lua +++ b/official/c30342076.lua @@ -46,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c30348744.lua b/official/c30348744.lua index 694a7237ec..2457e2ca6c 100644 --- a/official/c30348744.lua +++ b/official/c30348744.lua @@ -32,10 +32,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,0x27),nil)==#g + return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,SET_TG),nil)==#g end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(0x27) + return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(SET_TG) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30350202.lua b/official/c30350202.lua index 268cddf58c..3728e3a175 100644 --- a/official/c30350202.lua +++ b/official/c30350202.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c30353551.lua b/official/c30353551.lua index 0e7198915d..b238a6ba04 100644 --- a/official/c30353551.lua +++ b/official/c30353551.lua @@ -70,4 +70,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c303660.lua b/official/c303660.lua index dafb1bff62..c965283a0b 100644 --- a/official/c303660.lua +++ b/official/c303660.lua @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30382214.lua b/official/c30382214.lua index 040f7cc626..6187858db4 100644 --- a/official/c30382214.lua +++ b/official/c30382214.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xe6) and c:IsLevelBelow(2) + return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -58,9 +58,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c) - return not c:IsSetCard(0xe6) + return not c:IsSetCard(SET_FLOWER_CARDIAN) end -s.cfilter=aux.FaceupFilter(Card.IsSetCard,0xe6) +s.cfilter=aux.FaceupFilter(Card.IsSetCard,SET_FLOWER_CARDIAN) function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil) @@ -76,14 +76,14 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end function s.spfilter(c) - return c:IsSetCard(0xe6) and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Draw(p,d,REASON_EFFECT)~=0 then local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() diff --git a/official/c30392583.lua b/official/c30392583.lua index 8e6ed2c711..59d754627d 100644 --- a/official/c30392583.lua +++ b/official/c30392583.lua @@ -1,4 +1,5 @@ --聖占術の儀式 +--Prediction Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,9,nil,94997874) @@ -8,14 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(aux.exccon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0xcc} +s.listed_series={SET_PREDICTION_PRINCESS} function s.thfilter(c) - return c:IsSetCard(0xcc) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_PREDICTION_PRINCESS) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +29,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30398342.lua b/official/c30398342.lua index 4496f09249..29193d2106 100644 --- a/official/c30398342.lua +++ b/official/c30398342.lua @@ -30,20 +30,19 @@ function s.initial_effect(c) e3:SetTargetRange(1,0) e3:SetTarget(s.sumlimit) c:RegisterEffect(e3) - --ClockLizard check aux.addContinuousLizardCheck(c,LOCATION_SZONE,s.lizfilter) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c30399511.lua b/official/c30399511.lua index 3b9f860cdd..439a5b493e 100644 --- a/official/c30399511.lua +++ b/official/c30399511.lua @@ -1,4 +1,5 @@ --ジェネクス・パワー・プランナー +--Genex Power Planner local s,id=GetID() function s.initial_effect(c) --search @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.filter(c) - return c:GetLevel()==3 and c:IsSetCard(0x2) and c:IsType(TYPE_EFFECT) and c:IsAbleToHand() + return c:GetLevel()==3 and c:IsSetCard(SET_GENEX) and c:IsType(TYPE_EFFECT) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c3040496.lua b/official/c3040496.lua index fdb31ec7a0..ab57e50053 100644 --- a/official/c3040496.lua +++ b/official/c3040496.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) end diff --git a/official/c30411385.lua b/official/c30411385.lua index 9ed82f4aa9..5f0b096f57 100644 --- a/official/c30411385.lua +++ b/official/c30411385.lua @@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30426226.lua b/official/c30426226.lua index a321ede3eb..7970f798f0 100644 --- a/official/c30426226.lua +++ b/official/c30426226.lua @@ -27,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g2=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) Duel.SwapControl(g1,g2) -end +end \ No newline at end of file diff --git a/official/c30430448.lua b/official/c30430448.lua index b78d83074f..515c81218e 100644 --- a/official/c30430448.lua +++ b/official/c30430448.lua @@ -1,13 +1,13 @@ --- 凍てつく呪いの神碑 --- Mysterune of the Freezing Curse --- Scripted by Hatter +--凍てつく呪いの神碑 +--Runick Freezing Curses +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateMysteruneQPEffect(c,id,CATEGORY_DISABLE,s.negtg,s.negop,3,EFFECT_FLAG_CARD_TARGET) c:RegisterEffect(e1) end -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.negfilter(c) return c:IsType(TYPE_EFFECT) and c:IsNegatableMonster() end @@ -23,17 +23,17 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local c=e:GetHandler() - -- Negate effects + --Negate effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) return true end diff --git a/official/c30435145.lua b/official/c30435145.lua index 5e4b41aec2..f22f599d87 100644 --- a/official/c30435145.lua +++ b/official/c30435145.lua @@ -10,22 +10,22 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.filter(c,g) - return c:GetLevel()>4 and c:IsSetCard(0x7) and g:CheckWithSumEqual(Card.GetLevel,c:GetLevel()*2,1,99) + return c:GetLevel()>4 and c:IsSetCard(SET_ANCIENT_GEAR) and g:CheckWithSumEqual(Card.GetLevel,c:GetLevel()*2,1,99) end function s.rfilter(c) - return c:HasLevel() and c:IsSetCard(0x7) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:HasLevel() and c:IsSetCard(SET_ANCIENT_GEAR) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,rg) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,rg) local tc=g:GetFirst() @@ -41,11 +41,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SUMMON_PROC) e1:SetCondition(s.ntcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c30439101.lua b/official/c30439101.lua index b24ad31f61..2cc0c2b82f 100644 --- a/official/c30439101.lua +++ b/official/c30439101.lua @@ -1,7 +1,6 @@ --森のメルフィーズ --Melffy of the Forest --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,14 +31,9 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x147} - -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_MELFFY} function s.thfilter(c) - return c:IsSetCard(0x147) and c:IsAbleToHand() + return c:IsSetCard(SET_MELFFY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -55,7 +49,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.rtfilter(c,e,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousSetCard(0x147) and c:GetPreviousControler()==tp and c:IsControler(tp) and c~=e:GetHandler() + and c:IsPreviousSetCard(SET_MELFFY) and c:GetPreviousControler()==tp and c:IsControler(tp) and c~=e:GetHandler() end function s.discon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.rtfilter,1,nil,e,tp) @@ -77,13 +71,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) --Cannot attack local e3=Effect.CreateEffect(e:GetHandler()) @@ -91,7 +85,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c30450531.lua b/official/c30450531.lua index 9c5685265b..1bbd7eac41 100644 --- a/official/c30450531.lua +++ b/official/c30450531.lua @@ -1,4 +1,5 @@ --降霊の儀式 +--Rite of Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,12 +18,12 @@ function s.initial_effect(c) e2:SetCode(EFFECT_NECRO_VALLEY_IM) c:RegisterEffect(e2) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.filter(c,e,tp) - return c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30451366.lua b/official/c30451366.lua index b404794428..4e3290f5f3 100644 --- a/official/c30451366.lua +++ b/official/c30451366.lua @@ -1,4 +1,5 @@ --イリュージョン・シープ +--Mystical Sheep #1 local s,id=GetID() function s.initial_effect(c) --fusion substitute @@ -9,5 +10,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end + return e:GetHandler():IsLocation(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c30459350.lua b/official/c30459350.lua index 7e0b359c9d..465b41e49d 100644 --- a/official/c30459350.lua +++ b/official/c30459350.lua @@ -1,4 +1,5 @@ --王宮の鉄壁 +--Imperial Iron Wall local s,id=GetID() function s.initial_effect(c) --activate @@ -23,4 +24,4 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,1) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c30464153.lua b/official/c30464153.lua index dc8fcac5e9..f16a5491ed 100644 --- a/official/c30464153.lua +++ b/official/c30464153.lua @@ -1,4 +1,5 @@ --ウミノタウルス +--Uminotaurus local s,id=GetID() function s.initial_effect(c) --pierce @@ -11,5 +12,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,c) - return c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) -end + return c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) +end \ No newline at end of file diff --git a/official/c30488793.lua b/official/c30488793.lua index 31aab25d98..1e1abf72f0 100644 --- a/official/c30488793.lua +++ b/official/c30488793.lua @@ -1,4 +1,5 @@ --反発力 +--Counterforce local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dam=math.abs(c1:GetAttack()-c2:GetAttack()) Duel.Damage(p,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30500113.lua b/official/c30500113.lua index 05eeb6ac53..cb523af056 100644 --- a/official/c30500113.lua +++ b/official/c30500113.lua @@ -1,4 +1,5 @@ --RR-リターン +--Raidraptor - Return local s,id=GetID() function s.initial_effect(c) --activate @@ -20,20 +21,20 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCountLimit(1,id) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.cfilter1(c,tp) - return c:IsSetCard(0xba) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter1,1,nil,tp) end function s.filter(c) - return c:IsSetCard(0xba) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -49,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter2(c,tp) - return c:IsSetCard(0xba) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -57,7 +58,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter2,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToHand() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30502181.lua b/official/c30502181.lua index 8efb8c8c76..54f4f6591c 100644 --- a/official/c30502181.lua +++ b/official/c30502181.lua @@ -1,7 +1,8 @@ --ライトロード・レイピア +--Lightsworn Sabre local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x38)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_LIGHTSWORN)) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -20,15 +21,15 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x38) + return c:IsFaceup() and c:IsSetCard(SET_LIGHTSWORN) end function s.eqcondtion(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetPreviousLocation()==LOCATION_DECK end function s.eqtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) diff --git a/official/c30525991.lua b/official/c30525991.lua index 5326a0aa33..75dbcabde9 100644 --- a/official/c30525991.lua +++ b/official/c30525991.lua @@ -1,4 +1,5 @@ --スパルタクァの呪術師 +--Witch Doctor of Sparta local s,id=GetID() function s.initial_effect(c) --recover @@ -30,4 +31,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30531525.lua b/official/c30531525.lua index 282a17c549..ec682c831b 100644 --- a/official/c30531525.lua +++ b/official/c30531525.lua @@ -7,15 +7,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -43,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.ShuffleDeck(tp) -end +end \ No newline at end of file diff --git a/official/c30537973.lua b/official/c30537973.lua index 7f1e47c977..ae3759c1f9 100644 --- a/official/c30537973.lua +++ b/official/c30537973.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) end function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -71,7 +71,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetReset(RESET_EVENT+0x16c0000+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_TOFIELD|RESET_PHASE|PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.cfilter(c) @@ -79,7 +79,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsRace(RACE_PLANT) and c:IsLevelBelow(4) and c:IsAbleToHand() @@ -95,4 +95,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30548775.lua b/official/c30548775.lua index 3b56a64558..aef68c90b3 100644 --- a/official/c30548775.lua +++ b/official/c30548775.lua @@ -1,4 +1,5 @@ --ブランチ +--Branch! local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) end function s.filter(c) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_FUSION) - and c:IsSummonType(SUMMON_TYPE_FUSION) + and c:IsFusionSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return eg:IsExists(s.filter,1,nil) @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30552375.lua b/official/c30552375.lua index 282751d9ae..5324dbaa71 100644 --- a/official/c30552375.lua +++ b/official/c30552375.lua @@ -54,10 +54,10 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c3055837.lua b/official/c3055837.lua index 3e44570167..ecef9b39d6 100644 --- a/official/c3055837.lua +++ b/official/c3055837.lua @@ -1,4 +1,5 @@ --黒板消しの罠 +--Trap of Board Eraser local s,id=GetID() function s.initial_effect(c) --reflect @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if re:IsSpellTrapEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) if ex then return true end ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) @@ -27,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -45,4 +46,4 @@ function s.refcon(e,re,val,r,rp,rc) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) if cid==e:GetLabel() then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c30562585.lua b/official/c30562585.lua index 6ec1c4d647..cf53dca961 100644 --- a/official/c30562585.lua +++ b/official/c30562585.lua @@ -1,4 +1,5 @@ --ZERO-MAX +--ZERO-MAX local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end @@ -24,11 +25,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INFERNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c3056267.lua b/official/c3056267.lua index dbfe2e9fab..0125913ff6 100644 --- a/official/c3056267.lua +++ b/official/c3056267.lua @@ -1,4 +1,5 @@ --王座の侵略者 +--Invader of the Throne local s,id=GetID() function s.initial_effect(c) --flip @@ -17,7 +18,7 @@ function s.swapfilter(c) end function s.condition(e) local ph=Duel.GetCurrentPhase() - return not (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) + return not Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then Duel.SwapControl(c,tc) end -end +end \ No newline at end of file diff --git a/official/c30575681.lua b/official/c30575681.lua index e808a9f558..dca7e89a9d 100644 --- a/official/c30575681.lua +++ b/official/c30575681.lua @@ -1,4 +1,5 @@ --聖騎士ベディヴィエール +--Noble Knight Bedwyr local s,id=GetID() function s.initial_effect(c) --send to grave @@ -26,9 +27,9 @@ function s.initial_effect(c) e3:SetOperation(s.eqop) c:RegisterEffect(e3) end -s.listed_series={0x207a} +s.listed_series={SET_NOBLE_ARMS} function s.filter(c) - return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) and c:IsAbleToGrave() + return c:IsType(TYPE_EQUIP) and c:IsSetCard(SET_NOBLE_ARMS) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.eqfilter1(c) - return c:IsSetCard(0x207a) and c:GetEquipTarget() + return c:IsSetCard(SET_NOBLE_ARMS) and c:GetEquipTarget() and Duel.IsExistingTarget(s.eqfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c) end function s.eqfilter2(c,ec) @@ -66,4 +67,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if ec:IsFaceup() and ec:IsRelateToEffect(e) and ec:CheckEquipTarget(tc) and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Equip(tp,ec,tc) end -end +end \ No newline at end of file diff --git a/official/c30576089.lua b/official/c30576089.lua index e76b967bbe..da1c1e8832 100644 --- a/official/c30576089.lua +++ b/official/c30576089.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_DESTROYED) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) @@ -44,10 +44,10 @@ function s.filter(c) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and (c:IsFaceup() and c:IsOnField() or c:IsLocation(LOCATION_GRAVE)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end function s.spcfilter(c) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil) and s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30581601.lua b/official/c30581601.lua index e16429dc41..092539991a 100644 --- a/official/c30581601.lua +++ b/official/c30581601.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e2:SetCondition(function(e,tp) return Duel.IsMainPhase() or (Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase()) end) - e2:SetCost(aux.PayLPCost(100)) + e2:SetCost(Cost.PayLP(100)) e2:SetTarget(s.synchtg) e2:SetOperation(s.synchop) c:RegisterEffect(e2) diff --git a/official/c30585393.lua b/official/c30585393.lua index e0416e1d27..71831afd17 100644 --- a/official/c30585393.lua +++ b/official/c30585393.lua @@ -1,4 +1,5 @@ --リボーン・パズル +--Puzzle Reborn local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc==tc end if chk==0 then return #eg==1 and tc:IsPreviousControler(tp) and tc:IsPreviousLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and tc:IsReason(REASON_EFFECT) + and tc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and tc:IsReason(REASON_EFFECT) and tc:IsCanBeEffectTarget(e) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetTargetCard(tc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30587695.lua b/official/c30587695.lua index 08c23dab40..3cb392bd0c 100644 --- a/official/c30587695.lua +++ b/official/c30587695.lua @@ -1,4 +1,5 @@ --カブトロン +--Beetron local s,id=GetID() function s.initial_effect(c) --special summon @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c30600344.lua b/official/c30600344.lua index e48f220628..50eb601382 100644 --- a/official/c30600344.lua +++ b/official/c30600344.lua @@ -1,4 +1,5 @@ --エクシーズ・バースト +--Xyz Burst local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30603688.lua b/official/c30603688.lua index a4f3192a21..3684f75cf6 100644 --- a/official/c30603688.lua +++ b/official/c30603688.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e4:SetRange(LOCATION_HAND+LOCATION_MZONE) + e4:SetRange(LOCATION_HAND|LOCATION_MZONE) e4:SetCondition(s.atkcon) - e4:SetCost(s.atkcost) + e4:SetCost(Cost.SelfToGrave) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end @@ -57,7 +57,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) g:DeleteGroup() end function s.filter(c) @@ -83,21 +83,17 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return c and c~=e:GetHandler() and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRelateToBattle() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetLabelObject() if c:IsFaceup() and c:IsRelateToBattle() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(2000) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c30604579.lua b/official/c30604579.lua index 21dd3c7149..09c6502b2e 100644 --- a/official/c30604579.lua +++ b/official/c30604579.lua @@ -46,9 +46,9 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x6042} +s.listed_series={SET_NORDIC_BEAST} function s.tfilter(c,scard,sumtype,tp) - return c:IsSetCard(0x6042,scard,sumtype,tp) or c:IsHasEffect(EFFECT_SYNSUB_NORDIC) + return c:IsSetCard(SET_NORDIC_BEAST,scard,sumtype,tp) or c:IsHasEffect(EFFECT_SYNSUB_NORDIC) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -61,12 +61,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -76,20 +76,20 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end if rp~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and (pos&POS_FACEUP)~=0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.cfilter(c,tp) - return c:IsSetCard(0x6042) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NORDIC_BEAST) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -113,4 +113,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30606547.lua b/official/c30606547.lua index 902cf4a05f..eada2c31ff 100644 --- a/official/c30606547.lua +++ b/official/c30606547.lua @@ -1,4 +1,5 @@ --暗黒の扉 +--The Dark Door local s,id=GetID() function s.initial_effect(c) --activate @@ -35,6 +36,6 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id)~=0 then return end local fid=eg:GetFirst():GetFieldID() - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) e:GetLabelObject():SetLabel(fid) -end +end \ No newline at end of file diff --git a/official/c30607616.lua b/official/c30607616.lua index d40a663713..db34c02214 100644 --- a/official/c30607616.lua +++ b/official/c30607616.lua @@ -1,5 +1,5 @@ --轍の魔妖-朧車 ---Rickshaw Mayakashi - Oboroguruma +--Oboro-Guruma, the Wheeled Mayakashi local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) end @@ -68,5 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c30608985.lua b/official/c30608985.lua index 6d8b0c6044..129cc2cd57 100644 --- a/official/c30608985.lua +++ b/official/c30608985.lua @@ -1,4 +1,5 @@ --マジカル・アンダーテイカー +--Magical Undertaker local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30643162.lua b/official/c30643162.lua index 20d76e6d3f..a8f1f287f7 100644 --- a/official/c30643162.lua +++ b/official/c30643162.lua @@ -1,4 +1,5 @@ --ストライク・ショット +--Strike Slash local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,12 +24,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c3064425.lua b/official/c3064425.lua index 0dd015bbac..0003a7017f 100644 --- a/official/c3064425.lua +++ b/official/c3064425.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -21,14 +21,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -50,21 +50,21 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) - return c:IsSetCard(0x9a) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.cfilter(c) - return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsSetCard(0x9a) + return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() @@ -90,4 +90,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT,true) Duel.RDComplete() end -end +end \ No newline at end of file diff --git a/official/c30646525.lua b/official/c30646525.lua index 300f15ac3d..5b6ae98929 100644 --- a/official/c30646525.lua +++ b/official/c30646525.lua @@ -1,4 +1,5 @@ --破滅の魔王ガーランドルフ +--Garlandolf, King of Destruction local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -15,7 +16,7 @@ function s.initial_effect(c) end s.listed_names={52913738} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.filter(c,atk) return c:IsFaceup() and c:IsDefenseBelow(atk) @@ -36,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c30650147.lua b/official/c30650147.lua index 58ff4025b7..19772ba939 100644 --- a/official/c30650147.lua +++ b/official/c30650147.lua @@ -13,10 +13,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={30650148} -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.filter(c,tp) return c:IsFaceup() and c:GetOriginalLevel()>0 and c:IsReleasableByEffect() - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x106,TYPES_TOKEN,0,0,c:GetLevel(),RACE_ZOMBIE,ATTRIBUTE_DARK) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_VENDREAD,TYPES_TOKEN,0,0,c:GetLevel(),RACE_ZOMBIE,ATTRIBUTE_DARK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,tp) end @@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(1,0) - e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,0x106))) + e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsSetCard,SET_VENDREAD))) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -48,8 +48,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetValue(tc:GetOriginalLevel()) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c30653113.lua b/official/c30653113.lua index d5103bde83..0a9af5f77a 100644 --- a/official/c30653113.lua +++ b/official/c30653113.lua @@ -1,4 +1,5 @@ --ナイルの恵み +--Blessings of the Nile local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30674956.lua b/official/c30674956.lua index 0672393730..daf337f144 100644 --- a/official/c30674956.lua +++ b/official/c30674956.lua @@ -38,7 +38,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end @@ -47,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp==1-tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp==1-tp and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsMonster() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand() @@ -71,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30680659.lua b/official/c30680659.lua index 5bd18a92bc..f2f2b35816 100644 --- a/official/c30680659.lua +++ b/official/c30680659.lua @@ -1,9 +1,9 @@ --- 聖殿の水遣い --- Water Enchantress of the Temple --- Scripted by Hatter +--聖殿の水遣い +--Water Enchantress of the Temple +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon itself from the hand + --Special Summon itself from the hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,18 +14,18 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add 1 "Rite of Aramesir" from the Deck or GY to the hand + --Add 1 "Rite of Aramesir" from the Deck or GY to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Place Field Spell from Deck + --Place Field Spell from Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_IGNITION) diff --git a/official/c30683373.lua b/official/c30683373.lua index 60918194e8..265a5afdfd 100644 --- a/official/c30683373.lua +++ b/official/c30683373.lua @@ -1,4 +1,5 @@ --シールドクラッシュ +--Shield Crush local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.filter(c) return not c:IsAttackPos() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -26,4 +27,4 @@ function s.activate(e) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30691817.lua b/official/c30691817.lua index 004ecb28b2..248861f988 100644 --- a/official/c30691817.lua +++ b/official/c30691817.lua @@ -26,12 +26,12 @@ c:EnableReviveLimit() c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.mfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x12b,lc,sumtype,tp) and c:IsLevelBelow(4) + return c:IsSetCard(SET_MARINCESS,lc,sumtype,tp) and c:IsLevelBelow(4) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -39,7 +39,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end @@ -47,10 +47,10 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsCode(id) and sumtype&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.filter(c) - return c:IsSetCard(0x12b) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and c:IsSpell() and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -63,4 +63,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30707994.lua b/official/c30707994.lua index e44322bbfb..8352274f41 100644 --- a/official/c30707994.lua +++ b/official/c30707994.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end s.roll_dice=true function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,8 +29,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(dice*200) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c3072077.lua b/official/c3072077.lua index 95fc03e220..28724747b3 100644 --- a/official/c3072077.lua +++ b/official/c3072077.lua @@ -1,4 +1,5 @@ --リターン・ゾンビ +--Return Zombie local s,id=GetID() function s.initial_effect(c) --to hand @@ -6,21 +7,17 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_TOHAND) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToHand() end @@ -30,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3072808.lua b/official/c3072808.lua index ac16a28fd8..73b93df24f 100644 --- a/official/c3072808.lua +++ b/official/c3072808.lua @@ -1,4 +1,5 @@ --BF-天狗風のヒレン +--Blackwing - Hillen the Tengu-wind local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==tp and ev>=2000 and Duel.GetAttackTarget()==nil end function s.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(3) and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -55,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c30741334.lua b/official/c30741334.lua index cfc42a65a4..9e0f7d8b0a 100644 --- a/official/c30741334.lua +++ b/official/c30741334.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) local e1=Effect.CreateEffect(e:GetHandler()) @@ -26,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c30741503.lua b/official/c30741503.lua index 61cd8eb7bb..0ba2f86f56 100644 --- a/official/c30741503.lua +++ b/official/c30741503.lua @@ -58,7 +58,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tg=Duel.GetTargetCards(e) if #tg==0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local og=Duel.GetOperatedGroup() if #og==0 then return end if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end diff --git a/official/c30757127.lua b/official/c30757127.lua index b51c8355c6..1452c36fb0 100644 --- a/official/c30757127.lua +++ b/official/c30757127.lua @@ -1,9 +1,10 @@ --D-HERO デッドリーガイ +--Destiny HERO - Dangerous local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc008),s.ffilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESTINY_HERO),s.ffilter) --atk local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -13,57 +14,53 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE) - e1:SetCondition(s.atkcon) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0xc008} -s.material_setcode={0x8,0xc008} +s.listed_series={SET_DESTINY_HERO} +s.material_setcode={SET_HERO,SET_DESTINY_HERO} function s.ffilter(c,fc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsType(TYPE_EFFECT,fc,sumtype,tp) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c,tp) - return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c) + return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c) end function s.tgfilter(c) - return c:IsSetCard(0xc008) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToGrave() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil,tp) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.atkfilter(c) - return c:IsSetCard(0xc008) and c:IsFaceup() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsFaceup() end function s.ctfilter(c) - return c:IsSetCard(0xc008) and c:IsMonster() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then local tg=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil) if #tg<=0 then return end local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_GRAVE,0,nil) - local tc=tg:GetFirst() - for tc in aux.Next(tg) do + for tc in tg:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*200) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c30757396.lua b/official/c30757396.lua index 407a4fd884..f8d1e021a4 100644 --- a/official/c30757396.lua +++ b/official/c30757396.lua @@ -1,4 +1,5 @@ --ブラッド・メフィスト +--Blood Mefist local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.damcon) @@ -31,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -56,4 +57,4 @@ end function s.damop2(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30765615.lua b/official/c30765615.lua index 9947cbd04c..9414e5394b 100644 --- a/official/c30765615.lua +++ b/official/c30765615.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)>0 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tktg) e2:SetOperation(s.tkop) c:RegisterEffect(e2) diff --git a/official/c30770156.lua b/official/c30770156.lua index ff63c180a3..ed7cdc7786 100644 --- a/official/c30770156.lua +++ b/official/c30770156.lua @@ -1,4 +1,5 @@ --コア転送ユニット +--Core Transport Unit local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ end s.listed_names={36623431} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsCode(36623431) and c:IsAbleToHand() @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c30778711.lua b/official/c30778711.lua index c4ce1dec4d..fb140ffa7d 100644 --- a/official/c30778711.lua +++ b/official/c30778711.lua @@ -1,4 +1,5 @@ --シャドウ・グール +--Shadow Ghoul local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,4 +12,4 @@ function s.initial_effect(c) end function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsMonster,c:GetControler(),LOCATION_GRAVE,0,nil)*100 -end +end \ No newline at end of file diff --git a/official/c3078576.lua b/official/c3078576.lua index 58e6fcb803..280363bf3f 100644 --- a/official/c3078576.lua +++ b/official/c3078576.lua @@ -26,6 +26,6 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_SKIP_DP) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c30786387.lua b/official/c30786387.lua index b48ad1730f..40506aefa8 100644 --- a/official/c30786387.lua +++ b/official/c30786387.lua @@ -19,14 +19,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) - return c:IsSetCard(0xe6) and c:IsMonster() + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xe6) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30794966.lua b/official/c30794966.lua index 84ba82875c..4cd9c4abf4 100644 --- a/official/c30794966.lua +++ b/official/c30794966.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.spfilter1(c,tp) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end @@ -38,16 +38,16 @@ end function s.hspcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=g1:Clone() g:Merge(g2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #g1>0 and #g2>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() - local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) g1:Merge(g2) local g=aux.SelectUnselectGroup(g1,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then @@ -64,7 +64,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.repfilter(c) - return c:IsFaceup() and c:IsSetCard(0x69) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) + return c:IsFaceup() and c:IsSetCard(SET_HIERATIC) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -79,4 +79,4 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Release(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30802207.lua b/official/c30802207.lua index cb515c82a5..c6b4b76fda 100644 --- a/official/c30802207.lua +++ b/official/c30802207.lua @@ -1,5 +1,5 @@ --エクソシスター・カルペディベル ---Exorsister Carpedibel +--Exosister Carpedivem --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x174)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_EXOSISTER)) e2:SetValue(s.tgval) c:RegisterEffect(e2) --Negate @@ -44,12 +44,12 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.tgval(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSummonLocation(LOCATION_GRAVE) + return re:IsMonsterEffect() and re:GetHandler():IsSummonLocation(LOCATION_GRAVE) end function s.negcfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsSetCard(0x174) and c:IsSummonPlayer(tp) + return c:IsXyzSummoned() and c:IsSetCard(SET_EXOSISTER) and c:IsSummonPlayer(tp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.negcfilter,1,nil,tp) @@ -73,7 +73,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTarget(s.distg) e1:SetLabel(ac) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -81,7 +81,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.discon) e2:SetOperation(s.disop) e2:SetLabel(ac) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --Reset the card hint at the end of the turn local e3=Effect.CreateEffect(c) @@ -108,11 +108,11 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return (a:IsControler(tp) and a:IsSetCard(0x174)) - or (at and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x174)) + return (a:IsControler(tp) and a:IsSetCard(SET_EXOSISTER)) + or (at and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(SET_EXOSISTER)) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.desfilter(chkc) and chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) end @@ -127,4 +127,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30822527.lua b/official/c30822527.lua index c7097726f7..16554a7a08 100644 --- a/official/c30822527.lua +++ b/official/c30822527.lua @@ -1,7 +1,6 @@ --デコード・トーカー・エクステンド --Decode Talker Extended --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -49,7 +48,6 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={1861629} - function s.atkval(e,c) return c:GetLinkedGroup():FilterCount(Card.IsMonster,nil)*500 end @@ -73,7 +71,7 @@ end function s.racon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() local p=Duel.GetTurnPlayer() - return p==tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return p==tp and Duel.IsBattlePhase() end function s.ratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end @@ -88,7 +86,7 @@ function s.raop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c30829071.lua b/official/c30829071.lua index 1200c5eb42..35948363e9 100644 --- a/official/c30829071.lua +++ b/official/c30829071.lua @@ -1,7 +1,6 @@ --驚楽園の大使 ---Amazement Ambassador +--Amazement Ambassador Bufo --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --equip @@ -16,17 +15,15 @@ function s.initial_effect(c) --From cards_specific_functions.lua aux.AddAmazementQuickEquipEffect(c,id) end -s.listed_series={0x15f,0x15e} +s.listed_series={SET_ATTRACTION,SET_AMAZEMENT} function s.eqfilter(c) - return c:IsSetCard(0x15f) and c:IsTrap() + return c:IsSetCard(SET_ATTRACTION) and c:IsTrap() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and - Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil) and - Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) - end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g1=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil) local tc=g1:GetFirst() @@ -49,7 +46,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(AA.eqlim) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c30834988.lua b/official/c30834988.lua index f913fbcc07..bf38d38c86 100644 --- a/official/c30834988.lua +++ b/official/c30834988.lua @@ -1,4 +1,5 @@ --召喚制限-猛突するモンスター +--All-Out Attacks local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,11 +33,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end if Duel.GetFlagEffect(tp,id)==0 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) e:SetLabel(0) else local count=e:GetLabel() @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(c,REASON_RULE) end end -end +end \ No newline at end of file diff --git a/official/c30845999.lua b/official/c30845999.lua index 19fb55c2fe..de95d9be8c 100644 --- a/official/c30845999.lua +++ b/official/c30845999.lua @@ -1,6 +1,5 @@ --起動する機殻 --Qlipper Launch - local s,id=GetID() function s.initial_effect(c) --All your normal summoned/set "Qli" monsters gain 300 ATK, have their effects negate, and unaffected by spells/traps @@ -10,17 +9,14 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xaa} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_QLI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) and c:IsSummonType(SUMMON_TYPE_NORMAL) + return c:IsFaceup() and c:IsSetCard(SET_QLI) and c:IsNormalSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,27 +24,26 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do Duel.NegateRelatedChain(tc,RESET_TURN_SET) --Gains 300 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(300) tc:RegisterEffect(e1) --Negate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) --Unaffected by spells/traps local e4=Effect.CreateEffect(c) @@ -57,11 +52,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e4:SetRange(LOCATION_MZONE) e4:SetCode(EFFECT_IMMUNE_EFFECT) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) e4:SetValue(s.efilter) tc:RegisterEffect(e4) end end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwner()~=e:GetOwner() + return te:IsSpellTrapEffect() and te:GetOwner()~=e:GetOwner() end \ No newline at end of file diff --git a/official/c30860696.lua b/official/c30860696.lua index fe217bee3f..189f25657c 100644 --- a/official/c30860696.lua +++ b/official/c30860696.lua @@ -1,4 +1,5 @@ --ロケット戦士 +--Rocket Warrior local s,id=GetID() function s.initial_effect(c) --invincible @@ -37,6 +38,6 @@ function s.raop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) d:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c30864377.lua b/official/c30864377.lua index 75d62d0b99..c65e46b6ff 100644 --- a/official/c30864377.lua +++ b/official/c30864377.lua @@ -1,4 +1,5 @@ --剣闘獣総監エーディトル +--Gladiator Beast Tamer Editor local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -26,7 +27,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,4)) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetRange(LOCATION_MZONE) e6:SetCountLimit(1) e6:SetCost(s.spcost) @@ -34,24 +35,24 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} -s.material_setcode=0x19 +s.material_setcode=SET_GLADIATOR function s.matfilter(c,fc,sumtype,tp) - return c:IsLevelAbove(5) and c:IsSetCard(0x19,fc,sumtype,tp) + return c:IsLevelAbove(5) and c:IsSetCard(SET_GLADIATOR,fc,sumtype,tp) end function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function s.espfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and not c:IsCode(id) + return c:IsSetCard(SET_GLADIATOR) and c:IsType(TYPE_FUSION) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,124,tp,true,false) end function s.esptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,7 +67,7 @@ function s.espop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x19) and c:GetBattledGroupCount()>0 + return c:IsFaceup() and c:IsSetCard(SET_GLADIATOR) and c:GetBattledGroupCount()>0 and c:IsAbleToDeckOrExtraAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -78,7 +79,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,124,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,124,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -91,7 +92,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc then Duel.SpecialSummonStep(tc,124,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c30888983.lua b/official/c30888983.lua index 9d058fa279..f814e45b97 100644 --- a/official/c30888983.lua +++ b/official/c30888983.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_SUMMON) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -28,10 +28,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and eg:IsExists(s.filter,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=eg:Filter(s.filter,nil) @@ -42,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil) Duel.NegateSummon(g) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30907810.lua b/official/c30907810.lua index 7ea49fa9fd..0b28b52097 100644 --- a/official/c30907810.lua +++ b/official/c30907810.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e6:SetOperation(s.regop2) c:RegisterEffect(e6) local e7=e6:Clone() - e7:SetCode(EVENT_PHASE_START+PHASE_DRAW) + e7:SetCode(EVENT_PHASE_START|PHASE_DRAW) e7:SetOperation(s.clearop) c:RegisterEffect(e7) local e8=e6:Clone() diff --git a/official/c30913809.lua b/official/c30913809.lua index 8ff910c39b..7b8398d6b4 100644 --- a/official/c30913809.lua +++ b/official/c30913809.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_COIN) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_LIGHT_BARRIER),tp,LOCATION_FZONE,0,1,nil) end) diff --git a/official/c30914564.lua b/official/c30914564.lua index 3291894280..1f1a4dc424 100644 --- a/official/c30914564.lua +++ b/official/c30914564.lua @@ -1,4 +1,5 @@ --聖鳥クレイン +--Sacred Crane local s,id=GetID() function s.initial_effect(c) --draw @@ -21,4 +22,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c30915572.lua b/official/c30915572.lua index d6827e4f9f..b8aa981e44 100644 --- a/official/c30915572.lua +++ b/official/c30915572.lua @@ -1,4 +1,5 @@ --星見獣ガリス +--Gallis the Star Beast local s,id=GetID() function s.initial_effect(c) --special summon @@ -35,4 +36,4 @@ function s.spoperation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end end end -end +end \ No newline at end of file diff --git a/official/c30922149.lua b/official/c30922149.lua index bc1e2f942b..f67e244852 100644 --- a/official/c30922149.lua +++ b/official/c30922149.lua @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(tp,dr*2000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30929786.lua b/official/c30929786.lua index 2e683a0f85..f9d9bfa4e3 100644 --- a/official/c30929786.lua +++ b/official/c30929786.lua @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x79,0x7c} +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x79) and re:GetHandler():IsMonster() + return re:GetHandler():IsSetCard(SET_FIRE_FIST) and re:GetHandler():IsMonster() end function s.thfilter(c) - return c:IsSetCard(0x79) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FIRE_FIST) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,12 +44,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() and ((c:GetSequence()<5 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,true)) or (c:GetSequence()>4 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil))) end function s.filter(c,ignore) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) local nc=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 @@ -67,4 +67,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c30936186.lua b/official/c30936186.lua index e0332ebeea..b020f3f399 100644 --- a/official/c30936186.lua +++ b/official/c30936186.lua @@ -1,4 +1,5 @@ --コアキメイル・ウルナイト +--Koa'ki Meiru Urnight local s,id=GetID() function s.initial_effect(c) --cost @@ -23,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -75,7 +76,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x1d) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_KOAKI_MEIRU) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -89,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c30964246.lua b/official/c30964246.lua index ceed27fb83..273efd1a2f 100644 --- a/official/c30964246.lua +++ b/official/c30964246.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.retthtg) e2:SetOperation(s.retthop) c:RegisterEffect(e2) @@ -37,7 +37,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) end function s.trapfilter(c) - return c:IsContinuousTrap() and (c:IsLocation(LOCATION_MZONE) or (c:IsTrapMonster() and c:IsLocation(LOCATION_STZONE))) and c:IsFaceup() + return c:IsContinuousTrap() and (c:IsLocation(LOCATION_MZONE) or (c:IsTrapMonster() and c:IsLocation(LOCATION_STZONE))) and c:IsFaceup() end function s.nsfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsSummonable(true,nil) diff --git a/official/c3096468.lua b/official/c3096468.lua index 62daae8fc9..06330fe5cb 100644 --- a/official/c3096468.lua +++ b/official/c3096468.lua @@ -26,7 +26,7 @@ function s.sslimit(e,c) return not c:IsRace(RACE_ZOMBIE) end function s.syncon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.synval(e,c,sc) if c:IsLocation(LOCATION_HAND) then @@ -36,7 +36,7 @@ function s.synval(e,c,sc) e1:SetLabel(id) e1:SetTarget(s.synchktg) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) return true else return false end end @@ -69,5 +69,4 @@ function s.synchktg(e,c,sg,tg,ntg,tsg,ntsg) else return true end -end - +end \ No newline at end of file diff --git a/official/c30968774.lua b/official/c30968774.lua index 5136ebf929..f34210abf6 100644 --- a/official/c30968774.lua +++ b/official/c30968774.lua @@ -36,11 +36,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) if not sc:IsImmuneToEffect(e1) and not sc:IsHasEffect(EFFECT_REVERSE_UPDATE) then Duel.BreakEffect() local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30979619.lua b/official/c30979619.lua index 8b3c10779e..c9908b97b6 100644 --- a/official/c30979619.lua +++ b/official/c30979619.lua @@ -1,4 +1,5 @@ --SPYRAL GEAR - Big Red +--SPYRAL GEAR - Big Red local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,9 +19,9 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} function s.filter(c,e,tp) - return c:IsSetCard(0xee) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPYRAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -43,10 +44,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end function s.eqlimit(e,c) return e:GetOwner()==c -end +end \ No newline at end of file diff --git a/official/c30989084.lua b/official/c30989084.lua index e2ee67ec94..41b06b6631 100644 --- a/official/c30989084.lua +++ b/official/c30989084.lua @@ -107,4 +107,4 @@ function s.rmvop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then Duel.Recover(tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c30996652.lua b/official/c30996652.lua index 3d713b2df2..75e003e2f5 100644 --- a/official/c30996652.lua +++ b/official/c30996652.lua @@ -1,7 +1,6 @@ --機塊リユース --Appliancer Reuse --Anime version scripted by pyrQ, updated by Larry126 - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Appliancer" from GY @@ -14,10 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x14a} - +s.listed_series={SET_APPLIANCER} function s.spfilter(c,e,tp) - return c:IsSetCard(0x14a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_APPLIANCER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -36,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) tc:RegisterEffect(e1) Duel.SpecialSummonComplete() diff --git a/official/c31000575.lua b/official/c31000575.lua index 9ddab00e1f..6b447495b4 100644 --- a/official/c31000575.lua +++ b/official/c31000575.lua @@ -1,4 +1,5 @@ --徴兵令 +--Conscription local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DisableShuffleCheck() Duel.SendtoGrave(tc,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c31002402.lua b/official/c31002402.lua index 170745bb47..24eae85561 100644 --- a/official/c31002402.lua +++ b/official/c31002402.lua @@ -1,14 +1,14 @@ --凶導の福音 ---Dogmatikas +--Dogmatikalamity --scripted by edo9300 local s,id=GetID() function s.initial_effect(c) - local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,0x146),extrafil=s.extragroup, + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,SET_DOGMATIKA),extrafil=s.extragroup, extraop=s.extraop,stage2=s.stage2,forcedselection=s.ritcheck}) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} function s.matfilter1(c) return c:IsAbleToGrave() and c:IsLevelAbove(1) end @@ -27,7 +27,7 @@ function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e0:SetDescription(aux.Stringid(id,0)) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e0:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e0:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) Duel.RegisterEffect(e0,tp) diff --git a/official/c31006879.lua b/official/c31006879.lua index 7c96d87fb0..554252e565 100644 --- a/official/c31006879.lua +++ b/official/c31006879.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c3103067.lua b/official/c3103067.lua index de8fc72149..d1cddde6bb 100644 --- a/official/c3103067.lua +++ b/official/c3103067.lua @@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and tc and tc:IsRelateToEffect(e) then Duel.CalculateDamage(bc,tc) end -end +end \ No newline at end of file diff --git a/official/c31034919.lua b/official/c31034919.lua index c3df1585c1..3fb29d1eea 100644 --- a/official/c31034919.lua +++ b/official/c31034919.lua @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Draw(tp,2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c31036355.lua b/official/c31036355.lua index 6f8af6b88a..fbe86a7d45 100644 --- a/official/c31036355.lua +++ b/official/c31036355.lua @@ -1,6 +1,5 @@ --強制転移 --Creature Swap - local s,id=GetID() function s.initial_effect(c) --Each player changes control of 1 of their monsters @@ -40,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) c1:RegisterEffect(e1) local e2=e1:Clone() c2:RegisterEffect(e2) diff --git a/official/c31038159.lua b/official/c31038159.lua index ff479c8985..eec7264223 100644 --- a/official/c31038159.lua +++ b/official/c31038159.lua @@ -1,4 +1,5 @@ --創世竜 +--Genesis Dragon local s,id=GetID() function s.initial_effect(c) --salvage @@ -63,4 +64,4 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31042659.lua b/official/c31042659.lua index 6b6670590b..fb6ee46945 100644 --- a/official/c31042659.lua +++ b/official/c31042659.lua @@ -1,8 +1,6 @@ --覇蛇大公ゴルゴンダ --Supreme Sovereign Serpent of Golgonda --Logical Nonsense - ---Substitute ID local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -10,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(function(_,tp) return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,0,1,nil) end) e1:SetTarget(s.sptg) @@ -36,16 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end - --Specifically lists "Great Grand Sea – Gold Golgonda" -s.listed_names={60884672} - - --Activation legality +s.listed_names={60884672} --"Great Grand Sea – Gold Golgonda" function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end - --Special summon itself from hand or GY function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then @@ -55,21 +49,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end - --Check for "Great Grand Sea – Gold Golgonda" on the field function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,60884672),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(60884672) end - --Check for "Great Grand Sea – Gold Golgonda" being destroyed function s.repfilter(c,tp,rp) return c:IsFaceup() and c:IsCode(60884672) and c:IsOnField() and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) end - --Activation legality function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end @@ -87,9 +78,8 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end return false end - --Banish 1 card from GY as cost function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=e:GetLabelObject() - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c31053337.lua b/official/c31053337.lua index 15066c9ca9..2fcaebe65c 100644 --- a/official/c31053337.lua +++ b/official/c31053337.lua @@ -1,4 +1,5 @@ --BF-激震のアブロオロス +--Blackwing - Abrolhos the Megaquake local s,id=GetID() function s.initial_effect(c) --special summon limit @@ -38,7 +39,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) return c:IsAbleToHand() and c:GetSequence()<5 @@ -56,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) c:RegisterEffect(e1) @@ -71,4 +72,4 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.SendtoHand(bc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3105404.lua b/official/c3105404.lua index 59d8a9e544..49d36c1eb6 100644 --- a/official/c3105404.lua +++ b/official/c3105404.lua @@ -1,4 +1,5 @@ --ブリリアント・スパーク +--Brilliant Spark local s,id=GetID() function s.initial_effect(c) --activate @@ -22,11 +23,11 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.filter(c,e,tp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and ((c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsSetCard(0x1047) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) + and c:IsSetCard(SET_GEM_KNIGHT) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return eg:IsContains(chkc) and s.filter(chkc,e,tp) end @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 @@ -59,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31059809.lua b/official/c31059809.lua index 63254af3a5..b0e0342fb9 100644 --- a/official/c31059809.lua +++ b/official/c31059809.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -44,7 +44,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) @@ -78,4 +78,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31061682.lua b/official/c31061682.lua index 0a4325f7da..ab6f097e66 100644 --- a/official/c31061682.lua +++ b/official/c31061682.lua @@ -1,4 +1,5 @@ --Kozmo-ドロッセル +--Kozmo Farmgirl local s,id=GetID() function s.initial_effect(c) --spsummon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -19,18 +20,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetCondition(s.thcon) - e2:SetCost(s.thcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xd2} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -49,12 +46,8 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.thfilter(c) - return c:IsSetCard(0xd2) and c:IsAbleToHand() + return c:IsSetCard(SET_KOZMO) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -67,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c31066283.lua b/official/c31066283.lua index 96ee744041..d5299ac8fa 100644 --- a/official/c31066283.lua +++ b/official/c31066283.lua @@ -1,5 +1,6 @@ --スカルライダーの復活 +--Revival of Dokurorider local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,99721536) -end +end \ No newline at end of file diff --git a/official/c31076103.lua b/official/c31076103.lua index 75bc22b00a..247878a305 100644 --- a/official/c31076103.lua +++ b/official/c31076103.lua @@ -71,4 +71,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCode,4081094,78697395),tp,LOCATION_ONFIELD,0,nil):Merge(e:GetHandler()) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31077447.lua b/official/c31077447.lua index fad70415fa..b055b5f936 100644 --- a/official/c31077447.lua +++ b/official/c31077447.lua @@ -1,4 +1,5 @@ --びっくり箱 +--Punch-in-the-Box local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c31111109.lua b/official/c31111109.lua index 7781a8a76a..ae0204d2f0 100644 --- a/official/c31111109.lua +++ b/official/c31111109.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixRep(c,true,true,s.ffilter,2,2,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9),aux.FilterBoolFunctionEx(Card.IsSetCard,0x1f),aux.FilterBoolFunctionEx(Card.IsSetCard,0x8)) + Fusion.AddProcMixRep(c,true,true,s.ffilter,2,2,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_NEOS),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_NEO_SPACIAN),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO)) --copy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -23,20 +23,20 @@ function s.initial_effect(c) e3:SetValue(aux.fuslimit) c:RegisterEffect(e3) end -s.listed_series={0x9,0x1f,0x8} -s.material_setcode={0x8,0x9,0x1f} +s.listed_series={SET_NEOS,SET_NEO_SPACIAN,SET_HERO} +s.material_setcode={SET_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.ffilter(c,fc,sumtype,tp) - return c:IsSetCard(0x8,fc,sumtype,tp) or c:IsSetCard(0x9,fc,sumtype,tp) or c:IsSetCard(0x1f,fc,sumtype,tp) + return c:IsSetCard(SET_HERO,fc,sumtype,tp) or c:IsSetCard(SET_NEOS,fc,sumtype,tp) or c:IsSetCard(SET_NEO_SPACIAN,fc,sumtype,tp) end function s.filter(c) - return (c:IsSetCard(0x9) or c:IsSetCard(0x1f) or c:IsSetCard(0x8)) and c:IsMonster() + return (c:IsSetCard(SET_NEOS) or c:IsSetCard(SET_NEO_SPACIAN) or c:IsSetCard(SET_HERO)) and c:IsMonster() and not c:IsForbidden() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.copyop(e,tp,eg,ep,ev,re,r,rp) @@ -45,13 +45,13 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) then if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=1 then return end local code=tc:GetOriginalCode() - local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + local cid=c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -60,7 +60,7 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetLabel(cid) e2:SetOperation(s.rstop) c:RegisterEffect(e2) @@ -72,4 +72,4 @@ function s.rstop(e,tp,eg,ep,ev,re,r,rp) c:ResetEffect(cid,RESET_COPY) Duel.HintSelection(Group.FromCards(c)) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) -end +end \ No newline at end of file diff --git a/official/c3111207.lua b/official/c3111207.lua index 33d4da132b..0c40412e4c 100644 --- a/official/c3111207.lua +++ b/official/c3111207.lua @@ -1,7 +1,6 @@ --彩宝龍 --Lappis Dragon --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -76,7 +75,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c31118030.lua b/official/c31118030.lua index 8fcad5e91f..671c9ba072 100644 --- a/official/c31118030.lua +++ b/official/c31118030.lua @@ -1,4 +1,5 @@ --占術姫アローシルフ +--Prediction Princess Arrowsylph local s,id=GetID() function s.initial_effect(c) --to hand @@ -14,14 +15,14 @@ function s.thfilter(c) return c:IsRitualSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c31123642.lua b/official/c31123642.lua index b0f95249d4..1f21d5324c 100644 --- a/official/c31123642.lua +++ b/official/c31123642.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -20,7 +20,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE+LOCATION_MZONE) + e2:SetRange(LOCATION_GRAVE|LOCATION_MZONE) e2:SetTarget(s.reptg) e2:SetValue(s.repval) e2:SetOperation(s.repop) @@ -75,7 +75,7 @@ function s.repfilter(c,tp) return c:IsFaceup() and c:IsSetCard(SET_UTOPIC) and c:IsType(TYPE_XYZ) and c:GetOriginalAttribute()&ATTRIBUTE_LIGHT~=0 and not c:IsCode(id) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -87,5 +87,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c3113667.lua b/official/c3113667.lua index 48ff528238..1db81e86f1 100644 --- a/official/c3113667.lua +++ b/official/c3113667.lua @@ -46,14 +46,14 @@ function s.indct(e,re,r,rp) if tc and tc:IsControler(1-tp) then a,tc=tc,a end local dam=Duel.GetBattleDamage(tp) if not tc or dam<=0 then return 1 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(dam) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Reset local e2=Effect.CreateEffect(c) @@ -66,7 +66,7 @@ function s.indct(e,re,r,rp) e:Reset() end end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) return 1 end @@ -102,4 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3113836.lua b/official/c3113836.lua index 1c09fb2f19..22eb711f74 100644 --- a/official/c3113836.lua +++ b/official/c3113836.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT)) + Fusion.AddProcMix(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT)) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -16,7 +16,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetRange(LOCATION_MZONE) c:RegisterEffect(e2) @@ -24,8 +24,8 @@ function s.initial_effect(c) e3:SetCode(EFFECT_EXTRA_SET_COUNT) c:RegisterEffect(e3) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION -end +end \ No newline at end of file diff --git a/official/c31173519.lua b/official/c31173519.lua index 6cae814b08..7e5ab06583 100644 --- a/official/c31173519.lua +++ b/official/c31173519.lua @@ -1,6 +1,5 @@ --ライライダー --Rai Rider - local s,id=GetID() function s.initial_effect(c) --A monster that battled this card cannot attack @@ -24,6 +23,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c31175914.lua b/official/c31175914.lua index 480676b8b6..cb9475945b 100644 --- a/official/c31175914.lua +++ b/official/c31175914.lua @@ -1,4 +1,5 @@ --アタック・ゲイナー +--Attack Gainer local s,id=GetID() function s.initial_effect(c) --atk change @@ -28,8 +29,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c3117804.lua b/official/c3117804.lua index 30647b65d7..52bd4f63f6 100644 --- a/official/c3117804.lua +++ b/official/c3117804.lua @@ -1,4 +1,5 @@ --超重武者ビッグベン-K +--Superheavy Samurai Big Benkei local s,id=GetID() function s.initial_effect(c) --pos @@ -23,7 +24,7 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -31,5 +32,5 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.atktg(e,c) - return c:IsSetCard(0x9a) -end + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) +end \ No newline at end of file diff --git a/official/c31178212.lua b/official/c31178212.lua index 241821cf28..aafca630ce 100644 --- a/official/c31178212.lua +++ b/official/c31178212.lua @@ -1,4 +1,5 @@ --マジェスペクター・ユニコーン +--Majespecter Unicorn - Kirin local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -54,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c31181711.lua b/official/c31181711.lua index 227d001bcb..494ec0d34b 100644 --- a/official/c31181711.lua +++ b/official/c31181711.lua @@ -1,4 +1,5 @@ --超重武者装留グレート・ウォール +--Superheavy Samurai Soulshield Wall local s,id=GetID() function s.initial_effect(c) --equip @@ -7,14 +8,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -36,14 +37,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(1200) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -52,11 +53,11 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetCondition(s.btcon) e3:SetCost(s.btcost) e3:SetOperation(s.btop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.eqlimit(e,c) - return c:IsSetCard(0x9a) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.btcon(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst()==e:GetHandler():GetEquipTarget() @@ -73,7 +74,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c31189536.lua b/official/c31189536.lua index 21e2baf465..f99ac235a2 100644 --- a/official/c31189536.lua +++ b/official/c31189536.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.filter(c,e,tp) - return c:IsSetCard(0x8e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VAMPIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -52,4 +52,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31213049.lua b/official/c31213049.lua index 1ffe064f49..ae1666b22c 100644 --- a/official/c31213049.lua +++ b/official/c31213049.lua @@ -1,9 +1,9 @@ --- XXクルージョン --- Cross X-Clusion --- Scripted by Hatter +--XXクルージョン +--XX-clusion +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate activation + --Negate activation local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_HANDES) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:GetActivateLocation()==LOCATION_HAND - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -25,6 +25,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) end end \ No newline at end of file diff --git a/official/c3121655.lua b/official/c3121655.lua index bfecf0852f..679bf015ac 100644 --- a/official/c3121655.lua +++ b/official/c3121655.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsRelateToBattle() end end) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c31222701.lua b/official/c31222701.lua index b90cdf330c..7819fd9839 100644 --- a/official/c31222701.lua +++ b/official/c31222701.lua @@ -1,4 +1,5 @@ --揺れる眼差し +--Wavering Eyes local s,id=GetID() function s.initial_effect(c) --activate @@ -53,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(shg2,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,shg2) end -end +end \ No newline at end of file diff --git a/official/c31226177.lua b/official/c31226177.lua index d36c9039bf..709f2309bb 100644 --- a/official/c31226177.lua +++ b/official/c31226177.lua @@ -12,8 +12,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xfd)) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_WORLD_CHALICE)) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xfd} +s.listed_series={SET_WORLD_CHALICE} function s.matfilter(c,lc,sumtype,tp) return c:IsType(TYPE_NORMAL,lc,sumtype,tp) and not c:IsType(TYPE_TOKEN,lc,sumtype,tp) end @@ -57,7 +57,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xfd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_CHALICE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -71,4 +71,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c31230289.lua b/official/c31230289.lua index a8000b6c85..2f440eba53 100644 --- a/official/c31230289.lua +++ b/official/c31230289.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x2186} +s.listed_series={SET_DOODLEBOOK} function s.cfilter(c) return c:IsFacedown() or not c:IsRace(RACE_DINOSAUR) end @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x2186) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_DOODLEBOOK) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,6 +62,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) end end \ No newline at end of file diff --git a/official/c31241087.lua b/official/c31241087.lua index 91922a719a..11f5d2d388 100644 --- a/official/c31241087.lua +++ b/official/c31241087.lua @@ -103,4 +103,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) c:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c31245780.lua b/official/c31245780.lua index 04685f0d45..fb777f135f 100644 --- a/official/c31245780.lua +++ b/official/c31245780.lua @@ -1,6 +1,5 @@ --バトルマニア --Battle Mania - local s,id=GetID() function s.initial_effect(c) --Change all of opponent's monsters to attack position, must attack if able to @@ -15,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY + return Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_STANDBY) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -35,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot change their battle positions local e2=Effect.CreateEffect(c) @@ -43,9 +42,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end end diff --git a/official/c31247589.lua b/official/c31247589.lua index 25064086f9..c8c8c3b7be 100644 --- a/official/c31247589.lua +++ b/official/c31247589.lua @@ -1,4 +1,5 @@ --剣闘獣ディカエリィ +--Gladiator Beast Dimacari local s,id=GetID() function s.initial_effect(c) --double attack @@ -13,15 +14,15 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} function s.dacon(e) return e:GetHandler():GetFlagEffect(id)>0 @@ -29,18 +30,12 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,107,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,107,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -48,6 +43,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,107,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c31259606.lua b/official/c31259606.lua index a9dd2bf3c8..03c4e436f8 100644 --- a/official/c31259606.lua +++ b/official/c31259606.lua @@ -1,9 +1,9 @@ --- 絶海のマーレ --- Mare of the Shore --- Scripted by Hatter +--絶海のマーレ +--Supreme Sea Mare +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Send 1 Aqua monster to the GY + --Send 1 Aqua monster to the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Add 1 Aqua monster to the hand + --Add 1 Aqua monster to the hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -47,11 +47,6 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.aqfilter(chkc) and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(aux.AND(s.aqfilter,Card.IsAbleToHand),tp,LOCATION_GRAVE,0,1,nil) end diff --git a/official/c31281980.lua b/official/c31281980.lua index e64c890972..b9479b579b 100644 --- a/official/c31281980.lua +++ b/official/c31281980.lua @@ -29,4 +29,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Recover(tp,tc:GetLevel()*100,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31292357.lua b/official/c31292357.lua index cfbb67da8e..884faa8776 100644 --- a/official/c31292357.lua +++ b/official/c31292357.lua @@ -71,9 +71,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(3300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c3129635.lua b/official/c3129635.lua index 4f92aa7f09..64c9b67b89 100644 --- a/official/c3129635.lua +++ b/official/c3129635.lua @@ -1,4 +1,5 @@ --カース・オブ・スタチュー +--Tiki Curse local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,14 +14,14 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1000,4,RACE_ROCK,ATTRIBUTE_DARK) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -32,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLED) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -56,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31303283.lua b/official/c31303283.lua index 13039b0341..dab226f416 100644 --- a/official/c31303283.lua +++ b/official/c31303283.lua @@ -1,4 +1,5 @@ --陽炎獣 ヒッポグリフォ +--Hazy Flame Hyppogrif local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -33,7 +34,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c31305911.lua b/official/c31305911.lua index a191bec2dc..89330a3537 100644 --- a/official/c31305911.lua +++ b/official/c31305911.lua @@ -1,4 +1,5 @@ --マシュマロン +--Marshmallon local s,id=GetID() function s.initial_effect(c) --damage @@ -32,4 +33,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31313405.lua b/official/c31313405.lua index 032aa5d519..9a0f7e812d 100644 --- a/official/c31313405.lua +++ b/official/c31313405.lua @@ -96,4 +96,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if dam<0 then dam=0 end Duel.Damage(1-tp,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31314549.lua b/official/c31314549.lua index 2c1fcd3886..c1cc89093e 100644 --- a/official/c31314549.lua +++ b/official/c31314549.lua @@ -20,4 +20,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c31320433.lua b/official/c31320433.lua index 85cec53617..013230b014 100644 --- a/official/c31320433.lua +++ b/official/c31320433.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.dacon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.datg) e2:SetOperation(s.daop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,13 +33,13 @@ function s.matfilter(c) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsType(TYPE_TOKEN) and c:IsLevel(3) and c:IsAttribute(ATTRIBUTE_WATER) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end end function s.matop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g>0 then Duel.Overlay(c,g) end @@ -67,7 +67,7 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end --Other monsters cannot attack @@ -77,9 +77,9 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(e:GetLabel()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c31328739.lua b/official/c31328739.lua index bf1e09c70d..4dc6147c8c 100644 --- a/official/c31328739.lua +++ b/official/c31328739.lua @@ -1,4 +1,5 @@ --サイキック・インパルス +--Psi-Impulse local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c31339260.lua b/official/c31339260.lua index 79f492cae6..2e560dd44a 100644 --- a/official/c31339260.lua +++ b/official/c31339260.lua @@ -1,6 +1,5 @@ --アンデット・ウォーリアー --Zombie Warrior - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving diff --git a/official/c3134857.lua b/official/c3134857.lua index 93aaa1e1ac..8c50fa3379 100644 --- a/official/c3134857.lua +++ b/official/c3134857.lua @@ -33,12 +33,12 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e4:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e4:SetCondition(s.tdcon2) c:RegisterEffect(e4) end function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x11b,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_ORCUST,lc,sumtype,tp) end function s.indcon(e) return e:GetHandler():IsLinked() @@ -47,7 +47,7 @@ function s.tdcon1(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) end function s.tdcon2(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) + return aux.StatChangeDamageStepCondition() and Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) end function s.tdfilter(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAbleToDeck() @@ -63,18 +63,18 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tg=Duel.GetTargetCards(e) if #tg==0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local og=Duel.GetOperatedGroup() if #og==0 then return end if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLinked),tp,0,LOCATION_MZONE,nil) if #g>0 then Duel.BreakEffect() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -93,4 +93,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e5) end end -end +end \ No newline at end of file diff --git a/official/c313513.lua b/official/c313513.lua index d2e058f848..55397dded1 100644 --- a/official/c313513.lua +++ b/official/c313513.lua @@ -22,10 +22,10 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x7} -s.listed_names={83104731} +s.listed_series={SET_ANCIENT_GEAR} +s.listed_names={CARD_ANCIENT_GEAR_GOLEM} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_ANCIENT_GEAR) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local tg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,nil) @@ -41,7 +41,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetReset(RESET_SELF_TURN+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_SELF_TURN|RESET_PHASE|PHASE_END,2) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -50,7 +50,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,1)) - e4:SetReset(RESET_SELF_TURN+RESET_PHASE+PHASE_END,2) + e4:SetReset(RESET_SELF_TURN|RESET_PHASE|PHASE_END,2) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) local descnum=tp==c:GetOwner() and 0 or 1 @@ -62,7 +62,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetOwnerPlayer(tp) e3:SetLabel(0) e3:SetOperation(s.reset) - e3:SetReset(RESET_SELF_TURN+RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_SELF_TURN|RESET_PHASE|PHASE_END,2) c:RegisterEffect(e3) table.insert(s[0],e3) s[0][e3]={e1,e2} @@ -91,18 +91,18 @@ function s.reset(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c,e,tp) - return c:IsCode(83104731) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsCode(CARD_ANCIENT_GEAR_GOLEM) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.dfilter(c) - return c:IsFacedown() or c:GetCode()~=83104731 + return c:IsFacedown() or c:GetCode()~=CARD_ANCIENT_GEAR_GOLEM end function s.spcheck(sg,e,tp,mg) return sg:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<2 and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<2 @@ -111,7 +111,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end if ft>2 then ft=2 end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=0 or g:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=0 then ft=1 end local sg=aux.SelectUnselectGroup(g,e,tp,ft,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) @@ -122,4 +122,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c31353051.lua b/official/c31353051.lua index 267b248d4d..2aae9868b3 100644 --- a/official/c31353051.lua +++ b/official/c31353051.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -50,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -60,12 +60,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c3136426.lua b/official/c3136426.lua index 3d38ed725e..f26453cbc2 100644 --- a/official/c3136426.lua +++ b/official/c3136426.lua @@ -1,4 +1,5 @@ --レベル制限B地区 +--Level Limit - Area B local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:GetLevel()>3 and c:IsFaceup() -end +end \ No newline at end of file diff --git a/official/c3137279.lua b/official/c3137279.lua index 1a9a2a66a6..e39bd66657 100644 --- a/official/c3137279.lua +++ b/official/c3137279.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_REMOVED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.setcond) diff --git a/official/c31374201.lua b/official/c31374201.lua index 32facdfa69..418a1897df 100644 --- a/official/c31374201.lua +++ b/official/c31374201.lua @@ -1,7 +1,6 @@ --海造賊-白髭の機関士 --Whitebeard, the Plunder Patroll Helm --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Plunder Patroll" monster from extra deck @@ -30,14 +29,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x13f} +s.listed_series={SET_PLUNDER_PATROLL} s.listed_names={id} - function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,e,tp,att) - return c:IsSetCard(0x13f) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.cfilter(c) @@ -45,7 +43,7 @@ function s.cfilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if chk==0 then return att>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -55,7 +53,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if att==0 then return end @@ -68,7 +66,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -78,10 +76,10 @@ function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x13f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -103,9 +101,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x13f) + return not c:IsSetCard(SET_PLUNDER_PATROLL) end \ No newline at end of file diff --git a/official/c31383545.lua b/official/c31383545.lua index 73d2afb435..18c5796fc0 100644 --- a/official/c31383545.lua +++ b/official/c31383545.lua @@ -1,4 +1,5 @@ --XX-セイバー ダークソウル +--XX-Saber Darksoul local s,id=GetID() function s.initial_effect(c) --to grave @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetOperation(s.regop) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) then @@ -22,12 +23,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x100d) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_X_SABER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -40,4 +41,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c31385077.lua b/official/c31385077.lua index b65b0ce824..a92d8ea646 100644 --- a/official/c31385077.lua +++ b/official/c31385077.lua @@ -1,12 +1,11 @@ --カオス・ゴッデス-混沌の女神- --Chaos Goddess - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Synchro summon procedure - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),2,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),2,99) --Special summon 1 level 5+ DARK monster from GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,7 +32,7 @@ function s.filter(c,e,tp) return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsControler(tp) and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -49,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c31386180.lua b/official/c31386180.lua index 1f96b6808a..ceb13c875a 100644 --- a/official/c31386180.lua +++ b/official/c31386180.lua @@ -1,4 +1,5 @@ --始祖の守護者ティラス +--Tiras, Keeper of Genesis local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.descon) @@ -58,11 +59,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:GetOverlayCount()>0 then c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31398842.lua b/official/c31398842.lua index 2a924d7961..5ef56c9242 100644 --- a/official/c31398842.lua +++ b/official/c31398842.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.detachtg) e2:SetOperation(s.detachop) c:RegisterEffect(e2) diff --git a/official/c31423101.lua b/official/c31423101.lua index d65f8cab5b..3ffbe66bd4 100644 --- a/official/c31423101.lua +++ b/official/c31423101.lua @@ -1,4 +1,5 @@ --神剣-フェニックスブレード +--Divine Sword - Phoenix Blade local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)) @@ -23,9 +24,9 @@ function s.thfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -38,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c31434645.lua b/official/c31434645.lua index 1231ec613b..f18c29e738 100644 --- a/official/c31434645.lua +++ b/official/c31434645.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.thcost) + e3:SetCost(Cost.PayLP(800)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -40,16 +40,12 @@ function s.initial_effect(c) e4:SetOperation(s.tgop) c:RegisterEffect(e4) end -s.listed_series={0x144,0x142} +s.listed_series={SET_GOLDEN_LAND,SET_ELDLICH} function s.atktg(e,c) return not c:IsRace(RACE_ZOMBIE) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c) - return (c:IsSetCard(0x144) and c:IsSpellTrap()) or (c:IsSetCard(0x142) and c:IsMonster()) + return (c:IsSetCard(SET_GOLDEN_LAND) and c:IsSpellTrap()) or (c:IsSetCard(SET_ELDLICH) and c:IsMonster()) end function s.thfilter(c) return s.filter(c) and c:IsAbleToHand() @@ -84,4 +80,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31437713.lua b/official/c31437713.lua index e57f85ae76..603ec69c6a 100644 --- a/official/c31437713.lua +++ b/official/c31437713.lua @@ -1,6 +1,5 @@ --No.82 ハートランドラコ --Number 82: Heartlandraco - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -47,7 +46,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -62,7 +61,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c31440046.lua b/official/c31440046.lua index ece7d03588..2e283591a5 100644 --- a/official/c31440046.lua +++ b/official/c31440046.lua @@ -1,5 +1,5 @@ --プランキッズ・ロック ---Planckster Rock +--Prank-Kids Rocksies local s,id=GetID() function s.initial_effect(c) --Banish, draw, and Special Summon @@ -15,29 +15,29 @@ function s.initial_effect(c) e1:SetOperation(s.rmop) c:RegisterEffect(e1) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} s.listed_names={id} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x120) and r&REASON_FUSION+REASON_LINK~=0 + return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(SET_PRANK_KIDS) and r&REASON_FUSION+REASON_LINK~=0 end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x120) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_PRANK_KIDS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local rc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) if #rc>0 and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 and Duel.Draw(tp,1,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,nil,e,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) diff --git a/official/c31440542.lua b/official/c31440542.lua index e462ee0f50..653a0128c0 100644 --- a/official/c31440542.lua +++ b/official/c31440542.lua @@ -1,4 +1,5 @@ --幻惑のラフレシア +--Rafflesia Seduction local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c31443476.lua b/official/c31443476.lua index b93f3247bc..b88c6b573e 100644 --- a/official/c31443476.lua +++ b/official/c31443476.lua @@ -1,6 +1,5 @@ --クイック・リボルブ --Quick Launch - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Rokket" monster from deck @@ -13,10 +12,9 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x102} - +s.listed_series={SET_ROKKET} function s.filter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,9 +32,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Destroy it during end phase local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -45,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetLabelObject(tc) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetCountLimit(1) Duel.RegisterEffect(e2,tp) end diff --git a/official/c31444249.lua b/official/c31444249.lua index b4cd722ccb..b71363bf58 100644 --- a/official/c31444249.lua +++ b/official/c31444249.lua @@ -26,26 +26,22 @@ function s.initial_effect(c) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e3) --Fusion Summon - local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0xbb),extrafil=s.fextra,extratg=s.extratg} + local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_INFERNOID),extrafil=s.fextra,extratg=s.extratg} local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_SZONE) - e4:SetCost(s.spcost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(Fusion.SummonEffTG(params)) e4:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e4) end -s.listed_series={0xbb} +s.listed_series={SET_INFERNOID} function s.lvtg(e,c) - return c:IsSetCard(0xbb) and c:GetOriginalLevel()>=2 + return c:IsSetCard(SET_INFERNOID) and c:GetOriginalLevel()>=2 end function s.rdtg(e,c) - return c:IsSetCard(0xbb) and c:GetOriginalLevel()>=2 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return c:IsSetCard(SET_INFERNOID) and c:GetOriginalLevel()>=2 end function s.fcheck(tp,sg,fc) return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=6 diff --git a/official/c31458630.lua b/official/c31458630.lua index ebd0f3c771..45f4597929 100644 --- a/official/c31458630.lua +++ b/official/c31458630.lua @@ -44,4 +44,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31461282.lua b/official/c31461282.lua index efd0ac1b00..13d1f05a49 100644 --- a/official/c31461282.lua +++ b/official/c31461282.lua @@ -37,16 +37,16 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x12e} +s.listed_series={SET_FORTUNE_FAIRY} function s.atkval(e,c) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x12e),e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_FORTUNE_FAIRY),e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) return g:GetClassCount(Card.GetCode)*500 end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(0x12e) + return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(SET_FORTUNE_FAIRY) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -58,4 +58,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31464658.lua b/official/c31464658.lua index 9f70921d89..bcb4863b79 100644 --- a/official/c31464658.lua +++ b/official/c31464658.lua @@ -10,16 +10,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.thfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevel(10) and c:IsAbleToHand() end @@ -34,4 +29,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c3146695.lua b/official/c3146695.lua index 7369e8df5a..e0640a049e 100644 --- a/official/c3146695.lua +++ b/official/c3146695.lua @@ -1,4 +1,5 @@ --サイコ・リアクター +--Psychic Reactor local s,id=GetID() function s.initial_effect(c) --special summon @@ -16,7 +17,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() for tc in aux.Next(g) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end g:KeepAlive() local e1=Effect.CreateEffect(e:GetHandler()) @@ -26,7 +27,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLED) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(g) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) @@ -56,4 +57,4 @@ end function s.reset(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():DeleteGroup() e:Reset() -end +end \ No newline at end of file diff --git a/official/c31467372.lua b/official/c31467372.lua index 68d935acce..68f1255b7c 100644 --- a/official/c31467372.lua +++ b/official/c31467372.lua @@ -1,4 +1,5 @@ --不死式冥界砲 +--Everliving Underworld Cannon local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31467949.lua b/official/c31467949.lua index ff692538b6..10f54542eb 100644 --- a/official/c31467949.lua +++ b/official/c31467949.lua @@ -1,5 +1,5 @@ --空牙団の飛哨 リコン ---Recon, Skyscout of the Skyfang Brigade +--Recon, Scout Fur Hire -- local s,id=GetID() function s.initial_effect(c) @@ -27,10 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) @@ -63,5 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c31472884.lua b/official/c31472884.lua index 4289e096a0..496d7b1aba 100644 --- a/official/c31472884.lua +++ b/official/c31472884.lua @@ -1,4 +1,5 @@ --共闘 +--Unified Front local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -24,12 +25,9 @@ end function s.check(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if Duel.GetAttackTarget()==nil then - Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) return c:IsMonster() and c:IsDiscardable() and c:GetAttack()>=0 and c:GetDefense()>=0 and Duel.IsExistingTarget(s.tgfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) @@ -51,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g:GetFirst()) e:SetLabelObject(g:GetFirst()) @@ -60,7 +58,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -73,13 +71,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(def) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c31476755.lua b/official/c31476755.lua index ff930f86ca..8cff75d607 100644 --- a/official/c31476755.lua +++ b/official/c31476755.lua @@ -1,4 +1,5 @@ --砂塵の結界 +--Dust Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,12 +26,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -46,5 +47,5 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.efilter(e,re) - return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_SPELL) -end + return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c3149764.lua b/official/c3149764.lua index 918a71b05d..dddd2a6df9 100644 --- a/official/c3149764.lua +++ b/official/c3149764.lua @@ -1,4 +1,5 @@ --ツタン仮面 +--Tutan Mask local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31516413.lua b/official/c31516413.lua index bf53923a2e..b3d5e0a3b8 100644 --- a/official/c31516413.lua +++ b/official/c31516413.lua @@ -34,13 +34,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.hspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,e:GetHandler(),0x69) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,e:GetHandler(),SET_HIERATIC) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,e:GetHandler(),0x69) + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,e:GetHandler(),SET_HIERATIC) if g then g:KeepAlive() e:SetLabelObject(g) @@ -55,7 +55,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.descfilter(c) - return c:IsSetCard(0x69) + return c:IsSetCard(SET_HIERATIC) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,0,LOCATION_MZONE,nil,e) @@ -81,12 +81,12 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then @@ -94,11 +94,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c31525442.lua b/official/c31525442.lua index 8fcd3cfe56..c8e0ce2e9e 100644 --- a/official/c31525442.lua +++ b/official/c31525442.lua @@ -1,7 +1,6 @@ --予見者ゾルガ --Zolga the Prophet --Scripted by The Razgriz - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -22,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.con) e2:SetTarget(s.tg) e2:SetOperation(s.op) diff --git a/official/c31531170.lua b/official/c31531170.lua index 8f3257e82f..3346dc9d03 100644 --- a/official/c31531170.lua +++ b/official/c31531170.lua @@ -30,10 +30,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.pendcon) e1:SetOperation(s.pendop) e1:SetValue(SUMMON_TYPE_PENDULUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e1) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,tc2:GetFieldID()) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,tc1:GetFieldID()) + tc1:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,tc2:GetFieldID()) + tc2:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,tc1:GetFieldID()) end function s.pendcon(e,c,inchain,re,rp) if c==nil then return true end @@ -65,9 +65,9 @@ function s.pendop(e,tp,eg,ep,ev,re,r,rp,c,sg,inchain) if #sg>0 then Duel.Hint(HINT_CARD,0,id) if not inchain then - Duel.RegisterFlagEffect(tp,10000000,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + Duel.RegisterFlagEffect(tp,10000000,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) end Duel.HintSelection(Group.FromCards(c)) Duel.HintSelection(Group.FromCards(rpz)) end -end +end \ No newline at end of file diff --git a/official/c31539614.lua b/official/c31539614.lua index 25fedd1ced..1a240d3069 100644 --- a/official/c31539614.lua +++ b/official/c31539614.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.changeatkdeftg) e1:SetOperation(s.changeatkdefop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c31548215.lua b/official/c31548215.lua index 312b50be07..42dfdf09a3 100644 --- a/official/c31548215.lua +++ b/official/c31548215.lua @@ -1,5 +1,5 @@ --墓穴ホール ---Grave Hole +--Gravedigger's Trap Hole --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -16,7 +16,7 @@ end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local activateLocation = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + and ep~=tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and (activateLocation==LOCATION_GRAVE or activateLocation==LOCATION_HAND or activateLocation==LOCATION_REMOVED) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -30,5 +30,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.Damage(1-tp,2000,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c31552317.lua b/official/c31552317.lua index 4acf8fa103..448b0ba136 100644 --- a/official/c31552317.lua +++ b/official/c31552317.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c31553716.lua b/official/c31553716.lua index 28966e69b7..d1ae724896 100644 --- a/official/c31553716.lua +++ b/official/c31553716.lua @@ -1,4 +1,5 @@ --スピア・ドラゴン +--Spear Dragon local s,id=GetID() function s.initial_effect(c) --to defense @@ -22,4 +23,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c31554054.lua b/official/c31554054.lua index 607ff0c6cb..e8e1bf7229 100644 --- a/official/c31554054.lua +++ b/official/c31554054.lua @@ -1,4 +1,5 @@ --エクシーズ・リベンジ・シャッフル +--Xyz Revenge Shuffle local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,7 +34,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local at=Duel.GetAttackTarget() - if at:IsRelateToEffect(e) and at:IsFaceup() and Duel.SendtoDeck(at,nil,2,REASON_EFFECT)>0 then + if at:IsRelateToEffect(e) and at:IsFaceup() and Duel.SendtoDeck(at,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then Duel.BreakEffect() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then @@ -41,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,c) end end -end +end \ No newline at end of file diff --git a/official/c31557782.lua b/official/c31557782.lua index 99fb14110d..f4370e4a27 100644 --- a/official/c31557782.lua +++ b/official/c31557782.lua @@ -1,4 +1,5 @@ --古代の歯車 +--Ancient Gear local s,id=GetID() function s.initial_effect(c) --special summon @@ -19,4 +20,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c31560081.lua b/official/c31560081.lua index 21f6280935..43e9bfe081 100644 --- a/official/c31560081.lua +++ b/official/c31560081.lua @@ -1,4 +1,5 @@ --聖なる魔術師 +--Magician of Faith local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c31562086.lua b/official/c31562086.lua index 7a2a32346c..fde66662e5 100644 --- a/official/c31562086.lua +++ b/official/c31562086.lua @@ -1,16 +1,16 @@ --- 神碑の穂先 --- Point of the Mysterune --- Scripted by Hatter +--神碑の穂先 +--Runick Tip +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateMysteruneQPEffect(c,id,CATEGORY_SEARCH+CATEGORY_TOHAND,s.thtg,s.thop,1) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.thfilter(c) - return c:IsSetCard(0x180) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_RUNICK) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c31563350.lua b/official/c31563350.lua index cd663f868b..747fd7a63e 100644 --- a/official/c31563350.lua +++ b/official/c31563350.lua @@ -1,4 +1,5 @@ --ズババジェネラル +--Zubaba General local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -20,10 +21,6 @@ end function s.eqval(ec,c,tp) return ec:IsControler(tp) and ec:IsRace(RACE_WARRIOR) end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,tp) return c:IsRace(RACE_WARRIOR) and c:CheckUniqueOnField(tp) and not c:IsForbidden() end @@ -40,7 +37,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -57,4 +54,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return e:GetOwner()==c -end +end \ No newline at end of file diff --git a/official/c31571902.lua b/official/c31571902.lua index 03dca776a4..9721c5520d 100644 --- a/official/c31571902.lua +++ b/official/c31571902.lua @@ -1,4 +1,5 @@ --邪神機-獄炎 +--Malevolent Mech - Goku En local s,id=GetID() function s.initial_effect(c) --summon @@ -42,4 +43,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoGrave(c,REASON_EFFECT)~=0 then Duel.Damage(tp,2400,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31600513.lua b/official/c31600513.lua index 04bf48dcaf..dc19f83eb8 100644 --- a/official/c31600513.lua +++ b/official/c31600513.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c31603289.lua b/official/c31603289.lua index 7118c2f952..c82ee3202a 100644 --- a/official/c31603289.lua +++ b/official/c31603289.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfToExtraCost) + e2:SetCost(Cost.SelfToExtra) e2:SetTarget(s.gysptg) e2:SetOperation(s.gyspop) c:RegisterEffect(e2) diff --git a/official/c3160805.lua b/official/c3160805.lua index fa5e2b5593..ce575e6401 100644 --- a/official/c3160805.lua +++ b/official/c3160805.lua @@ -1,4 +1,5 @@ --明と宵の逆転 +--Exchange of Night and Day local s,id=GetID() function s.initial_effect(c) --Activate @@ -51,7 +52,7 @@ function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end e:SetLabel(op) end @@ -81,7 +82,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_HAND,0,1,nil,tp) @@ -98,4 +99,4 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(op) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) -end +end \ No newline at end of file diff --git a/official/c31615285.lua b/official/c31615285.lua index 1ea3828f1a..af6c0242ca 100644 --- a/official/c31615285.lua +++ b/official/c31615285.lua @@ -1,4 +1,5 @@ --サボウ・クローザー +--Cactus Bouncer local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -19,4 +20,4 @@ function s.initial_effect(c) end function s.dscon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_PLANT),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c31629407.lua b/official/c31629407.lua index 157d06591e..5018eb403a 100644 --- a/official/c31629407.lua +++ b/official/c31629407.lua @@ -35,7 +35,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) --[[ local c=e:GetHandler() local rc=re:GetHandler() - if Duel.GetCurrentPhase()&PHASE_DAMAGE+PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or c:GetFlagEffect(1)<=0 then return false end + if Duel.GetCurrentPhase()&PHASE_DAMAGE|PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or c:GetFlagEffect(1)<=0 then return false end local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) if loc&LOCATION_SZONE==0 or rc:IsControler(1-p) then if rc:IsLocation(LOCATION_SZONE) and rc:IsControler(p) then diff --git a/official/c31632536.lua b/official/c31632536.lua index 4510a97186..a0a695e3ab 100644 --- a/official/c31632536.lua +++ b/official/c31632536.lua @@ -1,4 +1,5 @@ --ラヴァル・ツインスレイヤー +--Laval Dual Slasher local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e3:SetCondition(s.pcon) c:RegisterEffect(e3) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.caop1(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() @@ -33,10 +34,10 @@ end function s.caop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if e:GetLabelObject():GetLabel()==1 and c:IsRelateToBattle() and c:CanChainAttack() - and Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39)>=2 then + and Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_LAVAL)>=2 then Duel.ChainAttack() end end function s.pcon(e) - return Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,0x39)>=3 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,SET_LAVAL)>=3 +end \ No newline at end of file diff --git a/official/c31643613.lua b/official/c31643613.lua index 08c1c57717..062b0a5aad 100644 --- a/official/c31643613.lua +++ b/official/c31643613.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x10f3,0xf3} +s.listed_series={SET_PREDAPLANT,SET_PREDAP} function s.spfilter(c,e,tp) - return c:IsSetCard(0x10f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PREDAPLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thfilter(c) - return c:IsSetCard(0xf3) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PREDAP) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,12 +34,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,0),nil) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) diff --git a/official/c3167439.lua b/official/c3167439.lua index 62718f49fb..61b25fbefe 100644 --- a/official/c3167439.lua +++ b/official/c3167439.lua @@ -1,9 +1,9 @@ --- 暗黒界の懲罰 --- Dark World Punishment --- Scripted by Hatter +--暗黒界の懲罰 +--Dark World Punishment +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate Normal or Special Summon + --Negate Normal or Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_HANDES) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON) c:RegisterEffect(e2) - -- Replace destruction + --Replace destruction local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} function s.tgfilter(c) return c:IsRace(RACE_FIEND) and c:IsDiscardable(REASON_EFFECT) end @@ -45,11 +45,11 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.BreakEffect() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end end function s.repfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x6) and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) + return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_DARK_WORLD) and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c3167573.lua b/official/c3167573.lua index 75d0985aef..e21b987116 100644 --- a/official/c3167573.lua +++ b/official/c3167573.lua @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then local des_eff=e:GetLabelObject() local ct=Duel.IsTurnPlayer(tp) and 2 or 1 - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,ct) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,0,ct) des_eff:SetLabel(Duel.GetTurnCount()+ct) end end diff --git a/official/c31677606.lua b/official/c31677606.lua index c2fa6fe5b2..c8694c2863 100644 --- a/official/c31677606.lua +++ b/official/c31677606.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31692182.lua b/official/c31692182.lua index 85bd31e80c..1ca6c11d0b 100644 --- a/official/c31692182.lua +++ b/official/c31692182.lua @@ -1,4 +1,5 @@ --コアキメイル・フルバリア +--Koa'ki Meiru Hydro Barrier local s,id=GetID() function s.initial_effect(c) --destroy @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.cfilter(c) return c:IsCode(36623431) and c:IsAbleToDeckAsCost() @@ -20,10 +21,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(e,c) - return c:IsType(TYPE_EFFECT) and not c:IsSetCard(0x1d) + return c:IsType(TYPE_EFFECT) and not c:IsSetCard(SET_KOAKI_MEIRU) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -31,6 +32,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.filter) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c31699677.lua b/official/c31699677.lua index d8839911c0..ccceb0d156 100644 --- a/official/c31699677.lua +++ b/official/c31699677.lua @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END+TIMING_DAMAGE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END|TIMING_DAMAGE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -41,28 +41,24 @@ end s.listed_names={CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL} function s.checkop(e,tp,eg,ep,ev,re,r,rp) if (r&REASON_EFFECT~=0 and rp~=ep) or r&REASON_BATTLE~=0 then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)>0 and (Duel.IsBattlePhase() or Duel.IsMainPhase()) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -84,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31709826.lua b/official/c31709826.lua index 68aa8b6acf..55b9efbb89 100644 --- a/official/c31709826.lua +++ b/official/c31709826.lua @@ -1,4 +1,5 @@ --リバイバルスライム +--Revival Jam local s,id=GetID() function s.initial_effect(c) --reborn preparation @@ -8,13 +9,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetOperation(s.spop) c:RegisterEffect(e1) --reborn local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1) e2:SetCondition(s.spcon2) @@ -24,12 +25,8 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.spop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id)>0 @@ -38,4 +35,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() c:ResetFlagEffect(id) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c3171055.lua b/official/c3171055.lua index 654a49153b..7666fd4740 100644 --- a/official/c3171055.lua +++ b/official/c3171055.lua @@ -1,4 +1,5 @@ --連鎖解呪 +--Chain Dispel local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsCode,ep,LOCATION_DECK,0,nil,re:GetHandler():GetCode()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31712840.lua b/official/c31712840.lua index eaf3f29b20..95bd815c38 100644 --- a/official/c31712840.lua +++ b/official/c31712840.lua @@ -1,7 +1,6 @@ --ゼアル・アライアンス ---ZEXAL Alliance +--Zexal Alliance --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -19,8 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end --Lists "Utopia" and "Number" archetype -s.listed_series={0x107f,0x48} - +s.listed_series={SET_UTOPIA,SET_NUMBER} --Pay LP until you have 10 left function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(tp)>10 end @@ -38,7 +36,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Utopia" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x107f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_UTOPIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -64,20 +62,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sg:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(s.indval) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sg:RegisterEffect(e2) --Double its ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK) e3:SetValue(sg:GetTextAttack()*2) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) sg:RegisterEffect(e3) end --Choose a card to place on top of deck @@ -91,5 +89,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.indval(e,c) - return not c:IsSetCard(0x48) -end + return not c:IsSetCard(SET_NUMBER) +end \ No newline at end of file diff --git a/official/c31733941.lua b/official/c31733941.lua index d1d11caff9..013df57f5d 100644 --- a/official/c31733941.lua +++ b/official/c31733941.lua @@ -36,7 +36,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.cfilter1(c) @@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c31755044.lua b/official/c31755044.lua index e9fdb7dba5..124274a393 100644 --- a/official/c31755044.lua +++ b/official/c31755044.lua @@ -1,4 +1,5 @@ --十二獣ヴァイパー +--Zoodiac Whiptail local s,id=GetID() function s.initial_effect(c) --material @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) c:RegisterEffect(e1) @@ -56,4 +57,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() and bc:IsControler(1-tp) then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31759689.lua b/official/c31759689.lua index 0bb8b2cc6f..27ee0c1884 100644 --- a/official/c31759689.lua +++ b/official/c31759689.lua @@ -64,7 +64,7 @@ function s.val(e,c) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.posfilter(c) return c:IsFacedown() and c:IsCanChangePosition() diff --git a/official/c31764353.lua b/official/c31764353.lua index fc6b693642..0856448f07 100644 --- a/official/c31764353.lua +++ b/official/c31764353.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c31764700.lua b/official/c31764700.lua index 3eca062d23..0dab2f2a0f 100644 --- a/official/c31764700.lua +++ b/official/c31764700.lua @@ -61,4 +61,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31766317.lua b/official/c31766317.lua index ebcc87e554..bf60cb79c9 100644 --- a/official/c31766317.lua +++ b/official/c31766317.lua @@ -1,4 +1,5 @@ --ヘル・エンプレス・デーモン +--Archfiend Empress local s,id=GetID() function s.initial_effect(c) --destroy replace @@ -28,10 +29,10 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local dc=eg:GetFirst() if chk==0 then return #eg==1 and dc~=e:GetHandler() and dc:IsFaceup() and dc:IsLocation(LOCATION_MZONE) and dc:IsRace(RACE_FIEND) and dc:IsAttribute(ATTRIBUTE_DARK) and not dc:IsReason(REASON_REPLACE) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) return true else return false end @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c31768112.lua b/official/c31768112.lua index 56f772f524..98fd7e6d94 100644 --- a/official/c31768112.lua +++ b/official/c31768112.lua @@ -1,4 +1,5 @@ --オイルメン +--Oilman local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),true,false) @@ -28,4 +29,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31772684.lua b/official/c31772684.lua index b8dcff5f59..05b743931a 100644 --- a/official/c31772684.lua +++ b/official/c31772684.lua @@ -1,6 +1,5 @@ --ヴェンデット・レヴナント --Vendread Revenants - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -24,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.mtop) c:RegisterEffect(e2) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp~=tp and c:IsPreviousControler(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -44,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -54,7 +53,7 @@ function s.mtcon(e,tp,eg,ep,ev,re,r,rp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x106) + local g=eg:Filter(Card.IsSetCard,nil,SET_VENDREAD) local rc=g:GetFirst() if not rc then return end local e1=Effect.CreateEffect(rc) @@ -68,20 +67,20 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end function s.rmfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove() + return c:IsSpecialSummoned() and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.rmfilter(chkc) and chkc:IsControler(1-tp) end diff --git a/official/c31785398.lua b/official/c31785398.lua index 0fbed98426..0966591e20 100644 --- a/official/c31785398.lua +++ b/official/c31785398.lua @@ -8,13 +8,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) + return c:IsFaceup() and c:IsCanTurnSet() and c:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -28,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c31786629.lua b/official/c31786629.lua index 1f3f206cac..043860b959 100644 --- a/official/c31786629.lua +++ b/official/c31786629.lua @@ -8,17 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_THUNDRA) end s.listed_names={id} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(id) and c:IsAbleToHand() end @@ -33,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c31786838.lua b/official/c31786838.lua index bfa49f15ed..67a3efbdf6 100644 --- a/official/c31786838.lua +++ b/official/c31786838.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c31801517.lua b/official/c31801517.lua index 0f31b13150..41c751c158 100644 --- a/official/c31801517.lua +++ b/official/c31801517.lua @@ -43,7 +43,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -54,7 +54,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end end @@ -68,12 +68,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_REMOVED+LOCATION_GRAVE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - if Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) + e1:SetRange(LOCATION_REMOVED|LOCATION_GRAVE) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + if Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp) then + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3) else - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) end e1:SetCountLimit(1) e1:SetCondition(s.spcon2) @@ -82,7 +82,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) c:SetTurnCounter(0) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -96,12 +96,11 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() end function s.rdcon(e) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_GALAXYEYES_P_DRAGON) -end - +end \ No newline at end of file diff --git a/official/c31812496.lua b/official/c31812496.lua index 5e5afdbfbc..3da8246f99 100644 --- a/official/c31812496.lua +++ b/official/c31812496.lua @@ -12,4 +12,4 @@ function s.initial_effect(c) end function s.dcon(e) return Duel.GetAttackTarget()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c31817415.lua b/official/c31817415.lua index c76b7d2a66..0eeceb9270 100644 --- a/official/c31817415.lua +++ b/official/c31817415.lua @@ -65,7 +65,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) e1:SetReset(RESET_EVENT|RESETS_STANDARD) diff --git a/official/c31826057.lua b/official/c31826057.lua index 12a5f04617..6c54838a4f 100644 --- a/official/c31826057.lua +++ b/official/c31826057.lua @@ -17,14 +17,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target(0)) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) end function s.target(oppo) return function (e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c31828916.lua b/official/c31828916.lua index 53d08ada34..b91666e8c1 100644 --- a/official/c31828916.lua +++ b/official/c31828916.lua @@ -1,4 +1,5 @@ --機甲部隊の最前線 +--Machina Armored Unit local s,id=GetID() function s.initial_effect(c) --Activate @@ -65,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c31829185.lua b/official/c31829185.lua index e63a5dcf46..8d6635e118 100644 --- a/official/c31829185.lua +++ b/official/c31829185.lua @@ -38,11 +38,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) if #g>0 then g:KeepAlive() @@ -61,7 +61,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and rp~=tp and (r&REASON_DESTROY)~=0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) @@ -88,14 +88,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c31833038.lua b/official/c31833038.lua index ba0889b2f0..98149da182 100644 --- a/official/c31833038.lua +++ b/official/c31833038.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP|TIMING_END_PHASE) e2:SetCountLimit(1) - e2:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -91,4 +91,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) nil,2 ) end -end +end \ No newline at end of file diff --git a/official/c31834488.lua b/official/c31834488.lua index 07c894a71f..e785b9844f 100644 --- a/official/c31834488.lua +++ b/official/c31834488.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -17,7 +17,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsCanTurnSet() diff --git a/official/c31849106.lua b/official/c31849106.lua index 65e76e93f8..d10862d497 100644 --- a/official/c31849106.lua +++ b/official/c31849106.lua @@ -21,10 +21,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.rmtarget) e1:SetTargetRange(0xff,0xff) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.rmtarget(e,c) - return not c:IsLocation(0x80) and not c:IsSpellTrap() and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) -end + return not c:IsLocation(LOCATION_OVERLAY) and not c:IsSpellTrap() and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) +end \ No newline at end of file diff --git a/official/c31855260.lua b/official/c31855260.lua index 0e4a337143..eb3438a506 100644 --- a/official/c31855260.lua +++ b/official/c31855260.lua @@ -1,24 +1,22 @@ --ミュートリアスの産声 --Myutant Cry --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) --Fusion summon 1 "Myutant" fusion monster by shuffling fusion materials from field/GY/face-up banished into deck - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x159),Fusion.OnFieldMat(Card.IsAbleToDeck),s.fextra,Fusion.ShuffleMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_MYUTANT),Fusion.OnFieldMat(Card.IsAbleToDeck),s.fextra,Fusion.ShuffleMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(function() return Duel.IsMainPhase() end) e1:SetHintTiming(0,TIMING_MAIN_END) c:RegisterEffect(e1) end --Lists "Myutant" archetype -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.NecroValleyFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.NecroValleyFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_PUBLIC) -end +end \ No newline at end of file diff --git a/official/c31863912.lua b/official/c31863912.lua index 8d889d448c..c58915a497 100644 --- a/official/c31863912.lua +++ b/official/c31863912.lua @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31887806.lua b/official/c31887806.lua index bb6f4d1fbf..80514d9784 100644 --- a/official/c31887806.lua +++ b/official/c31887806.lua @@ -1,5 +1,5 @@ --宙の忍者-鳥帷 ---Sky Ninja Tobari +--Tobari the Sky Ninja --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) --Fusion Summon 1 "Ninja" Fusion Monster - local params={function(c) return c:IsSetCard(0x2b) end} + local params={function(c) return c:IsSetCard(SET_NINJA) end} local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -49,21 +49,16 @@ function s.initial_effect(c) e4:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e4) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.indcond(e) local c=e:GetHandler() return c:IsStatus(STATUS_SPSUMMON_TURN) or c:GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE|POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_NINJA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c31887905.lua b/official/c31887905.lua index e703bfffa2..f3c8b1a6d2 100644 --- a/official/c31887905.lua +++ b/official/c31887905.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c31890399.lua b/official/c31890399.lua index 869df3d93a..3785dd3fea 100644 --- a/official/c31890399.lua +++ b/official/c31890399.lua @@ -1,4 +1,5 @@ --デビルズ・ミラー +--Fiend's Mirror local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c31893528.lua b/official/c31893528.lua index af564004e1..30fa555bf5 100644 --- a/official/c31893528.lua +++ b/official/c31893528.lua @@ -1,4 +1,5 @@ --死のメッセージ「E」 +--Spirit Message "I" local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) diff --git a/official/c31897444.lua b/official/c31897444.lua index 13ba30dae3..3dfc4d915d 100644 --- a/official/c31897444.lua +++ b/official/c31897444.lua @@ -1,5 +1,5 @@ --冥宮の番人 ---Defender of the Netherworld Labyrinth +--Defender of the Labyrinth --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c31904181.lua b/official/c31904181.lua index b5b2ebb1bd..ecfd519a8e 100644 --- a/official/c31904181.lua +++ b/official/c31904181.lua @@ -1,4 +1,5 @@ --六武衆-ニサシ +--The Six Samurai - Nisashi local s,id=GetID() function s.initial_effect(c) --atk twice @@ -18,16 +19,16 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={id} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and not c:IsCode(id) end function s.dircon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,5 +46,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c31919988.lua b/official/c31919988.lua index ee1e8ef46d..9365a830b4 100644 --- a/official/c31919988.lua +++ b/official/c31919988.lua @@ -1,4 +1,5 @@ --漆黒のズムウォルト +--Dark Diviner local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -48,7 +49,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) @@ -61,4 +62,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c31924889.lua b/official/c31924889.lua index 51ff303225..7350445fac 100644 --- a/official/c31924889.lua +++ b/official/c31924889.lua @@ -39,7 +39,7 @@ function s.attackup(e,c) return c:GetCounter(COUNTER_SPELL)*1000 end function s.addcc(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c31930787.lua b/official/c31930787.lua index 94d0088d07..bc7c267c58 100644 --- a/official/c31930787.lua +++ b/official/c31930787.lua @@ -55,7 +55,7 @@ function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:IsType(TYPE_SYNCHRO) end function s.filter(c,tp) - return c:IsMonster() and (c:GetReason()&0x41)==0x41 and c:IsPreviousControler(tp) + return c:IsMonster() and (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -96,7 +96,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -109,10 +109,10 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.dircon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) + return Duel.IsPhase(PHASE_MAIN1) and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) end function s.dcfilter(c) - return (c:GetOriginalType()&TYPE_MONSTER)~=0 and c:IsAbleToGraveAsCost() + return c:IsMonsterCard() and c:IsAbleToGraveAsCost() end function s.dircost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(s.dcfilter,1,nil) end @@ -127,6 +127,6 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) -end +end \ No newline at end of file diff --git a/official/c31944175.lua b/official/c31944175.lua index ef54bfc3ff..d7a54f3434 100644 --- a/official/c31944175.lua +++ b/official/c31944175.lua @@ -30,5 +30,5 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,c,RACE_CYBERSE) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) -end + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) +end \ No newline at end of file diff --git a/official/c31975743.lua b/official/c31975743.lua index 8a5629037c..e8ecec4a6a 100644 --- a/official/c31975743.lua +++ b/official/c31975743.lua @@ -1,6 +1,5 @@ --マジシャンズ・エイプ --Ape Magician - local s,id=GetID() function s.initial_effect(c) --Cannot be special summoned @@ -55,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c31980955.lua b/official/c31980955.lua index 1bf795f7fa..abcb79bc1b 100644 --- a/official/c31980955.lua +++ b/official/c31980955.lua @@ -1,4 +1,5 @@ --スローライフ +--Quiet Life local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.sumlimit1(e,c,sump,sumtype,sumpos,targetp,se) @@ -33,4 +34,4 @@ function s.sumlimit1(e,c,sump,sumtype,sumpos,targetp,se) end function s.sumlimit2(e,c,sump,sumtype,sumpos,targetp,se) return Duel.GetActivityCount(sump,ACTIVITY_NORMALSUMMON)>0 -end +end \ No newline at end of file diff --git a/official/c31986288.lua b/official/c31986288.lua index 0e5f576bb8..a386191f25 100644 --- a/official/c31986288.lua +++ b/official/c31986288.lua @@ -20,16 +20,16 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x123,TYPES_TOKEN,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ROSE,TYPES_TOKEN,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x123,TYPES_TOKEN,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ROSE,TYPES_TOKEN,1200,1200,3,RACE_PLANT,ATTRIBUTE_DARK) then return end for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c31991800.lua b/official/c31991800.lua index 499bd56ddf..563eebb98b 100644 --- a/official/c31991800.lua +++ b/official/c31991800.lua @@ -1,4 +1,5 @@ --マジェスペクター・ラクーン +--Majespecter Raccoon - Bunbuku local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -33,9 +34,9 @@ function s.initial_effect(c) e5:SetValue(s.indval) c:RegisterEffect(e5) end -s.listed_series={0xd0} +s.listed_series={SET_MAJESPECTER} function s.thfilter(c) - return c:IsSetCard(0xd0) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MAJESPECTER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -51,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c32003338.lua b/official/c32003338.lua index 6ca22958c6..ee0145347c 100644 --- a/official/c32003338.lua +++ b/official/c32003338.lua @@ -1,4 +1,5 @@ --No.34 電算機獣テラ・バイト +--Number 34: Terror-Byte local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,16 +13,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=34 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttackPos() and c:IsLevelBelow(4) and c:IsControlerCanBeChanged() end @@ -37,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c32003339.lua b/official/c32003339.lua deleted file mode 100644 index 6ca22958c6..0000000000 --- a/official/c32003339.lua +++ /dev/null @@ -1,40 +0,0 @@ ---No.34 電算機獣テラ・バイト -local s,id=GetID() -function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,3,3) - c:EnableReviveLimit() - --control - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_CONTROL) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCountLimit(1) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) -end -s.xyz_number=34 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function s.filter(c) - return c:IsFaceup() and c:IsAttackPos() and c:IsLevelBelow(4) and c:IsControlerCanBeChanged() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.GetControl(tc,tp,PHASE_END,1) - end -end diff --git a/official/c32013448.lua b/official/c32013448.lua index 36b1b9f41b..3220ebef9e 100644 --- a/official/c32013448.lua +++ b/official/c32013448.lua @@ -1,4 +1,5 @@ --宵闇の騎士 +--Evening Twilight Knight local s,id=GetID() function s.initial_effect(c) --gain @@ -22,13 +23,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10cf} +s.listed_series={SET_BLACK_LUSTER_SOLDIER} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x10cf) + return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,SET_BLACK_LUSTER_SOLDIER) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x10cf) + local g=eg:Filter(Card.IsSetCard,nil,SET_BLACK_LUSTER_SOLDIER) local rc=g:GetFirst() if not rc then return end local e1=Effect.CreateEffect(rc) @@ -40,7 +41,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(rc) e2:SetDescription(aux.Stringid(id,1)) @@ -50,17 +51,17 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetTarget(s.rmtg2) e2:SetOperation(s.rmop2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) if not rc:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end @@ -85,7 +86,7 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp) local sg=g:RandomSelect(tp,1) local tc=sg:GetFirst() Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -93,7 +94,7 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) @@ -102,7 +103,7 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) e:Reset() return false else - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) @@ -126,4 +127,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c32015116.lua b/official/c32015116.lua index afd668e354..4bc8dbfaef 100644 --- a/official/c32015116.lua +++ b/official/c32015116.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.rdcon) e2:SetTarget(s.rdtg) e2:SetOperation(s.rdop) @@ -41,4 +41,4 @@ function s.rdop(e,tp,eg,ep,ev,re,r,rp) local d1=Duel.TossDice(tp,1) local g=Duel.GetMatchingGroup(s.rdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,d1) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32022366.lua b/official/c32022366.lua index b07f73db0a..35ab5891ed 100644 --- a/official/c32022366.lua +++ b/official/c32022366.lua @@ -1,4 +1,5 @@ --重力の斧-グラール +--Gravity Axe - Grarl local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -16,4 +17,4 @@ function s.initial_effect(c) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(0,LOCATION_MZONE) c:RegisterEffect(e4) -end +end \ No newline at end of file diff --git a/official/c32036866.lua b/official/c32036866.lua index de24fe8df2..dbe91c4512 100644 --- a/official/c32036866.lua +++ b/official/c32036866.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.cond2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target2) e2:SetOperation(s.activate2) c:RegisterEffect(e2) diff --git a/official/c3204467.lua b/official/c3204467.lua index 12fbdfd53d..68b7bc9454 100644 --- a/official/c3204467.lua +++ b/official/c3204467.lua @@ -1,4 +1,5 @@ --ワーム・ソリッド +--Worm Solid local s,id=GetID() function s.initial_effect(c) --defup @@ -16,9 +17,9 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.vfilter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) end function s.defval(e,c) return Duel.GetMatchingGroupCount(s.vfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100 @@ -33,12 +34,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.desfilter(chkc) end @@ -52,4 +53,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32061192.lua b/official/c32061192.lua index bd8b1f8b05..414f97f398 100644 --- a/official/c32061192.lua +++ b/official/c32061192.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_REMOVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.PayLPCost(300)) + e3:SetCost(Cost.PayLP(300)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c32061744.lua b/official/c32061744.lua index 04988d4d7d..44be895053 100644 --- a/official/c32061744.lua +++ b/official/c32061744.lua @@ -1,4 +1,5 @@ --エレキーパー +--Wattkeeper local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_WATT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -32,11 +33,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32062913.lua b/official/c32062913.lua index 4733b679ef..33e7c03618 100644 --- a/official/c32062913.lua +++ b/official/c32062913.lua @@ -25,4 +25,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32065885.lua b/official/c32065885.lua index 33f45661c2..57d594d19e 100644 --- a/official/c32065885.lua +++ b/official/c32065885.lua @@ -1,4 +1,5 @@ --痛恨の訴え +--Heartfelt Appeal local s,id=GetID() function s.initial_effect(c) --special summon @@ -39,17 +40,17 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,2) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,2) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c32086564.lua b/official/c32086564.lua index 3bfa25837f..19fa34d34c 100644 --- a/official/c32086564.lua +++ b/official/c32086564.lua @@ -1,4 +1,5 @@ --エクシーズ・トライバル +--Xyz Tribalrivals local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32104431.lua b/official/c32104431.lua index 67e6e3af3c..1d56aa5612 100644 --- a/official/c32104431.lua +++ b/official/c32104431.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(Fusion.SummonEffTG(params)) e2:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e2) @@ -33,7 +33,7 @@ function s.costfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsSetCard(SET_BUSTER_BLADER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c3211439.lua b/official/c3211439.lua index 2eb7d9b04c..fbaea06fc7 100644 --- a/official/c3211439.lua +++ b/official/c3211439.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g2>0 then Duel.SendtoGrave(g2,REASON_RULE,PLAYER_NONE,1-tp) end -end +end \ No newline at end of file diff --git a/official/c32120116.lua b/official/c32120116.lua index 8826435989..f7351ee9be 100644 --- a/official/c32120116.lua +++ b/official/c32120116.lua @@ -1,5 +1,5 @@ --閻魔の裁き ---Enma’s Judgment +--Enma's Judgment -- local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetTargetCard(eg) local g=eg:Filter(Card.IsSummonPlayer,nil,1-tp) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) end function s.filter2(c,e,tp) @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter2,nil,e,1-tp) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then local g1=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE,0,nil) - local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) if #g1>4 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local rg=g1:Select(tp,5,5,nil) @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c32134638.lua b/official/c32134638.lua index 6f663e6f3e..954e734554 100644 --- a/official/c32134638.lua +++ b/official/c32134638.lua @@ -1,4 +1,5 @@ --ダイナミスト・アンキロス +--Dinomist Ankylos local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -20,12 +21,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(LOCATION_REMOVED) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd8)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DINOMIST)) c:RegisterEffect(e2) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.tfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) + return c:IsFaceup() and c:IsSetCard(SET_DINOMIST) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) @@ -34,10 +35,10 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.SelectEffectYesNo(tp,e:GetHandler()) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) if Duel.NegateEffect(ev) then Duel.BreakEffect() Duel.Destroy(e:GetHandler(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c32138660.lua b/official/c32138660.lua index c656a5ca97..369baf2417 100644 --- a/official/c32138660.lua +++ b/official/c32138660.lua @@ -101,4 +101,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c32146097.lua b/official/c32146097.lua index 5d7e6c3717..a9385d94e6 100644 --- a/official/c32146097.lua +++ b/official/c32146097.lua @@ -1,4 +1,5 @@ --DDパンドラ +--D/D Pandora local s,id=GetID() function s.initial_effect(c) --draw @@ -27,4 +28,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32152870.lua b/official/c32152870.lua index 50965c5cab..313d2b9da0 100644 --- a/official/c32152870.lua +++ b/official/c32152870.lua @@ -1,5 +1,5 @@ --械貶する肆世壊 ---Decline Scareclaw +--Scareclaw Decline --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -21,21 +21,21 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST,56063182} -s.listed_series={0x17c} +s.listed_series={SET_SCARECLAW} function s.reichfilter(c) return c:IsCode(56063182) and c:IsFaceup() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(tp) and s.reichfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.reichfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsControler(tp) and s.reichfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.reichfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.reichfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.reichfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,g:GetFirst():GetLocation()) Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,0) end @@ -61,7 +61,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetMatchingGroupCount(Card.IsDefensePos,0,LOCATION_MZONE,LOCATION_MZONE,nil)>=3 end function s.thfilter(c) - return c:IsSetCard(0x17c) and c:IsAbleToHand() + return c:IsSetCard(SET_SCARECLAW) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end diff --git a/official/c32164201.lua b/official/c32164201.lua index 46b7790fb0..a831e549c9 100644 --- a/official/c32164201.lua +++ b/official/c32164201.lua @@ -1,7 +1,6 @@ --ZW-天馬双翼剣 --ZW - Pegasus Twin Saber --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -39,7 +38,6 @@ function s.initial_effect(c) end --Lists "Utopia" archetype s.listed_series={SET_UTOPIA} - --If opponent's LP is 2000 higher than yours function s.spcon(e,c) if c==nil then return true end diff --git a/official/c32175429.lua b/official/c32175429.lua index dd0d01aa22..cc3fbc8f42 100644 --- a/official/c32175429.lua +++ b/official/c32175429.lua @@ -21,32 +21,32 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(function(_,tp) return Duel.GetLP(tp)<=500 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.spfilter(c,e,tp) return c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and not tc:IsSetCard(0x6f) then + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and not tc:IsSetCard(SET_HEROIC) then local c=e:GetHandler() --Negate its effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -58,14 +58,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end Duel.SpecialSummonComplete() end function s.heroiccount(tp) - local mct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x6f),tp,LOCATION_ONFIELD,0,nil) - local oct=Duel.GetOverlayGroup(tp,1,0):FilterCount(Card.IsSetCard,nil,0x6f) + local mct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_HEROIC),tp,LOCATION_ONFIELD,0,nil) + local oct=Duel.GetOverlayGroup(tp,1,0):FilterCount(Card.IsSetCard,nil,SET_HEROIC) return mct+oct end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -85,7 +85,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(ct*500) tc:RegisterEffect(e1) end diff --git a/official/c32180819.lua b/official/c32180819.lua index 38e317c82c..cf23c5323d 100644 --- a/official/c32180819.lua +++ b/official/c32180819.lua @@ -1,4 +1,5 @@ --最古式念導 +--Psychokinesis local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32202803.lua b/official/c32202803.lua index 7778b7bc4d..17384bdc73 100644 --- a/official/c32202803.lua +++ b/official/c32202803.lua @@ -14,4 +14,4 @@ function s.initial_effect(c) end function s.indtg(e,c) return c~=e:GetHandler() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) -end +end \ No newline at end of file diff --git a/official/c32207100.lua b/official/c32207100.lua index 6238e5e558..ecc2523790 100644 --- a/official/c32207100.lua +++ b/official/c32207100.lua @@ -1,4 +1,5 @@ --大番狂わせ +--A Major Upset local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand() + return c:IsFaceup() and c:IsLevelAbove(7) and c:IsSpecialSummoned() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -30,4 +31,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32224143.lua b/official/c32224143.lua index 6ee9560e56..0f968077fe 100644 --- a/official/c32224143.lua +++ b/official/c32224143.lua @@ -1,4 +1,5 @@ --ゴーストリック・サキュバス +--Ghostrick Socuteboss local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,13 +27,9 @@ function s.initial_effect(c) e2:SetValue(aux.imval2) c:RegisterEffect(e2) end -s.listed_series={0x8d} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_GHOSTRICK} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.filter(c,atk) return c:IsFaceup() and c:IsAttackBelow(atk) @@ -87,4 +84,4 @@ function s.disop(e,tp) end function s.atkcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c32231618.lua b/official/c32231618.lua index f5f0e0236b..173710ac67 100644 --- a/official/c32231618.lua +++ b/official/c32231618.lua @@ -1,6 +1,5 @@ --占術姫コインノーマ --Prediction Princess Coinorma - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 3+ flip monster from hand or deck @@ -12,20 +11,19 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xcc} - +s.listed_series={SET_PREDICTION_PRINCESS} function s.spfilter(c,e,tp) return c:IsType(TYPE_FLIP) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) @@ -37,10 +35,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actlimit(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xcc) + return re:IsMonsterEffect() and not rc:IsSetCard(SET_PREDICTION_PRINCESS) end \ No newline at end of file diff --git a/official/c32233746.lua b/official/c32233746.lua index 7a54d0e34a..41af290b9d 100644 --- a/official/c32233746.lua +++ b/official/c32233746.lua @@ -23,8 +23,8 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x38) end - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x38) + if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,SET_LIGHTSWORN) end + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,SET_LIGHTSWORN) Duel.Release(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,4 +35,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32240937.lua b/official/c32240937.lua index 6f8ae7a31b..41cf9dd250 100644 --- a/official/c32240937.lua +++ b/official/c32240937.lua @@ -1,4 +1,5 @@ --絶対服従魔人 +--Ultimate Obedient Fiend local s,id=GetID() function s.initial_effect(c) --atk limit @@ -25,12 +26,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c32245230.lua b/official/c32245230.lua index 522bf6bd5c..03cf87fa68 100644 --- a/official/c32245230.lua +++ b/official/c32245230.lua @@ -36,7 +36,7 @@ s.listed_names={27062594} --The Door of Destiny s.listed_series={SET_UTOPIC} s.counter_place_list={0x207} function s.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.counter(e,tp,eg,ep,ev,re,r,rp) local ct=eg:FilterCount(s.cfilter,nil,tp) diff --git a/official/c32247099.lua b/official/c32247099.lua index 0b83ae0365..47ee05d36a 100644 --- a/official/c32247099.lua +++ b/official/c32247099.lua @@ -1,7 +1,6 @@ --絶対なる幻神獣 ---The Absolute Divine Beast +--Ultimate Divine-Beast --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Activate @@ -53,13 +52,13 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler():IsOnField() end function s.regop1(e,tp,eg,ep,ev,re,r,rp) - re:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + re:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.regop2(e,tp,eg,ep,ev,re,r,rp) local ct=re:GetHandler():GetFlagEffect(id) re:GetHandler():ResetFlagEffect(id) for i=1,ct-1 do - re:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + re:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -70,7 +69,7 @@ function s.cfilter(c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsRace(RACE_DIVINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -106,4 +105,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32268901.lua b/official/c32268901.lua index 718c54c47f..fd457a63db 100644 --- a/official/c32268901.lua +++ b/official/c32268901.lua @@ -1,4 +1,5 @@ --サラマンドラ +--Salamandra local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE)) @@ -8,4 +9,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(700) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c32271987.lua b/official/c32271987.lua index 87bf753885..cfaf9338c1 100644 --- a/official/c32271987.lua +++ b/official/c32271987.lua @@ -1,4 +1,5 @@ --フェデライザー +--Featherizer local s,id=GetID() function s.initial_effect(c) --tograve & draw @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32278723.lua b/official/c32278723.lua index f9159b229e..e8f22427b8 100644 --- a/official/c32278723.lua +++ b/official/c32278723.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c32296881.lua b/official/c32296881.lua index b35d062d5f..03337dee38 100644 --- a/official/c32296881.lua +++ b/official/c32296881.lua @@ -1,4 +1,5 @@ --豊穣のアルテミス +--Bountiful Artemis local s,id=GetID() function s.initial_effect(c) --draw @@ -14,4 +15,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32298781.lua b/official/c32298781.lua index 9ccff91f9e..e665883fd2 100644 --- a/official/c32298781.lua +++ b/official/c32298781.lua @@ -1,4 +1,5 @@ --トライアングルパワー +--Triangle Power local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,13 +26,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(tc:GetBaseAttack()+2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(tc:GetBaseDefense()+2000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end local de=Effect.CreateEffect(e:GetHandler()) @@ -40,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) de:SetCountLimit(1) de:SetCondition(s.descon) de:SetOperation(s.desop) - de:SetReset(RESET_PHASE+PHASE_END) + de:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(de,tp) end function s.dfilter(c) @@ -52,4 +53,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,0,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32302078.lua b/official/c32302078.lua index f7d6d3145f..efb91af9b9 100644 --- a/official/c32302078.lua +++ b/official/c32302078.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_CUSTOM+id) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c32314730.lua b/official/c32314730.lua index 0bd89c76be..9d5fb62a54 100644 --- a/official/c32314730.lua +++ b/official/c32314730.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -66,7 +66,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x1d) and c:IsAbleToHand() + return c:IsSetCard(SET_KOAKI_MEIRU) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c32335697.lua b/official/c32335697.lua index 6d188cdf54..57ffc22472 100644 --- a/official/c32335697.lua +++ b/official/c32335697.lua @@ -1,9 +1,9 @@ --- ホーンテッド・アンデット --- Haunted Zombie --- Scripted by Hatter +--ホーンテッド・アンデット +--Haunted Zombies +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Banish a Zombie from either GY + --Banish a Zombie from either GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - -- Set self from GY + --Set self from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_LEAVE_GRAVE) @@ -34,7 +34,7 @@ function s.rmfilter(c,tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp) end + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil,tp) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_EITHER,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) @@ -42,19 +42,19 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil,tp) if #g<1 or Duel.Remove(g,POS_FACEUP,REASON_COST)<1 then return end local c=e:GetHandler() local lv=g:GetFirst():GetLevel() for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Change level + --Change level local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -74,16 +74,16 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_REMOVED,0,1,1,nil) if #g==0 then return end Duel.HintSelection(g,true) - if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_DECK+LOCATION_EXTRA) + if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c3233859.lua b/official/c3233859.lua index 41082302e0..d194765af1 100644 --- a/official/c3233859.lua +++ b/official/c3233859.lua @@ -1,5 +1,5 @@ --サイコウィールダー ---Psychic Wheelder +--Psychic Wheeleder local s,id=GetID() function s.initial_effect(c) --Special summon itself from the hand @@ -53,4 +53,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32339440.lua b/official/c32339440.lua index f78f4030a5..12f6cad57a 100644 --- a/official/c32339440.lua +++ b/official/c32339440.lua @@ -1,4 +1,5 @@ --武神-ヤマト +--Bujin Yamato local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -15,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) - return c:IsSetCard(0x88) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -35,4 +36,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32349062.lua b/official/c32349062.lua index 36fe35374b..70277cc910 100644 --- a/official/c32349062.lua +++ b/official/c32349062.lua @@ -1,7 +1,6 @@ --DDドッグ --D/D Dog --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -59,21 +58,21 @@ function s.disop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end Duel.BreakEffect() @@ -122,7 +121,7 @@ function s.disop2(e,tp,eg,ep,ev,re,r,rp) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_DISABLE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e0) local e1=e0:Clone() e1:SetCode(EFFECT_DISABLE_EFFECT) diff --git a/official/c32354768.lua b/official/c32354768.lua index 3a99e3e49c..22367b7aa2 100644 --- a/official/c32354768.lua +++ b/official/c32354768.lua @@ -57,17 +57,17 @@ function s.initial_effect(c) e6:SetValue(s.valcheck) c:RegisterEffect(e6) end -s.listed_series={0xc4} +s.listed_series={SET_ZEFRA} function s.mtfilter(c) - return c:IsSetCard(0xc4) and c:IsMonster() + return c:IsSetCard(SET_ZEFRA) and c:IsMonster() end function s.valcheck(e,c) if c:GetMaterial():IsExists(s.mtfilter,1,nil) then - c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESET_TODECK|RESET_TOHAND|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) end end function s.filter(c) - return c:IsSetCard(0xc4) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ZEFRA) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -142,6 +142,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)>0 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c32355828.lua b/official/c32355828.lua index 915116c833..8cbe02e071 100644 --- a/official/c32355828.lua +++ b/official/c32355828.lua @@ -1,7 +1,8 @@ --スケルゴン +--Skelgon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,29491031,87564352) -end +end \ No newline at end of file diff --git a/official/c32360466.lua b/official/c32360466.lua index f38c3554f0..2f5fc25332 100644 --- a/official/c32360466.lua +++ b/official/c32360466.lua @@ -4,6 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10cf,0xbd} +s.listed_series={SET_BLACK_LUSTER_SOLDIER,SET_GAIA_THE_FIERCE_KNIGHT} function s.filter1(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() end function s.filter2(c) - return c:IsSetCard(0x10cf) or c:IsSetCard(0xbd) + return c:IsSetCard({SET_BLACK_LUSTER_SOLDIER,SET_GAIA_THE_FIERCE_KNIGHT}) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_DECK,0,nil) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32391566.lua b/official/c32391566.lua index b4c0c179f1..3911b5e186 100644 --- a/official/c32391566.lua +++ b/official/c32391566.lua @@ -1,4 +1,5 @@ --エクストラ・ヴェーラー +--Extra Veiler local s,id=GetID() function s.initial_effect(c) --spsummon @@ -30,7 +31,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_REFLECT_DAMAGE) e1:SetTargetRange(1,0) e1:SetValue(s.val) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c32391631.lua b/official/c32391631.lua index 546570992b..32934105ad 100644 --- a/official/c32391631.lua +++ b/official/c32391631.lua @@ -1,4 +1,5 @@ --サベージ・コロシアム +--Savage Colosseum local s,id=GetID() function s.initial_effect(c) --Activate @@ -58,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(s.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32393580.lua b/official/c32393580.lua index e776a69d63..7543ddb235 100644 --- a/official/c32393580.lua +++ b/official/c32393580.lua @@ -1,4 +1,5 @@ --サイバー・シャーク +--Cyber Shark local s,id=GetID() function s.initial_effect(c) --summon without tribute @@ -17,4 +18,4 @@ function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c32422602.lua b/official/c32422602.lua index c517dbbd1e..6acd0da1f4 100644 --- a/official/c32422602.lua +++ b/official/c32422602.lua @@ -37,9 +37,9 @@ function s.initial_effect(c) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.listed_names={40428851} -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return r&REASON_EFFECT>0 and re:GetHandler():IsSetCard(0x137) + return r&REASON_EFFECT>0 and re:GetHandler():IsSetCard(SET_ANCIENT_WARRIORS) and e:GetHandler():GetPreviousLocation()==LOCATION_DECK and e:GetHandler():GetPreviousControler()==tp end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -56,7 +56,7 @@ function s.negcon1(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x137) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -74,6 +74,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,40428851),tp,LOCATION_ONFIELD,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c32437102.lua b/official/c32437102.lua index 79ce1a2d44..39ff60313c 100644 --- a/official/c32437102.lua +++ b/official/c32437102.lua @@ -1,4 +1,5 @@ --竜魂の力 +--Dragonic Attack local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),s.eqlimit) @@ -20,4 +21,4 @@ function s.initial_effect(c) end function s.eqlimit(e,c) return e:GetHandler():GetEquipTarget()==c or c:IsRace(RACE_WARRIOR) -end +end \ No newline at end of file diff --git a/official/c32441317.lua b/official/c32441317.lua index 9aa1d4adc3..ccf11392aa 100644 --- a/official/c32441317.lua +++ b/official/c32441317.lua @@ -25,7 +25,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.mgfilter(c,e,tp,sync) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and (c:GetReason()&0x80008)==0x80008 and c:GetReasonCard()==sync + and (c:GetReason()&(REASON_SYNCHRO|REASON_MATERIAL))==(REASON_SYNCHRO|REASON_MATERIAL) and c:GetReasonCard()==sync and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local mg=tc:GetMaterial() local ct=#mg local sumtype=tc:GetSummonType() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 and sumtype==SUMMON_TYPE_SYNCHRO + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and sumtype==SUMMON_TYPE_SYNCHRO and ct>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE) and mg:FilterCount(aux.NecroValleyFilter(s.mgfilter),nil,e,tp,tc)==ct diff --git a/official/c3244563.lua b/official/c3244563.lua index e25dce5a19..bfd3e68b88 100644 --- a/official/c3244563.lua +++ b/official/c3244563.lua @@ -1,4 +1,5 @@ --シールドスピア +--Shield Spear local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,11 +26,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(400) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c32446630.lua b/official/c32446630.lua index 8cdda62d98..473171a75e 100644 --- a/official/c32446630.lua +++ b/official/c32446630.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,10 +32,6 @@ s.listed_names={56051086,32446631} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,56051086) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) end @@ -51,10 +47,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(Duel.GetLP(1-tp)/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) token:RegisterEffect(e2) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c324483.lua b/official/c324483.lua index ef79fc9b1c..5d06495186 100644 --- a/official/c324483.lua +++ b/official/c324483.lua @@ -61,7 +61,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) --Destroy it during the End Phase of this turn aux.DelayedOperation(c,PHASE_END,id,e,tp,function(cc) Duel.Destroy(cc,REASON_EFFECT) end) diff --git a/official/c32448765.lua b/official/c32448765.lua index 225539980f..a891434e89 100644 --- a/official/c32448765.lua +++ b/official/c32448765.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfb),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TRICKSTAR),2,2) c:EnableReviveLimit() --damage local e1=Effect.CreateEffect(c) @@ -39,9 +39,9 @@ function s.initial_effect(c) e5:SetOperation(s.atkop) c:RegisterEffect(e5) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.cfilter(c,g) - return c:IsSetCard(0xfb) and g:IsContains(c) + return c:IsSetCard(SET_TRICKSTAR) and g:IsContains(c) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local lg=e:GetHandler():GetLinkedGroup() @@ -52,10 +52,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,200,REASON_EFFECT) end function s.indtg(e,c) - return c:IsSetCard(0xfb) and e:GetHandler():GetLinkedGroup():IsContains(c) + return c:IsSetCard(SET_TRICKSTAR) and e:GetHandler():GetLinkedGroup():IsContains(c) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and (r&REASON_EFFECT)~=0 and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xfb) + return ep~=tp and (r&REASON_EFFECT)~=0 and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_TRICKSTAR) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -64,7 +64,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c32465539.lua b/official/c32465539.lua index 37985df1d8..1b976d03be 100644 --- a/official/c32465539.lua +++ b/official/c32465539.lua @@ -72,14 +72,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetValue(1) e1:SetCondition(s.actcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end diff --git a/official/c32472237.lua b/official/c32472237.lua index bdbd645625..8d629545f7 100644 --- a/official/c32472237.lua +++ b/official/c32472237.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} s.listed_names={id} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,7 +52,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -62,12 +62,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -81,5 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c32476434.lua b/official/c32476434.lua index 591fb2d32e..33418b6f3f 100644 --- a/official/c32476434.lua +++ b/official/c32476434.lua @@ -1,4 +1,5 @@ --ラインモンスター スピア・ホイール +--Shogi Lance local s,id=GetID() function s.initial_effect(c) --lv @@ -31,9 +32,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c32476603.lua b/official/c32476603.lua index 892bae6c7e..7a7cbc8700 100644 --- a/official/c32476603.lua +++ b/official/c32476603.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -54,7 +54,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -64,12 +64,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c3248469.lua b/official/c3248469.lua index 8700747d5c..87f63deb90 100644 --- a/official/c3248469.lua +++ b/official/c3248469.lua @@ -10,16 +10,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.excvtcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.excvttg) e1:SetOperation(s.excvtop) c:RegisterEffect(e1) end -function s.excvtcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.excvttg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=5-Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_STZONE,nil) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct end diff --git a/official/c32485271.lua b/official/c32485271.lua index af5f555172..dbd2502442 100644 --- a/official/c32485271.lua +++ b/official/c32485271.lua @@ -1,7 +1,8 @@ --バラに棲む悪霊 +--Rose Spectre of Dunn local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,41392891,29802344) -end +end \ No newline at end of file diff --git a/official/c32485518.lua b/official/c32485518.lua index 6135307f85..cf106bd93e 100644 --- a/official/c32485518.lua +++ b/official/c32485518.lua @@ -1,4 +1,5 @@ --イモータル・ルーラー +--Immortal Ruler local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -14,16 +15,12 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end s.listed_names={4064256} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsCode(4064256) and c:IsAbleToHand() end @@ -40,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c32491822.lua b/official/c32491822.lua index ff2d73392b..3214b3d02f 100644 --- a/official/c32491822.lua +++ b/official/c32491822.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.spfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsContinuousSpell() and c:IsAbleToGraveAsCost() end function s.exfilter(c) return s.spfilter(c) or (c:IsFacedown() and c:IsSpell() and c:IsAbleToGraveAsCost()) @@ -102,4 +102,4 @@ function s.atcon(e) end function s.atlimit(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c32519092.lua b/official/c32519092.lua index 7627760686..3c9c958f1b 100644 --- a/official/c32519092.lua +++ b/official/c32519092.lua @@ -1,4 +1,5 @@ --Skyforce Monk +--Monk of the Tenyi local s,id=GetID() function s.initial_effect(c) --Link summon method @@ -6,5 +7,5 @@ function s.initial_effect(c) Link.AddProcedure(c,s.matfilter,1,1) end function s.matfilter(c,lc,stype,tp) - return c:IsSetCard(0x12c,lc,stype,tp) and not c:IsType(TYPE_LINK,lc,stype,tp) + return c:IsSetCard(SET_TENYI,lc,stype,tp) and not c:IsType(TYPE_LINK,lc,stype,tp) end \ No newline at end of file diff --git a/official/c32530043.lua b/official/c32530043.lua index 60efdb6f7c..2a0e93e338 100644 --- a/official/c32530043.lua +++ b/official/c32530043.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c32539892.lua b/official/c32539892.lua index 97635d9551..78731e0c3c 100644 --- a/official/c32539892.lua +++ b/official/c32539892.lua @@ -1,4 +1,5 @@ --イビー +--Minar local s,id=GetID() function s.initial_effect(c) --damage @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&0x4040)==0x4040 and rp~=tp + return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT and rp~=tp end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -22,4 +23,4 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32542011.lua b/official/c32542011.lua index 3d15bdff9f..86a0c1d662 100644 --- a/official/c32542011.lua +++ b/official/c32542011.lua @@ -73,7 +73,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if break_chk then Duel.BreakEffect() end if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD+REASON_EFFECT) + Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD|REASON_EFFECT) end end end diff --git a/official/c32543380.lua b/official/c32543380.lua index 09c4f53b9d..15df80e057 100644 --- a/official/c32543380.lua +++ b/official/c32543380.lua @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32548609.lua b/official/c32548609.lua index ddc2b60908..88909a42a9 100644 --- a/official/c32548609.lua +++ b/official/c32548609.lua @@ -1,4 +1,5 @@ --エレキンモグラ +--Wattmole local s,id=GetID() function s.initial_effect(c) --extra attack @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32549749.lua b/official/c32549749.lua index e18f7ee1fc..c47262f039 100644 --- a/official/c32549749.lua +++ b/official/c32549749.lua @@ -24,7 +24,7 @@ function s.eqtfilter(c,ec,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local phase=Duel.GetCurrentPhase() - local b1=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and (phase~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + local b1=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and aux.StatChangeDamageStepCondition() local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end local b2=ft>0 and Duel.IsExistingTarget(s.eqcfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) and phase~=PHASE_DAMAGE diff --git a/official/c32557233.lua b/official/c32557233.lua index e0dd99fade..a9a7b59035 100644 --- a/official/c32557233.lua +++ b/official/c32557233.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e1:SetLabel(0) c:RegisterEffect(e1) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} function s.spfilter1(c,e,tp,check) - return c:IsSetCard(0x141) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_RIKKA) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and (check==0 or Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE,0,1,c,e,tp)) end function s.spfilter2(c,e,tp) @@ -57,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c32559361.lua b/official/c32559361.lua index 0a64464314..8ef832af2a 100644 --- a/official/c32559361.lua +++ b/official/c32559361.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.damcon) - e3:SetCost(aux.dxmcostgen(1,s.mxmc,s.slwc)) + e3:SetCost(Cost.Detach(1,s.mxmc,s.slwc)) e3:SetTarget(s.damtg2) e3:SetOperation(s.damop2) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -82,4 +82,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=e:GetLabel() Duel.Damage(p,ct*800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32566831.lua b/official/c32566831.lua index 6804495037..d4b747be3a 100644 --- a/official/c32566831.lua +++ b/official/c32566831.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.cfilter(c) - return c:IsSetCard(0x3b) and c:GetLevel()==7 and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_RED_EYES) and c:GetLevel()==7 and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -30,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.tgfilter(c) - return c:IsSetCard(0x3b) and c:GetLevel()==7 and c:IsAbleToGrave() + return c:IsSetCard(SET_RED_EYES) and c:GetLevel()==7 and c:IsAbleToGrave() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(p,1,1,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32588805.lua b/official/c32588805.lua index 3ab12bf99b..257471495e 100644 --- a/official/c32588805.lua +++ b/official/c32588805.lua @@ -1,4 +1,5 @@ --The despair URANUS +--The Despair Uranus local s,id=GetID() function s.initial_effect(c) --set @@ -29,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) end function s.setfilter1(c) @@ -62,4 +63,4 @@ function s.atkval(e,c) end function s.indtg(e,c) return c:GetSequence()<5 and c:IsFaceup() -end +end \ No newline at end of file diff --git a/official/c3259760.lua b/official/c3259760.lua index 0ad4f50d86..023f78a0cd 100644 --- a/official/c3259760.lua +++ b/official/c3259760.lua @@ -1,4 +1,4 @@ --- +--呪縛衆 --Spellbound --scripted by Naim local s,id=GetID() diff --git a/official/c32600024.lua b/official/c32600024.lua index 2bcc11878b..2d7977d891 100644 --- a/official/c32600024.lua +++ b/official/c32600024.lua @@ -1,7 +1,6 @@ --ドラゴンメイド・チェイム --Chamber Dragonmaid --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -24,7 +23,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.sptg) @@ -32,10 +31,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Part of "Dragonmaid" archetype -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} --Check for "Dragonmaid" spell/trap function s.filter(c) - return c:IsSetCard(0x133) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_DRAGONMAID) and c:IsSpellTrap() and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -53,24 +52,23 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end --Check for level 7 "Dragonmaid" monster function s.spfilter(c,e,tp) - return c:IsLevelAbove(7) and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsLevelAbove(7) and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end --Return this card to hand, and if you do, summon level 7 "Dragonmaid" function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end - +end \ No newline at end of file diff --git a/official/c32603633.lua b/official/c32603633.lua index 28de718da5..bd83a72243 100644 --- a/official/c32603633.lua +++ b/official/c32603633.lua @@ -12,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLP(tp)>100 end Duel.PayLPCost(tp,Duel.GetLP(tp)-100) end function s.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,4 +39,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode()) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c32615065.lua b/official/c32615065.lua index b92fde92c7..fe7677f8e3 100644 --- a/official/c32615065.lua +++ b/official/c32615065.lua @@ -45,8 +45,7 @@ function s.ffilter(c,fc,sumtype,tp) return c:IsRace(RACE_WARRIOR,fc,sumtype,tp) and c:GetLevel()>=5 end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.atkfilter(c) return c:IsFaceup() and c:GetAttack()>0 @@ -56,13 +55,12 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -74,7 +72,7 @@ end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -85,13 +83,13 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(a:GetLevel()*200) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) a:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(d:GetLevel()*200) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) d:RegisterEffect(e2) end end @@ -116,4 +114,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c32619583.lua b/official/c32619583.lua index a23034aa59..7f686f86ad 100644 --- a/official/c32619583.lua +++ b/official/c32619583.lua @@ -1,4 +1,5 @@ --暗黒界の軍神 シルバ +--Sillva, Warlord of Dark World local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -26,6 +27,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_HAND,2,2,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32623004.lua b/official/c32623004.lua index 9a72b4bdd7..3f8a64a02d 100644 --- a/official/c32623004.lua +++ b/official/c32623004.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2) end -s.listed_series={0x5a} +s.listed_series={SET_PENGUIN} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x5a) and re:IsActiveType(TYPE_MONSTER) + return re:GetHandler():IsSetCard(SET_PENGUIN) and re:IsMonsterEffect() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,5 +40,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.rmtg(e,c) - return c:IsReason(REASON_EFFECT) and c:GetReasonEffect() and c:GetReasonEffect():GetHandler():IsSetCard(0x5a) -end + return c:IsReason(REASON_EFFECT) and c:GetReasonEffect() and c:GetReasonEffect():GetHandler():IsSetCard(SET_PENGUIN) +end \ No newline at end of file diff --git a/official/c32646477.lua b/official/c32646477.lua index ab3d329060..1f98fbc44b 100644 --- a/official/c32646477.lua +++ b/official/c32646477.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.costfilter(c) return c:GetLevel()>0 @@ -41,4 +41,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32663969.lua b/official/c32663969.lua index df04cd8c10..b5a8d8aa24 100644 --- a/official/c32663969.lua +++ b/official/c32663969.lua @@ -1,4 +1,5 @@ --ドミノ +--Domino Effect local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32671443.lua b/official/c32671443.lua index f3881b804a..a18a7836f9 100644 --- a/official/c32671443.lua +++ b/official/c32671443.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c32679370.lua b/official/c32679370.lua index 420ab733ee..7c08471b64 100644 --- a/official/c32679370.lua +++ b/official/c32679370.lua @@ -1,4 +1,5 @@ --ヒーロー・キッズ +--Hero Kid local s,id=GetID() function s.initial_effect(c) --spsummon @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c32687071.lua b/official/c32687071.lua index 07bdfa665e..06bffc6887 100644 --- a/official/c32687071.lua +++ b/official/c32687071.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetRange(LOCATION_PZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.descon) e1:SetOperation(s.desop) @@ -34,9 +34,9 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -49,11 +49,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) end function s.limcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) -end + return not c:IsOriginalSetCard(SET_AMORPHAGE) +end \ No newline at end of file diff --git a/official/c32692693.lua b/official/c32692693.lua index f05631c7f0..455123780c 100644 --- a/official/c32692693.lua +++ b/official/c32692693.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} s.counter_place_list={0x209} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -47,7 +47,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) c:AddCounter(0x209,7) end function s.cfilter(c) - return c:IsSetCard(0x165) and c:IsSummonLocation(LOCATION_HAND+LOCATION_EXTRA) and c:IsFaceup() + return c:IsSetCard(SET_URSARCTIC) and c:IsSummonLocation(LOCATION_HAND|LOCATION_EXTRA) and c:IsFaceup() end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -68,7 +68,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.tdfilter(c) - return c:IsSetCard(0x165) and not c:IsCode(id) and c:IsAbleToDeck() + return c:IsSetCard(SET_URSARCTIC) and not c:IsCode(id) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.tdfilter(chkc) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end @@ -82,4 +82,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32696942.lua b/official/c32696942.lua index 1621f5ff43..ba50831ccb 100644 --- a/official/c32696942.lua +++ b/official/c32696942.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) and (c:GetPreviousLocation()&LOCATION_OVERLAY)~=0 + return c:IsReason(REASON_COST) and re:IsActivated() and re:IsMonsterEffect() and (c:GetPreviousLocation()&LOCATION_OVERLAY)~=0 end function s.filter(c,e,tp) return c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c32703716.lua b/official/c32703716.lua index 0412dee739..3914cc4960 100644 --- a/official/c32703716.lua +++ b/official/c32703716.lua @@ -1,4 +1,5 @@ --フィッシュアンドキックス +--Fish and Kicks local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FISH+RACE_SEASERPENT+RACE_AQUA),tp,LOCATION_REMOVED,0,3,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FISH|RACE_SEASERPENT|RACE_AQUA),tp,LOCATION_REMOVED,0,3,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c327051.lua b/official/c327051.lua index e8fe67dcbb..5ec29a0d66 100644 --- a/official/c327051.lua +++ b/official/c327051.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.spfilter(c,e,tp) - return c:IsSetCard(0x152) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGISTUS) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -43,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x152) and c:IsLocation(LOCATION_SZONE) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_MAGISTUS) and c:IsLocation(LOCATION_SZONE) and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c32710364.lua b/official/c32710364.lua index 677c8586e1..aab4995a18 100644 --- a/official/c32710364.lua +++ b/official/c32710364.lua @@ -1,4 +1,5 @@ --宝玉獣ルビー・カーバンクル +--Crystal Beast Ruby Carbuncle local s,id=GetID() function s.initial_effect(c) --send replace @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.repcon(e) local c=e:GetHandler() return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) @@ -31,13 +32,13 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.filter(c,e,sp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,sp,true,false) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,sp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) @@ -65,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,ct,ct,nil) Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c32723153.lua b/official/c32723153.lua index 778d8f1d85..95b0de5432 100644 --- a/official/c32723153.lua +++ b/official/c32723153.lua @@ -1,4 +1,5 @@ --マジカル・エクスプロージョン +--Magical Explosion local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c32731036.lua b/official/c32731036.lua index 334d44b59e..a72a3c3431 100644 --- a/official/c32731036.lua +++ b/official/c32731036.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -68,11 +68,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.thfilter(c) return c:IsSetCard(SET_BYSTIAL) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c32744558.lua b/official/c32744558.lua index 4bf9cfe9be..dfa15729bb 100644 --- a/official/c32744558.lua +++ b/official/c32744558.lua @@ -1,4 +1,5 @@ --レアル・ジェネクス・コーディネイター +--R-Genex Overseer local s,id=GetID() function s.initial_effect(c) --special summon @@ -16,9 +17,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.filter(c,e,tp) - return c:IsSetCard(0x2) and c:GetLevel()<=3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GENEX) and c:GetLevel()<=3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c32750510.lua b/official/c32750510.lua index 4468e19bf2..b85d39c244 100644 --- a/official/c32750510.lua +++ b/official/c32750510.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.descost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -67,10 +67,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:AddCounter(0x1015,1) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.desfilter(c) return c:GetCounter(0x1015)~=0 end @@ -82,4 +78,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32751480.lua b/official/c32751480.lua index 1a3d7f7665..04e2a6f38a 100644 --- a/official/c32751480.lua +++ b/official/c32751480.lua @@ -1,7 +1,8 @@ --砂の魔女 +--Mystical Sand local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,13039848,93221206) -end +end \ No newline at end of file diff --git a/official/c32752319.lua b/official/c32752319.lua index 6f74b14412..efac208bfb 100644 --- a/official/c32752319.lua +++ b/official/c32752319.lua @@ -1,4 +1,5 @@ --ユーフォロイド・ファイター +--UFOroid Fighter local s,id=GetID() function s.initial_effect(c) --fusion material @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -31,10 +32,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c32754886.lua b/official/c32754886.lua index d70f3d0125..58945504f0 100644 --- a/official/c32754886.lua +++ b/official/c32754886.lua @@ -1,6 +1,5 @@ --ブラック・イリュージョン --Black Illusion - local s,id=GetID() function s.initial_effect(c) --Grant protection to your DARK spellcaster monsters with 2000+ ATK @@ -31,19 +30,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Negate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) --Unaffected by opponent's card effects local e4=Effect.CreateEffect(c) @@ -52,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetValue(s.efilter) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) e4:SetOwnerPlayer(tp) tc:RegisterEffect(e4) end diff --git a/official/c32761286.lua b/official/c32761286.lua index 39b3af7a47..e81ddcc60d 100644 --- a/official/c32761286.lua +++ b/official/c32761286.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.destg) @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c32762201.lua b/official/c32762201.lua index bb87570e13..22eaee0710 100644 --- a/official/c32762201.lua +++ b/official/c32762201.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.hdsptg) e2:SetOperation(s.hdspop) c:RegisterEffect(e2) diff --git a/official/c32764863.lua b/official/c32764863.lua index d9fd8b0938..913721362b 100644 --- a/official/c32764863.lua +++ b/official/c32764863.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rutg) e2:SetOperation(s.ruop) c:RegisterEffect(e2) @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(ATTRIBUTE_WATER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.SpecialSummonComplete() end @@ -81,5 +81,4 @@ function s.ruop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end - +end \ No newline at end of file diff --git a/official/c32768230.lua b/official/c32768230.lua index 91fa054042..f21ed06337 100644 --- a/official/c32768230.lua +++ b/official/c32768230.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x93} +s.listed_series={SET_CYBER} function s.cybfilter(c) - return c:IsType(TYPE_FUSION) and c:IsMonster() and c:IsRace(RACE_MACHINE) and c:IsSetCard(0x93) + return c:IsType(TYPE_FUSION) and c:IsMonster() and c:IsRace(RACE_MACHINE) and c:IsSetCard(SET_CYBER) end function s.filter(c,e,tp,ft) return s.cybfilter(c) and (c:IsAbleToExtra() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false))) @@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and s.cybfilter(c) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -65,4 +65,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c32775808.lua b/official/c32775808.lua index b660e9a548..33a6d0b4ef 100644 --- a/official/c32775808.lua +++ b/official/c32775808.lua @@ -36,7 +36,7 @@ end s.listed_names={CARD_SUMMONED_SKULL} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) and rp==1-tp and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) return c:IsCode(CARD_SUMMONED_SKULL) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) @@ -44,15 +44,15 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c32785578.lua b/official/c32785578.lua index 627b5e4cc0..13c2e3f538 100644 --- a/official/c32785578.lua +++ b/official/c32785578.lua @@ -1,5 +1,5 @@ --フェアーウェルカム・ラビュリンス ---Fairwelcome Labrynth +--Farewelcome Labrynth --Scripted by Yuno local s,id=GetID() function s.initial_effect(c) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x17f} +s.listed_series={SET_LABRYNTH} function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_FIEND) end @@ -30,13 +30,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.setfilter(c) - return c:GetType()==TYPE_TRAP and not c:IsSetCard(0x17f) and c:IsSSetable() + return c:IsNormalTrap() and not c:IsSetCard(SET_LABRYNTH) and c:IsSSetable() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not Duel.NegateAttack() or not tc:IsRelateToEffect(e) then return end if Duel.Destroy(tc,REASON_EFFECT)==0 then return end - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local sg=g:Select(tp,1,1,nil) diff --git a/official/c32787239.lua b/official/c32787239.lua index 279f451b86..1c45c9da84 100644 --- a/official/c32787239.lua +++ b/official/c32787239.lua @@ -1,4 +1,5 @@ --EMラ・パンダ +--Performapal Trumpanda local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -33,7 +34,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) @@ -45,4 +46,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c3280747.lua b/official/c3280747.lua index 30650b0c1c..3740f284ce 100644 --- a/official/c3280747.lua +++ b/official/c3280747.lua @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else Duel.DiscardDeck(tp,dc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32807846.lua b/official/c32807846.lua index e4adb904c9..553abcb47d 100644 --- a/official/c32807846.lua +++ b/official/c32807846.lua @@ -1,4 +1,5 @@ --増援 +--Reinforcement of the Army local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c32809211.lua b/official/c32809211.lua index 165f07b94b..ea1c875835 100644 --- a/official/c32809211.lua +++ b/official/c32809211.lua @@ -1,4 +1,5 @@ --人造人間7号 +--Jinzo #7 local s,id=GetID() function s.initial_effect(c) --direct attack @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c32828466.lua b/official/c32828466.lua index 786124d801..bd3c7d4a46 100644 --- a/official/c32828466.lua +++ b/official/c32828466.lua @@ -39,10 +39,10 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.mfilter(c,fc,sumtype,tp) - return c:IsSetCard(0x3008,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) + return c:IsSetCard(SET_ELEMENTAL_HERO,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) end function s.matcheck(e,c) local g=c:GetMaterial() @@ -79,11 +79,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spfilter(c,e,sp) return c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) @@ -91,7 +91,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c32828635.lua b/official/c32828635.lua index 3db2d376ff..522f43479c 100644 --- a/official/c32828635.lua +++ b/official/c32828635.lua @@ -2,20 +2,21 @@ --Cycle of the World local s,id=GetID() function s.initial_effect(c) + --Ritual Summon "Ruin, Queen of Oblivion" or "Demise, King of Armageddon" Ritual.AddProcGreater({handler=c,filter=s.ritualfil,matfilter=s.forcedgroup}) - --Add 1 listed Ritual monster from the GY to the hand + --Add 1 "End of the World" from your Deck to your hand, then, you can add 1 "Ruin, Queen of Oblivion" or "Demise, King of Armageddon" from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_TOHAND) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(aux.exccon) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfToDeck) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_names={8198712} +s.listed_names={46427957,72426662,8198712} --"Ruin, Queen of Oblivion", "Demise, King of Armageddon", "End of the World" s.fit_monster={46427957,72426662} function s.ritualfil(c) return c:IsCode(46427957,72426662) and c:IsRitualMonster() @@ -23,34 +24,29 @@ end function s.forcedgroup(c,e,tp) return c:IsLocation(LOCATION_ONFIELD) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) -end -function s.filter(c) +function s.deckthfilter(c) return c:IsCode(8198712) and c:IsAbleToHand() end -function s.filter2(c) - return c:IsCode(46427957,72426662) and c:IsAbleToHand() -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.deckthfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) end +function s.gravethfilter(c) + return c:IsCode(46427957,72426662) and c:IsAbleToHand() +end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) + local g=Duel.SelectMatchingCard(tp,s.deckthfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,g) - local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_GRAVE,0,nil) + local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.gravethfilter),tp,LOCATION_GRAVE,0,nil) if #mg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=mg:Select(tp,1,1,nil) + Duel.HintSelection(sg) + Duel.BreakEffect() Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) end end -end \ No newline at end of file +end diff --git a/official/c32835363.lua b/official/c32835363.lua index 60081f03ef..085251a857 100644 --- a/official/c32835363.lua +++ b/official/c32835363.lua @@ -1,4 +1,5 @@ --クラッキング +--Cracking local s,id=GetID() function s.initial_effect(c) --Activate @@ -60,4 +61,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) else Duel.Damage(ep,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3283679.lua b/official/c3283679.lua index 9c06ae572f..03497a4031 100644 --- a/official/c3283679.lua +++ b/official/c3283679.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x604e,0x304e} +s.listed_series={SET_EVOLSAUR,SET_EVOLTILE} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x604e) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_EVOLSAUR) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,156,tp,false,false) + return c:IsSetCard(SET_EVOLTILE) and c:IsCanBeSpecialSummoned(e,156,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -52,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,156,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c32841045.lua b/official/c32841045.lua index 59863508ee..1082625b8e 100644 --- a/official/c32841045.lua +++ b/official/c32841045.lua @@ -95,4 +95,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c32854013.lua b/official/c32854013.lua index 877a6d66b0..0bc71e071e 100644 --- a/official/c32854013.lua +++ b/official/c32854013.lua @@ -1,4 +1,5 @@ --猛突進 +--Super Rush Recklessly local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,6 +31,6 @@ function s.activate(e) local tc2=g:GetFirst() if tc2==tc1 then tc2=g:GetNext() end if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and Duel.Destroy(tc1,REASON_EFFECT)~=0 and tc2:IsRelateToEffect(e) then - Duel.SendtoDeck(tc2,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc2,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3285551.lua b/official/c3285551.lua index bd793cc94d..fef82c4e24 100644 --- a/official/c3285551.lua +++ b/official/c3285551.lua @@ -1,9 +1,9 @@ --- アラメシアの儀 --- Rite of Aramesir --- Scripted by Hatter +--アラメシアの儀 +--Rite of Aramesir +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon 1 "Adventurer Token" + --Special Summon 1 "Adventurer Token" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -15,20 +15,20 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Count activated monster effects + --Count activated monster effects Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.actfilter) end s.listed_names={TOKEN_ADVENTURER,39568067} function s.actfilter(re) local rc=re:GetHandler() - return not (re:IsMonsterEffect() and rc:IsOnField() and not rc:IsSummonType(SUMMON_TYPE_SPECIAL)) + return not (re:IsMonsterEffect() and rc:IsOnField() and not rc:IsSpecialSummoned()) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,TOKEN_ADVENTURER),tp,LOCATION_ONFIELD,0,1,nil) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 end - -- Cannot activate effects of monsters, except Special Summoned monsters + --Cannot activate effects of monsters, except Special Summoned monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) diff --git a/official/c32872833.lua b/official/c32872833.lua index 77ca1cd406..e17d6b715c 100644 --- a/official/c32872833.lua +++ b/official/c32872833.lua @@ -1,4 +1,5 @@ --星間竜パーセク +--Parsec, the Interstellar Dragon local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -17,4 +18,4 @@ function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c32875265.lua b/official/c32875265.lua index fb46374345..c08b56b990 100644 --- a/official/c32875265.lua +++ b/official/c32875265.lua @@ -1,5 +1,5 @@ --傀儡葬儀-パペット・パレード ---Doll Funeral - Puppet Parade +--Puppet Parade --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -15,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1083,0x95} +s.listed_series={SET_GIMMICK_PUPPET,SET_RANK_UP_MAGIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end function s.filter(c,e,tp) - return c:IsSetCard(0x1083) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) @@ -28,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.setfilter(c) - return c:GetType()==TYPE_SPELL and c:IsSetCard(0x95) and c:IsSSetable() + return c:IsNormalSpell() and c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSSetable() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -37,12 +37,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil,e,tp) @@ -61,5 +61,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0x1083) -end + return not c:IsSetCard(SET_GIMMICK_PUPPET) +end \ No newline at end of file diff --git a/official/c3289027.lua b/official/c3289027.lua index e381ef5f9c..0e29b70f44 100644 --- a/official/c3289027.lua +++ b/official/c3289027.lua @@ -1,5 +1,5 @@ --暗黒界の隠者 パアル ---Perl, Hermit of Dark World +--Parl, Hermit of Dark World --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -16,8 +16,8 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -local LOCATION_HAND_GRAVE_REMOVED=LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED -s.listed_series={0x6} +local LOCATION_HAND_GRAVE_REMOVED=LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED +s.listed_series={SET_DARK_WORLD} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -29,7 +29,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD+REASON_EFFECT)==REASON_DISCARD+REASON_EFFECT end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x6) and not c:IsCode(id) and + return c:IsSetCard(SET_DARK_WORLD) and not c:IsCode(id) and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))) end diff --git a/official/c32907538.lua b/official/c32907538.lua index b6965dff9e..9d0153beca 100644 --- a/official/c32907538.lua +++ b/official/c32907538.lua @@ -1,4 +1,5 @@ --ウォールクリエイター +--Grapple Blocker local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -51,7 +52,7 @@ function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,500) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -59,4 +60,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c32918479.lua b/official/c32918479.lua index 6857dc7eb2..23a47c96c0 100644 --- a/official/c32918479.lua +++ b/official/c32918479.lua @@ -1,4 +1,5 @@ --光神機-閃空 +--Majestic Mech - Senku local s,id=GetID() function s.initial_effect(c) --handes @@ -49,7 +50,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+0xc6c0000) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY|RESET_MSCHANGE) c:RegisterEffect(e1) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -61,4 +62,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoGrave(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32919136.lua b/official/c32919136.lua index 50fc610a7b..873be3b45b 100644 --- a/official/c32919136.lua +++ b/official/c32919136.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCategory(CATEGORY_DAMAGE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.damcon) @@ -30,7 +30,7 @@ function s.initial_effect(c) e5:SetValue(s.ctval) c:RegisterEffect(e5) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.eqlimit(e,c) return e:GetHandlerPlayer()~=c:GetControler() or e:GetHandler():GetEquipTarget()==c end @@ -39,7 +39,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,tc,chk) Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,11 +53,11 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x45) + return c:IsFaceup() and c:IsSetCard(SET_ARCHFIEND) end function s.descon(e) return not Duel.IsExistingMatchingCard(s.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end function s.ctval(e,c) return e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c3292267.lua b/official/c3292267.lua index 09f2dd7191..c08bea98dd 100644 --- a/official/c3292267.lua +++ b/official/c3292267.lua @@ -1,5 +1,5 @@ --聖刻天龍-エネアード ---Hieratic Heavenly Dragon Overlord of Heliopolis +--Hieratic Sky Dragon Overlord of Heliopolis local s,id=GetID() function s.initial_effect(c) --Xyz summon @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,10 +29,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(s.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -44,4 +40,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32933942.lua b/official/c32933942.lua index 47ed993fe6..73b06b2b3c 100644 --- a/official/c32933942.lua +++ b/official/c32933942.lua @@ -33,10 +33,10 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.rdcon(e) local c,tp=e:GetHandler(),e:GetHandlerPlayer() diff --git a/official/c32939238.lua b/official/c32939238.lua index dd3743fbb6..05cd312306 100644 --- a/official/c32939238.lua +++ b/official/c32939238.lua @@ -1,5 +1,5 @@ --忍法装具 鉄土竜 ---Ninjitsu Art Equipment Kanamugura +--Ninjitsu Art Tool - Iron Digger --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_ADD_SETCODE) - e2:SetValue(0x2b) + e2:SetValue(SET_NINJA) c:RegisterEffect(e2) --Destroy 1 card on the field local e3=Effect.CreateEffect(c) @@ -41,14 +41,14 @@ function s.initial_effect(c) e4:SetOperation(s.thspop) c:RegisterEffect(e4) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.costfilter(c) - return c:IsSetCard(0x2b) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NINJA) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -65,7 +65,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,e,tp,ft) - return c:IsMonster() and c:IsFaceup() and c:IsSetCard(0x2b) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))) + return c:IsMonster() and c:IsFaceup() and c:IsSetCard(SET_NINJA) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))) end function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) diff --git a/official/c32965616.lua b/official/c32965616.lua index bb471f8def..46916b056c 100644 --- a/official/c32965616.lua +++ b/official/c32965616.lua @@ -1,4 +1,5 @@ --精霊神后 ドリアード +--Elemental Grace Doriado local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c32975247.lua b/official/c32975247.lua index 10001b4b1d..6ab45a30a9 100644 --- a/official/c32975247.lua +++ b/official/c32975247.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end) + e1:SetCondition(function(e) return e:GetHandler():IsSpecialSummoned() end) e1:SetValue(1) c:RegisterEffect(e1) --Destroy all cards your opponent controls @@ -43,7 +43,7 @@ function s.rescon(sg,e,tp,mg) return sg:IsContains(e:GetHandler()) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return #g>0 and aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) end local rg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(rg,POS_FACEUP,REASON_COST) diff --git a/official/c3298689.lua b/official/c3298689.lua index 5f0a13f50d..8755da5322 100644 --- a/official/c3298689.lua +++ b/official/c3298689.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCondition(s.condition) + e1:SetCondition(function() return Duel.IsMainPhase() end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -19,15 +19,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) end -s.listed_series={0x10db} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()&PHASE_MAIN1+PHASE_MAIN2>0 -end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) @@ -70,7 +67,7 @@ function s.xyzfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) end function s.matfilter(c) - return c:IsSetCard(0x10db) and c:IsMonster() + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end @@ -88,4 +85,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,g) end end -end +end \ No newline at end of file diff --git a/official/c32986898.lua b/official/c32986898.lua index b116dfb589..5a134ab5e1 100644 --- a/official/c32986898.lua +++ b/official/c32986898.lua @@ -36,11 +36,11 @@ function s.matcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) local tp=c:GetControler() if g:IsExists(s.mfilter,1,nil) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE-RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE-RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) end end function s.desfilter(c,atk) @@ -63,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c32995007.lua b/official/c32995007.lua index ce6a6eeb87..d7b0b7a620 100644 --- a/official/c32995007.lua +++ b/official/c32995007.lua @@ -1,4 +1,5 @@ --天狼王 ブルー・セイリオス +--Celestial Wolf Lord, Blue Sirius local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -32,7 +33,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-2400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c32995276.lua b/official/c32995276.lua index 74f198fc50..0522e9d920 100644 --- a/official/c32995276.lua +++ b/official/c32995276.lua @@ -44,6 +44,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.BreakEffect() - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c32999573.lua b/official/c32999573.lua index 4a8abefab5..83f6c6994d 100644 --- a/official/c32999573.lua +++ b/official/c32999573.lua @@ -27,6 +27,6 @@ end function s.rop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil,tp,POS_FACEDOWN) - e:GetHandler():RegisterFlagEffect(id+ep,RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+ep,RESET_PHASE|PHASE_END,0,1) return Duel.Remove(g,POS_FACEDOWN,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c3300267.lua b/official/c3300267.lua index 900ba237be..d870065bff 100644 --- a/official/c3300267.lua +++ b/official/c3300267.lua @@ -34,13 +34,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.hspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,e:GetHandler(),0x69) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,e:GetHandler(),SET_HIERATIC) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,e:GetHandler(),0x69) + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,e:GetHandler(),SET_HIERATIC) if g then g:KeepAlive() e:SetLabelObject(g) @@ -55,7 +55,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.descfilter(c) - return c:IsSetCard(0x69) + return c:IsSetCard(SET_HIERATIC) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil,e) @@ -84,12 +84,12 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then @@ -97,11 +97,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c33015627.lua b/official/c33015627.lua index 664d2205cb..aa51142b6a 100644 --- a/official/c33015627.lua +++ b/official/c33015627.lua @@ -1,5 +1,5 @@ --時械神 サンダイオン --- Sandaion the Timelord +--Sandaion, the Timelord local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -46,7 +46,7 @@ function s.initial_effect(c) e6:SetCategory(CATEGORY_DAMAGE) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.damcon) @@ -58,7 +58,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetProperty(EFFECT_FLAG_REPEAT) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) @@ -87,7 +87,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -96,7 +96,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAbleToDeck() then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c33017655.lua b/official/c33017655.lua index e483cc0b42..b1b8c154fb 100644 --- a/official/c33017655.lua +++ b/official/c33017655.lua @@ -1,4 +1,5 @@ --暗黒界の門 +--The Gates of Dark World local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,9 +36,9 @@ function s.costfilter(c) return c:IsRace(RACE_FIEND) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -51,8 +52,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_FIEND) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33022867.lua b/official/c33022867.lua index 6447a0f831..d148e69609 100644 --- a/official/c33022867.lua +++ b/official/c33022867.lua @@ -62,11 +62,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) g:DeleteGroup() end function s.actcon(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE -end + return Duel.IsBattlePhase() +end \ No newline at end of file diff --git a/official/c33026283.lua b/official/c33026283.lua index 933086f357..1f563c6022 100644 --- a/official/c33026283.lua +++ b/official/c33026283.lua @@ -1,11 +1,11 @@ --双天将 金剛 ---Kongou, Heavenly General of the Souten +--Dual Avatar - Empowered Kon-Gyo --scripted by Naim local s,id=GetID() function s.initial_effect(c) --Fusion summon procedure c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,85360035,1,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14e),2) + Fusion.AddProcMixN(c,true,true,85360035,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DUAL_AVATAR),2) --Activation limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -40,8 +40,8 @@ function s.initial_effect(c) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.material_setcode={0x14e} -s.listed_series={0x14e} +s.material_setcode={SET_DUAL_AVATAR} +s.listed_series={SET_DUAL_AVATAR} function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end @@ -68,7 +68,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if rp==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local gp=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return gp and gp:IsContains(c) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return gp and gp:IsContains(c) and Duel.IsChainDisablable(ev) and re:IsSpellTrapEffect() and Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_FUSION),tp,LOCATION_MZONE,0,nil)>=2 end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,4 +77,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) -end +end \ No newline at end of file diff --git a/official/c33031674.lua b/official/c33031674.lua index c60d06cf90..d4fc2306fd 100644 --- a/official/c33031674.lua +++ b/official/c33031674.lua @@ -1,5 +1,6 @@ --灼熱の試練 +--Incandescent Ordeal local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,60258960) -end +end \ No newline at end of file diff --git a/official/c33034646.lua b/official/c33034646.lua index dfca0e4a54..81d334345d 100644 --- a/official/c33034646.lua +++ b/official/c33034646.lua @@ -1,4 +1,5 @@ --機甲忍者フレイム +--Flame Armor Ninja local s,id=GetID() function s.initial_effect(c) --lv up @@ -17,9 +18,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.filter(c) - return c:IsFaceup() and c:GetLevel()~=0 and c:IsSetCard(0x2b) + return c:IsFaceup() and c:GetLevel()~=0 and c:IsSetCard(SET_NINJA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,8 +35,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c33041277.lua b/official/c33041277.lua index 0d1b6d5d4f..ec7ea829c5 100644 --- a/official/c33041277.lua +++ b/official/c33041277.lua @@ -1,7 +1,6 @@ --サイバー・レヴシステム --Cyber Revsystem --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Cyber Dragon" from hand or GY @@ -14,19 +13,18 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_CYBER_DRAGON} - function s.filter(c,e,tp) return c:IsCode(CARD_CYBER_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then --Cannot be destroyed by card effects local e1=Effect.CreateEffect(e:GetHandler()) @@ -35,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c33055499.lua b/official/c33055499.lua index 67edc8cb85..deb6521cf3 100644 --- a/official/c33055499.lua +++ b/official/c33055499.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -71,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c33057951.lua b/official/c33057951.lua index 9969705540..dfd030dc88 100644 --- a/official/c33057951.lua +++ b/official/c33057951.lua @@ -1,4 +1,5 @@ --浮上 +--Surface local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(0x60040) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelBelow(3) and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c33062423.lua b/official/c33062423.lua index f512e8f8c8..83ac74f988 100644 --- a/official/c33062423.lua +++ b/official/c33062423.lua @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetDescription(aux.Stringid(id,0)) e0:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e0) end if lc>=1 then @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end if lc>=2 then @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_ADJUST) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetOperation(s.op) tc:RegisterEffect(e2) end @@ -60,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_BATTLED) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetCondition(s.descon) e3:SetTarget(s.destg) e3:SetOperation(s.desop) @@ -90,4 +90,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33066139.lua b/official/c33066139.lua index ffb6f8125d..726388ee0a 100644 --- a/official/c33066139.lua +++ b/official/c33066139.lua @@ -1,4 +1,5 @@ --カードを狩る死神 +--Reaper of the Cards local s,id=GetID() function s.initial_effect(c) --flip @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end if tc:IsTrap() then Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c33093439.lua b/official/c33093439.lua index 85cf38814c..f7cf2a9486 100644 --- a/official/c33093439.lua +++ b/official/c33093439.lua @@ -1,4 +1,5 @@ --サイバー・エルタニン +--Cyber Eltanin local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -40,7 +41,7 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) - local gg=not Duel.IsPlayerAffectedByEffect(tp,69832741) and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) + local gg=not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) or Group.CreateGroup() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return (#mg>0 and (ft>0 or (mg:IsExists(s.mzfilter,1,nil) and ft>-1))) @@ -48,10 +49,10 @@ function s.spcon(e,c) end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g - if Duel.IsPlayerAffectedByEffect(tp,69832741) then + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) else - g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) end Duel.Remove(g,POS_FACEUP,REASON_COST) local e1=Effect.CreateEffect(c) @@ -72,4 +73,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33103459.lua b/official/c33103459.lua index 6c9510a67f..a4c5f73191 100644 --- a/official/c33103459.lua +++ b/official/c33103459.lua @@ -80,4 +80,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33114323.lua b/official/c33114323.lua index 31881934a9..ab66bc334b 100644 --- a/official/c33114323.lua +++ b/official/c33114323.lua @@ -1,6 +1,6 @@ --メタルシルバー・アーマー --Metalsilver Armor -local LOC_MZN_GRV_BAN=LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED +local LOC_MZN_GRV_BAN=LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -23,4 +23,4 @@ end function s.efftg(e,c) return c~=e:GetHandler():GetEquipTarget() and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))--face-down banished cards can still be targeted -end +end \ No newline at end of file diff --git a/official/c33129626.lua b/official/c33129626.lua index 335e157617..49c5a142b8 100644 --- a/official/c33129626.lua +++ b/official/c33129626.lua @@ -45,7 +45,7 @@ function s.ffilter(c,fc,sumtype,tp) return c:IsRace(RACE_WARRIOR,fc,sumtype,tp) and c:IsAttribute(ATTRIBUTE_LIGHT,fc,sumtype,tp) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and rp==1-tp and tp==Duel.GetTurnPlayer() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,13 +66,13 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -93,4 +93,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33158448.lua b/official/c33158448.lua index e7a82dee53..93d05eb7e9 100644 --- a/official/c33158448.lua +++ b/official/c33158448.lua @@ -42,12 +42,12 @@ function s.initial_effect(c) e5:SetOperation(s.negop) c:RegisterEffect(e5) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkval(e,c) return c:GetLevel()*300 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -58,13 +58,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + and ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetLevel()>2 end @@ -79,4 +79,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33184167.lua b/official/c33184167.lua index 2dc9b907e5..6621d42de9 100644 --- a/official/c33184167.lua +++ b/official/c33184167.lua @@ -1,4 +1,5 @@ --同族感染ウィルス +--Tribe-Infecting Virus local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local arc=e:GetLabel() local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,arc) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33184236.lua b/official/c33184236.lua index d06034e6e7..a9594aa846 100644 --- a/official/c33184236.lua +++ b/official/c33184236.lua @@ -1,4 +1,5 @@ --カラクリ屋敷 +--Karakuri Trick House local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,11 +13,11 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.cfilter(c,tp) local np=c:GetPosition() local pp=c:GetPreviousPosition() - return c:IsControler(tp) and c:IsSetCard(0x11) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1)) + return c:IsControler(tp) and c:IsSetCard(SET_KARAKURI) and ((pp==SET_ALLY_OF_JUSTICE and np==SET_AMAZONESS) or (pp==SET_AMAZONESS and np==SET_ALLY_OF_JUSTICE)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33198837.lua b/official/c33198837.lua index 5d16943422..e84035c1ca 100644 --- a/official/c33198837.lua +++ b/official/c33198837.lua @@ -1,4 +1,5 @@ --ナチュル・ビースト +--Naturia Beast local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -20,7 +21,7 @@ function s.initial_effect(c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and Duel.IsChainNegatable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end @@ -39,4 +40,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33202303.lua b/official/c33202303.lua index 8d5139a978..e76506bc01 100644 --- a/official/c33202303.lua +++ b/official/c33202303.lua @@ -104,4 +104,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Damage(1-tp,tc:GetTextAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33212663.lua b/official/c33212663.lua index 7fa85e59a3..5b9a6b3798 100644 --- a/official/c33212663.lua +++ b/official/c33212663.lua @@ -42,12 +42,12 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -91,12 +91,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetTarget(s.sumlimit(arc)) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.sumlimit(arc) return function(e,c,sump,sumtype,sumpos,targetp) return c:IsRace(arc) end -end - +end \ No newline at end of file diff --git a/official/c33225925.lua b/official/c33225925.lua index 445e10a623..fd60c1963d 100644 --- a/official/c33225925.lua +++ b/official/c33225925.lua @@ -1,4 +1,5 @@ --久遠の魔術師ミラ +--Milla the Temporal Magician local s,id=GetID() function s.initial_effect(c) --confirm @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c3322931.lua b/official/c3322931.lua index 95782d9c55..e0ac06bf21 100644 --- a/official/c3322931.lua +++ b/official/c3322931.lua @@ -1,5 +1,5 @@ --星風狼ウォルフライエ ---Wolfrayet the Stellar Wind Wolf +--Stellar Wind Wolfrayet --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -39,12 +39,12 @@ function s.initial_effect(c) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not re:IsActiveType(TYPE_MONSTER) or re:GetHandler()==c then return end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + if not re:IsMonsterEffect() or re:GetHandler()==c then return end + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not re:IsActiveType(TYPE_MONSTER) or re:GetHandler()==c then return false end + if not re:IsMonsterEffect() or re:GetHandler()==c then return false end return c:GetFlagEffect(id)>0 and c:GetAttack()<4000 end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -55,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.tdcon(e) @@ -74,4 +74,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or #g==0 then return end g:AddCard(c) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33236860.lua b/official/c33236860.lua index abd570ac14..a629d0ba21 100644 --- a/official/c33236860.lua +++ b/official/c33236860.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro Summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x33),1,1,Synchro.NonTuner(nil),2,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BLACKWING),1,1,Synchro.NonTuner(nil),2,99) c:EnableReviveLimit() --Destroy up to 2 monsters local e1=Effect.CreateEffect(c) @@ -25,13 +25,13 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCountLimit(1) e2:SetCondition(function(e) return Duel.IsTurnPlayer(1-e:GetHandlerPlayer()) end) - e2:SetTarget(function (e,c) return c:IsSetCard(0x33) end) + e2:SetTarget(function (e,c) return c:IsSetCard(SET_BLACKWING) end) e2:SetValue(s.indesval) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end @@ -40,7 +40,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c,atk) @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indesval(e,re,r,rp) return r&REASON_BATTLE>0 -end +end \ No newline at end of file diff --git a/official/c33244944.lua b/official/c33244944.lua index b6cf61e1c8..90ef6e7761 100644 --- a/official/c33244944.lua +++ b/official/c33244944.lua @@ -1,4 +1,5 @@ --エクゾディアとの契約 +--Contract with Exodia local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c33245030.lua b/official/c33245030.lua index 80fa19232a..36eb4e80f2 100644 --- a/official/c33245030.lua +++ b/official/c33245030.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -29,10 +29,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local at=Duel.GetAttacker() diff --git a/official/c33248692.lua b/official/c33248692.lua index 1105f94be6..cb50d9c70c 100644 --- a/official/c33248692.lua +++ b/official/c33248692.lua @@ -1,4 +1,5 @@ --オプションハンター +--Option Hunter local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33250142.lua b/official/c33250142.lua index 996bd6c31d..9bd52056e4 100644 --- a/official/c33250142.lua +++ b/official/c33250142.lua @@ -1,5 +1,5 @@ --天極輝艦-熊斗竜巧 ---Ursatron, the Celestial Polar Illuminaship +--Ultimate Flagship Ursatron --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop2) c:RegisterEffect(e3) end -s.listed_series={0x165,0x151} +s.listed_series={SET_URSARCTIC,SET_DRYTRON} function s.thcfilter(c,tp) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsControler(tp) end @@ -44,7 +44,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thcfilter,1,e:GetHandler(),tp) end function s.thfilter(c) - return (c:IsSetCard(0x165) or c:IsSetCard(0x151)) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard({SET_URSARCTIC,SET_DRYTRON}) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -73,4 +73,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33252803.lua b/official/c33252803.lua index e6de23c947..781dd53191 100644 --- a/official/c33252803.lua +++ b/official/c33252803.lua @@ -12,17 +12,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x48,0x1048} +s.listed_series={SET_NUMBER,SET_NUMBER_C} function s.filter1(c,e,tp) local m=c:GetMetatable(true) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) and m and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_NUMBER) and not c:IsSetCard(SET_NUMBER_C) and m and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,m.xyz_number,pg) end function s.filter2(c,e,tp,mc,rk,no,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) - and c:IsSetCard(0x1048) and c.xyz_number==no and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsSetCard(SET_NUMBER_C) and c.xyz_number==no and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c33256280.lua b/official/c33256280.lua index d6c151fd33..d11f468f4d 100644 --- a/official/c33256280.lua +++ b/official/c33256280.lua @@ -1,4 +1,5 @@ --メタルフォーゼ・ゴルドライバー +--Metalfoes Goldriver local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -14,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.desfilter(c,tp) if c:IsFacedown() then return false end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -25,7 +26,7 @@ function s.desfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g:GetFirst()) end end -end +end \ No newline at end of file diff --git a/official/c33280639.lua b/official/c33280639.lua index 029570883c..837c70232c 100644 --- a/official/c33280639.lua +++ b/official/c33280639.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(function(_,tp) return not Duel.HasFlagEffect(tp,id) end) e2:SetOperation(s.immop) c:RegisterEffect(e2) @@ -82,4 +82,4 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c33282498.lua b/official/c33282498.lua index de9b7d7a13..2288591fc8 100644 --- a/official/c33282498.lua +++ b/official/c33282498.lua @@ -1,4 +1,5 @@ --アークブレイブドラゴン +--Arkbrave Dragon local s,id=GetID() function s.initial_effect(c) --remove @@ -22,7 +23,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -50,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct*200) c:RegisterEffect(e1) local e2=e1:Clone() @@ -59,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -82,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c33296432.lua b/official/c33296432.lua index b1ed99a86a..1366dead24 100644 --- a/official/c33296432.lua +++ b/official/c33296432.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Dogmatika" archetype -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} --Specifically lists itself s.listed_names={id} --If special summoned from extra deck @@ -65,7 +65,7 @@ function s.indval(e,c) end --Check for "Dogmatika" monster (except for this card's name) function s.spfilter(c,e,tp) - return c:IsSetCard(0x146) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DOGMATIKA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --If destroyed by battle or card effect while on the field function s.spcon2(e,tp,eg,ep,ev,re,r,rp) @@ -85,4 +85,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c33298291.lua b/official/c33298291.lua index d719966742..f3361f2c40 100644 --- a/official/c33298291.lua +++ b/official/c33298291.lua @@ -1,8 +1,8 @@ --獣湧き肉躍り ---Drumming with Excitement +--Dances with Beasts --Scripted by Eerie Code local s,id=GetID() -local LOCATION_HDG = LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE +local LOCATION_HDG = LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE function s.initial_effect(c) --activate local e1=Effect.CreateEffect(c) @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg==3 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c33300669.lua b/official/c33300669.lua index 04198c8ace..eac6ddbaa3 100644 --- a/official/c33300669.lua +++ b/official/c33300669.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.descon) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -40,16 +40,16 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.chainop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) then return false end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) then return false end Duel.SetChainLimit(aux.FALSE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -62,9 +62,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) - and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id)~=0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) + and (e:GetHandler():IsPendulumSummoned() or e:GetHandler():GetFlagEffect(id)~=0) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) + return not c:IsOriginalSetCard(SET_AMORPHAGE) end \ No newline at end of file diff --git a/official/c33302407.lua b/official/c33302407.lua index a40bb2cde4..dd58529c85 100644 --- a/official/c33302407.lua +++ b/official/c33302407.lua @@ -1,4 +1,5 @@ --ポイズン・チェーン +--Poison Chain local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,12 +20,12 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x25} +s.listed_series={SET_IRON_CHAIN} function s.discon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x25) + return c:IsFaceup() and c:IsSetCard(SET_IRON_CHAIN) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil) @@ -37,4 +38,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33314479.lua b/official/c33314479.lua index f9560ed9b1..570efd983f 100644 --- a/official/c33314479.lua +++ b/official/c33314479.lua @@ -1,5 +1,5 @@ --飛鯉 ---Flying Carp +--Flying Red Carp --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.bdocon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -32,7 +32,7 @@ function s.atkcfilter(c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.atkcfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.atkcfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,27 +41,23 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) - return c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c33318980.lua b/official/c33318980.lua index 054fd6a573..590dccc18c 100644 --- a/official/c33318980.lua +++ b/official/c33318980.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,2}) - e3:SetCost(aux.SelfTributeCost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -89,4 +89,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c33323657.lua b/official/c33323657.lua index 23d38849dc..d106513eb4 100644 --- a/official/c33323657.lua +++ b/official/c33323657.lua @@ -33,4 +33,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33325951.lua b/official/c33325951.lua index d430b67cc9..4e7ba83398 100644 --- a/official/c33325951.lua +++ b/official/c33325951.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCountLimit(1) e3:SetCondition(function(e) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end) diff --git a/official/c33327029.lua b/official/c33327029.lua index ec70dfc008..833db9bb79 100644 --- a/official/c33327029.lua +++ b/official/c33327029.lua @@ -1,4 +1,5 @@ --メタルフォーゼ・カウンター +--Metalfoes Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -31,9 +32,9 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) local v=0 @@ -50,7 +51,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ev==tp or ev==PLAYER_ALL end function s.filter(c,e,tp) - return c:IsSetCard(0xe1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_METALFOES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -66,7 +67,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xe1) and c:IsAbleToHand() + return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_METALFOES) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -79,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c33331231.lua b/official/c33331231.lua index 5b6adc7000..9f1c32e57b 100644 --- a/official/c33331231.lua +++ b/official/c33331231.lua @@ -1,5 +1,5 @@ --閃術兵器-H.A.M.P. ---Strategic Striker - H.A.M.P. +--Surgical Striker - H.A.M.P. --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -30,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x115,0x1115} +s.listed_series={SET_SKY_STRIKER,SET_SKY_STRIKER_ACE} function s.ssacechk(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1115),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER_ACE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.hspcon(e,c) if c==nil then return true end diff --git a/official/c33334269.lua b/official/c33334269.lua index 0daefa07b2..50772e42f4 100644 --- a/official/c33334269.lua +++ b/official/c33334269.lua @@ -1,4 +1,5 @@ --DDゴースト +--D/D Ghost local s,id=GetID() function s.initial_effect(c) --to grave @@ -22,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.rtgop) c:RegisterEffect(e2) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} s.listed_names={id} function s.tgfilter1(c,tp) - return ((c:IsSetCard(0xaf) and c:IsMonster() and not c:IsCode(id)) or c:IsSetCard(0xae)) + return ((c:IsSetCard(SET_DD) and c:IsMonster() and not c:IsCode(id)) or c:IsSetCard(SET_DARK_CONTRACT)) and Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode()) end function s.tgfilter2(c,cd) @@ -50,7 +51,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.rtgfilter(c) - return c:IsFaceup() and ((c:IsSetCard(0xaf) and c:IsMonster() and not c:IsCode(id)) or c:IsSetCard(0xae)) + return c:IsFaceup() and ((c:IsSetCard(SET_DD) and c:IsMonster() and not c:IsCode(id)) or c:IsSetCard(SET_DARK_CONTRACT)) end function s.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.rtgfilter(chkc) end @@ -62,6 +63,6 @@ end function s.rtgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c33347467.lua b/official/c33347467.lua index 3a2d156007..4fcb0226c3 100644 --- a/official/c33347467.lua +++ b/official/c33347467.lua @@ -20,11 +20,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Remove(g,POS_FACEUP,REASON_COST) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c33365932.lua b/official/c33365932.lua index 27a832d2cd..a877aa089b 100644 --- a/official/c33365932.lua +++ b/official/c33365932.lua @@ -1,4 +1,5 @@ --ヴォルカニック・バレット +--Volcanic Shell local s,id=GetID() function s.initial_effect(c) --search @@ -8,16 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) end s.listed_names={id} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.filter(c) return c:IsCode(id) and c:IsAbleToHand() end @@ -32,4 +29,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c33391067.lua b/official/c33391067.lua index e12219d8cb..9a9835f200 100644 --- a/official/c33391067.lua +++ b/official/c33391067.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) + return re:IsMonsterEffect() and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) diff --git a/official/c33396948.lua b/official/c33396948.lua index 2be2932296..e74992e22d 100644 --- a/official/c33396948.lua +++ b/official/c33396948.lua @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,g2) Duel.Win(PLAYER_NONE,WIN_REASON_EXODIA) end -end +end \ No newline at end of file diff --git a/official/c33407125.lua b/official/c33407125.lua index 2e5588fa21..0d10a2bb65 100644 --- a/official/c33407125.lua +++ b/official/c33407125.lua @@ -1,14 +1,14 @@ --- 白銀の迷宮城 --- Labrynth Labyrinth --- Scripted by Hatter +--白銀の迷宮城 +--Labrynth Labyrinth +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Special Summon 1 Fiend monster from hand or GY + --Special Summon 1 Fiend monster from hand or GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Add effect to "Welcome Labrynth" + --Add effect to "Welcome Labrynth" local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -31,23 +31,23 @@ function s.initial_effect(c) e3:SetTargetRange(1,0) c:RegisterEffect(e3) end -s.listed_series={0x17f,0x117f} +s.listed_series={SET_LABRYNTH,SET_WELCOME_LABRYNTH} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=re:GetHandler() - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP and not c:IsSetCard(0x17f) + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP and not c:IsSetCard(SET_LABRYNTH) end function s.spfilter(c,e,tp) return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c33413279.lua b/official/c33413279.lua index b3b1963ebd..0c21d48d67 100644 --- a/official/c33413279.lua +++ b/official/c33413279.lua @@ -23,7 +23,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,2,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -37,4 +37,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33413638.lua b/official/c33413638.lua index 4a4534112c..a70632c9f6 100644 --- a/official/c33413638.lua +++ b/official/c33413638.lua @@ -1,4 +1,5 @@ --コカローチ・ナイト +--Cockroach Knight local s,id=GetID() function s.initial_effect(c) --to deck top @@ -17,6 +18,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33420078.lua b/official/c33420078.lua index 319f6e304a..7b93bcb5b2 100644 --- a/official/c33420078.lua +++ b/official/c33420078.lua @@ -1,6 +1,5 @@ --ゾンビキャリア --Plaguespreader Zombie - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -18,7 +17,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c33423043.lua b/official/c33423043.lua index 91b2a698b9..2d9b81eb54 100644 --- a/official/c33423043.lua +++ b/official/c33423043.lua @@ -1,4 +1,5 @@ --異次元の指名者 +--D.D. Designator local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(dg,POS_FACEUP,REASON_EFFECT) Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c33438666.lua b/official/c33438666.lua index 9d5804f1a2..8fa3a43eff 100644 --- a/official/c33438666.lua +++ b/official/c33438666.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) diff --git a/official/c33453260.lua b/official/c33453260.lua index 4e5feb2885..cb9102dd2c 100644 --- a/official/c33453260.lua +++ b/official/c33453260.lua @@ -54,4 +54,4 @@ function s.dircon(e) end function s.descon(e) return not Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) -end +end \ No newline at end of file diff --git a/official/c33455338.lua b/official/c33455338.lua index e5ff1ad8ec..fc99199ed9 100644 --- a/official/c33455338.lua +++ b/official/c33455338.lua @@ -1,4 +1,5 @@ --邪狂神の使い +--Maniacal Servant local s,id=GetID() function s.initial_effect(c) --atk up @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) @@ -15,15 +16,15 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,99,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,99,nil) e:SetLabel(#g) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -34,7 +35,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(e:GetLabel()*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c33460840.lua b/official/c33460840.lua index bc59b8f460..aaaa4941f2 100644 --- a/official/c33460840.lua +++ b/official/c33460840.lua @@ -1,4 +1,5 @@ --巨竜の守護騎士 +--Guardian of Felgrand local s,id=GetID() function s.initial_effect(c) --equip @@ -34,8 +35,8 @@ function s.filter(c,ec) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.equipop(c,e,tp,tc) if not c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) then return end @@ -49,7 +50,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -58,7 +59,7 @@ function s.equipop(c,e,tp,tc) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e3:SetCode(EFFECT_UPDATE_DEFENSE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(def) tc:RegisterEffect(e3) end @@ -67,7 +68,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,c) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) @@ -96,4 +97,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c33467872.lua b/official/c33467872.lua index 2dab55787c..59b29708dd 100644 --- a/official/c33467872.lua +++ b/official/c33467872.lua @@ -1,5 +1,5 @@ --深海のコレペティ ---Deep Sea Répétiteur +--Deep Sea Repetiteur --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -42,7 +42,7 @@ function s.atkcfilter(c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.atkcfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.atkcfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -51,12 +51,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelAbove(5) and @@ -80,11 +80,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c33491462.lua b/official/c33491462.lua index 016250254c..50950ac84e 100644 --- a/official/c33491462.lua +++ b/official/c33491462.lua @@ -68,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) @@ -101,7 +101,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) lc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c33508719.lua b/official/c33508719.lua index 9fc17d905c..dd62a24655 100644 --- a/official/c33508719.lua +++ b/official/c33508719.lua @@ -1,4 +1,5 @@ --メタモルポット +--Morphing Jar local s,id=GetID() function s.initial_effect(c) --flip @@ -16,8 +17,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - if #g>0 then Duel.SendtoGrave(g,REASON_DISCARD+REASON_EFFECT) end + if #g>0 then Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) end Duel.BreakEffect() Duel.Draw(tp,5,REASON_EFFECT) Duel.Draw(1-tp,5,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33541430.lua b/official/c33541430.lua index 60730c73ae..f0fafb8832 100644 --- a/official/c33541430.lua +++ b/official/c33541430.lua @@ -1,4 +1,5 @@ --花札衛-月花見- +--Flower Cardian Moonflowerviewing local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -22,7 +23,7 @@ function s.initial_effect(c) e3:SetOperation(s.synop) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local e1=Effect.CreateEffect(e:GetHandler()) @@ -30,7 +31,7 @@ function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN) Duel.RegisterEffect(e1,tp) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,7 +46,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then @@ -53,7 +54,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() @@ -65,4 +66,4 @@ function s.synop(e,tg,ntg,sg,lv,sc,tp) local res=sg:CheckWithSumEqual(Card.GetSynchroLevel,lv,#sg,#sg,sc) or sg:CheckWithSumEqual(function() return 2 end,lv,#sg,#sg) return res,true -end +end \ No newline at end of file diff --git a/official/c33543890.lua b/official/c33543890.lua index 571157ef8d..b7951521d5 100644 --- a/official/c33543890.lua +++ b/official/c33543890.lua @@ -1,5 +1,5 @@ --竜儀巧-ラスβ ---Draitron Ras-Beta +--Drytron Beta Rastaban --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(Drytron.TributeCost) e2:SetTarget(s.sptg) @@ -25,9 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.spconlimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(0x151) + return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(SET_DRYTRON) end function s.sumfilter(c) return not c:IsSummonableCard() @@ -38,7 +38,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,c:GetLocation()) end function s.tgfilter(c) - return c:IsSetCard(0x151) and c:IsMonster() and c:IsFaceup() + return c:IsSetCard(SET_DRYTRON) and c:IsMonster() and c:IsFaceup() end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local sg=g:Select(tp,1,1,nil) Duel.HintSelection(sg) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end end -end +end \ No newline at end of file diff --git a/official/c33545259.lua b/official/c33545259.lua index 67b87b112f..55dfe4c491 100644 --- a/official/c33545259.lua +++ b/official/c33545259.lua @@ -47,9 +47,9 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.spcfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp) @@ -59,9 +59,9 @@ function s.costfilter(c,tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,tp) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -74,7 +74,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.condition(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x137),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local bc=e:GetHandler():GetBattleTarget() @@ -88,4 +88,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c33550694.lua b/official/c33550694.lua index 9b27c5a636..6075d6c714 100644 --- a/official/c33550694.lua +++ b/official/c33550694.lua @@ -17,4 +17,4 @@ function s.initial_effect(c) e2:SetTarget(Fusion.SummonEffTG(nil,Card.IsAbleToRemove,nil,Fusion.BanishMaterial)) e2:SetOperation(Fusion.SummonEffOP(nil,Card.IsAbleToRemove,nil,Fusion.BanishMaterial)) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c33551032.lua b/official/c33551032.lua index b3ff3512ae..6cad1dbf19 100644 --- a/official/c33551032.lua +++ b/official/c33551032.lua @@ -1,4 +1,5 @@ --アンブラル・アンフォーム +--Umbral Horror Unform local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x87} +s.listed_series={SET_UMBRAL_HORROR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x87) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UMBRAL_HORROR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c3355732.lua b/official/c3355732.lua index 8e80cc02bb..23992120e7 100644 --- a/official/c3355732.lua +++ b/official/c3355732.lua @@ -1,5 +1,5 @@ --氷水帝コスモクロア ---Cosmocroix the Icejade Imperatrix +--Icejade Kosmochlor --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -34,7 +34,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={7142724} -s.listed_series={0x16e} +s.listed_series={SET_ICEJADE} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -47,14 +47,14 @@ end function s.aclimit(e,re,tp) local rc=re:GetHandler() local status=STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN - return re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE) + return re:IsMonsterEffect() and rc:IsLocation(LOCATION_MZONE) and not rc:IsStatus(status) end function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.atktg(e,c) local tp=e:GetHandlerPlayer() local bc=c:GetBattleTarget() - return c:IsControler(1-tp) and bc and bc:IsSetCard(0x16e) and bc:IsControler(tp) -end + return c:IsControler(1-tp) and bc and bc:IsSetCard(SET_ICEJADE) and bc:IsControler(tp) +end \ No newline at end of file diff --git a/official/c3356494.lua b/official/c3356494.lua index 8551680246..5fbd2b6d1d 100644 --- a/official/c3356494.lua +++ b/official/c3356494.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT),2,2,s.lcheck) - --Add from graveyard to hand + --Add 1 "Photon" or "Galaxy" monster in your GY to the hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - --Destroy + --Destroy 1 Special Summoned monster your opponent controls local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -33,16 +33,16 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsAttackAbove,1,nil,2000) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) - return c:IsMonster() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -53,27 +53,27 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()&PHASE_MAIN1+PHASE_MAIN2~=0 + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.descfilter(c) - return c:IsDiscardable() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) + return c:IsDiscardable() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) end function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,0x55) and sg:IsExists(Card.IsSetCard,1,nil,0x7b) + return sg:IsExists(Card.IsSetCard,1,nil,SET_PHOTON) and sg:IsExists(Card.IsSetCard,1,nil,SET_GALAXY) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.descfilter,tp,LOCATION_HAND,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,0) end local sg=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_DISCARD,s.rescon) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -84,7 +84,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33574806.lua b/official/c33574806.lua index 90b9d7a5c3..c2c097dfe5 100644 --- a/official/c33574806.lua +++ b/official/c33574806.lua @@ -1,9 +1,10 @@ --E・HERO エスクリダオ +--Elemental HERO Escuridao local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3008),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -20,8 +21,8 @@ function s.initial_effect(c) e3:SetValue(s.atkup) c:RegisterEffect(e3) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3008)*100 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_ELEMENTAL_HERO)*100 +end \ No newline at end of file diff --git a/official/c33609093.lua b/official/c33609093.lua index 260a01e5fe..8e328324b9 100644 --- a/official/c33609093.lua +++ b/official/c33609093.lua @@ -32,16 +32,16 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) e:SetLabelObject(g:GetFirst()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -55,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(atk/2)) oc:RegisterEffect(e1) if sc:IsRelateToEffect(e) and sc:IsFaceup() then @@ -63,28 +63,28 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(math.ceil(atk/2)) sc:RegisterEffect(e2) end end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetAttribute)>1 + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetAttribute)>1 end function s.filter(c,tp) - return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x137) and not c:IsForbidden() + return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(SET_ANCIENT_WARRIORS) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsCode(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,tp) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,tp):GetFirst() if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c33609262.lua b/official/c33609262.lua index b019d5c59c..49fac4a43c 100644 --- a/official/c33609262.lua +++ b/official/c33609262.lua @@ -1,4 +1,5 @@ --帝王の深怨 +--Tenacity of the Monarchs local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} s.listed_names={id} function s.cfilter(c) return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefense()==1000 and not c:IsPublic() @@ -25,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.filter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c33611061.lua b/official/c33611061.lua index b7bb758c0b..f996b23705 100644 --- a/official/c33611061.lua +++ b/official/c33611061.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end function s.filter(c) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToDeck() + return c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end @@ -27,7 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToHand() + return c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE,0,nil) @@ -55,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) end -end +end \ No newline at end of file diff --git a/official/c33622465.lua b/official/c33622465.lua index 440c3707f6..c9f29808e0 100644 --- a/official/c33622465.lua +++ b/official/c33622465.lua @@ -1,6 +1,5 @@ --救護部隊 --First-Aid Squad - local s,id=GetID() function s.initial_effect(c) --Add 1 normal monster from GY @@ -50,13 +49,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,1200,400,3,RACE_WARRIOR,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,1200,400,3,RACE_WARRIOR,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,1200,400,3,RACE_WARRIOR,ATTRIBUTE_EARTH) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,1200,400,3,RACE_WARRIOR,ATTRIBUTE_EARTH) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_WARRIOR) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) @@ -67,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() diff --git a/official/c336369.lua b/official/c336369.lua index a4bb30d9f2..9b565d9026 100644 --- a/official/c336369.lua +++ b/official/c336369.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.filter(c,e,tp) - return c:IsLevelAbove(5) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelAbove(5) and c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c33652635.lua b/official/c33652635.lua index fd63ce786c..880f50866a 100644 --- a/official/c33652635.lua +++ b/official/c33652635.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,88996322,1,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19),2) + Fusion.AddProcMixN(c,true,true,88996322,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR),2) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) --negate local e1=Effect.CreateEffect(c) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.spcon) e3:SetCost(s.spcost) @@ -40,21 +40,21 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.material_setcode=0x19 -s.listed_series={0x19} +s.material_setcode=SET_GLADIATOR +s.listed_series={SET_GLADIATOR} function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -74,10 +74,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -91,6 +91,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,100,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c33655493.lua b/official/c33655493.lua index 4f4a6d225b..1b84190999 100644 --- a/official/c33655493.lua +++ b/official/c33655493.lua @@ -25,5 +25,5 @@ function s.tg(e,c) return c:IsFaceup() and c:GetCode()~=id end function s.tgval(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==1-e:GetHandlerPlayer() -end + return re:IsSpellTrapEffect() and rp==1-e:GetHandlerPlayer() +end \ No newline at end of file diff --git a/official/c33656832.lua b/official/c33656832.lua index da257c21c4..6267ab6924 100644 --- a/official/c33656832.lua +++ b/official/c33656832.lua @@ -1,4 +1,5 @@ --曲芸の魔術師 +--Acrobatic Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -60,4 +61,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) and Duel.CheckPendulumZones(tp) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c33665663.lua b/official/c33665663.lua index e6dbfd8fa0..0a39cff14c 100644 --- a/official/c33665663.lua +++ b/official/c33665663.lua @@ -1,4 +1,5 @@ --炎舞-「開陽」 +--Fire Formation - Kaiyo local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetOperation(s.activate) c:RegisterEffect(e1) --atkup @@ -20,9 +21,6 @@ function s.initial_effect(c) e2:SetValue(300) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -30,6 +28,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c3366982.lua b/official/c3366982.lua index aaf95c1fa2..4fec9c4ae1 100644 --- a/official/c3366982.lua +++ b/official/c3366982.lua @@ -1,5 +1,5 @@ --ドラゴンに乗るワイバーン ---Alligator’s Sword Dragon +--Alligator's Sword Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c33691040.lua b/official/c33691040.lua index b2e767b693..1e0fd769fb 100644 --- a/official/c33691040.lua +++ b/official/c33691040.lua @@ -1,7 +1,8 @@ --プラグティカル +--Pragtical local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,42348802,2830619) -end +end \ No newline at end of file diff --git a/official/c33695750.lua b/official/c33695750.lua index 550056bdcf..827c0a1033 100644 --- a/official/c33695750.lua +++ b/official/c33695750.lua @@ -1,4 +1,5 @@ --デス・モスキート +--Des Mosquito local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x27) @@ -48,4 +49,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) and e:GetHandler():IsCanRemoveCounter(tp,0x27,1,REASON_COST) end e:GetHandler():RemoveCounter(tp,0x27,1,REASON_EFFECT) return true -end +end \ No newline at end of file diff --git a/official/c33698022.lua b/official/c33698022.lua index 96ba1f9006..bc0f438264 100644 --- a/official/c33698022.lua +++ b/official/c33698022.lua @@ -1,4 +1,5 @@ --月華竜 ブラック・ローズ +--Black Rose Moonlight Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -38,7 +39,7 @@ function s.evop(e,tp,eg,ep,ev,re,r,rp) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,re,r,rp,ep,ev) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand() + return c:IsSpecialSummoned() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -52,4 +53,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3370104.lua b/official/c3370104.lua index b578e605c6..d951ac130a 100644 --- a/official/c3370104.lua +++ b/official/c3370104.lua @@ -40,7 +40,7 @@ function s.distg(e,c) return tc:IsControler(e:GetHandlerPlayer()) and tc:IsFaceup() and tc:IsRace(RACE_MACHINE) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsAttackPos() or re:IsActiveType(TYPE_MONSTER) then return end + if not e:GetHandler():IsAttackPos() or re:IsMonsterEffect() then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return end @@ -62,4 +62,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33725002.lua b/official/c33725002.lua index 3ddb3a84b8..82832167f0 100644 --- a/official/c33725002.lua +++ b/official/c33725002.lua @@ -103,4 +103,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33725271.lua b/official/c33725271.lua index 57e63af539..6d0471dcee 100644 --- a/official/c33725271.lua +++ b/official/c33725271.lua @@ -1,4 +1,5 @@ --ヴォルカニック・チャージ +--Volcanic Recharge local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x32} +s.listed_series={SET_VOLCANIC} function s.filter(c) - return c:IsSetCard(0x32) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_VOLCANIC) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -26,6 +27,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33731070.lua b/official/c33731070.lua index 3464628c1d..442d2dc53d 100644 --- a/official/c33731070.lua +++ b/official/c33731070.lua @@ -1,4 +1,5 @@ --暗黒界の尖兵 ベージ +--Beiige, Vanguard of Dark World local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&0x4040)==0x4040 + return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -23,4 +24,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c33737664.lua b/official/c33737664.lua index 79bbc6aeba..8511f40628 100644 --- a/official/c33737664.lua +++ b/official/c33737664.lua @@ -1,4 +1,5 @@ --墓荒らしの報い +--Graverobber's Retribution local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) @@ -37,4 +38,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d=Duel.GetMatchingGroupCount(s.filter,tp,0,LOCATION_REMOVED,nil)*100 Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33746252.lua b/official/c33746252.lua index 16c351f87a..f7b64bb343 100644 --- a/official/c33746252.lua +++ b/official/c33746252.lua @@ -19,5 +19,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c33750025.lua b/official/c33750025.lua index 304f74fd8f..a5c209144b 100644 --- a/official/c33750025.lua +++ b/official/c33750025.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -44,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Summon(tp,tc,true,nil,1) end end -end +end \ No newline at end of file diff --git a/official/c33750856.lua b/official/c33750856.lua index 44cbc7cf24..33a4203802 100644 --- a/official/c33750856.lua +++ b/official/c33750856.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) e3:SetHintTiming(TIMING_BATTLE_PHASE) e3:SetCountLimit(1) - e3:SetCondition(function() return Duel.GetCurrentPhase()==PHASE_BATTLE_STEP end) + e3:SetCondition(function() return Duel.IsPhase(PHASE_BATTLE_STEP) end) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_CHAINING) e4:SetRange(LOCATION_GRAVE) e4:SetCondition(s.negcon) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.negtg) e4:SetOperation(s.negop) c:RegisterEffect(e4) diff --git a/official/c3376703.lua b/official/c3376703.lua index 015093797c..81331413d4 100644 --- a/official/c3376703.lua +++ b/official/c3376703.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e1:SetCost(s.limeffcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.limeffop) c:RegisterEffect(e1) --Toss a coin and apply the appropriate effect @@ -30,11 +30,6 @@ function s.initial_effect(c) end s.listed_series={SET_ARCANA_FORCE} s.toss_coin=true -function s.limeffcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.limeffop(e,tp,eg,ep,ev,re,r,rp) if Duel.HasFlagEffect(tp,id) then return end Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) diff --git a/official/c33767325.lua b/official/c33767325.lua index ad31ce081e..e7a6dd724f 100644 --- a/official/c33767325.lua +++ b/official/c33767325.lua @@ -1,4 +1,5 @@ --デス・メテオ +--Meteor of Destruction local s,id=GetID() function s.initial_effect(c) --damage @@ -24,4 +25,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33776734.lua b/official/c33776734.lua index b92d1530d3..b9d8ca2bbc 100644 --- a/official/c33776734.lua +++ b/official/c33776734.lua @@ -50,14 +50,14 @@ function s.initial_effect(c) end s.listed_names={id} --not standard, but required for Level Up! s.LVnum=9 -s.LVset=0x10a4 +s.LVset=SET_WINGED_KURIBOH function s.checkop1(e,tp,eg,ep,ev,re,r,rp) - if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) then - re:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() then + re:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.checkop2(e,tp,eg,ep,ev,re,r,rp) - if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) then + if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() then re:GetHandler():ResetFlagEffect(id) end end diff --git a/official/c33776843.lua b/official/c33776843.lua index 513bfb0457..458df22f4c 100644 --- a/official/c33776843.lua +++ b/official/c33776843.lua @@ -1,4 +1,5 @@ --CNo.15 ギミック・パペット-シリアルキラー +--Number C15: Gimmick Puppet Giant Hunter local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,16 +13,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=15 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end @@ -36,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33779875.lua b/official/c33779875.lua index 1c3d84a7f6..1ca927b041 100644 --- a/official/c33779875.lua +++ b/official/c33779875.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetCondition(s.igncon) - e1:SetCost(s.trcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.trtg) e1:SetOperation(s.trop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,10 +40,6 @@ end function s.igncon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsRace,1,nil,RACE_PLANT) end -function s.trcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.trtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsReleasableByEffect() end if chk==0 then return Duel.IsExistingTarget(Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -70,7 +66,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(200*ct) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c33782437.lua b/official/c33782437.lua index 5282afff98..c16311ea23 100644 --- a/official/c33782437.lua +++ b/official/c33782437.lua @@ -25,16 +25,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) e3:SetTargetRange(1,1) Duel.RegisterEffect(e3,tp) -end +end \ No newline at end of file diff --git a/official/c33784505.lua b/official/c33784505.lua index 701394631d..f24f8a49c4 100644 --- a/official/c33784505.lua +++ b/official/c33784505.lua @@ -1,4 +1,5 @@ --壺盗み +--Jar Robber local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c33787730.lua b/official/c33787730.lua index 1975039088..657e55368c 100644 --- a/official/c33787730.lua +++ b/official/c33787730.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.xyztg) e2:SetOperation(s.xyzop) c:RegisterEffect(e2) diff --git a/official/c33814281.lua b/official/c33814281.lua index 60802e1a15..2201435bbe 100644 --- a/official/c33814281.lua +++ b/official/c33814281.lua @@ -43,13 +43,13 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x10af,0xaf} +s.listed_series={SET_DDD,SET_DD} function s.damcfilter(c,tp) local ty=c:GetType() & (TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK) return c:IsSummonPlayer(1-tp) and ty~=0 and Duel.IsExistingMatchingCard(s.damcfilter2,tp,LOCATION_MZONE,0,1,nil,ty) end function s.damcfilter2(c,ty) - return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsType(ty) + return c:IsFaceup() and c:IsSetCard(SET_DDD) and c:IsType(ty) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local tg=eg:Filter(s.damcfilter,nil,tp) @@ -93,7 +93,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetTarget(s.sumlimit) e1:SetLabel(ty) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) @@ -105,15 +105,15 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) end end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0xaf) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_DD) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) diff --git a/official/c3381441.lua b/official/c3381441.lua index b605ba8f19..381a362e52 100644 --- a/official/c3381441.lua +++ b/official/c3381441.lua @@ -1,4 +1,5 @@ --墓守の巫女 +--Gravekeeper's Priestess local s,id=GetID() function s.initial_effect(c) --field @@ -14,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2e)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GRAVEKEEPERS)) e2:SetValue(200) c:RegisterEffect(e2) --Def @@ -23,8 +24,8 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2e)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GRAVEKEEPERS)) e3:SetValue(200) c:RegisterEffect(e3) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} \ No newline at end of file diff --git a/official/c33823832.lua b/official/c33823832.lua index d399380d3b..ff1b4d8d67 100644 --- a/official/c33823832.lua +++ b/official/c33823832.lua @@ -1,4 +1,5 @@ --EMファイア・マフライオ +--Performapal Fire Mufflerlion local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -60,10 +61,10 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) if tc:CanChainAttack() then Duel.ChainAttack() end end -end +end \ No newline at end of file diff --git a/official/c33833230.lua b/official/c33833230.lua index b4a196dfb2..b9f6592f52 100644 --- a/official/c33833230.lua +++ b/official/c33833230.lua @@ -1,4 +1,5 @@ --EMシール・イール +--Performapal Seal Eel local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -42,12 +43,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -65,8 +66,8 @@ function s.lckop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c33837653.lua b/official/c33837653.lua index 640a261ef0..791b3644aa 100644 --- a/official/c33837653.lua +++ b/official/c33837653.lua @@ -1,5 +1,5 @@ --- 天昇星テンマ --- Tenma the Sky Star +--天昇星テンマ +--Tenma the Sky Star local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -87,7 +87,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) c:RegisterEffect(e1) @@ -96,5 +96,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c33854624.lua b/official/c33854624.lua index dab489192c..4720b6bb92 100644 --- a/official/c33854624.lua +++ b/official/c33854624.lua @@ -1,5 +1,5 @@ --深淵の獣マグナムート ---Byssted Magnumut +--Bystial Magnamhut --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -40,12 +40,12 @@ function s.spfilter(c,tp) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.spfilter(chkc,tp) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.spfilter(chkc,tp) end local c=e:GetHandler() - if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) + if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) end @@ -61,7 +61,7 @@ function s.spquickcon(e,tp,eg,ep,ev,re,r,rp) end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -71,19 +71,19 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) return c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) diff --git a/official/c33866130.lua b/official/c33866130.lua index f98c2fba5a..c3eedb9210 100644 --- a/official/c33866130.lua +++ b/official/c33866130.lua @@ -1,4 +1,5 @@ --ナチュル・クリフ +--Naturia Cliff local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NATURIA) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c33875961.lua b/official/c33875961.lua index 7cecad6d6c..2c46d2aa1a 100644 --- a/official/c33875961.lua +++ b/official/c33875961.lua @@ -1,4 +1,5 @@ --ダーク・カタパルター +--Dark Catapulter local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x28) @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.addccon) @@ -27,7 +28,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.addccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefensePos() + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsDefensePos() end function s.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -46,7 +47,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -63,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end local ct=e:GetHandler():GetCounter(0x28) e:GetHandler():RemoveCounter(tp,0x28,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33878367.lua b/official/c33878367.lua index 20b3626238..133664a47b 100644 --- a/official/c33878367.lua +++ b/official/c33878367.lua @@ -1,9 +1,9 @@ --- 壱世壊に渦巻く反響 --- Tearalaments Grief --- Scripted by Hatter +--壱世壊に渦巻く反響 +--Tearlaments Grief +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add 1 "Tearalaments" Trap to the hand + --Add 1 "Tearalaments" Trap to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -27,14 +27,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.spfilter(c,e,tp) - return (c:IsSetCard(0x182) or c:IsCode(CARD_VISAS_STARFROST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_TEARLAMENTS) or c:IsCode(CARD_VISAS_STARFROST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) end function s.tgfilter(c,race,att) @@ -43,7 +43,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if not sc or Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,sc:GetRace(),sc:GetAttribute()) @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x182) and c:IsTrap() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_TEARLAMENTS) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c33883834.lua b/official/c33883834.lua index 199fe5da56..21c6b358f9 100644 --- a/official/c33883834.lua +++ b/official/c33883834.lua @@ -1,6 +1,5 @@ --紫炎の寄子 --Shien's Squire - local s,id=GetID() function s.initial_effect(c) --Your battling "Six Samurai" monster cannot be destroyed by battle @@ -15,18 +14,17 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x3d} - +s.listed_series={SET_SIX_SAMURAI} function s.con(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return d and ((a:GetControler()==tp and a:IsSetCard(0x3d)) or (d:GetControler()==tp and d:IsSetCard(0x3d))) + return d and ((a:IsControler(tp) and a:IsSetCard(SET_SIX_SAMURAI)) or (d:IsControler(tp) and d:IsSetCard(SET_SIX_SAMURAI))) and Duel.GetFlagEffect(tp,id)==0 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end Duel.SendtoGrave(e:GetHandler(),REASON_COST) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.op(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() @@ -39,9 +37,9 @@ function s.op(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) - if a:GetControler()==tp then + if a:IsControler(tp) then a:RegisterEffect(e1) else d:RegisterEffect(e1) diff --git a/official/c33897356.lua b/official/c33897356.lua index 3eded9fa39..96fd9d40fd 100644 --- a/official/c33897356.lua +++ b/official/c33897356.lua @@ -1,7 +1,6 @@ --シューティングコード・トーカー --Shootingcode Talker --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Link summon procedure @@ -12,7 +11,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -24,7 +23,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.drcon) @@ -40,7 +39,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetLinkedGroupCount()>0 end @@ -54,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -62,20 +61,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCondition(s.atkcon) e2:SetValue(-400) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end function s.atkcon(e) local c=e:GetHandler() if Duel.GetAttackTarget()==nil then return end - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==1 + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==1 end function s.bdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:GetFlagEffectLabel(id) then c:SetFlagEffectLabel(id,c:GetFlagEffectLabel(id)+1) else - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,1) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c33900648.lua b/official/c33900648.lua index ece430a81b..d2bf845802 100644 --- a/official/c33900648.lua +++ b/official/c33900648.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,1)) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetRange(LOCATION_FZONE) e5:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and s.PlayerControlsAttributeOrIsAffectedByClearWall(tp,ATTRIBUTE_EARTH) and c:IsHasEffect(id) and not c:HasFlagEffect(id) and (not copying or c:IsFieldID(fid)) end) e5:SetOperation(s.desop) diff --git a/official/c33904024.lua b/official/c33904024.lua index d8689786f4..2b03805c8d 100644 --- a/official/c33904024.lua +++ b/official/c33904024.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCondition(s.drcon) - e3:SetCost(s.drcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.drtg) e3:SetOperation(s.drop) c:RegisterEffect(e3) @@ -36,10 +36,6 @@ end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetCounter(0xd)>=2 end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) @@ -49,4 +45,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33907039.lua b/official/c33907039.lua index de89ef51f0..115d81cd4e 100644 --- a/official/c33907039.lua +++ b/official/c33907039.lua @@ -1,9 +1,9 @@ --- ピリ・レイスの地図 --- Piri Reis Map --- Scripted by Hatter +--ピリ・レイスの地図 +--Piri Reis Map +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search 1 monster with 0 ATK + --Search 1 monster with 0 ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsLocation(LOCATION_HAND) then Duel.SetLP(tp,math.ceil(Duel.GetLP(tp)/2)) local c=e:GetHandler() - -- Check Normal Summon for matching name + --Check Normal Summon for matching name local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.checkop) e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) - -- Cannot activate effects of monsters with the same name + --Cannot activate effects of monsters with the same name local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) diff --git a/official/c33909817.lua b/official/c33909817.lua index 235f7c2b5c..8a16920896 100644 --- a/official/c33909817.lua +++ b/official/c33909817.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c33911264.lua b/official/c33911264.lua index 60ee5f8d8e..ee93eff2fd 100644 --- a/official/c33911264.lua +++ b/official/c33911264.lua @@ -1,4 +1,5 @@ --太陽風帆船 +--Solar Wind Jammer local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,1,id) @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.lvcon) e2:SetOperation(s.lvop) c:RegisterEffect(e2) @@ -43,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) c:RegisterEffect(e2) end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,6 +53,6 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c33918636.lua b/official/c33918636.lua index d4bd9d0879..74f3a49165 100644 --- a/official/c33918636.lua +++ b/official/c33918636.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9a),1,1) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),1,1) --cannot link material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -33,9 +33,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) @@ -45,10 +45,10 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sfilter(c,e,tp,zone) - return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local zone=e:GetHandler():GetLinkedZone(tp) diff --git a/official/c33950246.lua b/official/c33950246.lua index 7eea464093..67ffa29e31 100644 --- a/official/c33950246.lua +++ b/official/c33950246.lua @@ -1,4 +1,5 @@ --王宮の号令 +--Royal Command local s,id=GetID() function s.initial_effect(c) --activate @@ -18,4 +19,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if re:IsActiveType(TYPE_FLIP) then Duel.NegateActivation(ev) end -end +end \ No newline at end of file diff --git a/official/c33951077.lua b/official/c33951077.lua index 91975cd32b..a1f4f407aa 100644 --- a/official/c33951077.lua +++ b/official/c33951077.lua @@ -1,4 +1,5 @@ --スーパー・ウォー・ライオン +--Super War-Lion local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c33970665.lua b/official/c33970665.lua index 312949691d..8de3fd3e29 100644 --- a/official/c33970665.lua +++ b/official/c33970665.lua @@ -1,4 +1,5 @@ --ポンコツの意地 +--Guts of Steel local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.filter(c,e,tp) - return c:IsSetCard(0x24) and c:IsAbleToRemove() + return c:IsSetCard(SET_SCRAP) and c:IsAbleToRemove() and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,69832741) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) elseif op==1 then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) end g:RemoveCard(tc) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33971095.lua b/official/c33971095.lua index 484050bacb..91bee19f9a 100644 --- a/official/c33971095.lua +++ b/official/c33971095.lua @@ -1,5 +1,5 @@ --Vendread Nightmare ---Scripted by Eerie Code +--Vendread Nightmare local s,id=GetID() function s.initial_effect(c) --activate @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.lvcfilter(c) - return c:IsMonster() and c:IsSetCard(0x106) + return c:IsMonster() and c:IsSetCard(SET_VENDREAD) end function s.lvfilter(c,e) return c:IsFaceup() and c:IsLevelAbove(1) and (not e or c:IsCanBeEffectTarget(e)) @@ -57,13 +57,13 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() - return a:IsControler(tp) and (a:IsRitualMonster() and a:IsSetCard(0x106)) and a:GetBattleTarget():IsControler(1-tp) + return a:IsControler(tp) and (a:IsRitualMonster() and a:IsSetCard(SET_VENDREAD)) and a:GetBattleTarget():IsControler(1-tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -73,8 +73,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c33972299.lua b/official/c33972299.lua index 72ded6c3f2..89b90e3937 100644 --- a/official/c33972299.lua +++ b/official/c33972299.lua @@ -24,13 +24,13 @@ function s.initial_effect(c) end s.material={68505803} s.listed_names={68505803} -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.valcon(e) return e:GetHandler():GetFlagEffect(id)~=0 and Duel.IsExistingMatchingCard(s.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) end function s.cfilter(c) - return c:IsLevelBelow(4) and c:IsFaceup() and c:IsSetCard(0x2) + return c:IsLevelBelow(4) and c:IsFaceup() and c:IsSetCard(SET_GENEX) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -38,6 +38,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end -end +end \ No newline at end of file diff --git a/official/c33977496.lua b/official/c33977496.lua index 78625b2854..7cff795d8b 100644 --- a/official/c33977496.lua +++ b/official/c33977496.lua @@ -26,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.Destroy(a,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c33981008.lua b/official/c33981008.lua index 78a6dac13a..026d41ceb3 100644 --- a/official/c33981008.lua +++ b/official/c33981008.lua @@ -1,4 +1,5 @@ --魔導書院ラメイソン +--The Grand Spellbook Tower local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_FZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.drcon) e2:SetTarget(s.drtg) @@ -30,15 +31,15 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cfilter(c) return c:IsRace(RACE_SPELLCASTER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end function s.filter(c) - return c:IsSetCard(0x106e) and c:GetCode()~=id and c:IsSpell() and c:IsAbleToDeck() + return c:IsSetCard(SET_SPELLBOOK) and c:GetCode()~=id and c:IsSpell() and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end @@ -50,7 +51,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.HintSelection(g) - if #g>0 and Duel.SendtoDeck(g,nil,1,REASON_EFFECT)>0 then + if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then Duel.Draw(tp,1,REASON_EFFECT) end end @@ -58,7 +59,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and not e:GetHandler():IsReason(REASON_RULE) and rp==1-tp end function s.ctfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() end function s.spfilter(c,e,tp,lv) return c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -67,16 +68,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_GRAVE,0,nil) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,ct) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp,ct) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_GRAVE,0,nil) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,ct) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,ct) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c340002.lua b/official/c340002.lua index 03e239cc40..30ff005def 100644 --- a/official/c340002.lua +++ b/official/c340002.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -48,4 +48,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34002992.lua b/official/c34002992.lua index 7d37fb6568..864aa25a31 100644 --- a/official/c34002992.lua +++ b/official/c34002992.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) --damage conversion @@ -23,6 +23,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_REVERSE_DAMAGE) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c34004470.lua b/official/c34004470.lua index 2b08bab91a..baedb5feef 100644 --- a/official/c34004470.lua +++ b/official/c34004470.lua @@ -1,11 +1,12 @@ --The big SATURN +--The Big Saturn local s,id=GetID() function s.initial_effect(c) --cannot special summon local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) @@ -33,7 +34,7 @@ end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) Duel.PayLPCost(tp,1000) end function s.atop(e,tp,eg,ep,ev,re,r,rp) @@ -43,13 +44,13 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&0x41)==0x41 and rp~=tp and c:IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and c:IsPreviousControler(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -62,4 +63,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,d,REASON_EFFECT,true) Duel.Damage(tp,d,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c34010534.lua b/official/c34010534.lua index 0c5d2bc55a..bdfd279933 100644 --- a/official/c34010534.lua +++ b/official/c34010534.lua @@ -1,5 +1,5 @@ --サイバネット・オプティマイズ ---Cynet Optimize +--Cynet Optimization --Script by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCondition(s.actcon) c:RegisterEffect(e3) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.filter(c) return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil) end @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -64,7 +64,7 @@ function s.lizfilter(e,c) return not c:IsOriginalRace(RACE_CYBERSE) end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x101) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_CODE_TALKER) and c:IsControler(tp) end function s.actcon(e) local tp=e:GetHandlerPlayer() diff --git a/official/c34022290.lua b/official/c34022290.lua index 062d87387c..3f8a4808aa 100644 --- a/official/c34022290.lua +++ b/official/c34022290.lua @@ -1,4 +1,5 @@ --ガーディアン・エアトス +--Guardian Eatos local s,id=GetID() function s.initial_effect(c) --special summon @@ -39,10 +40,10 @@ function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,3,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,3,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -54,7 +55,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34026662.lua b/official/c34026662.lua index e6a82e1a22..be2c2b86b5 100644 --- a/official/c34026662.lua +++ b/official/c34026662.lua @@ -1,6 +1,5 @@ --進化の奇跡 --Evo-Miracle - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot be destroyed by battle or card effect @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.filter(c) @@ -32,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c34029630.lua b/official/c34029630.lua index 5912f2400a..67f95fecfa 100644 --- a/official/c34029630.lua +++ b/official/c34029630.lua @@ -45,7 +45,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) c:RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) else e:SetProperty(0) end @@ -60,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) return c:IsFaceup() and c:IsCanAddCounter(COUNTER_SPELL,1) @@ -74,4 +74,4 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.descon(e) return e:GetHandler():GetCounter(COUNTER_SPELL)==0 -end +end \ No newline at end of file diff --git a/official/c34031284.lua b/official/c34031284.lua index 7356b5210a..b364525a43 100644 --- a/official/c34031284.lua +++ b/official/c34031284.lua @@ -40,10 +40,10 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xf} +s.listed_series={SET_OJAMA} s.listed_names={90011152} function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0xf,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_OJAMA,lc,sumtype,tp) end function s.ffilter(c) return c:IsFaceup() and c:IsCode(90011152) @@ -55,7 +55,7 @@ function s.refcon(e) return Duel.GetAttackTarget()==e:GetHandler() end function s.filter(c,e,tp) - return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsLinkMonster() + return c:IsSetCard(SET_OJAMA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsLinkMonster() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -77,17 +77,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) - local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) + Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA) diff --git a/official/c34034150.lua b/official/c34034150.lua index c1c490626e..388bd5021a 100644 --- a/official/c34034150.lua +++ b/official/c34034150.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c3405259.lua b/official/c3405259.lua index 4706747255..1a17737ae2 100644 --- a/official/c3405259.lua +++ b/official/c3405259.lua @@ -1,4 +1,5 @@ --C-クラッシュ・ワイバーン +--C-Crush Wyvern local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,s.unfilter) @@ -24,7 +25,7 @@ function s.unfilter(c) end function s.efilter(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner() - and te:IsActiveType(TYPE_TRAP) + and te:IsTrapEffect() end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) diff --git a/official/c34072799.lua b/official/c34072799.lua index 6d866c2a72..3ffe7526bf 100644 --- a/official/c34072799.lua +++ b/official/c34072799.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_RELEASE) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e3:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) end) + e3:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3) @@ -113,21 +113,21 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end diff --git a/official/c34079868.lua b/official/c34079868.lua index 22adcad8c7..ddcefde876 100644 --- a/official/c34079868.lua +++ b/official/c34079868.lua @@ -44,19 +44,19 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xc7,0xda} +s.listed_series={SET_DRACOSLAYER,SET_DRACOVERLORD} function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg) end function s.chk(c,sg) - return c:IsSetCard(0xc7) and sg:IsExists(Card.IsSetCard,1,c,0xda) + return c:IsSetCard(SET_DRACOSLAYER) and sg:IsExists(Card.IsSetCard,1,c,SET_DRACOVERLORD) end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local rg=Duel.GetReleaseGroup(tp) - local g1=rg:Filter(Card.IsSetCard,nil,0xc7) - local g2=rg:Filter(Card.IsSetCard,nil,0xda) + local g1=rg:Filter(Card.IsSetCard,nil,SET_DRACOSLAYER) + local g2=rg:Filter(Card.IsSetCard,nil,SET_DRACOVERLORD) local g=g1:Clone() g:Merge(g2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #g1>0 and #g2>0 and #g>1 @@ -64,8 +64,8 @@ function s.spcon(e,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local rg=Duel.GetReleaseGroup(tp) - local g1=rg:Filter(Card.IsSetCard,nil,0xc7) - local g2=rg:Filter(Card.IsSetCard,nil,0xda) + local g1=rg:Filter(Card.IsSetCard,nil,SET_DRACOSLAYER) + local g2=rg:Filter(Card.IsSetCard,nil,SET_DRACOVERLORD) g1:Merge(g2) local sg=aux.SelectUnselectGroup(g1,e,tp,2,2,s.rescon,1,tp,HINTMSG_RELEASE,nil,nil,true) if #sg>0 then @@ -103,11 +103,11 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xc7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRACOSLAYER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xda) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRACOVERLORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 @@ -126,4 +126,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g1==2 then Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34086406.lua b/official/c34086406.lua index 981f44e135..e9523db3d3 100644 --- a/official/c34086406.lua +++ b/official/c34086406.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c34088136.lua b/official/c34088136.lua index ddf8d86bea..baca3a547d 100644 --- a/official/c34088136.lua +++ b/official/c34088136.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -38,35 +38,31 @@ function s.initial_effect(c) end s.listed_names={34830502} s.LVnum=3 -s.LVset=0x5d +s.LVset=SET_ULTIMATE_INSECT function s.con(e) return e:GetHandler():GetFlagEffect(id)~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id+1,(RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET))+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,(RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET))|RESET_PHASE|PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id+1)==0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(34830502) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:RegisterFlagEffect(34830502,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE),0,0) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c34093683.lua b/official/c34093683.lua index 0ac27c90d9..312fa06bb0 100644 --- a/official/c34093683.lua +++ b/official/c34093683.lua @@ -35,10 +35,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsRitualSummoned() end function s.tgtg(e,c) return c~=e:GetHandler() @@ -46,10 +46,10 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsRitualSummoned() end function s.thfilter(c) - return c:IsSetCard(0x106) and c:IsAbleToHand() + return c:IsSetCard(SET_VENDREAD) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c34103656.lua b/official/c34103656.lua index c49b937664..bf66b2fc2d 100644 --- a/official/c34103656.lua +++ b/official/c34103656.lua @@ -51,7 +51,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.efftg) e1:SetValue(lv) e1:SetLabel(fid) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.efftg(e,c) diff --git a/official/c3410461.lua b/official/c3410461.lua index 2c8aed8c18..8bb33e90b7 100644 --- a/official/c3410461.lua +++ b/official/c3410461.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_TO_GRAVE) e2:SetOperation(s.regop) - c:RegisterEffect(e2) + c:RegisterEffect(e2) end s.listed_names={CARD_ALBAZ} -s.listed_series={0x46} +s.listed_series={SET_FUSION} function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end @@ -40,7 +40,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) end function s.contactop(g) - Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -48,7 +48,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(c:GetMaterialCount()-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.regop(e,tp,eg,ep,ev,re,r,rp) @@ -63,11 +63,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.thfilter(c) - return c:GetType()==TYPE_SPELL and c:IsSetCard(0x46) and c:IsAbleToHand() + return c:IsNormalSpell() and c:IsSetCard(SET_FUSION) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c34109611.lua b/official/c34109611.lua index 891937bfd7..5772e9c27f 100644 --- a/official/c34109611.lua +++ b/official/c34109611.lua @@ -1,8 +1,9 @@ --ダイガスタ・ファルコス +--Daigusto Falcos local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x10),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_GUSTO),1,99) c:EnableReviveLimit() --atkup local e1=Effect.CreateEffect(c) @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x10) + return c:IsFaceup() and c:IsSetCard(SET_GUSTO) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -29,8 +30,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(600) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34116027.lua b/official/c34116027.lua index 4558014bd9..0477cdd08f 100644 --- a/official/c34116027.lua +++ b/official/c34116027.lua @@ -1,4 +1,5 @@ --ドラグニティナイト-ガジャルグ +--Dragunity Knight - Gae Dearg local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON+RACE_WINGEDBEAST) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON|RACE_WINGEDBEAST) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -31,5 +32,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,Card.IsRace,1,1,REASON_EFFECT+REASON_DISCARD,nil,RACE_DRAGON+RACE_WINGEDBEAST) -end + Duel.DiscardHand(tp,Card.IsRace,1,1,REASON_EFFECT|REASON_DISCARD,nil,RACE_DRAGON|RACE_WINGEDBEAST) +end \ No newline at end of file diff --git a/official/c34124316.lua b/official/c34124316.lua index 15a8bdb910..78c482cd74 100644 --- a/official/c34124316.lua +++ b/official/c34124316.lua @@ -43,7 +43,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetTurnPlayer() local summonable1,nonsummonable1=Duel.GetDecktopGroup(p,5):Split(s.spchk,nil,e,p) local summonable2,nonsummonable2=Duel.GetDecktopGroup(1-p,5):Split(s.spchk,nil,e,1-p) - local ft1=Duel.GetLocationCount(p,LOCATION_MZONE) if ft1>1 and Duel.IsPlayerAffectedByEffect(p,CARD_BLUEEYES_SPIRIT) and #summonable1>1 then nonsummonable1:Merge(summonable1) @@ -54,14 +53,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) nonsummonable2:Merge(summonable2) summonable2:Clear() end - local tohand,tograve=nonsummonable1:Merge(nonsummonable2):Split(Card.IsAbleToHand,nil) - Duel.DisableShuffleCheck() - Duel.ConfirmDecktop(p,5) summon(summonable1,e,p,tograve,ft1) - Duel.ConfirmDecktop(1-p,5) summon(summonable2,e,1-p,tograve,ft2) Duel.SpecialSummonComplete() @@ -75,4 +70,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end local fg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.ShuffleSetCard(fg) -end +end \ No newline at end of file diff --git a/official/c34130561.lua b/official/c34130561.lua index 9573283ec8..de7a348506 100644 --- a/official/c34130561.lua +++ b/official/c34130561.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} function s.ntcon(e,c,minc) if c==nil then return true end local tp=c:GetControler() @@ -36,14 +36,14 @@ function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:GetLevel()==5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c34137269.lua b/official/c34137269.lua index 453ac35152..811b19512e 100644 --- a/official/c34137269.lua +++ b/official/c34137269.lua @@ -1,5 +1,5 @@ --時械神 ハイロン ---Hairon, the Timelord +--Hailon, the Timelord --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -39,7 +39,7 @@ function s.initial_effect(c) e6:SetCategory(CATEGORY_DAMAGE) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.damcon) @@ -51,7 +51,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetProperty(EFFECT_FLAG_REPEAT) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) @@ -81,7 +81,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -90,7 +90,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAbleToDeck() then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c34143852.lua b/official/c34143852.lua index e8c71055ea..17f41cbf24 100644 --- a/official/c34143852.lua +++ b/official/c34143852.lua @@ -1,4 +1,5 @@ --H・C エクストラ・ソード +--Heroic Challenger - Extra Sword local s,id=GetID() function s.initial_effect(c) --effect gain @@ -22,19 +23,19 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34149830.lua b/official/c34149830.lua index bd5528e14a..dae623538b 100644 --- a/official/c34149830.lua +++ b/official/c34149830.lua @@ -1,4 +1,5 @@ --死力のタッグ・チェンジ +--Desperate Tag local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -60,14 +61,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetTargetRange(1,0) e1:SetValue(1) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) e2:SetOperation(s.spop) Duel.RegisterEffect(e2,tp) end @@ -78,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34160055.lua b/official/c34160055.lua index 1a2b860613..29a4996595 100644 --- a/official/c34160055.lua +++ b/official/c34160055.lua @@ -1,4 +1,5 @@ --龍炎剣の使い手 +--Master of the Flaming Dragonswords local s,id=GetID() function s.initial_effect(c) --atkup @@ -26,15 +27,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if c:IsFaceup() and c:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(300) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c34172284.lua b/official/c34172284.lua index 4f637991f4..fbac4b21a9 100644 --- a/official/c34172284.lua +++ b/official/c34172284.lua @@ -1,5 +1,5 @@ --溟界王-アロン ---Aron, King of the Abhyss +--Aron, the Ogdoadic King --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCondition(s.thcon) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) - c:RegisterEffect(e3) + c:RegisterEffect(e3) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,2,false,aux.ReleaseCheckMMZ,nil) end @@ -80,14 +80,14 @@ function s.thfilter(c) return c:IsRace(RACE_REPTILE) and (c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c34187685.lua b/official/c34187685.lua index 9f9e88545a..4475d13bdb 100644 --- a/official/c34187685.lua +++ b/official/c34187685.lua @@ -1,4 +1,5 @@ --ダブルアタック +--Double Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local cg=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_HAND,0,1,1,nil,tp) - Duel.SendtoGrave(cg,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(cg,REASON_DISCARD|REASON_COST) local lv=cg:GetFirst():GetLevel() e:SetLabel(lv) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -50,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34193084.lua b/official/c34193084.lua index 0fdb75d76e..23d854ce2e 100644 --- a/official/c34193084.lua +++ b/official/c34193084.lua @@ -1,4 +1,5 @@ --闇よりの恐怖 +--Fear from the Dark local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) and (r&REASON_EFFECT)~=0 and rp~=tp + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) and (r&REASON_EFFECT)~=0 and rp~=tp end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -23,4 +24,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34198387.lua b/official/c34198387.lua index b60524ccd2..a046cb92b1 100644 --- a/official/c34198387.lua +++ b/official/c34198387.lua @@ -1,9 +1,9 @@ --- ニャータリング --- Meutering --- Scripted by Hatter +--ニャータリング +--Meowseclick +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate Field Spell effects + --Negate Field Spell effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DISABLE) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetTargetRange(LOCATION_FZONE,LOCATION_FZONE) e1:SetTarget(function(_,c)return c:IsControler(1-Duel.GetTurnPlayer())end) c:RegisterEffect(e1) - -- Special Summon self + --Special Summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -38,16 +38,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,2,nil) then Duel.BreakEffect() - -- Cannot be destroyed by battle + --Cannot be destroyed by battle local e1=Effect.CreateEffect(c) e1:SetDescription(3008) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - -- Cannot be destroyed by card effects + --Cannot be destroyed by card effects local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e2) diff --git a/official/c34206604.lua b/official/c34206604.lua index 00302c099a..602795c088 100644 --- a/official/c34206604.lua +++ b/official/c34206604.lua @@ -1,6 +1,5 @@ --魔導サイエンティスト --Magical Scientist - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 6 or lower fusion monster from extra deck @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -17,10 +16,6 @@ end function s.filter(c,e,tp) return c:IsType(TYPE_FUSION) and c:GetLevel()<=6 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) @@ -36,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) --Return it to extra deck during end phase local e2=Effect.CreateEffect(e:GetHandler()) @@ -44,11 +39,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetOperation(s.retop) tc:RegisterEffect(e2) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c3422200.lua b/official/c3422200.lua index 0d7f7f50f8..67e6e93bc2 100644 --- a/official/c3422200.lua +++ b/official/c3422200.lua @@ -1,4 +1,5 @@ --水晶機巧-サルファフナー +--Crystron Sulfefnir local s,id=GetID() function s.initial_effect(c) --special summon (hand/grave) @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -25,14 +26,14 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0xea) and not c:IsCode(id) and c:IsDiscardable() + return c:IsSetCard(SET_CRYSTRON) and not c:IsCode(id) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -59,7 +60,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xea) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_CRYSTRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -73,4 +74,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c34230233.lua b/official/c34230233.lua index 6e27df14f4..f56b9b21bf 100644 --- a/official/c34230233.lua +++ b/official/c34230233.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} s.listed_names={id} function s.spfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x6) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_DARK_WORLD) and not c:IsCode(id) and c:IsAbleToHandAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.descon(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&0x4040==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end @@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) else Duel.ShuffleHand(1-tp) end end end -end +end \ No newline at end of file diff --git a/official/c34236961.lua b/official/c34236961.lua index 8498f964bd..6b7388f63b 100644 --- a/official/c34236961.lua +++ b/official/c34236961.lua @@ -1,4 +1,5 @@ --アンティ勝負 +--Ante local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g1,REASON_EFFECT) Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c34242278.lua b/official/c34242278.lua index 83fa58de06..a926150eff 100644 --- a/official/c34242278.lua +++ b/official/c34242278.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -33,9 +33,9 @@ function s.filter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -62,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c34244455.lua b/official/c34244455.lua index fa74c88b59..f0960039bb 100644 --- a/official/c34244455.lua +++ b/official/c34244455.lua @@ -1,5 +1,5 @@ --星向鳥 ---Which Starling +--Star Staring Starling --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -18,4 +18,4 @@ function s.lvcon(e,tp,eg,ep,ev,re,r,rp) end function s.lvval(e,tp,eg,ep,ev,re,r,rp) return s.levels[e:GetHandler():GetSequence()+1] -end +end \ No newline at end of file diff --git a/official/c34250214.lua b/official/c34250214.lua index cd698a93f1..30c9e42ef0 100644 --- a/official/c34250214.lua +++ b/official/c34250214.lua @@ -1,6 +1,5 @@ --ヴァンパイアの使い魔 --Vampire Familiar - local s,id=GetID() function s.initial_effect(c) --If special summoned, add 1 "Vampire" monster from deck @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -27,15 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} s.listed_names={id} - -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.thfilter(c) - return c:IsSetCard(0x8e) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_VAMPIRE) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -50,12 +44,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c,tp) - return c:IsSetCard(0x8e) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 + return c:IsSetCard(SET_VAMPIRE) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -71,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c34251483.lua b/official/c34251483.lua index af5be78df3..060390a565 100644 --- a/official/c34251483.lua +++ b/official/c34251483.lua @@ -1,4 +1,5 @@ --ゴブリン切り込み部隊 +--Goblin Marauding Squad local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -9,7 +10,7 @@ function s.initial_effect(c) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -41,6 +42,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c34257001.lua b/official/c34257001.lua index 9883b6ea4c..4b68b2f7c8 100644 --- a/official/c34257001.lua +++ b/official/c34257001.lua @@ -1,4 +1,5 @@ --ダッシュ・ウォリアー +--Dash Warrior local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,4 +13,4 @@ function s.condtion(e) local ph=Duel.GetCurrentPhase() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c34267821.lua b/official/c34267821.lua index 66baf38257..9be1af4957 100644 --- a/official/c34267821.lua +++ b/official/c34267821.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) e3:SetCondition(s.rmcon) e3:SetCost(s.rmcost) e3:SetOperation(s.rmop) @@ -32,7 +32,7 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) - and c:IsReason(REASON_DESTROY) and Duel.GetTurnPlayer()==1-tp + and c:IsReason(REASON_DESTROY) and Duel.IsTurnPlayer(1-tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() and Duel.GetFlagEffect(0,id)==0 end @@ -57,7 +57,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,1) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --30459350 chk local e2=Effect.CreateEffect(e:GetHandler()) @@ -65,8 +65,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(30459350) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,1,aux.Stringid(id,2),nil) - Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c3428069.lua b/official/c3428069.lua index f8536e3a44..29929eac7d 100644 --- a/official/c3428069.lua +++ b/official/c3428069.lua @@ -7,8 +7,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) - e1:SetValue(78193831) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) + e1:SetValue(CARD_BUSTER_BLADER) c:RegisterEffect(e1) --Equip local e2=Effect.CreateEffect(c) @@ -34,9 +34,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end +s.listed_names={CARD_BUSTER_BLADER} function s.filter(c,e,tp) return c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(1-tp) - and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsCanBeEffectTarget(e) and not c:IsForbidden() + and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) and c:IsCanBeEffectTarget(e) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return eg:IsContains(chkc) and s.filter(chkc,e,tp) end diff --git a/official/c3429238.lua b/official/c3429238.lua index 4a1c9b7091..4e8d774fe2 100644 --- a/official/c3429238.lua +++ b/official/c3429238.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -39,12 +39,12 @@ function s.initial_effect(c) end s.material={56286179} s.listed_names={56286179} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,56286179) or c:IsHasEffect(20932152) end function s.datcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.dattg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -57,12 +57,12 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end @@ -76,14 +76,14 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) if c:IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end @@ -105,4 +105,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c34293667.lua b/official/c34293667.lua index 04e43d7415..75dce67b94 100644 --- a/official/c34293667.lua +++ b/official/c34293667.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -90,4 +90,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c34294855.lua b/official/c34294855.lua index 4c81cd20ae..173f165507 100644 --- a/official/c34294855.lua +++ b/official/c34294855.lua @@ -14,10 +14,10 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -36,15 +36,11 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false) end @@ -68,7 +64,7 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34302287.lua b/official/c34302287.lua index bfc25f8aa0..1fd9602dd1 100644 --- a/official/c34302287.lua +++ b/official/c34302287.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.eqtg) e3:SetOperation(s.eqop) c:RegisterEffect(e3) diff --git a/official/c3431737.lua b/official/c3431737.lua index 08d5456549..f2fd11e29f 100644 --- a/official/c3431737.lua +++ b/official/c3431737.lua @@ -1,4 +1,5 @@ --バスター・ビースト +--Assault Beast local s,id=GetID() function s.initial_effect(c) --search @@ -7,17 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={CARD_ASSAULT_MODE} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(CARD_ASSAULT_MODE) and c:IsAbleToHand() end @@ -31,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c34318086.lua b/official/c34318086.lua index 7972476614..ad76ea0559 100644 --- a/official/c34318086.lua +++ b/official/c34318086.lua @@ -1,4 +1,5 @@ --レモン・マジシャン・ガール +--Lemon Magician Girl local s,id=GetID() function s.initial_effect(c) --search @@ -24,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x20a2} +s.listed_series={SET_MAGICIAN_GIRL} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0x20a2) and not c:IsCode(id) + return c:IsSetCard(SET_MAGICIAN_GIRL) and not c:IsCode(id) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end @@ -67,12 +68,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local at=Duel.GetAttacker() if at and not at:IsImmuneToEffect(e) and Duel.ChangeAttackTarget(tc) then @@ -80,10 +81,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(math.ceil(at:GetAttack()/2)) at:RegisterEffect(e3) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c34325937.lua b/official/c34325937.lua index 0ff56a2a86..8617b6f9e1 100644 --- a/official/c34325937.lua +++ b/official/c34325937.lua @@ -1,11 +1,10 @@ --方界合神 --Unification of the Cubic Lords - local s,id=GetID() function s.initial_effect(c) --Fusion 1 "Cubic" fusion monster --Use monsters from hand or field as fusion materials - c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0xe3))) + c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_CUBIC))) --Special summon 1 level 4 or lower "Cubic" monster from hand or deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -15,32 +14,31 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xe3} - +s.listed_series={SET_CUBIC} function s.cfilter(c) - return c:IsPreviousSetCard(0xe3) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsPreviousSetCard(SET_CUBIC) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe3) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_CUBIC) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)~=0 then --Cannot be destroyed by battle or card effect local e1=Effect.CreateEffect(e:GetHandler()) @@ -49,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) g:GetFirst():RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c34334692.lua b/official/c34334692.lua index 98a1c60068..b09b06f361 100644 --- a/official/c34334692.lua +++ b/official/c34334692.lua @@ -4,4 +4,4 @@ local s,id=GetID() function s.initial_effect(c) --ritual level Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK)) -end +end \ No newline at end of file diff --git a/official/c34351849.lua b/official/c34351849.lua index ffad19687c..3cfc5467fb 100644 --- a/official/c34351849.lua +++ b/official/c34351849.lua @@ -1,4 +1,5 @@ --フロッグ・バリア +--Froggy Forcefield local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d and d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(0x12) + return d and d:IsFaceup() and d:IsControler(tp) and d:IsSetCard(SET_FROG) end function s.filter(c) return c:IsAttackPos() @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34365442.lua b/official/c34365442.lua index 2a176fa57d..081848db68 100644 --- a/official/c34365442.lua +++ b/official/c34365442.lua @@ -1,5 +1,5 @@ --Evil★Twin イージーゲーム ---Evil★Twin Easy Game +--Evil★Twin GG EZ --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -37,13 +37,13 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x153,0x154} +s.listed_series={SET_KI_SIKIL,SET_LIL_LA} function s.cfilter(c,tp) - return (c:IsSetCard(0x153) or c:IsSetCard(0x154)) and c:GetBaseAttack()>0 + return (c:IsSetCard(SET_KI_SIKIL) or c:IsSetCard(SET_LIL_LA)) and c:GetBaseAttack()>0 and Duel.IsExistingTarget(s.atktgfilter,tp,LOCATION_MZONE,0,1,c) end function s.atktgfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x153) or c:IsSetCard(0x154)) + return c:IsFaceup() and (c:IsSetCard(SET_KI_SIKIL) or c:IsSetCard(SET_LIL_LA)) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(1) @@ -70,7 +70,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -82,7 +82,7 @@ function s.negcond(e,tp,eg,ep,ev,re,r,rp) return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-#tg>0 end function s.cfilter2(c,tp) - return (c:IsSetCard(0x153) or c:IsSetCard(0x154)) and c:IsMonster() + return (c:IsSetCard(SET_KI_SIKIL) or c:IsSetCard(SET_LIL_LA)) and c:IsMonster() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter2,1,false,nil,nil) end @@ -96,4 +96,4 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c34370473.lua b/official/c34370473.lua index b1e3993ee0..51c8519d7c 100644 --- a/official/c34370473.lua +++ b/official/c34370473.lua @@ -1,4 +1,5 @@ --グリフォンの羽根帚 +--Gryphon's Feather Duster local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Recover(tp,ct*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34379489.lua b/official/c34379489.lua index d03b5c11f6..eb541b017f 100644 --- a/official/c34379489.lua +++ b/official/c34379489.lua @@ -1,4 +1,5 @@ --EMバブルドッグ +--Performapal Bubblebowwow local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -23,7 +24,7 @@ end function s.filter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and not c:IsType(TYPE_PENDULUM) and c:IsSummonLocation(LOCATION_EXTRA) - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -35,7 +36,7 @@ function s.repval(e,c) return s.filter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA) @@ -46,10 +47,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.indtg) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) end function s.indtg(e,c) return c:IsType(TYPE_PENDULUM) and c:IsSummonLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c34408491.lua b/official/c34408491.lua index 0f0748e860..3bc6ddee1b 100644 --- a/official/c34408491.lua +++ b/official/c34408491.lua @@ -1,4 +1,5 @@ --魔王龍 ベエルゼ +--Beelze of the Diabolic Dragons local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -37,7 +38,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34419588.lua b/official/c34419588.lua index 96e537da63..31c4d23559 100644 --- a/official/c34419588.lua +++ b/official/c34419588.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,13 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={44632120,71036835,7021574,CARD_KURIBOH,16404809} -s.listed_series={0xa4} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_KURIBOH} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xa4) + return c:IsFaceup() and c:IsSetCard(SET_KURIBOH) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -48,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1500) tc:RegisterEffect(e1) end @@ -74,12 +70,12 @@ function s.sumfilter(c) return c:IsRace(RACE_FIEND) and c:IsSummonable(true,nil) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,tc) local g=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND,0,nil) @@ -90,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Summon(tp,sg,true,nil) end end -end +end \ No newline at end of file diff --git a/official/c34449261.lua b/official/c34449261.lua index c3f583f972..95de99beea 100644 --- a/official/c34449261.lua +++ b/official/c34449261.lua @@ -24,7 +24,7 @@ function s.filter2(c,tp,tc) and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tg) end function s.desfilter(c,tg) - return not tg:IsContains(c) and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return not tg:IsContains(c) and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c34456146.lua b/official/c34456146.lua index e7a9704875..a593694f8e 100644 --- a/official/c34456146.lua +++ b/official/c34456146.lua @@ -44,7 +44,7 @@ function s.spcfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -106,4 +106,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34460239.lua b/official/c34460239.lua index 0725124540..f46f47703a 100644 --- a/official/c34460239.lua +++ b/official/c34460239.lua @@ -1,4 +1,5 @@ --ジェネレーション・チェンジ +--Generation Shift local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,hc) end end -end +end \ No newline at end of file diff --git a/official/c34471458.lua b/official/c34471458.lua index 405bc63c8d..91a29b0946 100644 --- a/official/c34471458.lua +++ b/official/c34471458.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -35,12 +35,12 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.value(e,c) return c:GetLevel()*200 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -49,7 +49,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -58,7 +58,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousPosition(POS_FACEUP) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FORTUNE_LADY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c34472920.lua b/official/c34472920.lua index fc1c1744c6..b09cdc971b 100644 --- a/official/c34472920.lua +++ b/official/c34472920.lua @@ -1,4 +1,5 @@ --ハニーボット +--Honeybot local s,id=GetID() function s.initial_effect(c) --link summon diff --git a/official/c34475451.lua b/official/c34475451.lua index f8b5338b98..00d789bf56 100644 --- a/official/c34475451.lua +++ b/official/c34475451.lua @@ -1,4 +1,5 @@ --工作列車シグナル・レッド +--Construction Train Signal Red local s,id=GetID() function s.initial_effect(c) --spsummon @@ -32,9 +33,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) Duel.CalculateDamage(a,c) end end -end +end \ No newline at end of file diff --git a/official/c34479658.lua b/official/c34479658.lua index 596365af16..732f045793 100644 --- a/official/c34479658.lua +++ b/official/c34479658.lua @@ -47,7 +47,7 @@ function s.valcheck(e,c) e:GetLabelObject():SetLabel(ct) end function s.spcond(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetLabel()>0 @@ -67,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_TRIBUTE) and (c:IsReason(REASON_BATTLE) or rp==1-tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsTributeSummoned() and (c:IsReason(REASON_BATTLE) or rp==1-tp) end function s.thfilter(c) return c:IsRace(RACE_REPTILE) and c:IsAbleToHand() and not c:IsCode(id) @@ -83,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c34481518.lua b/official/c34481518.lua index 7d18f54f04..937e1cc347 100644 --- a/official/c34481518.lua +++ b/official/c34481518.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.damcon) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c34487429.lua b/official/c34487429.lua index 6d06a0134a..5f9426b5ac 100644 --- a/official/c34487429.lua +++ b/official/c34487429.lua @@ -62,27 +62,27 @@ function s.initial_effect(c) c:RegisterEffect(e6) aux.DoubleSnareValidity(c,LOCATION_SZONE) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.desrepcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),e:GetHandler():GetControler(),LOCATION_SZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),e:GetHandler():GetControler(),LOCATION_SZONE,0,1,nil) end function s.rdcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp and e:GetHandler():GetFlagEffect(id)==0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,2,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,2,nil) end function s.rdop(e,tp,eg,ep,ev,re,r,rp) if Duel.SelectEffectYesNo(tp,e:GetHandler()) then Duel.Hint(HINT_CARD,1-tp,id) Duel.ChangeBattleDamage(tp,math.floor(ev/2)) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_SZONE,0,3,nil,0x1034) + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_SZONE,0,3,nil,SET_CRYSTAL_BEAST) end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToGraveAsCost() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil) end @@ -98,13 +98,13 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,3,nil) then return end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,3,nil) then return end if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,4,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,4,nil) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -113,15 +113,15 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,4,nil) then return end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,4,nil) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard, 0x1034),tp,LOCATION_SZONE,0,5,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard, SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,5,nil) end function s.filter3(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.filter3(chkc,e,tp) end @@ -132,9 +132,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,5,nil) then return end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,5,nil) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34492631.lua b/official/c34492631.lua index 21c6c15bd7..650472f1fe 100644 --- a/official/c34492631.lua +++ b/official/c34492631.lua @@ -1,4 +1,5 @@ --ジャンク・ジャイアント +--Junk Giant local s,id=GetID() function s.initial_effect(c) --special summon @@ -40,7 +41,7 @@ function s.effop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetOperation(s.sumop) rc:RegisterEffect(e1) end @@ -57,6 +58,6 @@ function s.effop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c34496660.lua b/official/c34496660.lua index d6ae499740..ddb3068bdd 100644 --- a/official/c34496660.lua +++ b/official/c34496660.lua @@ -1,4 +1,5 @@ --超重武者ダイ-8 +--Superheavy Samurai Wagon local s,id=GetID() function s.initial_effect(c) --position @@ -31,7 +32,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x109a} +s.listed_series={SET_SUPERHEAVY_SAMURAI_SOUL} function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) @@ -44,10 +45,10 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.thfilter(c) - return c:IsSetCard(0x109a) and c:IsAbleToHand() + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI_SOUL) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c34507039.lua b/official/c34507039.lua index e7e41b8524..df483c358e 100644 --- a/official/c34507039.lua +++ b/official/c34507039.lua @@ -1,4 +1,5 @@ --ギャクタン +--Wiretap local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -25,6 +26,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ec=re:GetHandler() if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then ec:CancelToGrave() - Duel.SendtoDeck(ec,nil,2,REASON_EFFECT) + Duel.SendtoDeck(ec,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34522216.lua b/official/c34522216.lua index cc4f9177ca..bc968cc7db 100644 --- a/official/c34522216.lua +++ b/official/c34522216.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.descon) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -43,19 +43,19 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.limcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.limval(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xe0) + return re:IsMonsterEffect() and not rc:IsSetCard(SET_AMORPHAGE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,9 +68,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) - and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id)~=0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) + and (e:GetHandler():IsPendulumSummoned() or e:GetHandler():GetFlagEffect(id)~=0) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) + return not c:IsOriginalSetCard(SET_AMORPHAGE) end \ No newline at end of file diff --git a/official/c34536828.lua b/official/c34536828.lua index 76685a0641..b68e3d29c8 100644 --- a/official/c34536828.lua +++ b/official/c34536828.lua @@ -36,12 +36,12 @@ function s.filter(c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) and (rc:IsAttack(0) or rc:IsDefense(0)) end function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)==0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end @@ -69,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34541863.lua b/official/c34541863.lua index 6ad7a12d46..848ad9b458 100644 --- a/official/c34541863.lua +++ b/official/c34541863.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetCondition(s.condition) @@ -22,7 +22,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_A} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then tc:AddCounter(COUNTER_A,1) end -end +end \ No newline at end of file diff --git a/official/c34545235.lua b/official/c34545235.lua index 34983381ef..7312f07884 100644 --- a/official/c34545235.lua +++ b/official/c34545235.lua @@ -1,4 +1,5 @@ --鋼核の輝き +--Iron Core Luster local s,id=GetID() function s.initial_effect(c) --negate @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34550857.lua b/official/c34550857.lua index 2e2be5d01e..57796d709b 100644 --- a/official/c34550857.lua +++ b/official/c34550857.lua @@ -1,6 +1,5 @@ --LL-コバルト・スパロー --Lyrilusc - Cobalt Sparrow - local s,id=GetID() function s.initial_effect(c) --If special summon, add 1 level 1 winged beast monster from deck @@ -53,14 +52,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end \ No newline at end of file diff --git a/official/c34559295.lua b/official/c34559295.lua index fb351a0b91..b2764af314 100644 --- a/official/c34559295.lua +++ b/official/c34559295.lua @@ -1,5 +1,5 @@ --Iron Draw ---scripted by unknow guest +--Iron Draw local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.limittg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabel(spc) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -55,5 +55,4 @@ end function s.countval(e,re,tp) local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON) if sp-e:GetLabel()>=1 then return 0 else return 1-sp+e:GetLabel() end -end - +end \ No newline at end of file diff --git a/official/c34566435.lua b/official/c34566435.lua index c4db808cab..b65f2dd5fc 100644 --- a/official/c34566435.lua +++ b/official/c34566435.lua @@ -14,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} function s.filter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_FUSION) and c:IsSetCard(0xad) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_FUSION) and c:IsSetCard(SET_FRIGHTFUR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -32,11 +32,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(tc:GetBaseDefense()) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c34572613.lua b/official/c34572613.lua index 2f8aecc178..e6a02c254f 100644 --- a/official/c34572613.lua +++ b/official/c34572613.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x159)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MYUTANT)) e2:SetValue(s.atkval) c:RegisterEffect(e2) --Place 1 card from hand to deck, draw 1 @@ -30,15 +30,15 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x159} +s.listed_series={SET_MYUTANT} function s.spfilter(c,e,tp) - return c:IsSetCard(0x159) and c:GetLevel()<5 and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + return c:IsSetCard(SET_MYUTANT) and c:GetLevel()<5 and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_REMOVED,0,nil,e,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) @@ -46,14 +46,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x159) + return c:IsFaceup() and c:IsSetCard(SET_MYUTANT) end function s.atkval(e,c) local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_REMOVED,0,nil) return g:GetClassCount(Card.GetCode)*100 end function s.drfilter(c) - return c:IsSetCard(0x159) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_MYUTANT) and c:IsMonster() and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -70,4 +70,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34611551.lua b/official/c34611551.lua index 15f835c5cc..850e77b5ef 100644 --- a/official/c34611551.lua +++ b/official/c34611551.lua @@ -1,7 +1,6 @@ --武装竜の霹靂 --Armed Dragon Flash --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 3 "Armed Dragon" monster from deck @@ -14,10 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x111} - +s.listed_series={SET_ARMED_DRAGON} function s.filter(c,e,tp) - return c:IsLevel(3) and c:IsSetCard(0x111) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevel(3) and c:IsSetCard(SET_ARMED_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c34614289.lua b/official/c34614289.lua index d14ef609f3..b549fe8bde 100644 --- a/official/c34614289.lua +++ b/official/c34614289.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -76,13 +76,13 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c34614910.lua b/official/c34614910.lua index 057ae1be31..49615ea809 100644 --- a/official/c34614910.lua +++ b/official/c34614910.lua @@ -1,17 +1,16 @@ --六花精シクラン --Cyclamen the Rikka Fairy --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Reduce targeted player's plant monsters' levels by 2 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(s.lvcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.lvtg) e1:SetOperation(s.lvop) c:RegisterEffect(e1) @@ -36,10 +35,6 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.tgfilter(c) return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsLevelAbove(1) and c:HasLevel() end @@ -57,7 +52,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -65,7 +60,7 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_RELEASE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -84,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c34620088.lua b/official/c34620088.lua index cf722bbf54..f590a6e263 100644 --- a/official/c34620088.lua +++ b/official/c34620088.lua @@ -1,4 +1,5 @@ --ギミック・パペット-シャドー・フィーラー +--Gimmick Puppet Shadow Feeler local s,id=GetID() function s.initial_effect(c) --battle indestructable @@ -43,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then Duel.Damage(tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34627841.lua b/official/c34627841.lua index f4c7af5a9e..41e59386ae 100644 --- a/official/c34627841.lua +++ b/official/c34627841.lua @@ -1,4 +1,5 @@ --正義の味方 カイバーマン +--Kaibaman local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,16 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={CARD_BLUEEYES_W_DRAGON} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -33,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34646691.lua b/official/c34646691.lua index 9900a7aa74..8b0b4cadd5 100644 --- a/official/c34646691.lua +++ b/official/c34646691.lua @@ -1,4 +1,5 @@ --つまずき +--Stumbling local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=eg:Filter(s.filter,nil,e) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c34659866.lua b/official/c34659866.lua index 8cae603292..e410996e58 100644 --- a/official/c34659866.lua +++ b/official/c34659866.lua @@ -1,4 +1,5 @@ --ダークシー・レスキュー +--Darksea Rescue local s,id=GetID() function s.initial_effect(c) --draw @@ -25,4 +26,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34664411.lua b/official/c34664411.lua index 104ef34d2c..9fc080fc1e 100644 --- a/official/c34664411.lua +++ b/official/c34664411.lua @@ -1,4 +1,5 @@ --幸運の鉄斧 +--Lucky Iron Axe local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -22,7 +23,7 @@ function s.initial_effect(c) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&0x41)==0x41 and rp~=tp and c:IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -34,4 +35,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34680482.lua b/official/c34680482.lua index ba3421caf6..a5a04c3f32 100644 --- a/official/c34680482.lua +++ b/official/c34680482.lua @@ -1,6 +1,5 @@ --マドルチェ・エンジェリー --Madolche Anjelly - local s,id=GetID() function s.initial_effect(c) --When sent to GY, shuffle itself into deck @@ -20,13 +19,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x71} - +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -37,15 +35,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MADOLCHE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() local c=e:GetHandler() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,Duel.GetTurnCount()) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,Duel.GetTurnCount()) --Cannot be destroyed by battle local e1=Effect.CreateEffect(c) e1:SetDescription(3000) @@ -67,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Shuffle it into deck during end phase of next turn local e2=Effect.CreateEffect(c) @@ -78,17 +72,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetLabelObject(tc) e2:SetCondition(s.tdcon) e2:SetOperation(s.tdop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) e2:SetCountLimit(1) Duel.RegisterEffect(e2,tp) end end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp and tc:GetFlagEffectLabel(id)==e:GetLabel() + return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsTurnPlayer(tp) and tc:GetFlagEffectLabel(id)==e:GetLabel() end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Hint(HINT_CARD,0,id) - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c34688023.lua b/official/c34688023.lua index 17bce8f220..8cccca61e7 100644 --- a/official/c34688023.lua +++ b/official/c34688023.lua @@ -1,4 +1,5 @@ --エッジインプ・ソウ +--Edge Imp Saw local s,id=GetID() function s.initial_effect(c) --draw @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xa9} +s.listed_series={SET_FLUFFAL} function s.cfilter(c) - return c:IsSetCard(0xa9) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_FLUFFAL) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -35,9 +36,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.BreakEffect() if Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c34690953.lua b/official/c34690953.lua index acdcecb93b..894cb8babb 100644 --- a/official/c34690953.lua +++ b/official/c34690953.lua @@ -84,7 +84,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) diff --git a/official/c34694160.lua b/official/c34694160.lua index cda4a7c26e..65102c4524 100644 --- a/official/c34694160.lua +++ b/official/c34694160.lua @@ -1,4 +1,5 @@ --真実の眼 +--The Eye of Truth local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCategory(CATEGORY_RECOVER) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.reccon) @@ -28,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(Card.IsSpell,tp,0,LOCATION_HAND,1,nil) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(Card.IsSpell,tp,0,LOCATION_HAND,1,nil) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,4 +41,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34695290.lua b/official/c34695290.lua index 0f14118d6a..53370a1d67 100644 --- a/official/c34695290.lua +++ b/official/c34695290.lua @@ -1,7 +1,6 @@ --ミュートリアル・ビースト --Myutant Beast --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Must special summoned by a "Myutant" effect @@ -46,22 +45,21 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x159) + return se:GetHandler():IsSetCard(SET_MYUTANT) end function s.tgval(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER) + return aux.tgoval(e,re,rp) and re:IsMonsterEffect() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp - and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -82,7 +80,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsTrap() and c:IsAbleToHand() and c:IsFaceup() and c:IsSetCard(0x159) + return c:IsTrap() and c:IsAbleToHand() and c:IsFaceup() and c:IsSetCard(SET_MYUTANT) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and e:GetHandler():IsPreviousControler(tp) diff --git a/official/c34707034.lua b/official/c34707034.lua index 75024bfc1b..f5344b6384 100644 --- a/official/c34707034.lua +++ b/official/c34707034.lua @@ -1,4 +1,5 @@ --アビスコール +--Abyss-squall local s,id=GetID() function s.initial_effect(c) --activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.filter(c,e,tp) - return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MERMAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -37,19 +38,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -79,4 +80,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34710660.lua b/official/c34710660.lua index b0ac71c100..cd45c331c5 100644 --- a/official/c34710660.lua +++ b/official/c34710660.lua @@ -10,13 +10,13 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -94,9 +94,8 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if ft>2 then ft=2 end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,ft,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,ft,nil,e,tp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c34767865.lua b/official/c34767865.lua index 79831d56a3..d62355874e 100644 --- a/official/c34767865.lua +++ b/official/c34767865.lua @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c34771947.lua b/official/c34771947.lua index dca916e6b7..2c696982a6 100644 --- a/official/c34771947.lua +++ b/official/c34771947.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_DESTROY) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e4:SetRange(LOCATION_FZONE) e4:SetCountLimit(1) e4:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) diff --git a/official/c34773082.lua b/official/c34773082.lua index 0fbd8b4892..06ac5ed115 100644 --- a/official/c34773082.lua +++ b/official/c34773082.lua @@ -1,4 +1,5 @@ --魔玩具補綴 +--Frightfur Patchwork local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc3} +s.listed_series={SET_EDGE_IMP} s.listed_names={CARD_POLYMERIZATION} function s.filter1(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.filter2(c) - return c:IsSetCard(0xc3) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_EDGE_IMP) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil) @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg1) end -end +end \ No newline at end of file diff --git a/official/c34796454.lua b/official/c34796454.lua index 4982bb5ccc..3eb4233c9a 100644 --- a/official/c34796454.lua +++ b/official/c34796454.lua @@ -1,4 +1,5 @@ --三連星のトリオン +--Triple Star Trion local s,id=GetID() function s.initial_effect(c) --to grave @@ -21,7 +22,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -33,4 +34,4 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c34800281.lua b/official/c34800281.lua index 5675e4a6ec..369c995953 100644 --- a/official/c34800281.lua +++ b/official/c34800281.lua @@ -1,5 +1,5 @@ --メルフィー・ラッシィ ---Melffy Sealy +--Melffy Pinny --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) e1:SetCondition(function(_,tp) return Duel.GetFlagEffect(tp,id)>0 end) e1:SetTarget(s.sptg) @@ -38,11 +38,11 @@ function s.initial_effect(c) end) end s.listed_names={id} -s.listed_series={0x147} +s.listed_series={SET_MELFFY} function s.checkop(e,tp,eg,ep,ev,re,r,rp) for tc in eg:Iter() do if tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousPosition(POS_FACEUP) and tc:GetPreviousRaceOnField()&RACE_BEAST~=0 then - Duel.RegisterFlagEffect(tc:GetPreviousControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetPreviousControler(),id,RESET_PHASE|PHASE_END,0,1) end end end @@ -58,7 +58,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local mg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,0x147) + local mg=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_HAND,0,nil,SET_MELFFY) local syng=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,c,mg+c) if #mg>0 and #syng>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c34813545.lua b/official/c34813545.lua index bc9a542d94..ad85c03ddb 100644 --- a/official/c34813545.lua +++ b/official/c34813545.lua @@ -1,9 +1,9 @@ --- ナチュルの春風 --- Naturia Spring Breeze --- Scripted by Hatter +--ナチュルの春風 +--Naturia Blessing +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.actop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) local b1=s.sptg(e,tp,eg,ep,ev,re,r,rp,0) local b2=s.syntg(e,tp,eg,ep,ev,re,r,rp,0) @@ -41,23 +41,23 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp,chk) elseif op==3 then s.fusop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NATURIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.syncheck(tp,sg,sc) - return sg:IsExists(Card.IsSetCard,1,nil,0x2a) + return sg:IsExists(Card.IsSetCard,1,nil,SET_NATURIA) end function s.syntg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -79,7 +79,7 @@ function s.synop(e,tp,eg,ep,ev,re,r,rp) Synchro.CheckAdditional=nil end function s.fuscheck(tp,sg,fc) - return sg:IsExists(aux.FilterBoolFunction(Card.IsSetCard,0x2a,fc,SUMMON_TYPE_FUSION,tp),1,nil) + return sg:IsExists(aux.FilterBoolFunction(Card.IsSetCard,SET_NATURIA,fc,SUMMON_TYPE_FUSION,tp),1,nil) end function s.fusextra(e,tp,mg) return nil,s.fuscheck diff --git a/official/c34815282.lua b/official/c34815282.lua index 2e7ced5509..80c601254a 100644 --- a/official/c34815282.lua +++ b/official/c34815282.lua @@ -2,7 +2,7 @@ --Miniaturize local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,nil,s.filter,CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0,s.condition) + aux.AddPersistentProcedure(c,nil,s.filter,CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER,aux.StatChangeDamageStepCondition) --eff local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -25,9 +25,6 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:GetBaseAttack()>1000 and c:HasLevel() and c:GetLevel()~=1 end @@ -39,4 +36,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34822850.lua b/official/c34822850.lua index 93235ad1c5..da88877564 100644 --- a/official/c34822850.lua +++ b/official/c34822850.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -23,7 +23,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetRange(LOCATION_FZONE) - e3:SetTargetRange(LOCATION_HAND+LOCATION_GRAVE,0) + e3:SetTargetRange(LOCATION_HAND|LOCATION_GRAVE,0) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_INFERNOID)) e3:SetCode(id) c:RegisterEffect(e3) diff --git a/official/c34830502.lua b/official/c34830502.lua index e819da6ef4..95bc066f3f 100644 --- a/official/c34830502.lua +++ b/official/c34830502.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -38,35 +38,31 @@ function s.initial_effect(c) end s.listed_names={19877898,34088136} s.LVnum=5 -s.LVset=0x5d +s.LVset=SET_ULTIMATE_INSECT function s.con(e) return e:GetHandler():GetFlagEffect(id)~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE|RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id+1)==0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(19877898) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:RegisterFlagEffect(19877898,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE),0,0) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c34834619.lua b/official/c34834619.lua index e6b4c3baa8..5cb22665e8 100644 --- a/official/c34834619.lua +++ b/official/c34834619.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local mg=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler(),e) + local mg=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler(),e) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) @@ -33,7 +33,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local mg=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) + local mg=Duel.GetMatchingGroup(s.mtfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) local tc=g:GetFirst() diff --git a/official/c34838437.lua b/official/c34838437.lua index 106fd99eb2..ca34959da4 100644 --- a/official/c34838437.lua +++ b/official/c34838437.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end @@ -24,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -33,7 +33,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34848821.lua b/official/c34848821.lua index ba4b6adc38..f32cee49c0 100644 --- a/official/c34848821.lua +++ b/official/c34848821.lua @@ -1,5 +1,5 @@ --痕喰竜ブリガンド ---Stigmavore Dragon Brigand +--Brigrand the Glory Dragon --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -45,26 +45,26 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} s.listed_names={CARD_ALBAZ} function s.tgcond(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.tgtg(e,c) return c~=e:GetHandler() end function s.tgval(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and aux.tgoval(e,re,rp) + return re:IsMonsterEffect() and aux.tgoval(e,re,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.filter(c,e,tp) - return (c:IsCode(CARD_ALBAZ) or (c:IsSetCard(0x14f) and c:IsMonster())) + return (c:IsCode(CARD_ALBAZ) or (c:IsSetCard(SET_TRI_BRIGADE) and c:IsMonster())) and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -83,4 +83,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) aux.Stringid(id,2) ) end -end +end \ No newline at end of file diff --git a/official/c34853266.lua b/official/c34853266.lua index b48a9b1241..18924ebbdb 100644 --- a/official/c34853266.lua +++ b/official/c34853266.lua @@ -38,4 +38,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c3486020.lua b/official/c3486020.lua index 1440175b13..fe1f27194f 100644 --- a/official/c3486020.lua +++ b/official/c3486020.lua @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c34876719.lua b/official/c34876719.lua index 8e4e132c78..61c59bff9c 100644 --- a/official/c34876719.lua +++ b/official/c34876719.lua @@ -1,5 +1,5 @@ --N・As・H Knight ---Nafil Asylum Heth Knight +--N.As.H. Knight local s,id=GetID() function s.initial_effect(c) --Xyz Summon @@ -20,24 +20,24 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) e2:SetCondition(s.attcon) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.atttg) e2:SetOperation(s.attop) c:RegisterEffect(e2) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.indcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x48),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMBER),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.attcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end function s.attfilter1(c,e) local no=c.xyz_number - return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e) + return no and no>=101 and no<=107 and c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e) end function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.attfilter1,tp,LOCATION_EXTRA,0,1,nil,e) @@ -63,4 +63,4 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Overlay(c,tc,true) end -end +end \ No newline at end of file diff --git a/official/c34884015.lua b/official/c34884015.lua index 242a71201e..2ea92efad4 100644 --- a/official/c34884015.lua +++ b/official/c34884015.lua @@ -145,8 +145,8 @@ function s.pencon(e,c,og) local rscale=rpz:GetRightScale() if lscale>rscale then lscale,rscale=rscale,lscale end local loc=0 - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end - if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end + if Duel.GetLocationCountFromEx(tp)>0 then loc=loc|LOCATION_EXTRA end if loc==0 then return false end local g=nil if og then @@ -170,8 +170,8 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) ft=1 end local loc=0 - if ft1>0 then loc=loc+LOCATION_HAND end - if ft2>0 then loc=loc+LOCATION_EXTRA end + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end local tg=nil if og then tg=og:Filter(Card.IsLocation,nil,loc):Filter(Pendulum.Filter,nil,e,tp,lscale,rscale) @@ -188,8 +188,8 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp,c,sg,og) if ct1>ft1 then ct=math.min(ct,ft1) end if ct2>ft2 then ct=math.min(ct,ft2) end local loc=0 - if ft1>0 then loc=loc+LOCATION_HAND end - if ft2>0 then loc=loc+LOCATION_EXTRA end + if ft1>0 then loc=loc|LOCATION_HAND end + if ft2>0 then loc=loc|LOCATION_EXTRA end local g=tg:Filter(Card.IsLocation,sg,loc) if #g==0 or ft==0 then break end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) diff --git a/official/c34898052.lua b/official/c34898052.lua index 728dc329ca..de38b05fd0 100644 --- a/official/c34898052.lua +++ b/official/c34898052.lua @@ -1,4 +1,5 @@ --牙竜咆哮 +--Dragoroar local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,7 +38,7 @@ function s.filter(c,g,sg) return res end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND) + local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND) if chk==0 then return g:IsExists(s.filter,1,nil,g,Group.CreateGroup()) end local rg=Group.CreateGroup() while #rg<4 do @@ -60,4 +61,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34904525.lua b/official/c34904525.lua index 7a55de9078..01ac433854 100644 --- a/official/c34904525.lua +++ b/official/c34904525.lua @@ -34,7 +34,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() and c:ListsCode(CARD_SANGA_OF_THE_THUNDER) and c:ListsCode(CARD_KAZEJIN) and c:ListsCode(CARD_SUIJIN) diff --git a/official/c34906152.lua b/official/c34906152.lua index 7161abac31..b97cd53b4a 100644 --- a/official/c34906152.lua +++ b/official/c34906152.lua @@ -1,4 +1,5 @@ --マスドライバー +--Mass Driver local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c34909328.lua b/official/c34909328.lua index 614742ef7c..2f606b47e5 100644 --- a/official/c34909328.lua +++ b/official/c34909328.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c34923554.lua b/official/c34923554.lua index e1b3d9c13f..a41107c79b 100644 --- a/official/c34923554.lua +++ b/official/c34923554.lua @@ -1,5 +1,5 @@ --無限起動ドラグショベル ---Infinite Ignition Drag Shovel +--Infinitrack Drag Shovel --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c3492538.lua b/official/c3492538.lua index 1dda75e0ef..b0c52f26c2 100644 --- a/official/c3492538.lua +++ b/official/c3492538.lua @@ -1,4 +1,5 @@ --火器付機甲鎧 +--Insect Armor with Laser Cannon local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT)) @@ -8,4 +9,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(700) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c34926568.lua b/official/c34926568.lua index 0382c12b99..8856fb3b95 100644 --- a/official/c34926568.lua +++ b/official/c34926568.lua @@ -1,4 +1,4 @@ ---Japanese name +--守護獣セルケト --Merciless Scorpion of Serket --Scripted by The Razgriz local s,id=GetID() @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.thfilter(c) - return (c:IsCode(CARD_TEMPLE_OF_THE_KINGS) or (c:IsSpell() and c:ListsCode(CARD_TEMPLE_OF_THE_KINGS))) and c:IsAbleToHand() + return (c:IsCode(CARD_TEMPLE_OF_THE_KINGS) or (c:IsSpell() and c:ListsCode(CARD_TEMPLE_OF_THE_KINGS))) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -92,4 +92,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) --This card gains ATK equal to half the destroyed monster's original ATK c:UpdateAttack(atk) end -end +end \ No newline at end of file diff --git a/official/c3493058.lua b/official/c3493058.lua index 376074e5d8..4d26bad978 100644 --- a/official/c3493058.lua +++ b/official/c3493058.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end s.roll_dice=true function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34933456.lua b/official/c34933456.lua index d4b7c1e941..638a793913 100644 --- a/official/c34933456.lua +++ b/official/c34933456.lua @@ -8,14 +8,14 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.mfilter(c) - return (c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and c:IsAbleToGrave()) - or (c:IsOriginalType(TYPE_MONSTER) and c:IsLocation(LOCATION_SZONE) and c:IsType(TYPE_EQUIP) and c:GetEquipTarget():IsSetCard(0x152)) + return (c:IsLocation(LOCATION_HAND|LOCATION_MZONE) and c:IsAbleToGrave()) + or (c:IsOriginalType(TYPE_MONSTER) and c:IsLocation(LOCATION_SZONE) and c:IsType(TYPE_EQUIP) and c:GetEquipTarget():IsSetCard(SET_MAGISTUS)) end function s.checkmat(tp,sg,fc) - return (fc:IsSetCard(0x152) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_SZONE)) and sg:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER) + return (fc:IsSetCard(SET_MAGISTUS) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_SZONE)) and sg:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER) end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil),s.checkmat -end + return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,nil),s.checkmat +end \ No newline at end of file diff --git a/official/c3493978.lua b/official/c3493978.lua index 31e860222b..6f0ed2398a 100644 --- a/official/c3493978.lua +++ b/official/c3493978.lua @@ -1,4 +1,5 @@ --首領亀 +--Don Turtle local s,id=GetID() function s.initial_effect(c) --special summon diff --git a/official/c34945480.lua b/official/c34945480.lua index 76d1c03cd6..2baed11b19 100644 --- a/official/c34945480.lua +++ b/official/c34945480.lua @@ -26,17 +26,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.condition) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x10b7} +s.listed_series={SET_OUTER_ENTITY} function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x10b7) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsSetCard(SET_OUTER_ENTITY) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -45,27 +45,23 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(0,1) Duel.RegisterEffect(e2,tp) end function s.actlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetOverlayGroup() return g:IsExists(Card.IsType,1,nil,TYPE_FUSION) and g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and g:IsExists(Card.IsType,1,nil,TYPE_XYZ) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) diff --git a/official/c34959756.lua b/official/c34959756.lua index 243d3442be..ceadb4057b 100644 --- a/official/c34959756.lua +++ b/official/c34959756.lua @@ -1,7 +1,6 @@ --リビング・フォッシル --Living Fossil --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 4 or lower monster from GY @@ -57,7 +56,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) --Banish it if it leaves the field @@ -65,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e2) end @@ -80,4 +79,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34961968.lua b/official/c34961968.lua index 345eca87c4..ddc511cecb 100644 --- a/official/c34961968.lua +++ b/official/c34961968.lua @@ -1,4 +1,5 @@ --幻獣サンダーペガス +--Phantom Beast Thunder-Pegasus local s,id=GetID() function s.initial_effect(c) --indes @@ -9,17 +10,17 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1b} +s.listed_series={SET_PHANTOM_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst():IsControler(1-tp) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1b) + return c:IsFaceup() and c:IsSetCard(SET_PHANTOM_BEAST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34966096.lua b/official/c34966096.lua index b4c863820f..619001a266 100644 --- a/official/c34966096.lua +++ b/official/c34966096.lua @@ -1,7 +1,6 @@ --カオス・ベトレイヤー --Chaos Betrayer --Scripted by andré - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -26,7 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} - function s.ssfilter(c) return c:IsAttribute(ATTRIBUTE_LIGHT|ATTRIBUTE_DARK) and not c:IsCode(id) and aux.SpElimFilter(c,true,false) and c:IsAbleToRemoveAsCost() end @@ -41,7 +39,7 @@ function s.ssrescon(sg,e,tp,mg) return sg:IsExists(s.ssfilter1,1,nil,sg) and aux.ChkfMMZ(1)(sg,e,tp,mg) end function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.ssfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.ssfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.ssrescon,0) end local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.ssrescon,1,tp,HINTMSG_REMOVE) Duel.Remove(sg,POS_FACEUP,REASON_COST) @@ -60,7 +58,7 @@ function s.ssoperation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -77,4 +75,4 @@ function s.roperation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c34968834.lua b/official/c34968834.lua index ce898e2afa..690749f71b 100644 --- a/official/c34968834.lua +++ b/official/c34968834.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c34974462.lua b/official/c34974462.lua index c62fb4d3a5..b44afa846a 100644 --- a/official/c34974462.lua +++ b/official/c34974462.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -77,4 +77,4 @@ end function s.actcon(e) local ac=Duel.GetAttacker() return ac and ac:IsSetCard(SET_MELODIOUS) and e:GetHandler():GetLinkedGroup():IsContains(ac) -end +end \ No newline at end of file diff --git a/official/c34976176.lua b/official/c34976176.lua index 6aaaa90959..43b176d916 100644 --- a/official/c34976176.lua +++ b/official/c34976176.lua @@ -9,10 +9,10 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(aux.NOT(s.quickcon)) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -26,11 +26,6 @@ function s.initial_effect(c) end s.listed_names={CARD_BLACK_WINGED_DRAGON} s.listed_series={SET_BLACKWING} -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.tgfilter(c) return c:IsAbleToGrave() and ((c:IsSetCard(SET_BLACKWING) and c:IsType(TYPE_SYNCHRO)) or c:IsCode(CARD_BLACK_WINGED_DRAGON)) end @@ -73,5 +68,5 @@ function s.quickconfilter(c) end function s.quickcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.quickconfilter,tp,LOCATION_MZONE,0,1,nil) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end \ No newline at end of file diff --git a/official/c34989413.lua b/official/c34989413.lua index ac8471b12c..6709b66e6b 100644 --- a/official/c34989413.lua +++ b/official/c34989413.lua @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(eff) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c34995106.lua b/official/c34995106.lua index c34a78b8c2..8743871184 100644 --- a/official/c34995106.lua +++ b/official/c34995106.lua @@ -71,4 +71,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end +end \ No newline at end of file diff --git a/official/c35014241.lua b/official/c35014241.lua index eb36b3eeac..f985e392b8 100644 --- a/official/c35014241.lua +++ b/official/c35014241.lua @@ -1,4 +1,5 @@ --リミットオーバー・ドライブ +--Limit Overdrive local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,7 +33,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g2=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g1:GetFirst()) e:SetLabel(g1:GetFirst():GetLevel()+g2:GetFirst():GetLevel()) g1:Merge(g2) - Duel.SendtoDeck(g1,nil,0,REASON_COST) + Duel.SendtoDeck(g1,nil,SEQ_DECKTOP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -49,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35027493.lua b/official/c35027493.lua index e4a5a7dbf9..ff4631d7c0 100644 --- a/official/c35027493.lua +++ b/official/c35027493.lua @@ -1,5 +1,5 @@ --魔のデッキ破壊ウイルス ---Grinning Grave Virus +--Deck Devastation Virus local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_TOHAND|TIMINGS_CHECK_MONSTER) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -34,7 +34,7 @@ function s.filter(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) + local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE|LOCATION_HAND) if #conf>0 then Duel.ConfirmCards(tp,conf) local dg=conf:Filter(s.filter,nil) @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.turncon) e2:SetOperation(s.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e2,tp) e2:SetLabelObject(e1) local descnum=tp==c:GetOwner() and 0 or 1 @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(e2) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e3) aux.RegisterClientHint(e:GetHandler(),nil,tp,0,1,aux.Stringid(id,2),nil) end @@ -84,7 +84,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(ep) end function s.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.turnop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -95,4 +95,4 @@ function s.turnop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():Reset() if re then re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c35035481.lua b/official/c35035481.lua index e5540bc4a8..a188c7271b 100644 --- a/official/c35035481.lua +++ b/official/c35035481.lua @@ -1,6 +1,5 @@ --バージェストマ・オレノイデス ---Paleozoic Oleionodes - +--Paleozoic Olenoides local s,id=GetID() function s.initial_effect(c) --Destroy 1 spell/trap on the field @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_EQUIP+TIMING_SSET+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_EQUIP|TIMING_SSET|TIMING_END_PHASE) c:RegisterEffect(e1) --Special summon itself from GY as a monster local e2=Effect.CreateEffect(c) @@ -25,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end @@ -41,19 +40,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -66,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -74,12 +73,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c35037880.lua b/official/c35037880.lua index 0f0a392fee..e861cdd1d5 100644 --- a/official/c35037880.lua +++ b/official/c35037880.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x100d,0xd,0xb0} +s.listed_series={SET_X_SABER,SET_SABER,SET_GOTTOMS} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) + return c:IsFaceup() and c:IsSetCard(SET_X_SABER) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==tp and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -28,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return ((c:IsSetCard(0xd) and c:IsSpellTrap()) or c:IsSetCard(0xb0)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_SABER) and c:IsSpellTrap()) or c:IsSetCard(SET_GOTTOMS)) and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,ev,REASON_EFFECT,true) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c35058588.lua b/official/c35058588.lua index 1573aad62a..ea6d33185a 100644 --- a/official/c35058588.lua +++ b/official/c35058588.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.counterop) c:RegisterEffect(e2) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} s.counter_place_list={0x1038} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -48,7 +48,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if hc:IsFaceup() and hc:IsRelateToEffect(e) then Duel.BreakEffect() @@ -56,13 +56,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(hc:GetAttack()/2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) hc:RegisterEffect(e2) end end end function s.cfilter(c) - return c:IsSetCard(0xe3) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_CUBIC) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.tgfilter(c,e) return c:IsFaceup() and c:IsCanBeEffectTarget(e) @@ -90,7 +90,7 @@ function s.counterop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCondition(s.disable) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE) @@ -99,4 +99,4 @@ function s.counterop(e,tp,eg,ep,ev,re,r,rp) end function s.disable(e) return e:GetHandler():GetCounter(0x1038)>0 -end +end \ No newline at end of file diff --git a/official/c35058857.lua b/official/c35058857.lua index 3bb25457bd..40a6a26e7d 100644 --- a/official/c35058857.lua +++ b/official/c35058857.lua @@ -47,10 +47,10 @@ function s.lvfilter(c,lv) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local lv=e:GetHandler():GetLevel() - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.lvfilter(chkc,lv) end - if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,lv) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.lvfilter(chkc,lv) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,lv) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,lv) + Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,lv) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -60,7 +60,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -69,10 +69,10 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTarget(s.splimit) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return (sumtype&SUMMON_TYPE_SYNCHRO)~=SUMMON_TYPE_SYNCHRO -end +end \ No newline at end of file diff --git a/official/c35059553.lua b/official/c35059553.lua index c4e29b674e..d5e6be6556 100644 --- a/official/c35059553.lua +++ b/official/c35059553.lua @@ -1,4 +1,5 @@ --カイザーコロシアム +--Kaiser Colosseum local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,4 +44,4 @@ function s.sumlimit(e,c) else return false end -end +end \ No newline at end of file diff --git a/official/c3507053.lua b/official/c3507053.lua index ee29a25401..e5903ac59a 100644 --- a/official/c3507053.lua +++ b/official/c3507053.lua @@ -48,7 +48,7 @@ end s.listed_series={SET_APPLIANCER} function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.colinkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetMutualLinkedGroupCount()>0 diff --git a/official/c35073065.lua b/official/c35073065.lua index 3ed4bcdca5..2b565bab4e 100644 --- a/official/c35073065.lua +++ b/official/c35073065.lua @@ -1,4 +1,5 @@ --イリュージョン・スナッチ +--Illusory Snatcher local s,id=GetID() function s.initial_effect(c) --spsummon @@ -18,7 +19,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() - return ep==tp and ec:IsSummonType(SUMMON_TYPE_TRIBUTE) + return ep==tp and ec:IsTributeSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -40,7 +41,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) else e1:SetValue(ec:GetRace()) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -50,15 +51,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) else e2:SetValue(ec:GetAttribute()) end - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetValue(ec:GetLevel()) - e3:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e3:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e3) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c35089369.lua b/official/c35089369.lua index 42fa2c7af9..38fa194e92 100644 --- a/official/c35089369.lua +++ b/official/c35089369.lua @@ -1,6 +1,5 @@ --風竜星-ホロウ --Pulao, Wind of the Yang Zing - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Yang Zing" monster from deck @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1) e2:SetCondition(s.sccon) e2:SetTarget(s.sctg) @@ -36,16 +35,15 @@ function s.initial_effect(c) e3:SetOperation(s.immop) c:RegisterEffect(e3) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} s.listed_names={id} - function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -59,12 +57,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.mfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9e) + return c:IsFaceup() and c:IsSetCard(SET_YANG_ZING) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -95,9 +91,9 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) + return te:IsSpellEffect() end \ No newline at end of file diff --git a/official/c35098357.lua b/official/c35098357.lua index 2e58b7a8bb..12c10f4146 100644 --- a/official/c35098357.lua +++ b/official/c35098357.lua @@ -1,7 +1,6 @@ --ウィッチクラフト・コンフュージョン ---Witchcrafter Confusion +--Witchcrafter Confusion Confession --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -24,20 +23,19 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Witchcrafter" archetype -s.listed_series={0x128} - +s.listed_series={SET_WITCHCRAFTER} function s.mfilter(c) - return (c:IsLocation(LOCATION_HAND+LOCATION_MZONE) and c:IsAbleToGrave()) + return (c:IsLocation(LOCATION_HAND|LOCATION_MZONE) and c:IsAbleToGrave()) end function s.checkmat(tp,sg,fc) - return sg:IsExists(Card.IsSetCard,1,nil,0x128) + return sg:IsExists(Card.IsSetCard,1,nil,SET_WITCHCRAFTER) end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil),s.checkmat + return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,nil),s.checkmat end --Check for face-up "Witchcrafter" monster and if it's your End Phase function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end --Activation legality diff --git a/official/c35100834.lua b/official/c35100834.lua index 66323f165a..5a56eafbb7 100644 --- a/official/c35100834.lua +++ b/official/c35100834.lua @@ -1,7 +1,6 @@ --機動砲塁 パワー・ホールド --Powerhold the Moving Battery --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon this card as a monster, then equip 1 "Gadget" monster from hand or deck to it @@ -11,24 +10,23 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x51} - +s.listed_series={SET_GADGET} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.eqfilter(c) - return c:IsLevel(4) and c:IsRace(RACE_MACHINE) and c:IsSetCard(0x51) + return c:IsLevel(4) and c:IsRace(RACE_MACHINE) and c:IsSetCard(SET_GADGET) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) --atk @@ -37,16 +35,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.atkval) c:RegisterEffect(e1) c:AddMonsterAttributeComplete() - local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil) + local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK|LOCATION_HAND,0,nil) if Duel.SpecialSummonComplete()==1 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local tc=g:Select(tp,1,1,nil):GetFirst() - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e,nil,RESET_EVENT+RESETS_STANDARD_DISABLE) + aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e,nil,RESET_EVENT|RESETS_STANDARD_DISABLE) s.equipop(c,e,tp,tc,true) end end @@ -60,11 +58,11 @@ function s.equipop(c,e,tp,tc,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(Card.EquipByEffectLimit) e1:SetLabelObject(e:GetLabelObject()) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end function s.idfilter(c) return c:GetFlagEffect(id)~=0 diff --git a/official/c3510565.lua b/official/c3510565.lua index 5d50b5a95b..3f878f38b6 100644 --- a/official/c3510565.lua +++ b/official/c3510565.lua @@ -1,4 +1,5 @@ --ステルスバード +--Stealth Bird local s,id=GetID() function s.initial_effect(c) --turn set @@ -24,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -42,4 +43,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35112613.lua b/official/c35112613.lua index aaa5d6bd14..6463884929 100644 --- a/official/c35112613.lua +++ b/official/c35112613.lua @@ -1,4 +1,5 @@ --クリフォトン +--Kuriphoton local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x55} +s.listed_series={SET_PHOTON} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,2000) and e:GetHandler():IsAbleToGraveAsCost() end Duel.PayLPCost(tp,2000) @@ -34,15 +35,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.cfilter(c) - return c:IsSetCard(0x55) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_PHOTON) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -59,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35125879.lua b/official/c35125879.lua index 71275ecd81..de88c398d4 100644 --- a/official/c35125879.lua +++ b/official/c35125879.lua @@ -49,20 +49,20 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xf9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,id+1)==0 end - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) @@ -78,20 +78,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.sumfilter(c) - return c:IsSetCard(0xf9) and c:IsSummonable(true,nil,1) + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsSummonable(true,nil,1) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) and Duel.GetFlagEffect(tp,id+2)==0 end - Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) @@ -118,4 +118,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35129241.lua b/official/c35129241.lua index 72d5e84ea7..8133636948 100644 --- a/official/c35129241.lua +++ b/official/c35129241.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} function s.filter(c,e,tp,re) local re=c:GetReasonEffect() if not re then return false end local rc=re:GetHandler() - return c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_STARDUST) and c:IsType(TYPE_SYNCHRO) and c:IsPreviousControler(tp) and c:IsReason(REASON_COST) and rc==c and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -57,9 +57,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if e:GetHandler():IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.intg(e,c) return c:IsAttackPos() and c:GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c35146019.lua b/official/c35146019.lua index dbe35b0c54..7727f86d4e 100644 --- a/official/c35146019.lua +++ b/official/c35146019.lua @@ -1,5 +1,5 @@ --オルターガイスト・マテリアリゼーション ---Altergeist Materialization +--Altergeist Manifestation local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,14 +26,14 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.spfilter(c,e,tp) - return c:IsSetCard(0x103) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) + return c:IsSetCard(SET_ALTERGEIST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -58,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -74,7 +74,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsTrap() and c:IsSetCard(0x103) and c:IsAbleToHand() + return c:IsTrap() and c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35183584.lua b/official/c35183584.lua index b4a326aaf7..b92fb399e9 100644 --- a/official/c35183584.lua +++ b/official/c35183584.lua @@ -1,5 +1,5 @@ --星遺物の守護竜メロダーク ---World Legacy Guardragon Melodark +--World Legacy Guardragon Mardark --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -40,7 +40,7 @@ function s.spfilter(c) return c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c35183853.lua b/official/c35183853.lua index e7c4d45e6f..29bad19973 100644 --- a/official/c35183853.lua +++ b/official/c35183853.lua @@ -10,12 +10,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 diff --git a/official/c35191415.lua b/official/c35191415.lua index fb3ad4ddcb..91d35c8a71 100644 --- a/official/c35191415.lua +++ b/official/c35191415.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) end s.listed_names={CARD_DARK_MAGICIAN} function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp==tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return Duel.IsTurnPlayer(1-tp) and rp==tp and re:IsSpellTrapEffect() end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,7 +53,7 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) end end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return rp==tp and re:IsSpellTrapEffect() end function s.filter(c,e,tp) return c:IsCode(CARD_DARK_MAGICIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -71,4 +71,4 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3519195.lua b/official/c3519195.lua index 2b0f602c89..3325431e22 100644 --- a/official/c3519195.lua +++ b/official/c3519195.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c35195612.lua b/official/c35195612.lua index 0ace2bb269..f20b81c13f 100644 --- a/official/c35195612.lua +++ b/official/c35195612.lua @@ -1,4 +1,5 @@ --砂塵の騎士 +--Dust Knight local s,id=GetID() function s.initial_effect(c) --send to grave @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35209994.lua b/official/c35209994.lua index 74dc189e73..dcd77a5a73 100644 --- a/official/c35209994.lua +++ b/official/c35209994.lua @@ -1,4 +1,5 @@ --ヴェルズ・フレイス +--Evilswarm Hraesvelg local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35215622.lua b/official/c35215622.lua index 4ae589b5cc..a01116adbe 100644 --- a/official/c35215622.lua +++ b/official/c35215622.lua @@ -1,4 +1,5 @@ --盲信するゴブリン +--Blindly Loyal Goblin local s,id=GetID() function s.initial_effect(c) --control @@ -8,4 +9,4 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c35220244.lua b/official/c35220244.lua index 529c949b23..9b29223c3e 100644 --- a/official/c35220244.lua +++ b/official/c35220244.lua @@ -1,4 +1,5 @@ --重力砲 +--Gravity Blaster local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)) @@ -27,24 +28,24 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e1) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() - return ec and ec:GetControler()==tp and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget() + return ec and ec:IsControler(tp) and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget()) and ec:GetBattleTarget() end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetEquipTarget():GetBattleTarget() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c35224440.lua b/official/c35224440.lua index 2e238cd60a..e60d41155e 100644 --- a/official/c35224440.lua +++ b/official/c35224440.lua @@ -1,4 +1,5 @@ --剣闘訓練所 +--Gladiator Proving Ground local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,10 +11,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.filter(c) local lv=c:GetLevel() - return c:IsSetCard(0x19) and lv>0 and lv<5 and c:IsAbleToHand() + return c:IsSetCard(SET_GLADIATOR) and lv>0 and lv<5 and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c35252119.lua b/official/c35252119.lua index aa12e116f5..b872761198 100644 --- a/official/c35252119.lua +++ b/official/c35252119.lua @@ -1,5 +1,5 @@ --電脳堺獣-鷲々 ---Datascape Beast - Jiujiu +--Virtual World Beast - Jiujiu --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -50,7 +50,7 @@ function s.gycheck(sg,e,tp) and Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,sg) end function s.gycost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.gycfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local g=Duel.GetMatchingGroup(s.gycfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.gycheck,0) end local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.gycheck,1,tp,HINTMSG_REMOVE) Duel.Remove(sg,POS_FACEUP,REASON_COST) @@ -67,4 +67,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35255456.lua b/official/c35255456.lua index d7cc4b3d37..87f5091496 100644 --- a/official/c35255456.lua +++ b/official/c35255456.lua @@ -5,10 +5,10 @@ function s.initial_effect(c) --Activate c:RegisterEffect(Fusion.CreateSummonEff(c,s.spfilter,Card.IsAbleToDeck,s.fextra,Fusion.ShuffleMaterial,nil,nil,nil,0,nil,FUSPROC_NOTFUSION|FUSPROC_LISTEDMATS)) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} s.listed_names={CARD_NEOS} function s.spfilter(c) - return c:IsSetCard(0x3008) and c:ListsCodeAsMaterial(CARD_NEOS) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:ListsCodeAsMaterial(CARD_NEOS) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsAbleToDeck)),tp,LOCATION_GRAVE,0,nil) diff --git a/official/c35259350.lua b/official/c35259350.lua index 00e9677282..2aa4908c17 100644 --- a/official/c35259350.lua +++ b/official/c35259350.lua @@ -21,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetLabelObject(e) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) e2:SetTarget(s.sumlimit) Duel.RegisterEffect(e2,tp) @@ -38,12 +38,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e4:SetDescription(aux.Stringid(id,1)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end @@ -74,12 +74,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) lp=lp+tc:GetBaseAttack() end @@ -88,4 +88,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(1-tp,lp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35261759.lua b/official/c35261759.lua index e1cf80ed77..4612d10c8a 100644 --- a/official/c35261759.lua +++ b/official/c35261759.lua @@ -30,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35262428.lua b/official/c35262428.lua index feb36d4da6..cf3d7b149e 100644 --- a/official/c35262428.lua +++ b/official/c35262428.lua @@ -1,6 +1,5 @@ --賢者の聖杯 --Wiseman's Chalice - local s,id=GetID() function s.initial_effect(c) --Special summon 1 monster from opponent's GY to your field @@ -39,13 +38,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1) tc:RegisterEffect(e2,true) --Cannot be used as synchro material @@ -54,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(1) tc:RegisterEffect(e3,true) --Give control of it to your opponent @@ -64,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetOperation(s.ctlop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) e4:SetCountLimit(1) e4:SetLabel(1-tp) tc:RegisterEffect(e4,true) diff --git a/official/c35268887.lua b/official/c35268887.lua index 40fc72131e..6ab80c3671 100644 --- a/official/c35268887.lua +++ b/official/c35268887.lua @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.val) - e1:SetReset(RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetDescription(aux.Stringid(id,0)) @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetTarget(s.tokentg) e2:SetOperation(s.tokenop) - e2:SetReset(RESET_PHASE+PHASE_END,1) + e2:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e2,tp) end function s.val(e,re,dam,r,rp,rc) @@ -71,4 +71,4 @@ function s.tokenop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c35269904.lua b/official/c35269904.lua index 1e178771ac..00d4f38c92 100644 --- a/official/c35269904.lua +++ b/official/c35269904.lua @@ -58,4 +58,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_CANNOT_ACT|RESET_PHASE|PHASE_END) sc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c35272499.lua b/official/c35272499.lua index 267d02cbbd..a045175e29 100644 --- a/official/c35272499.lua +++ b/official/c35272499.lua @@ -1,4 +1,5 @@ --捕食植物オフリス・スコーピオ +--Predaplant Ophrys Scorpio local s,id=GetID() function s.initial_effect(c) --summon @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} s.listed_names={id} function s.cfilter(c) return c:IsMonster() and c:IsAbleToGraveAsCost() @@ -29,7 +30,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10f3) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PREDAPLANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35283277.lua b/official/c35283277.lua index e83e058d92..20d58c5bd3 100644 --- a/official/c35283277.lua +++ b/official/c35283277.lua @@ -1,9 +1,9 @@ --- 炎獣使いエーカ --- Flame Buddy Erca the Fire Beast Tamer --- Scripted by Hatter +--炎獣使いエーカ +--Eka the Flame Buddy +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon 1 Monster Card + --Special Summon 1 Monster Card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Equip 1 face-up monster to this card + --Equip 1 face-up monster to this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_EQUIP) @@ -73,7 +73,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c35306215.lua b/official/c35306215.lua index 198cdfd1d5..fb29faa96e 100644 --- a/official/c35306215.lua +++ b/official/c35306215.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetOperation(s.recop) c:RegisterEffect(e4) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end @@ -74,10 +74,10 @@ function s.otop(e,tp,eg,ep,ev,re,r,rp,c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0xef) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -88,7 +88,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) aux.ToHandOrElse(g:GetFirst(),tp) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -100,4 +100,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_FAIRY),tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Recover(tp,ct*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35307484.lua b/official/c35307484.lua index 5c8730d49c..170b7d3286 100644 --- a/official/c35307484.lua +++ b/official/c35307484.lua @@ -1,4 +1,5 @@ --マリスボラス・スプーン +--Malicevorous Spoon local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,9 +19,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x8b} +s.listed_series={SET_MALICEVOROUS} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x8b) and c:GetCode()~=id + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_MALICEVOROUS) and c:GetCode()~=id end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) @@ -43,13 +44,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c35311929.lua b/official/c35311929.lua index c3b6db3409..3765a5da16 100644 --- a/official/c35311929.lua +++ b/official/c35311929.lua @@ -1,9 +1,9 @@ --- 陽竜果フォンリー --- Soldrapom Fengli --- Scripted by Hatter +--陽竜果フォンリー +--Fengli the Soldrapom +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon and halve ATK/DEF + --Special Summon and halve ATK/DEF local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Replace destruction + --Replace destruction local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -28,7 +28,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_DECK) - and (r&REASON_EFFECT)>0 and re:IsActiveType(TYPE_MONSTER) + and (r&REASON_EFFECT)>0 and re:IsMonsterEffect() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -47,14 +47,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.HintSelection(g,true) local tc=g:GetFirst() - -- Halve ATK + --Halve ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()//2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - -- Halve DEF + --Halve DEF local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(tc:GetDefense()//2) @@ -74,7 +74,7 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.SelectEffectYesNo(tp,c,96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.desrepfilter,tp,LOCATION_DECK,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_REPLACE) return true end end \ No newline at end of file diff --git a/official/c35316708.lua b/official/c35316708.lua index e73b9d336e..025efcbf0f 100644 --- a/official/c35316708.lua +++ b/official/c35316708.lua @@ -16,10 +16,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetCode(EFFECT_SKIP_DP) - if Duel.GetCurrentPhase()==PHASE_DRAW and Duel.GetTurnPlayer()==1-tp then - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN,2) + if Duel.IsPhase(PHASE_DRAW) and Duel.IsTurnPlayer(1-tp) then + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_OPPO_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_OPPO_TURN) end Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c35329581.lua b/official/c35329581.lua index 72c4f3c06b..2aaec5b80e 100644 --- a/official/c35329581.lua +++ b/official/c35329581.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.filter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35330871.lua b/official/c35330871.lua index bedf5c2148..cd4720e88a 100644 --- a/official/c35330871.lua +++ b/official/c35330871.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1) - e2:SetCondition(s.atkcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetCost(s.atkcost) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) @@ -35,13 +35,10 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} s.listed_names={62835876} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) - return c:IsSetCard(0xb1) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -61,11 +58,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local atk=cc:GetAttack() local def=cc:GetDefense() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-atk) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -86,7 +83,7 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3534077.lua b/official/c3534077.lua index 0738373570..731435f22a 100644 --- a/official/c3534077.lua +++ b/official/c3534077.lua @@ -1,4 +1,5 @@ --熱血獣士ウルフバーク +--Coach Soldier Wolfbark local s,id=GetID() function s.initial_effect(c) --spsummon @@ -31,13 +32,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c35346968.lua b/official/c35346968.lua index e8a0bff1ce..46dfd0332d 100644 --- a/official/c35346968.lua +++ b/official/c35346968.lua @@ -20,4 +20,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) if ep~=tp then return end Duel.Recover(tp,500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3536537.lua b/official/c3536537.lua index 7474f603aa..d11dceecf2 100644 --- a/official/c3536537.lua +++ b/official/c3536537.lua @@ -1,4 +1,5 @@ --ヴェルズ・ザッハーク +--Evilswarm Zahak local s,id=GetID() function s.initial_effect(c) --destroy @@ -19,7 +20,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.filter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsLevelAbove(5) and c:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -33,4 +34,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35394356.lua b/official/c35394356.lua index a8f2b369a3..186a07e608 100644 --- a/official/c35394356.lua +++ b/official/c35394356.lua @@ -47,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -62,4 +62,4 @@ end --Detach substitution function s.rop(e,tp,eg,ep,ev,re,r,rp) return Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c35405755.lua b/official/c35405755.lua index 2173be8cad..c0a3f7c355 100644 --- a/official/c35405755.lua +++ b/official/c35405755.lua @@ -1,5 +1,5 @@ --倶利伽羅天童 ---Kurikara the Immovable Avatar +--Kurikara Divincarnate --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -45,8 +45,8 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local loc,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER) local tc=re:GetHandler() - if re:IsActiveType(TYPE_MONSTER) and tc:IsRelateToEffect(re) and loc==LOCATION_MZONE and p==1-Duel.GetTurnPlayer() then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if re:IsMonsterEffect() and tc:IsRelateToEffect(re) and loc==LOCATION_MZONE and p==1-Duel.GetTurnPlayer() then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.tfilter(c) @@ -68,7 +68,7 @@ function s.spprocop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) diff --git a/official/c35419032.lua b/official/c35419032.lua index a8c6100a17..25cb8245e2 100644 --- a/official/c35419032.lua +++ b/official/c35419032.lua @@ -1,4 +1,5 @@ --侵略の侵喰感染 +--Infestation Infection local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,20 +24,20 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xa} +s.listed_series={SET_LSWARM} function s.cfilter(c) - return c:IsSetCard(0xa) and c:IsMonster() and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + return c:IsSetCard(SET_LSWARM) and c:IsMonster() and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) end function s.afilter(c) - return c:IsSetCard(0xa) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_LSWARM) and c:IsMonster() and c:IsAbleToHand() end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) + if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.afilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if g:GetFirst():IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,g) end @@ -44,7 +45,7 @@ function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e:SetLabel(1) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) else e:SetCategory(0) e:SetLabel(0) @@ -61,9 +62,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if g:GetFirst():IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,g) end @@ -73,5 +74,5 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and Duel.IsExistingMatchingCard(s.afilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1) -end + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c35429292.lua b/official/c35429292.lua index 85bfaa3b6b..f81114e0da 100644 --- a/official/c35429292.lua +++ b/official/c35429292.lua @@ -1,4 +1,5 @@ --ピクシーナイト +--Pixie Knight local s,id=GetID() function s.initial_effect(c) --to deck @@ -29,6 +30,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3544583.lua b/official/c3544583.lua index 4d97b0b16b..d3e9a1719a 100644 --- a/official/c3544583.lua +++ b/official/c3544583.lua @@ -1,9 +1,9 @@ --無の畢竟 オールヴェイン ---Allvain, the Final Nothingness +--Allvain the Essence of Vanity --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) --Fusion Summon c:EnableReviveLimit() Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsType,TYPE_NORMAL),2) -end +end \ No newline at end of file diff --git a/official/c35448319.lua b/official/c35448319.lua index cb552f6840..eaba73f743 100644 --- a/official/c35448319.lua +++ b/official/c35448319.lua @@ -1,4 +1,5 @@ --除草獣 +--Snyffus local s,id=GetID() function s.initial_effect(c) --destroy @@ -68,8 +69,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c35464895.lua b/official/c35464895.lua index 58ae486fd7..d4ad562960 100644 --- a/official/c35464895.lua +++ b/official/c35464895.lua @@ -1,4 +1,5 @@ --デステニー・シグナル +--Destiny Signal local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.cfilter(c,tp) return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) end @@ -19,18 +20,18 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35479109.lua b/official/c35479109.lua index e954ab24c0..f066c58a0f 100644 --- a/official/c35479109.lua +++ b/official/c35479109.lua @@ -1,5 +1,5 @@ --砂塵の大ハリケーン ---Twin Dust Trunade +--Double Dust Tornado Twins --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_SSET+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_SSET|TIMING_END_PHASE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -58,4 +58,4 @@ function s.rescon(sg,e,tp,mg) return sg:FilterCount(Card.IsSSetable,nil)==#sg and sg:FilterCount(aux.NOT(Card.IsType),nil,TYPE_FIELD)<=Duel.GetLocationCount(tp,LOCATION_SZONE) and sg:FilterCount(Card.IsType,nil,TYPE_FIELD)<=1 -end +end \ No newline at end of file diff --git a/official/c35480699.lua b/official/c35480699.lua index 48d5d81978..2f9f3f57c7 100644 --- a/official/c35480699.lua +++ b/official/c35480699.lua @@ -1,4 +1,5 @@ --皆既日蝕の書 +--Book of Eclipse local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCondition(s.flipcon) e1:SetOperation(s.flipop) Duel.RegisterEffect(e1,tp) @@ -37,4 +38,4 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) local ct=Duel.ChangePosition(g,POS_FACEUP_DEFENSE) Duel.Draw(1-tp,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35486099.lua b/official/c35486099.lua index 2799a3e6bd..e7dc43f4d6 100644 --- a/official/c35486099.lua +++ b/official/c35486099.lua @@ -1,4 +1,5 @@ --宝玉の恵み +--Crystal Blessing local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.filter(c) - return c:IsSetCard(0x1034) and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and not c:IsForbidden() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -47,10 +48,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end - Duel.RaiseEvent(sg,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(sg,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end -end +end \ No newline at end of file diff --git a/official/c35487920.lua b/official/c35487920.lua index fa293afc28..6430865877 100644 --- a/official/c35487920.lua +++ b/official/c35487920.lua @@ -66,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35488287.lua b/official/c35488287.lua index e3cfd39c15..7ede39c5dc 100644 --- a/official/c35488287.lua +++ b/official/c35488287.lua @@ -1,7 +1,6 @@ --寿炎星-リシュンマオ --Brotherhood of the Fire Fist - Panda --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -28,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x7c,0x79} +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x7c) + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FIRE_FORMATION) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end @@ -38,10 +37,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_FIRE_FIST) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0x79) + return not c:IsSetCard(SET_FIRE_FIST) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then @@ -66,12 +65,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x79) and c:IsFaceup() + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_FIRE_FIST) and c:IsFaceup() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:GetReasonPlayer()~=tp end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -81,10 +80,10 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local sg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Hint(HINT_CARD,0,id) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_REPLACE) return true else return false end end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c3549275.lua b/official/c3549275.lua index 9138566d45..eb8c84d9f8 100644 --- a/official/c3549275.lua +++ b/official/c3549275.lua @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,d1*500,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c35494087.lua b/official/c35494087.lua index bb33f81847..ec43f4c57c 100644 --- a/official/c35494087.lua +++ b/official/c35494087.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1) e1:SetCondition(s.spcon) @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetCondition(s.sdcon) c:RegisterEffect(e4) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FilterEqualFunction(Card.GetSummonLocation,LOCATION_EXTRA),tp,0,LOCATION_MZONE,1,nil) end @@ -51,11 +51,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.indval(e,c) - return c:IsSummonType(SUMMON_TYPE_NORMAL) + return c:IsNormalSummoned() end function s.refval(e,c) if e:GetHandler():GetFlagEffect(id)~=0 then - Duel.RegisterFlagEffect(e:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(e:GetHandlerPlayer(),id,RESET_PHASE|PHASE_END,0,1) e:GetHandler():ResetFlagEffect(id) return true elseif Duel.GetFlagEffect(e:GetHandlerPlayer(),id)==0 then @@ -64,8 +64,8 @@ function s.refval(e,c) else return false end end function s.sdfilter(c) - return c:IsFaceup() and not c:IsSetCard(0x2016) + return c:IsFaceup() and not c:IsSetCard(SET_SPEEDROID) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c35498188.lua b/official/c35498188.lua index 876d0228d8..1196e0e42f 100644 --- a/official/c35498188.lua +++ b/official/c35498188.lua @@ -24,11 +24,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -58,7 +58,7 @@ function s.costfilter(c) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsSSetable() end @@ -69,5 +69,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end - +end \ No newline at end of file diff --git a/official/c35514096.lua b/official/c35514096.lua index 681c1584ee..685bea9ce6 100644 --- a/official/c35514096.lua +++ b/official/c35514096.lua @@ -64,4 +64,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c35537251.lua b/official/c35537251.lua index 1c92660671..d1e4304fce 100644 --- a/official/c35537251.lua +++ b/official/c35537251.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x84) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_BATTLIN_BOXER) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +40,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35537860.lua b/official/c35537860.lua index c8ac6a429e..66eedbd866 100644 --- a/official/c35537860.lua +++ b/official/c35537860.lua @@ -1,4 +1,5 @@ --精神同調波 +--Synch Blast Wave local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35539880.lua b/official/c35539880.lua index 9cf9549e49..b429702a39 100644 --- a/official/c35539880.lua +++ b/official/c35539880.lua @@ -1,4 +1,5 @@ --正統なる血統 +--Birthright local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,7 +31,7 @@ function s.filter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -57,4 +58,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35544402.lua b/official/c35544402.lua index 1c75d82f8e..40a122efcb 100644 --- a/official/c35544402.lua +++ b/official/c35544402.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_CONSTELLAR) and c:HasLevel() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -40,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) if Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))==0 then e1:SetValue(1) else e1:SetValue(2) end @@ -48,12 +48,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x53) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c35546670.lua b/official/c35546670.lua index 1cd10be7be..f9e3318c90 100644 --- a/official/c35546670.lua +++ b/official/c35546670.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x10c)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MEKK_KNIGHT)) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetValue(300) c:RegisterEffect(e2) @@ -41,14 +41,14 @@ function s.initial_effect(c) e5:SetOperation(s.tgop) c:RegisterEffect(e5) end -s.listed_series={0x10c,0xfe} +s.listed_series={SET_MEKK_KNIGHT,SET_WORLD_LEGACY} function s.costfilter1(c) - return ((c:IsSetCard(0x10c) and c:IsMonster()) or c:IsSetCard(0xfe)) and c:IsDiscardable() + return ((c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster()) or c:IsSetCard(SET_WORLD_LEGACY)) and c:IsDiscardable() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter1,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.DiscardHand(tp,s.costfilter1,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter1,1,1,REASON_DISCARD|REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -62,10 +62,10 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.costfilter2(c) - return c:IsSetCard(0x10c) and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.costfilter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.costfilter2,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,8,8,aux.dncheck,0) end local rg=aux.SelectUnselectGroup(g,e,tp,8,8,aux.dncheck,1,tp,HINTMSG_REMOVE) if rg then @@ -73,13 +73,12 @@ function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND|LOCATION_EXTRA,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND|LOCATION_EXTRA,nil) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,nil) + local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_HAND|LOCATION_EXTRA,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c35561352.lua b/official/c35561352.lua index 37668b9e29..f76c3ca2c7 100644 --- a/official/c35561352.lua +++ b/official/c35561352.lua @@ -1,4 +1,5 @@ --セフィラの神撃 +--Zefra Divine Strike local s,id=GetID() function s.initial_effect(c) --Activate(effect) @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc4} +s.listed_series={SET_ZEFRA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc4) and c:IsAbleToRemoveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_ZEFRA) and c:IsAbleToRemoveAsCost() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35563539.lua b/official/c35563539.lua index ecd4c9fd4b..1a20e93d29 100644 --- a/official/c35563539.lua +++ b/official/c35563539.lua @@ -1,4 +1,5 @@ --精霊の鏡 +--Mystical Refpanel local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsHasProperty(EFFECT_FLAG_PLAYER_TARGET) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -23,4 +24,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(ev,CHAININFO_TARGET_PLAYER) Duel.ChangeTargetPlayer(ev,1-p) -end +end \ No newline at end of file diff --git a/official/c35577420.lua b/official/c35577420.lua index 09dc87bbd2..5884a2a06d 100644 --- a/official/c35577420.lua +++ b/official/c35577420.lua @@ -19,14 +19,14 @@ function s.initial_effect(c) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.cfilter(c) return c:GetPreviousLocation()==LOCATION_DECK end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - return rp==tp and (r&REASON_EFFECT)~=0 and rc:IsSetCard(0x38) and rc:IsMonster() + return rp==tp and (r&REASON_EFFECT)~=0 and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsMonster() and eg:IsExists(s.cfilter,1,nil) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -39,4 +39,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetDecktopGroup(1-tp,1) Duel.DisableShuffleCheck() Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35595518.lua b/official/c35595518.lua index daa05a2713..c617ac6020 100644 --- a/official/c35595518.lua +++ b/official/c35595518.lua @@ -1,4 +1,5 @@ --リンクスレイヤー +--Linkslayer local s,id=GetID() function s.initial_effect(c) --spsummon proc @@ -29,17 +30,17 @@ function s.spcon(e,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local rt=Duel.GetTargetCount(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local rt=Duel.GetTargetCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if rt>2 then rt=2 end - local ct=Duel.DiscardHand(tp,nil,1,rt,REASON_DISCARD+REASON_COST) + local ct=Duel.DiscardHand(tp,nil,1,rt,REASON_DISCARD|REASON_COST) e:SetLabel(ct) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end local ct=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) @@ -48,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if #rg>0 then Duel.Destroy(rg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3560069.lua b/official/c3560069.lua index 6f91febc27..4ffc5ca894 100644 --- a/official/c3560069.lua +++ b/official/c3560069.lua @@ -56,5 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) e:GetHandler():ResetFlagEffect(511600046) -end - +end \ No newline at end of file diff --git a/official/c35606858.lua b/official/c35606858.lua index 8cdc310e7e..8caab062c3 100644 --- a/official/c35606858.lua +++ b/official/c35606858.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c35618217.lua b/official/c35618217.lua index 6a6a30b102..a29e9a1239 100644 --- a/official/c35618217.lua +++ b/official/c35618217.lua @@ -32,17 +32,17 @@ function s.initial_effect(c) e3:SetOperation(s.actop) c:RegisterEffect(e3) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} s.listed_names={CARD_POLYMERIZATION} function s.costfilter(c,ec) - return c:IsSetCard(0xdf) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and c:IsAbleToGraveAsCost() and not c:IsSummonCode(nil,SUMMON_TYPE_FUSION,PLAYER_NONE,ec:GetCode(nil,SUMMON_TYPE_FUSION)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,c) + local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,c) Duel.SendtoGrave(cg,REASON_COST) e:SetLabel(cg:GetFirst():GetCode()) end @@ -53,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) e1:SetOperation(s.chngcon) c:RegisterEffect(e1) @@ -88,10 +88,10 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.actcon) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actcon(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE -end + return Duel.IsBattlePhase() +end \ No newline at end of file diff --git a/official/c35618486.lua b/official/c35618486.lua index 50cefe15ed..aef446aa84 100644 --- a/official/c35618486.lua +++ b/official/c35618486.lua @@ -1,4 +1,5 @@ --インヴェルズの先鋭 +--Steelswarm Sting local s,id=GetID() function s.initial_effect(c) --destroy @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35622739.lua b/official/c35622739.lua index a31859a1b5..baff78e3c2 100644 --- a/official/c35622739.lua +++ b/official/c35622739.lua @@ -1,20 +1,20 @@ --- ジェムナイト・クォーツ --- Gem-Knight Quartz --- Scripted by Hatter +--ジェムナイト・クォーツ +--Gem-Knight Quartz +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Set 1 "Fusion" Continuous Spell + --Set 1 "Fusion" Continuous Spell local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(function(_,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) - e1:SetCost(s.setcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) - -- Add 1 "Gem-Knight" monster to hand + --Add 1 "Gem-Knight" monster to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -28,14 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x46,0x1047} -function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_FUSION,SET_GEM_KNIGHT} function s.setfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSetCard(0x46) and c:IsSSetable() + return c:IsContinuousSpell() and c:IsSetCard(SET_FUSION) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,25 +42,25 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g) end local c=e:GetHandler() - -- Cannot Special Summon from the Extra Deck, except "Gem-Knight" monsters + --Cannot Special Summon from the Extra Deck, except "Gem-Knight" monsters local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1047) end) + e1:SetReset(RESET_PHASE|PHASE_END) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_GEM_KNIGHT) end) Duel.RegisterEffect(e1,tp) - -- Clock Lizard check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalSetCard(0x1047) end) + --Clock Lizard check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalSetCard(SET_GEM_KNIGHT) end) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&REASON_FUSION)==REASON_FUSION and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceup() + return (r&REASON_FUSION)==REASON_FUSION and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and c:IsFaceup() end function s.thfilter(c) - return c:IsSetCard(0x1047) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end diff --git a/official/c35629124.lua b/official/c35629124.lua index a991fc7a32..40b3684daf 100644 --- a/official/c35629124.lua +++ b/official/c35629124.lua @@ -27,13 +27,13 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) e2:SetTarget(s.sumlimit) Duel.RegisterEffect(e2,tp) @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35631584.lua b/official/c35631584.lua index dd60c71fed..0039063345 100644 --- a/official/c35631584.lua +++ b/official/c35631584.lua @@ -1,4 +1,5 @@ --セイクリッドの星痕 +--Constellar Star Chart local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,9 +21,9 @@ function s.initial_effect(c) e2:SetOperation(s.op) c:RegisterEffect(e2) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.gfilter(c,tp) - return c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) and c:IsControler(tp) + return c:IsSetCard(SET_CONSTELLAR) and c:IsType(TYPE_XYZ) and c:IsControler(tp) end function s.con(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.gfilter,1,nil,tp) @@ -37,4 +38,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35638627.lua b/official/c35638627.lua index 0ee32b594d..c5c3fed954 100644 --- a/official/c35638627.lua +++ b/official/c35638627.lua @@ -1,4 +1,5 @@ --ワーム・ウォーロード +--Worm Warlord local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -30,12 +31,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) tc:RegisterEffect(e2) end end @@ -44,4 +45,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c35645105.lua b/official/c35645105.lua index 756ef532d8..4fb6c8a237 100644 --- a/official/c35645105.lua +++ b/official/c35645105.lua @@ -1,5 +1,5 @@ --無限起動ハーヴェスター ---Infinite Ignition Harvester +--Infinitrack Harvester --Scripted by Naim local s,id = GetID() function s.initial_effect(c) @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.lvop) c:RegisterEffect(e3) end -s.listed_series={0x127} +s.listed_series={SET_INFINITRACK} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x127) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_INFINITRACK) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -67,7 +67,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(lv) oc:RegisterEffect(e1) end diff --git a/official/c35659410.lua b/official/c35659410.lua index 39108a5e35..a0caeb80e2 100644 --- a/official/c35659410.lua +++ b/official/c35659410.lua @@ -1,16 +1,16 @@ --- 青き眼の幻出 --- Apparition with Eyes of Blue --- Scripted by Hatter +--青き眼の幻出 +--Vision with Eyes of Blue +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.acttg) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) @@ -23,7 +23,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_BLUEEYES_W_DRAGON} -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if s.spcost(e,tp,eg,ep,ev,re,r,rp,0) and s.sptg(e,tp,eg,ep,ev,re,r,rp,0) @@ -67,7 +67,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thspfilter(c,e,tp,thc) - return (thc:IsOriginalCode(CARD_BLUEEYES_W_DRAGON) or c:IsSetCard(0xdd)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (thc:IsOriginalCode(CARD_BLUEEYES_W_DRAGON) or c:IsSetCard(SET_BLUE_EYES)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -86,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c35686187.lua b/official/c35686187.lua index b6f2d4007d..5f6bed6163 100644 --- a/official/c35686187.lua +++ b/official/c35686187.lua @@ -1,4 +1,5 @@ --断頭台の惨劇 +--Tragedy local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35686188.lua b/official/c35686188.lua deleted file mode 100644 index 0b4709f0ea..0000000000 --- a/official/c35686188.lua +++ /dev/null @@ -1,33 +0,0 @@ ---断頭台の惨劇(EU) -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_CHANGE_POS) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:IsPosition(POS_FACEUP_DEFENSE) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,1-tp) -end -function s.filter(c) - return c:IsDefensePos() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - if #g>0 then - Duel.Destroy(g,REASON_EFFECT) - end -end diff --git a/official/c35699.lua b/official/c35699.lua index 39de587db7..9b29dbc5f0 100644 --- a/official/c35699.lua +++ b/official/c35699.lua @@ -44,19 +44,19 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} s.listed_names={41091257} function s.sprfilter(c,tp) - return c:IsSetCard(0xee) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SPYRAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.sprcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>=3 and aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),0) end function s.sprtg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -73,10 +73,10 @@ function s.sprop(e,tp,eg,ep,ev,re,r,rp,c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0xee),tp,LOCATION_ONFIELD,0,1,nil) + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_SPYRAL),tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0xee),tp,LOCATION_ONFIELD,0,1,1,nil) + local g1=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_SPYRAL),tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil) g1:Merge(g2) @@ -90,7 +90,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) return c:IsCode(41091257) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -99,16 +99,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0) if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c35705817.lua b/official/c35705817.lua index d49e4a5961..bbe8e5e685 100644 --- a/official/c35705817.lua +++ b/official/c35705817.lua @@ -6,13 +6,13 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -local LOCATION_HAND_DECK_GRAVE=LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE +local LOCATION_HAND_DECK_GRAVE=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE function s.fcheck(tp,sg,fc) return sg:FilterCount(Card.IsLocation,nil,LOCATION_HAND_DECK_GRAVE)<=1 end function s.fextra(e,tp,mg) - if Duel.GetLP(tp)0 then return eg,s.fcheck end @@ -32,4 +32,4 @@ end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND_DECK_GRAVE) -end +end \ No newline at end of file diff --git a/official/c35726888.lua b/official/c35726888.lua index e5d9df76ba..91fd2256aa 100644 --- a/official/c35726888.lua +++ b/official/c35726888.lua @@ -1,4 +1,5 @@ --おろかな副葬 +--Foolish Burial Goods local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3574681.lua b/official/c3574681.lua index cc0aad1ee3..c8e750a097 100644 --- a/official/c3574681.lua +++ b/official/c3574681.lua @@ -62,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end if chkct~=2 then return end - Duel.RaiseEvent(tg,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(tg,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local eq=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,tg):GetFirst() diff --git a/official/c35752363.lua b/official/c35752363.lua index f094d4a6e7..b167bf66cb 100644 --- a/official/c35752363.lua +++ b/official/c35752363.lua @@ -1,7 +1,8 @@ --朱雀 +--Vermillion Sparrow local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,62403074,71407486) -end +end \ No newline at end of file diff --git a/official/c3576031.lua b/official/c3576031.lua index 45c2161808..7caf11e713 100644 --- a/official/c3576031.lua +++ b/official/c3576031.lua @@ -1,4 +1,5 @@ --クリスタルP +--Crystolic Potential local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(300) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xea)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_CRYSTRON)) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) @@ -45,11 +46,11 @@ function s.initial_effect(c) end) end) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - if tc:IsSetCard(0xea) and tc:IsSummonType(SUMMON_TYPE_SYNCHRO) then + if tc:IsSetCard(SET_CRYSTRON) and tc:IsSynchroSummoned() then local p=tc:GetSummonPlayer() s[p]=s[p]+1 end @@ -65,4 +66,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Draw(tp,s[tp],REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35762283.lua b/official/c35762283.lua index b42e36a938..19184b3452 100644 --- a/official/c35762283.lua +++ b/official/c35762283.lua @@ -1,4 +1,5 @@ --凡骨の意地 +--Heart of the Underdog local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW + return Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) end function s.filter(c) return c:IsType(TYPE_NORMAL) and not c:IsPublic() @@ -48,4 +49,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35770983.lua b/official/c35770983.lua index 3f56c2a21d..f66342c9d3 100644 --- a/official/c35770983.lua +++ b/official/c35770983.lua @@ -8,9 +8,9 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) --to grave @@ -21,17 +21,13 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if not tc then return false end if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc~=e:GetHandler() and tc:IsSetCard(0x11a) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return tc and tc~=e:GetHandler() and tc:IsSetCard(SET_DINOWRESTLER) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -43,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) if b:IsRelateToBattle() and not b:IsImmuneToEffect(e) then local e2=Effect.CreateEffect(c) @@ -53,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetLabelObject(b) e2:SetRange(LOCATION_MZONE) e2:SetOperation(s.atkop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) b:RegisterEffect(e2) end end @@ -65,7 +61,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(b:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) b:RegisterEffect(e1) end end @@ -80,7 +76,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,id) e1:SetTarget(s.sstg) e1:SetOperation(s.ssop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -91,13 +87,13 @@ function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ssop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then + if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c35772782.lua b/official/c35772782.lua index 25aef902e3..0d309d244d 100644 --- a/official/c35772782.lua +++ b/official/c35772782.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -29,11 +29,7 @@ end s.roll_dice=true s.xyz_number=67 function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) + return Duel.IsPhase(PHASE_MAIN1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,p) --cannot attack local e2=Effect.CreateEffect(e:GetHandler()) @@ -61,18 +57,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,p) --client hint local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,2)) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,p) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.dicecon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -94,6 +90,6 @@ function s.diceop(e,tp,eg,ep,ev,re,r,rp) dc[ac]=7 Duel.SetDiceResult(table.unpack(dc)) s[0]=cid - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end -end +end \ No newline at end of file diff --git a/official/c35787450.lua b/official/c35787450.lua index ca764d5724..4c5d9f037a 100644 --- a/official/c35787450.lua +++ b/official/c35787450.lua @@ -29,4 +29,4 @@ function s.addc(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsCode(75041269) then tc:AddCounter(0x1b,2) end -end +end \ No newline at end of file diff --git a/official/c35798491.lua b/official/c35798491.lua index 4f79cbd455..c88d176c03 100644 --- a/official/c35798491.lua +++ b/official/c35798491.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c3580032.lua b/official/c3580032.lua index 41b900c336..62c25e43b3 100644 --- a/official/c3580032.lua +++ b/official/c3580032.lua @@ -19,9 +19,9 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(0,TIMING_END_PHASE|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sctg) e2:SetOperation(s.scop) c:RegisterEffect(e2) @@ -32,17 +32,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) - e3:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) + e3:SetHintTiming(0,TIMING_END_PHASE|TIMINGS_CHECK_MONSTER) e3:SetCountLimit(1,{id,2}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.xyztg) e3:SetOperation(s.xyzop) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.counterfilter(c) - return c:IsSetCard(0x107a) + return c:IsSetCard(SET_NOBLE_KNIGHT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() @@ -54,15 +54,15 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x107a) + return not c:IsSetCard(SET_NOBLE_KNIGHT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -79,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.scfilter(c) - return c:IsSetCard(0x107a) and c:IsSynchroSummonable(nil) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsSynchroSummonable(nil) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -94,7 +94,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) end end function s.xyzfilter(c) - return c:IsSetCard(0x107a) and c:IsXyzSummonable() + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsXyzSummonable() end function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -107,4 +107,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) local tg=g:Select(tp,1,1,nil) Duel.XyzSummon(tp,tg:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c35800511.lua b/official/c35800511.lua index ba70f5b91a..c962689cb2 100644 --- a/official/c35800511.lua +++ b/official/c35800511.lua @@ -1,4 +1,5 @@ --超重武者装留バスター・ガントレット +--Superheavy Samurai Soulbuster Gauntlet local s,id=GetID() function s.initial_effect(c) --equip @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -18,13 +19,13 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfToGrave) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) and chkc~=e:GetHandler() end @@ -46,31 +47,27 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(400) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) - return c:IsSetCard(0x9a) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) then return false end + if Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) then return false end local phase=Duel.GetCurrentPhase() if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsSetCard(0x9a) and tc:IsDefensePos() and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return tc and tc:IsSetCard(SET_SUPERHEAVY_SAMURAI) and tc:IsDefensePos() and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -80,7 +77,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(def*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c35803249.lua b/official/c35803249.lua index e120a11e1c..84307f6c54 100644 --- a/official/c35803249.lua +++ b/official/c35803249.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_TRIGGER) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetRange(LOCATION_MZONE) - e3:SetTargetRange(LOCATION_HAND+LOCATION_SZONE,LOCATION_HAND+LOCATION_SZONE) + e3:SetTargetRange(LOCATION_HAND|LOCATION_SZONE,LOCATION_HAND|LOCATION_SZONE) e3:SetTarget(aux.TargetBoolFunction(Card.IsTrap)) c:RegisterEffect(e3) --negate @@ -64,15 +64,15 @@ function s.initial_effect(c) c:RegisterEffect(e7) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_names={77585513} +s.listed_names={CARD_JINZO} function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then + if tl==LOCATION_SZONE and re:IsTrapEffect() then Duel.NegateEffect(ev) end end function s.spfilter(c) - return c:IsFaceup() and c:IsCode(77585513) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsCode(CARD_JINZO) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -111,4 +111,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local ct=Duel.Destroy(sg,REASON_EFFECT) Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c35809262.lua b/official/c35809262.lua index 6e1fcb2fc3..4b3026e414 100644 --- a/official/c35809262.lua +++ b/official/c35809262.lua @@ -1,4 +1,5 @@ --E・HERO フレイム・ウィングマン +--Elemental HERO Flame Wingman local s,id=GetID() function s.initial_effect(c) --fusion material @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -47,4 +48,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if dam<0 then dam=0 end Duel.Damage(p,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35817848.lua b/official/c35817848.lua index f47c8cb294..d36e5b93af 100644 --- a/official/c35817848.lua +++ b/official/c35817848.lua @@ -1,3 +1,4 @@ +--シンクロ・トランスミッション --Synchro Transmission local s,id=GetID() function s.initial_effect(c) @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.tdcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -58,8 +59,8 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_EXTRA) then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_EXTRA) then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35818851.lua b/official/c35818851.lua index d93538c3e1..3059b3b51f 100644 --- a/official/c35818851.lua +++ b/official/c35818851.lua @@ -1,4 +1,5 @@ --不知火の武士 +--Shiranui Samurai local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,18 +28,15 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} s.listed_names={id} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -48,13 +46,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BATTLED) e2:SetOperation(s.rmop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end @@ -65,7 +63,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0xd9) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SHIRANUI) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -76,7 +74,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35834119.lua b/official/c35834119.lua index 09bad28627..c76b2a3fc2 100644 --- a/official/c35834119.lua +++ b/official/c35834119.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.descon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c35842855.lua b/official/c35842855.lua index c7a1a8d14a..c8074e6fd5 100644 --- a/official/c35842855.lua +++ b/official/c35842855.lua @@ -1,4 +1,5 @@ --炎霊神パイロレクス +--Pyrorex the Elemental Lord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -70,12 +71,12 @@ function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()==effp then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,effp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c35848254.lua b/official/c35848254.lua index c095a837a5..d71795b548 100644 --- a/official/c35848254.lua +++ b/official/c35848254.lua @@ -1,4 +1,5 @@ --フォトン・リード +--Photon Lead local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c35866404.lua b/official/c35866404.lua index a01906d2b0..a862e7abce 100644 --- a/official/c35866404.lua +++ b/official/c35866404.lua @@ -1,4 +1,5 @@ --グランドラン +--Grandram local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c35870016.lua b/official/c35870016.lua index 2e6ee98cf6..25852a9b46 100644 --- a/official/c35870016.lua +++ b/official/c35870016.lua @@ -1,7 +1,6 @@ --剛鬼フィニッシュホールド ---Gouki Finisher +--Gouki Finishing Move --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Targeted "Gouki" link monster gains ATK equal to its link rating x 1000 @@ -15,11 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfc} - +s.listed_series={SET_GOUKI} function s.filter(c) return c:IsFaceup() and c:IsLinkMonster() - and c:IsSetCard(0xfc) and c:IsLinkAbove(1) + and c:IsSetCard(SET_GOUKI) and c:IsLinkAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -35,8 +33,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ge1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) ge1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) ge1:SetTargetRange(LOCATION_MZONE,0) - ge1:SetTarget(function(e,c) return not c:IsSetCard(0xfc) end) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --Client hint aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) @@ -49,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(function(e,c) return c:GetLink()*1000 end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Inflict piercing damage local e2=Effect.CreateEffect(c) @@ -57,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c35871958.lua b/official/c35871958.lua index 87f1dd65b5..494438f4cd 100644 --- a/official/c35871958.lua +++ b/official/c35871958.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(s.dacon) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x8d)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GHOSTRICK)) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) @@ -32,14 +32,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.matfilter(c,lc,stype,tp) - return c:IsSetCard(0x8d,lc,stype,tp) and not c:IsType(TYPE_LINK,lc,stype,tp) + return c:IsSetCard(SET_GHOSTRICK,lc,stype,tp) and not c:IsType(TYPE_LINK,lc,stype,tp) end function s.extraval(chk,summon_type,e,...) if chk==0 then @@ -52,18 +52,13 @@ function s.extraval(chk,summon_type,e,...) end end function s.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),0,LOCATION_FZONE,LOCATION_FZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),0,LOCATION_FZONE,LOCATION_FZONE,1,nil) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GHOSTRICK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 @@ -78,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c35877582.lua b/official/c35877582.lua index fbe2565789..58e368f60a 100644 --- a/official/c35877582.lua +++ b/official/c35877582.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) @@ -57,7 +57,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) diff --git a/official/c35884610.lua b/official/c35884610.lua index 5b00cdc873..4c5f4e2ad4 100644 --- a/official/c35884610.lua +++ b/official/c35884610.lua @@ -2,7 +2,7 @@ --U.A. Powered Jersey local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0xb2)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_UA)) --ATK increase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -34,7 +34,7 @@ function s.initial_effect(c) e5:SetCategory(CATEGORY_REMOVE) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e5:SetRange(LOCATION_SZONE) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetCountLimit(1) e5:SetCondition(s.rmcon) e5:SetTarget(s.rmtg) @@ -52,7 +52,7 @@ function s.initial_effect(c) e6:SetOperation(s.thop) c:RegisterEffect(e6) end -s.listed_series={0xb2} +s.listed_series={SET_UA} function s.damcon(e) return e:GetHandler():GetEquipTarget():GetBattleTarget()~=nil end @@ -70,11 +70,11 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -99,4 +99,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35906693.lua b/official/c35906693.lua index deffcb25dc..5eaeac6add 100644 --- a/official/c35906693.lua +++ b/official/c35906693.lua @@ -3,121 +3,118 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --Activate + --To activate this card, you must draw it for your normal draw in your Draw Phase, reveal it, and keep it revealed until the Main Phase 1 + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EVENT_DRAW) + e0:SetCondition(function(e) return Duel.IsPhase(PHASE_DRAW) and e:GetHandler():IsReason(REASON_RULE) end) + e0:SetOperation(s.regop) + c:RegisterEffect(e0) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_DRAW) - e1:SetCondition(s.regcon) - e1:SetOperation(s.regop) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCondition(function() return Duel.IsPhase(PHASE_MAIN1) end) + e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():HasFlagEffect(id) end end) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_ACTIVATE) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) - e2:SetTarget(s.target) - c:RegisterEffect(e2) -end -s.listed_series={0x107f,0x107e} -function s.regcon(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return Duel.GetFlagEffect(tp,id)==0 and Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_RULE) end +s.listed_series={SET_UTOPIA,SET_ZW} function s.regop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then + if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local c=e:GetHandler() + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) + --Reveal it, and keep it revealed until the Main Phase 1 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end -end -function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107f) -end -function s.filter2(c,e,tp) - return s.filter(c) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) +function s.tgfilter(c,e,tp,eq_chk) + return c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ) and c:IsFaceup() and (eq_chk or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)) end function s.spfilter(c,e,tp,mc) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsSetCard(0x107f) and not c:IsCode(mc:GetCode()) and mc:IsCanBeXyzMaterial(c,tp) - and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,true,false) + return c:IsSetCard(SET_UTOPIA) and not c:IsCode(mc:GetCode()) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.eqfilter(c,tp) - return c:IsSetCard(0x107e) and c:IsMonster() and c:CheckUniqueOnField(tp) and not c:IsForbidden() + return c:IsSetCard(SET_ZW) and c:IsMonster() and c:CheckUniqueOnField(tp) and not c:IsForbidden() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then local b=chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) - if e:GetLabel()==0 then return b and s.filter(chkc) - else return b and s.filter2(chkc,e,tp) end + if e:GetLabel()==0 then + return b and s.utopiafilter(chkc) + else + return b and s.filter2(chkc,e,tp) + end end - local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) - local b1=Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,tp) and (ct>1 or (ct>0 and not e:GetHandler():IsLocation(LOCATION_HAND))) - local b2=Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,0,1,nil,e,tp) + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if e:GetHandler():IsLocation(LOCATION_HAND) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then ft=ft-1 end + local eq_chk=ft>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,tp) + --Equip any number of "ZW -" monsters with different names from your Deck/Extra Deck to it + local b1=eq_chk and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,eq_chk) + --Special Summon from your Extra Deck, 1 "Utopia" Xyz Monster with a different name from that target, by using that target as material + local b2=Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,false) if chk==0 then return b1 or b2 end - local op=0 - if b1 and b2 then - op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) - elseif b1 then - op=Duel.SelectOption(tp,aux.Stringid(id,1)) - else - op=Duel.SelectOption(tp,aux.Stringid(id,2))+1 - end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local tc=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,eq_chk):GetFirst() + b2=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc) + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,2)}, + {b2,aux.Stringid(id,3)}) e:SetLabel(op) - if op==0 then + if op==1 then e:SetCategory(CATEGORY_EQUIP) - e:SetOperation(s.eqop) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) - else - e:SetCategory(0) - e:SetOperation(s.spop) - Duel.SelectTarget(tp,s.filter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + elseif op==2 then + e:SetCategory(CATEGORY_SPECIAL_SUMMON) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end end -function s.eqop(e,tp,eg,ep,ev,re,r,rp) +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() local tc=Duel.GetFirstTarget() - local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tp) - if tc:IsFaceup() and tc:IsRelateToEffect(e) and #g>0 and ft>0 then + if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end + if op==1 then + --Equip any number of "ZW -" monsters with different names from your Deck/Extra Deck to it + local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) + if ft==0 then return end + local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,tp) + if #g==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dncheck,1,tp,HINTMSG_EQUIP) - local sc=sg:GetFirst() - for sc in aux.Next(sg) do - Duel.Equip(tp,sc,tc,true) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - e1:SetValue(s.eqlimit) - e1:SetLabelObject(tc) - sc:RegisterEffect(e1) + local c=e:GetHandler() + for sc in sg:Iter() do + if Duel.Equip(tp,sc,tc,true,true) then + --Equip limit + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetCode(EFFECT_EQUIP_LIMIT) + e1:SetValue(function(e,c) return c==tc end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) + end end Duel.EquipComplete() - end -end -function s.eqlimit(e,c) - return c==e:GetLabelObject() -end -function s.spop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if not tc or tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) - local sc=g:GetFirst() - if sc then - sc:SetMaterial(tc) - Duel.Overlay(sc,tc) - Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) - sc:CompleteProcedure() + elseif op==2 then + --Special Summon from your Extra Deck, 1 "Utopia" Xyz Monster with a different name from that target, by using that target as material + if tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc):GetFirst() + if sc then + sc:SetMaterial(tc) + Duel.Overlay(sc,tc) + if Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==0 then return end + sc:CompleteProcedure() + end end end diff --git a/official/c35911108.lua b/official/c35911108.lua index 576450ff5c..05aefdb126 100644 --- a/official/c35911108.lua +++ b/official/c35911108.lua @@ -1,4 +1,5 @@ --ランチャー・コマンダー +--Launcher Commander local s,id=GetID() function s.initial_effect(c) --atk/def @@ -53,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3594985.lua b/official/c3594985.lua index 81c59bf7bb..8c26e43512 100644 --- a/official/c3594985.lua +++ b/official/c3594985.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(2,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -111,4 +111,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c35950025.lua b/official/c35950025.lua index bf2aeb6c1f..ce9abf3072 100644 --- a/official/c35950025.lua +++ b/official/c35950025.lua @@ -1,4 +1,5 @@ --銀河騎士 +--Galaxy Knight local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -22,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) + return c:IsFaceup() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -52,11 +53,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c35952884.lua b/official/c35952884.lua index bfb72164e5..ab03f298cd 100644 --- a/official/c35952884.lua +++ b/official/c35952884.lua @@ -62,7 +62,7 @@ function s.valcheck(e,c) e:GetLabelObject():SetLabel(ct) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>0 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()>0 end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,7 +70,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct-1) c:RegisterEffect(e1) end @@ -104,4 +104,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if tg then Duel.SpecialSummon(tg,0,tp,tp,false,true,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c35956022.lua b/official/c35956022.lua index 4b9c95f4e7..15426c83f6 100644 --- a/official/c35956022.lua +++ b/official/c35956022.lua @@ -1,4 +1,5 @@ --アシッドレイン +--Acidic Downpour local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c359563.lua b/official/c359563.lua index 4bdd465edf..32e1fafb11 100644 --- a/official/c359563.lua +++ b/official/c359563.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -20,10 +20,6 @@ end function s.filter(c,e,tp) return c:IsFaceup() and c:IsCanTurnSet() and c:IsSummonPlayer(1-tp) and (not e or c:IsRelateToEffect(e)) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter,1,nil,nil,tp) end Duel.SetTargetCard(eg) @@ -32,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c35960413.lua b/official/c35960413.lua index 217b200c03..1a1bad93c3 100644 --- a/official/c35960413.lua +++ b/official/c35960413.lua @@ -1,5 +1,5 @@ --コウ・キューピット ---Cupid Archery +--Cupid Fore --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,{id,1}) e2:SetCost(s.lvcst) e2:SetTarget(s.lvtg) @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.lvcst(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.filter1(c,tp) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:HasLevel() @@ -80,7 +80,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c1:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c35975813.lua b/official/c35975813.lua index a8945e2b13..22f3bb9920 100644 --- a/official/c35975813.lua +++ b/official/c35975813.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c35984222.lua b/official/c35984222.lua index 27b0c66733..23b1499e4a 100644 --- a/official/c35984222.lua +++ b/official/c35984222.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -40,8 +40,8 @@ function s.initial_effect(c) end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 or c:IsPreviousLocation(LOCATION_SZONE) then return end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) or c:IsPreviousLocation(LOCATION_SZONE) then return end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,c) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c35998832.lua b/official/c35998832.lua index 4c49e413a5..c6622ea7b2 100644 --- a/official/c35998832.lua +++ b/official/c35998832.lua @@ -1,5 +1,5 @@ --溟界の漠-ゾーハ ---Zoha, Haze of the Abhyss +--Zohah, the Ogdoadic Boundless --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -38,7 +38,7 @@ function s.drcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonLocation(LOCATION_GRAVE) end function s.thfilter(c) - return c:IsSetCard(0x163) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_OGDOADIC) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36006208.lua b/official/c36006208.lua index 76fb48049a..a534c5bcee 100644 --- a/official/c36006208.lua +++ b/official/c36006208.lua @@ -1,4 +1,5 @@ --彼岸の沈溺 +--Fire Lake of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb1) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_BURNING_ABYSS) and c:IsAbleToGraveAsCost() end function s.costfilter(c,rg,dg) local a=0 @@ -86,4 +87,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36010310.lua b/official/c36010310.lua index a92428d565..9895d2d705 100644 --- a/official/c36010310.lua +++ b/official/c36010310.lua @@ -1,5 +1,5 @@ --溟界の滓-ヌル ---Null, Dreg of the Abhyss +--Nunu, the Ogdoadic Remnant --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -26,12 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x163} -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end +s.listed_series={SET_OGDOADIC} function s.tgfilter(c) return c:IsRace(RACE_REPTILE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() end @@ -48,7 +43,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x163),tp,LOCATION_MZONE,0,1,nil) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_OGDOADIC),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -64,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) --Cannot Special Summon, except Reptiles @@ -74,11 +69,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetRange(LOCATION_MZONE) e2:SetAbsoluteRange(tp,1,0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetTarget(s.sumlimit) c:RegisterEffect(e2) end end function s.sumlimit(e,c) return not c:IsRace(RACE_REPTILE) -end +end \ No newline at end of file diff --git a/official/c36016907.lua b/official/c36016907.lua index 1c180b5855..808eb064da 100644 --- a/official/c36016907.lua +++ b/official/c36016907.lua @@ -1,7 +1,6 @@ --ジャック・ア・ボーラン --Jack-o-Bolan --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -35,7 +34,7 @@ function s.hspcfilter(c) end function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.hspcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.hspcfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.hspcfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,7 +48,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()&PHASE_MAIN1+PHASE_MAIN2~=0 and e:GetHandler():IsAbleToRemove(tp) + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() and e:GetHandler():IsAbleToRemove(tp) end function s.spfilter(c,e,tp) return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -72,17 +71,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) Duel.SpecialSummonComplete() if c:IsRelateToEffect(e) then Duel.BreakEffect() --Banish this card until end phase - Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY) + Duel.Remove(c,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(c) e2:SetCountLimit(1) e2:SetOperation(s.retop) diff --git a/official/c36021814.lua b/official/c36021814.lua index 0b5cd2a0f0..57c3bde296 100644 --- a/official/c36021814.lua +++ b/official/c36021814.lua @@ -1,6 +1,5 @@ --ワイトキング --King of the Skull Servants - local s,id=GetID() function s.initial_effect(c) --Original ATK is number of "Skull Servants" in your GY x 1000 @@ -24,7 +23,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_SKULL_SERVANT,id} - function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,CARD_SKULL_SERVANT,id)*1000 end @@ -37,9 +35,9 @@ function s.costfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c36029076.lua b/official/c36029076.lua index 28dc9a5f9f..2ff3e92985 100644 --- a/official/c36029076.lua +++ b/official/c36029076.lua @@ -1,4 +1,5 @@ --地獄大百足 +--Hundred-Footed Horror local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -28,4 +29,4 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1300) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c3603242.lua b/official/c3603242.lua index e6200434f3..b8bd7f8ce7 100644 --- a/official/c3603242.lua +++ b/official/c3603242.lua @@ -1,4 +1,5 @@ --シュレツダー +--Shreddder local s,id=GetID() function s.initial_effect(c) --destroy @@ -41,4 +42,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) and tc:IsLevelBelow(e:GetLabel()) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36033786.lua b/official/c36033786.lua index b4de380832..a5cfb9ef58 100644 --- a/official/c36033786.lua +++ b/official/c36033786.lua @@ -34,7 +34,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(s.attg) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --pierce local e2=Effect.CreateEffect(c) @@ -42,10 +42,10 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_PIERCE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_CYBERSE)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end function s.attg(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c36039163.lua b/official/c36039163.lua index 862dd94b03..0c6d210aee 100644 --- a/official/c36039163.lua +++ b/official/c36039163.lua @@ -1,4 +1,5 @@ --ペンギン・ナイト +--Penguin Knight local s,id=GetID() function s.initial_effect(c) --to deck @@ -22,7 +23,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) - if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then + if Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end end -end +end \ No newline at end of file diff --git a/official/c36042004.lua b/official/c36042004.lua index 6d6b611482..e6c79736d0 100644 --- a/official/c36042004.lua +++ b/official/c36042004.lua @@ -1,4 +1,5 @@ --ベビケラサウルス +--Babycerasaurus local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_DINOSAUR) @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c36042825.lua b/official/c36042825.lua index a0c1083451..6c5e2cdcfe 100644 --- a/official/c36042825.lua +++ b/official/c36042825.lua @@ -1,4 +1,5 @@ --ワンショット・ワンド +--One-Shot Wand local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER)) @@ -33,4 +34,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36045450.lua b/official/c36045450.lua index c29ec17e3c..2acc03faf2 100644 --- a/official/c36045450.lua +++ b/official/c36045450.lua @@ -1,4 +1,5 @@ --マジシャンズ・クロス +--Magicians Unite local s,id=GetID() function s.initial_effect(c) --atkup @@ -30,7 +31,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -40,10 +41,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() and c:IsRace(RACE_SPELLCASTER) -end +end \ No newline at end of file diff --git a/official/c3606728.lua b/official/c3606728.lua index 57f5373187..31f2c83255 100644 --- a/official/c3606728.lua +++ b/official/c3606728.lua @@ -1,4 +1,5 @@ --ガガガガール +--Gagaga Girl local s,id=GetID() function s.initial_effect(c) --lvchange @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetOperation(s.efop) c:RegisterEffect(e2) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} s.listed_names={26082117} function s.lvfilter(c,lv) return c:IsFaceup() and c:IsCode(26082117) and c:GetLevel()~=lv @@ -38,12 +39,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end function s.ffilter(c) - return not c:IsSetCard(0x54) + return not c:IsSetCard(SET_GAGAGA) end function s.efcon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetReasonCard() @@ -62,22 +63,22 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.atkcon) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.atkfilter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsSpecialSummoned() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.atkfilter(chkc) end @@ -92,7 +93,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c36076683.lua b/official/c36076683.lua index 82c9b4f3bc..6bf2f52aa8 100644 --- a/official/c36076683.lua +++ b/official/c36076683.lua @@ -15,19 +15,12 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=73 -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -35,13 +28,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c36088082.lua b/official/c36088082.lua index 496fa62882..dbbe5350bb 100644 --- a/official/c36088082.lua +++ b/official/c36088082.lua @@ -1,4 +1,5 @@ --ブルブレーダー +--Bull Blader local s,id=GetID() function s.initial_effect(c) --level change @@ -21,7 +22,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) @@ -31,7 +32,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_BATTLED) e3:SetOperation(s.desop) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) end end @@ -40,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tg then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36092504.lua b/official/c36092504.lua index 2e8d1d2311..95644c4dbd 100644 --- a/official/c36092504.lua +++ b/official/c36092504.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10f} +s.listed_series={SET_BORREL} function s.cfilter(c) - return c:IsSetCard(0x10f) and c:IsFaceup() and c:IsMonster() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) + return c:IsSetCard(SET_BORREL) and c:IsFaceup() and c:IsMonster() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) end function s.exfilter(c) return c:IsLocation(LOCATION_EXTRA) and c:IsFacedown() @@ -25,14 +25,14 @@ function s.stfilter(c) return c:IsSpellTrap() and c:IsOnField() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_EXTRA,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_EXTRA,nil) local bf=g:IsExists(Card.IsType,1,nil,TYPE_FUSION) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) local bs=g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) and rg:IsExists(s.exfilter,3,nil) local bx=g:IsExists(Card.IsType,1,nil,TYPE_XYZ) and rg:IsExists(s.stfilter,1,nil) local bl=g:IsExists(Card.IsType,1,nil,TYPE_LINK) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) if chk==0 then return bf or bs or bx or bl end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_EXTRA) if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackAbove,3000),tp,LOCATION_MZONE,0,1,nil) then Duel.SetChainLimit(s.chlimit) end @@ -41,9 +41,9 @@ function s.chlimit(e,ep,tp) return tp==ep end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if #g==0 then return end - local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_EXTRA,nil) + local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_EXTRA,nil) if #rg==0 then return end local og=Group.CreateGroup() local break_chk=0 diff --git a/official/c36099130.lua b/official/c36099130.lua index 9057c3ba25..3ebc7a132c 100644 --- a/official/c36099130.lua +++ b/official/c36099130.lua @@ -1,5 +1,5 @@ --絶火の大賢者ゾロア ---Magistus Flame Zoroa +--Zoroa, the Magistus of Flame --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.eqtgfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x152) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_EXTRA,0,1,nil,0x152) + return c:IsFaceup() and c:IsSetCard(SET_MAGISTUS) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_EXTRA,0,1,nil,SET_MAGISTUS) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -44,13 +44,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end - local ec=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_EXTRA,0,1,1,nil,0x152):GetFirst() + local ec=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_EXTRA,0,1,1,nil,SET_MAGISTUS):GetFirst() if ec then Duel.Equip(tp,ec,tc,true) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) ec:RegisterEffect(e1) @@ -60,7 +60,7 @@ function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.eqfilter(c) - return c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(0x152) + return c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(SET_MAGISTUS) end function s.spcond(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.eqfilter,1,nil) @@ -70,25 +70,25 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c36099620.lua b/official/c36099620.lua index 9c181e4931..21712b444e 100644 --- a/official/c36099620.lua +++ b/official/c36099620.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_FZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x38)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_LIGHTSWORN)) e3:SetValue(s.atkval) c:RegisterEffect(e3) --Destroy replace @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetOperation(s.desrepop) c:RegisterEffect(e4) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} s.counter_place_list={0x5} function s.atkval(e,c) return e:GetHandler():GetCounter(0x5)*100 @@ -54,4 +54,4 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveCounter(ep,0x5,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36100154.lua b/official/c36100154.lua index 24feff4e25..5bcff0b65b 100644 --- a/official/c36100154.lua +++ b/official/c36100154.lua @@ -21,7 +21,7 @@ end s.listed_series={SET_AMAZONESS} function s.atkcon(e) s[0]=false - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.atktg(e,c) return c==Duel.GetAttacker() and c:IsSetCard(SET_AMAZONESS) diff --git a/official/c36107810.lua b/official/c36107810.lua index 98cbcd8c98..0d4760afd3 100644 --- a/official/c36107810.lua +++ b/official/c36107810.lua @@ -1,4 +1,5 @@ --ナイトエンド・ソーサラー +--Night's End Sorcerer local s,id=GetID() function s.initial_effect(c) --remove @@ -16,10 +17,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -27,4 +28,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36111775.lua b/official/c36111775.lua index bb5f23437f..ae9162a5e8 100644 --- a/official/c36111775.lua +++ b/official/c36111775.lua @@ -34,15 +34,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TO_HAND) e1:SetTargetRange(LOCATION_DECK,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EFFECT_CANNOT_DRAW) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) -end - +end \ No newline at end of file diff --git a/official/c36114945.lua b/official/c36114945.lua index f658c9402a..196bbe284a 100644 --- a/official/c36114945.lua +++ b/official/c36114945.lua @@ -1,5 +1,5 @@ --- 垂氷の魔妖-雪女 --- Yuki-Onna, the Icicle Mayakashi +--垂氷の魔妖-雪女 +--Yuki-Onna, the Icicle Mayakashi local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -52,13 +52,13 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -69,13 +69,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c3611830.lua b/official/c3611830.lua index 82ff0258f0..3e43b07a39 100644 --- a/official/c3611830.lua +++ b/official/c3611830.lua @@ -3,7 +3,7 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x1) + c:EnableCounterPermit(COUNTER_SPELL) Pendulum.AddProcedure(c) --Special summon from the pendulum zone local e1=Effect.CreateEffect(c) @@ -88,7 +88,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.negfilter(c) return c:GetCounter(COUNTER_SPELL)>0 and c:IsAbleToHand() @@ -126,7 +126,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(ct) end function s.thfilter(c) - return c:GetType()==TYPE_SPELL and c:IsAbleToHand() + return c:IsNormalSpell() and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -143,4 +143,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c36148308.lua b/official/c36148308.lua index ee8bc8ffc9..e65fbbe0f4 100644 --- a/official/c36148308.lua +++ b/official/c36148308.lua @@ -1,5 +1,5 @@ --命の奇跡 ---Life Exstream +--Life Extreme --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -40,13 +40,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xc2} +s.listed_series={SET_POWER_TOOL} s.listed_names={25165047} function s.eqfilter(c) return c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_EARTH) end function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return Duel.IsPhase(PHASE_DAMAGE_CAL) and e:GetHandler():GetEquipTarget():GetBattleTarget() end function s.atktg(e,c) @@ -76,7 +76,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c,e,tp) - return c:IsSetCard(0xc2) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) + return c:IsSetCard(SET_POWER_TOOL) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,mc) return Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCode(25165047) diff --git a/official/c36183881.lua b/official/c36183881.lua index bcc89f2615..4d31a40c61 100644 --- a/official/c36183881.lua +++ b/official/c36183881.lua @@ -1,4 +1,5 @@ --マジェスペクター・トルネード +--Majespecter Tornado local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36187051.lua b/official/c36187051.lua index a15d2ba7d7..0a64fa6291 100644 --- a/official/c36187051.lua +++ b/official/c36187051.lua @@ -1,7 +1,6 @@ --巌帯の美技-ゼノギタム --Rock Band Xenoguitar --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Add 1 Rock monster to hand and place 1 card on the top of the deck @@ -29,7 +28,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} - function s.thfilter(c) return c:IsMonster() and c:IsRace(RACE_ROCK) and c:IsAbleToHand() and not c:IsCode(id) end @@ -55,7 +53,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.tgcond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsFaceup() and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_GRAVE) + return c:IsFaceup() and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_GRAVE) end function s.tgfilter(c) return c:IsMonster() and c:IsRace(RACE_ROCK) and c:IsAbleToGrave() diff --git a/official/c36197902.lua b/official/c36197902.lua index 1c5d033c52..4eddee7b9a 100644 --- a/official/c36197902.lua +++ b/official/c36197902.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) e3:SetCondition(s.spcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end if chk==0 then return true end @@ -53,7 +53,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end function s.atkcfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0xfe) and c:GetBaseAttack()>0 + return c:IsMonster() and c:IsSetCard(SET_WORLD_LEGACY) and c:GetBaseAttack()>0 and c:IsAbleToRemoveAsCost() and (aux.SpElimFilter(c,true,true) or c:IsLocation(LOCATION_HAND)) and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end @@ -61,12 +61,12 @@ function s.atkfilter(c) return c:IsFaceup() and c:IsLinkMonster() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) and Duel.GetFlagEffect(tp,id)==0 end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,nil,tp) and Duel.GetFlagEffect(tp,id)==0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() Duel.Remove(tc,POS_FACEUP,REASON_COST) e:SetLabel(tc:GetBaseAttack()) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end @@ -82,7 +82,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -108,5 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c36205132.lua b/official/c36205132.lua index 4c24561888..1a1b117766 100644 --- a/official/c36205132.lua +++ b/official/c36205132.lua @@ -1,7 +1,6 @@ --空牙団の伝令 フィロ --Filo, Messenger Fur Hire --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Fur Hire" monster from hand @@ -28,11 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} s.listed_names={id} - function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,13 +46,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x114) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_FUR_HIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -74,7 +72,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) tc:RegisterEffect(e1,true) end diff --git a/official/c36224040.lua b/official/c36224040.lua index 1d5b10829d..9a53447c0a 100644 --- a/official/c36224040.lua +++ b/official/c36224040.lua @@ -1,7 +1,6 @@ --RUM-ゼアル・フォース ---Rank-Up-Magic ZEXAL Force +--Rank-Up-Magic Zexal Force --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -23,15 +22,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.drcon) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end --Lists "Utopia", "ZW -", and "ZS -" archetypes -s.listed_series={0x107f,0x107e,0x207e} - +s.listed_series={SET_UTOPIA,SET_ZW,SET_ZS} --Check for an Xyz monster to use as material function s.filter1(c,e,tp) local rk=c:GetRank() @@ -42,7 +40,7 @@ end --Check for "Utopia" or "ZW -" Xyz monster function s.filter2(c,e,tp,mc,rk) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and (c:IsSetCard(0x107f) or c:IsSetCard(0x107e)) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and (c:IsSetCard(SET_UTOPIA) or c:IsSetCard(SET_ZW)) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end --Activation legality @@ -57,7 +55,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end --Check for "ZW -" or "ZS -" monster function s.topfilter(c) - return (c:IsSetCard(0x107e) or c:IsSetCard(0x207e)) and c:IsMonster() + return (c:IsSetCard(SET_ZW) or c:IsSetCard(SET_ZS)) and c:IsMonster() end --Xyz summon 1 "Utopia" or "ZW -" monster, that is 1 rank higher than targeted Xyz function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -97,4 +95,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36227804.lua b/official/c36227804.lua index 5d38b9e5fa..e78976d500 100644 --- a/official/c36227804.lua +++ b/official/c36227804.lua @@ -1,4 +1,5 @@ --リチュア・ビースト +--Gishki Beast local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelBelow(4) and c:IsSetCard(SET_GISHKI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c36239585.lua b/official/c36239585.lua index ed5059830d..f0c0b88c58 100644 --- a/official/c36239585.lua +++ b/official/c36239585.lua @@ -106,4 +106,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c36247316.lua b/official/c36247316.lua index f2b3eb4200..7856335ccc 100644 --- a/official/c36247316.lua +++ b/official/c36247316.lua @@ -9,16 +9,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10db} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true @@ -32,7 +29,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if e:GetLabel()==0 then return false end e:SetLabel(0) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,600,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,600,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) @@ -47,13 +44,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetValue(2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -61,10 +58,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTarget(s.indtarget) e3:SetValue(1) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,600,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,600,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) then Duel.BreakEffect() c:AddMonsterAttribute(TYPE_NORMAL) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) @@ -74,5 +71,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.indtarget(e,c) - return c:IsFaceup() and c:IsSetCard(0x10db) -end + return c:IsFaceup() and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) +end \ No newline at end of file diff --git a/official/c36256625.lua b/official/c36256625.lua index ba3ad0fe11..3614701938 100644 --- a/official/c36256625.lua +++ b/official/c36256625.lua @@ -1,4 +1,5 @@ --スーパービークロイド-ジャンボドリル +--Super Vehicroid Jumbo Drill local s,id=GetID() function s.initial_effect(c) --fusion material @@ -10,4 +11,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID \ No newline at end of file diff --git a/official/c36261276.lua b/official/c36261276.lua index 374c22df49..b76759dcd4 100644 --- a/official/c36261276.lua +++ b/official/c36261276.lua @@ -1,4 +1,5 @@ --亜空間物質転送装置 +--Interdimensional Matter Transporter local s,id=GetID() function s.initial_effect(c) --remove @@ -23,11 +24,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c36262024.lua b/official/c36262024.lua index 1dd7869b89..ac4b12bb6a 100644 --- a/official/c36262024.lua +++ b/official/c36262024.lua @@ -1,4 +1,5 @@ --黒竜の雛 +--Black Dragon's Chick local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,16 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={CARD_REDEYES_B_DRAGON} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(CARD_REDEYES_B_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -33,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3627449.lua b/official/c3627449.lua index f353f9d031..07be6d6151 100644 --- a/official/c3627449.lua +++ b/official/c3627449.lua @@ -1,4 +1,5 @@ --ローガーディアン +--Skull Guardian local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c36278828.lua b/official/c36278828.lua index c5c94fbf49..8bd2eb2188 100644 --- a/official/c36278828.lua +++ b/official/c36278828.lua @@ -14,21 +14,21 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.counter_place_list={0x1009} +s.counter_place_list={COUNTER_VENOM} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1009,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1009,1) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(COUNTER_VENOM,1) end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_VENOM,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1009,1) + local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_VENOM,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,1) then + if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(COUNTER_VENOM,1) then local atk=tc:GetAttack() - tc:AddCounter(0x1009,1) + tc:AddCounter(COUNTER_VENOM,1) if atk>0 and tc:GetAttack()==0 then Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0) end end -end +end \ No newline at end of file diff --git a/official/c36280194.lua b/official/c36280194.lua index a57030c913..941accd640 100644 --- a/official/c36280194.lua +++ b/official/c36280194.lua @@ -1,4 +1,5 @@ --補充要員 +--Backup Soldier local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c3629090.lua b/official/c3629090.lua index dfa49ce68f..096cfb8536 100644 --- a/official/c3629090.lua +++ b/official/c3629090.lua @@ -27,18 +27,18 @@ function s.initial_effect(c) end s.listed_names={39996157} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.thfilter(c) - return c:GetType()==0x82 and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -58,10 +58,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c36318200.lua b/official/c36318200.lua index 27798df774..73792520e4 100644 --- a/official/c36318200.lua +++ b/official/c36318200.lua @@ -1,6 +1,5 @@ --森の聖獣 ユニフォリア --Uniflora, Mystical Beast of the Forest - local s,id=GetID() function s.initial_effect(c) --Special summon 1 beast monster from hand or GY @@ -10,13 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={id} - function s.cfilter(c) return c:GetRace()~=RACE_BEAST end @@ -24,22 +22,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_GRAVE,0,nil) return #g>0 and not g:IsExists(s.cfilter,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return not c:IsCode(id) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Cannot attack @@ -48,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c36322312.lua b/official/c36322312.lua index 84e56be5df..d442135001 100644 --- a/official/c36322312.lua +++ b/official/c36322312.lua @@ -1,7 +1,6 @@ --起動提督デストロイリボルバー --Boot-Up Admiral - Destroyer Dynamo --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -46,19 +45,18 @@ function s.initial_effect(c) e5:SetOperation(s.rdop) c:RegisterEffect(e5) end -s.listed_series={0x51} - +s.listed_series={SET_GADGET} function s.spfilter(c) - return c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(0x51) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + return c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(SET_GADGET) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) return aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) if #g>0 then g:KeepAlive() @@ -74,16 +72,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.indesfil(c) - return c:IsFaceup() and c:IsSetCard(0x51) and c:IsOriginalType(TYPE_MONSTER) and c:IsType(TYPE_EQUIP) + return c:IsFaceup() and c:IsSetCard(SET_GADGET) and c:IsOriginalType(TYPE_MONSTER) and c:IsType(TYPE_EQUIP) end function s.incon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x51),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GADGET),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) or Duel.IsExistingMatchingCard(s.indesfil,e:GetHandlerPlayer(),LOCATION_SZONE,0,1,nil) end function s.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc~=c end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end + if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,LOCATION_ONFIELD) @@ -93,4 +91,4 @@ function s.rdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36326160.lua b/official/c36326160.lua index 97512e3eec..e516ea0a7b 100644 --- a/official/c36326160.lua +++ b/official/c36326160.lua @@ -1,7 +1,6 @@ --Live☆Twin キスキル --Live☆Twin Ki-sikil --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -29,25 +28,25 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Lilla" archetype -s.listed_series={0x154} +s.listed_series={SET_LIL_LA} --Specifically lists itself s.listed_names={id} --Check for "Lilla" monster function s.filter(c,e,tp) - return c:IsSetCard(0x154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_LIL_LA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) and not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end --Special summon 1 "Lilla" monster from hand/deck function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c36328300.lua b/official/c36328300.lua index df45db047e..727748e9c7 100644 --- a/official/c36328300.lua +++ b/official/c36328300.lua @@ -19,20 +19,20 @@ function s.initial_effect(c) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.plcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) end -s.listed_series={0x1034,0x2034} +s.listed_series={SET_CRYSTAL_BEAST,SET_ULTIMATE_CRYSTAL} function s.confilter(c,tp) - return c:IsPreviousSetCard(0x1034) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_CRYSTAL_BEAST) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.confilter,1,nil,tp) end function s.cfilter(c) - return c:IsSetCard(0x1034) and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_CRYSTAL_BEAST) and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToGraveAsCost() end function s.exfilter(c,tp) return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c))>0 @@ -43,14 +43,14 @@ function s.rescon(sg,e,tp,mg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_DECK,0,nil) if chk==0 then return g:GetClassCount(Card.GetCode)>=7 and aux.SelectUnselectGroup(g,e,tp,7,7,s.rescon,0) end local rg=aux.SelectUnselectGroup(g,e,tp,7,7,s.rescon,1,tp,HINTMSG_TOGRAVE) Duel.SendtoGrave(rg,REASON_COST) end function s.filter(c,e,tp,sg) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2034) and Duel.GetLocationCountFromEx(tp,tp,sg,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() + return c:IsType(TYPE_FUSION) and c:IsSetCard(SET_ULTIMATE_CRYSTAL) and Duel.GetLocationCountFromEx(tp,tp,sg,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -65,14 +65,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.plcfilter(c,tp) - return c:IsPreviousSetCard(0x2034) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()~=tp + return c:IsPreviousSetCard(SET_ULTIMATE_CRYSTAL) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp) end function s.plcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.plcfilter,1,nil,tp) end function s.plfilter(c) - return c:IsSetCard(0x1034) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsMonster() and not c:IsForbidden() end function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -92,11 +92,10 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end - Duel.RaiseEvent(g,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(g,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end -end - +end \ No newline at end of file diff --git a/official/c36331074.lua b/official/c36331074.lua index cd0bfaeae9..8023cb2406 100644 --- a/official/c36331074.lua +++ b/official/c36331074.lua @@ -1,4 +1,5 @@ --ガスタの疾風 リーズ +--Reeze, Whirlwind of Gusto local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,15 +15,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) end function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x10) and c:IsAbleToChangeControler() + return c:IsFaceup() and c:IsSetCard(SET_GUSTO) and c:IsAbleToChangeControler() end function s.filter2(c) return c:IsAbleToChangeControler() @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then Duel.SwapControl(a,b) end -end +end \ No newline at end of file diff --git a/official/c36350300.lua b/official/c36350300.lua index 74d45ea459..0e6288ba40 100644 --- a/official/c36350300.lua +++ b/official/c36350300.lua @@ -11,14 +11,14 @@ function s.mfilter(c) return c:IsLocation(LOCATION_HAND) and c:IsType(TYPE_NORMAL) end function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) e1:SetCondition(s.tdcon) e1:SetOperation(s.tdop) Duel.RegisterEffect(e1,tp) diff --git a/official/c36352429.lua b/official/c36352429.lua index 8fe351a1a1..3a0c05deec 100644 --- a/official/c36352429.lua +++ b/official/c36352429.lua @@ -1,4 +1,5 @@ --ヴァンパイア・ドラゴン +--Vampire Dragon local s,id=GetID() function s.initial_effect(c) --search @@ -15,7 +16,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) - and e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + and e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c36354007.lua b/official/c36354007.lua index dcd9ec53c2..4b96cfdfba 100644 --- a/official/c36354007.lua +++ b/official/c36354007.lua @@ -26,4 +26,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36354008.lua b/official/c36354008.lua deleted file mode 100644 index 4876ae11ec..0000000000 --- a/official/c36354008.lua +++ /dev/null @@ -1,46 +0,0 @@ ---ギルフォード・ザ・ライトニング -local s,id=GetID() -function s.initial_effect(c) - --summon with 3 tribute - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_SUMMON_PROC) - e1:SetCondition(s.ttcon) - e1:SetOperation(s.ttop) - e1:SetValue(SUMMON_TYPE_TRIBUTE+1) - c:RegisterEffect(e1) - --destroy - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_DESTROY) - e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_SUMMON_SUCCESS) - e2:SetCondition(s.descon) - e2:SetTarget(s.destg) - e2:SetOperation(s.desop) - c:RegisterEffect(e2) -end -function s.ttcon(e,c,minc) - if c==nil then return true end - return minc<=3 and Duel.CheckTribute(c,3) -end -function s.ttop(e,tp,eg,ep,ev,re,r,rp,c) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectTribute(tp,c,3,3) - c:SetMaterial(g) - Duel.Release(g, REASON_SUMMON+REASON_MATERIAL) -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSummonType()==SUMMON_TYPE_TRIBUTE+1 -end -function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0,nil) -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) - Duel.Destroy(g,REASON_EFFECT) -end diff --git a/official/c36361633.lua b/official/c36361633.lua index ab748ebc86..2ac74adbb3 100644 --- a/official/c36361633.lua +++ b/official/c36361633.lua @@ -13,14 +13,14 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return tp~=Duel.GetTurnPlayer() and (ph&PHASE_MAIN2+PHASE_END)==0 + return Duel.IsTurnPlayer(1-tp) and (ph&PHASE_MAIN2|PHASE_END)==0 end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(0,1) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c36368606.lua b/official/c36368606.lua index f465c37d00..9e8f251b47 100644 --- a/official/c36368606.lua +++ b/official/c36368606.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.immcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.immop) c:RegisterEffect(e2) end diff --git a/official/c36376145.lua b/official/c36376145.lua index dca5847288..79af4821e0 100644 --- a/official/c36376145.lua +++ b/official/c36376145.lua @@ -1,4 +1,5 @@ --魂の一撃 +--Soul Strike local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(4000-Duel.GetLP(tp)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c36378213.lua b/official/c36378213.lua index 086fc1eb30..c32d744ce9 100644 --- a/official/c36378213.lua +++ b/official/c36378213.lua @@ -1,4 +1,5 @@ --キューキューロイド +--Ambulanceroid local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.filter(c,e,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsSetCard(0x16) + return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsSetCard(SET_ROID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -24,7 +25,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spfilter(c,e,tp) - return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsSetCard(0x16) + return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsSetCard(SET_ROID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRelateToEffect(e) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) g=g:Select(tp,ft,ft,nil) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c36400569.lua b/official/c36400569.lua index 153f9bce7d..824f7c4c8a 100644 --- a/official/c36400569.lua +++ b/official/c36400569.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return aux.exccon(e) and Duel.IsExistingMatchingCard(s.gpxyzfilter,tp,LOCATION_MZONE,0,1,nil) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end local target_player=op==1 and tp or 1-tp Duel.SpecialSummon(tc,0,tp,target_player,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c36405256.lua b/official/c36405256.lua index 503c2bf63f..1a7c5a358c 100644 --- a/official/c36405256.lua +++ b/official/c36405256.lua @@ -1,6 +1,5 @@ --時花の魔女-フルール・ド・ソルシエール --Sorciere de Fleur - local s,id=GetID() function s.initial_effect(c) --When normal or special summoned, special summon 1 monster from opponent's GY @@ -39,7 +38,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) --Cannot attack directly @@ -48,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c36407615.lua b/official/c36407615.lua index cfcbaa8f4e..73ebbc99fd 100644 --- a/official/c36407615.lua +++ b/official/c36407615.lua @@ -1,4 +1,5 @@ --デーモン・カオス・キング +--Chaos King Archfiend local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,13 +30,13 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c36415522.lua b/official/c36415522.lua index 96b8ab8843..7be51060af 100644 --- a/official/c36415522.lua +++ b/official/c36415522.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil @@ -52,12 +52,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -84,7 +84,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(1) e1:SetCondition(s.damcon) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) end diff --git a/official/c3642509.lua b/official/c3642509.lua index 820991dd7a..0242359a5a 100644 --- a/official/c3642509.lua +++ b/official/c3642509.lua @@ -1,9 +1,10 @@ --E・HERO Great TORNADO +--Elemental HERO Great Tornado local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3008),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WIND)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WIND)) --atk up local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -21,10 +22,10 @@ function s.initial_effect(c) e3:SetValue(aux.fuslimit) c:RegisterEffect(e3) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -37,13 +38,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(def/2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c36426778.lua b/official/c36426778.lua index b5786afe74..c34981e78b 100644 --- a/official/c36426778.lua +++ b/official/c36426778.lua @@ -19,14 +19,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10db,0xdb} +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_PHANTOM_KNIGHTS} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x10db) + return c:IsFaceup() and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) end function s.spcon(e,c) if c==nil then return true end @@ -34,7 +34,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.thfilter(c) - return c:IsSetCard(0xdb) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,4 +47,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c36429703.lua b/official/c36429703.lua index 7965b83d57..a79d1d12ca 100644 --- a/official/c36429703.lua +++ b/official/c36429703.lua @@ -78,7 +78,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) return re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(SET_RAIDRAPTOR) and rc:IsControler(tp) --[[ return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsMonsterEffect() and rc:IsSetCard(SET_RAIDRAPTOR) and rc:IsType(TYPE_XYZ) and rc:GetControler()==tp + and re:IsMonsterEffect() and rc:IsSetCard(SET_RAIDRAPTOR) and rc:IsType(TYPE_XYZ) and rc:IsControler(tp) ]] end function s.setfilter(c) diff --git a/official/c3643300.lua b/official/c3643300.lua index 8d6b721c0f..3b7e29c67f 100644 --- a/official/c3643300.lua +++ b/official/c3643300.lua @@ -1,4 +1,5 @@ --伝説のフィッシャーマン +--The Legendary Fisherman local s,id=GetID() function s.initial_effect(c) --immune spell @@ -25,5 +26,5 @@ function s.econ(e) return Duel.IsEnvironment(CARD_UMI) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end + return te:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c36436372.lua b/official/c36436372.lua index 79b8a7aae5..582cbce9b2 100644 --- a/official/c36436372.lua +++ b/official/c36436372.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.gplvtg) e3:SetOperation(s.gplvop) c:RegisterEffect(e3) diff --git a/official/c36442179.lua b/official/c36442179.lua index ac8a873f98..ee3ae28021 100644 --- a/official/c36442179.lua +++ b/official/c36442179.lua @@ -1,4 +1,5 @@ --BF-竜巻のハリケーン +--Blackwing - Hurricane the Tornado local s,id=GetID() function s.initial_effect(c) --atk @@ -30,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c36458063.lua b/official/c36458063.lua index 75779f299d..7e904880a0 100644 --- a/official/c36458063.lua +++ b/official/c36458063.lua @@ -38,11 +38,11 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD|LOCATION_HAND) if chk==0 then return #g>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD|LOCATION_HAND) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36468556.lua b/official/c36468556.lua index 18c20ef399..31f655538c 100644 --- a/official/c36468556.lua +++ b/official/c36468556.lua @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*500 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36472900.lua b/official/c36472900.lua index 191b91bbc3..4cea6fb014 100644 --- a/official/c36472900.lua +++ b/official/c36472900.lua @@ -1,4 +1,5 @@ --ロードランナー +--Sonic Chick local s,id=GetID() function s.initial_effect(c) --indes @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.indes(e,c) return c:IsAttackAbove(1900) -end +end \ No newline at end of file diff --git a/official/c3648368.lua b/official/c3648368.lua index 5561e2050a..94ab89981c 100644 --- a/official/c3648368.lua +++ b/official/c3648368.lua @@ -1,4 +1,5 @@ --A・O・J リサーチャー +--Ally of Justice Searcher local s,id=GetID() function s.initial_effect(c) --to hand @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.filter(c) return c:IsFacedown() and c:IsDefensePos() @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsRelateToEffect(e) and s.filter(tc) then Duel.ChangePosition(tc,0,0,0,POS_FACEUP_ATTACK,true) end -end +end \ No newline at end of file diff --git a/official/c36484016.lua b/official/c36484016.lua index ea068b93a8..4676002ba4 100644 --- a/official/c36484016.lua +++ b/official/c36484016.lua @@ -21,18 +21,18 @@ function s.fcheck(tp,sg,fc) return sg:IsExists(aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO,fc,SUMMON_TYPE_FUSION,tp),1,nil) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil),s.fcheck end return nil,s.fcheck end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&0x41)==0x41 and rp~=tp and c:IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -44,4 +44,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36492575.lua b/official/c36492575.lua index 382f1f65b4..e73ca5fa95 100644 --- a/official/c36492575.lua +++ b/official/c36492575.lua @@ -21,26 +21,26 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.spval(e,c) - return 0,aux.GetMMZonesPointedTo(c:GetControler(),Card.IsSetCard,nil,nil,nil,0x12b) + return 0,aux.GetMMZonesPointedTo(c:GetControler(),Card.IsSetCard,nil,nil,nil,SET_MARINCESS) end function s.spfilter(c,e,tp,zone) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,nil,nil,nil,0x12b) + local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,nil,nil,nil,SET_MARINCESS) if chk==0 then return zone~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,zone) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,nil,nil,nil,0x12b) + local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,nil,nil,nil,SET_MARINCESS) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone) if #g>0 then diff --git a/official/c36499284.lua b/official/c36499284.lua index e281becac7..5f11a09bb2 100644 --- a/official/c36499284.lua +++ b/official/c36499284.lua @@ -41,7 +41,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if Duel.DiscardHand(tp,s.disfilter,1,1,REASON_EFFECT+REASON_DISCARD)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if Duel.DiscardHand(tp,s.disfilter,1,1,REASON_EFFECT|REASON_DISCARD)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c365213.lua b/official/c365213.lua index 130c49f76c..befb9f14d2 100644 --- a/official/c365213.lua +++ b/official/c365213.lua @@ -1,5 +1,5 @@ --光来する奇跡 ---Arriving Miracle +--Arrive in Light --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -37,8 +37,8 @@ function s.tdfilter(c) return c:IsLevel(1) and c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_DECK) or c:IsAbleToDeck()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -100,7 +100,7 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)>0 then return end Duel.Draw(tp,1,REASON_EFFECT) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_TUNER) @@ -118,5 +118,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c36521307.lua b/official/c36521307.lua index 5dab52b0fc..30048fbd01 100644 --- a/official/c36521307.lua +++ b/official/c36521307.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} s.listed_names={id} function s.spcfilter(c) - return c:IsSetCard(0x132) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MATHMECH) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_DECK,0,1,nil) end @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(function(e) return e:GetLabel()~=0 end) e1:SetTarget(function(e,c) return c:GetFieldID()~=e:GetLabel() end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -68,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetLabelObject(e1) e2:SetOperation(s.checkop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) end @@ -77,13 +77,13 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(fid) end function s.thcfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x132) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_MATHMECH) and c:IsControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.thcfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0x132) and c:IsType(TYPE_SPELL|TYPE_TRAP) and c:IsAbleToHand() + return c:IsSetCard(SET_MATHMECH) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c36521459.lua b/official/c36521459.lua index eefcc7261e..8bd5984ef8 100644 --- a/official/c36521459.lua +++ b/official/c36521459.lua @@ -1,4 +1,5 @@ --Sin スターダスト・ドラゴン +--Malefic Stardust Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -42,4 +43,4 @@ function s.descon(e) end function s.antarget(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c36523152.lua b/official/c36523152.lua index dff2e9c820..91241f4247 100644 --- a/official/c36523152.lua +++ b/official/c36523152.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetValue(s.condition) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -44,11 +44,11 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) + return not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.condition(e,c) return c:IsRace(RACE_MACHINE) diff --git a/official/c36527535.lua b/official/c36527535.lua index b4d5a9bcf1..39a9a3fa3a 100644 --- a/official/c36527535.lua +++ b/official/c36527535.lua @@ -1,4 +1,5 @@ --EMレビュー・ダンサー +--Performapal Revue Dancer local s,id=GetID() function s.initial_effect(c) --special summon rule @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetValue(s.dtcon) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -25,5 +26,5 @@ function s.sprcon(e,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function s.dtcon(e,c) - return c:IsSetCard(0x9f) -end + return c:IsSetCard(SET_PERFORMAPAL) +end \ No newline at end of file diff --git a/official/c36539330.lua b/official/c36539330.lua index 2f0a303009..a9e3eee844 100644 --- a/official/c36539330.lua +++ b/official/c36539330.lua @@ -1,7 +1,6 @@ --- +--ジャブィアント・パンダ --Jabbing Panda --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -45,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) end diff --git a/official/c36553319.lua b/official/c36553319.lua index 55dabb62ac..557958cc28 100644 --- a/official/c36553319.lua +++ b/official/c36553319.lua @@ -33,9 +33,9 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -62,12 +62,12 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) diff --git a/official/c36556781.lua b/official/c36556781.lua index f617c7f147..8edc425818 100644 --- a/official/c36556781.lua +++ b/official/c36556781.lua @@ -1,10 +1,9 @@ --ドラグニティナイト-ゴルムファバル ---Dragunity Knight – Gormfabal - +--Dragunity Knight - Gormfaobhar local s,id=GetID() function s.initial_effect(c) --Synchro summon procedure - Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x29),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGUNITY),1,1,Synchro.NonTuner(nil),1,99) --Must be properly summoned before reviving c:EnableReviveLimit() --Equip 1 "Dragunity" tuner from GY to this card @@ -34,16 +33,15 @@ function s.initial_effect(c) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -s.listed_series={0x29} - +s.listed_series={SET_DRAGUNITY} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x29) + return ec:IsControler(tp) and ec:IsSetCard(SET_DRAGUNITY) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) - return c:IsSetCard(0x29) and c:IsMonster() and c:IsType(TYPE_TUNER) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonster() and c:IsType(TYPE_TUNER) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -78,10 +76,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c36560997.lua b/official/c36560997.lua index 6711d736de..a89a6bc070 100644 --- a/official/c36560997.lua +++ b/official/c36560997.lua @@ -1,4 +1,5 @@ --オーバー・コアリミット +--Core Overclock local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1d)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_KOAKI_MEIRU)) e2:SetValue(500) c:RegisterEffect(e2) --atkup @@ -27,17 +28,17 @@ function s.initial_effect(c) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.cfilter(c) return c:IsCode(36623431) and c:IsDiscardable() end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) + return c:IsFaceup() and c:IsSetCard(SET_KOAKI_MEIRU) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -52,7 +53,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c36565699.lua b/official/c36565699.lua index f3f8e83073..f13dc71ac5 100644 --- a/official/c36565699.lua +++ b/official/c36565699.lua @@ -1,4 +1,5 @@ --メンタルシーカー +--Mental Seeker local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.ShuffleDeck(1-tp) end -end +end \ No newline at end of file diff --git a/official/c36569343.lua b/official/c36569343.lua index c5464212dc..cc020281fa 100644 --- a/official/c36569343.lua +++ b/official/c36569343.lua @@ -1,4 +1,5 @@ --紅炎の騎士 +--Brushfire Knight local s,id=GetID() function s.initial_effect(c) --send to grave @@ -55,4 +56,4 @@ function s.tgop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3657444.lua b/official/c3657444.lua index d0e6a1a3ac..834f956a79 100644 --- a/official/c3657444.lua +++ b/official/c3657444.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.drawtg1) e1:SetOperation(s.drawop1) c:RegisterEffect(e1) @@ -85,7 +85,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end end diff --git a/official/c36577931.lua b/official/c36577931.lua index c6df7e43e9..54256a85e3 100644 --- a/official/c36577931.lua +++ b/official/c36577931.lua @@ -1,5 +1,5 @@ --悲劇のデスピアン ---Despian of Tragedy +--Despian Tragedy --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -25,19 +25,19 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.settg) e3:SetOperation(s.setop) c:RegisterEffect(e3) end -s.listed_series={0x166,0x160} +s.listed_series={SET_DESPIA,SET_BRANDED} s.listed_names={id} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_EFFECT) and c:IsFaceup() end function s.thfilter(c) - return c:IsSetCard(0x166) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_DESPIA) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,7 +52,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.setfilter(c) - return c:IsSetCard(0x160) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_BRANDED) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end @@ -66,4 +66,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c36584821.lua b/official/c36584821.lua index bd095295a5..4d2b41fcb7 100644 --- a/official/c36584821.lua +++ b/official/c36584821.lua @@ -1,4 +1,5 @@ --紅蓮魔獣 ダ・イーザ +--Gren Maju Da Eiza local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.value(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,0)*400 -end +end \ No newline at end of file diff --git a/official/c36586443.lua b/official/c36586443.lua index 5996ce9a1f..5de595b477 100644 --- a/official/c36586443.lua +++ b/official/c36586443.lua @@ -1,4 +1,5 @@ --エレメンタル・チャージ +--Elemental Recharge local s,id=GetID() function s.initial_effect(c) --recover @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.SetTargetPlayer(tp) @@ -20,10 +21,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local rec=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil)*1000 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,rec,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36591747.lua b/official/c36591747.lua index 87c8e2f089..1e31f6f900 100644 --- a/official/c36591747.lua +++ b/official/c36591747.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -s.listed_series={0x15e,0x15f} +s.listed_series={SET_AMAZEMENT,SET_ATTRACTION} function s.setfilter(c) - return c:IsSetCard(0x15f) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_ATTRACTION) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetEquipTarget() @@ -54,8 +54,8 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetEquipTarget() - if tc and tc:IsLocation(LOCATION_MZONE) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if tc and tc:IsLocation(LOCATION_MZONE) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)>0 then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) --Return it in the End Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -64,7 +64,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c3659803.lua b/official/c3659803.lua index 20e83ce691..a8b9ad2df8 100644 --- a/official/c3659803.lua +++ b/official/c3659803.lua @@ -9,12 +9,12 @@ function s.ffilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE) end \ No newline at end of file diff --git a/official/c36607978.lua b/official/c36607978.lua index db3e9f8367..ccc41b1833 100644 --- a/official/c36607978.lua +++ b/official/c36607978.lua @@ -1,4 +1,5 @@ --魔性の月 +--Mystical Moon local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c36614113.lua b/official/c36614113.lua index e38f1ccbba..81babcfab3 100644 --- a/official/c36614113.lua +++ b/official/c36614113.lua @@ -29,10 +29,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xaf} +s.listed_series={SET_DD} s.listed_names={id} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSummonType(SUMMON_TYPE_PENDULUM) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsPendulumSummoned() end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSummonType,SUMMON_TYPE_PENDULUM),tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSummonType,SUMMON_TYPE_PENDULUM),tp,0,LOCATION_MZONE,1,1,nil) @@ -52,7 +52,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 @@ -68,13 +68,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c36623431.lua b/official/c36623431.lua index d6507e0ecb..02abf56df6 100644 --- a/official/c36623431.lua +++ b/official/c36623431.lua @@ -1,4 +1,5 @@ --コアキメイルの鋼核 +--Iron Core of Koa'ki Meiru local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_DRAW) + e2:SetCode(EVENT_PHASE|PHASE_DRAW) e2:SetCountLimit(1) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.condition2) @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation2) c:RegisterEffect(e2) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} function s.condition1(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 @@ -40,7 +41,7 @@ function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -58,7 +59,7 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() end function s.costfilter(c) - return c:IsSetCard(0x1d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_KOAKI_MEIRU) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -74,4 +75,4 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c36629203.lua b/official/c36629203.lua index ba92ca4d16..4f8e20f950 100644 --- a/official/c36629203.lua +++ b/official/c36629203.lua @@ -1,4 +1,5 @@ --A・O・J コアデストロイ +--Ally of Justice Core Destroyer local s,id=GetID() function s.initial_effect(c) --destroy @@ -23,4 +24,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc==c then tc=Duel.GetAttackTarget() end if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36629635.lua b/official/c36629635.lua index bed574566f..74ce97a18d 100644 --- a/official/c36629635.lua +++ b/official/c36629635.lua @@ -47,4 +47,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c36630403.lua b/official/c36630403.lua index cccce8b373..4dde9f56ac 100644 --- a/official/c36630403.lua +++ b/official/c36630403.lua @@ -1,4 +1,5 @@ --妖刀-不知火 +--Shiranui Spectralsword local s,id=GetID() function s.initial_effect(c) --spsummon @@ -24,7 +25,7 @@ function s.filter2(c,e,tp,lv) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter1(chkc,e,tp,e:GetHandler():GetLevel()) end - if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) and e:GetHandler():IsAbleToRemove() and Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLevel()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c36637374.lua b/official/c36637374.lua index d8bc4cbb17..77375267b6 100644 --- a/official/c36637374.lua +++ b/official/c36637374.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x166} +s.listed_series={SET_DESPIA} function s.filter(c,e,tp,ft) - return c:IsMonster() and c:IsSetCard(0x166) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))) + return c:IsMonster() and c:IsSetCard(SET_DESPIA) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -36,7 +36,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft) @@ -57,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -73,7 +73,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true else return false @@ -84,4 +84,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36643046.lua b/official/c36643046.lua index 4371a80e04..dac5d1f96d 100644 --- a/official/c36643046.lua +++ b/official/c36643046.lua @@ -1,4 +1,5 @@ --シンクロン・エクスプローラー +--Synchron Explorer local s,id=GetID() function s.initial_effect(c) --summon success @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0x1017} +s.listed_series={SET_SYNCHRON} function s.filter(c,e,tp) - return c:IsSetCard(0x1017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SYNCHRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -32,12 +33,12 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c36668118.lua b/official/c36668118.lua index f7ba87c928..14bac61a10 100644 --- a/official/c36668118.lua +++ b/official/c36668118.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x102)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ROKKET)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -42,9 +42,9 @@ function s.initial_effect(c) e5:SetOperation(s.spop2) c:RegisterEffect(e5) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c36687247.lua b/official/c36687247.lua index a5f401fcb8..0d8fc0c12b 100644 --- a/official/c36687247.lua +++ b/official/c36687247.lua @@ -1,4 +1,5 @@ --TG ラッシュ・ライノ +--T.G. Rush Rhino local s,id=GetID() function s.initial_effect(c) --atkup @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.atcon(e) local ph=Duel.GetCurrentPhase() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and e:GetHandler()==Duel.GetAttacker() @@ -35,12 +36,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TG) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -53,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c36693940.lua b/official/c36693940.lua index 9abfd2d3a4..e91339dd3c 100644 --- a/official/c36693940.lua +++ b/official/c36693940.lua @@ -1,4 +1,5 @@ --デストーイ・カスタム +--Designer Frightfur local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa9,0xc3} +s.listed_series={SET_FLUFFAL,SET_EDGE_IMP} function s.filter(c,e,tp) - return (c:IsSetCard(0xa9) or c:IsSetCard(0xc3)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard({SET_FLUFFAL,SET_EDGE_IMP}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -31,12 +32,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_SETCODE) - e1:SetValue(0xad) + e1:SetValue(SET_FRIGHTFUR) e1:SetOperation(s.chngcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.chngcon(scard,sumtype,tp) return (sumtype&MATERIAL_FUSION)~=0 -end +end \ No newline at end of file diff --git a/official/c36694815.lua b/official/c36694815.lua index 1b02180c8f..3c2556cca6 100644 --- a/official/c36694815.lua +++ b/official/c36694815.lua @@ -35,5 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c36704180.lua b/official/c36704180.lua index 40e98de620..82e2a58911 100644 --- a/official/c36704180.lua +++ b/official/c36704180.lua @@ -1,4 +1,5 @@ --幻影騎士団フラジャイルアーマー +--The Phantom Knights of Fragile Armor local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,9 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x10db,0xdb} +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_PHANTOM_KNIGHTS} function s.filter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x10db) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -46,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.drcfilter(c) - return (c:IsSetCard(0x10db) or (c:IsSetCard(0xdb) and c:IsSpellTrap())) and c:IsAbleToGraveAsCost() + return (c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) or (c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap())) and c:IsAbleToGraveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) @@ -63,4 +64,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36708764.lua b/official/c36708764.lua index 21635a5e50..54a1bb8927 100644 --- a/official/c36708764.lua +++ b/official/c36708764.lua @@ -67,4 +67,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(at,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c36717258.lua b/official/c36717258.lua index 4dcf211a99..138b57ed47 100644 --- a/official/c36717258.lua +++ b/official/c36717258.lua @@ -1,4 +1,5 @@ --ジュラック・モノロフ +--Jurrac Monoloph local s,id=GetID() function s.initial_effect(c) --attack all @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c36730805.lua b/official/c36730805.lua index e79fa4384f..9e7b1e753b 100644 --- a/official/c36730805.lua +++ b/official/c36730805.lua @@ -1,4 +1,5 @@ --スピードリフト +--Speedlift local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) if #g~=1 then return false end @@ -19,7 +20,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return c:IsFaceup() and c:IsType(TYPE_TUNER) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -58,4 +59,4 @@ function s.cedop(e,tp,eg,ep,ev,re,r,rp) Duel.SetChainLimitTillChainEnd(aux.FALSE) end e:Reset() -end +end \ No newline at end of file diff --git a/official/c36733451.lua b/official/c36733451.lua index 26ddbc05ea..b21713b904 100644 --- a/official/c36733451.lua +++ b/official/c36733451.lua @@ -1,4 +1,5 @@ --次元合成師 +--Dimensional Alchemist local s,id=GetID() function s.initial_effect(c) --atkup @@ -40,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) c:RegisterEffect(e1) end @@ -66,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c36734924.lua b/official/c36734924.lua index d84f835b09..a1df651c16 100644 --- a/official/c36734924.lua +++ b/official/c36734924.lua @@ -1,4 +1,5 @@ --青き眼の巫女 +--Priestess with Eyes of Blue local s,id=GetID() function s.initial_effect(c) --search @@ -25,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsContains(e:GetHandler()) end @@ -33,7 +34,7 @@ function s.tgfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave() end function s.thfilter(c) - return c:IsSetCard(0xdd) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLUE_EYES) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) @@ -61,7 +62,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xdd) and c:IsAbleToDeck() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_BLUE_EYES) and c:IsAbleToDeck() and (ft>0 or c:GetSequence()<5) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -76,7 +77,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c36736723.lua b/official/c36736723.lua index d95cbab2f1..36c9e71286 100644 --- a/official/c36736723.lua +++ b/official/c36736723.lua @@ -1,4 +1,5 @@ --ラッシュ・ウォリアー +--Rush Warrior local s,id=GetID() function s.initial_effect(c) --atkup @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --tohand @@ -20,22 +21,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x66,0x1017} +s.listed_series={SET_WARRIOR,SET_SYNCHRON} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttackTarget() if not tc then return false end if tc:IsControler(1-tp) then tc=Duel.GetAttacker() end e:SetLabelObject(tc) - return tc and tc:IsRelateToBattle() and tc:IsSetCard(0x66) and tc:IsType(TYPE_SYNCHRO) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return tc and tc:IsRelateToBattle() and tc:IsSetCard(SET_WARRIOR) and tc:IsType(TYPE_SYNCHRO) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -43,13 +40,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x1017) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SYNCHRON) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -63,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36737092.lua b/official/c36737092.lua index ebc1da3909..319bcabdcf 100644 --- a/official/c36737092.lua +++ b/official/c36737092.lua @@ -1,4 +1,5 @@ --シンクロ・チェンジ +--Synchro Change local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,13 +44,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c36745317.lua b/official/c36745317.lua index 934c99067e..ea800556d0 100644 --- a/official/c36745317.lua +++ b/official/c36745317.lua @@ -1,9 +1,9 @@ --- 森と目覚の春化精 --- Vernalizer Fairy of Forests and Awakening --- Scripted by Hatter +--森と目覚の春化精 +--Vernusylph of the Awakening Forests +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Double an EARTH monster's ATK + --Double an EARTH monster's ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -14,26 +14,26 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Send 1 EARTH monster to the GY + --Send 1 EARTH monster to the GY c:RegisterEffect(Effect.CreateVernalizerSPEffect(c,id,1,CATEGORY_TOGRAVE,s.tgtg,s.tgop)) end -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x183) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x183),tp,LOCATION_MZONE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_VERNUSYLPH) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_VERNUSYLPH),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x183),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_VERNUSYLPH),tp,LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then - -- Double ATK + --Double ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c36750412.lua b/official/c36750412.lua index 7700d3a86a..1bbb681949 100644 --- a/official/c36750412.lua +++ b/official/c36750412.lua @@ -1,4 +1,5 @@ --炎龍 +--Magna Drago local s,id=GetID() function s.initial_effect(c) --atkup @@ -21,7 +22,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c36757171.lua b/official/c36757171.lua index cdb88d9498..cbbd4572be 100644 --- a/official/c36757171.lua +++ b/official/c36757171.lua @@ -1,8 +1,9 @@ --ヴェルズ・バハムート +--Evilswarm Bahamut local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LSWARM),4,2) c:EnableReviveLimit() --attack up local e1=Effect.CreateEffect(c) @@ -12,16 +13,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xa} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_LSWARM} function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() end @@ -35,15 +32,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.dfilter(c) - return c:IsSetCard(0xa) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_LSWARM) and c:IsMonster() and c:IsDiscardable() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,nil) if #g==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c36768783.lua b/official/c36768783.lua index 8a45aeb642..ff2a352098 100644 --- a/official/c36768783.lua +++ b/official/c36768783.lua @@ -1,5 +1,5 @@ --星導竜アーミライル ---Armiryle the Starguide Dragon +--Armillyre, the Starleader Dragon --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -56,14 +56,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c36776089.lua b/official/c36776089.lua index 5291bca5a2..2a115c5f88 100644 --- a/official/c36776089.lua +++ b/official/c36776089.lua @@ -1,4 +1,5 @@ --神騎セイントレア +--Sky Cavalry Centaurea local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetCondition(s.retcon) - e2:SetCost(s.retcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rettg) e2:SetOperation(s.retop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,10 +34,6 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc and c:IsRelateToBattle() and bc:IsRelateToBattle() end -function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler():GetBattleTarget(),1,0,0) @@ -46,4 +43,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.SendtoHand(bc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3679218.lua b/official/c3679218.lua index 32986bdb5a..4889abd443 100644 --- a/official/c3679218.lua +++ b/official/c3679218.lua @@ -29,19 +29,19 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0x112} +s.listed_series={SET_KNIGHTMARE} function s.matfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x112,lc,sumtype,tp) and not c:IsSummonCode(lc,sumtype,tp,id) + return c:IsSetCard(SET_KNIGHTMARE,lc,sumtype,tp) and not c:IsSummonCode(lc,sumtype,tp,id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x112) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KNIGHTMARE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(tp) Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36795102.lua b/official/c36795102.lua index aa477c40e0..07b324c6a6 100644 --- a/official/c36795102.lua +++ b/official/c36795102.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(function(e) return e:GetHandler():IsContinuousSpell() end) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.spthtg) e3:SetOperation(s.spthop) c:RegisterEffect(e3) @@ -51,7 +51,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.selfspcon(e,tp,eg,ep,ev,re,r,rp) local dc=Duel.GetAttackTarget() @@ -97,4 +97,4 @@ function s.spthop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(hg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,hg) end -end +end \ No newline at end of file diff --git a/official/c36809777.lua b/official/c36809777.lua index 9b6eff95db..20161ed902 100644 --- a/official/c36809777.lua +++ b/official/c36809777.lua @@ -73,4 +73,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(1-tp,s.typecount(1-tp),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c3682106.lua b/official/c3682106.lua index 605b267e36..ce1b026b11 100644 --- a/official/c3682106.lua +++ b/official/c3682106.lua @@ -1,4 +1,5 @@ --ダブルトラップ +--Double Snare local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36834155.lua b/official/c36834155.lua index f31cb15292..7023a13770 100644 --- a/official/c36834155.lua +++ b/official/c36834155.lua @@ -1,4 +1,5 @@ --フォトン・パイレーツ +--Photon Pirate local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x55} +s.listed_series={SET_PHOTON} function s.cfilter(c) - return c:IsSetCard(0x55) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_PHOTON) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -29,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c368382.lua b/official/c368382.lua index 4729d2a8a7..b2b4f59500 100644 --- a/official/c368382.lua +++ b/official/c368382.lua @@ -22,10 +22,10 @@ function s.initial_effect(c) e2:SetCondition(s.spcon) c:RegisterEffect(e2) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} s.listed_names={id} function s.tfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) + return c:IsFaceup() and c:IsSetCard(SET_DINOMIST) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) @@ -35,7 +35,7 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.SelectEffectYesNo(tp,c) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) if Duel.NegateEffect(ev) then Duel.BreakEffect() Duel.Destroy(c,REASON_EFFECT) diff --git a/official/c36841733.lua b/official/c36841733.lua index 683fecd352..c28a336e26 100644 --- a/official/c36841733.lua +++ b/official/c36841733.lua @@ -33,15 +33,15 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x3008} -s.material_setcode={0x8} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO} function s.ffilter(c,fc,sumtype,tp) - return c:IsType(TYPE_NORMAL,fc,sumtype,tp) and c:IsSetCard(0x8,fc,sumtype,tp) + return c:IsType(TYPE_NORMAL,fc,sumtype,tp) and c:IsSetCard(SET_HERO,fc,sumtype,tp) end function s.valcheck(e,c) local g=c:GetMaterial() @@ -52,7 +52,7 @@ function s.valcheck(e,c) e:SetLabel(atk) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -62,7 +62,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -74,12 +74,8 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc and bc:IsMonster() end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3008) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsType(TYPE_FUSION) and c:IsSetCard(SET_ELEMENTAL_HERO) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -97,11 +93,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetValue(s.bttg) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end function s.bttg(e,c) return c:IsFaceup() and c:IsLevelBelow(e:GetHandler():GetLevel()) -end +end \ No newline at end of file diff --git a/official/c3685372.lua b/official/c3685372.lua index 0000153e15..37d95797b7 100644 --- a/official/c3685372.lua +++ b/official/c3685372.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -132,4 +132,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and tc:GetBaseAttack()>0 then Duel.Damage(1-tp,tc:GetBaseAttack()//2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36857073.lua b/official/c36857073.lua index e20fa795af..b29d42a4e2 100644 --- a/official/c36857073.lua +++ b/official/c36857073.lua @@ -1,4 +1,5 @@ --琰魔竜 レッド・デーモン・ベリアル +--Hot Red Dragon Archfiend Bane local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.synchro_nt_required=1 -s.listed_series={0x1045} +s.listed_series={SET_RED_DRAGON_ARCHFIEND} function s.sfilter(c,val,scard,sumtype,tp) return c:IsRace(RACE_DRAGON,scard,sumtype,tp) and c:IsAttribute(ATTRIBUTE_DARK,scard,sumtype,tp) and c:IsType(TYPE_SYNCHRO,scard,sumtype,tp) end @@ -40,7 +41,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x1045) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_DRAGON_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter1(chkc,e,tp) end @@ -70,7 +71,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end @@ -82,4 +83,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter3),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,g1:GetFirst():GetLevel()) g1:Merge(g2) Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c36868108.lua b/official/c36868108.lua index 3baffdc463..4ca9858de9 100644 --- a/official/c36868108.lua +++ b/official/c36868108.lua @@ -1,4 +1,5 @@ --ガラスの鎧 +--Armored Glass local s,id=GetID() function s.initial_effect(c) --activate @@ -16,9 +17,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.distarget(e,c) return c:IsType(TYPE_EQUIP) -end +end \ No newline at end of file diff --git a/official/c36870345.lua b/official/c36870345.lua index bde17a80cd..911fb47c86 100644 --- a/official/c36870345.lua +++ b/official/c36870345.lua @@ -1,4 +1,5 @@ --ドラグニティ-アキュリス +--Dragunity Aklys local s,id=GetID() function s.initial_effect(c) --equip @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.filter(c,e,tp) - return c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -48,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -72,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36890111.lua b/official/c36890111.lua index 65ff00d68a..3b4d11d43c 100644 --- a/official/c36890111.lua +++ b/official/c36890111.lua @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c36894320.lua b/official/c36894320.lua index 010ad8f138..996eabbc78 100644 --- a/official/c36894320.lua +++ b/official/c36894320.lua @@ -45,12 +45,12 @@ function s.initial_effect(c) e4:SetOperation(s.tdop) c:RegisterEffect(e4) end -s.listed_series={0x4a} +s.listed_series={SET_TIMELORD} s.listed_names={9409625,72883039} function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp and e:GetHandler():GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) return true end function s.acfilter(c) @@ -97,14 +97,14 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(1002270280)==0 end - c:RegisterFlagEffect(1002270280,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(1002270280,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x4a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TIMELORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -120,7 +120,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSetCard(0x4a) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_TIMELORD) and c:IsMonster() and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -135,12 +135,11 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then local sc=g:Select(tp,1,1,nil):GetFirst() Duel.SSet(tp,sc) end end -end - +end \ No newline at end of file diff --git a/official/c36916401.lua b/official/c36916401.lua index bd2e43755a..a691ef5e11 100644 --- a/official/c36916401.lua +++ b/official/c36916401.lua @@ -1,4 +1,5 @@ --バーニングナックル・スピリッツ +--Battlin' Boxing Spirits local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end Duel.DiscardDeck(tp,1,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_BATTLIN_BOXER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c3693034.lua b/official/c3693034.lua index 2e5421eae8..2a80af6c2e 100644 --- a/official/c3693034.lua +++ b/official/c3693034.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.poscon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) diff --git a/official/c36935434.lua b/official/c36935434.lua index 75823dd91a..218be22431 100644 --- a/official/c36935434.lua +++ b/official/c36935434.lua @@ -1,4 +1,5 @@ --バイロード・サクリファイス +--Byroad Sacrifice local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c36953371.lua b/official/c36953371.lua index 0ff0034e40..b94512a875 100644 --- a/official/c36953371.lua +++ b/official/c36953371.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x9a),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),1,99) c:EnableReviveLimit() --defense attack local e1=Effect.CreateEffect(c) @@ -21,20 +21,17 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return e:GetHandler():IsSynchroSummoned() + and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36956512.lua b/official/c36956512.lua index 8c65e1055b..f9fd33d7ea 100644 --- a/official/c36956512.lua +++ b/official/c36956512.lua @@ -11,21 +11,18 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e3:SetCountLimit(1) - e3:SetCondition(s.atkcon) + e3:SetCondition(aux.StatChangeDamageStepCondition) e3:SetCost(s.atkcost) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.counter_list={0x37} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.counter_list={COUNTER_KAIJU} function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,3,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,3,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end @@ -41,13 +38,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(def/2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c36970611.lua b/official/c36970611.lua index 6096c233c0..954c8eff1a 100644 --- a/official/c36970611.lua +++ b/official/c36970611.lua @@ -29,21 +29,21 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCondition(aux.exccon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0xc1} +s.listed_series={SET_PSY_FRAME} function s.cfilter(c,tp) - return c:IsSetCard(0xc1) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_PSY_FRAME) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp,POS_FACEDOWN) end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) + local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp) Duel.Remove(cg,POS_FACEUP,REASON_COST) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -61,7 +61,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xc1) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PSY_FRAME) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -74,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c36975314.lua b/official/c36975314.lua index 296c1220c6..1debba0979 100644 --- a/official/c36975314.lua +++ b/official/c36975314.lua @@ -1,5 +1,5 @@ --大捕り物 ---Manhunt +--Crackdown --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -76,7 +76,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e1:SetRange(LOCATION_MZONE) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetCondition(s.con) tc:RegisterEffect(e1) end @@ -95,4 +95,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c36982581.lua b/official/c36982581.lua index 72b8718712..9e433afadb 100644 --- a/official/c36982581.lua +++ b/official/c36982581.lua @@ -89,4 +89,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c36995273.lua b/official/c36995273.lua index 329ab82b1b..60715a91ff 100644 --- a/official/c36995273.lua +++ b/official/c36995273.lua @@ -1,4 +1,5 @@ --縮退回路 +--Degenerate Circuit local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,17 +22,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.costcon) e3:SetOperation(s.costop) c:RegisterEffect(e3) end function s.rmtg(e,c) - return c:IsLocation(LOCATION_MZONE) or (c:GetOriginalType()&TYPE_MONSTER)~=0 + return c:IsLocation(LOCATION_MZONE) or c:IsMonsterCard() end function s.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.costop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,500) then diff --git a/official/c37007105.lua b/official/c37007105.lua index d6176913f5..f5a1838f77 100644 --- a/official/c37007105.lua +++ b/official/c37007105.lua @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c3701074.lua b/official/c3701074.lua index d7b8558659..40c4f68986 100644 --- a/official/c3701074.lua +++ b/official/c3701074.lua @@ -1,4 +1,5 @@ --ダーク・キュア +--Dark Cure local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -60,4 +61,4 @@ function s.recop2(e,tp,eg,ep,ev,re,r,rp) end Duel.Recover(1-tp,g:GetFirst():GetAttack()/2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37011715.lua b/official/c37011715.lua index b42097bc6d..320a805512 100644 --- a/official/c37011715.lua +++ b/official/c37011715.lua @@ -1,4 +1,5 @@ --奇跡の蘇生 +--Miraculous Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37021315.lua b/official/c37021315.lua index 986c60036c..82346633ac 100644 --- a/official/c37021315.lua +++ b/official/c37021315.lua @@ -30,7 +30,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg2) e1:SetOperation(s.spop2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c37038993.lua b/official/c37038993.lua index 6c3d7f0ed3..8e6b6311f1 100644 --- a/official/c37038993.lua +++ b/official/c37038993.lua @@ -1,4 +1,5 @@ --焔紫竜ピュラリス +--Puralis, the Purple Pyrotile local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -25,7 +26,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37042505.lua b/official/c37042505.lua index 8db356ddf7..7d6962cc45 100644 --- a/official/c37042505.lua +++ b/official/c37042505.lua @@ -1,7 +1,6 @@ --不朽の特殊合金 --Everlasting Alloy --Scripted by andré - local s,id=GetID() function s.initial_effect(c) --Your machine monsters cannot be destroyed by opponent's card effects @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetCondition(s.condition1) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1) --Negate card/effect that targets your machine monster(s) local e2=Effect.CreateEffect(c) @@ -25,7 +24,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_JINZO} - function s.condition1(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_JINZO),tp,LOCATION_ONFIELD,0,1,nil) end @@ -42,7 +40,7 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.efilter) tc:RegisterEffect(e1) end diff --git a/official/c37043180.lua b/official/c37043180.lua index b2925abf73..54742943c9 100644 --- a/official/c37043180.lua +++ b/official/c37043180.lua @@ -1,4 +1,5 @@ --異次元の戦士 +--D.D. Warrior local s,id=GetID() function s.initial_effect(c) --remove @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(a,d) local rg=g:Filter(Card.IsRelateToBattle,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37053871.lua b/official/c37053871.lua index 7d01c12486..92505e8631 100644 --- a/official/c37053871.lua +++ b/official/c37053871.lua @@ -30,4 +30,4 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.ChangeAttackTarget(nil) -end +end \ No newline at end of file diff --git a/official/c37055344.lua b/official/c37055344.lua index 73b4a14aac..d429275da9 100644 --- a/official/c37055344.lua +++ b/official/c37055344.lua @@ -21,12 +21,12 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x8d) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) and c:IsCanTurnSet() end function s.filter2(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) @@ -78,11 +78,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end else if not tc:IsRelateToEffect(e) or tc:IsPosition(POS_FACEUP_ATTACK) then return end - if Duel.ChangePosition(tc,POS_FACEUP_ATTACK)==0 or not tc:IsSetCard(0x8d) then return end + if Duel.ChangePosition(tc,POS_FACEUP_ATTACK)==0 or not tc:IsSetCard(SET_GHOSTRICK) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectMatchingCard(tp,s.filter4,tp,0,LOCATION_MZONE,1,1,nil) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c37057012.lua b/official/c37057012.lua index 631af5ba58..0bf9a99019 100644 --- a/official/c37057012.lua +++ b/official/c37057012.lua @@ -1,4 +1,5 @@ --サイバー・オーガ・2 +--Cyber Ogre 2 local s,id=GetID() function s.initial_effect(c) --fusion material @@ -14,11 +15,11 @@ function s.initial_effect(c) e1:SetValue(s.atkval) c:RegisterEffect(e1) end -s.material_setcode=0x93 +s.material_setcode=SET_CYBER function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return Duel.IsPhase(PHASE_DAMAGE_CAL) and e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil end function s.atkval(e,c) return Duel.GetAttackTarget():GetAttack()/2 -end +end \ No newline at end of file diff --git a/official/c37057743.lua b/official/c37057743.lua index fec31546ce..3d4b2648ab 100644 --- a/official/c37057743.lua +++ b/official/c37057743.lua @@ -1,4 +1,5 @@ --炎星皇-チョウライオ +--Brotherhood of the Fire Fist - Lion Emperor local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end @@ -38,7 +35,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) e1:SetLabel(tc:GetCode()) @@ -50,4 +47,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c37061511.lua b/official/c37061511.lua index 006412ccf1..3538d92b32 100644 --- a/official/c37061511.lua +++ b/official/c37061511.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) end s.listed_names={85327820} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.thfilter(c) return c:IsFaceup() and c:GetAttack()<=2300 and c:IsAbleToHand() @@ -68,13 +68,13 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) - if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)>0 then + if Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) end @@ -95,8 +95,8 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37083210.lua b/official/c37083210.lua index b0f85578fc..da157c30e9 100644 --- a/official/c37083210.lua +++ b/official/c37083210.lua @@ -4,43 +4,42 @@ local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) + e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCondition(s.condition) + e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local a=Duel.GetAttacker() - local at=Duel.GetAttackTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() - and a:IsControler(1-tp) and at and at:IsPosition(POS_FACEUP_DEFENSE) and a:GetAttack()0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end end function s.splimit(e,c) - if not c:IsSetCard(0x48) then return false end + if not c:IsSetCard(SET_NUMBER) then return false end if c:IsMonster() then return c:IsType(TYPE_XYZ) else diff --git a/official/c37119142.lua b/official/c37119142.lua index 2310ec6904..c5a6829891 100644 --- a/official/c37119142.lua +++ b/official/c37119142.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.extrafilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end @@ -47,7 +47,7 @@ function s.extraval(chk,summon_type,e,...) local c=e:GetHandler() if chk==0 then local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(0x101) or Duel.GetFlagEffect(tp,id)>0 then + if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_CODE_TALKER) or Duel.GetFlagEffect(tp,id)>0 then return Group.CreateGroup() else table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) @@ -57,7 +57,7 @@ function s.extraval(chk,summon_type,e,...) local sg,sc,tp=... if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end elseif chk==2 then for _,eff in ipairs(s.flagmap[c]) do @@ -70,7 +70,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() e:SetLabel(0) if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end - return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101) + return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_CODE_TALKER) end function s.thfilter(c,e,tp,chk) return c:IsRace(RACE_CYBERSE) and c:IsLevelBelow(4) and (c:IsAbleToHand() or (chk==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) @@ -95,14 +95,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c37120512.lua b/official/c37120512.lua index dd10316743..2064f4a075 100644 --- a/official/c37120512.lua +++ b/official/c37120512.lua @@ -1,4 +1,5 @@ --闇の破神剣 +--Sword of Dark Destruction local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK)) @@ -14,5 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-200) c:RegisterEffect(e3) -end - +end \ No newline at end of file diff --git a/official/c37129797.lua b/official/c37129797.lua index 6dd1e7b15d..5ae09a8816 100644 --- a/official/c37129797.lua +++ b/official/c37129797.lua @@ -63,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_ZOMBIE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c37132349.lua b/official/c37132349.lua index e6bf291e39..7da6b04f55 100644 --- a/official/c37132349.lua +++ b/official/c37132349.lua @@ -1,4 +1,5 @@ --おジャマ・レッド +--Ojama Red local s,id=GetID() function s.initial_effect(c) --special summon @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xf} +s.listed_series={SET_OJAMA} function s.filter(c,e,tp) - return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_OJAMA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c3715284.lua b/official/c3715284.lua index 78f22dc092..0773914355 100644 --- a/official/c3715284.lua +++ b/official/c3715284.lua @@ -1,5 +1,5 @@ --機皇兵廠オブリガード ---Meklord Army Arsenal of Obbligato +--Meklord Army Deployer Obbligato --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x13,0x6013} +s.listed_series={SET_MEKLORD,SET_MEKLORD_ARMY} function s.spfilter(c,e,tp) - return c:IsSetCard(0x6013) and c:IsMonster() and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MEKLORD_ARMY) and c:IsMonster() and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -74,14 +74,14 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.dmtg) e1:SetOperation(s.dmop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.dmtg(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x13),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MEKLORD),tp,LOCATION_MZONE,0,1,nil) end function s.dmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) - local value=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x13),tp,LOCATION_MZONE,0,1,nil) + local value=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_MEKLORD),tp,LOCATION_MZONE,0,1,nil) Duel.Damage(1-tp,value*100,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37164373.lua b/official/c37164373.lua index 6f022038bf..3563d8fb1d 100644 --- a/official/c37164373.lua +++ b/official/c37164373.lua @@ -1,8 +1,9 @@ --クイーンマドルチェ・ティアラミス +--Madolche Queen Tiaramisu local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x71),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MADOLCHE),4,2) c:EnableReviveLimit() --todeck local e1=Effect.CreateEffect(c) @@ -12,18 +13,14 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x71} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_MADOLCHE} function s.filter(c) - return c:IsSetCard(0x71) and c:IsAbleToDeck() + return c:IsSetCard(SET_MADOLCHE) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -36,12 +33,12 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_HAND|LOCATION_EXTRA) local dg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil) if ct>0 and #dg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local rg=dg:Select(tp,1,ct,nil) Duel.HintSelection(rg) - Duel.SendtoDeck(rg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37168514.lua b/official/c37168514.lua index 58dee31643..a728154cec 100644 --- a/official/c37168514.lua +++ b/official/c37168514.lua @@ -1,4 +1,5 @@ --ゴルゴニック・ケルベロス +--Gorgonic Cerberus local s,id=GetID() function s.initial_effect(c) --summon success @@ -25,7 +26,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37169670.lua b/official/c37169670.lua index 742ecdc29f..16d00b80d7 100644 --- a/official/c37169670.lua +++ b/official/c37169670.lua @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3717252.lua b/official/c3717252.lua index 2be7814887..4d53fe74f2 100644 --- a/official/c3717252.lua +++ b/official/c3717252.lua @@ -1,4 +1,5 @@ --シャドール・ビースト +--Shaddoll Beast local s,id=GetID() function s.initial_effect(c) --flip @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,2,REASON_EFFECT)==2 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +58,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37192109.lua b/official/c37192109.lua index 07adf24ce3..5abe9cbf93 100644 --- a/official/c37192109.lua +++ b/official/c37192109.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_END_PHASE) e1:SetHintTiming(TIMING_SPSUMMON) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) @@ -30,10 +30,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc1} +s.listed_series={SET_PSY_FRAME} function s.rmfilter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToRemove() - and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and c:IsSpecialSummoned() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end @@ -49,34 +49,34 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end local g=Group.FromCards(c,tc) - if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if Duel.Remove(g,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local fid=c:GetFieldID() local rct=1 - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then rct=2 end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then rct=2 end local og=Duel.GetOperatedGroup() local oc=og:GetFirst() for oc in aux.Next(og) do if oc:IsControler(tp) then - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,rct,fid) + oc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,rct,fid) else - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,rct,fid) + oc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_OPPO_TURN,0,rct,fid) end end og:KeepAlive() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabel(fid) e1:SetLabelObject(og) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetValue(Duel.GetTurnCount()) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) e1:SetValue(0) end Duel.RegisterEffect(e1,tp) @@ -86,7 +86,7 @@ function s.retfilter(c,fid) return c:GetFlagEffectLabel(id)==fid end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end + if Duel.IsTurnPlayer(1-tp) or Duel.GetTurnCount()==e:GetValue() then return false end local g=e:GetLabelObject() if not g:IsExists(s.retfilter,1,nil,e:GetLabel()) then g:DeleteGroup() @@ -113,7 +113,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xc1) and c:IsAbleToHand() + return c:IsSetCard(SET_PSY_FRAME) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) and chkc~=e:GetHandler() end @@ -127,8 +127,8 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37195861.lua b/official/c37195861.lua index 6449366927..9279ed1ce1 100644 --- a/official/c37195861.lua +++ b/official/c37195861.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(tp) and s.thfilter(tc) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37198732.lua b/official/c37198732.lua index 30d9e8a783..720cffc4d1 100644 --- a/official/c37198732.lua +++ b/official/c37198732.lua @@ -1,5 +1,5 @@ --レベル・マイスター ---Level Shifter +--Level Lifter local s,id=GetID() function s.initial_effect(c) --Activate @@ -55,8 +55,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c37209439.lua b/official/c37209439.lua index eb0160d82a..f191d7502d 100644 --- a/official/c37209439.lua +++ b/official/c37209439.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.damcon) @@ -31,9 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_SZONE) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) + return c:IsFaceup() and c:IsSetCard(SET_DD) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -49,7 +49,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distg) e1:SetLabel(fid) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -57,7 +57,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_SZONE) e2:SetOperation(s.disop) e2:SetLabel(fid) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -66,7 +66,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTarget(s.distg) e3:SetLabel(fid) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.distg(e,c) @@ -74,12 +74,12 @@ function s.distg(e,c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetFieldID()~=e:GetLabel() then + if tl==LOCATION_SZONE and re:IsTrapEffect() and re:GetHandler():GetFieldID()~=e:GetLabel() then Duel.NegateEffect(ev) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -91,4 +91,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37231841.lua b/official/c37231841.lua index b514b30101..30cf1c784c 100644 --- a/official/c37231841.lua +++ b/official/c37231841.lua @@ -1,4 +1,5 @@ --軽量化 +--Lighten the Load local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,9 +34,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3723262.lua b/official/c3723262.lua index 9a7232c4cb..9131c8cf23 100644 --- a/official/c3723262.lua +++ b/official/c3723262.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) diff --git a/official/c37241623.lua b/official/c37241623.lua index f18f077bc7..70eb947724 100644 --- a/official/c37241623.lua +++ b/official/c37241623.lua @@ -1,4 +1,5 @@ --紋章の記録 +--Heraldry Record local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(re:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37256135.lua b/official/c37256135.lua index a3e0634b71..41857bdd31 100644 --- a/official/c37256135.lua +++ b/official/c37256135.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x147} +s.listed_series={SET_MELFFY} function s.filter(c,e,tp) - return c:IsSetCard(0x147) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_MELFFY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -32,5 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c37256334.lua b/official/c37256334.lua index 0282750673..61ef71ef81 100644 --- a/official/c37256334.lua +++ b/official/c37256334.lua @@ -1,4 +1,5 @@ --EMカード・ガードナー +--Performapal Card Gardna local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetValue(s.defval) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.deffilter1(c,def) return c:IsPosition(POS_FACEUP_DEFENSE) and c:GetDefense()~=def end @@ -45,15 +46,15 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(def) tc:RegisterEffect(e1) end end function s.deffilter2(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.defval(e,c) local g=Duel.GetMatchingGroup(s.deffilter2,c:GetControler(),LOCATION_MZONE,0,c) return g:GetSum(Card.GetBaseDefense) -end +end \ No newline at end of file diff --git a/official/c37260946.lua b/official/c37260946.lua index a458874544..b3d741fa38 100644 --- a/official/c37260946.lua +++ b/official/c37260946.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_EQUIP) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) @@ -52,7 +52,7 @@ function s.tunop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_ADD_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -81,7 +81,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(_,c) return c:IsType(TYPE_SYNCHRO) end) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c37261776.lua b/official/c37261776.lua index 804af8594c..0d0b56cf78 100644 --- a/official/c37261776.lua +++ b/official/c37261776.lua @@ -63,7 +63,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(e:GetLabel()/2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -99,5 +99,5 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.zeroatkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReincarnationSummoned() and c:IsFusionSummoned() and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL -end + return c:IsReincarnationSummoned() and c:IsFusionSummoned() and Duel.IsPhase(PHASE_DAMAGE_CAL) +end \ No newline at end of file diff --git a/official/c37267041.lua b/official/c37267041.lua index 1fee906c9c..a82b8aec5f 100644 --- a/official/c37267041.lua +++ b/official/c37267041.lua @@ -28,13 +28,13 @@ function s.initial_effect(c) end s.listed_names={74388798} s.LVnum=7 -s.LVset=0xe7 +s.LVset=SET_SILENT_SWORDSMAN function s.distg(e,c) return c:IsSpell() end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if (tl&LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then + if (tl&LOCATION_SZONE)~=0 and re:IsSpellEffect() then Duel.NegateEffect(ev) end end \ No newline at end of file diff --git a/official/c37279508.lua b/official/c37279508.lua index 04658759f4..fb286b08cb 100644 --- a/official/c37279508.lua +++ b/official/c37279508.lua @@ -1,4 +1,5 @@ --No.37 希望織竜スパイダー・シャーク +--Number 37: Hope Woven Dragon Spider Shark local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -30,10 +31,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=37 -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end @@ -44,14 +41,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-1000) tc:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -69,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37300735.lua b/official/c37300735.lua index 1ef12bf8f8..7a424393e5 100644 --- a/official/c37300735.lua +++ b/official/c37300735.lua @@ -1,4 +1,5 @@ --TG ジェット・ファルコン +--T.G. Jet Falcon local s,id=GetID() function s.initial_effect(c) --damage @@ -25,4 +26,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37310367.lua b/official/c37310367.lua index 4ae9cba451..57f4a65ff3 100644 --- a/official/c37310367.lua +++ b/official/c37310367.lua @@ -1,6 +1,5 @@ --ロックアウト・ガードナー --Lockout Gardna - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -45,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -55,7 +54,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) if not g or #g~=1 then return false end local tc=g:GetFirst() e:SetLabelObject(tc) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsLocation(LOCATION_MZONE) + return re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_MZONE) and tc:IsControler(tp) and tc:IsFaceup() and tc:IsRace(RACE_CYBERSE) and tc:IsLocation(LOCATION_MZONE) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,12 +76,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c37313338.lua b/official/c37313338.lua index 83b42f2804..2c6147d5ce 100644 --- a/official/c37313338.lua +++ b/official/c37313338.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c37318031.lua b/official/c37318031.lua index 782d97133f..184cdfd234 100644 --- a/official/c37318031.lua +++ b/official/c37318031.lua @@ -1,4 +1,5 @@ --R-ライトジャスティス +--R - Righteous Justice local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,12 +11,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37322745.lua b/official/c37322745.lua index db1c889b87..69164bb4fd 100644 --- a/official/c37322745.lua +++ b/official/c37322745.lua @@ -1,4 +1,5 @@ --ナチュルの森 +--Naturia Forest local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,12 +19,12 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c) - return c:IsLevelBelow(3) and c:IsSetCard(0x2a) and c:IsMonster() and c:IsAbleToHand() + return c:IsLevelBelow(3) and c:IsSetCard(SET_NATURIA) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37337327.lua b/official/c37337327.lua index e0636bb9f2..2d25354bd3 100644 --- a/official/c37337327.lua +++ b/official/c37337327.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCondition(s.sccon) + e1:SetCondition(function() return Duel.IsMainPhase() or Duel.IsBattlePhase() end) e1:SetTarget(s.sctg) e1:SetOperation(s.scop) c:RegisterEffect(e1) @@ -30,17 +30,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.matfilter(c,lc,sumtype,tp) - return c:IsType(TYPE_EFFECT,lc,sumtype,tp) and c:IsRace(RACE_WARRIOR+RACE_MACHINE,lc,sumtype,tp) + return c:IsType(TYPE_EFFECT,lc,sumtype,tp) and c:IsRace(RACE_WARRIOR|RACE_MACHINE,lc,sumtype,tp) end function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp) end -function s.sccon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 -end function s.scfilter(c,mg) return c:IsSynchroSummonable(nil,mg) end @@ -64,11 +60,11 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetReasonPlayer()~=tp - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetReasonPlayer()~=tp + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLinkSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x43) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) + return c:IsSetCard(SET_JUNK) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -81,5 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) g:GetFirst():CompleteProcedure() end -end - +end \ No newline at end of file diff --git a/official/c3734202.lua b/official/c3734202.lua index c86a0f1e5e..ea0176a888 100644 --- a/official/c3734202.lua +++ b/official/c3734202.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} s.listed_names={id} function s.cfilter(c,race,ft,tp) return c:IsRace(race) and c:IsAttribute(ATTRIBUTE_EARTH) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) and (c:IsFaceup() or c:IsControler(tp)) @@ -50,7 +50,7 @@ function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,RACE_INSECT,ft,tp) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,RACE_INSECT,ft,tp) Duel.Release(g,REASON_COST) end @@ -76,7 +76,7 @@ function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,RACE_PLANT,ft,tp) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,RACE_PLANT,ft,tp) Duel.Release(g,REASON_COST) end @@ -95,7 +95,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x2a) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NATURIA) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -108,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37343995.lua b/official/c37343995.lua index cb13808390..533ad413cb 100644 --- a/official/c37343995.lua +++ b/official/c37343995.lua @@ -1,9 +1,9 @@ --- エクソシスター・マルファ --- Exosister Martha --- Scripted by Hatter +--エクソシスター・マルファ +--Exosister Martha +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,8 +15,8 @@ function s.initial_effect(c) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsSetCard(0x174) end) - -- Special Summon Xyz + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsSetCard(SET_EXOSISTER) end) + --Special Summon Xyz local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -30,21 +30,21 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={16474916} -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.hspcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsType,TYPE_XYZ)),tp,LOCATION_MZONE,0,1,nil) end function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - -- Cannot Special Summon monsters, except "Exosister" monsters + --Cannot Special Summon monsters, except "Exosister" monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(0x174) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_EXOSISTER) end) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.dspfilter(c,e,tp) @@ -56,7 +56,7 @@ function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.dspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_DECK|LOCATION_HAND) end function s.hspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -71,7 +71,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.xspfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x174) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_EXOSISTER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.xsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c37349495.lua b/official/c37349495.lua index 3d8b027990..390fa9ec39 100644 --- a/official/c37349495.lua +++ b/official/c37349495.lua @@ -1,4 +1,5 @@ --ナチュル・エッグプラント +--Naturia Eggplant local s,id=GetID() function s.initial_effect(c) --to hand @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x2a) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_NATURIA) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c37354507.lua b/official/c37354507.lua index 05bbcc452d..746511c3c5 100644 --- a/official/c37354507.lua +++ b/official/c37354507.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2b),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_NINJA),2,2) --set local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -28,9 +28,9 @@ function s.initial_effect(c) e3:SetValue(aux.tgoval) c:RegisterEffect(e3) end -s.listed_series={0x61,0x2b} +s.listed_series={SET_NINJITSU_ART,SET_NINJA} function s.setfilter(c) - return c:IsSetCard(0x61) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_NINJITSU_ART) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,5 +44,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end function s.tgcon(e) return #(e:GetHandler():GetLinkedGroup():Filter(Card.IsMonster,nil))>0 -end - +end \ No newline at end of file diff --git a/official/c37364101.lua b/official/c37364101.lua index d340d8c4db..48afde050e 100644 --- a/official/c37364101.lua +++ b/official/c37364101.lua @@ -50,7 +50,7 @@ function s.damcon(e) return e:GetHandler():GetEquipTarget():GetBattleTarget()~=nil end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37383714.lua b/official/c37383714.lua index 9f25faa81d..288b8bfc74 100644 --- a/official/c37383714.lua +++ b/official/c37383714.lua @@ -1,4 +1,5 @@ --魂の綱 +--Soul Rope local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -19,10 +20,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.spfilter(c,e,tp) return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -38,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37390589.lua b/official/c37390589.lua index 3498d09bad..a7da02fdea 100644 --- a/official/c37390589.lua +++ b/official/c37390589.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -83,4 +83,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:CancelToGrave(false) end end -end +end \ No newline at end of file diff --git a/official/c37406863.lua b/official/c37406863.lua index 8abbf4f345..7a5d95ad1c 100644 --- a/official/c37406863.lua +++ b/official/c37406863.lua @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c37412656.lua b/official/c37412656.lua index c4f029cc91..e015b0d0be 100644 --- a/official/c37412656.lua +++ b/official/c37412656.lua @@ -1,4 +1,5 @@ --ヒーロー・ブラスト +--Hero Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c) - return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsAbleToHand() end function s.dfilter(c,atk) return c:IsFaceup() and c:IsAttackBelow(atk) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,s.dfilter,tp,0,LOCATION_MZONE,1,1,nil,tc:GetAttack()) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37414347.lua b/official/c37414347.lua index c5e619f3e2..bc56f1c3fd 100644 --- a/official/c37414347.lua +++ b/official/c37414347.lua @@ -52,16 +52,16 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.counter_place_list={0x4a0} -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107) and c:GetLevel()>=0 + return c:IsFaceup() and c:IsSetCard(SET_FA) and c:GetLevel()>=0 end function s.atkval(e,c) local lg=c:GetLinkedGroup():Filter(s.atkfilter,nil) return lg:GetSum(Card.GetLevel)*300 end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -75,7 +75,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -94,4 +94,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37421075.lua b/official/c37421075.lua index 949d665c94..2b784a9558 100644 --- a/official/c37421075.lua +++ b/official/c37421075.lua @@ -1,4 +1,5 @@ --強制退化 +--Degen-Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,17 +31,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return false end e:SetLabel(0) return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil,e,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,2,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_GRAVE) e:SetLabel(0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) if #g>1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37421579.lua b/official/c37421579.lua index 5783e3c384..cc25151f10 100644 --- a/official/c37421579.lua +++ b/official/c37421579.lua @@ -1,7 +1,8 @@ --炎の騎士 キラー +--Charubin the Fire Knight local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,36121917,96851799) -end +end \ No newline at end of file diff --git a/official/c37426272.lua b/official/c37426272.lua index f0bc487dc2..6d9e142388 100644 --- a/official/c37426272.lua +++ b/official/c37426272.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -61,11 +61,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.atkfilter(c) return c:IsRank(3) and c:IsType(TYPE_XYZ) and c:IsFaceup() end diff --git a/official/c37433748.lua b/official/c37433748.lua index ec1d0e7bb2..ac0aca67fb 100644 --- a/official/c37433748.lua +++ b/official/c37433748.lua @@ -1,4 +1,5 @@ --SPYRAL GEAR - Last Resort +--SPYRAL GEAR - Last Resort local s,id=GetID() function s.initial_effect(c) --equip @@ -7,14 +8,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0xee) + return c:IsFaceup() and c:IsSetCard(SET_SPYRAL) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) and chkc~=e:GetHandler() end @@ -37,7 +38,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -47,7 +48,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -66,7 +67,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e5:SetCondition(s.dircon) e5:SetCost(s.dircost) e5:SetOperation(s.dirop) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e5) end function s.eqlimit(e,c) @@ -90,6 +91,6 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetProperty(EFFECT_CANNOT_DISABLE) e3:SetCode(EFFECT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c3743515.lua b/official/c3743515.lua index cc82e82ff3..60098d3f71 100644 --- a/official/c3743515.lua +++ b/official/c3743515.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c37436476.lua b/official/c37436476.lua index 63d009262f..3475b47d38 100644 --- a/official/c37436476.lua +++ b/official/c37436476.lua @@ -1,4 +1,5 @@ --炎熱旋風壁 +--Molten Whirlwind Wall local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --atk up local e2=Effect.CreateEffect(c) @@ -15,14 +16,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x39)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_LAVAL)) e2:SetValue(s.val) c:RegisterEffect(e2) end -s.listed_series={0x39} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_LAVAL} function s.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39)*100 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_LAVAL)*100 +end \ No newline at end of file diff --git a/official/c37440988.lua b/official/c37440988.lua index ad1da4f2e3..26763acfd1 100644 --- a/official/c37440988.lua +++ b/official/c37440988.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion summon c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1034),7) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CRYSTAL_BEAST),7) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -41,14 +41,14 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.tdcon) - e4:SetCost(s.tdcost) + e4:SetCost(Cost.SelfTribute) e4:SetTarget(s.tdtg) e4:SetOperation(s.tdop) c:RegisterEffect(e4) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.hspfilter(c,tp,sc) - return c:IsSetCard(0x2034,sc,MATERIAL_FUSION,tp) and c:GetLevel()==10 and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 + return c:IsSetCard(SET_ULTIMATE_CRYSTAL,sc,MATERIAL_FUSION,tp) and c:GetLevel()==10 and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 end function s.hspcon(e,c) if c==nil then return true end @@ -71,7 +71,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.cfilter(c) - return c:IsSetCard(0x1034) and c:GetAttack()>0 and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:GetAttack()>0 and c:IsAbleToRemoveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -87,16 +87,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) -end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return e:GetHandler():IsFusionSummoned() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end @@ -106,4 +102,4 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37442336.lua b/official/c37442336.lua index 7c46b54dd5..8d2b3b6efe 100644 --- a/official/c37442336.lua +++ b/official/c37442336.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e3:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c37444964.lua b/official/c37444964.lua index 128e755223..0ef09e5aed 100644 --- a/official/c37444964.lua +++ b/official/c37444964.lua @@ -1,7 +1,6 @@ --夢魔鏡の夢物語 --Dream Mirror Fantasy --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Banish 1 card from the field @@ -26,10 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_DREAM_MIRROR_JOY,CARD_DREAM_MIRROR_TERROR} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x131),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DREAM_MIRROR),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c,e) return c:IsFaceup() and c:IsCode(CARD_DREAM_MIRROR_JOY,CARD_DREAM_MIRROR_TERROR) @@ -56,8 +54,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0x131) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(SET_DREAM_MIRROR) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end diff --git a/official/c37445295.lua b/official/c37445295.lua index 93e0136a39..701ca75c2f 100644 --- a/official/c37445295.lua +++ b/official/c37445295.lua @@ -1,4 +1,5 @@ --シャドール・ファルコン +--Shaddoll Falco local s,id=GetID() function s.initial_effect(c) --flip @@ -24,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x9d) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_SHADDOLL) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -57,4 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c37457534.lua b/official/c37457534.lua index b09774b0b1..cc1dbf8171 100644 --- a/official/c37457534.lua +++ b/official/c37457534.lua @@ -1,7 +1,8 @@ --古代の機械戦車 +--Ancient Gear Tank local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x7)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR)) --Atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -20,7 +21,7 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.damcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end @@ -33,4 +34,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37469904.lua b/official/c37469904.lua index 70cafcc5ef..dcdd8af611 100644 --- a/official/c37469904.lua +++ b/official/c37469904.lua @@ -1,4 +1,5 @@ --デュエリスト・アドベント +--Duelist Alliance local s,id=GetID() function s.initial_effect(c) --activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xf2} +s.listed_series={SET_PENDULUM} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end function s.filter(c) - return c:IsSetCard(0xf2) and c:IsType(TYPE_PENDULUM+TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() + return c:IsSetCard(SET_PENDULUM) and c:IsType(TYPE_PENDULUM+TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37474917.lua b/official/c37474917.lua index 09528a1279..2aa1819f53 100644 --- a/official/c37474917.lua +++ b/official/c37474917.lua @@ -1,4 +1,5 @@ --カタパルト・ウォリアー +--Catapult Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -18,8 +19,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x43) end - local sg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x43) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_JUNK) end + local sg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_JUNK) local atk=sg:GetFirst():GetTextAttack() if atk<0 then atk=0 end e:SetLabel(atk) @@ -34,4 +35,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37478723.lua b/official/c37478723.lua index e47c16ccc5..785d913bec 100644 --- a/official/c37478723.lua +++ b/official/c37478723.lua @@ -1,5 +1,5 @@ --『焔聖剣-デュランダル』 ---"Flame Noble Arms - Durendal" +--"Infernoble Arms - Durendal" --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -50,7 +50,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsLocation(LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(5) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(5) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -72,10 +72,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsRace(RACE_WARRIOR) -end - +end \ No newline at end of file diff --git a/official/c37491810.lua b/official/c37491810.lua index 1fc8bf9289..b92dd4e11b 100644 --- a/official/c37491810.lua +++ b/official/c37491810.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion summon procedure - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe1),aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_METALFOES),aux.FilterBoolFunctionEx(Card.IsType,TYPE_FUSION)) --Must be properly summoned before reviving c:EnableReviveLimit() --Enable pendulum summon @@ -44,10 +44,10 @@ function s.initial_effect(c) e3:SetOperation(s.penop) c:RegisterEffect(e3) end -s.listed_series={0xe1} -s.material_setcode={0xe1} +s.listed_series={SET_METALFOES} +s.material_setcode={SET_METALFOES} function s.cfilter(c,tp) - return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(0xe1) + return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(SET_METALFOES) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -104,4 +104,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c37507488.lua b/official/c37507488.lua index 98741e9325..af73c38c77 100644 --- a/official/c37507488.lua +++ b/official/c37507488.lua @@ -1,4 +1,5 @@ --モンスターレリーフ +--Relieve Monster local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,ft) return c:IsAbleToHand() and (ft>0 or c:GetSequence()<5) @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37511832.lua b/official/c37511832.lua index 18c70700e1..4ccc64e731 100644 --- a/official/c37511832.lua +++ b/official/c37511832.lua @@ -1,4 +1,5 @@ --サルガッソの灯台 +--Sargasso Lighthouse local s,id=GetID() function s.initial_effect(c) --damage change @@ -30,7 +31,7 @@ function s.initial_effect(c) end s.listed_names={1127737} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) + return re:IsSpellEffect() and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) @@ -66,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c37520316.lua b/official/c37520316.lua index 684dd146a6..8c8e99a110 100644 --- a/official/c37520316.lua +++ b/official/c37520316.lua @@ -1,4 +1,5 @@ --精神操作 +--Mind Control local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) @@ -23,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1)~=0 then local e1=Effect.CreateEffect(c) - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetReset(reset) @@ -41,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(reset) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c3752422.lua b/official/c3752422.lua index 9c1da98d0a..82b60aa359 100644 --- a/official/c3752422.lua +++ b/official/c3752422.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.lvfilter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:HasLevel() + return c:IsFaceup() and c:IsPendulumSummoned() and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -34,11 +34,11 @@ end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil) for tc in aux.Next(tg) do - tc:UpdateLevel(1,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,e:GetHandler()) + tc:UpdateLevel(1,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD,e:GetHandler()) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) and c:HasLevel() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -55,10 +55,10 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - if c:IsFaceup() and c:IsRelateToEffect(e) and c:UpdateLevel(-lv,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)~=0 then + if c:IsFaceup() and c:IsRelateToEffect(e) and c:UpdateLevel(-lv,RESETS_STANDARD_PHASE_END)~=0 then local tc=Duel.GetFirstTarget() if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:UpdateLevel(lv,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,c) + tc:UpdateLevel(lv,RESETS_STANDARD_PHASE_END,c) end end -end +end \ No newline at end of file diff --git a/official/c37534148.lua b/official/c37534148.lua index 033f7a647b..b7568e80cc 100644 --- a/official/c37534148.lua +++ b/official/c37534148.lua @@ -1,4 +1,5 @@ --リボーンリボン +--Ribbon of Rebirth local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -31,9 +32,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) e1:SetLabelObject(ec) - e1:SetReset(RESET_EVENT+0x16c0000+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_TOFIELD|RESET_PHASE|PHASE_END) e:GetHandler():RegisterEffect(e1) - ec:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + ec:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ec=e:GetHandler():GetPreviousEquipTarget() @@ -47,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37542782.lua b/official/c37542782.lua index 21d68376be..ca3a06537d 100644 --- a/official/c37542782.lua +++ b/official/c37542782.lua @@ -53,9 +53,9 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={40418351,1546123} -s.listed_series={0x4093} +s.listed_series={SET_CYBERDARK} function s.hspfilter(c,tp,sc) - return c:IsType(TYPE_FUSION,sc,MATERIAL_FUSION,tp) and c:IsSetCard(0x4093,sc,MATERIAL_FUSION,tp) and c:IsLevelBelow(10) + return c:IsType(TYPE_FUSION,sc,MATERIAL_FUSION,tp) and c:IsSetCard(SET_CYBERDARK,sc,MATERIAL_FUSION,tp) and c:IsLevelBelow(10) and c:GetEquipGroup():IsExists(aux.FilterBoolFunction(Card.IsCode,1546123),1,nil) and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 end @@ -112,4 +112,4 @@ function s.atkcon(e) end function s.atkval(e) return e:GetHandler():GetEquipCount()-1 -end +end \ No newline at end of file diff --git a/official/c37557626.lua b/official/c37557626.lua index e91f34677a..bbb9747dc3 100644 --- a/official/c37557626.lua +++ b/official/c37557626.lua @@ -1,4 +1,5 @@ --リチュア・キラー +--Gishki Reliever local s,id=GetID() function s.initial_effect(c) --special summon @@ -16,9 +17,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3a) + return c:IsFaceup() and c:IsSetCard(SET_GISHKI) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37561138.lua b/official/c37561138.lua index d92d591c4f..5188348cec 100644 --- a/official/c37561138.lua +++ b/official/c37561138.lua @@ -11,12 +11,12 @@ function s.initial_effect(c) e1:SetTarget(s.target) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.thfilter(c) - return c:IsSetCard(0x2e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsMonster() and c:IsAbleToHand() end function s.nsfilter(c) - return c:IsSetCard(0x2e) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsSummonable(true,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37576645.lua b/official/c37576645.lua index 9bb1aebc5a..985813fe2e 100644 --- a/official/c37576645.lua +++ b/official/c37576645.lua @@ -1,4 +1,5 @@ --無謀な欲張り +--Reckless Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,6 +26,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_DP) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END,5) + e1:SetReset(RESET_PHASE|PHASE_END,5) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c3758046.lua b/official/c3758046.lua index 20bff2168c..8e35b02e58 100644 --- a/official/c3758046.lua +++ b/official/c3758046.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(function() return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.regtg) e1:SetOperation(s.regop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xae} +s.listed_series={SET_DARK_CONTRACT} function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE) @@ -40,11 +40,11 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.spfilter(c,e,tp,turn) @@ -69,11 +69,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) --Take 1000 damage for each monster Special Summoned by this effect local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabel(ct) e1:SetOperation(s.damop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) Duel.RegisterEffect(e1,tp) end end @@ -81,7 +81,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,e:GetLabel()*1000,REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0xae) and c:IsAbleToHand() + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c37580756.lua b/official/c37580756.lua index e09a1175a9..7605ac7ff0 100644 --- a/official/c37580756.lua +++ b/official/c37580756.lua @@ -1,4 +1,5 @@ --道連れ +--Michizure local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37582948.lua b/official/c37582948.lua index 88a251769c..87eb1c59f8 100644 --- a/official/c37582948.lua +++ b/official/c37582948.lua @@ -1,5 +1,5 @@ --Live☆Twin トラブルサン ---Live☆Twin Trouble-Sun +--Live☆Twin Sunny's Snitch --Script by XyLeN local s,id=GetID() function s.initial_effect(c) @@ -24,9 +24,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x155,0x156} +s.listed_series={SET_EVIL_TWIN,SET_LIVE_TWIN} function s.filter(c) - return c:IsSetCard(0x156) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_LIVE_TWIN) and c:IsMonster() and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -40,11 +40,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) if not eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) then return false end - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x155),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_EVIL_TWIN),tp,LOCATION_MZONE,0,1,nil) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) if Duel.Recover(tp,200,REASON_EFFECT)>0 then Duel.Damage(1-tp,200,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37613663.lua b/official/c37613663.lua index 9d26183f29..8135aaba2b 100644 --- a/official/c37613663.lua +++ b/official/c37613663.lua @@ -77,4 +77,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) c:CancelToGrave() Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37620434.lua b/official/c37620434.lua index dff7b9680e..d876458578 100644 --- a/official/c37620434.lua +++ b/official/c37620434.lua @@ -1,4 +1,5 @@ --デーモン・テイマー +--Shadow Tamer local s,id=GetID() function s.initial_effect(c) --control @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FIEND) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c37626500.lua b/official/c37626500.lua index 9173646e9b..f282a2b37d 100644 --- a/official/c37626500.lua +++ b/official/c37626500.lua @@ -3,4 +3,4 @@ local s,id=GetID() function s.initial_effect(c) Ritual.AddProcEqual(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) -end +end \ No newline at end of file diff --git a/official/c37629703.lua b/official/c37629703.lua index 9ef3c72163..1944f9bbd9 100644 --- a/official/c37629703.lua +++ b/official/c37629703.lua @@ -35,7 +35,7 @@ function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end Duel.SendtoGrave(c,REASON_COST) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.setfilter(c) return c:IsSetCard(SET_LABRYNTH) and c:IsSpellTrap() and c:IsSSetable() @@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c37630732.lua b/official/c37630732.lua index 959f68637c..bb57eed838 100644 --- a/official/c37630732.lua +++ b/official/c37630732.lua @@ -10,7 +10,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then local e2=Effect.CreateEffect(e:GetHandler()) @@ -18,11 +18,11 @@ function s.stage2(e,tc,tp,sg,chk) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) e2:SetLabel(tc:GetBaseAttack()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetOperation(s.damop) Duel.RegisterEffect(e2,tp) end end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,e:GetLabel(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37649320.lua b/official/c37649320.lua index 08af297046..b8d3b059b5 100644 --- a/official/c37649320.lua +++ b/official/c37649320.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.thcon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c37663536.lua b/official/c37663536.lua index ac71e5ba56..2d455ce4ba 100644 --- a/official/c37663536.lua +++ b/official/c37663536.lua @@ -62,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) + return c:IsFusionSummoned() and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) end function s.spfilter(c,e,tp) diff --git a/official/c37675138.lua b/official/c37675138.lua index df6be60db4..6b8033d64f 100644 --- a/official/c37675138.lua +++ b/official/c37675138.lua @@ -1,4 +1,5 @@ --ボーンクラッシャー +--Bone Crusher local s,id=GetID() function s.initial_effect(c) --destroy @@ -25,7 +26,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsPreviousControler(tp) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and s.desfilter(chkc) end @@ -50,7 +51,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTarget(s.sdtg) e1:SetOperation(s.sdop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.sdtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -62,4 +63,4 @@ function s.sdop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37675907.lua b/official/c37675907.lua index 094308f1dc..23831b6150 100644 --- a/official/c37675907.lua +++ b/official/c37675907.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -37,9 +37,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x1017} +s.listed_series={SET_SYNCHRON} function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -47,7 +47,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end @@ -55,7 +55,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsCode(id) and (sumtype&SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO end function s.filter(c) - return c:HasLevel() and c:GetLevel()~=0 and c:IsSetCard(0x1017) and c:IsAbleToGraveAsCost() + return c:HasLevel() and c:GetLevel()~=0 and c:IsSetCard(SET_SYNCHRON) and c:IsAbleToGraveAsCost() end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -88,13 +88,13 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) else e1:SetValue(-lv) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) @@ -110,4 +110,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c37678339.lua b/official/c37678339.lua index 5433114e61..dc43381911 100644 --- a/official/c37678339.lua +++ b/official/c37678339.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetCountLimit(1,{id,1}) e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e3:SetCondition(function() return s.fzonecon(CARD_DREAM_MIRROR_JOY) end) - e3:SetCost(aux.SelfTributeCost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c37679169.lua b/official/c37679169.lua index 8860daa24e..e7ad94ee25 100644 --- a/official/c37679169.lua +++ b/official/c37679169.lua @@ -1,4 +1,5 @@ --Kozmo-デルタシャトル +--Kozmo Delta Shuttle local s,id=GetID() function s.initial_effect(c) --atk/def @@ -24,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.cfilter(c) - return c:IsSetCard(0xd2) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_KOZMO) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,7 +53,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-100*lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --defdown local e2=e1:Clone() @@ -62,7 +63,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -70,7 +71,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(c,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -84,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37683547.lua b/official/c37683547.lua index 563c36ba2a..4849460020 100644 --- a/official/c37683547.lua +++ b/official/c37683547.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_ALBAZ) c:RegisterEffect(e1) --Increase ATK diff --git a/official/c37684215.lua b/official/c37684215.lua index f4efee63ed..c6e1fd2eed 100644 --- a/official/c37684215.lua +++ b/official/c37684215.lua @@ -1,4 +1,5 @@ --融合武器ムラサメブレード +--Fusion Sword Murasame Blade local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)) @@ -16,4 +17,4 @@ function s.initial_effect(c) e4:SetRange(LOCATION_SZONE) e4:SetValue(1) c:RegisterEffect(e4) -end +end \ No newline at end of file diff --git a/official/c37694547.lua b/official/c37694547.lua index 259ed9ab88..8caacd251a 100644 --- a/official/c37694547.lua +++ b/official/c37694547.lua @@ -1,4 +1,5 @@ --歯車街 +--Geartown local s,id=GetID() function s.initial_effect(c) --activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_DECREASE_TRIBUTE) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR)) e2:SetValue(0x1) c:RegisterEffect(e2) --special summon @@ -27,23 +28,23 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function s.filter(c,e,tp) - return c:IsSetCard(0x7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ANCIENT_GEAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.ShuffleDeck(tp) end -end +end \ No newline at end of file diff --git a/official/c37706769.lua b/official/c37706769.lua index dec40c69be..e0935c29b1 100644 --- a/official/c37706769.lua +++ b/official/c37706769.lua @@ -1,5 +1,5 @@ --冥府の執行者 プルート ---The Executor of Hades - Pluto +--The Executor of the Underworld - Pluto --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -30,18 +30,18 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end s.listed_names={CARD_SANCTUARY_SKY} -s.listed_series={0x44} +s.listed_series={SET_THE_AGENT} function s.setcheck(c) return c:IsCode(CARD_SANCTUARY_SKY) and (c:IsFaceup() or not c:IsOnField()) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.setcheck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + return Duel.IsExistingMatchingCard(s.setcheck,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end function s.setcfilter(c,tp) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) @@ -51,9 +51,9 @@ function s.setfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsCanTurnSet() end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.setcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.setcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.setcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -71,14 +71,14 @@ function s.thfilter(c) return c:IsCode(CARD_SANCTUARY_SKY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37721209.lua b/official/c37721209.lua index b5e59fe85b..fc592fe741 100644 --- a/official/c37721209.lua +++ b/official/c37721209.lua @@ -32,4 +32,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3773196.lua b/official/c3773196.lua index 72a37de554..228ff25703 100644 --- a/official/c3773196.lua +++ b/official/c3773196.lua @@ -1,4 +1,5 @@ --異次元の偵察機 +--D.D. Scout Plane local s,id=GetID() function s.initial_effect(c) --removed @@ -21,7 +22,7 @@ function s.initial_effect(c) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsFacedown() then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -29,7 +30,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id+1)==0 end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+0x4760000+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESET_TURN_SET|RESET_TOGRAVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY|RESET_PHASE|PHASE_END,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c37742478.lua b/official/c37742478.lua index caaa4773b1..cf6aa15be4 100644 --- a/official/c37742478.lua +++ b/official/c37742478.lua @@ -1,4 +1,5 @@ --オネスト +--Honest local s,id=GetID() function s.initial_effect(c) --to hand @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCondition(s.condition2) - e2:SetCost(s.cost2) + e2:SetCost(Cost.SelfToGrave) e2:SetOperation(s.operation2) c:RegisterEffect(e2) end @@ -39,12 +40,8 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp) if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsAttribute(ATTRIBUTE_LIGHT) and a:IsRelateToBattle()) - or (d:GetControler()==tp and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRelateToBattle())) -end -function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return d~=nil and d:IsFaceup() and ((a:IsControler(tp) and a:IsAttribute(ATTRIBUTE_LIGHT) and a:IsRelateToBattle()) + or (d:IsControler(tp) and d:IsAttribute(ATTRIBUTE_LIGHT) and d:IsRelateToBattle())) end function s.operation2(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() @@ -54,12 +51,12 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - if a:GetControler()==tp then + e1:SetReset(RESETS_STANDARD_PHASE_END) + if a:IsControler(tp) then e1:SetValue(d:GetAttack()) a:RegisterEffect(e1) else e1:SetValue(a:GetAttack()) d:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37744402.lua b/official/c37744402.lua index a5c6b0b412..27e9b6ae41 100644 --- a/official/c37744402.lua +++ b/official/c37744402.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.ctcon) tc:RegisterEffect(e1) end diff --git a/official/c37745740.lua b/official/c37745740.lua index 354424cfbf..6dec5c047b 100644 --- a/official/c37745740.lua +++ b/official/c37745740.lua @@ -1,4 +1,5 @@ --EMガンバッター +--Performapal Bowhopper local s,id=GetID() function s.initial_effect(c) --damage @@ -26,11 +27,11 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x9f) end + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_PERFORMAPAL) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x9f) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_PERFORMAPAL) e:SetLabel(g:GetFirst():GetLevel()*100) Duel.Release(g,REASON_COST) end @@ -45,14 +46,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x9f) end + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_PERFORMAPAL) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x9f) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_PERFORMAPAL) e:SetLabelObject(g:GetFirst()) Duel.Release(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) and chkc~=e:GetLabelObject() end @@ -66,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37745919.lua b/official/c37745919.lua index a3e9dd1c29..a3657e919e 100644 --- a/official/c37745919.lua +++ b/official/c37745919.lua @@ -1,4 +1,5 @@ --ジャンクBOX +--Junk Box local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -32,11 +33,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3775068.lua b/official/c3775068.lua index 29e288e2ef..4afe5bc290 100644 --- a/official/c3775068.lua +++ b/official/c3775068.lua @@ -43,9 +43,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and c:IsAbleToGraveAsCost() end function s.spcon1(e,c) if c==nil then return true end @@ -73,7 +73,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -94,7 +94,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CUBIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -106,10 +106,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0xe3) and c:IsAbleToHand() + return c:IsSetCard(SET_CUBIC) and c:IsAbleToHand() end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -121,7 +121,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g=g:Select(tp,ft,ft,nil) end if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) sg=sg:Select(tp,1,1,nil) @@ -130,4 +130,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c37750912.lua b/official/c37750912.lua index af3662e561..63c770aa37 100644 --- a/official/c37750912.lua +++ b/official/c37750912.lua @@ -1,5 +1,5 @@ --スターダスト・イルミネイト ---Stardust Illuminate +--Stardust Illumination --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -20,19 +20,19 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end s.listed_names={CARD_STARDUST_DRAGON} -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} --To Grave function s.ssfilter(c) return c:IsFaceup() and (c:IsCode(CARD_STARDUST_DRAGON) or (c:ListsCode(CARD_STARDUST_DRAGON) and c:IsType(TYPE_SYNCHRO))) end function s.tgfilter(c,e,tp,ss,mz) - return c:IsMonster() and c:IsSetCard(0xa3) and (c:IsAbleToGrave() or (ss and mz and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) + return c:IsMonster() and c:IsSetCard(SET_STARDUST) and (c:IsAbleToGrave() or (ss and mz and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) local ss,mz=Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_MZONE,0,1,nil),Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -54,13 +54,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end --Level Change function s.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(0xa3) and c:IsMonster() and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_STARDUST) and c:IsMonster() and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end local tc=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() - end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -76,7 +75,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1-(choice*2)) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c37752990.lua b/official/c37752990.lua index 9717419fad..148654709f 100644 --- a/official/c37752990.lua +++ b/official/c37752990.lua @@ -1,4 +1,5 @@ --ダイナミスト・ケラトプス +--Dinomist Ceratops local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -21,10 +22,10 @@ function s.initial_effect(c) e3:SetCondition(s.spcon) c:RegisterEffect(e3) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} s.listed_names={id} function s.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_DINOMIST) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -37,10 +38,10 @@ function s.repval(e,c) return s.filter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.cfilter(c) - return c:IsFacedown() or c:IsCode(id) or not c:IsSetCard(0xd8) + return c:IsFacedown() or c:IsCode(id) or not c:IsSetCard(SET_DINOMIST) end function s.spcon(e,c) if c==nil then return true end @@ -48,4 +49,4 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c37780349.lua b/official/c37780349.lua index 43cd9607f3..735f4f03cf 100644 --- a/official/c37780349.lua +++ b/official/c37780349.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.dmcon) - e1:SetCost(s.dmcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.dmtg) e1:SetOperation(s.dmop) c:RegisterEffect(e1) @@ -21,19 +21,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.dmcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetBattleDamage(tp)>0 end -function s.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,1000) @@ -44,14 +40,14 @@ function s.dmop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) Duel.Damage(tp,1000,REASON_EFFECT,true) Duel.Damage(1-tp,1000,REASON_EFFECT,true) Duel.RDComplete() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) + return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -65,8 +61,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37781520.lua b/official/c37781520.lua index cd885766e5..9cb520eebd 100644 --- a/official/c37781520.lua +++ b/official/c37781520.lua @@ -1,4 +1,5 @@ --水精鱗-リードアビス +--Mermail Abyssleed local s,id=GetID() function s.initial_effect(c) --special summon @@ -35,13 +36,13 @@ function s.initial_effect(c) e3:SetOperation(s.hdop) c:RegisterEffect(e3) end -s.listed_series={0x75,0x74} +s.listed_series={SET_ABYSS,SET_MERMAIL} function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,3,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,3,3,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,3,3,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -57,7 +58,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.thfilter(c) - return c:IsSetCard(0x75) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_ABYSS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -74,7 +75,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x74) + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(SET_MERMAIL) end function s.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,e:GetHandler()) end @@ -90,4 +91,4 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) Duel.SendtoGrave(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37792478.lua b/official/c37792478.lua index ba0f2cbc57..bdbc066c62 100644 --- a/official/c37792478.lua +++ b/official/c37792478.lua @@ -1,4 +1,5 @@ --メタボ・シャーク +--Metabo-Shark local s,id=GetID() function s.initial_effect(c) --to deck @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3779493.lua b/official/c3779493.lua index 2abc2d1a58..c1ac601d60 100644 --- a/official/c3779493.lua +++ b/official/c3779493.lua @@ -1,4 +1,5 @@ --- Night's End Administrator +--Night's End Administrator +--Night's End Administrator local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -42,10 +43,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,g:GetFirst():GetLocation()) end function s.rmvop(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3779662.lua b/official/c3779662.lua index 18f6ed038c..b036c5f2e3 100644 --- a/official/c3779662.lua +++ b/official/c3779662.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,7573135,1,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19),2) + Fusion.AddProcMixN(c,true,true,7573135,1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR),2) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit,aux.TRUE,1) --extra summon local e3=Effect.CreateEffect(c) @@ -21,7 +21,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,5)) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.spcon) e6:SetCost(s.spcost) @@ -29,14 +29,14 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x19} -s.material_setcode=0x19 +s.listed_series={SET_GLADIATOR} +s.material_setcode=SET_GLADIATOR function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA @@ -45,7 +45,7 @@ function s.espcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.espfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsType(TYPE_FUSION) and c:IsLevelBelow(7) + return c:IsSetCard(SET_GLADIATOR) and c:IsType(TYPE_FUSION) and c:IsLevelBelow(7) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,123,tp,true,false) end function s.esptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,10 +65,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,123,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,123,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -88,10 +88,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) local tc=sg:GetFirst() Duel.SpecialSummonStep(tc,123,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) tc=sg:GetNext() Duel.SpecialSummonStep(tc,123,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c37798171.lua b/official/c37798171.lua index 716c39652a..d56f0b3e45 100644 --- a/official/c37798171.lua +++ b/official/c37798171.lua @@ -1,4 +1,5 @@ --デプス・シャーク +--Depth Shark local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -14,7 +15,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.atkcon) @@ -27,7 +28,7 @@ function s.ntcon(e,c,minc) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,7 +37,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37799519.lua b/official/c37799519.lua index ab3bdd8174..634d9ce4df 100644 --- a/official/c37799519.lua +++ b/official/c37799519.lua @@ -1,20 +1,20 @@ --- スターダスト・シンクロン --- Stardust Synchron --- scripted by Hatter +--スターダスト・シンクロン +--Stardust Synchron +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- special summon itself from hand or GY + --special summon itself from hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- add S/T that lists Stardust Dragon + --add S/T that lists Stardust Dragon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -43,27 +43,27 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- banish it if it leaves the field + --banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end - -- cannot summon extra deck monsters except synchro + --cannot summon extra deck monsters except synchro local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) - -- lizard check + --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) end function s.splimit(e,c) @@ -86,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37803172.lua b/official/c37803172.lua index 8ff0a2c6ed..bfc7fd5473 100644 --- a/official/c37803172.lua +++ b/official/c37803172.lua @@ -1,4 +1,5 @@ --陽炎獣 ペリュトン +--Hazy Flame Peryton local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -28,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x107d} +s.listed_series={SET_HAZY_FLAME} function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x107d) + return se:GetHandler():IsSetCard(SET_HAZY_FLAME) end function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() @@ -42,7 +43,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(e:GetHandler(),REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x107d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HAZY_FLAME) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c37803970.lua b/official/c37803970.lua index ee7fe1f57d..ba6ae86d88 100644 --- a/official/c37803970.lua +++ b/official/c37803970.lua @@ -1,4 +1,5 @@ --アメイジング・ペンデュラム +--Amazing Pendulum local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.GetFieldCard(tp,LOCATION_PZONE,0) and not Duel.GetFieldCard(tp,LOCATION_PZONE,1) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) end -end +end \ No newline at end of file diff --git a/official/c37806313.lua b/official/c37806313.lua index 42cab8436c..91aedd9bc1 100644 --- a/official/c37806313.lua +++ b/official/c37806313.lua @@ -1,4 +1,5 @@ --氷結界の輸送部隊 +--Caravan of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.filter(c) - return c:IsSetCard(0x2f) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -28,13 +29,13 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==2 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37818794.lua b/official/c37818794.lua index f0bc716949..195fd224a7 100644 --- a/official/c37818794.lua +++ b/official/c37818794.lua @@ -50,7 +50,7 @@ function s.initial_effect(c) end s.material={CARD_DARK_MAGICIAN,CARD_REDEYES_B_DRAGON} s.listed_names={CARD_DARK_MAGICIAN,CARD_REDEYES_B_DRAGON} -s.material_setcode={0x3b,0x10a2} +s.material_setcode={SET_RED_EYES,SET_DARK_MAGICIAN} function s.ffilter(c,fc,sumtype,tp) return c:IsRace(RACE_DRAGON,fc,sumtype,tp) and c:IsType(TYPE_EFFECT,fc,sumtype,tp) end @@ -61,7 +61,7 @@ function s.valcheck(e,c) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()>0 + return c:IsFusionSummoned() and e:GetLabel()>0 end function s.chkfilter(c,label) return c:GetFlagEffect(label)>0 @@ -74,7 +74,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+(RESETS_STANDARD&~RESET_TURN_SET)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET)) e1:SetCountLimit(ct) e1:SetTarget(s.destg) e1:SetOperation(s.desop) @@ -105,7 +105,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -121,7 +121,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e:GetHandler():RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37820550.lua b/official/c37820550.lua index 9f02ace0d9..28a3a73aed 100644 --- a/official/c37820550.lua +++ b/official/c37820550.lua @@ -1,4 +1,5 @@ --電撃鞭 +--Electro-Whip local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_THUNDER)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c37829468.lua b/official/c37829468.lua index fdfe60e40a..52761b5489 100644 --- a/official/c37829468.lua +++ b/official/c37829468.lua @@ -1,4 +1,5 @@ --RAI-JIN +--Rai-Jin local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,1,id) @@ -32,7 +33,7 @@ function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsAttribute,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)*100 end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) @@ -49,4 +50,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3784434.lua b/official/c3784434.lua index 22bb77bb21..2e6b91db5c 100644 --- a/official/c3784434.lua +++ b/official/c3784434.lua @@ -29,4 +29,4 @@ function s.atkcon(e) if (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==c and at then return c:GetColumnGroup():IsContains(at) else return false end -end +end \ No newline at end of file diff --git a/official/c37869028.lua b/official/c37869028.lua index c560e72e84..5f0e17b039 100644 --- a/official/c37869028.lua +++ b/official/c37869028.lua @@ -1,4 +1,5 @@ --トリプル・ヴァイパー +--Hydra Viper local s,id=GetID() function s.initial_effect(c) --multiattack @@ -29,4 +30,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.AttackCostPaid(2) end end -end +end \ No newline at end of file diff --git a/official/c37880706.lua b/official/c37880706.lua index a2ef08ea1c..dd5d080fc6 100644 --- a/official/c37880706.lua +++ b/official/c37880706.lua @@ -1,5 +1,5 @@ --ドリトル・キメラ --- +--Duelittle Chimera --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -56,5 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c37890974.lua b/official/c37890974.lua index d5adc13d1e..afcda4a880 100644 --- a/official/c37890974.lua +++ b/official/c37890974.lua @@ -32,17 +32,17 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.spfilter1(c,e,tp) local lv=c:GetLevel() return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT))) - and c:IsPreviousSetCard(0x114) and c:IsMonster() + and c:IsPreviousSetCard(SET_FUR_HIRE) and c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) - and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsCanBeEffectTarget(e) + and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and c:IsCanBeEffectTarget(e) and lv>0 and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,lv) end function s.spfilter2(c,e,tp,lv) - return c:GetLevel()0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c3790062.lua b/official/c3790062.lua index aaf501d840..87e34dc71f 100644 --- a/official/c3790062.lua +++ b/official/c3790062.lua @@ -1,4 +1,5 @@ --No.65 裁断魔人ジャッジ・バスター +--Number 65: Djinn Buster local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -21,11 +22,7 @@ end s.xyz_number=65 function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) then Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37910722.lua b/official/c37910722.lua index 5d5e919a5a..d7e209326a 100644 --- a/official/c37910722.lua +++ b/official/c37910722.lua @@ -1,4 +1,5 @@ --天穹覇龍ドラゴアセンション +--Ascension Sky Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,7 +37,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -47,14 +48,14 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,e,tp,sync) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and (c:GetReason()&0x80008)==0x80008 and c:GetReasonCard()==sync + and (c:GetReason()&(REASON_SYNCHRO|REASON_MATERIAL))==(REASON_SYNCHRO|REASON_MATERIAL) and c:GetReasonCard()==sync and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local mg=c:GetMaterial() local ct=#mg - if chk==0 then return c:IsSummonType(SUMMON_TYPE_SYNCHRO) + if chk==0 then return c:IsSynchroSummoned() and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct and mg:FilterCount(s.spfilter,nil,e,tp,c)==ct end @@ -74,13 +75,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c37926346.lua b/official/c37926346.lua index 9e459e6363..d9a720f29a 100644 --- a/official/c37926346.lua +++ b/official/c37926346.lua @@ -1,4 +1,5 @@ --インヴェルズ・ローチ +--Steelswarm Roach local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -23,10 +24,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain()==0 and eg:IsExists(s.filter,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=eg:Filter(s.filter,nil) @@ -37,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=eg:Filter(s.filter,nil) Duel.NegateSummon(g) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3792766.lua b/official/c3792766.lua index 8b441b4b5b..e987495147 100644 --- a/official/c3792766.lua +++ b/official/c3792766.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfb),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TRICKSTAR),2) c:EnableReviveLimit() --tohand local e1=Effect.CreateEffect(c) @@ -15,15 +15,15 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.lkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xfb) + return c:IsFaceup() and c:IsSetCard(SET_TRICKSTAR) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetLinkedGroup():IsExists(s.lkfilter,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xfb) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_TRICKSTAR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -45,9 +45,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct*1000) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c37930737.lua b/official/c37930737.lua index 99afe4276a..2aa71f8eb3 100644 --- a/official/c37930737.lua +++ b/official/c37930737.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x187} +s.listed_series={SET_G_GOLEM} function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsFaceup() and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -34,7 +34,7 @@ function s.spcheck(sg,e,tp,mg) return sg:GetClassCount(Card.GetCode)==1 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,0) end @@ -50,25 +50,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local fid=c:GetFieldID() for tc in g:Iter() do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) --Negate its effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Change its ATK/DEF to 0 local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) local e4=e3:Clone() e4:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -105,7 +105,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tg,REASON_EFFECT) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsSetCard(0x187) + return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsSetCard(SET_G_GOLEM) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c37931734.lua b/official/c37931734.lua index 639b67b159..99bfe24807 100644 --- a/official/c37931734.lua +++ b/official/c37931734.lua @@ -13,19 +13,19 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.filter(c,tp) - return c:IsSetCard(0x134) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) + return c:IsSetCard(SET_GENERAIDER) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tp) and Duel.IsPlayerCanDraw(1-tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() if not Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) then return end Duel.BreakEffect() Duel.Draw(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c37953640.lua b/official/c37953640.lua index 3f82898eb5..054cd160af 100644 --- a/official/c37953640.lua +++ b/official/c37953640.lua @@ -1,4 +1,5 @@ --竜宮の白タウナギ +--Royal Swamp Eel local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_SYNCHRO_MAT_RESTRICTION) e1:SetValue(aux.TargetBoolFunction(Card.IsRace,RACE_FISH)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c37955049.lua b/official/c37955049.lua index 3435f90589..41d892b998 100644 --- a/official/c37955049.lua +++ b/official/c37955049.lua @@ -1,4 +1,5 @@ --軍神ガープ +--Gaap the Divine Soldier local s,id=GetID() function s.initial_effect(c) --Pos Change @@ -43,6 +44,6 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(e:GetLabel()*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c37957847.lua b/official/c37957847.lua index 28f1ec1df5..225908ec98 100644 --- a/official/c37957847.lua +++ b/official/c37957847.lua @@ -31,7 +31,7 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetHandler():GetBattleTarget() if bc and bc:IsRace(RACE_INSECT) then - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end end function s.atkcon(e) @@ -45,7 +45,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37961969.lua b/official/c37961969.lua index 1d508d538f..3d35e3cc5a 100644 --- a/official/c37961969.lua +++ b/official/c37961969.lua @@ -1,9 +1,9 @@ --- ティアラメンツ・ハゥフニス --- Tearalaments Havnis --- Scripted by Hatter +--ティアラメンツ・ハゥフニス +--Tearlaments Havnis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Fusion Summon + --Fusion Summon local fusparams = {matfilter=Card.IsAbleToDeck,extrafil=s.extramat,extraop=s.extraop,gc=Fusion.ForcedHandler,extratg=s.extratarget} local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE + return rp==1-tp and re:IsMonsterEffect() and re:GetActivateLocation()==LOCATION_MZONE end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -51,10 +51,10 @@ function s.extramat(e,tp,mg) end function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) end function s.extraop(e,tc,tp,sg) - local gg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_GRAVE) + local gg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_GRAVE) if #gg>0 then Duel.HintSelection(gg,true) end local rg=sg:Filter(Card.IsFacedown,nil) if #rg>0 then Duel.ConfirmCards(1-tp,rg) end @@ -68,4 +68,4 @@ function s.extraop(e,tc,tp,sg) Duel.SortDeckbottom(tp,1-tp,#dg-ct) end sg:Clear() -end +end \ No newline at end of file diff --git a/official/c37970940.lua b/official/c37970940.lua index 81ef2eadfa..8e253cf930 100644 --- a/official/c37970940.lua +++ b/official/c37970940.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.ctcon) tc:RegisterEffect(e1) end diff --git a/official/c37972500.lua b/official/c37972500.lua index 2f1ef4d01f..bd12d02f9e 100644 --- a/official/c37972500.lua +++ b/official/c37972500.lua @@ -1,5 +1,5 @@ --グランドレミコード・ミューゼシア ---Grandoremichord Musesea +--GranSolfachord Musecia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.xthfilter1(c,tp) return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and Duel.IsExistingMatchingCard(s.xthfilter2,tp,LOCATION_EXTRA,0,1,c,c) @@ -52,12 +52,12 @@ function s.xthop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x164) and c:IsSummonPlayer(tp) - and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsCanBeEffectTarget(e) + return c:IsFaceup() and c:IsSetCard(SET_SOLFACHORD) and c:IsSummonPlayer(tp) + and c:IsPendulumSummoned() and c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,c:GetScale()) end function s.thfilter2(c,lv) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x164) and c:IsLevel(lv) and c:IsAbleToHand() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_SOLFACHORD) and c:IsLevel(lv) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.thfilter1,1,nil,e,tp) end @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c37984162.lua b/official/c37984162.lua index 547a0143eb..98ebf3a67c 100644 --- a/official/c37984162.lua +++ b/official/c37984162.lua @@ -1,4 +1,5 @@ --ゴルゴニック・ゴーレム +--Gorgonic Golem local s,id=GetID() function s.initial_effect(c) --atk @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end end @@ -54,7 +55,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c37984331.lua b/official/c37984331.lua index 1d3f75b61b..63500a20e4 100644 --- a/official/c37984331.lua +++ b/official/c37984331.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.loseop) c:RegisterEffect(e1) end -s.listed_series={0x40} +s.listed_series={SET_FORBIDDEN_ONE} function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsSetCard(0x40) + return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsSetCard(SET_FORBIDDEN_ONE) end function s.loseop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -22,4 +22,4 @@ function s.loseop(e,tp,eg,ep,ev,re,r,rp) if g:FilterCount(s.filter,nil)==#g and #g==4 and g:GetClassCount(Card.GetCode)==4 then Duel.Win(1-c:GetControler(),WIN_REASON_TRUE_EXODIA) end -end +end \ No newline at end of file diff --git a/official/c37991342.lua b/official/c37991342.lua index 0a57feeef7..b5998770d2 100644 --- a/official/c37991342.lua +++ b/official/c37991342.lua @@ -1,4 +1,5 @@ --クリフォート・ゲノム +--Qliphort Helix local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -58,9 +59,9 @@ function s.initial_effect(c) e8:SetOperation(s.desop) c:RegisterEffect(e8) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -78,7 +79,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.lvcon) e1:SetValue(4) - e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -87,7 +88,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.lvcon) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) c:RegisterEffect(e2) end function s.lvop2(e,tp,eg,ep,ev,re,r,rp) @@ -98,7 +99,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -106,14 +107,14 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e2) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -127,4 +128,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c37993923.lua b/official/c37993923.lua index 09d324da68..37c1164b52 100644 --- a/official/c37993923.lua +++ b/official/c37993923.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) end s.material={63977008} s.listed_names={63977008} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.matfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,63977008) or c:IsHasEffect(20932152) end @@ -58,4 +58,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c38007744.lua b/official/c38007744.lua index 0cdb99263d..c7282f6678 100644 --- a/official/c38007744.lua +++ b/official/c38007744.lua @@ -1,4 +1,5 @@ --先史遺産モアイキャリア +--Chronomaly Moai Carrier local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,4 +16,4 @@ function s.spcon(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c38026562.lua b/official/c38026562.lua index a570b3c287..f4e915602b 100644 --- a/official/c38026562.lua +++ b/official/c38026562.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -44,7 +44,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.tgcon) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.tgtg) e4:SetOperation(s.tgop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c38033121.lua b/official/c38033121.lua index cbffbc0569..fa3ae24d10 100644 --- a/official/c38033121.lua +++ b/official/c38033121.lua @@ -1,4 +1,5 @@ --ブラック・マジシャン・ガール +--Dark Magician Girl local s,id=GetID() function s.initial_effect(c) --atkup @@ -13,4 +14,4 @@ end s.listed_names={CARD_DARK_MAGICIAN} function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,30208479,CARD_DARK_MAGICIAN)*300 -end +end \ No newline at end of file diff --git a/official/c38033122.lua b/official/c38033122.lua deleted file mode 100644 index 527ebb3b00..0000000000 --- a/official/c38033122.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ブラック·マジシャン·ガール -local s,id=GetID() -function s.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.val) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,30208479,CARD_DARK_MAGICIAN)*300 -end diff --git a/official/c38033123.lua b/official/c38033123.lua deleted file mode 100644 index 527ebb3b00..0000000000 --- a/official/c38033123.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ブラック·マジシャン·ガール -local s,id=GetID() -function s.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.val) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,30208479,CARD_DARK_MAGICIAN)*300 -end diff --git a/official/c38033124.lua b/official/c38033124.lua deleted file mode 100644 index 527ebb3b00..0000000000 --- a/official/c38033124.lua +++ /dev/null @@ -1,16 +0,0 @@ ---ブラック·マジシャン·ガール -local s,id=GetID() -function s.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.val) - c:RegisterEffect(e1) -end -s.listed_names={CARD_DARK_MAGICIAN} -function s.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,30208479,CARD_DARK_MAGICIAN)*300 -end diff --git a/official/c38041940.lua b/official/c38041940.lua index c85b65c019..a0b9f6b5f6 100644 --- a/official/c38041940.lua +++ b/official/c38041940.lua @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(3304) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) token:RegisterEffect(e1,true) end diff --git a/official/c38044854.lua b/official/c38044854.lua index b3a748a921..8a6b4fbbaf 100644 --- a/official/c38044854.lua +++ b/official/c38044854.lua @@ -53,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg==0 then return end Duel.Overlay(sc,tg) end -end +end \ No newline at end of file diff --git a/official/c38049541.lua b/official/c38049541.lua index 128a225ce9..000ef7afe3 100644 --- a/official/c38049541.lua +++ b/official/c38049541.lua @@ -1,5 +1,5 @@ --A・ジェネクス・ケミストリ ---Genex Ally Chemister +--Genex Ally Chemistrer local s,id=GetID() function s.initial_effect(c) --Change the Attribute of 1 "Genex" monster you control @@ -9,17 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.attrcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.attrtg) e1:SetOperation(s.attrop) c:RegisterEffect(e1) end s.listed_series={SET_GENEX} -function s.attrcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.attrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_GENEX) and chkc:IsAttributeExcept(e:GetLabel()) end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_GENEX),tp,LOCATION_MZONE,0,1,nil) end diff --git a/official/c38049934.lua b/official/c38049934.lua index fb6bcb69b6..cc79e817c4 100644 --- a/official/c38049934.lua +++ b/official/c38049934.lua @@ -1,4 +1,5 @@ --炎塵爆発 +--Dustflame Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} s.check=false function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) s.check=true - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) e:SetLabel(#g) end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetLabel(),e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38053381.lua b/official/c38053381.lua index 7a518b12f7..0236de9a17 100644 --- a/official/c38053381.lua +++ b/official/c38053381.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={38053382} -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.cfilter(c,tp) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) end @@ -44,7 +44,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,1-tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x134) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GENERAIDER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -60,13 +60,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tkfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x134) and c:GetSummonPlayer()==tp + return c:IsFaceup() and c:IsSetCard(SET_GENERAIDER) and c:GetSummonPlayer()==tp end function s.tkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and eg:IsExists(s.tkfilter,1,nil,tp) + return Duel.IsTurnPlayer(1-tp) and eg:IsExists(s.tkfilter,1,nil,tp) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x134,TYPES_TOKEN,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) + if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_GENERAIDER,TYPES_TOKEN,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end @@ -76,14 +76,14 @@ end function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x134,TYPES_TOKEN,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end + if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_GENERAIDER,TYPES_TOKEN,1500,1500,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local fid=c:GetFieldID() local g=Group.CreateGroup() for i=1,ft do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) - token:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) g:AddCard(token) end Duel.SpecialSummonComplete() @@ -115,4 +115,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tc=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38057522.lua b/official/c38057522.lua index 743b95377c..04ae4716d8 100644 --- a/official/c38057522.lua +++ b/official/c38057522.lua @@ -1,7 +1,6 @@ --大霊術-「一輪」 --Grand Spiritual Art - Ichirin --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,7 +32,7 @@ function s.negf(c,tp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.negf,tp,LOCATION_MZONE,0,1,nil) - and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + and rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() @@ -62,7 +61,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g1>0 and #g2>0 then Duel.SendtoHand(g2,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g2) - Duel.SendtoDeck(g1,tp,2,REASON_EFFECT) + Duel.SendtoDeck(g1,tp,SEQ_DECKSHUFFLE,REASON_EFFECT) end end end \ No newline at end of file diff --git a/official/c3810071.lua b/official/c3810071.lua index 1c1a12c43e..898660575b 100644 --- a/official/c3810071.lua +++ b/official/c3810071.lua @@ -1,4 +1,5 @@ --モンク・ファイター +--Monk Fighter local s,id=GetID() function s.initial_effect(c) --dam @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c38105306.lua b/official/c38105306.lua index 94dc7a7773..c1cf5f497a 100644 --- a/official/c38105306.lua +++ b/official/c38105306.lua @@ -65,4 +65,4 @@ function s.discop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) Duel.DiscardHand(1-tp,Card.IsDiscardable,ct,ct,REASON_EFFECT,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38107923.lua b/official/c38107923.lua index 6079ce5398..728cfbf447 100644 --- a/official/c38107923.lua +++ b/official/c38107923.lua @@ -1,4 +1,5 @@ --ダーク・ネフティス +--Dark Nephthys local s,id=GetID() function s.initial_effect(c) --to grave @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -40,9 +41,9 @@ function s.costfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -53,7 +54,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then Duel.SendtoGrave(c,REASON_EFFECT) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -76,7 +77,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -84,4 +85,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38109772.lua b/official/c38109772.lua index 34b7b0ee64..40c2f7655f 100644 --- a/official/c38109772.lua +++ b/official/c38109772.lua @@ -1,4 +1,5 @@ --竜の騎士 +--Dragonic Knight local s,id=GetID() function s.initial_effect(c) --spsummon @@ -21,7 +22,7 @@ function s.filter(c,tp,dg) return c:IsControler(tp) and dg:IsContains(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_MONSTER) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + if rp==tp or not re:IsMonsterEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not tg or #tg==0 then return false end local ex,dg,dc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) @@ -49,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c38120068.lua b/official/c38120068.lua index 4985ae1373..7f9ce574f4 100644 --- a/official/c38120068.lua +++ b/official/c38120068.lua @@ -1,4 +1,5 @@ --トレード・イン +--Trade-In local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,7 +18,7 @@ function s.filter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -28,4 +29,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38124994.lua b/official/c38124994.lua index 780d454198..58bd05bc67 100644 --- a/official/c38124994.lua +++ b/official/c38124994.lua @@ -1,4 +1,5 @@ --ファーニマル・ラビット +--Fluffal Rabbit local s,id=GetID() function s.initial_effect(c) --tohand @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xa9} +s.listed_series={SET_FLUFFAL} s.listed_names={30068120} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_FUSION end function s.filter(c) - return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsMonster() and not c:IsCode(id))) + return (c:IsCode(30068120) or (c:IsSetCard(SET_FLUFFAL) and c:IsMonster() and not c:IsCode(id))) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3814632.lua b/official/c3814632.lua index ad31002d88..bc5986df29 100644 --- a/official/c3814632.lua +++ b/official/c3814632.lua @@ -43,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38148100.lua b/official/c38148100.lua index 3f57c87eb6..06bc977a1a 100644 --- a/official/c38148100.lua +++ b/official/c38148100.lua @@ -1,4 +1,5 @@ --アロマセラフィ-ローズマリー +--Aromaseraphy Rosemary local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -54,22 +55,22 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c38167722.lua b/official/c38167722.lua index 7587cc18d0..a8e1b2ccb1 100644 --- a/official/c38167722.lua +++ b/official/c38167722.lua @@ -1,4 +1,5 @@ --闇霊術-「欲」 +--Dark Spirit Art - Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38173725.lua b/official/c38173725.lua index 806d8deff3..dd6ea2fa32 100644 --- a/official/c38173725.lua +++ b/official/c38173725.lua @@ -1,5 +1,5 @@ --アークジェット・ライトクラフター ---Arcjet Lightcrafter +--Arcjet Lightcraft --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -60,18 +60,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetValue(9) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() diff --git a/official/c38179121.lua b/official/c38179121.lua index aaf37710d1..551e8e075b 100644 --- a/official/c38179121.lua +++ b/official/c38179121.lua @@ -1,4 +1,5 @@ --究極進化薬 +--Double Evolution Pill local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,28 +25,28 @@ function s.filter(c,e,tp) return c:IsRace(RACE_DINOSAUR) and c:IsLevelAbove(7) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,nil,e,tp) local tc=nil if #g==1 and g:GetFirst():IsLocation(LOCATION_HAND) then tc=g:GetFirst() end - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,tc) - and Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,tc) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,tc) + and Duel.IsExistingMatchingCard(s.costfilter2,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,tc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,s.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc) + local g1=Duel.SelectMatchingCard(tp,s.costfilter1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,tc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.costfilter2,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc) + local g2=Duel.SelectMatchingCard(tp,s.costfilter2,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,tc) g1:Merge(g2) Duel.Remove(g1,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c38180759.lua b/official/c38180759.lua index bbc282391c..b2cdf7e788 100644 --- a/official/c38180759.lua +++ b/official/c38180759.lua @@ -1,4 +1,5 @@ --虚構王アンフォームド・ボイド +--Unformed Void local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,20 +12,16 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) @@ -42,11 +39,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c3819470.lua b/official/c3819470.lua index fe589e41f6..c4a947c8a5 100644 --- a/official/c3819470.lua +++ b/official/c3819470.lua @@ -1,4 +1,5 @@ --盗賊の七つ道具 +--Seven Tools of the Bandit local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,17 +8,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -30,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38199696.lua b/official/c38199696.lua index c472dd560a..3815ade4be 100644 --- a/official/c38199696.lua +++ b/official/c38199696.lua @@ -1,4 +1,5 @@ --レッド・ポーション +--Red Medicine local s,id=GetID() function s.initial_effect(c) --recover @@ -20,4 +21,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38203732.lua b/official/c38203732.lua index 3931e1d6fa..fe350a8a02 100644 --- a/official/c38203732.lua +++ b/official/c38203732.lua @@ -33,5 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,tc1,tc1:GetLeftScale(),tc1:GetCode()):GetFirst() Duel.SendtoHand(Group.FromCards(tc1,tc2),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,Group.FromCards(tc1,tc2)) -end - +end \ No newline at end of file diff --git a/official/c38210374.lua b/official/c38210374.lua index 2c5e6b89fb..be57547239 100644 --- a/official/c38210374.lua +++ b/official/c38210374.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -16,7 +16,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.rmcon) diff --git a/official/c38229962.lua b/official/c38229962.lua index 37ce9a2c8e..422b100fdd 100644 --- a/official/c38229962.lua +++ b/official/c38229962.lua @@ -94,7 +94,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c38247752.lua b/official/c38247752.lua index e9d4fe9b4a..bc6965d623 100644 --- a/official/c38247752.lua +++ b/official/c38247752.lua @@ -1,4 +1,5 @@ --ダーク・アイズ・イリュージョニスト +--Dark-Eyes Illusionist local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,11 +25,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) end end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c38250531.lua b/official/c38250531.lua index fa7231f68e..5810d83c78 100644 --- a/official/c38250531.lua +++ b/official/c38250531.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,17 +29,13 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon2) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -60,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -71,7 +67,7 @@ function s.spreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c3825890.lua b/official/c3825890.lua index 8fe813026e..b7562c742b 100644 --- a/official/c3825890.lua +++ b/official/c3825890.lua @@ -22,12 +22,12 @@ function s.initial_effect(c) e4:SetTarget(s.desreptg) c:RegisterEffect(e4) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.otfilter(c,tp) - return c:IsSetCard(0x2e) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_GRAVEKEEPERS) and (c:IsControler(tp) or c:IsFaceup()) end function s.filter(c) - return c:IsSetCard(0x2e) and c:IsMonster() + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsMonster() end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*200 @@ -39,7 +39,7 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.SelectEffectYesNo(tp,c,96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_REPLACE) return true else return false end -end +end \ No newline at end of file diff --git a/official/c38265153.lua b/official/c38265153.lua index 3183a62e6f..616b07539e 100644 --- a/official/c38265153.lua +++ b/official/c38265153.lua @@ -60,4 +60,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c38267552.lua b/official/c38267552.lua index 208de6a59d..c7b577beeb 100644 --- a/official/c38267552.lua +++ b/official/c38267552.lua @@ -1,7 +1,6 @@ --夢魔鏡の黒騎士-ルペウス --Morpheus, the Dream Mirror Black Knight --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Destroy 1 card on the field @@ -20,22 +19,21 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={CARD_DREAM_MIRROR_JOY,1872843} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.descon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end @@ -54,13 +52,8 @@ function s.sscond(c) return c:IsFaceup() and c:IsCode(CARD_DREAM_MIRROR_JOY) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(s.sscond,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil,tp) - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.spfilter(c,e,tp) return c:IsCode(1872843) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c38273745.lua b/official/c38273745.lua index 57cba3aaa8..5c74c6b204 100644 --- a/official/c38273745.lua +++ b/official/c38273745.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c38275183.lua b/official/c38275183.lua index f50886748b..b94419c876 100644 --- a/official/c38275183.lua +++ b/official/c38275183.lua @@ -28,10 +28,10 @@ function s.condition1(e,tp,eg,ep,ev,re,r,rp) if not re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and #tg==1 and tg:GetFirst():IsLocation(LOCATION_MZONE) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsSpell() and c:IsAbleToGraveAsCost() @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38280762.lua b/official/c38280762.lua index f56627ad62..1304d79008 100644 --- a/official/c38280762.lua +++ b/official/c38280762.lua @@ -1,6 +1,5 @@ --紫炎の老中 エニシ --Enishi, Shien's Chancellor - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -35,19 +34,18 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x3d} - +s.listed_series={SET_SIX_SAMURAI} function s.spfilter(c,tp) - return c:IsSetCard(0x3d) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -69,7 +67,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e:GetHandler():RegisterEffect(e1) end diff --git a/official/c3828844.lua b/official/c3828844.lua index 6068cadd82..6e425b5913 100644 --- a/official/c3828844.lua +++ b/official/c3828844.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,18 +33,14 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} --Specifically lists itself s.listed_names={id} --Check for plant monster/"Rikka" card function s.thfilter(c) - return (c:IsRace(RACE_PLANT) or c:IsSetCard(0x141)) and c:IsAbleToHand() + return (c:IsRace(RACE_PLANT) or c:IsSetCard(SET_RIKKA)) and c:IsAbleToHand() end --Detach 1 material as cost -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -73,7 +69,7 @@ end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end @@ -81,11 +77,11 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,loc,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.Overlay(g:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c38296564.lua b/official/c38296564.lua index f18c2b8ed9..dfb967901d 100644 --- a/official/c38296564.lua +++ b/official/c38296564.lua @@ -1,7 +1,8 @@ --安全地帯 +--Safe Zone local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,nil,s.filter,nil,nil,nil,0x1e0,nil,nil,nil,s.op) + aux.AddPersistentProcedure(c,nil,s.filter,nil,nil,nil,TIMINGS_CHECK_MONSTER_E,nil,nil,nil,s.op) --eff local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -53,7 +54,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,tp) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,tp) end end function s.acon(e) @@ -83,4 +84,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38299233.lua b/official/c38299233.lua index 8d0829e2ae..288de81e37 100644 --- a/official/c38299233.lua +++ b/official/c38299233.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.rdcon) e2:SetTarget(s.rdtg) e2:SetOperation(s.rdop) @@ -39,4 +39,4 @@ function s.rdop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38325384.lua b/official/c38325384.lua index 95f3064019..1503ad5830 100644 --- a/official/c38325384.lua +++ b/official/c38325384.lua @@ -74,5 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:AddCounter(COUNTER_SPELL,1) end end -end - +end \ No newline at end of file diff --git a/official/c38331564.lua b/official/c38331564.lua index d2f6558d24..88ea7d6f28 100644 --- a/official/c38331564.lua +++ b/official/c38331564.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e3:SetOperation(s.effop) c:RegisterEffect(e3) end -s.listed_series={0x86} +s.listed_series={SET_STAR_SERAPH} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x86) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_STAR_SERAPH) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -56,19 +56,19 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.descon) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end @@ -84,4 +84,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38339996.lua b/official/c38339996.lua index b97fb25619..9a4db9a854 100644 --- a/official/c38339996.lua +++ b/official/c38339996.lua @@ -18,15 +18,15 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcond) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} function s.cfilter(c) return c:IsMonster() and c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsHasEffect(EFFECT_CANNOT_TRIGGER) end @@ -51,20 +51,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sg:GetFirst():RegisterEffect(e1,true) end end function s.spcond(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) + return rp==1-tp and re:IsMonsterEffect() and re:GetActivateLocation()==LOCATION_MZONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x18c) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESCUE_ACE) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 diff --git a/official/c38342335.lua b/official/c38342335.lua index e84ccb0e23..924460496c 100644 --- a/official/c38342335.lua +++ b/official/c38342335.lua @@ -27,16 +27,16 @@ function s.initial_effect(c) e2:SetValue(s.drval) c:RegisterEffect(e2) end -s.listed_series={0x112} +s.listed_series={SET_KNIGHTMARE} function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToDeck() end @@ -56,7 +56,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) + and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() if tc:IsLocation(LOCATION_DECK) and tc:IsControler(tp) then @@ -66,10 +66,10 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.drfilter(c) - return c:IsFaceup() and c:IsSetCard(0x112) and c:GetMutualLinkedGroupCount()>0 + return c:IsFaceup() and c:IsSetCard(SET_KNIGHTMARE) and c:GetMutualLinkedGroupCount()>0 end function s.drval(e) local g=Duel.GetMatchingGroup(s.drfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil) if #g<=0 then return 1 end return g:GetClassCount(Card.GetCode) -end +end \ No newline at end of file diff --git a/official/c38354937.lua b/official/c38354937.lua index a78ad0f0c4..3404bd949b 100644 --- a/official/c38354937.lua +++ b/official/c38354937.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GENEX),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_DARK),1,99) c:EnableReviveLimit() --control local e1=Effect.CreateEffect(c) @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.ctop) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) return c:IsFaceup() and c:HasLevel() @@ -32,4 +32,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end local tc=sg:GetFirst() Duel.GetControl(tc,tp) -end +end \ No newline at end of file diff --git a/official/c38363525.lua b/official/c38363525.lua index 8f177a95aa..9af5708fe3 100644 --- a/official/c38363525.lua +++ b/official/c38363525.lua @@ -1,7 +1,6 @@ --アンデット・ネクロナイズ --Zombie Necronize --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Take control 1 of opponent's monster @@ -66,7 +65,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c38369349.lua b/official/c38369349.lua index 5ae2a574f2..c8c7735300 100644 --- a/official/c38369349.lua +++ b/official/c38369349.lua @@ -100,7 +100,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atcost(e,c,tp) @@ -111,4 +111,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,500) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c38383368.lua b/official/c38383368.lua index de6d1cef57..1c4dfe3abe 100644 --- a/official/c38383368.lua +++ b/official/c38383368.lua @@ -1,5 +1,5 @@ --エキストラケアトップス ---Extracaretops +--Extraceratops --Scripted by AlphaKretin and Andre local s,id=GetID() function s.initial_effect(c) @@ -64,5 +64,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c38395123.lua b/official/c38395123.lua index 03071abca6..42912e0180 100644 --- a/official/c38395123.lua +++ b/official/c38395123.lua @@ -1,5 +1,5 @@ --おジャマッチング ---Ojamatching +--Ojamatch --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -18,44 +18,44 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0xf,0x111} +s.listed_series={SET_OJAMA,SET_ARMED_DRAGON} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.cfilter(c,tp) - return c:IsSetCard(0xf) and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToGraveAsCost() - and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,c,c:GetCode()) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,c) + return c:IsSetCard(SET_OJAMA) and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToGraveAsCost() + and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,c,c:GetCode()) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,c) end function s.filter1(c,cd) - return c:IsMonster() and c:IsSetCard(0xf) and not c:IsCode(cd) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_OJAMA) and not c:IsCode(cd) and c:IsAbleToHand() end function s.filter2(c) - return c:IsMonster() and c:IsSetCard(0x111) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_ARMED_DRAGON) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=1 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp) e:SetLabelObject(g:GetFirst()) Duel.SendtoGrave(g,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() - local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,sc,sc:GetCode()) - local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,sc) + local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK|LOCATION_GRAVE,0,sc,sc:GetCode()) + local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,sc) if #g1==0 or #g2==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=g1:Select(tp,1,1,nil) @@ -74,7 +74,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsFaceup() and c:IsMonster() and c:IsSetCard(0xf) and c:IsAbleToDeck() + return c:IsFaceup() and c:IsMonster() and c:IsSetCard(SET_OJAMA) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -89,13 +89,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c38406364.lua b/official/c38406364.lua index e8923c568e..830f22c4ac 100644 --- a/official/c38406364.lua +++ b/official/c38406364.lua @@ -1,5 +1,5 @@ --常夏のカミナリサマー ---Scripted by Eerie Code +--Some Summer Summoner local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -20,11 +20,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,nil,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,nil,1,1,REASON_COST|REASON_DISCARD,nil) end function s.filter(c,e,tp,zone) return c:IsRace(RACE_THUNDER) and not c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) @@ -45,5 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) end -end - +end \ No newline at end of file diff --git a/official/c38411870.lua b/official/c38411870.lua index 860dd7d3b0..16fd0bd444 100644 --- a/official/c38411870.lua +++ b/official/c38411870.lua @@ -1,4 +1,5 @@ --つり天井 +--Needle Ceiling local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -23,4 +24,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38412161.lua b/official/c38412161.lua index bb68e23984..c8cfbb7291 100644 --- a/official/c38412161.lua +++ b/official/c38412161.lua @@ -1,5 +1,5 @@ --霊塞術師 チョウサイ ---Chosai the Ghost Blocker +--Chow Sai the Ghost Stopper --scripted by Xylen5967 local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.actlimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsLocation(LOCATION_GRAVE) + return re:IsSpellTrapEffect() and re:GetHandler():IsLocation(LOCATION_GRAVE) end function s.remcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) @@ -44,4 +44,4 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3841833.lua b/official/c3841833.lua index 9457211217..7fe3b0bfab 100644 --- a/official/c3841833.lua +++ b/official/c3841833.lua @@ -1,4 +1,5 @@ --ファーニマル・ベア +--Fluffal Bear local s,id=GetID() function s.initial_effect(c) --sset @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -43,10 +44,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g:GetFirst()) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.thfilter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end @@ -62,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38430673.lua b/official/c38430673.lua index aabfca949d..fa1370a3e5 100644 --- a/official/c38430673.lua +++ b/official/c38430673.lua @@ -26,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38436986.lua b/official/c38436986.lua index 98ce45f9bd..b23bfd075e 100644 --- a/official/c38436986.lua +++ b/official/c38436986.lua @@ -1,22 +1,22 @@ --- 壱世壊に軋む爪音 --- Tearalaments Metanoise --- Scripted by Hatter +--壱世壊に軋む爪音 +--Tearlaments Metanoise +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Flip 1 monster face-down + --Flip 1 monster face-down local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_POSITION+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END|TIMING_BATTLE_PHASE) e1:SetCountLimit(1,id) e1:SetCondition(s.poscon) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) - -- Add 1 "Tearalaments" monster to the hand + --Add 1 "Tearalaments" monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -30,13 +30,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.poscon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_VISAS_STARFROST),tp,LOCATION_ONFIELD,0,1,nil) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x182),tp,LOCATION_MZONE,0,1,nil) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_TEARLAMENTS),tp,LOCATION_MZONE,0,1,nil) end function s.tgfilter(c) - return c:IsSetCard(0x182) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_TEARLAMENTS) and c:IsMonster() and c:IsAbleToGrave() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsCanTurnSet() end @@ -58,7 +58,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x182) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TEARLAMENTS) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c38450736.lua b/official/c38450736.lua index 57907cfc8c..25a6b02821 100644 --- a/official/c38450736.lua +++ b/official/c38450736.lua @@ -35,17 +35,17 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x56) + return ec:IsControler(tp) and ec:IsSetCard(SET_INZEKTOR) end function s.filter(c) - return c:IsSetCard(0x56) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_INZEKTOR) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.equipop(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) @@ -55,7 +55,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) @@ -79,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) ec:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c38459905.lua b/official/c38459905.lua index bcb72ed210..76604c9d4b 100644 --- a/official/c38459905.lua +++ b/official/c38459905.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c3846170.lua b/official/c3846170.lua index a8079d7754..5874fdc22a 100644 --- a/official/c3846170.lua +++ b/official/c3846170.lua @@ -1,4 +1,5 @@ --カラクリ兵 弐参六 +--Karakuri Soldier mdl 236 "Nisamu" local s,id=GetID() function s.initial_effect(c) --must attack @@ -26,7 +27,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsAttackPos() end @@ -40,7 +41,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -54,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c38479725.lua b/official/c38479725.lua index d7c7ecefde..59a8fddaa5 100644 --- a/official/c38479725.lua +++ b/official/c38479725.lua @@ -1,4 +1,5 @@ --トロイホース +--The Trojan Horse local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_EARTH) -end +end \ No newline at end of file diff --git a/official/c38480590.lua b/official/c38480590.lua index 865aa6db3b..c8d8a351d4 100644 --- a/official/c38480590.lua +++ b/official/c38480590.lua @@ -1,4 +1,5 @@ --女豹の傭兵 +--Lady Panther local s,id=GetID() function s.initial_effect(c) --to deck @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,tid) return c:IsMonster() and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToDeck() end @@ -30,6 +27,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38491199.lua b/official/c38491199.lua index b4d32a5b01..b9965aab7d 100644 --- a/official/c38491199.lua +++ b/official/c38491199.lua @@ -11,15 +11,11 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsChainNegatable(ev) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) end @@ -34,4 +30,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38492752.lua b/official/c38492752.lua index 7519c69cc9..8ba33b4484 100644 --- a/official/c38492752.lua +++ b/official/c38492752.lua @@ -1,4 +1,5 @@ --ラヴァル・キャノン +--Laval Cannon local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,9 +16,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.filter(c,e,tp) - return c:IsSetCard(0x39) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LAVAL) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c38495396.lua b/official/c38495396.lua index c6df5dae00..638f9b991b 100644 --- a/official/c38495396.lua +++ b/official/c38495396.lua @@ -13,33 +13,29 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x53,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsSetCard(SET_CONSTELLAR,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) end function s.xyzop(e,tp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) return true end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) return c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.thfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.thfilter(chkc) end if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 - and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -47,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38502358.lua b/official/c38502358.lua index 75039f36ac..9bf713722a 100644 --- a/official/c38502358.lua +++ b/official/c38502358.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10c),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MEKK_KNIGHT),2) --direct attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10c} +s.listed_series={SET_MEKK_KNIGHT} function s.dircon(e) return e:GetHandler():GetColumnGroupCount()==0 end @@ -48,7 +48,7 @@ function s.spcfilter(c,hc) return c:GetColumnGroup():IsContains(hc) and c:IsAbleToGraveAsCost() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -71,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c38511382.lua b/official/c38511382.lua index cad56978bb..5daca84c42 100644 --- a/official/c38511382.lua +++ b/official/c38511382.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.gydiscon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.gydistg) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) c:RegisterEffect(e2) @@ -67,4 +67,4 @@ end function s.gydistg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end +end \ No newline at end of file diff --git a/official/c38517737.lua b/official/c38517737.lua index 700e225084..05d1b75b11 100644 --- a/official/c38517737.lua +++ b/official/c38517737.lua @@ -1,6 +1,5 @@ --青眼の亜白龍 --Blue-Eyes Alternative White Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetValue(CARD_BLUEEYES_W_DRAGON) c:RegisterEffect(e2) --Destroy monster @@ -38,7 +37,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_BLUEEYES_W_DRAGON} - function s.spcfilter(c,tp) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and not c:IsPublic() end @@ -73,7 +71,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c38520918.lua b/official/c38520918.lua index b642a8154a..beb17a9817 100644 --- a/official/c38520918.lua +++ b/official/c38520918.lua @@ -1,7 +1,8 @@ --エンシェント・ドラゴン +--Ancient Dragon local s,id=GetID() function s.initial_effect(c) - -- atk/lv up + --atk/lv up local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -22,11 +23,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetValue(1) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c38522377.lua b/official/c38522377.lua index 6b34786fee..b526baffa7 100644 --- a/official/c38522377.lua +++ b/official/c38522377.lua @@ -33,9 +33,9 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) end function s.spcon(e,c) if c==nil then return true end @@ -67,7 +67,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -96,4 +96,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT,true) Duel.RDComplete() end -end +end \ No newline at end of file diff --git a/official/c38525760.lua b/official/c38525760.lua index d9bb2e99ad..c996000b51 100644 --- a/official/c38525760.lua +++ b/official/c38525760.lua @@ -1,4 +1,5 @@ --陽炎獣 サーベラス +--Hazy Flame Cerbereus local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -30,7 +31,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x7d} +s.listed_series={SET_HAZY} function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 @@ -50,7 +51,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function s.filter(c) - return c:IsSetCard(0x7d) and c:IsAbleToHand() + return c:IsSetCard(SET_HAZY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -63,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c38527680.lua b/official/c38527680.lua index 7306d502a0..de9905d11a 100644 --- a/official/c38527680.lua +++ b/official/c38527680.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c38528901.lua b/official/c38528901.lua index deef26eafa..652bec8f80 100644 --- a/official/c38528901.lua +++ b/official/c38528901.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c38529357.lua b/official/c38529357.lua index 76ea3ede73..e4472f3ac3 100644 --- a/official/c38529357.lua +++ b/official/c38529357.lua @@ -1,20 +1,20 @@ --- 命の代行者 ネプチューン --- The Agent of Life - Neptune --- Scripted by Hatter +--命の代行者 ネプチューン +--The Agent of Life - Neptune +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon from hand or GY + --Special Summon from hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add "The Sanctuary in the Sky" to hand + --Add "The Sanctuary in the Sky" to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -26,46 +26,42 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x44,0x171} +s.listed_series={SET_THE_AGENT,SET_HYPERION} s.listed_names={CARD_SANCTUARY_SKY} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.spfilter(c,e,tp,sanc) - return ((c:IsSetCard(0x44) and not c:IsCode(id)) or (sanc and c:IsSetCard(0x171))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return ((c:IsSetCard(SET_THE_AGENT) and not c:IsCode(id)) or (sanc and c:IsSetCard(SET_HYPERION))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local sanc=Duel.IsEnvironment(CARD_SANCTUARY_SKY) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp,sanc) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp,sanc) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end local sanc=Duel.IsEnvironment(CARD_SANCTUARY_SKY) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp,sanc):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp,sanc):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - -- Cannot be tributed + --Cannot be tributed local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3303) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) tc:RegisterEffect(e2) end end @@ -83,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c38532954.lua b/official/c38532954.lua index a2ec1f6223..21772ec9d2 100644 --- a/official/c38532954.lua +++ b/official/c38532954.lua @@ -1,10 +1,11 @@ +--F.A.ピットストップ --F.A. Pit Stop ---Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --draw + --Reduce the level of 1 "F.A." monster by 2, and if you do, draw cards equal to the number of "F.A. Pit Stop" in your GY +1. local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DRAW+CATEGORY_LVCHANGE) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE+CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,27 +13,29 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) - --spsummon + --Special Summon 1 "F.A." monster from your GY local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(3) + return c:IsFaceup() and c:IsSetCard(SET_FA) and c:IsLevelAbove(3) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetTargetPlayer(tp) local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,id) @@ -47,13 +50,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.Draw(p,d,REASON_EFFECT) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -61,12 +64,11 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c38538445.lua b/official/c38538445.lua index 75cc2572b8..a7b8c4c128 100644 --- a/official/c38538445.lua +++ b/official/c38538445.lua @@ -30,4 +30,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38552107.lua b/official/c38552107.lua index 0ce3661a8a..b5deb3c941 100644 --- a/official/c38552107.lua +++ b/official/c38552107.lua @@ -1,4 +1,5 @@ --光の角 +--Horn of Light local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -16,7 +17,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_TO_GRAVE) e4:SetCondition(s.tdcon) - e4:SetCost(s.tdcost) + e4:SetCost(Cost.PayLP(500)) e4:SetTarget(s.tdtg) e4:SetOperation(s.tdop) c:RegisterEffect(e4) @@ -24,16 +25,12 @@ end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToDeck() end Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38562933.lua b/official/c38562933.lua index 3cbd3faba4..f0ddeb2fd7 100644 --- a/official/c38562933.lua +++ b/official/c38562933.lua @@ -1,4 +1,5 @@ --BF-空風のジン +--Blackwing - Jin the Rain Shadow local s,id=GetID() function s.initial_effect(c) --destroy @@ -29,4 +30,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) and d:IsRelateToBattle() and d:IsDefenseBelow(c:GetAttack()) then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38568567.lua b/official/c38568567.lua index 20230025a6..8602faa810 100644 --- a/official/c38568567.lua +++ b/official/c38568567.lua @@ -1,4 +1,5 @@ --ワンダー・クローバー +--Wonder Clover local s,id=GetID() function s.initial_effect(c) --multi attack @@ -41,7 +42,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) e:SetLabel(0) end @@ -52,11 +53,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c38572779.lua b/official/c38572779.lua index 5fa709bac9..f9fba0886a 100644 --- a/official/c38572779.lua +++ b/official/c38572779.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.immcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.immcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.GetFlagEffect(tp,id)==0 end @@ -38,15 +38,15 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DINOSAUR)) e1:SetValue(s.efilter) - if Duel.GetCurrentPhase()==PHASE_MAIN1 then - e1:SetReset(RESET_PHASE+PHASE_MAIN1) + if Duel.IsPhase(PHASE_MAIN1) then + e1:SetReset(RESET_PHASE|PHASE_MAIN1) else - e1:SetReset(RESET_PHASE+PHASE_MAIN2) + e1:SetReset(RESET_PHASE|PHASE_MAIN2) end - if Duel.GetCurrentPhase()==PHASE_MAIN1 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_MAIN1,0,1) + if Duel.IsPhase(PHASE_MAIN1) then + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_MAIN1,0,1) else - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_MAIN2,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_MAIN2,0,1) end Duel.RegisterEffect(e1,tp) end @@ -110,7 +110,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -135,4 +135,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38576155.lua b/official/c38576155.lua index 0cb6ea09f4..9b05e2a229 100644 --- a/official/c38576155.lua +++ b/official/c38576155.lua @@ -20,14 +20,14 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x122} -s.listed_names={64961254} +s.listed_series={SET_VALKYRIE} +s.listed_names={64961254} --"Goddess Verdande's Guidance" function s.thcfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x122) + return c:IsFacedown() or not c:IsSetCard(SET_VALKYRIE) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 - and not Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE,0,1,nil) + and not Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) return c:IsCode(64961254) and c:IsAbleToHand() @@ -55,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -64,5 +64,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsRace(RACE_FAIRY) -end - +end \ No newline at end of file diff --git a/official/c38589847.lua b/official/c38589847.lua index 9655f42e7b..c18f8094fa 100644 --- a/official/c38589847.lua +++ b/official/c38589847.lua @@ -1,4 +1,5 @@ --アドバンス・フォース +--Advance Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -52,6 +53,6 @@ function s.otop(e,tp,eg,ep,ev,re,r,rp,c) local sg=e:GetLabelObject() if not sg then return end c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) + Duel.Release(sg,REASON_SUMMON|REASON_MATERIAL) sg:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c38590361.lua b/official/c38590361.lua index c3b9852426..2b09fdaac6 100644 --- a/official/c38590361.lua +++ b/official/c38590361.lua @@ -12,7 +12,7 @@ function s.stage2(e,tc,tp,sg,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(2600) tc:RegisterEffect(e1) --attack twice @@ -22,8 +22,7 @@ function s.stage2(e,tc,tp,sg,chk) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c38601126.lua b/official/c38601126.lua index 33a12be513..7fee79b654 100644 --- a/official/c38601126.lua +++ b/official/c38601126.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c38606913.lua b/official/c38606913.lua index 915c10984b..169bc38a05 100644 --- a/official/c38606913.lua +++ b/official/c38606913.lua @@ -1,5 +1,5 @@ --方界縁起 ---Cubic Omen +--Cubic Causality --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -24,15 +24,15 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(0,TIMING_BATTLE_START) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.damtg) e2:SetOperation(s.damact) c:RegisterEffect(e2) end s.counter_place_list={0x1038} -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCondition(s.condition) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) ac:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE) @@ -64,7 +64,7 @@ function s.condition(e) return e:GetHandler():GetCounter(0x1038)>0 end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.tgfilter(chkc) end @@ -81,7 +81,7 @@ function s.damact(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_LEAVE_FIELD_P) e1:SetOperation(s.shchk) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) @@ -91,9 +91,9 @@ function s.damact(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.shcon) e2:SetOperation(s.damop) e2:SetLabelObject(tc) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE|RESET_PHASE|PHASE_END,0,1) tc:CreateEffectRelation(e1) end end @@ -117,4 +117,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local bt=tc:GetBattleTarget() local atk=bt:GetBaseAttack() Duel.Damage(1-tp,atk,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38628859.lua b/official/c38628859.lua index 6ec7f239f2..47d7598a2b 100644 --- a/official/c38628859.lua +++ b/official/c38628859.lua @@ -1,9 +1,9 @@ --- ダイノルフィア・ディプロス --- Dinoruffia Diplos --- Scripted by Hatter +--ダイノルフィア・ディプロス +--Dinomorphia Diplos +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Send to GY + --Send to GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon + --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -32,9 +32,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.tgfilter(c) - return c:IsSetCard(0x175) and c:IsAbleToGrave() + return c:IsSetCard(SET_DINOMORPHIA) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,7 +62,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(tg,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x175) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOMORPHIA) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c38643567.lua b/official/c38643567.lua index 2a6d9deed8..8da65ef79e 100644 --- a/official/c38643567.lua +++ b/official/c38643567.lua @@ -1,4 +1,5 @@ --甲虫装機の宝珠 +--Inzektor Orb local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,18 +9,15 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x56} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_INZEKTOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -32,20 +30,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atk/def local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -53,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) --negate local e4=Effect.CreateEffect(c) @@ -63,34 +61,30 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EVENT_CHAINING) e4:SetRange(LOCATION_SZONE) e4:SetCondition(s.ngcon) - e4:SetCost(s.ngcost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.ngtg) e4:SetOperation(s.ngop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e4) else c:CancelToGrave(false) end end function s.eqlimit(e,c) - return c:IsSetCard(0x56) + return c:IsSetCard(SET_INZEKTOR) end function s.ngcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS) local tc=tg:GetFirst() - if #tg~=1 or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x56) then return false end + if #tg~=1 or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(SET_INZEKTOR) then return false end return Duel.IsChainDisablable(ev) and loc~=LOCATION_DECK end -function s.ngcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end function s.ngop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c38648860.lua b/official/c38648860.lua index 03e021aeb9..37e76bfea1 100644 --- a/official/c38648860.lua +++ b/official/c38648860.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfRevealCost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c38670435.lua b/official/c38670435.lua index 3df7e3c2c4..970dcf9a50 100644 --- a/official/c38670435.lua +++ b/official/c38670435.lua @@ -1,4 +1,5 @@ --暗黒恐獣 +--Black Tyranno local s,id=GetID() function s.initial_effect(c) --direct attack @@ -12,4 +13,4 @@ function s.dircon(e) local tp=e:GetHandler():GetControler() return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0 and not Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c38679204.lua b/official/c38679204.lua index e9637b9c13..e61c4a6625 100644 --- a/official/c38679204.lua +++ b/official/c38679204.lua @@ -1,4 +1,5 @@ --ヴァイロン・ステラ +--Vylon Stella local s,id=GetID() function s.initial_effect(c) --equip @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(s.eqcon) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -28,10 +29,6 @@ end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -52,7 +49,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -77,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dt:IsRelateToBattle() then Duel.Destroy(dt,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38680149.lua b/official/c38680149.lua index 096140e35f..e3272b65ad 100644 --- a/official/c38680149.lua +++ b/official/c38680149.lua @@ -1,4 +1,5 @@ --トラスト・マインド +--Mind Trust local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c3868277.lua b/official/c3868277.lua index 00697251b8..95b07211e2 100644 --- a/official/c3868277.lua +++ b/official/c3868277.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.filter(c) - return c:IsSetCard(0x27) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_TG) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -28,10 +28,10 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) diff --git a/official/c38694052.lua b/official/c38694052.lua index 5320b4ca49..b57ca69abb 100644 --- a/official/c38694052.lua +++ b/official/c38694052.lua @@ -1,5 +1,5 @@ --黒熔龍騎ヴォルニゲシュ ---Volnigesh the Black Lava Dragoon +--Voloferniges, the Darkest Dragon Doomrider --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER_E) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e2:SetCondition(s.condition2) c:RegisterEffect(e2) end @@ -32,7 +32,7 @@ function s.condition1(e,tp,eg,ep,ev,re,r,rp) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsRace,1,nil,RACE_DRAGON) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -44,10 +44,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) c:RemoveOverlayCard(tp,2,2,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFaceup() end @@ -71,7 +71,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(lv*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) sc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c38695361.lua b/official/c38695361.lua index efc654b079..80e15d320e 100644 --- a/official/c38695361.lua +++ b/official/c38695361.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.atkcon1) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg1) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -29,17 +29,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10cf,0xbd} +s.listed_series={SET_BLACK_LUSTER_SOLDIER,SET_GAIA_THE_FIERCE_KNIGHT} function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.atkfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x10cf) or c:IsSetCard(0xbd)) + return c:IsFaceup() and c:IsSetCard({SET_BLACK_LUSTER_SOLDIER,SET_GAIA_THE_FIERCE_KNIGHT}) end function s.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -49,13 +44,13 @@ function s.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TODECK|RESET_TEMP_REMOVE|RESET_REMOVE|RESET_TOGRAVE)+RESET_PHASE+PHASE_END,0,1) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TODECK|RESET_TEMP_REMOVE|RESET_REMOVE|RESET_TOGRAVE)|RESET_PHASE|PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) @@ -65,13 +60,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetTarget(s.atktg2) e2:SetValue(s.atkval) e2:SetLabelObject(tc) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end function s.atkcon2(e) local tc=e:GetLabelObject() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return Duel.IsPhase(PHASE_DAMAGE_CAL) and tc:GetFlagEffect(id)~=0 and tc:GetBattleTarget() end function s.atktg2(e,c) @@ -85,12 +80,12 @@ function s.cfilter(c,att) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c,ATTRIBUTE_LIGHT) - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c,ATTRIBUTE_DARK) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c,ATTRIBUTE_LIGHT) + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c,ATTRIBUTE_DARK) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c,ATTRIBUTE_LIGHT) + local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c,ATTRIBUTE_LIGHT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c,ATTRIBUTE_DARK) + local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c,ATTRIBUTE_DARK) g1:Merge(g2) Duel.Remove(g1,POS_FACEUP,REASON_COST) end @@ -104,4 +99,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c38699854.lua b/official/c38699854.lua index b86336e43e..eee2ee2e06 100644 --- a/official/c38699854.lua +++ b/official/c38699854.lua @@ -1,4 +1,5 @@ --太陽の書 +--Book of Taiyou local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFacedown() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ChangePosition(tc,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c38723936.lua b/official/c38723936.lua index fe3fe6a118..dfa8a271cc 100644 --- a/official/c38723936.lua +++ b/official/c38723936.lua @@ -1,5 +1,5 @@ --クイズ ---Effect is not fully implemented +--Question local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else Duel.Remove(last,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38730226.lua b/official/c38730226.lua index 4e01738d66..7811f363f2 100644 --- a/official/c38730226.lua +++ b/official/c38730226.lua @@ -1,4 +1,5 @@ --英知の代行者 マーキュリー +--The Agent of Wisdom - Mercury local s,id=GetID() function s.initial_effect(c) --draw @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.con(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -21,12 +22,12 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetTarget(s.dtg) e1:SetOperation(s.dop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY) e:GetHandler():RegisterEffect(e1) end function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -38,4 +39,4 @@ end function s.dop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38737148.lua b/official/c38737148.lua index b3476ac7e0..0fc133a63f 100644 --- a/official/c38737148.lua +++ b/official/c38737148.lua @@ -1,4 +1,5 @@ --ライトレイ ダイダロス +--Lightray Daedalus local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -50,4 +51,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38742075.lua b/official/c38742075.lua index 7ab0cba654..39101e2160 100644 --- a/official/c38742075.lua +++ b/official/c38742075.lua @@ -34,11 +34,11 @@ function s.distg(e,c) and c:GetCardTarget():IsExists(s.cfilter,1,nil,e:GetHandlerPlayer()) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end + if not re:IsSpellEffect() then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or not g:IsExists(s.cfilter,1,nil,tp) then return end if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(re:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c3875465.lua b/official/c3875465.lua index 8d30e9b69f..3f550b2512 100644 --- a/official/c3875465.lua +++ b/official/c3875465.lua @@ -35,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.mvop) c:RegisterEffect(e3) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} function s.thfilter(c) - return not c:IsType(TYPE_FIELD) and c:IsSetCard(0x14a) and c:IsAbleToHand() + return not c:IsType(TYPE_FIELD) and c:IsSetCard(SET_APPLIANCER) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -50,14 +50,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.confilter(c,tp) - return c:IsSetCard(0x14a) and c:IsType(TYPE_LINK) and c:IsFaceup() - and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsSummonPlayer(tp) + return c:IsSetCard(SET_APPLIANCER) and c:IsType(TYPE_LINK) and c:IsFaceup() + and c:IsLinkSummoned() and c:IsSummonPlayer(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.confilter,1,nil,tp) end function s.thfilter2(c) - return c:IsSetCard(0x14a) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_APPLIANCER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end @@ -73,7 +73,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -s.mvfilter=aux.FaceupFilter(Card.IsSetCard,0x14a) +s.mvfilter=aux.FaceupFilter(Card.IsSetCard,SET_APPLIANCER) function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.mvfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end @@ -86,4 +86,4 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2)) end -end +end \ No newline at end of file diff --git a/official/c38757297.lua b/official/c38757297.lua index 7b938adbdb..7f4775fef4 100644 --- a/official/c38757297.lua +++ b/official/c38757297.lua @@ -1,4 +1,5 @@ --フォトン・レオ +--Photon Leo local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(1-tp) Duel.BreakEffect() Duel.Draw(1-tp,#g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38761908.lua b/official/c38761908.lua index 5ac8f917e9..b49dbe82a7 100644 --- a/official/c38761908.lua +++ b/official/c38761908.lua @@ -41,24 +41,24 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if Duel.DiscardHand(tp,s.filter1,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 and tc:IsRelateToEffect(e) then + if Duel.DiscardHand(tp,s.filter1,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -71,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -79,12 +79,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) -end + return re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c38777931.lua b/official/c38777931.lua index ed4cf40a14..0a42dd16a0 100644 --- a/official/c38777931.lua +++ b/official/c38777931.lua @@ -1,4 +1,5 @@ --リリース・リバース・バースト +--Release, Reverse, Burst local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,8 +14,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x107f) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x107f) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_UTOPIA) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_UTOPIA) Duel.Release(g,REASON_COST) end function s.filter(c) @@ -28,4 +29,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38783169.lua b/official/c38783169.lua index 3ffae256ad..c63599360a 100644 --- a/official/c38783169.lua +++ b/official/c38783169.lua @@ -20,7 +20,7 @@ function s.tuneop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(TYPE_TUNER) c:RegisterEffect(e1) end @@ -33,7 +33,7 @@ function s.tuneop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetOwnerPlayer(tp) e2:SetCondition(s.spcon) e2:SetTargetRange(1,0) @@ -44,7 +44,7 @@ function s.tuneop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetOperation(s.checkop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.spcon(e) @@ -52,7 +52,6 @@ function s.spcon(e) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_EXTRA) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end -end - +end \ No newline at end of file diff --git a/official/c38784726.lua b/official/c38784726.lua index ffe6208d44..f1f54c2014 100644 --- a/official/c38784726.lua +++ b/official/c38784726.lua @@ -17,14 +17,14 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} s.listed_names={16313112} s.fit_monster={16313112} function s.ritualfil(c) - return c:IsSetCard(0x119) and c:IsRitualMonster() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsRitualMonster() end function s.mfilter(c) - return c:HasLevel() and c:IsSetCard(0x119) and c:IsAbleToDeck() + return c:HasLevel() and c:IsSetCard(SET_SALAMANGREAT) and c:IsAbleToDeck() end function s.ckfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLinkMonster() @@ -39,7 +39,7 @@ function s.extraop(mg,e,tp,eg,ep,ev,re,r,rp) local mat2=mg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(s.mfilter,nil) mg:Sub(mat2) Duel.ReleaseRitualMaterial(mg) - Duel.SendtoDeck(mat2,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) + Duel.SendtoDeck(mat2,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c38798785.lua b/official/c38798785.lua index f85236828b..934f5898bc 100644 --- a/official/c38798785.lua +++ b/official/c38798785.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_STANDBY_PHASE,TIMING_STANDBY_PHASE+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(TIMING_STANDBY_PHASE,TIMING_STANDBY_PHASE|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(TIMING_STANDBY_PHASE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.HasFlagEffect(tp,id) end end) e2:SetOperation(s.chlimop) c:RegisterEffect(e2) @@ -93,4 +93,4 @@ function s.limop2(e,tp,eg,ep,ev,re,r,rp) if ex and sg:IsExists(s.limfilter,1,nil,tp) then Duel.SetChainLimitTillChainEnd(function(re,rp,tp) return rp==tp end) end -end +end \ No newline at end of file diff --git a/official/c38814750.lua b/official/c38814750.lua index 065e9c1ee0..d1fae69530 100644 --- a/official/c38814750.lua +++ b/official/c38814750.lua @@ -1,6 +1,5 @@ --PSYフレームギア・γ --PSY-Framegear Gamma - local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -25,12 +24,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_PSYFRAME_DRIVER} - function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return ep~=tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,CARD_PSYFRAME_LAMBDA)) end function s.spfilter(c,e,tp) @@ -41,8 +39,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) @@ -52,15 +50,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g==0 then return end local tc=g:GetFirst() local c=e:GetHandler() local fid=c:GetFieldID() Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() g:AddCard(c) g:KeepAlive() diff --git a/official/c38815069.lua b/official/c38815069.lua index 0d40351938..8f5448a2ee 100644 --- a/official/c38815069.lua +++ b/official/c38815069.lua @@ -1,4 +1,5 @@ --ライトロード・シーフ ライニャン +--Rinyan, Lightsworn Rogue local s,id=GetID() function s.initial_effect(c) --flip @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter(c) - return c:IsSetCard(0x38) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -28,9 +29,9 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.Draw(tp,1,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c38834303.lua b/official/c38834303.lua index 17f6857b87..7feb2db3a1 100644 --- a/official/c38834303.lua +++ b/official/c38834303.lua @@ -6,15 +6,11 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.HasCounters,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end end @@ -27,4 +23,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if count>0 then Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+COUNTER_A,e,REASON_EFFECT,tp,tp,count) end -end +end \ No newline at end of file diff --git a/official/c38837163.lua b/official/c38837163.lua index 92dce4bbbd..8deafa9f2a 100644 --- a/official/c38837163.lua +++ b/official/c38837163.lua @@ -30,11 +30,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -54,7 +54,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -69,13 +69,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) else local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c38844957.lua b/official/c38844957.lua index c2ef7b42ae..4b3b7b6fbd 100644 --- a/official/c38844957.lua +++ b/official/c38844957.lua @@ -17,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRitualMonster),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil + return c:IsRitualSpell() and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(true,true,false)~=nil end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -32,11 +32,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then if e:GetLabel()==0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) local te=g:GetFirst():CheckActivateEffect(true,true,false) e:SetLabelObject(te) Duel.Remove(g,POS_FACEUP,REASON_COST) diff --git a/official/c38848158.lua b/official/c38848158.lua index c22f17d1f9..c47416dd3b 100644 --- a/official/c38848158.lua +++ b/official/c38848158.lua @@ -1,4 +1,5 @@ --イグナイト・ユナイト +--Igknights Unite local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.desfilter1(c,ft) - return c:IsFaceup() and c:IsSetCard(0xc8) and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IGKNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -41,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c38891741.lua b/official/c38891741.lua index c5fb939fe4..2a146e5990 100644 --- a/official/c38891741.lua +++ b/official/c38891741.lua @@ -1,4 +1,5 @@ --神の摂理 +--Ultimate Providence local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,16 +14,16 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cfilter(c,type) return c:IsType(type) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end - local type=(re:GetActiveType()&0x7) + local type=(re:GetActiveType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,type) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,type) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil,type) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38898779.lua b/official/c38898779.lua index 063ee514a1..b38cc2a1dd 100644 --- a/official/c38898779.lua +++ b/official/c38898779.lua @@ -77,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c38904695.lua b/official/c38904695.lua index 944f293e1d..c588917628 100644 --- a/official/c38904695.lua +++ b/official/c38904695.lua @@ -1,5 +1,5 @@ --インフェルニティ・ヘル・デーモン ---Infernity Hell Archfiend +--Infernity Doom Archfiend local s,id=GetID() function s.initial_effect(c) --Synchro Summon procedure @@ -46,12 +46,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.AdjustInstantly(tc) @@ -74,7 +74,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c3891471.lua b/official/c3891471.lua index b376ea394a..cf584f6204 100644 --- a/official/c3891471.lua +++ b/official/c3891471.lua @@ -1,4 +1,5 @@ --サイコ・チューン +--Psychic Tuning local s,id=GetID() function s.initial_effect(c) --Activate @@ -54,12 +55,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) Duel.SpecialSummonComplete() c:SetCardTarget(tc) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE,0,1,lv) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE,0,1,lv) end end end @@ -86,4 +87,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c38916526.lua b/official/c38916526.lua index 21a16a3393..a7e8b6382a 100644 --- a/official/c38916526.lua +++ b/official/c38916526.lua @@ -28,10 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} s.listed_names={id} function s.ctfilter(c) - return not c:IsCode(id) and c:IsFaceup() and c:IsSetCard(0x114) + return not c:IsCode(id) and c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -62,14 +62,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and ep~=tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x114) and c:IsDiscardable() + return c:IsSetCard(SET_FUR_HIRE) and c:IsDiscardable() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -79,4 +79,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38943357.lua b/official/c38943357.lua index ae23e13d88..a50bd6bb51 100644 --- a/official/c38943357.lua +++ b/official/c38943357.lua @@ -14,10 +14,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x12a} +s.listed_series={SET_ENDYMION} s.listed_names={75014062} function s.thfilter(c) - return c:IsSetCard(0x12a) and c:IsAbleToHand() + return c:IsSetCard(SET_ENDYMION) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -28,7 +28,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,g) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsCode,id,75014062),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsCode,id,75014062),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) local cg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCanAddCounter,COUNTER_SPELL,1),tp,LOCATION_ONFIELD,0,nil) if ct>0 and #cg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() @@ -39,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c38960450.lua b/official/c38960450.lua index c27674413b..9b2f9e9b2b 100644 --- a/official/c38960450.lua +++ b/official/c38960450.lua @@ -39,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Equip(tp,ec,tc) end end -end +end \ No newline at end of file diff --git a/official/c3897065.lua b/official/c3897065.lua index 3228a399da..c60eb0dee0 100644 --- a/official/c3897065.lua +++ b/official/c3897065.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID function s.eqfilter(c,tp) return c:IsFaceup() and not c:IsRace(RACE_MACHINE) and (c:IsControler(tp) or c:IsAbleToChangeControler()) end @@ -54,7 +54,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(id) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -73,7 +73,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) e1:SetValue(atk/2) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c38973775.lua b/official/c38973775.lua index a72e577f59..3971e36111 100644 --- a/official/c38973775.lua +++ b/official/c38973775.lua @@ -1,4 +1,5 @@ --フォトン・リザード +--Photon Lizard local s,id=GetID() function s.initial_effect(c) --search @@ -8,18 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x55} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_PHOTON} function s.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x55) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsSetCard(SET_PHOTON) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -32,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c38975369.lua b/official/c38975369.lua index abcc63967a..f0401d84dd 100644 --- a/official/c38975369.lua +++ b/official/c38975369.lua @@ -39,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c38981606.lua b/official/c38981606.lua index 682edefe56..9be5828f39 100644 --- a/official/c38981606.lua +++ b/official/c38981606.lua @@ -1,4 +1,5 @@ --砂漠の守護者 +--Desert Protector local s,id=GetID() function s.initial_effect(c) --defup @@ -38,5 +39,5 @@ function s.value(e,c) and not c:IsReason(REASON_REPLACE) and c:IsControler(e:GetHandlerPlayer()) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c38988538.lua b/official/c38988538.lua index 89c3f1165f..3f38d4d20b 100644 --- a/official/c38988538.lua +++ b/official/c38988538.lua @@ -1,4 +1,5 @@ --ダイナミスト・プレシオス +--Dinomist Plesios local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -24,9 +25,9 @@ function s.initial_effect(c) e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e4) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.tfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) + return c:IsFaceup() and c:IsSetCard(SET_DINOMIST) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) @@ -35,7 +36,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.SelectEffectYesNo(tp,e:GetHandler()) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) if Duel.NegateEffect(ev) then Duel.BreakEffect() Duel.Destroy(e:GetHandler(),REASON_EFFECT) @@ -43,8 +44,8 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd8) + return c:IsFaceup() and c:IsSetCard(SET_DINOMIST) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*-100 -end +end \ No newline at end of file diff --git a/official/c38992735.lua b/official/c38992735.lua index 9e37b003b9..26847b4f43 100644 --- a/official/c38992735.lua +++ b/official/c38992735.lua @@ -1,4 +1,5 @@ --波動キャノン +--Wave-Motion Cannon local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_SZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.tg) e2:SetOperation(s.op) c:RegisterEffect(e2) @@ -22,13 +23,13 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_PHASE_START+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE_START|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetOperation(s.turncount) c:RegisterEffect(e3) end function s.turncount(e,tp,eg,ep,ev,re,r,rp) - if tp~=Duel.GetTurnPlayer() then return end + if Duel.IsTurnPlayer(1-tp) then return end local c=e:GetHandler() local ct=c:GetTurnCounter() ct=ct+1 @@ -38,10 +39,6 @@ function s.reset(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end e:GetHandler():SetTurnCounter(0) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetTurnCounter()>0 end @@ -53,4 +50,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39000945.lua b/official/c39000945.lua index 29404b4b28..3be5351eea 100644 --- a/official/c39000945.lua +++ b/official/c39000945.lua @@ -3,7 +3,7 @@ --scripted by Hatter local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE+LOCATION_MZONE) + c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE|LOCATION_MZONE) c:SetSPSummonOnce(id) Pendulum.AddProcedure(c) --Special Summon itself and from the hand @@ -59,7 +59,7 @@ function s.initial_effect(c) c:RegisterEffect(e6) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x12a} +s.listed_series={SET_ENDYMION} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_SPELL,3,REASON_COST) end e:GetHandler():RemoveCounter(tp,COUNTER_SPELL,3,REASON_COST) @@ -74,7 +74,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_PZONE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_PZONE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -94,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -140,7 +140,7 @@ function s.srcon(e,tp,eg,ep,ev,re,r,rp) return ct>0 and c:IsReason(REASON_BATTLE) end function s.srfilter(c) - return c:IsAbleToHand() and c:IsSetCard(0x12a) + return c:IsAbleToHand() and c:IsSetCard(SET_ENDYMION) end function s.srtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -154,4 +154,4 @@ function s.srop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c3900605.lua b/official/c3900605.lua index 38f43598df..8c12a56f6c 100644 --- a/official/c3900605.lua +++ b/official/c3900605.lua @@ -1,4 +1,5 @@ --アブソーブポッド +--Absorbing Jar local s,id=GetID() function s.initial_effect(c) --flip @@ -33,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(aux.TRUE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SSET) @@ -48,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return (sumpos&POS_FACEDOWN)~=0 -end +end \ No newline at end of file diff --git a/official/c39015.lua b/official/c39015.lua index 5ad838525a..ef41cae5c2 100644 --- a/official/c39015.lua +++ b/official/c39015.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -26,24 +26,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_ASSAULT_MODE} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:ListsCode(CARD_ASSAULT_MODE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler(c) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -55,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -97,7 +93,7 @@ function s.rvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(oc:GetRace()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) @@ -105,4 +101,4 @@ function s.rvop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2,true) end end -end +end \ No newline at end of file diff --git a/official/c39019325.lua b/official/c39019325.lua index 644e279ba1..d61755ec53 100644 --- a/official/c39019325.lua +++ b/official/c39019325.lua @@ -1,4 +1,5 @@ --玉砕指令 +--Order to Smash local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.rfilter(c,e) and c:IsFaceup() and c:IsLevelBelow(2) and c:IsReleasable() and c:IsReleasableByEffect() and not c:IsImmuneToEffect(e) end function s.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.rfilter(chkc,e) end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c39024589.lua b/official/c39024589.lua index b595279d5f..744355ccf8 100644 --- a/official/c39024589.lua +++ b/official/c39024589.lua @@ -23,21 +23,21 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.cfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) local lv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x10ec) and (lv==1 or lv==8) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and (lv==1 or lv==8) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -53,33 +53,29 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,0x10ec) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,SET_ABYSS_ACTOR) end function s.spfilter(c,e,tp,mc) if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,mc,c)==0 then return false end local lv=c:GetLevel() - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10ec) + return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(SET_ABYSS_ACTOR) and (lv==1 or lv==8) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if ft>0 then loc=loc+LOCATION_HAND end + if ft>0 then loc=loc|LOCATION_HAND end if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_HAND end if loc==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp,e:GetHandler()) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c39030163.lua b/official/c39030163.lua index e850a0cc57..2996c5bb17 100644 --- a/official/c39030163.lua +++ b/official/c39030163.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x107b,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) end function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39033131.lua b/official/c39033131.lua index 7f48b2996a..db6875f429 100644 --- a/official/c39033131.lua +++ b/official/c39033131.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1,id) e2:SetCondition(s.condition) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -55,12 +55,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end - +end \ No newline at end of file diff --git a/official/c39037517.lua b/official/c39037517.lua index d13f037361..d6b6e91359 100644 --- a/official/c39037517.lua +++ b/official/c39037517.lua @@ -1,4 +1,5 @@ --コアキメイル・ビートル +--Koa'ki Meiru Beetle local s,id=GetID() function s.initial_effect(c) --cost @@ -24,7 +25,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -73,4 +74,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c39041550.lua b/official/c39041550.lua index fd9ff44ae2..d7d01bcf60 100644 --- a/official/c39041550.lua +++ b/official/c39041550.lua @@ -1,7 +1,6 @@ --- +--騎甲虫スケイル・ボム --Beetrooper Scale Bomber --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Special Summon itself. @@ -51,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local loct=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return loct==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsControler(1-tp) + return loct==LOCATION_MZONE and re:IsMonsterEffect() and re:GetHandler():IsControler(1-tp) end function s.cfilter(c,rc) return c:IsRace(RACE_INSECT) and c~=rc @@ -70,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39041729.lua b/official/c39041729.lua index 6b11bbc6af..75de56ddf1 100644 --- a/official/c39041729.lua +++ b/official/c39041729.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) local lv=c:GetLevel() return lv>0 and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rg:CheckWithSumEqual(Card.GetLevel,lv,2,99) @@ -31,9 +31,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=100 then return false end e:SetLabel(0) - return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.IsPlayerAffectedByEffect(tp,69832741)) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION)) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) local lvt={} local pc=1 for i=2,12 do @@ -42,12 +42,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) lvt[pc]=nil Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local sg=rg:SelectWithSumEqual(tp,Card.GetLevel,lv,2,99) Duel.Remove(sg,POS_FACEUP,REASON_COST) e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spfilter(c,e,tp,lv) return c:GetLevel()==lv and c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -55,14 +55,14 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp,e:GetLabel()) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp,e:GetLabel()) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39049051.lua b/official/c39049051.lua index 937bcedde6..0226ef702f 100644 --- a/official/c39049051.lua +++ b/official/c39049051.lua @@ -1,5 +1,5 @@ --歌氷麗月 ---Wonders of Nature +--Kahyoreigetsu --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={6205579} -s.listed_series={0x46} +s.listed_series={SET_FUSION} function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_FAIRY|RACE_SPELLCASTER|RACE_WINGEDBEAST|RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -61,7 +61,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -80,13 +80,13 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.thfilter2(c) - return ((c:IsSetCard(0x46) and c:IsSpell()) or c:IsCode(6205579)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_FUSION) and c:IsSpell()) or c:IsCode(6205579)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c39064822.lua b/official/c39064822.lua index 1c4745035d..9df58b3510 100644 --- a/official/c39064822.lua +++ b/official/c39064822.lua @@ -32,12 +32,11 @@ function s.lcheck(g,lc,sumtype,tp) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) local tp=e:GetHandlerPlayer() - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) - and Duel.IsPlayerCanAdditionalSummon(tp) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLinkSummoned() and Duel.IsPlayerCanAdditionalSummon(tp) end function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end @@ -65,9 +64,9 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(c) e1:SetCondition(s.sumcon2) e1:SetValue(s.sumval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.sumcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetLabelObject():IsLocation(LOCATION_MZONE) @@ -81,4 +80,3 @@ end function s.tgtg(e,c) return c:GetMutualLinkedGroupCount()>0 end - diff --git a/official/c39091951.lua b/official/c39091951.lua index 93dca0fae7..47170c0a5f 100644 --- a/official/c39091951.lua +++ b/official/c39091951.lua @@ -1,4 +1,5 @@ --パンダボーグ +--Pandaborg local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -16,10 +17,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c,e,tp) return c:GetLevel()==4 and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -35,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c3909436.lua b/official/c3909436.lua index 80e4845fcf..7a7dc2bd01 100644 --- a/official/c3909436.lua +++ b/official/c3909436.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.cfilter(c) - return c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_VENDREAD) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -59,28 +59,28 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,5)) e1:SetValue(s.aclimit3) end - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit1(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.aclimit2(e,re,tp) - return re:IsActiveType(TYPE_SPELL) + return re:IsSpellEffect() end function s.aclimit3(e,re,tp) - return re:IsActiveType(TYPE_TRAP) + return re:IsTrapEffect() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsRitualSummoned() end function s.thfilter(c,tp) return c:GetType() & TYPE_RITUAL+TYPE_MONSTER == TYPE_RITUAL+TYPE_MONSTER and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,c) end function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x106) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_VENDREAD) and c:IsAbleToGrave() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end @@ -99,4 +99,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c39109382.lua b/official/c39109382.lua index 5f29496bcc..315bb1a54b 100644 --- a/official/c39109382.lua +++ b/official/c39109382.lua @@ -36,9 +36,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.filter(c) - return c:IsSetCard(0x13) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MEKLORD) and c:IsMonster() and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.desmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end @@ -69,7 +69,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsSetCard(0x13) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsSetCard(SET_MEKLORD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) end function s.desstcond(e,tp,eg,ep,ev,re,r,rp) @@ -81,4 +81,4 @@ function s.dessttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSpellTrap),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end +end \ No newline at end of file diff --git a/official/c39118197.lua b/official/c39118197.lua index 3cb0c338c8..b7f3c2ac89 100644 --- a/official/c39118197.lua +++ b/official/c39118197.lua @@ -1,4 +1,5 @@ --カラクリ武者 六参壱八 +--Karakuri Bushi mdl 6318 "Muzanichiha" local s,id=GetID() function s.initial_effect(c) --must attack @@ -36,7 +37,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x11) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_KARAKURI) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil) @@ -47,8 +48,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(400) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c3912064.lua b/official/c3912064.lua index 14b24247ed..58be3fb46f 100644 --- a/official/c3912064.lua +++ b/official/c3912064.lua @@ -1,4 +1,5 @@ --The tripping Mercury +--The Tripper Mercury local s,id=GetID() function s.initial_effect(c) --change position @@ -32,7 +33,7 @@ function s.posfilter(c) return c:IsDefensePos() or c:IsFacedown() end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -49,4 +50,4 @@ function s.atkval(e,c) local rec=c:GetBaseAttack() if rec<0 then rec=0 end return rec*-1 -end +end \ No newline at end of file diff --git a/official/c39122311.lua b/official/c39122311.lua index 773f115cda..7a93825479 100644 --- a/official/c39122311.lua +++ b/official/c39122311.lua @@ -1,4 +1,5 @@ --竜魂の幻泉 +--Oasis of Dragon Souls local s,id=GetID() function s.initial_effect(c) --Activate @@ -54,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(RACE_WYRM) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) @@ -82,4 +83,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39131963.lua b/official/c39131963.lua index 476d76da84..b7f782cbb8 100644 --- a/official/c39131963.lua +++ b/official/c39131963.lua @@ -1,4 +1,5 @@ --デスカウンター +--Des Counterblow local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39139935.lua b/official/c39139935.lua index d10d7e8e93..0bf28aeb2a 100644 --- a/official/c39139935.lua +++ b/official/c39139935.lua @@ -1,4 +1,5 @@ --No.33 先史遺産-超兵器マシュ=マック +--Number 33: Chronomaly Machu Mech local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,16 +13,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=33 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() end @@ -49,9 +46,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(dam) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end end -end +end \ No newline at end of file diff --git a/official/c39153655.lua b/official/c39153655.lua index b1a9e30b84..90cedc291d 100644 --- a/official/c39153655.lua +++ b/official/c39153655.lua @@ -1,4 +1,5 @@ --DDケルベロス +--D/D Cerberus local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -24,11 +25,11 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xaf} +s.listed_series={SET_DD} s.listed_names={id} function s.filter(c) local lv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0xaf) and lv>0 and lv~=4 + return c:IsFaceup() and c:IsSetCard(SET_DD) and lv>0 and lv~=4 end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -46,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_ATTACK) @@ -58,15 +59,15 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_DD) and not c:IsCode(id) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsPreviousLocation(LOCATION_HAND) + return c:IsPendulumSummoned() and c:IsPreviousLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToHand() + return c:IsContinuousSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39163598.lua b/official/c39163598.lua index 79fd00b0c0..93831fcb9b 100644 --- a/official/c39163598.lua +++ b/official/c39163598.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_DRAW_PHASE|TIMINGS_CHECK_MONSTER_E) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -25,8 +25,8 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_A} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0xc) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0xc) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_ALIEN) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_ALIEN) Duel.Release(g,REASON_COST) end function s.tgfilter(c) @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetOperation(s.ctop1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS) @@ -64,7 +64,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetOwnerPlayer(tp) e4:SetLabel(0) e4:SetOperation(s.reset) - e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e4:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e4) table.insert(s[0],e4) s[0][e4]={e1,e2,e3} @@ -104,4 +104,4 @@ function s.reset(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c39168895.lua b/official/c39168895.lua index 150e3d5a12..a50b5e64bf 100644 --- a/official/c39168895.lua +++ b/official/c39168895.lua @@ -1,4 +1,5 @@ --怒れる類人猿 +--Berserk Gorilla local s,id=GetID() function s.initial_effect(c) --must attack @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.descon(e) return e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c39180960.lua b/official/c39180960.lua index 7ca082a1c3..6b72d9a84a 100644 --- a/official/c39180960.lua +++ b/official/c39180960.lua @@ -1,4 +1,5 @@ --リグラス・リーパー +--Rigorous Reaver local s,id=GetID() function s.initial_effect(c) --flip @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,1,1,nil) g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(g1,REASON_DISCARD|REASON_EFFECT) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -39,10 +40,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c3918345.lua b/official/c3918345.lua index 27f50a2683..55672bbbce 100644 --- a/official/c3918345.lua +++ b/official/c3918345.lua @@ -10,4 +10,4 @@ function s.initial_effect(c) e1:SetCondition(Gemini.EffectStatusCondition) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c39185163.lua b/official/c39185163.lua index 4ece5cf72b..e503a7e977 100644 --- a/official/c39185163.lua +++ b/official/c39185163.lua @@ -2,7 +2,7 @@ --Doomking Balerdroch local s,id=GetID() function s.initial_effect(c) - --Negate an activated effect or Banish 1 monster from the field or GY. + --Negate an activated effect or Banish 1 monster from the field or GY. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) diff --git a/official/c39188539.lua b/official/c39188539.lua index 659e84d1e2..5b2a14750d 100644 --- a/official/c39188539.lua +++ b/official/c39188539.lua @@ -46,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39191307.lua b/official/c39191307.lua index ff5b4e95e4..1d715b5fd6 100644 --- a/official/c39191307.lua +++ b/official/c39191307.lua @@ -1,4 +1,5 @@ --仮面竜 +--Masked Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c39229392.lua b/official/c39229392.lua index 941519fa30..acc0a65a4c 100644 --- a/official/c39229392.lua +++ b/official/c39229392.lua @@ -1,4 +1,5 @@ --オーバーレイ・スナイパー +--Overlay Sentinel local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCondition(s.atkcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -57,7 +58,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(Duel.GetOverlayCount(tp,1,0)*-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39238953.lua b/official/c39238953.lua index 9ce66a1b3e..ba35700bb4 100644 --- a/official/c39238953.lua +++ b/official/c39238953.lua @@ -7,15 +7,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_DECK,1,nil) or Duel.IsPlayerCanSpecialSummon(tp)) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end @@ -59,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.ShuffleDeck(1-tp) -end +end \ No newline at end of file diff --git a/official/c39246582.lua b/official/c39246582.lua index 76fe9978bc..18f488365c 100644 --- a/official/c39246582.lua +++ b/official/c39246582.lua @@ -1,4 +1,5 @@ --ファーニマル・ドッグ +--Fluffal Dog local s,id=GetID() function s.initial_effect(c) --search @@ -17,13 +18,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0xa9} +s.listed_series={SET_FLUFFAL} s.listed_names={30068120} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.filter(c) - return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsMonster() and not c:IsCode(id))) + return (c:IsCode(30068120) or (c:IsSetCard(SET_FLUFFAL) and c:IsMonster() and not c:IsCode(id))) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -37,4 +38,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c39260991.lua b/official/c39260991.lua index 54c788f097..cc8139c751 100644 --- a/official/c39260991.lua +++ b/official/c39260991.lua @@ -1,4 +1,5 @@ --アクアアクトレス・テトラ +--Aquaactress Tetra local s,id=GetID() function s.initial_effect(c) --to hand @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x20cd} +s.listed_series={SET_AQUARIUM} function s.filter(c) - return c:IsSetCard(0x20cd) and c:IsAbleToHand() + return c:IsSetCard(SET_AQUARIUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c39261576.lua b/official/c39261576.lua index 2f3219d8bd..f403e761a6 100644 --- a/official/c39261576.lua +++ b/official/c39261576.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),Fusion.OnFieldMat,nil,nil,nil,s.stage2) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT),Fusion.OnFieldMat,nil,nil,nil,s.stage2) c:RegisterEffect(e1) --Increase ATK local e2=Effect.CreateEffect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.stage2(e,tc,tp,sg,chk) if chk==1 then e:SetLabelObject(tc) @@ -41,10 +41,10 @@ end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tc=e:GetLabelObject():GetLabelObject() local mat=tc:GetMaterial() - if chkc then return chkc:IsSetCard(0x1047) and mat:IsContains(chkc) end - if chk==0 then return mat:IsExists(Card.IsSetCard,1,nil,0x1047) end + if chkc then return chkc:IsSetCard(SET_GEM_KNIGHT) and mat:IsContains(chkc) end + if chk==0 then return mat:IsExists(Card.IsSetCard,1,nil,SET_GEM_KNIGHT) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local g=mat:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x1047) + local g=mat:FilterSelect(tp,Card.IsSetCard,1,1,nil,SET_GEM_KNIGHT) tc:CreateEffectRelation(e) Duel.SetTargetCard(g) end @@ -57,6 +57,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c39271553.lua b/official/c39271553.lua index ee15eaf96a..2d8f211e23 100644 --- a/official/c39271553.lua +++ b/official/c39271553.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107) and c:GetLevel()>c:GetOriginalLevel() + return c:IsFaceup() and c:IsSetCard(SET_FA) and c:GetLevel()>c:GetOriginalLevel() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -56,19 +56,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e2:SetValue(lv) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end end end function s.thfilter(c) - return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:IsAbleToHand() + return c:IsSetCard(SET_FA) and c:IsType(TYPE_FIELD) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c39272762.lua b/official/c39272762.lua index 9c0ced7fff..6c7e44a970 100644 --- a/official/c39272762.lua +++ b/official/c39272762.lua @@ -1,4 +1,5 @@ --超銀河眼の光子龍 +--Neo Galaxy-Eyes Photon Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.atcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.attg) e3:SetOperation(s.atop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,7 +41,7 @@ function s.valcheck(e,c) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()==1 end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -50,26 +51,22 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetOverlayCount(tp,0,1)~=0 end end @@ -84,13 +81,13 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(#g*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(#g-1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c39275698.lua b/official/c39275698.lua index 69f4f5aca7..c20397418c 100644 --- a/official/c39275698.lua +++ b/official/c39275698.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} --This card lists names in its text s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} --Check for "Harpie Lady" or "Harpie Sisters" @@ -36,16 +36,16 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end --Check for level 5 or higher "Harpie" function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:IsLevelAbove(5) + return c:IsFaceup() and c:IsSetCard(SET_HARPIE) and c:IsLevelAbove(5) end --Performing the effect of shuffling and drawing function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,e:GetLabel(),REASON_EFFECT) @@ -59,12 +59,11 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end --Restrict special summmons to WIND monsters function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) -end - +end \ No newline at end of file diff --git a/official/c39276790.lua b/official/c39276790.lua index f4076473ea..f6e498f5b0 100644 --- a/official/c39276790.lua +++ b/official/c39276790.lua @@ -1,4 +1,5 @@ --真剣勝負 +--Face-Off local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39284521.lua b/official/c39284521.lua index c3a791d318..5f8f5e6d0a 100644 --- a/official/c39284521.lua +++ b/official/c39284521.lua @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c39317553.lua b/official/c39317553.lua index 25dd9c97d5..d6b112d2bd 100644 --- a/official/c39317553.lua +++ b/official/c39317553.lua @@ -34,17 +34,17 @@ function s.initial_effect(c) end function s.altop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.xyzcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsXyzSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) - and c:IsSummonType(SUMMON_TYPE_XYZ) + and c:IsXyzSummoned() end function s.spfilter(c,e,tp) return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c39321065.lua b/official/c39321065.lua index fa5670b2d6..8a4faed226 100644 --- a/official/c39321065.lua +++ b/official/c39321065.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_LVCHANGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e) return e:GetHandler():HasLevel() end) diff --git a/official/c39343610.lua b/official/c39343610.lua index 1219622509..38ee29adac 100644 --- a/official/c39343610.lua +++ b/official/c39343610.lua @@ -1,4 +1,5 @@ --ダークブレイズドラゴン +--Darkblaze Dragon local s,id=GetID() function s.initial_effect(c) --atkup @@ -32,13 +33,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(c:GetBaseDefense()*2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end end @@ -60,4 +61,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39354437.lua b/official/c39354437.lua index e41bb95563..7232cbe933 100644 --- a/official/c39354437.lua +++ b/official/c39354437.lua @@ -1,9 +1,9 @@ --- 氷水のエジル --- Agel of the Icejade --- Scripted by Hatter +--氷水のエジル +--Icejade Aegirine +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search "Icejade" Spell/Trap + --Search "Icejade" Spell/Trap local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -34,10 +34,10 @@ function s.initial_effect(c) e3:SetCondition(s.spbtcon) c:RegisterEffect(e3) end -s.listed_series={0x16e} +s.listed_series={SET_ICEJADE} s.listed_names={id} function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x16e) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_ICEJADE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,16 +62,16 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Return to the hand during the End Phase + --Return to the hand during the End Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -79,21 +79,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.retop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) g:GetFirst():RegisterEffect(e1,true) end end if not c:IsRelateToEffect(e) then return end - -- Cannot be destroyed once + --Cannot be destroyed once local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetValue(function(_,_,r)return (r&REASON_BATTLE+REASON_EFFECT)~=0 end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39357122.lua b/official/c39357122.lua index 5eab5c9030..ba91ab2379 100644 --- a/official/c39357122.lua +++ b/official/c39357122.lua @@ -31,4 +31,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39373426.lua b/official/c39373426.lua index b44b27b61a..5877f5b337 100644 --- a/official/c39373426.lua +++ b/official/c39373426.lua @@ -1,6 +1,5 @@ --SPYRAL MISSION-奪還 --SPYRAL MISSION - Recapture - local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,8 +38,7 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0xee} - +s.listed_series={SET_SPYRAL} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() @@ -53,12 +51,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) c:SetTurnCounter(0) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,14 +68,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.cncfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xee) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_SPYRAL) and c:IsControler(tp) end function s.cncon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cncfilter,1,nil,tp) end function s.cncost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.cntg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end @@ -95,7 +93,7 @@ function s.cntg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) c:SetTurnCounter(0) c:RegisterEffect(e1) end @@ -116,13 +114,13 @@ function s.cnop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xee) and c:IsLocation(LOCATION_MZONE) - and not c:IsReason(REASON_REPLACE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsSetCard(SET_SPYRAL) and c:IsLocation(LOCATION_MZONE) + and not c:IsReason(REASON_REPLACE) and c:IsControler(tp) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end diff --git a/official/c39387565.lua b/official/c39387565.lua index 9730ff9aa7..912f917631 100644 --- a/official/c39387565.lua +++ b/official/c39387565.lua @@ -32,9 +32,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3b) + return c:IsFaceup() and c:IsSetCard(SET_RED_EYES) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -61,7 +61,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_DESTROY+REASON_EFFECT)==REASON_DESTROY+REASON_EFFECT and rp==1-tp end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -76,4 +76,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c39389320.lua b/official/c39389320.lua index 2f4a608bf0..74106b029e 100644 --- a/official/c39389320.lua +++ b/official/c39389320.lua @@ -1,4 +1,5 @@ --バーバリアン・キング +--Battleguard King local s,id=GetID() function s.initial_effect(c) --multi attack @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39392286.lua b/official/c39392286.lua index 585bf3f911..d5c23ab131 100644 --- a/official/c39392286.lua +++ b/official/c39392286.lua @@ -21,17 +21,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e3) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} function s.thfilter(c) return c:ListsCode(CARD_HARPIE_LADY_SISTERS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:IsLevelAbove(5) + return c:IsFaceup() and c:IsSetCard(SET_HARPIE) and c:IsLevelAbove(5) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -50,5 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg1) -end - +end \ No newline at end of file diff --git a/official/c39396763.lua b/official/c39396763.lua index 424827141d..e886a89105 100644 --- a/official/c39396763.lua +++ b/official/c39396763.lua @@ -1,9 +1,9 @@ --- ダイナ・ベース --- Dyna Base --- Scripted by Hatter +--ダイナ・ベース +--Dyna Base +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Fusion Summon + --Fusion Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) diff --git a/official/c39399168.lua b/official/c39399168.lua index e96dd098bd..7a2f794e5a 100644 --- a/official/c39399168.lua +++ b/official/c39399168.lua @@ -1,5 +1,6 @@ --チャクラの復活 +--Resurrection of Chakra local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,65393205) -end +end \ No newline at end of file diff --git a/official/c39402797.lua b/official/c39402797.lua index ff4fac6f1e..52f241db32 100644 --- a/official/c39402797.lua +++ b/official/c39402797.lua @@ -1,4 +1,5 @@ --トライデント・ドラギオン +--Trident Dragion local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -24,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) end @@ -43,7 +44,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39432962.lua b/official/c39432962.lua index 71f19c7af4..8c4096a40a 100644 --- a/official/c39432962.lua +++ b/official/c39432962.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x82} +s.listed_series={SET_DODODO} function s.filter(c,e,tp) - return c:IsSetCard(0x82) and c:GetCode()~=id + return c:IsSetCard(SET_DODODO) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c39439590.lua b/official/c39439590.lua index 6e3a583d1f..068e2f337b 100644 --- a/official/c39439590.lua +++ b/official/c39439590.lua @@ -1,4 +1,5 @@ --サイバー・ダイナソー +--Cyber Dinosaur local s,id=GetID() function s.initial_effect(c) --spsummon @@ -28,4 +29,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c39440937.lua b/official/c39440937.lua index 2b7b325778..685f1d21ad 100644 --- a/official/c39440937.lua +++ b/official/c39440937.lua @@ -1,4 +1,5 @@ --妨害電波 +--Intercept Wave local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCondition(s.tdcon) e1:SetOperation(s.tdop) Duel.RegisterEffect(e1,tp) @@ -39,5 +40,5 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c39454112.lua b/official/c39454112.lua index 137b1e1506..5733ea4bca 100644 --- a/official/c39454112.lua +++ b/official/c39454112.lua @@ -18,7 +18,7 @@ end function s.diceop(e,tp,eg,ep,ev,re,r,rp) local cc=Duel.GetCurrentChain() local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID) - if s[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then + if s[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then local dc={Duel.GetDiceResult()} local ac=1 local ct=(ev&0xff)+(ev>>16) @@ -32,4 +32,4 @@ function s.diceop(e,tp,eg,ep,ev,re,r,rp) Duel.SetDiceResult(table.unpack(dc)) s[0]=cid end -end +end \ No newline at end of file diff --git a/official/c39468724.lua b/official/c39468724.lua index 3a53f7d1e1..4cd6be0ecf 100644 --- a/official/c39468724.lua +++ b/official/c39468724.lua @@ -1,7 +1,6 @@ --ドラグニティナイトの影霊衣 --Nekroz of Areadbhair --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -41,24 +40,19 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Nekroz" archetype -s.listed_series={0xb4} - +s.listed_series={SET_NEKROZ} --Cannot include level 10 monsters for its ritual summon function s.mat_filter(c) return c:GetLevel()~=10 end --Discard itself as cost -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end --Check for "Nekroz" monsters to tribute function s.filter(c) - return c:IsSetCard(0xb4) and c:IsMonster() and c:IsReleasableByEffect() + return c:IsSetCard(SET_NEKROZ) and c:IsMonster() and c:IsReleasableByEffect() end --Check for "Nekroz" cards to send to GY function s.sendfilter(c) - return c:IsSetCard(0xb4) and c:IsAbleToGrave() + return c:IsSetCard(SET_NEKROZ) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -83,7 +77,7 @@ end --Monster effect activated function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end --Tribute 1 monster from hand or field as cost function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c39475024.lua b/official/c39475024.lua index 08da9409c9..f40607ba23 100644 --- a/official/c39475024.lua +++ b/official/c39475024.lua @@ -1,6 +1,5 @@ --骸の魔妖-餓者髑髏 ---Gashadokuro, the Skeleton Mayakashi - +--Gashadokuro, the Skeletal Mayakashi local s,id=GetID() function s.initial_effect(c) --Can only control one @@ -46,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c39477584.lua b/official/c39477584.lua index 730e6be3ca..06ed1f179a 100644 --- a/official/c39477584.lua +++ b/official/c39477584.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x35),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FABLED),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --Add to hand local e1=Effect.CreateEffect(c) @@ -17,12 +17,12 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.con(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_DESTROY)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -38,4 +38,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c39505816.lua b/official/c39505816.lua index 680d4071b3..8e5e538874 100644 --- a/official/c39505816.lua +++ b/official/c39505816.lua @@ -1,5 +1,5 @@ --炎天禍サンバーン ---Sunburn the Solar Calamity +--Cataclysmic Scorching Sunburner --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -48,5 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,sc:GetAttack()/2,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c39507162.lua b/official/c39507162.lua index 60008ae1f1..3b81d87291 100644 --- a/official/c39507162.lua +++ b/official/c39507162.lua @@ -1,4 +1,5 @@ --ブレイドナイト +--Blade Knight local s,id=GetID() function s.initial_effect(c) --atk up @@ -32,12 +33,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c39512984.lua b/official/c39512984.lua index 6598f12a0e..f3c0fae8bc 100644 --- a/official/c39512984.lua +++ b/official/c39512984.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),3) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -30,24 +30,24 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x47,0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM,SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.atkfilter(c) - return c:IsSetCard(0x47) and c:IsMonster() + return c:IsSetCard(SET_GEM) and c:IsMonster() end function s.atkup(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100 end function s.filter(c) - return c:IsLevelBelow(7) and c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsLevelBelow(7) and c:IsSetCard(SET_GEM_KNIGHT) and c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) e:SetLabel(g:GetFirst():GetOriginalCode()) end @@ -58,10 +58,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c39526584.lua b/official/c39526584.lua index a3a9551925..c8e9170a73 100644 --- a/official/c39526584.lua +++ b/official/c39526584.lua @@ -1,4 +1,5 @@ --ギフトカード +--Gift Card local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39528955.lua b/official/c39528955.lua index 7218bd3d10..72d67fd01f 100644 --- a/official/c39528955.lua +++ b/official/c39528955.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x116,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_CRUSADIA,lc,sumtype,tp) end function s.atkval(e,c) local g=e:GetHandler():GetLinkedGroup():Filter(Card.IsFaceup,nil) @@ -71,4 +71,4 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,p1,p2,0),2)-i) -end +end \ No newline at end of file diff --git a/official/c39531794.lua b/official/c39531794.lua index b34efa8c57..51a8978fd4 100644 --- a/official/c39531794.lua +++ b/official/c39531794.lua @@ -1,4 +1,5 @@ --ブレインハザード +--Brain Hazard local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,7 +31,7 @@ function s.filter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_REMOVED and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -57,4 +58,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3954901.lua b/official/c3954901.lua index 04302fdc3b..534ec752cb 100644 --- a/official/c3954901.lua +++ b/official/c3954901.lua @@ -44,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetLevel()*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39552584.lua b/official/c39552584.lua index 4ba23ffdf3..082b1a1ea7 100644 --- a/official/c39552584.lua +++ b/official/c39552584.lua @@ -44,7 +44,7 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -68,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and (Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0) then local turn_pl=Duel.GetTurnPlayer() Duel.BreakEffect() - Duel.DiscardHand(turn_pl,nil,1,1,REASON_EFFECT+REASON_DISCARD) - Duel.DiscardHand(1-turn_pl,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(turn_pl,nil,1,1,REASON_EFFECT|REASON_DISCARD) + Duel.DiscardHand(1-turn_pl,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c39564736.lua b/official/c39564736.lua index 3b97b24ac6..62e71cdb71 100644 --- a/official/c39564736.lua +++ b/official/c39564736.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0xe1)) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_METALFOES)) c:RegisterEffect(e1) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} \ No newline at end of file diff --git a/official/c39568067.lua b/official/c39568067.lua index 6649f4e59c..6d46e3d7b1 100644 --- a/official/c39568067.lua +++ b/official/c39568067.lua @@ -1,14 +1,14 @@ --- 運命の旅路 --- Fateful Adventure --- Scripted by Hatter +--運命の旅路 +--Fateful Adventure +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Prevent battle destruction once + --Prevent battle destruction once local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetValue(function(_,_,r) return r&REASON_BATTLE==REASON_BATTLE end) e2:SetTarget(function(_,c) return c:GetEquipCount()>0 end) c:RegisterEffect(e2) - -- Search monster that lists "Adventurer Token" + --Search monster that lists "Adventurer Token" local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetTarget(s.mthtg) e3:SetOperation(s.mthop) c:RegisterEffect(e3) - -- Search Equip Spell that lists "Adventurer Token" + --Search Equip Spell that lists "Adventurer Token" local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_EQUIP) diff --git a/official/c39581190.lua b/official/c39581190.lua index d82367692a..d4f424d5ea 100644 --- a/official/c39581190.lua +++ b/official/c39581190.lua @@ -1,4 +1,5 @@ --Subterror Nemesis Archer +--Subterror Nemesis Archer local s,id=GetID() function s.initial_effect(c) --to deck @@ -25,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xed) + return c:IsFaceup() and c:IsSetCard(SET_SUBTERROR) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,15 +44,15 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if d:IsRelateToBattle() and d:IsPosition(POS_FACEDOWN_DEFENSE) then - Duel.SendtoDeck(d,nil,2,REASON_EFFECT) + Duel.SendtoDeck(d,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xed) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) + return c:IsSetCard(SET_SUBTERROR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -69,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c39613288.lua b/official/c39613288.lua index 6e86e4f10e..ba1cc9beba 100644 --- a/official/c39613288.lua +++ b/official/c39613288.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c39618799.lua b/official/c39618799.lua index 09dbed246c..cf0dc27ec1 100644 --- a/official/c39618799.lua +++ b/official/c39618799.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) end) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) diff --git a/official/c39622156.lua b/official/c39622156.lua index f1421fb249..f96387f348 100644 --- a/official/c39622156.lua +++ b/official/c39622156.lua @@ -9,10 +9,10 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetTarget(s.btcost) + e1:SetTarget(Cost.Detach(1)) e1:SetOperation(s.btop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --control @@ -31,11 +31,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=26 -function s.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end - c:RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.btop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local p=Duel.GetTurnPlayer() @@ -47,7 +42,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(s.atkcon) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,p) --check local e2=Effect.CreateEffect(c) @@ -56,7 +51,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetOperation(s.checkop) e2:SetLabelObject(e1) - e2:SetReset(RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e2,p) --direct Attack local e3=Effect.CreateEffect(c) @@ -64,7 +59,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_DIRECT_ATTACK) e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTarget(aux.TargetBoolFunction(Card.IsMonster)) - e3:SetReset(RESET_PHASE+PHASE_BATTLE) + e3:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e3,p) -- local e4=Effect.CreateEffect(c) @@ -72,7 +67,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e4:SetTargetRange(LOCATION_MZONE,0) e4:SetValue(1) - e4:SetReset(RESET_PHASE+PHASE_BATTLE) + e4:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e4,p) end function s.atkcon(e) @@ -84,14 +79,14 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id)~=0 then return end local fid=eg:GetFirst():GetFieldID() - Duel.RegisterFlagEffect(e:GetHandlerPlayer(),id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(e:GetHandlerPlayer(),id,RESETS_STANDARD_PHASE_END,0,1) e:GetLabelObject():SetLabel(fid) end function s.regop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetAttackTarget()~=nil then return end local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) - eg:GetFirst():RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) + eg:GetFirst():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 diff --git a/official/c39643167.lua b/official/c39643167.lua index 1b9df929dd..cbb2369e2f 100644 --- a/official/c39643167.lua +++ b/official/c39643167.lua @@ -79,4 +79,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) RESET_PHASE|PHASE_STANDBY,reset_count ) end -end +end \ No newline at end of file diff --git a/official/c39648965.lua b/official/c39648965.lua index e63a2e0286..11ea3ddf69 100644 --- a/official/c39648965.lua +++ b/official/c39648965.lua @@ -1,4 +1,5 @@ --機皇兵ワイゼル・アイン +--Meklord Army of Wisel local s,id=GetID() function s.initial_effect(c) --atkup @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.pierceop) c:RegisterEffect(e2) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) end function s.val(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*100 @@ -31,7 +32,7 @@ end function s.piercecon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return d and a:IsControler(tp) and a~=e:GetHandler() and d:IsDefensePos() and a:IsSetCard(0x13) + return d and a:IsControler(tp) and a~=e:GetHandler() and d:IsDefensePos() and a:IsSetCard(SET_MEKLORD) end function s.piercetg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -43,7 +44,7 @@ function s.pierceop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) a:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c3966653.lua b/official/c3966653.lua index 36b6e3d9ba..fc1617da25 100644 --- a/official/c3966653.lua +++ b/official/c3966653.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_PIERCE) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe6)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FLOWER_CARDIAN)) c:RegisterEffect(e2) --activate limit local e3=Effect.CreateEffect(c) @@ -23,14 +23,14 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.spfilter(c) - return c:IsSetCard(0xe6) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -49,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetTargetRange(0,1) e2:SetTarget(s.sumlimit) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,0,1,aux.Stringid(id,1),nil) end @@ -58,4 +58,4 @@ function s.aclimit(e,re,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_GRAVE) -end +end \ No newline at end of file diff --git a/official/c39672388.lua b/official/c39672388.lua index 5c30d945bd..1e9b4b42bb 100644 --- a/official/c39672388.lua +++ b/official/c39672388.lua @@ -1,4 +1,5 @@ --エヴォルダー・ダルウィノス +--Evolsaur Darwino local s,id=GetID() function s.initial_effect(c) --lvup @@ -30,7 +31,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(opt+1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39680372.lua b/official/c39680372.lua index 9eb93e6cc7..2ba5ed3564 100644 --- a/official/c39680372.lua +++ b/official/c39680372.lua @@ -1,7 +1,6 @@ --創造の聖刻印 --Hieratic Seal of Creation --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -24,14 +23,13 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end --Lists "Hieratic" archetype -s.listed_series={0x69} - +s.listed_series={SET_HIERATIC} --Check for a dragon Xyz monster function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) @@ -39,7 +37,7 @@ function s.filter1(c,e,tp) end --Check for "Hieratic" Xyz monster function s.filter2(c,e,tp,mc,code,pg) - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ) and c:IsSetCard(0x69) and not c:IsOriginalCode(code) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_HIERATIC) and not c:IsOriginalCode(code) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end --Activation legality @@ -67,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end --Check for "Hieratic" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_HIERATIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -84,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c39695323.lua b/official/c39695323.lua index 04bad01ce7..dd05fbe639 100644 --- a/official/c39695323.lua +++ b/official/c39695323.lua @@ -1,4 +1,5 @@ --ゴゴゴジャイアント +--Gogogo Giant local s,id=GetID() function s.initial_effect(c) --summon success @@ -14,16 +15,16 @@ function s.initial_effect(c) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x59} +s.listed_series={SET_GOGOGO} function s.filter(c,e,tp) - return c:IsSetCard(0x59) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GOGOGO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -51,4 +52,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c39699564.lua b/official/c39699564.lua index e410ce24ca..c8850a15ab 100644 --- a/official/c39699564.lua +++ b/official/c39699564.lua @@ -23,17 +23,17 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.setcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x79) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x79) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_FIRE_FIST) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_FIRE_FIST) Duel.Release(g,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -46,5 +46,5 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end \ No newline at end of file diff --git a/official/c39701395.lua b/official/c39701395.lua index 1d718e99f3..0cf7d2e405 100644 --- a/official/c39701395.lua +++ b/official/c39701395.lua @@ -1,4 +1,5 @@ --調和の宝札 +--Cards of Consonance local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,7 +18,7 @@ function s.filter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -28,4 +29,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39703254.lua b/official/c39703254.lua index 6af18eda03..2c4427eed8 100644 --- a/official/c39703254.lua +++ b/official/c39703254.lua @@ -1,4 +1,5 @@ --トマボー +--Inmato local s,id=GetID() function s.initial_effect(c) --draw @@ -10,24 +11,20 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end - if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end + if not re:IsSpellTrapEffect() then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return false end local tg=g:GetFirst() local c=e:GetHandler() return tg~=c and tg:IsFaceup() and tg:IsRace(RACE_PLANT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) @@ -37,4 +34,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39711336.lua b/official/c39711336.lua index 43d0e7d4a8..c595c6d875 100644 --- a/official/c39711336.lua +++ b/official/c39711336.lua @@ -38,7 +38,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -82,4 +82,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39712330.lua b/official/c39712330.lua index ac171eb995..be871a54f6 100644 --- a/official/c39712330.lua +++ b/official/c39712330.lua @@ -30,18 +30,18 @@ function s.filter(c) return c:IsType(TYPE_NORMAL) and c:CanSummonOrSet(true,nil) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end if e:GetHandler():GetFlagEffect(id)==0 then - e:GetHandler():RegisterFlagEffect(id,RESET_CHAIN,0,1,Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)) + e:GetHandler():RegisterFlagEffect(id,RESET_CHAIN,0,1,Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil)) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetHandler():GetFlagEffect(id)==0 then - return Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)>0 + return Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil)>0 else return e:GetHandler():GetFlagEffectLabel(id)>0 end end e:GetHandler():SetFlagEffectLabel(id,e:GetHandler():GetFlagEffectLabel(id)-1) @@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SummonOrSet(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c39719977.lua b/official/c39719977.lua index fa96e5725f..908bd2a5c1 100644 --- a/official/c39719977.lua +++ b/official/c39719977.lua @@ -1,4 +1,5 @@ --デルタ・アタッカー +--Delta Attacker local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,7 +29,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c3972721.lua b/official/c3972721.lua index 41d2673494..f9f93582db 100644 --- a/official/c3972721.lua +++ b/official/c3972721.lua @@ -1,4 +1,5 @@ --グリード・グラード +--Greed Grado local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,8 +37,8 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end end end - if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,0,1) end + if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end + if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)~=0 @@ -51,4 +52,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39730727.lua b/official/c39730727.lua index a40ad3420f..b1e7778482 100644 --- a/official/c39730727.lua +++ b/official/c39730727.lua @@ -1,5 +1,5 @@ --天威無崩の地 ---Tenyi Wubeng Stance +--Flawless Perfection of the Tenyi --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -34,7 +34,7 @@ function s.filter(c) return (not c:IsType(TYPE_EFFECT) and c:IsFaceup()) or c:IsFacedown() end function s.immfilter(e,te) - return te:IsActiveType(TYPE_MONSTER) + return te:IsMonsterEffect() end function s.drfilter(c,tp) return not c:IsSummonPlayer(tp) and c:IsType(TYPE_EFFECT) and c:IsFaceup() @@ -52,4 +52,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39732186.lua b/official/c39732186.lua index dc3d495218..1b06e55b60 100644 --- a/official/c39732186.lua +++ b/official/c39732186.lua @@ -1,5 +1,5 @@ --プロフィビット・スネーク ---Profibit Snake +--Prohibit Snake --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.rthcon) - e1:SetCost(s.rthcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.rthtg) e1:SetOperation(s.rthop) c:RegisterEffect(e1) @@ -42,10 +42,6 @@ function s.rthcon(e,tp,eg,ep,ev,re,r,rp) return true else return false end end -function s.rthcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local bc=e:GetLabelObject() @@ -72,9 +68,9 @@ function s.thfilter(c) return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -89,5 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c39733924.lua b/official/c39733924.lua index b7a4bd41b2..a8b59ef7d0 100644 --- a/official/c39733924.lua +++ b/official/c39733924.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e2:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) diff --git a/official/c39751093.lua b/official/c39751093.lua index d777e638fc..fb5872dc58 100644 --- a/official/c39751093.lua +++ b/official/c39751093.lua @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c39752820.lua b/official/c39752820.lua index 7315befcdd..33d67e0d0c 100644 --- a/official/c39752820.lua +++ b/official/c39752820.lua @@ -71,7 +71,7 @@ function s.ctcon(e) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:IsLinkSummoned() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) diff --git a/official/c39753577.lua b/official/c39753577.lua index 1ab11cc0d0..c4227c7618 100644 --- a/official/c39753577.lua +++ b/official/c39753577.lua @@ -1,6 +1,5 @@ --魔妖変生 --Mayakashi Metamorphosis - local s,id=GetID() function s.initial_effect(c) --Special summon 1 of your "Mayakashi" monsters, that is banished or in GY @@ -13,23 +12,22 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x121} - +s.listed_series={SET_MAYAKASHI} function s.counterfilter(c) - return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(0x121) + return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_MAYAKASHI) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -39,19 +37,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x121) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAYAKASHI) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g1=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -64,7 +62,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c39761138.lua b/official/c39761138.lua index d5c2dcbc6f..2412a44086 100644 --- a/official/c39761138.lua +++ b/official/c39761138.lua @@ -1,4 +1,5 @@ --ネオフレムベル・シャーマン +--Neo Flamvell Shaman local s,id=GetID() function s.initial_effect(c) --remove @@ -13,20 +14,20 @@ function s.initial_effect(c) e1:SetOperation(s.rmop) c:RegisterEffect(e1) end -s.listed_series={0x2c} +s.listed_series={SET_FLAMVELL} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsRelateToBattle() and c:GetBattleTarget():IsMonster() - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0x2c) + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,SET_FLAMVELL) end function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) if Duel.IsExistingMatchingCard(Card.IsSpell,tp,0,LOCATION_GRAVE,1,nil) then e:SetLabel(0) else @@ -35,7 +36,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,0x2c) then return end + if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,3,nil,SET_FLAMVELL) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) diff --git a/official/c39765115.lua b/official/c39765115.lua index 53c29b085d..c6daefe692 100644 --- a/official/c39765115.lua +++ b/official/c39765115.lua @@ -1,4 +1,5 @@ --スプラッシュ・キャプチャー +--Splash Capture local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,15 +16,15 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsSummonType(SUMMON_TYPE_XYZ) and tc:IsControler(1-tp) + return tc:IsXyzSummoned() and tc:IsControler(1-tp) end function s.cfilter(c) return c:IsRace(RACE_FISH) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c39765958.lua b/official/c39765958.lua index 133ec623d1..b70d668358 100644 --- a/official/c39765958.lua +++ b/official/c39765958.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -30,12 +30,12 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -53,4 +53,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39774685.lua b/official/c39774685.lua index 790a14ea18..bdb7f35d50 100644 --- a/official/c39774685.lua +++ b/official/c39774685.lua @@ -1,4 +1,5 @@ --魔菌 +--Vile Germs local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_PLANT)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c39778366.lua b/official/c39778366.lua index f58666b14b..6fc09bbae0 100644 --- a/official/c39778366.lua +++ b/official/c39778366.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c39806198.lua b/official/c39806198.lua index 758ecb846e..a8439f16da 100644 --- a/official/c39806198.lua +++ b/official/c39806198.lua @@ -1,4 +1,5 @@ --ギミック・パペット-マグネ・ドール +--Gimmick Puppet Magnet Doll local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -20,5 +21,5 @@ function s.spcon(e,c) and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x1083) -end + return c:IsFacedown() or not c:IsSetCard(SET_GIMMICK_PUPPET) +end \ No newline at end of file diff --git a/official/c39823987.lua b/official/c39823987.lua index a787f1bd0a..9f07ffd873 100644 --- a/official/c39823987.lua +++ b/official/c39823987.lua @@ -55,12 +55,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) e1:SetLabel(Duel.GetTurnCount()) Duel.RegisterEffect(e1,tp) end @@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c39829561.lua b/official/c39829561.lua index 224ac84ae5..a7062ac522 100644 --- a/official/c39829561.lua +++ b/official/c39829561.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -87,4 +87,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) departchktable[departchktable[0]]=re end end -end +end \ No newline at end of file diff --git a/official/c39838559.lua b/official/c39838559.lua index d24f5d1705..a8e8b9239c 100644 --- a/official/c39838559.lua +++ b/official/c39838559.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FA)) e2:SetValue(2) e2:SetCondition(s.lvcon) c:RegisterEffect(e2) @@ -42,11 +42,11 @@ function s.initial_effect(c) e4:SetOperation(s.thop2) c:RegisterEffect(e4) end -s.listed_series={0x107} +s.listed_series={SET_FA} s.listed_names={id} function s.lvcon(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -54,9 +54,9 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) for rc in aux.Next(eg) do if rc:IsStatus(STATUS_OPPO_BATTLE) then if rc:IsRelateToBattle() then - if rc:IsControler(tp) and rc:IsSetCard(0x107) then return true end + if rc:IsControler(tp) and rc:IsSetCard(SET_FA) then return true end else - if rc:IsPreviousControler(tp) and rc:IsPreviousSetCard(0x107) then return true end + if rc:IsPreviousControler(tp) and rc:IsPreviousSetCard(SET_FA) then return true end end end end @@ -78,7 +78,7 @@ function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.thfilter2(c) - return c:IsSetCard(0x107) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_FA) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -91,4 +91,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c39853199.lua b/official/c39853199.lua index 3d27793ce7..fe74eb6aae 100644 --- a/official/c39853199.lua +++ b/official/c39853199.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) end) + e2:SetCondition(function(e) return e:GetHandler():IsPendulumSummoned() end) e2:SetTarget(s.pendestg) e2:SetOperation(s.pendesop) c:RegisterEffect(e2) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetTarget(s.rettg) e3:SetOperation(s.retop) c:RegisterEffect(e3) - -- Register flag on Special Summon + --Register flag on Special Summon aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) diff --git a/official/c3987233.lua b/official/c3987233.lua index 7354a14375..e409baaaf2 100644 --- a/official/c3987233.lua +++ b/official/c3987233.lua @@ -55,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39880350.lua b/official/c39880350.lua index 0117cf65f9..163a63ef41 100644 --- a/official/c39880350.lua +++ b/official/c39880350.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1157,0x2157} +s.listed_series={SET_SUNAVALON,SET_SUNVINE} function s.mfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x1157,lc,sumtype,tp) and c:IsType(TYPE_LINK,lc,sumtype,tp) + return c:IsSetCard(SET_SUNAVALON,lc,sumtype,tp) and c:IsType(TYPE_LINK,lc,sumtype,tp) end function s.matcheck(g,lc,sumtype,tp) return g:IsExists(s.mfilter,1,nil,lc,sumtype,tp) @@ -38,7 +38,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_BATTLE+REASON_EFFECT)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUNVINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 diff --git a/official/c39890958.lua b/official/c39890958.lua index bd5e711610..4b9d1cb86b 100644 --- a/official/c39890958.lua +++ b/official/c39890958.lua @@ -1,4 +1,5 @@ --強化支援メカ・ヘビーアーマー +--Heavy Mech Support Armor local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)) diff --git a/official/c39892082.lua b/official/c39892082.lua index 606ec59b86..cce97cdb57 100644 --- a/official/c39892082.lua +++ b/official/c39892082.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_COUNTER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.addccon) @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.addccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,4 +64,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c3989465.lua b/official/c3989465.lua index a2a1111db6..db67758e58 100644 --- a/official/c3989465.lua +++ b/official/c3989465.lua @@ -1,4 +1,5 @@ --ラヴァルバル・イグニス +--Lavalval Ignis local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -27,7 +28,7 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c39897277.lua b/official/c39897277.lua index 4d91318a41..c3d462b725 100644 --- a/official/c39897277.lua +++ b/official/c39897277.lua @@ -1,4 +1,5 @@ --エルフの光 +--Elf's Light local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-200) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c39900763.lua b/official/c39900763.lua index 914d3a96a6..37bef392e3 100644 --- a/official/c39900763.lua +++ b/official/c39900763.lua @@ -1,4 +1,5 @@ --異次元の邂逅 +--Different Dimension Encounter local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c39905966.lua b/official/c39905966.lua index 8975a3543b..58a0a570ac 100644 --- a/official/c39905966.lua +++ b/official/c39905966.lua @@ -1,4 +1,5 @@ --リチュア・マーカー +--Gishki Marker local s,id=GetID() function s.initial_effect(c) --salvage @@ -18,9 +19,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.filter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand() + return c:IsSetCard(SET_GISHKI) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,4 +36,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c39910367.lua b/official/c39910367.lua index fc050a0bc7..b68523b18c 100644 --- a/official/c39910367.lua +++ b/official/c39910367.lua @@ -48,7 +48,7 @@ s.counter_place_list={COUNTER_SPELL} function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and rc~=c then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and rc~=c then c:AddCounter(COUNTER_SPELL,1) end end diff --git a/official/c39913299.lua b/official/c39913299.lua index 0318013ef3..5c8e2434e7 100644 --- a/official/c39913299.lua +++ b/official/c39913299.lua @@ -57,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DisableShuffleCheck() Duel.SendtoGrave(tc,REASON_EFFECT|REASON_EXCAVATE) end -end +end \ No newline at end of file diff --git a/official/c39915560.lua b/official/c39915560.lua index a0e5a0e6c1..cbbe21a2a0 100644 --- a/official/c39915560.lua +++ b/official/c39915560.lua @@ -1,5 +1,5 @@ --スターヴ・ヴェノム・プレデター・フュージョン・ドラゴン ---Starving Venom Predator Fusion Dragon +--Starving Venom Predapower Fusion Dragon --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetCondition(s.negcon) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) - c:RegisterEffect(e1) + c:RegisterEffect(e1) --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -33,7 +33,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.counter_list={COUNTER_PREDATOR} -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.mfilter(c,sc,st,tp) return c:IsAttribute(ATTRIBUTE_DARK,sc,st,tp) and c:IsType(TYPE_FUSION,sc,st,tp) end @@ -56,7 +56,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) and rp==1-tp + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and rp==1-tp end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c39943352.lua b/official/c39943352.lua index b60ed495c2..52db0eb866 100644 --- a/official/c39943352.lua +++ b/official/c39943352.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.dxmcostgen(1,1)) + e2:SetCost(Cost.Detach(1,1)) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) diff --git a/official/c39956951.lua b/official/c39956951.lua index 681403ee5b..7c81ccd45f 100644 --- a/official/c39956951.lua +++ b/official/c39956951.lua @@ -1,4 +1,5 @@ --封魔一閃 +--Flash of the Forbidden Spell local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39964797.lua b/official/c39964797.lua index 30bdbf9299..c7af99217c 100644 --- a/official/c39964797.lua +++ b/official/c39964797.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetCondition(s.sccon) e1:SetTarget(s.sctg) e1:SetOperation(s.scop) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} function s.sccon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)==0 and Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) @@ -51,10 +51,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xea) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTRON) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end diff --git a/official/c39972129.lua b/official/c39972129.lua index 52f4a16ec0..6f97a51515 100644 --- a/official/c39972129.lua +++ b/official/c39972129.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,10 +31,6 @@ function s.initial_effect(c) end s.listed_names={39972130} s.xyz_number=64 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,-2,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end @@ -53,11 +49,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) Duel.SpecialSummonComplete() end end function s.indcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c39973386.lua b/official/c39973386.lua index eaf978b346..50d78a9613 100644 --- a/official/c39973386.lua +++ b/official/c39973386.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) @@ -80,7 +80,7 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) - if #tg~=2 or Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)~=2 then return end + if #tg~=2 or Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT)~=2 then return end local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) @@ -88,4 +88,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39978267.lua b/official/c39978267.lua index 604ff5cbd8..fdd69de48d 100644 --- a/official/c39978267.lua +++ b/official/c39978267.lua @@ -66,4 +66,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Equip 1 Equip Card on the field to this card Duel.Equip(tp,tc,c) end -end +end \ No newline at end of file diff --git a/official/c39980304.lua b/official/c39980304.lua index ce8d8bf4f2..bf60da88a7 100644 --- a/official/c39980304.lua +++ b/official/c39980304.lua @@ -19,7 +19,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHAIN_MATERIAL) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.chain_target) e1:SetOperation(s.chain_operation) e1:SetValue(aux.TRUE) @@ -43,10 +43,10 @@ function s.filter(c,e) end function s.chain_target(e,te,tp,value) if not value or value&SUMMON_TYPE_FUSION==0 then return Group.CreateGroup() end - if Duel.IsPlayerAffectedByEffect(tp,69832741) then - return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_DECK,0,nil,te) + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_DECK,0,nil,te) else - return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,nil,te) + return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND|LOCATION_DECK,0,nil,te) end end function s.chain_operation(e,te,tp,tc,mat,sumtype,sg,sumpos) @@ -56,10 +56,10 @@ function s.chain_operation(e,te,tp,tc,mat,sumtype,sg,sumpos) Duel.BreakEffect() if sg then sg:AddCard(tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TURN_SET),0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TURN_SET),0,1) else Duel.SpecialSummonStep(tc,sumtype,tp,tp,false,false,sumpos) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET,0,1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -83,4 +83,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39984786.lua b/official/c39984786.lua index 3ded82dcd8..d9fcc93685 100644 --- a/official/c39984786.lua +++ b/official/c39984786.lua @@ -15,7 +15,7 @@ function s.valcheck(e,c) local sp=false for tc in aux.Next(g) do if tc:IsRace(RACE_REPTILE) and not tc:IsType(TYPE_TOKEN) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END,0,1) sp=true end end @@ -31,7 +31,7 @@ function s.valcheck(e,c) e1:SetCountLimit(1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TURN_SET)+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TURN_SET)|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end end @@ -52,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c39987164.lua b/official/c39987164.lua index 9b733dcdc0..02d23276a9 100644 --- a/official/c39987164.lua +++ b/official/c39987164.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,10 +32,6 @@ end function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:IsAttackPos() and ec:IsType(TYPE_EFFECT) end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttackPos() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler() end @@ -80,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dt:IsRelateToBattle() then Duel.Destroy(dt,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c39987731.lua b/official/c39987731.lua index 604a721d7d..a7c796b19e 100644 --- a/official/c39987731.lua +++ b/official/c39987731.lua @@ -1,5 +1,5 @@ --脅威の人造人間-サイコ・ショッカー ---The Menacing Jinzo +--Jinzo the Machine Menace --Logical Nonsense --Substitute ID local s,id=GetID() @@ -20,10 +20,10 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_SSET+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMING_SSET|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.sscost) + e2:SetCost(Cost.SelfTribute) e2:SetCondition(s.sscon) e2:SetTarget(s.sstg) e2:SetOperation(s.ssop) @@ -33,7 +33,7 @@ end s.listed_names={id,CARD_JINZO} --If there is a face-up trap card on either field/in either GY function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsTrap),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsTrap),tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -53,17 +53,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(6) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end --Check if current phase is a main phase function s.sscon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() -end - --Tribute this card as cost -function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) end --Check for "Jinzo" function s.ssfilter(c,e,tp) @@ -72,14 +67,14 @@ end --Activation legality function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end --Special summon "Jinzo" from hand or GY, then you can destroy all of opponent's traps function s.ssop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ssfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.ssfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and #dg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c39996157.lua b/official/c39996157.lua index cd689ca70c..69d07e294e 100644 --- a/official/c39996157.lua +++ b/official/c39996157.lua @@ -1,8 +1,9 @@ --機械天使の儀式 +--Machine Angel Ritual local s,id=GetID() function s.initial_effect(c) --Activate - Ritual.AddProcGreater(c,aux.FilterBoolFunction(Card.IsSetCard,0x2093)) + Ritual.AddProcGreater(c,aux.FilterBoolFunction(Card.IsSetCard,SET_CYBER_ANGEL)) --destroy replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -13,10 +14,10 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x2093} +s.listed_series={SET_CYBER_ANGEL} function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_LIGHT) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -27,4 +28,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c39998992.lua b/official/c39998992.lua index ec842cd1d0..a444e0becc 100644 --- a/official/c39998992.lua +++ b/official/c39998992.lua @@ -38,14 +38,14 @@ function s.initial_effect(c) e5:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) c:RegisterEffect(e5) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_KRAWLER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -72,5 +72,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.indtg(e,c) - return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x104) -end + return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(SET_KRAWLER) +end \ No newline at end of file diff --git a/official/c40003819.lua b/official/c40003819.lua index 836b8d79a3..38b670eeff 100644 --- a/official/c40003819.lua +++ b/official/c40003819.lua @@ -8,12 +8,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.FilterBoolFunction(Card.IsLinkMonster),Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) end \ No newline at end of file diff --git a/official/c40012727.lua b/official/c40012727.lua index 98506e2014..ea4897d3dd 100644 --- a/official/c40012727.lua +++ b/official/c40012727.lua @@ -1,4 +1,5 @@ --バスター・スラッシュ +--Assault Slash local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x104f} +s.listed_series={SET_ASSAULT_MODE} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x104f) + return c:IsFaceup() and c:IsSetCard(SET_ASSAULT_MODE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -27,4 +28,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40028305.lua b/official/c40028305.lua index e75b652402..67d86a8961 100644 --- a/official/c40028305.lua +++ b/official/c40028305.lua @@ -1,4 +1,5 @@ --超重武者装留シャイン・クロー +--Superheavy Samurai Soulclaw local s,id=GetID() function s.initial_effect(c) --equip @@ -6,14 +7,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end @@ -36,7 +37,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -44,7 +45,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) @@ -52,7 +53,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_EQUIP) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) e4:SetValue(1) c:RegisterEffect(e4) local e5=Effect.CreateEffect(c) @@ -62,7 +63,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e5:SetCountLimit(1,id) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e5) end function s.eqlimit(e,c) @@ -77,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c40048324.lua b/official/c40048324.lua index 04876f1c23..b10300bfb5 100644 --- a/official/c40048324.lua +++ b/official/c40048324.lua @@ -1,4 +1,5 @@ --アーケイン・ファイロ +--Arcane Apprentice local s,id=GetID() function s.initial_effect(c) --search @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c40061558.lua b/official/c40061558.lua index bb878816fc..0b61b6c0d0 100644 --- a/official/c40061558.lua +++ b/official/c40061558.lua @@ -1,4 +1,5 @@ --アポクリフォート・カーネル +--Apoqliphort Skybase local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -36,15 +37,15 @@ function s.initial_effect(c) e6:SetOperation(s.ctop) c:RegisterEffect(e6) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.tlimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.efilter(e,te) - if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true + if te:IsSpellTrapEffect() then return true else return aux.qlifilter(e,te) end end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -59,4 +60,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c4008212.lua b/official/c4008212.lua index 2df2d0567c..f30d93ca18 100644 --- a/official/c4008212.lua +++ b/official/c4008212.lua @@ -22,15 +22,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc008} -s.listed_names={76263644,id} +s.listed_series={SET_DESTINY_HERO} +s.listed_names={76263644,id} --"Destiny End Dragoon" function s.tgfilter(c) - return c:IsFaceup() and c:IsCode(76263644) or (c:IsLevelAbove(8) and c:IsSetCard(0xc008)) + return c:IsFaceup() and c:IsCode(76263644) or (c:IsLevelAbove(8) and c:IsSetCard(SET_DESTINY_HERO)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) end @@ -48,19 +48,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_M1) e1:SetTargetRange(0,1) - if Duel.IsTurnPlayer(1-tp) and Duel.GetCurrentPhase()==PHASE_MAIN1 then + if Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_MAIN1) then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(function(e) return Duel.GetTurnCount()~=e:GetLabel() end) - e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_MAIN1|RESET_OPPO_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_MAIN1|RESET_OPPO_TURN,1) end Duel.RegisterEffect(e1,tp) end end function s.thfilter(c) if not (c:IsSpellTrap() and c:IsAbleToHand()) then return false end - return not c:IsCode(id) and (c:ListsCode(76263644) or c:ListsCodeWithArchetype(0xc008)) + return not c:IsCode(id) and (c:ListsCode(76263644) or c:ListsCodeWithArchetype(SET_DESTINY_HERO)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c40089744.lua b/official/c40089744.lua index cb611ac69c..56c6364373 100644 --- a/official/c40089744.lua +++ b/official/c40089744.lua @@ -31,10 +31,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x10cf,0xbd} +s.listed_series={SET_BLACK_LUSTER_SOLDIER,SET_GAIA_THE_FIERCE_KNIGHT} s.counter_place_list={COUNTER_SPELL} function s.filter(c) - return ((c:IsSetCard(0x10cf) and c:IsType(TYPE_RITUAL)) or c:IsSetCard(0xbd)) and c:IsMonster() and c:IsAbleToHand() + return ((c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and c:IsType(TYPE_RITUAL)) or c:IsSetCard(SET_GAIA_THE_FIERCE_KNIGHT)) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsMonster() and c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) + return c:IsMonster() and c:IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end function s.acop(e,tp,eg,ep,ev,re,r,rp) local ct=eg:FilterCount(s.cfilter,nil) @@ -63,7 +63,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,COUNTER_SPELL,3,REASON_COST) end function s.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c40101111.lua b/official/c40101111.lua index b0feae7a9f..0f1900317b 100644 --- a/official/c40101111.lua +++ b/official/c40101111.lua @@ -1,4 +1,5 @@ --アルティメットサイキッカー +--Ultimate Axon Kicker local s,id=GetID() function s.initial_effect(c) --fusion material @@ -61,4 +62,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40110009.lua b/official/c40110009.lua index fd2f1e3099..e05050c71e 100644 --- a/official/c40110009.lua +++ b/official/c40110009.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x133) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DRAGONMAID) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) and chkc~=e:GetHandler() end @@ -38,4 +38,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c40133511.lua b/official/c40133511.lua index 0cb43a15d1..9f6153b27d 100644 --- a/official/c40133511.lua +++ b/official/c40133511.lua @@ -1,4 +1,5 @@ --魂を喰らう者 バズー +--Bazoo the Soul-Eater local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,9 +17,9 @@ function s.cfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,3,e:GetHandler()) + local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,3,e:GetHandler()) Duel.Remove(cg,POS_FACEUP,REASON_COST) e:SetLabel(#cg) end @@ -30,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(count*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c40139997.lua b/official/c40139997.lua index c1c6b0d2d9..69e406dc5d 100644 --- a/official/c40139997.lua +++ b/official/c40139997.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c40140448.lua b/official/c40140448.lua index 55ecefc197..df46704ece 100644 --- a/official/c40140448.lua +++ b/official/c40140448.lua @@ -37,20 +37,20 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={40140448} -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} --no attack function s.atcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x137),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end --search function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) - return not c:IsCode(id) and c:IsSetCard(0x137) and c:IsMonster() and c:IsAbleToHand() + return not c:IsCode(id) and c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -68,7 +68,7 @@ end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsSetCard(0x137) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c and rc:IsSetCard(SET_ANCIENT_WARRIORS) and rc:IsControler(tp) end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -82,4 +82,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40155014.lua b/official/c40155014.lua index 37081a3dc6..533dd4aaa3 100644 --- a/official/c40155014.lua +++ b/official/c40155014.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c40159926.lua b/official/c40159926.lua index d27324f86d..ec76464bf5 100644 --- a/official/c40159926.lua +++ b/official/c40159926.lua @@ -1,6 +1,5 @@ --ミラー・リゾネーター --Mirror Resonator - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -8,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) e1:SetTarget(s.target) @@ -44,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -66,9 +65,9 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_LEVEL) e1:SetValue(tc:GetOriginalLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,tc:GetOriginalLevel()) - --c:SetHint(CHINT_NUMBER,tc:GetOriginalLevel(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + c:RegisterFlagEffect(0,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,tc:GetOriginalLevel()) + --c:SetHint(CHINT_NUMBER,tc:GetOriginalLevel(),RESETS_STANDARD_PHASE_END) end end \ No newline at end of file diff --git a/official/c40160226.lua b/official/c40160226.lua index f471dd99d8..e437fdc8fc 100644 --- a/official/c40160226.lua +++ b/official/c40160226.lua @@ -1,4 +1,5 @@ --機海竜プレシオン +--Mecha Sea Dragon Plesion local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -51,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40164421.lua b/official/c40164421.lua index 9d8ae51faa..8a1612f5df 100644 --- a/official/c40164421.lua +++ b/official/c40164421.lua @@ -1,4 +1,5 @@ --ライトロード・メイデン ミネルバ +--Minerva, Lightsworn Maiden local s,id=GetID() function s.initial_effect(c) --search @@ -33,9 +34,9 @@ function s.initial_effect(c) e3:SetOperation(s.disop2) c:RegisterEffect(e3) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.cfilter(c) - return c:IsSetCard(0x38) and c:IsMonster() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.thfilter(c,lv) return c:IsLevelBelow(lv) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() @@ -59,7 +60,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) + return e:GetHandler():IsPreviousLocation(LOCATION_DECK|LOCATION_HAND) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -80,4 +81,4 @@ function s.distg2(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop2(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40172183.lua b/official/c40172183.lua index 1ebd87fa03..656e119886 100644 --- a/official/c40172183.lua +++ b/official/c40172183.lua @@ -1,4 +1,5 @@ --狭き通路 +--Narrow Pass local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sp,st) return Duel.GetFieldGroupCount(sp,LOCATION_MZONE,0)>=2 -end +end \ No newline at end of file diff --git a/official/c40173854.lua b/official/c40173854.lua index 55a0f4d81b..c3fe875962 100644 --- a/official/c40173854.lua +++ b/official/c40173854.lua @@ -1,7 +1,8 @@ --水陸両用バグロス +--Amphibious Bugroth local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,58314394,85448931) -end +end \ No newline at end of file diff --git a/official/c4017398.lua b/official/c4017398.lua index 0104e3d956..4d1a927285 100644 --- a/official/c4017398.lua +++ b/official/c4017398.lua @@ -1,5 +1,5 @@ --ゼアル・エントラスト ---ZEXAL Entrust +--Zexal Entrust --Logical Nonsense --Substitute ID local s,id=GetID() @@ -23,20 +23,19 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.thcon) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end --Lists "Utopia", "ZW -", "ZS -", and "ZEXAL" archetypes -s.listed_series={0x107f,0x7e,0x107e,0x207e} +s.listed_series={SET_UTOPIA,SET_ZEXAL,SET_ZW,SET_ZS} --Specifically lists itself s.listed_names={id} - --Check for a "Utopia", "ZW -", or "ZS -" monster function s.ssfilter(c,ft,e,tp) - return (c:IsSetCard(0x107f) or c:IsSetCard(0x107e) or c:IsSetCard(0x207e)) and c:IsMonster() and ((ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)) or c:IsAbleToHand()) + return (c:IsSetCard(SET_UTOPIA) or c:IsSetCard(SET_ZW) or c:IsSetCard(SET_ZS)) and c:IsMonster() and ((ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)) or c:IsAbleToHand()) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -72,7 +71,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end --Check for "ZEXAL" spell/trap, except "ZEXAL Entrust" function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x7e) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_ZEXAL) and not c:IsCode(id) and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -88,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40177746.lua b/official/c40177746.lua index 7feb05ef08..72c87e87d9 100644 --- a/official/c40177746.lua +++ b/official/c40177746.lua @@ -1,5 +1,5 @@ --イーバ ---EBE +--Eva --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -23,12 +23,12 @@ function s.filter(c) return c:IsLevelBelow(2) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil) local ct=math.min(2,dg:GetClassCount(Card.GetCode)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,ct,e:GetHandler()) + local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,ct,e:GetHandler()) local rc=Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.SetTargetParam(rc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,rc,tp,LOCATION_DECK) @@ -45,4 +45,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) -end +end \ No newline at end of file diff --git a/official/c4019153.lua b/official/c4019153.lua index 7b6b7774bd..7c935259b1 100644 --- a/official/c4019153.lua +++ b/official/c4019153.lua @@ -19,29 +19,29 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x14b} +s.listed_series={SET_NUMERON} s.xyz_number=4 function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsStatus(STATUS_OPPO_BATTLE) and c:IsRelateToBattle() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,nil) for tc in g:Iter() do --Double ATK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c40204620.lua b/official/c40204620.lua index 8397878053..9c7a8d82f3 100644 --- a/official/c40204620.lua +++ b/official/c40204620.lua @@ -28,7 +28,7 @@ function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESETS_STANDARD_PHASE_END,0,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) end @@ -40,9 +40,8 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetOriginalLevel()*2) tc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c40213117.lua b/official/c40213117.lua index 6115599f18..4647a58edb 100644 --- a/official/c40213117.lua +++ b/official/c40213117.lua @@ -1,4 +1,5 @@ --魔導弓士 ラムール +--Amores of Prophecy local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cffilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and not c:IsPublic() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and not c:IsPublic() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,1,nil) end @@ -39,4 +40,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40216089.lua b/official/c40216089.lua index a0edfcc1b5..9196fb0792 100644 --- a/official/c40216089.lua +++ b/official/c40216089.lua @@ -37,10 +37,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x51} +s.listed_series={SET_GADGET} function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.spfilter(c,e,tp,zone) return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) @@ -65,7 +65,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x51) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GADGET) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40217358.lua b/official/c40217358.lua index 8c47158304..25a7502540 100644 --- a/official/c40217358.lua +++ b/official/c40217358.lua @@ -48,10 +48,10 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local sg=g:RandomSelect(p,1) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) local tc=sg:GetFirst() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) @@ -68,4 +68,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end e:Reset() -end +end \ No newline at end of file diff --git a/official/c40225398.lua b/official/c40225398.lua index 67fa27f978..4c3a373ecd 100644 --- a/official/c40225398.lua +++ b/official/c40225398.lua @@ -1,4 +1,5 @@ --ツイン・ブレイカー +--Twin-Sword Marauder local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetAttacker()==c and bc and (bc:GetBattlePosition()&POS_DEFENSE)~=0 and c:IsRelateToBattle() and c:CanChainAttack() then Duel.ChainAttack() end -end +end \ No newline at end of file diff --git a/official/c40227329.lua b/official/c40227329.lua index 169b8370d9..c3e7b76b6a 100644 --- a/official/c40227329.lua +++ b/official/c40227329.lua @@ -59,12 +59,12 @@ function s.initial_effect(c) e7:SetValue(1) c:RegisterEffect(e7) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.damval(e,re,val,r,rp,rc) local c=e:GetHandler() local tp=e:GetHandlerPlayer() if r&REASON_EFFECT~=0 and Duel.GetFlagEffect(tp,id)==0 then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return 0 end return val @@ -74,7 +74,7 @@ function s.ntcon(e,c,minc) return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.nttg(e,c) - return c:IsLevelAbove(5) and c:IsSetCard(0xaf) + return c:IsLevelAbove(5) and c:IsSetCard(SET_DD) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,false,nil,e:GetHandler()) end @@ -116,11 +116,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) elseif op==2 then --Opponent cannot activate cards or effects in S/T zones - Duel.RegisterFlagEffect(1-tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(1-tp,id+1,RESET_PHASE|PHASE_END,0,1) aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,6),nil) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -128,11 +128,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetTargetRange(0,1) e2:SetValue(s.aclimit1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) elseif op==3 then --Opponent cannot activate effects in hand or GY - Duel.RegisterFlagEffect(1-tp,id+2,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(1-tp,id+2,RESET_PHASE|PHASE_END,0,1) aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,7),nil) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -140,7 +140,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetTargetRange(0,1) e3:SetValue(s.aclimit2) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end @@ -155,7 +155,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(lp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.aclimit1(e,re,tp) @@ -164,5 +164,5 @@ function s.aclimit1(e,re,tp) end function s.aclimit2(e,re,tp) local rc=re:GetHandler() - return rc and rc:IsLocation(LOCATION_HAND+LOCATION_GRAVE) -end + return rc and rc:IsLocation(LOCATION_HAND|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c4022819.lua b/official/c4022819.lua index 6854a03f81..fa9d07be6f 100644 --- a/official/c4022819.lua +++ b/official/c4022819.lua @@ -1,101 +1,109 @@ --聖刻龍-アセトドラゴン +--Hieratic Dragon of Eset local s,id=GetID() function s.initial_effect(c) - --summon with no tribute + --You can Normal Summon this card without Tributing, but its original ATK becomes 1000 local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SUMMON_PROC) e1:SetCondition(s.ntcon) e1:SetOperation(s.ntop) c:RegisterEffect(e1) - --lvchange + --The Levels of all face-up "Hieratic" monsters currently on the field become the Level of 1 face-up Dragon Normal Monster on the field local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCategory(CATEGORY_LVCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) - --spsummon + --Special Summon 1 Dragon Normal Monster from your hand, Deck, or GY, and make its ATK/DEF 0 local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCode(EVENT_RELEASE) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.ntcon(e,c,minc) if c==nil then return true end - return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 + return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) - --change base attack + --Its original ATK becomes 1000 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetRange(LOCATION_MZONE) e1:SetValue(1000) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) end function s.lvfilter(c) - return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) + return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsFaceup() + and Duel.IsExistingMatchingCard(s.hieraticfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetLevel()) +end +function s.hieraticfilter(c,lv) + return c:IsSetCard(SET_HIERATIC) and c:HasLevel() and c:IsFaceup() and not c:IsLevel(lv) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) -end -function s.lvfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x69) and not c:IsType(TYPE_XYZ) + local tc=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + local g=Duel.GetMatchingGroup(s.hieraticfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetLevel()) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,tc:GetLevel()) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end - local g=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,tc) - local lc=g:GetFirst() + local g=Duel.GetMatchingGroup(s.hieraticfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetLevel()) + if #g==0 then return end + local c=e:GetHandler() local lv=tc:GetLevel() - while lc~=nil do - local e1=Effect.CreateEffect(e:GetHandler()) + for lc in g:Iter() do + --Their Levels become the Level of that monster + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) lc:RegisterEffect(e1) - lc=g:GetNext() end end -function s.spfilter(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then + --Its ATK/DEF become 0 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - tc:RegisterEffect(e1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) - tc:RegisterEffect(e2) + sc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end diff --git a/official/c40240595.lua b/official/c40240595.lua index bc5da2d5c6..72923eb6e3 100644 --- a/official/c40240595.lua +++ b/official/c40240595.lua @@ -1,5 +1,5 @@ --Cocoon of Evolution ---進化の繭 +--Cocoon of Evolution --fixed by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -34,7 +34,7 @@ end s.listed_names={58192742,id} function s.checkcon(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetCardTarget() - return Duel.GetTurnPlayer()==tp and g and g:IsExists(Card.IsCode,1,nil,58192742) + return Duel.IsTurnPlayer(tp) and g and g:IsExists(Card.IsCode,1,nil,58192742) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -80,14 +80,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --equip effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_SET_BASE_DEFENSE) diff --git a/official/c40251688.lua b/official/c40251688.lua index 029a146020..c0a57b3358 100644 --- a/official/c40251688.lua +++ b/official/c40251688.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetOperation(s.regop) c:RegisterEffect(e1) --Equip itself from GY to 1 warrior monster @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function() return Duel.IsMainPhase() end) e2:SetTarget(s.equiptg) @@ -43,7 +43,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.tgfilter(c) @@ -88,7 +88,7 @@ function s.equipop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(e,c) return c==e:GetLabelObject() end) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -97,7 +97,7 @@ function s.equipop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c40252269.lua b/official/c40252269.lua index 274c26a13e..b9de385a60 100644 --- a/official/c40252269.lua +++ b/official/c40252269.lua @@ -1,4 +1,5 @@ --魔術師の再演 +--Magician's Restage local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} s.listed_names={id} function s.spfilter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -49,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x98) and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MAGICIAN) and c:IsContinuousSpell() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c40253382.lua b/official/c40253382.lua index 58d10a2be4..8828f4bd49 100644 --- a/official/c40253382.lua +++ b/official/c40253382.lua @@ -1,4 +1,5 @@ --TG-SX1 +--TG-SX1 local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,17 +13,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.cfilter(c,tp) local rc=c:GetReasonCard() return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and rc:IsSetCard(0x27) and rc:IsControler(tp) and rc:IsRelateToBattle() + and rc:IsSetCard(SET_TG) and rc:IsControler(tp) and rc:IsRelateToBattle() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TG) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c402568.lua b/official/c402568.lua index ca47edd91d..bb2451d9f4 100644 --- a/official/c402568.lua +++ b/official/c402568.lua @@ -27,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c40267580.lua b/official/c40267580.lua index 8fbb3ae3db..697bc33fd5 100644 --- a/official/c40267580.lua +++ b/official/c40267580.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.reccon) @@ -43,19 +43,19 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) c:RegisterEffect(e2) end end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -67,4 +67,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40279770.lua b/official/c40279770.lua index 3df696ab85..55a1cd266d 100644 --- a/official/c40279770.lua +++ b/official/c40279770.lua @@ -1,4 +1,5 @@ --黒羽の導き +--Black Feather Beacon local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_EFFECT)~=0 end function s.filter(c,e,tp) - return c:IsSetCard(0x33) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLACKWING) and c:GetLevel()<=4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40318957.lua b/official/c40318957.lua index 37014e4c85..121925d746 100644 --- a/official/c40318957.lua +++ b/official/c40318957.lua @@ -1,4 +1,5 @@ --EMドクロバット・ジョーカー +--Performapal Skullcrobat Joker local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -22,10 +23,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x9f,0x98,0x99} +s.listed_series={SET_PERFORMAPAL,SET_MAGICIAN,SET_ODD_EYES} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x9f) or (c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(0x99) + return c:IsSetCard(SET_PERFORMAPAL) or (c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(SET_ODD_EYES) end function s.splimit(e,c,tp,sumtp,sumpos) return not s.filter(c) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM @@ -44,4 +45,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4031928.lua b/official/c4031928.lua index 8bce77c11d..645b53a50b 100644 --- a/official/c4031928.lua +++ b/official/c4031928.lua @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c40320754.lua b/official/c40320754.lua index 9bd130c702..56f5bb0200 100644 --- a/official/c40320754.lua +++ b/official/c40320754.lua @@ -1,4 +1,5 @@ --ロードポイズン +--Lord Poison local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40343749.lua b/official/c40343749.lua index 8e1d40bc0e..44e69ead73 100644 --- a/official/c40343749.lua +++ b/official/c40343749.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x80} +s.listed_series={SET_DUSTON} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsReason(REASON_BATTLE) then @@ -24,22 +24,22 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,c,e,tp) + return c:IsSetCard(SET_DUSTON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_HAND,0,1,c,e,tp) end function s.filter2(c,e,tp) - return c:IsSetCard(0x80) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) + return c:IsSetCard(SET_DUSTON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 - and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) - local g2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) + local g2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 or #g1<=0 or #g2<=0 then return end @@ -48,17 +48,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc repeat Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - sg1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + sg1=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) tc=sg1:GetFirst() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - sg2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + sg2=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) tc=sg2:GetFirst() Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) - g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) - g2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) + g2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) until not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 and #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3))) -end +end \ No newline at end of file diff --git a/official/c40348946.lua b/official/c40348946.lua index 2072c0d983..db98920bff 100644 --- a/official/c40348946.lua +++ b/official/c40348946.lua @@ -1,4 +1,5 @@ --ハイパー・シンクロン +--Hyper Synchron local s,id=GetID() function s.initial_effect(c) --atk change @@ -22,7 +23,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sync:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -30,9 +31,9 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetOperation(s.rmop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e2) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40350910.lua b/official/c40350910.lua index e79e4114ba..dcfe64a2b9 100644 --- a/official/c40350910.lua +++ b/official/c40350910.lua @@ -1,4 +1,5 @@ --おくびょうかぜ +--Timidity local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,9 +18,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetTarget(s.infilter) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.infilter(e,c) return c:IsFacedown() -end +end \ No newline at end of file diff --git a/official/c40352445.lua b/official/c40352445.lua index 59ac4217db..0ecadbd454 100644 --- a/official/c40352445.lua +++ b/official/c40352445.lua @@ -1,7 +1,6 @@ --凶導の白騎士 ---Dogmatika Albaz Knight +--White Knight of Dogmatika --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -61,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue((atk1+atk2)/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c40364916.lua b/official/c40364916.lua index dec004b1c9..972f9361d3 100644 --- a/official/c40364916.lua +++ b/official/c40364916.lua @@ -55,7 +55,7 @@ function s.ndisabop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ZOMBIE)) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -86,4 +86,4 @@ function s.rmvop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c40371092.lua b/official/c40371092.lua index f16acc5e3c..1fc8e21e82 100644 --- a/official/c40371092.lua +++ b/official/c40371092.lua @@ -1,4 +1,5 @@ --白夜の騎士ガイア +--Gaia, the Mid-Knight Sun local s,id=GetID() function s.initial_effect(c) --search @@ -54,9 +55,9 @@ function s.cfilter(c) and Duel.IsExistingTarget(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -71,8 +72,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetValue(-500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c40380686.lua b/official/c40380686.lua index d8113b9991..57e8c6650f 100644 --- a/official/c40380686.lua +++ b/official/c40380686.lua @@ -1,16 +1,16 @@ --- ドロゴン・ベビー --- Baby Mudragon --- Scripted by Hatter +--ドロゴン・ベビー +--Baby Mudragon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Can be treated as non-Tuner for a Synchro Summon + --Can be treated as non-Tuner for a Synchro Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_NONTUNER) e1:SetRange(LOCATION_MZONE) c:RegisterEffect(e1) - -- Change Type or Attribute of a Synchro Monster + --Change Type or Attribute of a Synchro Monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -49,7 +49,7 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) if not tc or not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end local op,decl=e:GetLabel() if op==0 and tc:IsDifferentRace(decl) then - -- Change monster type + --Change monster type local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) @@ -57,7 +57,7 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) elseif op==1 and tc:IsAttributeExcept(decl) then - -- Change attribute + --Change attribute local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) diff --git a/official/c40383551.lua b/official/c40383551.lua index 2abb7bfd48..5dc720f4d1 100644 --- a/official/c40383551.lua +++ b/official/c40383551.lua @@ -1,4 +1,5 @@ --大寒気 +--Cold Feet local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e1,p) --cannot set local e2=Effect.CreateEffect(e:GetHandler()) @@ -31,9 +32,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetTarget(aux.TRUE) - e2:SetReset(RESET_PHASE+PHASE_END,1) + e2:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e2,p) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end + return re:IsSpellTrapEffect() +end \ No newline at end of file diff --git a/official/c403847.lua b/official/c403847.lua index 751bf656d2..468e79268f 100644 --- a/official/c403847.lua +++ b/official/c403847.lua @@ -21,8 +21,8 @@ function s.tg(e,c) return c:IsRace(RACE_WARRIOR) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) + return c:IsFaceup() and c:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) end function s.val(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_MZONE,0,nil)*200 -end +end \ No newline at end of file diff --git a/official/c40384720.lua b/official/c40384720.lua index 3cfa6c7dc7..e824774fd2 100644 --- a/official/c40384720.lua +++ b/official/c40384720.lua @@ -32,4 +32,4 @@ function s.rdval(e,damp) else return -1 end -end +end \ No newline at end of file diff --git a/official/c40390147.lua b/official/c40390147.lua index ad947f874f..a47207e1d8 100644 --- a/official/c40390147.lua +++ b/official/c40390147.lua @@ -1,8 +1,9 @@ --輝光帝ギャラクシオン +--Starliege Lord Galaxion local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x55),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PHOTON),4,2) c:EnableReviveLimit() --spsummon local e1=Effect.CreateEffect(c) @@ -15,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x55} +s.listed_series={SET_PHOTON} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.spfilter(c,e,tp) return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -52,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40391316.lua b/official/c40391316.lua index 09ba7a13bd..86b8a30893 100644 --- a/official/c40391316.lua +++ b/official/c40391316.lua @@ -1,9 +1,10 @@ --おジャマ・ナイト +--Ojama Knight local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xf),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_OJAMA),2) --disable field local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -12,8 +13,8 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0xf} -s.material_setcode={0xf} +s.listed_series={SET_OJAMA} +s.material_setcode={SET_OJAMA} function s.disop(e,tp) local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0) if c==0 then return end @@ -23,4 +24,4 @@ function s.disop(e,tp) dis1=(dis1|dis2) end return dis1 -end +end \ No newline at end of file diff --git a/official/c40392714.lua b/official/c40392714.lua index 9d6049434f..207298eff5 100644 --- a/official/c40392714.lua +++ b/official/c40392714.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) e4:SetOperation(s.spop2) c:RegisterEffect(e4) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} s.listed_names={CARD_VIJAM,77387463} function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -123,4 +123,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end else return end -end +end \ No newline at end of file diff --git a/official/c40398073.lua b/official/c40398073.lua index 3bb8084170..db2d3e8b10 100644 --- a/official/c40398073.lua +++ b/official/c40398073.lua @@ -1,5 +1,5 @@ --オラゴンメイド・ナサリ ---Dragonmaid Nasary +--Nurse Dragonmaid local s,id=GetID() function s.initial_effect(c) --spsummon when summoned @@ -19,17 +19,17 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRAGONMAID) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -47,19 +47,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter2(c,e,tp) - return c:IsLevel(7) and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevel(7) and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c40410110.lua b/official/c40410110.lua index 45be4efab5..4ee234c370 100644 --- a/official/c40410110.lua +++ b/official/c40410110.lua @@ -1,4 +1,5 @@ --錬金生物 ホムンクルス +--Homunculus the Alchemic Being local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c40418351.lua b/official/c40418351.lua index 286fdf3999..ec4197a423 100644 --- a/official/c40418351.lua +++ b/official/c40418351.lua @@ -35,7 +35,7 @@ end function s.eqval(ec,c,tp) return ec:IsControler(tp) and ec:IsRace(RACE_DRAGON) end -s.material_setcode={0x93,0x4093} +s.material_setcode={SET_CYBER,SET_CYBERDARK} function s.equipop(c,e,tp,tc) local atk=tc:GetTextAttack() if atk<0 then atk=0 end @@ -44,13 +44,13 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(s.repval) tc:RegisterEffect(e3) end diff --git a/official/c4041838.lua b/official/c4041838.lua index 20bb0c4545..3cd96f2e4c 100644 --- a/official/c4041838.lua +++ b/official/c4041838.lua @@ -1,4 +1,5 @@ --忍者マスター SASUKE +--Ninja Grandmaster Sasuke local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,4 +23,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if d~=nil and d:IsRelateToBattle() and d:IsDefensePos() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40424929.lua b/official/c40424929.lua index f60bada23d..909dc3f710 100644 --- a/official/c40424929.lua +++ b/official/c40424929.lua @@ -1,4 +1,5 @@ --烈華砲艦ナデシコ +--Battlecruiser Dianthus local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.damcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) @@ -30,4 +27,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) Duel.Damage(p,ct*200,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40441990.lua b/official/c40441990.lua index 3abd18c65a..af5ecc8756 100644 --- a/official/c40441990.lua +++ b/official/c40441990.lua @@ -25,13 +25,13 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.cfilter(c) - return c:IsSetCard(0xfe) and c:IsDiscardable() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsDiscardable() end function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end @@ -45,12 +45,12 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_HAND,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_EXTRA_SET_COUNT) Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -64,6 +64,6 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetHandler():GetBattleTarget() if bc:IsRelateToBattle() then - Duel.SendtoDeck(bc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(bc,nil,SEQ_DECKTOP,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c40453765.lua b/official/c40453765.lua index 41dedfc0fa..e2d7fa1d50 100644 --- a/official/c40453765.lua +++ b/official/c40453765.lua @@ -1,4 +1,5 @@ --バーバリアン2号 +--Swamp Battleguard local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,4 +16,4 @@ function s.filter(c) end function s.value(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_MZONE,0,nil)*500 -end +end \ No newline at end of file diff --git a/official/c40460013.lua b/official/c40460013.lua index e789d0a016..d5f88b4636 100644 --- a/official/c40460013.lua +++ b/official/c40460013.lua @@ -1,4 +1,4 @@ --- +--炎魔の触媒 --Zalamander Catalyzer --Scripted by Hatter local s,id=GetID() diff --git a/official/c40465719.lua b/official/c40465719.lua index fefd19574c..851b3d8dd6 100644 --- a/official/c40465719.lua +++ b/official/c40465719.lua @@ -1,4 +1,5 @@ --凡人の施し +--Common Charity local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40473581.lua b/official/c40473581.lua index e61a5a1cd1..1ff5fc1a2c 100644 --- a/official/c40473581.lua +++ b/official/c40473581.lua @@ -15,4 +15,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c40493210.lua b/official/c40493210.lua index 1b3df88b2a..5b4c30fe33 100644 --- a/official/c40493210.lua +++ b/official/c40493210.lua @@ -1,9 +1,9 @@ --- 魔鍵錠-施- --- Magikey Locking --- Scripted by Hatter +--魔鍵錠-施- +--Magikey Locking +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,9 +16,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.costfilter(c) - return not c:IsType(TYPE_TOKEN) and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x167)) + return not c:IsType(TYPE_TOKEN) and (c:IsType(TYPE_NORMAL) or c:IsSetCard(SET_MAGIKEY)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,aux.ReleaseCheckMMZ,nil) end @@ -26,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsMonster() and c:HasLevel() and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x167)) + return c:IsMonster() and c:HasLevel() and (c:IsType(TYPE_NORMAL) or c:IsSetCard(SET_MAGIKEY)) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.rescon(sg,e,tp,mg) @@ -45,7 +45,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0) end function s.exfilter(c,sfunc) - return c:IsSetCard(0x167) and sfunc(c) + return c:IsSetCard(SET_MAGIKEY) and sfunc(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) @@ -75,4 +75,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c40502912.lua b/official/c40502912.lua index 187aff4bec..31461496cd 100644 --- a/official/c40502912.lua +++ b/official/c40502912.lua @@ -1,4 +1,5 @@ --幻奏の音女アリア +--Aria the Melodious Diva local s,id=GetID() function s.initial_effect(c) --cannot be target/battle indestructable @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MELODIOUS)) e1:SetCondition(s.tgcon) e1:SetValue(1) c:RegisterEffect(e1) @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) c:RegisterEffect(e2) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.tgcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) -end + return e:GetHandler():IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c40509732.lua b/official/c40509732.lua index 15db4a1be2..1d60b7da1d 100644 --- a/official/c40509732.lua +++ b/official/c40509732.lua @@ -60,12 +60,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -88,4 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40516623.lua b/official/c40516623.lua index 87bcb3fe54..d40e8bf188 100644 --- a/official/c40516623.lua +++ b/official/c40516623.lua @@ -53,4 +53,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40529384.lua b/official/c40529384.lua index 306b801758..f17df2b823 100644 --- a/official/c40529384.lua +++ b/official/c40529384.lua @@ -1,4 +1,5 @@ --エクスプロード・ウィング・ドラゴン +--Exploder Dragonwing local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c40542825.lua b/official/c40542825.lua index 35aa3295b2..f94281da68 100644 --- a/official/c40542825.lua +++ b/official/c40542825.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4055337.lua b/official/c4055337.lua index 55a09ad2ba..ca381008ee 100644 --- a/official/c4055337.lua +++ b/official/c4055337.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.atkcon1) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE) + e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) e3:SetCondition(s.atkcon2) c:RegisterEffect(e3) end @@ -38,8 +38,7 @@ function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) end function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) and aux.StatChangeDamageStepCondition() end function s.filter(c) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and not c:IsCode(id) and c:IsAbleToGrave() @@ -63,7 +62,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(lv*100) tc:RegisterEffect(e1) end @@ -74,10 +73,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c40555959.lua b/official/c40555959.lua index 64cb85bbe1..b60f3bf4c6 100644 --- a/official/c40555959.lua +++ b/official/c40555959.lua @@ -19,34 +19,34 @@ function s.initial_effect(c) e2:SetOperation(s.remop) c:RegisterEffect(e2) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.remcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xb),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_INFERNITY),tp,LOCATION_MZONE,0,1,nil) end function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil,tp,POS_FACEDOWN) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND) end function s.remop(e,tp,eg,ep,ev,re,r,rp) - if not (e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xb),tp,LOCATION_MZONE,0,1,nil)) then return end + if not (e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_INFERNITY),tp,LOCATION_MZONE,0,1,nil)) then return end local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil,tp,POS_FACEDOWN) if #g>0 then Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - if Duel.GetCurrentPhase()==PHASE_STANDBY then e1:SetLabel(Duel.GetTurnCount()) end + if Duel.IsPhase(PHASE_STANDBY) then e1:SetLabel(Duel.GetTurnCount()) end e1:SetLabelObject(g) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) - else e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) + else e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) g:KeepAlive() local tc=g:GetFirst() for tc in aux.Next(g) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end @@ -54,7 +54,7 @@ function s.retfilter(c) return c:GetFlagEffect(id)>0 end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() @@ -63,4 +63,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4058065.lua b/official/c4058065.lua index b470baa15d..631dbb5611 100644 --- a/official/c4058065.lua +++ b/official/c4058065.lua @@ -1,4 +1,5 @@ --ヴェルズ・サラマンドラ +--Evilswarm Salamandra local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,9 +17,9 @@ function s.cfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c40583194.lua b/official/c40583194.lua index 5598e488f1..4476a0e89e 100644 --- a/official/c40583194.lua +++ b/official/c40583194.lua @@ -1,4 +1,5 @@ --フォース・リゾネーター +--Force Resonator local s,id=GetID() function s.initial_effect(c) -- @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -30,7 +27,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -41,9 +38,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetTargetRange(0,0xff) e1:SetValue(s.etarget) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.etarget(e,re,c) return c:IsMonster() and (c:IsFaceup() or c:IsLocation(LOCATION_MZONE)) -end +end \ No newline at end of file diff --git a/official/c40591390.lua b/official/c40591390.lua index 664fa822c7..5335fd36f3 100644 --- a/official/c40591390.lua +++ b/official/c40591390.lua @@ -30,13 +30,13 @@ function s.initial_effect(c) e4:SetCode(EFFECT_SET_DEFENSE) c:RegisterEffect(e4) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} s.listed_names={75041269} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.desfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xc008) + return c:IsFacedown() or not c:IsSetCard(SET_DESTINY_HERO) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -45,7 +45,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,0,nil) @@ -63,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(e,c) - return c:IsFaceup() and c:IsSetCard(0xc008) + return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -72,7 +72,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.filter) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) @@ -81,13 +81,13 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.filter) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) + return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) end function s.val(e,c) local g=Duel.GetMatchingGroup(s.vfilter,c:GetControler(),LOCATION_MZONE,0,c) return g:GetSum(Card.GetBaseAttack) -end +end \ No newline at end of file diff --git a/official/c4059313.lua b/official/c4059313.lua index e41cce1a33..47ac509720 100644 --- a/official/c4059313.lua +++ b/official/c4059313.lua @@ -104,7 +104,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end diff --git a/official/c40597694.lua b/official/c40597694.lua index 8fc1764105..9fca6ebb37 100644 --- a/official/c40597694.lua +++ b/official/c40597694.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.fusfilter(c) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and not c:IsRace(RACE_ROCK) + return c:IsType(TYPE_FUSION) and c:IsSetCard(SET_GEM_KNIGHT) and not c:IsRace(RACE_ROCK) end function s.extrafil(e,tp,mg1) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil) @@ -46,11 +46,11 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) - e1:SetTarget(function(_,c) return not c:IsSetCard(0x1047) and c:IsLocation(LOCATION_EXTRA) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(function(_,c) return not c:IsSetCard(SET_GEM_KNIGHT) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check - aux.addTempLizardCheck(c,tp,function(_,c) return not c:IsSetCard(0x1047) end) + aux.addTempLizardCheck(c,tp,function(_,c) return not c:IsSetCard(SET_GEM_KNIGHT) end) end end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40605147.lua b/official/c40605147.lua index cfbeb4948f..9a142b5903 100644 --- a/official/c40605147.lua +++ b/official/c40605147.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -18,17 +18,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_SPSUMMON) e2:SetCondition(s.condition1) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(1500)) e2:SetTarget(s.target1) e2:SetOperation(s.activate1) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) + return re and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -53,4 +49,4 @@ end function s.activate1(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40607210.lua b/official/c40607210.lua index 0944c39dbd..4b947798e7 100644 --- a/official/c40607210.lua +++ b/official/c40607210.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,7 +27,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} - function s.cfilter(c,tp) return c:IsLevelAbove(5) and c:IsRace(RACE_ZOMBIE) and c:IsControler(tp) end @@ -36,10 +35,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return rc and rc:IsRace(RACE_ZOMBIE) and eg:IsExists(s.cfilter,1,nil,tp) and (re:GetCode()~=EFFECT_SPSUMMON_PROC or not rc:IsHasEffect(EFFECT_REVIVE_LIMIT)) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c40619741.lua b/official/c40619741.lua index 53f4eee238..0db55d00d1 100644 --- a/official/c40619741.lua +++ b/official/c40619741.lua @@ -1,4 +1,5 @@ --ヴァイロン・ソルジャー +--Vylon Soldier local s,id=GetID() function s.initial_effect(c) --pos @@ -26,4 +27,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c40619825.lua b/official/c40619825.lua index 64de0630c0..0ad60801c7 100644 --- a/official/c40619825.lua +++ b/official/c40619825.lua @@ -36,6 +36,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40633084.lua b/official/c40633084.lua index 086fb6b40c..b0e412d058 100644 --- a/official/c40633084.lua +++ b/official/c40633084.lua @@ -1,4 +1,4 @@ --- +--騎甲虫歩兵分隊 --Beetrooper Squad --scripted by pyrQ local s,id=GetID() @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={64213018} +s.listed_names={64213018} --"Beetrooper Token" function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(0) if chk==0 then return true end @@ -29,7 +29,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=0 then return false end return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,tp) - and Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,0x172,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) + and Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,SET_BEETROOPER,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local tg=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,tp) @@ -41,7 +41,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,0x172,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then return end + if not Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,SET_BEETROOPER,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then return end ft=math.min(ft,e:GetLabel()) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end if ft>1 then ft=Duel.AnnounceNumberRange(tp,1,ft) end @@ -52,4 +52,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end if #sg==0 then return end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c40633297.lua b/official/c40633297.lua index 204147966e..220ca6e02e 100644 --- a/official/c40633297.lua +++ b/official/c40633297.lua @@ -1,4 +1,5 @@ --シモッチによる副作用 +--Bad Reaction to Simochi local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetTargetRange(0,1) e2:SetValue(1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c40636712.lua b/official/c40636712.lua index 523271a730..7eafea7b68 100644 --- a/official/c40636712.lua +++ b/official/c40636712.lua @@ -1,12 +1,11 @@ --デストーイ・ハーケン・クラーケン --Frightfur Kraken - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc3),aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_EDGE_IMP),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL)) --Send 1 of opponent's monsters to GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -30,16 +29,15 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_POSITION) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.poscon) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0xc3,0xa9} -s.material_setcode={0xa9,0xc3} - +s.listed_series={SET_EDGE_IMP,SET_FLUFFAL} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsDirectAttacked() end --Cannot attack directly this turn @@ -48,7 +46,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c40640057.lua b/official/c40640057.lua index 01950f782c..62b983cdd1 100644 --- a/official/c40640057.lua +++ b/official/c40640057.lua @@ -9,16 +9,12 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCondition(s.con) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.op) c:RegisterEffect(e1) end function s.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetBattleDamage(tp)>0 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return Duel.IsTurnPlayer(1-tp) and Duel.GetBattleDamage(tp)>0 end function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -26,6 +22,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c4064256.lua b/official/c4064256.lua index bb70a98506..192e9abc6b 100644 --- a/official/c4064256.lua +++ b/official/c4064256.lua @@ -1,4 +1,5 @@ --アンデットワールド +--Zombie World local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,7 +11,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE) + e2:SetTargetRange(LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE) e2:SetCode(EFFECT_CHANGE_RACE) e2:SetValue(RACE_ZOMBIE) e2:SetTarget(s.tg) @@ -60,4 +61,4 @@ function s.val(e,c,re,chk) end function s.sumlimit(e,c,tp,sumtp) return sumtp&SUMMON_TYPE_TRIBUTE==SUMMON_TYPE_TRIBUTE and not c:IsRace(RACE_ZOMBIE) -end +end \ No newline at end of file diff --git a/official/c40659562.lua b/official/c40659562.lua index ae307f2328..76e8fc97f8 100644 --- a/official/c40659562.lua +++ b/official/c40659562.lua @@ -1,4 +1,5 @@ --守護者スフィンクス +--Guardian Sphinx local s,id=GetID() function s.initial_effect(c) --turn set @@ -23,7 +24,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -40,4 +41,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_MZONE,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40663548.lua b/official/c40663548.lua index 4973465051..e4cb2cc9c6 100644 --- a/official/c40663548.lua +++ b/official/c40663548.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.banop) c:RegisterEffect(e3) end -s.listed_series={0xc9} +s.listed_series={SET_AROMA} function s.atkcon(e) local tp=e:GetHandlerPlayer() return Duel.GetLP(tp)>Duel.GetLP(1-tp) @@ -69,7 +69,7 @@ end function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsAbleToRemove() and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) end if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0xc9),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_AROMA),tp,LOCATION_MZONE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) @@ -79,4 +79,4 @@ function s.banop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40666140.lua b/official/c40666140.lua index 500e2b648b..90e0058dcc 100644 --- a/official/c40666140.lua +++ b/official/c40666140.lua @@ -1,4 +1,5 @@ --極星霊リョースアールヴ +--Ljosalf of the Nordic Alfar local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.filter(c,e,tp) local lv=c:GetLevel() return c:IsFaceup() and lv>0 and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_HAND,0,1,nil,lv,e,tp) end function s.filter2(c,lv,e,tp) - return c:IsSetCard(0x42) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NORDIC) and c:GetLevel()<=lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -37,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40669071.lua b/official/c40669071.lua index 00fb19f939..2b218ec317 100644 --- a/official/c40669071.lua +++ b/official/c40669071.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.lzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.lzfilter(c) return c:GetSequence()>4 @@ -53,7 +53,7 @@ function s.lzop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabel(e:GetLabel()) e:GetHandler():RegisterEffect(e1) end diff --git a/official/c40672993.lua b/official/c40672993.lua index fdff8fe7fc..6a514234b7 100644 --- a/official/c40672993.lua +++ b/official/c40672993.lua @@ -1,4 +1,5 @@ --避雷神 +--Lightning Rod Lord local s,id=GetID() function s.initial_effect(c) --actlimit @@ -12,6 +13,6 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.actlimit(e,te,tp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 - and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) -end + return Duel.IsPhase(PHASE_MAIN1) + and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c40680521.lua b/official/c40680521.lua index 962090f034..13180e322d 100644 --- a/official/c40680521.lua +++ b/official/c40680521.lua @@ -109,7 +109,7 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) end function s.pencon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsSpecialSummoned() and c:IsReason(REASON_EFFECT) and c:IsReasonPlayer(1-tp) end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -120,4 +120,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c4068622.lua b/official/c4068622.lua index 2c3cc86cf9..8e81642a9c 100644 --- a/official/c4068622.lua +++ b/official/c4068622.lua @@ -38,7 +38,7 @@ function s.spfilter1(c,tp) return not c:IsType(TYPE_TUNER) end function s.spfilter2(c,tp) - return c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) + return c:IsSetCard(SET_BLACKWING) and c:IsType(TYPE_TUNER) end function s.spcon(e,c) if c==nil then return true end @@ -71,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.filter(c) - return c:IsSetCard(0x33) and c:IsAbleToRemove() + return c:IsSetCard(SET_BLACKWING) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end @@ -85,7 +85,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and c:IsFaceup() and c:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then local code=tc:GetOriginalCode() local ba=tc:GetBaseAttack() - local reset_flag=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END + local reset_flag=RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END c:CopyEffect(code, reset_flag, 1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c40695128.lua b/official/c40695128.lua index 95317e6577..e7bc2615d8 100644 --- a/official/c40695128.lua +++ b/official/c40695128.lua @@ -28,10 +28,10 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PREDRAW) e1:SetCondition(s.condition) e1:SetOperation(s.operation) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,1) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,2) - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,1),RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,2) + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,1),RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 diff --git a/official/c40702028.lua b/official/c40702028.lua index 5cc1eaf265..8f0d1f3c3c 100644 --- a/official/c40702028.lua +++ b/official/c40702028.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.damcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) diff --git a/official/c40703222.lua b/official/c40703222.lua index 423db5f833..c446280d7c 100644 --- a/official/c40703222.lua +++ b/official/c40703222.lua @@ -49,8 +49,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c40703393.lua b/official/c40703393.lua index 5daefda7a0..5a0c2bc045 100644 --- a/official/c40703393.lua +++ b/official/c40703393.lua @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4072687.lua b/official/c4072687.lua index 1e60987203..847f19eda8 100644 --- a/official/c4072687.lua +++ b/official/c4072687.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x12e} +s.listed_series={SET_FORTUNE_FAIRY} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x12e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FORTUNE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40732515.lua b/official/c40732515.lua index f4ffe0403d..a6a21e2e9e 100644 --- a/official/c40732515.lua +++ b/official/c40732515.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) e1:SetValue(1) @@ -92,7 +92,7 @@ function s.cfilter(c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -106,4 +106,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40736921.lua b/official/c40736921.lua index 4a59185282..d53a42285e 100644 --- a/official/c40736921.lua +++ b/official/c40736921.lua @@ -1,4 +1,5 @@ --心鎮壷のレプリカ +--Xing Zhen Hu Replica local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,4 +43,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(re) and tc and tc:IsFacedown() and tc:IsRelateToEffect(re) then c:SetCardTarget(tc) end -end +end \ No newline at end of file diff --git a/official/c40737112.lua b/official/c40737112.lua index 733d2f7c47..ff14cc11c7 100644 --- a/official/c40737112.lua +++ b/official/c40737112.lua @@ -1,4 +1,5 @@ --混沌の黒魔術師 +--Dark Magician of Chaos local s,id=GetID() function s.initial_effect(c) --summon success @@ -84,4 +85,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.recon(e) return e:GetHandler():IsFaceup() -end +end \ No newline at end of file diff --git a/official/c40740224.lua b/official/c40740224.lua index 73889bd3a8..4d9b26642e 100644 --- a/official/c40740224.lua +++ b/official/c40740224.lua @@ -1,20 +1,20 @@ --- クロス・キーパー --- Cross Keeper --- Scripted by Hatter +--クロス・キーパー +--Cross Keeper +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Draw + --Draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) @@ -24,38 +24,33 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.drcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x3008,0x1f} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} function s.spfilter(c,e,tp) - return (c:IsSetCard(0x3008) or c:IsSetCard(0x1f)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_ELEMENTAL_HERO) or c:IsSetCard(SET_NEO_SPACIAN)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if not sc then return end if sc:IsLocation(LOCATION_GRAVE) then if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - -- Negate its effects + --Negate its effects local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -68,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.drconfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_FUSION) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.drconfilter,1,nil,tp) diff --git a/official/c40771118.lua b/official/c40771118.lua index 019228c5e8..b1eecb6223 100644 --- a/official/c40771118.lua +++ b/official/c40771118.lua @@ -34,20 +34,20 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_DESTINY_BOARD} -s.listed_series={0x1c} +s.listed_series={SET_SPIRIT_MESSAGE} function s.filter(c) - return c:IsFaceup() and (c:IsCode(CARD_DESTINY_BOARD) or c:IsSetCard(0x1c)) + return c:IsFaceup() and (c:IsCode(CARD_DESTINY_BOARD) or c:IsSetCard(SET_SPIRIT_MESSAGE)) end function s.thfilter(c) return c:IsRace(RACE_FIEND) and c:IsMonster() and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,0,nil) - if chk==0 then return ct>0 and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chk==0 then return ct>0 and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ct,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -68,13 +68,13 @@ end function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.smfilter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end end function s.plop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_DARK_SANCTUARY) then return s.extraop(e,tp,eg,ep,ev,re,r,rp) end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.smfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.smfilter),tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) end @@ -82,9 +82,9 @@ end function s.extraop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.smfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.smfilter),tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil):GetFirst() if not tc then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp,181) + if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp,181) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)<1 or Duel.SelectYesNo(tp,aux.Stringid(CARD_DARK_SANCTUARY,0))) then @@ -98,14 +98,14 @@ function s.extraop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) tc:RegisterEffect(e1) --cannot be target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_IGNORE_BATTLE_TARGET) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() elseif Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then diff --git a/official/c40785230.lua b/official/c40785230.lua index f21121d8f2..7a156cff51 100644 --- a/official/c40785230.lua +++ b/official/c40785230.lua @@ -66,7 +66,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,3)) e5:SetCategory(CATEGORY_TOHAND|CATEGORY_SPECIAL_SUMMON) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -153,4 +153,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4081094.lua b/official/c4081094.lua index 4f0fc7b8eb..1d447647fb 100644 --- a/official/c4081094.lua +++ b/official/c4081094.lua @@ -1,4 +1,5 @@ --第二の棺 +--The Second Sarcophagus local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -9,4 +10,4 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c4081665.lua b/official/c4081665.lua index 3eb76c906a..4967ed9d6a 100644 --- a/official/c4081665.lua +++ b/official/c4081665.lua @@ -20,12 +20,12 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCountLimit(1,id) e2:SetCondition(s.damcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0xc6} +s.listed_series={SET_PERFORMAGE} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.cfilter(c) - return c:IsSetCard(0xc6) and c:IsMonster() + return c:IsSetCard(SET_PERFORMAGE) and c:IsMonster() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) and aux.damcon1(e,1-tp,eg,ep,ev,re,r,rp) @@ -60,4 +60,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4081825.lua b/official/c4081825.lua index bbd93705ef..385e539011 100644 --- a/official/c4081825.lua +++ b/official/c4081825.lua @@ -1,4 +1,5 @@ --カオス・インフィニティ +--Chaos Infinity local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.spfilter(c,e,tp) - return c:IsSetCard(0x13) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MEKLORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,0x11,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -26,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(g,POS_FACEUP_ATTACK) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=sg:GetFirst() if tc then Duel.BreakEffect() @@ -34,12 +35,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() local e3=Effect.CreateEffect(e:GetHandler()) @@ -47,11 +48,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetOperation(s.desop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetCountLimit(1) tc:RegisterEffect(e3) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40830387.lua b/official/c40830387.lua index 48121505c0..82fc5a242a 100644 --- a/official/c40830387.lua +++ b/official/c40830387.lua @@ -1,7 +1,8 @@ --古代の機械掌 +--Ancient Gear Fist local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x7)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR)) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) @@ -14,7 +15,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.descon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() local dt=nil @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dt:IsRelateToBattle() then Duel.Destroy(dt,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40838625.lua b/official/c40838625.lua index f5ff074678..850e89f22b 100644 --- a/official/c40838625.lua +++ b/official/c40838625.lua @@ -1,6 +1,5 @@ --砂塵のバリア -ダスト・フォース- --Quaking Mirror Force - local s,id=GetID() function s.initial_effect(c) --When opponent's monster declares an attack, change all of their attack position monsters to face-down defense position @@ -14,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsAttackPos() and c:IsCanTurnSet() @@ -36,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c40844552.lua b/official/c40844552.lua index 7e2856da88..7c394a37aa 100644 --- a/official/c40844552.lua +++ b/official/c40844552.lua @@ -15,12 +15,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={40844553} -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)<=1 end function s.cfilter(c) - return c:IsSetCard(0x42) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_NORDIC) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,2,nil) end @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c40854197.lua b/official/c40854197.lua index f6579eb7ee..dfa7c98572 100644 --- a/official/c40854197.lua +++ b/official/c40854197.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x8),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO),aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER)) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -31,8 +31,8 @@ function s.initial_effect(c) e3:SetValue(s.atkup) c:RegisterEffect(e3) end -s.listed_series={0x8} -s.material_setcode={0x8} +s.listed_series={SET_HERO} +s.material_setcode={SET_HERO} function s.atkfilter(c) return c:IsFaceup() and c:GetCode()~=id and c:IsAttribute(ATTRIBUTE_WATER) end @@ -50,4 +50,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40854824.lua b/official/c40854824.lua index fb60ab5c72..0bbdcd9375 100644 --- a/official/c40854824.lua +++ b/official/c40854824.lua @@ -14,16 +14,16 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end s.listed_names={79407975,79856792} -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.chainfilter(re,tp,cid) local rc=re:GetHandler() - return not (re:IsActiveType(TYPE_MONSTER) and rc:IsOriginalCodeRule(79407975,79856792)) + return not (re:IsMonsterEffect() and rc:IsOriginalCodeRule(79407975,79856792)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)~=0 end function s.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,nil,ft,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c40867519.lua b/official/c40867519.lua index d72b60093c..3634e09e7f 100644 --- a/official/c40867519.lua +++ b/official/c40867519.lua @@ -57,4 +57,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if tl==LOCATION_SZONE and re:IsActiveType(TYPE_CONTINUOUS) then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c40884383.lua b/official/c40884383.lua index f783df89e5..e9f4641452 100644 --- a/official/c40884383.lua +++ b/official/c40884383.lua @@ -32,4 +32,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Equip(tp,tc,c) end -end +end \ No newline at end of file diff --git a/official/c40894584.lua b/official/c40894584.lua index b80eb3f9f9..c0d9ceebbd 100644 --- a/official/c40894584.lua +++ b/official/c40894584.lua @@ -1,4 +1,5 @@ --ジゴバイト +--Jigabyte local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -29,7 +30,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) + return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end function s.filter(c,e,tp) return c:GetAttack()==1500 and c:GetDefense()==200 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40907115.lua b/official/c40907115.lua index 7dedc36011..a3e07f155e 100644 --- a/official/c40907115.lua +++ b/official/c40907115.lua @@ -1,4 +1,5 @@ --霊獣使い ウェン +--Ritual Beast Tamer Wen local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_RITUAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc,e,tp) end @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c40908371.lua b/official/c40908371.lua index 88de3dfe5d..63aa7b6784 100644 --- a/official/c40908371.lua +++ b/official/c40908371.lua @@ -1,6 +1,5 @@ --蒼眼の銀龍 --Azure-Eyes Silver Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) @@ -40,7 +39,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) --Cannot be targeted by card effects local e2=Effect.CreateEffect(c) @@ -48,12 +47,12 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c40916023.lua b/official/c40916023.lua index 00fa60c183..596beb8422 100644 --- a/official/c40916023.lua +++ b/official/c40916023.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.poscon) e2:SetTarget(s.postg) e2:SetOperation(s.posop) @@ -33,14 +33,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -56,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -72,7 +72,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c40921545.lua b/official/c40921545.lua index 6d3183c73a..92709a8bb0 100644 --- a/official/c40921545.lua +++ b/official/c40921545.lua @@ -9,17 +9,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) end diff --git a/official/c40933924.lua b/official/c40933924.lua index c89a03ceb2..016569f6f2 100644 --- a/official/c40933924.lua +++ b/official/c40933924.lua @@ -1,4 +1,5 @@ --黒蠍盗掘団 +--Dark Scorpion Burglars local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) diff --git a/official/c40937767.lua b/official/c40937767.lua index a8640d48b1..c6000c4cb5 100644 --- a/official/c40937767.lua +++ b/official/c40937767.lua @@ -1,4 +1,5 @@ --グレイヴ・オージャ +--Grave Ohja local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -37,4 +38,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c40939228.lua b/official/c40939228.lua index 0245fced45..30f8b2a323 100644 --- a/official/c40939228.lua +++ b/official/c40939228.lua @@ -101,7 +101,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)>0 then + if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY)>0 then --Return during the End Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -118,4 +118,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c40941889.lua b/official/c40941889.lua index ce7a66309e..c21c0c2204 100644 --- a/official/c40941889.lua +++ b/official/c40941889.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.eqcon) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) @@ -22,12 +22,12 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.eqcon(e) return e:GetHandler():CheckUniqueOnField(e:GetHandlerPlayer()) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -54,6 +54,6 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c40971261.lua b/official/c40971261.lua index 1bc8606aac..6f15e9d625 100644 --- a/official/c40971261.lua +++ b/official/c40971261.lua @@ -1,5 +1,5 @@ --亡龍の旋律 ---Lost Dragon's Strain +--Dirge of the Lost Dragon --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():GetCode()==e:GetLabelObject():GetLabel() then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) return true end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -63,7 +63,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_CARD,0,id) Duel.SetLP(rp,Duel.GetLP(rp)/2) - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -71,7 +71,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) @@ -82,5 +82,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end function s.indescond(e) return Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) -end - +end \ No newline at end of file diff --git a/official/c40975243.lua b/official/c40975243.lua index f7705d565f..d7097895cd 100644 --- a/official/c40975243.lua +++ b/official/c40975243.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.spfilter2(c,fg,minmat,maxmat) - return c:IsSetCard(0x14f) and c:IsLinkSummonable(nil,fg,minmat,maxmat) + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsLinkSummonable(nil,fg,minmat,maxmat) end function s.rescon(sg,e,tp,mg) return Duel.GetMatchingGroupCount(s.spfilter2,tp,LOCATION_EXTRA,0,nil,sg,#sg,#sg)>0 @@ -28,17 +28,17 @@ function s.filtercheck(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local fg=Duel.GetMatchingGroup(s.filtercheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) + local fg=Duel.GetMatchingGroup(s.filtercheck,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end if chk==0 then return ft>0 and Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_LINK)>0 and aux.SelectUnselectGroup(fg,e,tp,1,ft,s.rescon,0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local fg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filtercheck),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) + local fg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filtercheck),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) if ft<1 or not Duel.IsPlayerCanSpecialSummonCount(tp,2) then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local g=aux.SelectUnselectGroup(fg,e,tp,1,ft,s.rescon,1,tp,HINTMSG_SPSUMMON,s.rescon,nil,false) @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -63,4 +63,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sc=sg:GetFirst() Duel.LinkSummon(tp,sc,nil,g,#g,#g) end -end +end \ No newline at end of file diff --git a/official/c40975574.lua b/official/c40975574.lua index 346762a698..7108b4d4f7 100644 --- a/official/c40975574.lua +++ b/official/c40975574.lua @@ -1,4 +1,5 @@ --レッド・リゾネーター +--Red Resonator local s,id=GetID() function s.initial_effect(c) --spsummon @@ -53,4 +54,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c40991587.lua b/official/c40991587.lua index 1c5bceded0..5f73cc7ec1 100644 --- a/official/c40991587.lua +++ b/official/c40991587.lua @@ -1,6 +1,5 @@ --ワイト夫人 --The Lady in Wight - local s,id=GetID() function s.initial_effect(c) --Name becomes "Skull Servant" while in GY @@ -31,10 +30,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_SKULL_SERVANT} - function s.etarget(e,c) return c:GetCode()~=id and c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(3) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not te:GetHandler():IsCode(4064256) + return te:IsSpellTrapEffect() and not te:GetHandler():IsCode(4064256) end \ No newline at end of file diff --git a/official/c40998517.lua b/official/c40998517.lua index f89cfacb08..289fd413c8 100644 --- a/official/c40998517.lua +++ b/official/c40998517.lua @@ -18,9 +18,9 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.cfilter(c) - return c:IsSetCard(0x134) or c:IsRace(RACE_WARRIOR) + return c:IsSetCard(SET_GENERAIDER) or c:IsRace(RACE_WARRIOR) end function s.spcheck(sg,tp) return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,#sg,sg) @@ -49,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(1-tp,#g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c41002238.lua b/official/c41002238.lua index d3fbebb373..c254f6fafd 100644 --- a/official/c41002238.lua +++ b/official/c41002238.lua @@ -1,9 +1,9 @@ --- カイザー・グライダー-ゴルデン・バースト --- Kaiser Glider - Golden Burst --- scripted by Hatter +--カイザー・グライダー-ゴルデン・バースト +--Kaiser Glider - Golden Burst +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card from your hand + --Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Copy the targeted monster's ATK + --Copy the targeted monster's ATK local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -64,12 +64,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then - -- Change ATK + --Change ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c41006930.lua b/official/c41006930.lua index 235a92b86e..59ace76b77 100644 --- a/official/c41006930.lua +++ b/official/c41006930.lua @@ -1,4 +1,5 @@ --速攻の黒い忍者 +--Strike Ninja local s,id=GetID() function s.initial_effect(c) --remove @@ -18,9 +19,9 @@ function s.cfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -30,11 +31,11 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then - Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY) + Duel.Remove(c,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(c) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -43,4 +44,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c4103668.lua b/official/c4103668.lua index c42e85dbfe..bd39b37e03 100644 --- a/official/c4103668.lua +++ b/official/c4103668.lua @@ -1,5 +1,5 @@ --翼の魔妖-天狗 ---Winged Mayakashi - Tengu +--Tengu, the Winged Mayakashi local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -36,7 +36,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetPreviousLocation()==LOCATION_GRAVE end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end @@ -76,5 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c41039846.lua b/official/c41039846.lua index 5673d1dfb5..0db1fbf4f4 100644 --- a/official/c41039846.lua +++ b/official/c41039846.lua @@ -1,4 +1,5 @@ --カラスの巨群 +--Swarm of Crows local s,id=GetID() function s.initial_effect(c) --turn set @@ -30,7 +31,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -47,5 +48,5 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c41044418.lua b/official/c41044418.lua index 21bc0d734b..61368bfb06 100644 --- a/official/c41044418.lua +++ b/official/c41044418.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfToGrave) e3:SetOperation(s.operation) c:RegisterEffect(e3) end @@ -54,10 +54,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() --allow summon via monster reborn diff --git a/official/c41077745.lua b/official/c41077745.lua index 97143da640..6cc1e80052 100644 --- a/official/c41077745.lua +++ b/official/c41077745.lua @@ -1,4 +1,5 @@ --E・HERO アイスエッジ +--Elemental HERO Ice Edge local s,id=GetID() function s.initial_effect(c) --direct attack @@ -24,11 +25,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.datcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.datcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.datop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,7 +37,7 @@ function s.datop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -58,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41085464.lua b/official/c41085464.lua index 1d42d7f517..d94a3bbd7c 100644 --- a/official/c41085464.lua +++ b/official/c41085464.lua @@ -1,14 +1,15 @@ --- +--リブロマンサー・リライジング --Libromancer Bonded --scripted by Naim local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreater({handler=c,filter=s.ritualfil,stage2=s.stage2}) end -s.listed_series={0x17d} -s.fit_monster={88106656,45001322} +s.listed_series={SET_LIBROMANCER} +s.fit_monster={88106656,45001322} --"Libromancer Fireburst", "Libromancer Firestarter" +s.listed_names={88106656,45001322} --"Libromancer Fireburst", "Libromancer Firestarter" function s.ritualfil(c) - return c:IsSetCard(0x17d) and c:IsRitualMonster() + return c:IsSetCard(SET_LIBROMANCER) and c:IsRitualMonster() end function s.mfilter(c) return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousCodeOnField()==45001322 @@ -24,7 +25,7 @@ function s.stage2(mg,e,tp,eg,ep,ev,re,r,rp,tc) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) --Cannot be banished by effects local e2=Effect.CreateEffect(c) @@ -34,10 +35,10 @@ function s.stage2(mg,e,tp,eg,ep,ev,re,r,rp,tc) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(1,1) e2:SetTarget(s.rmlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end end function s.rmlimit(e,c,tp,r) return c==e:GetHandler() and r==REASON_EFFECT -end +end \ No newline at end of file diff --git a/official/c41089128.lua b/official/c41089128.lua index e667b18d32..1dfdd58f85 100644 --- a/official/c41089128.lua +++ b/official/c41089128.lua @@ -1,4 +1,5 @@ --炎を支配する者 +--Flame Ruler local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_FIRE) -end +end \ No newline at end of file diff --git a/official/c410904.lua b/official/c410904.lua index 6221408e2d..5c54989161 100644 --- a/official/c410904.lua +++ b/official/c410904.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetValue(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xa14d,0xc0} +s.listed_series={SET_SPIRITUAL_WIND_ART,SET_POSSESSED} function s.spfilter1(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() end @@ -100,7 +100,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsAbleToHand() and (c:IsSetCard(0xa14d) or (c:IsSetCard(0xc0) and c:IsSpellTrap())) + return c:IsAbleToHand() and (c:IsSetCard(SET_SPIRITUAL_WIND_ART) or (c:IsSetCard(SET_POSSESSED) and c:IsSpellTrap())) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -113,4 +113,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c41090784.lua b/official/c41090784.lua index 54332b3cb1..c130313926 100644 --- a/official/c41090784.lua +++ b/official/c41090784.lua @@ -1,4 +1,5 @@ --氷結界の大僧正 +--Dai-sojo of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --to defense @@ -19,11 +20,11 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ICE_BARRIER)) e3:SetValue(s.indval) c:RegisterEffect(e3) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return e:GetHandler():IsAttackPos() end Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) @@ -35,5 +36,5 @@ function s.poop(e,tp,eg,ep,ev,re,r,rp) end end function s.indval(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end + return re:IsSpellTrapEffect() +end \ No newline at end of file diff --git a/official/c41091257.lua b/official/c41091257.lua index 9fa19184ae..8714dee995 100644 --- a/official/c41091257.lua +++ b/official/c41091257.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0xee) + return re and re:GetHandler():IsSetCard(SET_SPYRAL) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end diff --git a/official/c41097056.lua b/official/c41097056.lua index d266c5499f..fc92487cb4 100644 --- a/official/c41097056.lua +++ b/official/c41097056.lua @@ -1,4 +1,5 @@ --シンクロ・クラッカー +--Synchro Cracker local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,8 +32,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local atk=tc:GetTextAttack() if atk<0 then atk=0 end - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,atk) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41098335.lua b/official/c41098335.lua index 0ce12c2eb1..c5af95fd8b 100644 --- a/official/c41098335.lua +++ b/official/c41098335.lua @@ -1,4 +1,5 @@ --ファイターズ・エイプ +--Ape Fighter local s,id=GetID() function s.initial_effect(c) --atkup @@ -28,13 +29,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if Duel.GetTurnPlayer()==tp and c:GetAttackedCount()==0 then + if Duel.IsTurnPlayer(tp) and c:GetAttackedCount()==0 then c:ResetEffect(RESET_DISABLE,RESET_EVENT) end -end +end \ No newline at end of file diff --git a/official/c41113025.lua b/official/c41113025.lua index 1447f9739e..73d278c92c 100644 --- a/official/c41113025.lua +++ b/official/c41113025.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.rmfilter(c) - return c:GetType()==TYPE_TRAP and c:IsAbleToRemove() + return c:IsNormalTrap() and c:IsAbleToRemove() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.rmfilter(chkc) end @@ -27,14 +27,14 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if tc:IsRelateToEffect(e) and tc:GetType()==TYPE_TRAP and Duel.Remove(tc,POS_FACEUP,REASON_COST)>0 + if tc:IsRelateToEffect(e) and tc:IsNormalTrap() and Duel.Remove(tc,POS_FACEUP,REASON_COST)>0 and c:IsFaceup() and c:IsRelateToEffect(e) then --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c41114306.lua b/official/c41114306.lua index 4a357eaf82..ba20b0f9b0 100644 --- a/official/c41114306.lua +++ b/official/c41114306.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} s.listed_names={CARD_VIJAM,78509901} function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -100,4 +100,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end else return end -end +end \ No newline at end of file diff --git a/official/c41128647.lua b/official/c41128647.lua index f836d4acca..5376bb3926 100644 --- a/official/c41128647.lua +++ b/official/c41128647.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd8)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DINOMIST)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -30,9 +30,9 @@ function s.initial_effect(c) e4:SetCondition(s.actcon) c:RegisterEffect(e4) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_DINOMIST) and c:IsControler(tp) end function s.actcon(e) local tp=e:GetHandlerPlayer() diff --git a/official/c41139112.lua b/official/c41139112.lua index 4da0540a2f..42989185a4 100644 --- a/official/c41139112.lua +++ b/official/c41139112.lua @@ -9,16 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.roll_dice=true -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter1(c) return c:IsSummonable(true,nil) end @@ -37,7 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local d=Duel.TossDice(tp,1) @@ -63,5 +59,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end - +end \ No newline at end of file diff --git a/official/c41141943.lua b/official/c41141943.lua index 636d227e8d..06cf1988b9 100644 --- a/official/c41141943.lua +++ b/official/c41141943.lua @@ -27,14 +27,14 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.hspcon(e,c) if c==nil then return true end @@ -53,19 +53,15 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) + return not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) end @@ -88,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41142615.lua b/official/c41142615.lua index 612451bbdc..7b41316f18 100644 --- a/official/c41142615.lua +++ b/official/c41142615.lua @@ -1,4 +1,5 @@ --陽気な葬儀屋 +--The Cheerful Coffin local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,5 +16,5 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,Card.IsMonster,1,3,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsMonster,1,3,REASON_EFFECT|REASON_DISCARD) end \ No newline at end of file diff --git a/official/c41147577.lua b/official/c41147577.lua index a4586ee482..1d104f3a86 100644 --- a/official/c41147577.lua +++ b/official/c41147577.lua @@ -1,4 +1,5 @@ --CX 風紀大宮司サイモン +--CXyz Simon the Great Moral Leader local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,22 +23,18 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1) e2:SetCondition(s.poscon) - e2:SetCost(s.poscost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end s.listed_names={14152862} function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,14152862) end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanChangePosition() end if chk==0 then return Duel.IsExistingTarget(Card.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end @@ -52,13 +49,13 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c41158734.lua b/official/c41158734.lua index 76ef3f5244..1b34aaa62c 100644 --- a/official/c41158734.lua +++ b/official/c41158734.lua @@ -1,4 +1,5 @@ --アポカテクイル +--Apocatequil local s,id=GetID() function s.initial_effect(c) --level change @@ -48,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41160533.lua b/official/c41160533.lua index a958eb6245..5e4b7449dd 100644 --- a/official/c41160533.lua +++ b/official/c41160533.lua @@ -1,4 +1,5 @@ --ローズ・テンタクルス +--Rose Tentacles local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -9,7 +10,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE_START+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE_START|PHASE_BATTLE_START) e2:SetRange(LOCATION_MZONE) e2:SetOperation(s.maop) c:RegisterEffect(e2) @@ -25,14 +26,14 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.maop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return end + if Duel.IsTurnPlayer(1-tp) then return end local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,0,LOCATION_MZONE,nil) if ct~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) e:GetHandler():RegisterEffect(e1) end end @@ -48,4 +49,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41160595.lua b/official/c41160595.lua index 84558928a3..2fd4886770 100644 --- a/official/c41160595.lua +++ b/official/c41160595.lua @@ -1,4 +1,5 @@ --コーリング・マジック +--Spell Calling local s,id=GetID() function s.initial_effect(c) --set @@ -14,11 +15,11 @@ function s.initial_effect(c) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&0x41)==0x41 and rp~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and c:IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and re:IsSpellTrapEffect() and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsSSetable() + return c:IsQuickPlaySpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -31,4 +32,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c41172955.lua b/official/c41172955.lua index 71adace911..d628b8a83f 100644 --- a/official/c41172955.lua +++ b/official/c41172955.lua @@ -1,4 +1,5 @@ --グリーン・ガジェット +--Green Gadget local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c41175645.lua b/official/c41175645.lua index 5fa99e3192..8fcbc91aac 100644 --- a/official/c41175645.lua +++ b/official/c41175645.lua @@ -52,7 +52,7 @@ function s.initial_effect(c) e5:SetOperation(s.spop2) c:RegisterEffect(e5) end -s.listed_series={0xe8} +s.listed_series={SET_SILENT_MAGICIAN} s.listed_names={id} function s.spcon(e,c) if c==nil then return true end @@ -77,7 +77,7 @@ function s.value(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*500 end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -95,19 +95,19 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsMonster() and c:IsSetCard(0xe8) and not c:IsCode(id) + return c:IsMonster() and c:IsSetCard(SET_SILENT_MAGICIAN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41181774.lua b/official/c41181774.lua index 81f42050db..541a6b2f1c 100644 --- a/official/c41181774.lua +++ b/official/c41181774.lua @@ -56,11 +56,11 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not g then return end local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local ct=sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==0 then return end local dg=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,ct) - local dt=Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + local dt=Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) local c=e:GetHandler() if dt~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then local e1=Effect.CreateEffect(c) diff --git a/official/c41182875.lua b/official/c41182875.lua index eb49bcc02e..9e8863294c 100644 --- a/official/c41182875.lua +++ b/official/c41182875.lua @@ -1,5 +1,6 @@ --ジャベリンビートルの契約 +--Javelin Beetle Pact local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,26932788) -end +end \ No newline at end of file diff --git a/official/c41197012.lua b/official/c41197012.lua index 464e70d4ee..3b10d87fa4 100644 --- a/official/c41197012.lua +++ b/official/c41197012.lua @@ -1,4 +1,5 @@ --スカーレッド・カーペット +--Red Carpet local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) end @@ -21,7 +22,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x57) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESONATOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -47,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg2=sg:Select(tp,ft,ft,nil) Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41201386.lua b/official/c41201386.lua index 6ad7046644..21c4dc65a0 100644 --- a/official/c41201386.lua +++ b/official/c41201386.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xba,0x95} +s.listed_series={SET_RAIDRAPTOR,SET_RANK_UP_MAGIC} s.listed_names={id} function s.filter1(c,e,tp) local rk=c:GetRank() @@ -34,7 +34,7 @@ function s.filter1(c,e,tp) end function s.filter2(c,e,tp,mc,rk) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(SET_RAIDRAPTOR) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -59,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsAbleToRemoveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() @@ -70,7 +70,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x95) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_RANK_UP_MAGIC) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41201555.lua b/official/c41201555.lua index d0c8cc37af..575ea3abf1 100644 --- a/official/c41201555.lua +++ b/official/c41201555.lua @@ -1,4 +1,5 @@ --コアキメイル・グラヴィローズ +--Koa'ki Meiru Gravirose local s,id=GetID() function s.initial_effect(c) --cost @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.condition) e2:SetTarget(s.target) e2:SetOperation(s.operation) @@ -26,7 +27,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -65,7 +66,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tgfilter(c) return c:IsLevelBelow(3) and c:IsAbleToGrave() @@ -80,4 +81,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41209827.lua b/official/c41209827.lua index d299c3f09d..a804c7c082 100644 --- a/official/c41209827.lua +++ b/official/c41209827.lua @@ -44,10 +44,10 @@ function s.ffilter(c,fc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsOnField() and not c:IsType(TYPE_TOKEN,fc,sumtype,tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsFaceup() + return c:IsSpecialSummoned() and c:IsFaceup() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,0,LOCATION_MZONE,1,nil) end @@ -63,7 +63,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -99,10 +99,10 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() end function s.desfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) end @@ -112,4 +112,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41215808.lua b/official/c41215808.lua index fc85d81c3c..ace601162e 100644 --- a/official/c41215808.lua +++ b/official/c41215808.lua @@ -1,5 +1,5 @@ --ふわんだりぃずと夢の町 ---Flundereeze and the City of Dreams +--Floowandereeze and the Dreaming Town --scripted by XyLeN local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCountLimit(1,id) e2:SetCondition(s.poscon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) @@ -34,19 +34,19 @@ function s.filter(c) return c:IsLevelBelow(4) and c:IsRace(RACE_WINGEDBEAST) and c:IsSummonable(true,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g>0 then Duel.Summon(tp,g:GetFirst(),true,nil) end end function s.poscon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() - return ec:IsFaceup() and ec:IsSummonPlayer(tp) and ec:IsSummonType(SUMMON_TYPE_TRIBUTE) and ec:IsLevelAbove(7) + return ec:IsFaceup() and ec:IsSummonPlayer(tp) and ec:IsTributeSummoned() and ec:IsLevelAbove(7) end function s.posfilter(c) return c:IsFaceup() and c:IsCanTurnSet() @@ -61,4 +61,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c41224658.lua b/official/c41224658.lua index 1b449863e5..068822c27d 100644 --- a/official/c41224658.lua +++ b/official/c41224658.lua @@ -1,4 +1,5 @@ --野望のゴーファー +--Ambitious Gofer local s,id=GetID() function s.initial_effect(c) --destroy @@ -47,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41230939.lua b/official/c41230939.lua index eb3976cf7c..b684a2502c 100644 --- a/official/c41230939.lua +++ b/official/c41230939.lua @@ -33,16 +33,16 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(s.repval) tc:RegisterEffect(e3) end function s.repval(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c41232647.lua b/official/c41232647.lua index 1d6999d6d3..a75f8ed93b 100644 --- a/official/c41232647.lua +++ b/official/c41232647.lua @@ -1,10 +1,10 @@ --ドラゴンメイド・ハスキー ---Dragonmaid Husky +--House Dragonmaid --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x133),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGONMAID),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) --spsumon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -29,13 +29,13 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x133) and c:IsLevelAbove(1) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c) + return c:IsFaceup() and c:IsSetCard(SET_DRAGONMAID) and c:IsLevelAbove(1) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) - return c:IsSetCard(0x133) and c:IsLevelAbove(1) + return c:IsSetCard(SET_DRAGONMAID) and c:IsLevelAbove(1) and math.abs(c:GetLevel()-tc:GetLevel())==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end @@ -46,13 +46,13 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,c,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp,tc) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp,tc) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end @@ -76,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41234315.lua b/official/c41234315.lua index 4e9bfc717b..7b9618dc23 100644 --- a/official/c41234315.lua +++ b/official/c41234315.lua @@ -1,4 +1,5 @@ --フェイク・エクスプロージョン・ペンタ +--Fake Explosion local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,7 +23,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) end if d then @@ -30,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e2) end local e3=Effect.CreateEffect(e:GetHandler()) @@ -39,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCode(EVENT_BATTLED) e3:SetOperation(s.spop) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) end function s.spfilter(c,e,tp) @@ -48,8 +49,8 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x12,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41248270.lua b/official/c41248270.lua index eed7ec3ec7..ec83afb3c8 100644 --- a/official/c41248270.lua +++ b/official/c41248270.lua @@ -1,8 +1,8 @@ --トラフィックゴースト +--Traffic Ghost local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() Link.AddProcedure(c,nil,3,3) -end - +end \ No newline at end of file diff --git a/official/c41249545.lua b/official/c41249545.lua index fd7f37ae8c..caa79ba2bd 100644 --- a/official/c41249545.lua +++ b/official/c41249545.lua @@ -1,4 +1,5 @@ --グラスファントム +--Grass Phantom local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.atkup(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,id)*500 -end +end \ No newline at end of file diff --git a/official/c41255165.lua b/official/c41255165.lua index 791eaa30a5..bca5ce475e 100644 --- a/official/c41255165.lua +++ b/official/c41255165.lua @@ -1,7 +1,6 @@ --ペンギン忍者 --Penguin Ninja --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -27,8 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Penguin" archetype -s.listed_series={0x5a} - +s.listed_series={SET_PENGUIN} --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsAbleToHand() end @@ -46,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end --Check for a face-up "Penguin" monster function s.setfilter(c) - return c:IsFaceup() and c:IsSetCard(0x5a) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_PENGUIN) and c:IsCanTurnSet() end --Activation legality function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -62,4 +60,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c41302052.lua b/official/c41302052.lua index 1743752056..fcba7fa05c 100644 --- a/official/c41302052.lua +++ b/official/c41302052.lua @@ -29,7 +29,7 @@ end s.listed_series={SET_TRICKSTAR} function s.imcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetLinkedGroup():FilterCount(Card.IsMonster,nil)==0 + return c:IsLinkSummoned() and c:GetLinkedGroup():FilterCount(Card.IsMonster,nil)==0 end function s.immval(e,te) return te:GetOwner()~=e:GetHandler() and te:IsActivated() and s.imcon(e) --condition handling for mid-resolution updating diff --git a/official/c4130270.lua b/official/c4130270.lua index a47c2d84b0..40631d9e3d 100644 --- a/official/c4130270.lua +++ b/official/c4130270.lua @@ -1,4 +1,5 @@ --G・B・ハンター +--G.B. Hunter local s,id=GetID() function s.initial_effect(c) -- @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.etarget(e,c) return c:GetOriginalType()&TYPE_EXTRA~=0 -end +end \ No newline at end of file diff --git a/official/c41306080.lua b/official/c41306080.lua index 5408fd5b66..7a9346b432 100644 --- a/official/c41306080.lua +++ b/official/c41306080.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={85327820} -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x135) + return c:IsFaceup() and c:IsSetCard(SET_IGNISTER) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -51,7 +51,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabelObject(g:GetFirst()) end function s.thfilter(c) - return c:IsSetCard(0x135) and c:IsLevelAbove(5) and c:IsAbleToHand() + return c:IsSetCard(SET_IGNISTER) and c:IsLevelAbove(5) and c:IsAbleToHand() end function s.thfilter2(c) return c:IsCode(85327820) and c:IsAbleToHand() @@ -69,7 +69,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(4) e:GetHandler():RegisterEffect(e1) local lc=e:GetLabelObject() @@ -82,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c41307269.lua b/official/c41307269.lua index 4311c980f8..d8c4c0d23a 100644 --- a/official/c41307269.lua +++ b/official/c41307269.lua @@ -1,4 +1,5 @@ --超重武者カブ-10 +--Superheavy Samurai Kabuto local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(aux.NOT(Card.IsSummonPlayer),1,nil,tp) end function s.filter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x9a) and c:IsCanChangePosition() + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsCanChangePosition() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -35,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c41309158.lua b/official/c41309158.lua index 5ee8cc279e..1b3695ec77 100644 --- a/official/c41309158.lua +++ b/official/c41309158.lua @@ -1,4 +1,5 @@ --CX 機装魔人エンジェネラル +--CXyz Mechquipped Djinn Angeneral local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -21,14 +22,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DAMAGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCondition(s.damcon) - e2:SetCost(s.damcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end s.listed_names={15914410} function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefensePos() end @@ -45,10 +46,6 @@ end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,15914410) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -58,4 +55,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41348446.lua b/official/c41348446.lua index aff13d7d63..3d3b68b5f3 100644 --- a/official/c41348446.lua +++ b/official/c41348446.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetRange(LOCATION_REMOVED) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetCountLimit(1,{id,1}) e4:SetCondition(s.setcon) e4:SetTarget(s.settg) @@ -41,15 +41,15 @@ function s.initial_effect(c) e4:SetLabelObject(e3) c:RegisterEffect(e4) end -s.listed_series={0x170} +s.listed_series={SET_TOPOLOGIC} function s.cfilter(c) - return c:IsType(TYPE_LINK) and c:IsSetCard(0x170) and c:IsFaceup() + return c:IsType(TYPE_LINK) and c:IsSetCard(SET_TOPOLOGIC) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON+RACE_MACHINE+RACE_CYBERSE) and not c:IsType(TYPE_LINK) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON|RACE_MACHINE|RACE_CYBERSE) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -70,7 +70,7 @@ end function s.setreg(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsPreviousLocation(LOCATION_SZONE) then e:SetLabel(Duel.GetTurnCount()) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) @@ -86,4 +86,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not (c:IsRelateToEffect(e) and c:IsSSetable()) then return end Duel.SSet(tp,c) -end +end \ No newline at end of file diff --git a/official/c41356845.lua b/official/c41356845.lua index b9c19a177f..0127b09f01 100644 --- a/official/c41356845.lua +++ b/official/c41356845.lua @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c41359411.lua b/official/c41359411.lua index 8b4746c2b2..f7a0e30948 100644 --- a/official/c41359411.lua +++ b/official/c41359411.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetCondition(s.dircon) - e1:SetCost(s.dircost) + e1:SetCost(Cost.PayLP(500)) e1:SetOperation(s.dirop) c:RegisterEffect(e1) --equip @@ -28,14 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.dircon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.dircost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.dirop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end @@ -43,7 +39,7 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetProperty(EFFECT_CANNOT_DISABLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) @@ -52,7 +48,7 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) and c:CheckUniqueOnField(tp) end function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsRace(RACE_WARRIOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end @@ -69,4 +65,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and c:CheckUniqueOnField(tp) then Duel.Equip(tp,c,tc) end -end +end \ No newline at end of file diff --git a/official/c41367003.lua b/official/c41367003.lua index 06ac3beae7..5f2bd4e197 100644 --- a/official/c41367003.lua +++ b/official/c41367003.lua @@ -1,6 +1,5 @@ --ドロー・マッスル --Draw Muscle - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot be destroyed by battle, also draw 1 @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.filter(c,e,tp) @@ -35,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c41373230.lua b/official/c41373230.lua index 4d20fdefb6..0b3d5dcdf8 100644 --- a/official/c41373230.lua +++ b/official/c41373230.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SPSUMMON_SUCCESS) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) + e2:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) e2:SetOperation(s.atkop) e2:SetLabelObject(e1) c:RegisterEffect(e2) @@ -58,7 +58,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsSummonType(SUMMON_TYPE_FUSION) then return end + if not c:IsFusionSummoned() then return end --immune local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -71,7 +71,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) local tc=te:GetOwner() - return tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:IsSummonLocation(LOCATION_EXTRA) and tc~=e:GetHandler() + return tc:IsSpecialSummoned() and tc:IsSummonLocation(LOCATION_EXTRA) and tc~=e:GetHandler() and te:IsMonsterEffect() and te:IsActivated() and te:GetActivateLocation()==LOCATION_MZONE end function s.regop2(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c41375811.lua b/official/c41375811.lua index 351816f1a3..17452067fb 100644 --- a/official/c41375811.lua +++ b/official/c41375811.lua @@ -1,6 +1,5 @@ --十二獣ライカ --Zoodiac Chakanine - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -27,41 +26,36 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) - e3:SetCost(s.spcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xf1} - +s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0xf1,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_ZOODIAC,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.atkfilter(c) - return c:IsSetCard(0xf1) and c:GetAttack()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetAttack()>=0 end function s.atkval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.atkfilter,nil) return g:GetSum(Card.GetAttack) end function s.deffilter(c) - return c:IsSetCard(0xf1) and c:GetDefense()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetDefense()>=0 end function s.defval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.deffilter,nil) return g:GetSum(Card.GetDefense) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0xf1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ZOODIAC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -79,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) diff --git a/official/c41382147.lua b/official/c41382147.lua index 76b7e785e7..8c1cd80a76 100644 --- a/official/c41382147.lua +++ b/official/c41382147.lua @@ -1,4 +1,5 @@ --星見鳥ラリス +--Rallis the Star Bird local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -38,11 +39,11 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)==1 then + if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Remove(c,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY)==1 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) e1:SetLabelObject(c) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -50,7 +51,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then Duel.ReturnToField(e:GetLabelObject()) end -end +end \ No newline at end of file diff --git a/official/c41386308.lua b/official/c41386308.lua index ca26c61455..44ee093caa 100644 --- a/official/c41386308.lua +++ b/official/c41386308.lua @@ -1,4 +1,5 @@ --マスマティシャン +--Mathematician local s,id=GetID() function s.initial_effect(c) --send to grave diff --git a/official/c41398771.lua b/official/c41398771.lua index 884323ceab..f3bcc2f148 100644 --- a/official/c41398771.lua +++ b/official/c41398771.lua @@ -1,4 +1,5 @@ --老化の呪い +--Curse of Aging local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,18 +9,15 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -27,12 +25,11 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) if #g>0 then - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-500) tc:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c41406613.lua b/official/c41406613.lua index 7578936d09..6ccf17a376 100644 --- a/official/c41406613.lua +++ b/official/c41406613.lua @@ -1,5 +1,5 @@ --暗黒界の魔神王 レイン ---Reign-Beaux, Supreme Overlord of Dark World +--Reign-Beaux, Overking of Dark World local s,id=GetID() function s.initial_effect(c) --Special Summon itself from GY @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} s.listed_names={id} function s.spcfilter(c) - return c:IsFaceup() and c:IsSetCard(0x6) and c:IsLevelBelow(7) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_DARK_WORLD) and c:IsLevelBelow(7) and c:IsAbleToHandAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -67,7 +67,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_HAND) and (r&REASON_EFFECT+REASON_DISCARD)==REASON_EFFECT+REASON_DISCARD end function s.thfilter(c) - return c:IsSetCard(0x6) and not c:IsCode(id) and c:IsLevelAbove(5) and c:IsAbleToHand() + return c:IsSetCard(SET_DARK_WORLD) and not c:IsCode(id) and c:IsLevelAbove(5) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -75,13 +75,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local opp_chk=e:GetLabel() if opp_chk==1 then e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) else e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x6) and c:IsLevelBelow(4) and + return c:IsSetCard(SET_DARK_WORLD) and c:IsLevelBelow(4) and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))) end @@ -92,7 +92,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) local opp_chk=e:GetLabel() if opp_chk==0 then return end - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if #sg==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sc=sg:Select(tp,1,1,nil):GetFirst() diff --git a/official/c41410651.lua b/official/c41410651.lua index c973c52cf3..01b05e9dc2 100644 --- a/official/c41410651.lua +++ b/official/c41410651.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetEquipTarget() if not c then return false end @@ -38,7 +38,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return bc and bc:IsFaceup() end function s.atkcfilter(c) - return c:IsSetCard(0x132) and c:IsMonster() and c:IsAttackAbove(1) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MATHMECH) and c:IsMonster() and c:IsAttackAbove(1) and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_DECK,0,1,nil) end @@ -56,7 +56,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -64,7 +64,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) end function s.thfilter(c) - return c:IsSetCard(0x132) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MATHMECH) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4141820.lua b/official/c4141820.lua index 9bd9db9362..cadd1807fc 100644 --- a/official/c4141820.lua +++ b/official/c4141820.lua @@ -50,5 +50,5 @@ function s.hdcon(e,tp,eg,ep,ev,re,r,rp) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) - Duel.DiscardHand(1-e:GetLabel(),nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-e:GetLabel(),nil,1,1,REASON_EFFECT|REASON_DISCARD) end \ No newline at end of file diff --git a/official/c41418852.lua b/official/c41418852.lua index e5a8b9a772..d32298c8ec 100644 --- a/official/c41418852.lua +++ b/official/c41418852.lua @@ -27,13 +27,13 @@ function s.initial_effect(c) e3:SetTargetRange(1,0) c:RegisterEffect(e3) end -s.listed_series={0x14b} +s.listed_series={SET_NUMERON} function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.filter(c) - return c:GetType()==TYPE_SPELL and c:IsSetCard(0x14b) and c:IsAbleToGraveAsCost() + return c:IsNormalSpell() and c:IsSetCard(SET_NUMERON) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil end function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -60,4 +60,4 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c41420027.lua b/official/c41420027.lua index 3af6394cb0..9ec8cacf8c 100644 --- a/official/c41420027.lua +++ b/official/c41420027.lua @@ -63,4 +63,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41426869.lua b/official/c41426869.lua index d895abb6b0..884edc62d7 100644 --- a/official/c41426869.lua +++ b/official/c41426869.lua @@ -1,5 +1,6 @@ --イリュージョンの儀式 +--Black Illusion Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,1,nil,64631466) -end +end \ No newline at end of file diff --git a/official/c41431329.lua b/official/c41431329.lua index 5b287ff93b..5956036c04 100644 --- a/official/c41431329.lua +++ b/official/c41431329.lua @@ -1,4 +1,5 @@ --ヴァイロン・キューブ +--Vylon Cube local s,id=GetID() function s.initial_effect(c) --search @@ -31,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c41436536.lua b/official/c41436536.lua index c68b2df13f..5e35dd2cb7 100644 --- a/official/c41436536.lua +++ b/official/c41436536.lua @@ -1,4 +1,5 @@ --E・HERO フェニックスガイ +--Elemental HERO Phoenix Enforcer local s,id=GetID() function s.initial_effect(c) --fusion material @@ -18,4 +19,4 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} \ No newline at end of file diff --git a/official/c41440148.lua b/official/c41440148.lua index 7d80da8f5c..d3bc94dfa8 100644 --- a/official/c41440148.lua +++ b/official/c41440148.lua @@ -1,4 +1,5 @@ --EMディスカバー・ヒッポ +--Performapal Hip Hippo local s,id=GetID() function s.initial_effect(c) --extra summon @@ -16,7 +17,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,7)) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c41440817.lua b/official/c41440817.lua index 011a07203e..0ee0b20420 100644 --- a/official/c41440817.lua +++ b/official/c41440817.lua @@ -1,5 +1,5 @@ --心太砲式 ---J.E.L.L.Y. Cannon System +--Jelly Cannon --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -23,6 +23,6 @@ end function s.tdop(e) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41442341.lua b/official/c41442341.lua index ac624f0a0b..2d4f87aefb 100644 --- a/official/c41442341.lua +++ b/official/c41442341.lua @@ -9,16 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) end) - e1:SetCost(s.spcost) + e1:SetCondition(function(e) return e:GetHandler():IsTributeSummoned() end) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -53,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c41456841.lua b/official/c41456841.lua index 04369979db..2f12e06f88 100644 --- a/official/c41456841.lua +++ b/official/c41456841.lua @@ -1,5 +1,5 @@ --究極変異態・インセクト女王 ---Ultimately Mutated Insect Queen +--Metamorphosed Insect Queen local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -76,7 +76,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end end @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,TOKEN_INSECT_MONSTER) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4145852.lua b/official/c4145852.lua index 6ebf8e34a7..15775d9192 100644 --- a/official/c4145852.lua +++ b/official/c4145852.lua @@ -20,18 +20,18 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xf1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_ZOODIAC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -53,14 +53,10 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return c:GetOriginalRace()==RACE_BEASTWARRIOR and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp and Duel.IsChainNegatable(ev) - and re and re:IsActiveType(TYPE_TRAP) + and re and re:IsTrapEffect() and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and tg and tg:IsContains(c) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) @@ -70,4 +66,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41458579.lua b/official/c41458579.lua index a1a16aa69b..d845a4e40e 100644 --- a/official/c41458579.lua +++ b/official/c41458579.lua @@ -1,4 +1,5 @@ --六尺瓊勾玉 +--Musakani Magatama local s,id=GetID() function s.initial_effect(c) --Negate @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) then return false end if tp==ep or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and tc>0 end @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41462083.lua b/official/c41462083.lua index 18d873c681..55fbc98d5a 100644 --- a/official/c41462083.lua +++ b/official/c41462083.lua @@ -1,7 +1,8 @@ --千年竜 +--Thousand Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,71625222,88819587) -end +end \ No newline at end of file diff --git a/official/c41462084.lua b/official/c41462084.lua deleted file mode 100644 index 18d873c681..0000000000 --- a/official/c41462084.lua +++ /dev/null @@ -1,7 +0,0 @@ ---千年竜 -local s,id=GetID() -function s.initial_effect(c) - --fusion material - c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,71625222,88819587) -end diff --git a/official/c41463181.lua b/official/c41463181.lua index 3a5a946240..40a8daab5c 100644 --- a/official/c41463181.lua +++ b/official/c41463181.lua @@ -81,4 +81,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c41470137.lua b/official/c41470137.lua index abab6ef1ef..e8433f8449 100644 --- a/official/c41470137.lua +++ b/official/c41470137.lua @@ -1,7 +1,8 @@ --剣闘獣ベストロウリィ +--Gladiator Beast Bestiari local s,id=GetID() function s.initial_effect(c) - --destroy + --Destroy 1 Spell/Trap on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) @@ -12,30 +13,27 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - --special summon + --Special Summon 1 "Gladiator Beast" monster from your Deck, except "Gladiator Beast Bestiari" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR_BEAST} s.listed_names={id} -function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and s.desfilter(chkc) end + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -43,29 +41,19 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,102,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GLADIATOR_BEAST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,102,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,102,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,102,tp,tp,false,false,POS_FACEUP)>0 then + sc:RegisterFlagEffect(sc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end end diff --git a/official/c41475424.lua b/official/c41475424.lua index 748d28f70b..0bbbda5c04 100644 --- a/official/c41475424.lua +++ b/official/c41475424.lua @@ -1,4 +1,5 @@ --機限爆弾 +--Mektimed Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,14 +8,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x13) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41482598.lua b/official/c41482598.lua index ea8e04fbe0..0785319af4 100644 --- a/official/c41482598.lua +++ b/official/c41482598.lua @@ -1,4 +1,5 @@ --悪夢の蜃気楼 +--Mirage of Nightmare local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.drcon) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.dccon) e3:SetTarget(s.dctg) e3:SetOperation(s.dcop) @@ -39,7 +40,7 @@ function s.clear(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(0) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<4 + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<4 end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -55,7 +56,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) else e:GetLabelObject():SetLabel(0) end end function s.dccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetLabelObject():GetLabel()~=0 + return Duel.IsTurnPlayer(tp) and e:GetLabelObject():GetLabel()~=0 end function s.dctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -68,5 +69,5 @@ function s.dcop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local sg=g:RandomSelect(tp,e:GetLabel()) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) -end + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c41488249.lua b/official/c41488249.lua index 88f80813f4..aaa26603a4 100644 --- a/official/c41488249.lua +++ b/official/c41488249.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.controltg) e2:SetOperation(s.controlop) c:RegisterEffect(e2) diff --git a/official/c41493640.lua b/official/c41493640.lua index e45869887e..8e74c17e20 100644 --- a/official/c41493640.lua +++ b/official/c41493640.lua @@ -1,4 +1,5 @@ --ラインモンスター Kホース +--Shogi Knight local s,id=GetID() function s.initial_effect(c) --destroy @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c4149689.lua b/official/c4149689.lua index ff1a00f6d5..6fcd1d3ab0 100644 --- a/official/c4149689.lua +++ b/official/c4149689.lua @@ -25,14 +25,14 @@ function s.initial_effect(c) end function s.aclimit(e,re,tp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE and rc:GetFlagEffect(id)~=0 + return re:IsMonsterEffect() and re:GetActivateLocation()==LOCATION_MZONE and rc:GetFlagEffect(id)~=0 end function s.desop(e,tp,eg,ep,ev,re,r,rp) if eg then local tc=eg:GetFirst() if tc:IsLevelBelow(2) then Duel.Destroy(tc,REASON_EFFECT) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end \ No newline at end of file diff --git a/official/c41510920.lua b/official/c41510920.lua index 265a36cc95..c121f0a839 100644 --- a/official/c41510920.lua +++ b/official/c41510920.lua @@ -1,4 +1,5 @@ --神星なる因子 +--Stellarnova Alpha local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9c) and c:IsAbleToGraveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT) and c:IsAbleToGraveAsCost() and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41517789.lua b/official/c41517789.lua index 1618feb652..6f05e59687 100644 --- a/official/c41517789.lua +++ b/official/c41517789.lua @@ -1,4 +1,5 @@ --星態龍 +--Star Eater local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -30,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) then return end + if not e:GetHandler():IsSynchroSummoned() then return end Duel.SetChainLimitTillChainEnd(aux.FALSE) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -40,10 +41,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) e:GetHandler():RegisterEffect(e1) Duel.AdjustInstantly(e:GetHandler()) end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() -end +end \ No newline at end of file diff --git a/official/c41517968.lua b/official/c41517968.lua index 0b73f3cdd9..ff2ffad1bf 100644 --- a/official/c41517968.lua +++ b/official/c41517968.lua @@ -1,4 +1,5 @@ --E・HERO ダーク・ブライトマン +--Elemental HERO Darkbright local s,id=GetID() function s.initial_effect(c) --fusion material @@ -34,7 +35,7 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() end @@ -56,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41524885.lua b/official/c41524885.lua index ea0e0462f8..b7c3bcb28a 100644 --- a/official/c41524885.lua +++ b/official/c41524885.lua @@ -1,18 +1,18 @@ --- エクソシスター・アソフィール --- Exorsister Usophiel --- Scripted by Hatter +--エクソシスター・アソフィール +--Exosister Asophiel +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Level 4 monsters + --2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - -- Check materials on Xyz Summon + --Check materials on Xyz Summon local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) - -- Effect destruction immunity + --Effect destruction immunity local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_MZONE) @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(s.indval) c:RegisterEffect(e1) - -- Limit effects from GY + --Limit effects from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCondition(s.limcon) e2:SetOperation(s.limop) c:RegisterEffect(e2) - -- Bounce + --Bounce local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) @@ -38,30 +38,30 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.thcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x174) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END + if g:IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END c:RegisterFlagEffect(id,reset,0,1) end end function s.indval(e,re,rp) local rc=re:GetHandler() - return rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsSummonLocation(LOCATION_GRAVE) - and re:IsActiveType(TYPE_MONSTER) and re:IsActivated() + return rc:IsSpecialSummoned() and rc:IsSummonLocation(LOCATION_GRAVE) + and re:IsMonsterEffect() and re:IsActivated() end function s.limcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_XYZ) and c:GetFlagEffect(id)>0 + return c:IsXyzSummoned() and c:GetFlagEffect(id)>0 end function s.limop(e,tp,eg,ep,ev,re,r,rp) - -- Neither player can activate effects from the GY + --Neither player can activate effects from the GY local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) @@ -69,13 +69,9 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetValue(function(_,re) return re:GetActivateLocation()==LOCATION_GRAVE end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end @@ -88,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41525660.lua b/official/c41525660.lua index f66db784f6..6493bbc3de 100644 --- a/official/c41525660.lua +++ b/official/c41525660.lua @@ -1,10 +1,10 @@ --- ヴァリアンツの忍者-南月 --- Nazuki the Vaylantyz Ninja --- Scripted by Hatter +--ヴァリアンツの忍者-南月 +--Nazuki the Vaylantz Ninja +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon itself from the Pendulum zone + --Special Summon itself from the Pendulum zone local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Move 1 other monster to an adjacent zone + --Move 1 other monster to an adjacent zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.mvtg) e2:SetOperation(s.mvop) c:RegisterEffect(e2) - -- Special Summon 1 "Vaylantz" monster from Spell/Trap Zone + --Special Summon 1 "Vaylantz" monster from Spell/Trap Zone local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) diff --git a/official/c41544074.lua b/official/c41544074.lua index ad7cf492d1..1888150713 100644 --- a/official/c41544074.lua +++ b/official/c41544074.lua @@ -1,7 +1,8 @@ --カオス・ウィザード +--Kamionwizard local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,15025844,22026707) -end +end \ No newline at end of file diff --git a/official/c41546.lua b/official/c41546.lua index b8bc1cfb7c..d2dad0e499 100644 --- a/official/c41546.lua +++ b/official/c41546.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xaf,0x10af} +s.listed_series={SET_DD,SET_DDD} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -44,10 +44,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter(c) - return c:IsSetCard(0xaf) + return c:IsSetCard(SET_DD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10af) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DDD) and c:GetLevel()==8 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.desfilter(chkc) end @@ -71,12 +71,12 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -87,7 +87,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(0,1) e3:SetValue(HALF_DAMAGE) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,0,1,aux.Stringid(id,2),nil) -end +end \ No newline at end of file diff --git a/official/c41554273.lua b/official/c41554273.lua index d767fd9c2e..ba0b012989 100644 --- a/official/c41554273.lua +++ b/official/c41554273.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOMIST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -28,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then local c=e:GetHandler() - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Destroy it during the End Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetValue(s.efilter) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) end Duel.SpecialSummonComplete() diff --git a/official/c41562624.lua b/official/c41562624.lua index 7e86c85691..0a661660a0 100644 --- a/official/c41562624.lua +++ b/official/c41562624.lua @@ -25,19 +25,19 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x10d9} +s.listed_series={SET_SHIRANUI_SPECTRALSWORD} function s.filter(c,e,tp) - return c:IsSetCard(0x10d9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SHIRANUI_SPECTRALSWORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -49,7 +49,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) @@ -64,7 +64,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.Draw(tp,1,REASON_EFFECT)>0 then Duel.BreakEffect() Duel.ShuffleHand(tp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end -end - +end \ No newline at end of file diff --git a/official/c41578483.lua b/official/c41578483.lua index 0065d48088..d1ed3b45a4 100644 --- a/official/c41578483.lua +++ b/official/c41578483.lua @@ -98,4 +98,4 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local eqg=e:GetHandler():GetEquipGroup():Match(s.eqgfilter,nil) return re:IsMonsterEffect() and eqg:IsExists(Card.IsOriginalCodeRule,1,nil,re:GetHandler():GetOriginalCodeRule()) -end +end \ No newline at end of file diff --git a/official/c41589166.lua b/official/c41589166.lua index 21102b2acb..3b23b3df3c 100644 --- a/official/c41589166.lua +++ b/official/c41589166.lua @@ -1,4 +1,5 @@ --天下人 紫炎 +--Tenkabito Shien local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -10,5 +11,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end + return te:IsTrapEffect() +end \ No newline at end of file diff --git a/official/c4160316.lua b/official/c4160316.lua index 79691a824b..2bd9a2c0f3 100644 --- a/official/c4160316.lua +++ b/official/c4160316.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.plcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) diff --git a/official/c41613948.lua b/official/c41613948.lua index e216a79c19..afe6fcd571 100644 --- a/official/c41613948.lua +++ b/official/c41613948.lua @@ -26,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -40,11 +40,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsPosition(POS_FACEUP_ATTACK) - and tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then + and tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) @@ -63,4 +63,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) else Duel.ReturnToField(e:GetLabelObject()) end -end +end \ No newline at end of file diff --git a/official/c41619242.lua b/official/c41619242.lua index 526a43b44f..75a18dad9c 100644 --- a/official/c41619242.lua +++ b/official/c41619242.lua @@ -1,22 +1,22 @@ --- 肆世壊からの天跨 --- Scareclaw Straddle --- Scripted by Hatter +--肆世壊からの天跨 +--Scareclaw Straddle +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Boost ATK of 1 "Scareclaw" monster or "Visas Stafrost" + --Boost ATK of 1 "Scareclaw" monster or "Visas Stafrost" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Negate an effect that targets "Scareclaw" monster(s) and/or "Visas Stafrost" + --Negate an effect that targets "Scareclaw" monster(s) and/or "Visas Stafrost" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DISABLE) @@ -29,16 +29,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x17c} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_SCARECLAW} function s.atkfilter(c,e,tp) return c:IsFaceup() and c:IsCanBeEffectTarget(e) - and (c:IsSetCard(0x17c) or c:IsCode(CARD_VISAS_STARFROST) or c:IsControler(1-tp)) + and (c:IsSetCard(SET_SCARECLAW) or c:IsCode(CARD_VISAS_STARFROST) or c:IsControler(1-tp)) end function s.atkrescon(sg,e,tp,mg) - return sg:GetClassCount(Card.GetControler)==2 + return sg:GetClassCount(Card.GetControler)==2 end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -57,7 +54,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(math.max(ac:GetAttack(),ac:GetDefense())) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -67,7 +64,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.disconfilter(c,tp) return c:IsFaceup() and c:IsOnField() and c:IsControler(tp) - and ((c:IsSetCard(0x17c) and c:IsMonster()) or c:IsCode(CARD_VISAS_STARFROST)) + and ((c:IsSetCard(SET_SCARECLAW) and c:IsMonster()) or c:IsCode(CARD_VISAS_STARFROST)) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end diff --git a/official/c41620959.lua b/official/c41620959.lua index 0fd8c27f38..11d425f80f 100644 --- a/official/c41620959.lua +++ b/official/c41620959.lua @@ -1,4 +1,5 @@ --竜の霊廟 +--Dragon Shrine local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41628550.lua b/official/c41628550.lua index 3759eb7b4e..b06f6a1164 100644 --- a/official/c41628550.lua +++ b/official/c41628550.lua @@ -1,4 +1,5 @@ --超重武者ワカ-O2 +--Superheavy Samurai Blue Brawler local s,id=GetID() function s.initial_effect(c) --position @@ -30,4 +31,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c41639001.lua b/official/c41639001.lua index 1e67f78a3b..d9997a1ad5 100644 --- a/official/c41639001.lua +++ b/official/c41639001.lua @@ -1,4 +1,5 @@ --聖刻龍-ドラゴンヌート +--Hieratic Dragon of Nuit local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,12 +27,12 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then @@ -39,11 +40,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c41659072.lua b/official/c41659072.lua index 3d22818929..4a8634394a 100644 --- a/official/c41659072.lua +++ b/official/c41659072.lua @@ -36,7 +36,7 @@ function s.syncheck(g,sc,tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TUNER) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and g:GetClassCount(Card.GetCode)>3 + return e:GetHandler():IsSynchroSummoned() and g:GetClassCount(Card.GetCode)>3 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -55,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) @@ -75,4 +75,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local rg=Duel.GetDecktopGroup(tp,4) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4167084.lua b/official/c4167084.lua index 017958ddd5..b124c37289 100644 --- a/official/c4167084.lua +++ b/official/c4167084.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e3:SetHintTiming(0,TIMING_MAIN_END) e3:SetCountLimit(1,id) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.PayLP(1000)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -60,7 +60,7 @@ function s.valcheck(e,c) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()==1 + return e:GetHandler():IsFusionSummoned() and e:GetLabel()==1 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) @@ -78,19 +78,15 @@ end function s.spfilter(c,e,tp) return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c4168871.lua b/official/c4168871.lua index c7bb9e5474..6ec807e9c3 100644 --- a/official/c4168871.lua +++ b/official/c4168871.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsSetCard(0x33) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) @@ -42,4 +42,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41705642.lua b/official/c41705642.lua index e5cf94de26..ca5a13f233 100644 --- a/official/c41705642.lua +++ b/official/c41705642.lua @@ -1,4 +1,5 @@ --サルベージ・ウォリアー +--Salvage Warrior local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,21 +14,21 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c,e,tp) return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41721210.lua b/official/c41721210.lua index 91417a7361..af1f091064 100644 --- a/official/c41721210.lua +++ b/official/c41721210.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_DARK_MAGICIAN) c:RegisterEffect(e1) --Prevent effect target @@ -31,5 +31,5 @@ function s.initial_effect(c) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) end -s.material_setcode=0x10a2 -s.listed_names={CARD_DARK_MAGICIAN} +s.material_setcode=SET_DARK_MAGICIAN +s.listed_names={CARD_DARK_MAGICIAN} \ No newline at end of file diff --git a/official/c41722932.lua b/official/c41722932.lua index ecf05495f5..847d17f5a2 100644 --- a/official/c41722932.lua +++ b/official/c41722932.lua @@ -1,4 +1,5 @@ --ダーク・ジェノサイド・カッター +--Dark Mambele local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.activate(e) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41729254.lua b/official/c41729254.lua index ebb2a74a04..f5930f0bab 100644 --- a/official/c41729254.lua +++ b/official/c41729254.lua @@ -1,5 +1,5 @@ --翼の魔妖-波旬 --- Hajun, the Winged Mayakashi +--Hajun, the Winged Mayakashi --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -29,10 +29,10 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter) end -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x121) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAYAKASHI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,8 +48,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.sslimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end \ No newline at end of file diff --git a/official/c41735184.lua b/official/c41735184.lua index 8c9ae15419..efd4908315 100644 --- a/official/c41735184.lua +++ b/official/c41735184.lua @@ -1,4 +1,5 @@ --黒魔術の継承 +--Dark Magic Inheritance local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c41741922.lua b/official/c41741922.lua index 90446d72fa..759bb318d6 100644 --- a/official/c41741922.lua +++ b/official/c41741922.lua @@ -1,4 +1,5 @@ --ラヴァ・ドラゴン +--Lava Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -25,7 +26,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return ft>1 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end @@ -39,4 +40,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg2=g2:Select(tp,1,1,nil) sg1:Merge(sg2) Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c41753322.lua b/official/c41753322.lua index 512cd7c5f9..89f6d0f4d2 100644 --- a/official/c41753322.lua +++ b/official/c41753322.lua @@ -69,7 +69,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -89,4 +89,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) end function s.dcon(e) return Duel.GetAttackTarget()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c41767843.lua b/official/c41767843.lua index f2b3a32c83..089ae4df12 100644 --- a/official/c41767843.lua +++ b/official/c41767843.lua @@ -1,4 +1,5 @@ --幻奏の音女スコア +--Score the Melodious Diva local s,id=GetID() function s.initial_effect(c) --atkdef 0 @@ -9,21 +10,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if not d then return false end if a:IsControler(1-tp) then a,d=d,a end - return a:IsSetCard(0x9b) and a:IsRelateToBattle() and (d:GetAttack()>0 or d:GetDefense()>0) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return a:IsSetCard(SET_MELODIOUS) and a:IsRelateToBattle() and (d:GetAttack()>0 or d:GetDefense()>0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -33,10 +30,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) d:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) d:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c41777.lua b/official/c41777.lua index 852f4851a1..0a586b176c 100644 --- a/official/c41777.lua +++ b/official/c41777.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.cfilter(c) - return c:IsSetCard(0x1047) + return c:IsSetCard(SET_GEM_KNIGHT) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41782653.lua b/official/c41782653.lua index ad7e22ef24..3a36534eca 100644 --- a/official/c41782653.lua +++ b/official/c41782653.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x10e} +s.listed_series={SET_EVOLUTION_PILL} function s.spfilter(c) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) and c:IsAbleToDeckAsCost() end @@ -85,13 +85,13 @@ function s.pubfilter(c) return c:IsPublic() and c:IsMonster() and c:IsRace(RACE_DINOSAUR) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) if #hg==0 or (hg:FilterCount(Card.IsPublic,nil)==#hg and hg:IsExists(s.pubfilter,1,nil)) then local dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,0,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND|LOCATION_MZONE) else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then @@ -100,7 +100,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g1=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g1>0 and Duel.Destroy(g1,REASON_EFFECT)~=0 then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) @@ -111,7 +111,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0x10e) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_EVOLUTION_PILL) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -124,4 +124,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4178474.lua b/official/c4178474.lua index b020e6bec9..9cc4295e82 100644 --- a/official/c4178474.lua +++ b/official/c4178474.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41788781.lua b/official/c41788781.lua index b01ab10d68..dab718d372 100644 --- a/official/c41788781.lua +++ b/official/c41788781.lua @@ -1,4 +1,5 @@ --極星獣グルファクシ +--Guldfaxe of the Nordic Beasts local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c4179255.lua b/official/c4179255.lua index 24d931fa8f..d75733c197 100644 --- a/official/c4179255.lua +++ b/official/c4179255.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and re and re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return Duel.IsTurnPlayer(tp) and re and re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end @@ -65,4 +65,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41802073.lua b/official/c41802073.lua index 6697213681..a9025df53e 100644 --- a/official/c41802073.lua +++ b/official/c41802073.lua @@ -1,10 +1,10 @@ --- ヴァリアンツV-ヴァイカント --- Valiants' Voltage - Viscount --- Scripted by Hatter +--ヴァリアンツV-ヴァイカント +--Vaylantz Voltage Viscount +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,17 +14,17 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Place in Spell/Trap Zone + --Place in Spell/Trap Zone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end) + e2:SetCondition(function(e) return e:GetHandler():IsSpecialSummoned() end) e2:SetTarget(s.sztg) e2:SetOperation(s.szop) c:RegisterEffect(e2) - -- Place in Pendulum Zone + --Place in Pendulum Zone local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -36,11 +36,11 @@ function s.initial_effect(c) e3:SetOperation(s.pzop) c:RegisterEffect(e3) end -s.listed_series={0x17e} +s.listed_series={SET_VAYLANTZ} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then - local zone=(1<0 end @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.filter2(c) - return c:IsSetCard(0x10ec) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -56,7 +56,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil) end function s.setfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -68,5 +68,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local sg=g:Select(tp,1,ct,nil) Duel.SSet(tp,sg) -end - +end \ No newline at end of file diff --git a/official/c41830887.lua b/official/c41830887.lua index 6b89fb92bc..8beebdb3c2 100644 --- a/official/c41830887.lua +++ b/official/c41830887.lua @@ -23,32 +23,33 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(0x14a) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(SET_APPLIANCER) end local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x14a),tp,LOCATION_MZONE,0,1,nil,c) end - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x14a),tp,LOCATION_MZONE,0,1,1,nil,c) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,LOCATION_HAND) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_APPLIANCER),tp,LOCATION_MZONE,0,1,nil,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_APPLIANCER),tp,LOCATION_MZONE,0,1,1,nil,c) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if not (c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e)) then return end + if not (c:IsRelateToEffect(e) and tc:IsRelateToEffect(e)) then return end if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then - --Change name + --This card's name becomes that monster's name until the End Phase local code=tc:GetOriginalCode() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) @@ -56,10 +57,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x14a) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,c:GetCode()) + return c:IsFaceup() and c:IsSetCard(SET_APPLIANCER) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,c:GetCode()) end -function s.filter2(c,e,tp,code) +function s.spfilter(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -68,15 +69,15 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c41850466.lua b/official/c41850466.lua index 650af3bcec..8c4246a251 100644 --- a/official/c41850466.lua +++ b/official/c41850466.lua @@ -22,16 +22,16 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.listed_names={79747096,CARD_NUMERON_NETWORK,89477759} function s.cfilter(c) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==79747096 - and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():IsActiveType(TYPE_MONSTER) + and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():IsMonsterEffect() end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.cfilter,nil) for tc in aux.Next(g) do - Duel.RegisterFlagEffect(tc:GetPreviousControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetPreviousControler(),id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -41,7 +41,7 @@ function s.spfilter(c,e,tp) return c:IsCode(89477759) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.matfilter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end function s.rmgchk(f,id) return function(c) @@ -50,13 +50,13 @@ function s.rmgchk(f,id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.rmgchk(Card.IsCode,CARD_NUMERON_NETWORK),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) - and Duel.IsExistingTarget(s.rmgchk(s.matfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,nil) + if chk==0 then return Duel.IsExistingTarget(s.rmgchk(Card.IsCode,CARD_NUMERON_NETWORK),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) + and Duel.IsExistingTarget(s.rmgchk(s.matfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,4,nil) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local atg1=Duel.SelectTarget(tp,s.rmgchk(Card.IsCode,CARD_NUMERON_NETWORK),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local atg1=Duel.SelectTarget(tp,s.rmgchk(Card.IsCode,CARD_NUMERON_NETWORK),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local atg2=Duel.SelectTarget(tp,s.rmgchk(s.matfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,4,nil) + local atg2=Duel.SelectTarget(tp,s.rmgchk(s.matfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,4,4,nil) local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) atg1:Merge(atg2) local lvgg=atg1:Filter(Card.IsLocation,nil,LOCATION_GRAVE) @@ -75,7 +75,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(10000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) @@ -94,7 +94,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.limittg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabel(spc) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -113,4 +113,4 @@ end function s.countval(e,re,tp) local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SUMMON) if sp-e:GetLabel()>=1 then return 0 else return 1-sp+e:GetLabel() end -end +end \ No newline at end of file diff --git a/official/c41855169.lua b/official/c41855169.lua index 09b6748347..15abb5b9ad 100644 --- a/official/c41855169.lua +++ b/official/c41855169.lua @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) if chk==0 then return #g>0 and g:FilterCount(s.cfilter,nil)==#g end local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSummonType,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end @@ -38,4 +38,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsSummonType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,SUMMON_TYPE_SPECIAL) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41858121.lua b/official/c41858121.lua index 03eb8b19b4..572cedafaf 100644 --- a/official/c41858121.lua +++ b/official/c41858121.lua @@ -31,7 +31,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if g:IsExists(s.tgfilter,1,nil,e) then return end - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.ShuffleDeck(tp) Duel.BreakEffect() local op=0 @@ -49,4 +49,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41859700.lua b/official/c41859700.lua index 57da110faa..129c23c6d9 100644 --- a/official/c41859700.lua +++ b/official/c41859700.lua @@ -1,4 +1,5 @@ --燃える藻 +--Burning Algae local s,id=GetID() function s.initial_effect(c) --recover @@ -21,4 +22,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41867019.lua b/official/c41867019.lua index 4913fd4ae2..7153cac08b 100644 --- a/official/c41867019.lua +++ b/official/c41867019.lua @@ -1,8 +1,6 @@ --魔妖遊行 --Mayakashi Mayhem --Logical Nonsense - ---Substitute ID local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,29 +28,21 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) c:RegisterEffect(e3) end -s.listed_names={} - --Lists "Mayakashi" archetype -s.listed_series={0x121} - - --Zombie synchro monster special summoned anywhere but extra deck +s.listed_names={id} +s.listed_series={SET_MAYAKASHI} function s.cfilter(c) - return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) - and c:GetSummonLocation()~=LOCATION_EXTRA + return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) and not c:IsSummonLocation(LOCATION_EXTRA) end - --Not really a cost, make the effect once per chain function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id+4)==0 end Duel.RegisterFlagEffect(tp,id+4,RESET_CHAIN,0,1) end - --If it ever happened function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) and not e:GetHandler():IsStatus(STATUS_CHAINING) end - --Check for "Mayakashi" spell/trap, except itself function s.setfilter(c) - return c:IsSetCard(0x121) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable() and not c:IsCode(id) + return c:IsSetCard(SET_MAYAKASHI) and c:IsSpellTrap() and c:IsSSetable() and not c:IsCode(id) end - --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.GetFlagEffect(tp,id)==0 or Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.GetFlagEffect(tp,id+1)==0 @@ -62,7 +52,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE) end - --Apply 1 of the following effects function s.activate(e,tp,eg,ep,ev,re,r,rp) local off=1 local ops={} @@ -91,7 +80,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local op=Duel.SelectOption(tp,table.unpack(ops)) if opval[op]==1 then --Draw 1 card Duel.Draw(tp,1,REASON_EFFECT) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) elseif opval[op]==2 then --Set 1 "Mayakashi" spell/trap from deck local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) if #g>0 then @@ -99,7 +88,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SSet(tp,sg) Duel.ConfirmCards(1-tp,sg) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end elseif opval[op]==3 then --Send opponent's monster with lowest ATK to GY local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) @@ -111,11 +100,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.SendtoGrave(sg,REASON_EFFECT) else Duel.SendtoGrave(tg,REASON_EFFECT) end - Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end elseif opval[op]==4 then --Inflict 800 damage local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) - Duel.RegisterFlagEffect(tp,id+3,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+3,RESET_PHASE|PHASE_END,0,1) end -end \ No newline at end of file +end diff --git a/official/c41872150.lua b/official/c41872150.lua index 75848cd79a..8aa8c8ef23 100644 --- a/official/c41872150.lua +++ b/official/c41872150.lua @@ -1,4 +1,5 @@ --イナゴの軍勢 +--Swarm of Locusts local s,id=GetID() function s.initial_effect(c) --turn set @@ -24,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -48,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41902352.lua b/official/c41902352.lua index ca94ee5327..60bea9ee3f 100644 --- a/official/c41902352.lua +++ b/official/c41902352.lua @@ -1,4 +1,5 @@ --BF-東雲のコチ +--Blackwing - Kochi the Daybreak local s,id=GetID() function s.initial_effect(c) --synchro limit @@ -17,8 +18,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.synlimit(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) + return e:GetHandler():IsSpecialSummoned() end function s.spcost(e,c,tp,sumtype) return sumtype~=SUMMON_TYPE_SPECIAL+182 -end +end \ No newline at end of file diff --git a/official/c41916534.lua b/official/c41916534.lua index fa0569f955..04e9e18ddb 100644 --- a/official/c41916534.lua +++ b/official/c41916534.lua @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) @@ -73,4 +73,4 @@ function s.value(e,c) end function s.condition(e) return Duel.IsExistingMatchingCard(s.fieldcond,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c41925941.lua b/official/c41925941.lua index e41a8c1115..2faf2aa56f 100644 --- a/official/c41925941.lua +++ b/official/c41925941.lua @@ -1,4 +1,5 @@ --冥王の咆哮 +--Bark of Dark Ruler local s,id=GetID() function s.initial_effect(c) --atkdown @@ -64,9 +65,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) bc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c4192696.lua b/official/c4192696.lua index aa082b2f6c..056a8ce6c6 100644 --- a/official/c4192696.lua +++ b/official/c4192696.lua @@ -1,4 +1,5 @@ --森の聖霊 エーコ +--Eco, Mystical Spirit of the Forest local s,id=GetID() function s.initial_effect(c) --special summon @@ -32,15 +33,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,1) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c41927278.lua b/official/c41927278.lua index 6352a07766..14d90d84d1 100644 --- a/official/c41927278.lua +++ b/official/c41927278.lua @@ -1,5 +1,5 @@ --脆刃の剣 ---Fragile Double-Edged Sword +--Double-Edged Sword local s,id=GetID() function s.initial_effect(c) --equip @@ -33,5 +33,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c41930553.lua b/official/c41930553.lua index 98a23c51fd..059c5bb6a6 100644 --- a/official/c41930553.lua +++ b/official/c41930553.lua @@ -29,11 +29,11 @@ function s.rfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rfilter(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingTarget(s.rfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + and Duel.IsExistingTarget(s.rfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end @@ -43,8 +43,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) if #cg==0 then return end - Duel.SendtoGrave(cg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(cg,REASON_EFFECT|REASON_DISCARD) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c41933425.lua b/official/c41933425.lua index d8c56d5192..a14d4d1b41 100644 --- a/official/c41933425.lua +++ b/official/c41933425.lua @@ -21,21 +21,21 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1f} +s.listed_series={SET_NEO_SPACIAN} s.listed_names={CARD_NEOS} function s.cfilter(c) - return c:IsSetCard(0x1f) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.filter(c,e,tp) - return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.rescon1(sg,e,tp,mg) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,sg,e,tp) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,sg,e,tp) return aux.ChkfMMZ(2)(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==2 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon2,0) end @@ -43,14 +43,14 @@ function s.rescon2(sg,e,tp,mg) return sg:GetClassCount(Card.GetCode)==2 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil) if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon1,0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon1,1,tp,HINTMSG_REMOVE) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -60,12 +60,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon2,1,tp,HINTMSG_SPSUMMON) if #sg==2 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) @@ -99,4 +99,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c41978142.lua b/official/c41978142.lua index 792b384afa..fd76fb63cb 100644 --- a/official/c41978142.lua +++ b/official/c41978142.lua @@ -1,4 +1,5 @@ --霞の谷の執行者 +--Mist Valley Executor local s,id=GetID() function s.initial_effect(c) --to hand @@ -22,4 +23,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c41999284.lua b/official/c41999284.lua index 7f7f5683a4..3f2240085d 100644 --- a/official/c41999284.lua +++ b/official/c41999284.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfTribute) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Special Summon itself from the GY @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e2:SetCountLimit(1,id) e2:SetCost(s.spcost) e2:SetTarget(s.sptg) @@ -32,10 +32,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() return at and Duel.IsTurnPlayer(1-tp) and at:HasNonZeroAttack() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsRelateToBattle() and tc:IsFaceup() then @@ -43,7 +39,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c42002073.lua b/official/c42002073.lua index 9d8e495b08..a6e60dbff5 100644 --- a/official/c42002073.lua +++ b/official/c42002073.lua @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -66,4 +66,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42006475.lua b/official/c42006475.lua index 4ecc079a9b..7a83b2608e 100644 --- a/official/c42006475.lua +++ b/official/c42006475.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_CHAINING) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) @@ -64,14 +64,14 @@ function s.spfilter(c,e,tp) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42009836.lua b/official/c42009836.lua index 681fc92c0a..e82b334ad4 100644 --- a/official/c42009836.lua +++ b/official/c42009836.lua @@ -1,4 +1,5 @@ --フォッシル・ダイナ パキケファロ +--Fossil Dyna Pachycephalo local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -30,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42015635.lua b/official/c42015635.lua index c04af1cdc0..d7625f98be 100644 --- a/official/c42015635.lua +++ b/official/c42015635.lua @@ -27,4 +27,4 @@ end s.listed_names={CARD_NEOS} function s.atktg(e,c) return c:IsCode(CARD_NEOS) or (c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_NEOS)) -end +end \ No newline at end of file diff --git a/official/c42023223.lua b/official/c42023223.lua index 25cbbccfb0..c2ad574789 100644 --- a/official/c42023223.lua +++ b/official/c42023223.lua @@ -1,4 +1,5 @@ --電磁石の戦士α +--Alpha The Electromagnet Warrior local s,id=GetID() function s.initial_effect(c) --to hand @@ -24,14 +25,14 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xe9,0x2066} +s.listed_series={SET_MAGNA_WARRIOR,SET_MAGNET_WARRIOR} function s.thfilter(c) - return c:IsSetCard(0xe9) and c:IsLevel(8) and c:IsAbleToHand() + return c:IsSetCard(SET_MAGNA_WARRIOR) and c:IsLevel(8) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -46,14 +47,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2066) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -69,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c42024143.lua b/official/c42024143.lua index 377cc7cc5a..f0ba8399a7 100644 --- a/official/c42024143.lua +++ b/official/c42024143.lua @@ -1,4 +1,5 @@ --XX-セイバー ガルドストライク +--XX-Saber Gardestrike local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,13 +11,13 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.spfilter(c) - return c:IsSetCard(0x100d) and c:IsMonster() + return c:IsSetCard(SET_X_SABER) and c:IsMonster() end function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),LOCATION_GRAVE,0,2,nil) -end +end \ No newline at end of file diff --git a/official/c42029847.lua b/official/c42029847.lua index 6034767be1..958de000be 100644 --- a/official/c42029847.lua +++ b/official/c42029847.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.condition(e,c) return c:IsRace(RACE_FAIRY) end @@ -25,10 +25,10 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MELODIOUS)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c42035044.lua b/official/c42035044.lua index be3c672871..b2f310cfff 100644 --- a/official/c42035044.lua +++ b/official/c42035044.lua @@ -1,4 +1,5 @@ --漆黒の豹戦士パンサーウォリアー +--Panther Warrior local s,id=GetID() function s.initial_effect(c) --attack cost @@ -23,4 +24,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.AttackCostPaid(2) end end -end +end \ No newline at end of file diff --git a/official/c42035045.lua b/official/c42035045.lua deleted file mode 100644 index be3c672871..0000000000 --- a/official/c42035045.lua +++ /dev/null @@ -1,26 +0,0 @@ ---漆黒の豹戦士パンサーウォリアー -local s,id=GetID() -function s.initial_effect(c) - --attack cost - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_ATTACK_COST) - e1:SetCost(s.atcost) - e1:SetOperation(s.atop) - c:RegisterEffect(e1) -end -function s.atcost(e,c,tp) - return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) -end -function s.atop(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsAttackCostPaid()~=2 and e:GetHandler():IsLocation(LOCATION_MZONE) then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local tc=Duel.GetReleaseGroup(tp):Filter(aux.TRUE,e:GetHandler()):SelectUnselect(Group.CreateGroup(),tp,Duel.IsAttackCostPaid()==0, Duel.IsAttackCostPaid()==0) - if tc then - Duel.Release(tc,REASON_COST) - Duel.AttackCostPaid() - else - Duel.AttackCostPaid(2) - end - end -end diff --git a/official/c42052439.lua b/official/c42052439.lua index 6aa7b2ca16..7d94856ebc 100644 --- a/official/c42052439.lua +++ b/official/c42052439.lua @@ -1,7 +1,6 @@ --キリビ・レディ --Fire Flint Lady --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -65,7 +64,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e0:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e0:SetProperty(EFFECT_FLAG_CLIENT_HINT) e0:SetValue(aux.tgoval) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) g:GetFirst():RegisterEffect(e0) end end \ No newline at end of file diff --git a/official/c42055234.lua b/official/c42055234.lua index 43e3884290..a4076450c5 100644 --- a/official/c42055234.lua +++ b/official/c42055234.lua @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1,id) - e1:SetCondition(s.atkcond) - e1:SetCost(s.cost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,23 +30,16 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} -function s.atkcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_DRAGONMAID} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x133) + return c:IsFaceup() and c:IsSetCard(SET_DRAGONMAID) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -62,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -70,7 +63,7 @@ function s.incon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_FUSION),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:GetLevel()==3 and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==3 and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -87,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c4206964.lua b/official/c4206964.lua index c8deff110c..a2d6abb25b 100644 --- a/official/c4206964.lua +++ b/official/c4206964.lua @@ -1,4 +1,5 @@ --落とし穴 +--Trap Hole local s,id=GetID() function s.initial_effect(c) --Activate(summon) @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>=1000 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42079445.lua b/official/c42079445.lua index a4f0b846ca..4f5eacdac7 100644 --- a/official/c42079445.lua +++ b/official/c42079445.lua @@ -1,4 +1,5 @@ --ロスト・スター・ディセント +--Descending Lost Star local s,id=GetID() function s.initial_effect(c) --spsummon @@ -29,30 +30,30 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_UPDATE_LEVEL) e3:SetValue(-1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_SET_DEFENSE_FINAL) e4:SetValue(0) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4,true) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e5,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c42081767.lua b/official/c42081767.lua index 856e0e1b24..10f1bfb91e 100644 --- a/official/c42081767.lua +++ b/official/c42081767.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c42082363.lua b/official/c42082363.lua index 88f26335a8..af2d68e776 100644 --- a/official/c42082363.lua +++ b/official/c42082363.lua @@ -1,4 +1,5 @@ --ガスタ・グリフ +--Gusto Griffin local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42090294.lua b/official/c42090294.lua index 39a8aa96d5..073b82b9dd 100644 --- a/official/c42090294.lua +++ b/official/c42090294.lua @@ -1,5 +1,5 @@ --レプティレス・ニャミニ ---Reptilianne Nyamini +--Reptilianne Nyami --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -10,11 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,10 +33,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,RACE_REPTILE) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:HasNonZeroAttack() end if chk==0 then return Duel.IsExistingTarget(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,nil) end @@ -50,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) end @@ -73,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42097666.lua b/official/c42097666.lua index 0559920a66..2499eecdcf 100644 --- a/official/c42097666.lua +++ b/official/c42097666.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.SelfTributeCost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c42110434.lua b/official/c42110434.lua index 28cd4b2a28..0de0ad774d 100644 --- a/official/c42110434.lua +++ b/official/c42110434.lua @@ -1,4 +1,5 @@ --ナチュル・バタフライ +--Naturia Butterfly local s,id=GetID() function s.initial_effect(c) --negate attack @@ -23,4 +24,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,1,REASON_EFFECT) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c42110604.lua b/official/c42110604.lua index 06108bb447..265d16ca97 100644 --- a/official/c42110604.lua +++ b/official/c42110604.lua @@ -1,4 +1,5 @@ --HSRチャンバライダー +--Hi-Speedroid Chanbara local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -31,7 +32,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsRelateToBattle() end @@ -42,12 +43,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2016) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_SPEEDROID) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -61,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42143067.lua b/official/c42143067.lua index 5f34ce5d2a..9aefcd73d6 100644 --- a/official/c42143067.lua +++ b/official/c42143067.lua @@ -36,7 +36,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) e:SetLabelObject(g:GetFirst()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c42149850.lua b/official/c42149850.lua index eee83f1342..f91e618f94 100644 --- a/official/c42149850.lua +++ b/official/c42149850.lua @@ -1,7 +1,6 @@ --使い捨て学習装置 --Disposable Learner Device --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -37,7 +36,7 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -56,7 +55,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c42155488.lua b/official/c42155488.lua index f07d100a47..e7f1c8794c 100644 --- a/official/c42155488.lua +++ b/official/c42155488.lua @@ -51,7 +51,7 @@ function s.dectg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabel(rc) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -72,7 +72,7 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_CHECK) e1:SetValue(s.syncheck) - e1:SetReset(RESET_EVENT|RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetLabel(rc) c:RegisterEffect(e1) end @@ -80,4 +80,4 @@ end function s.syncheck(e,c) c:AssumeProperty(ASSUME_RACE,e:GetLabel()) return true -end +end \ No newline at end of file diff --git a/official/c4215636.lua b/official/c4215636.lua index b9ad6892d3..4dea468135 100644 --- a/official/c4215636.lua +++ b/official/c4215636.lua @@ -1,4 +1,5 @@ --霞の谷の祭壇 +--Shrine of Mist Valley local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c,tp) - return (c:GetReason()&0x41)==0x41 and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_WIND) + return (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_WIND) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -30,26 +31,26 @@ function s.spfilter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c42158279.lua b/official/c42158279.lua index 2b398e28db..8c13fb9378 100644 --- a/official/c42158279.lua +++ b/official/c42158279.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,0x146),location=LOCATION_HAND+LOCATION_DECK,matfilter=s.mfilter}) + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,SET_DOGMATIKA),location=LOCATION_HAND|LOCATION_DECK,matfilter=s.mfilter}) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) c:RegisterEffect(e1) @@ -18,17 +18,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thdtg) e2:SetOperation(s.thdop) c:RegisterEffect(e2) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} function s.mfilter(c) - return c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(0x146) or c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO)) + return c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(SET_DOGMATIKA) or c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO)) end function s.thdfilter(c,e) - return c:IsSetCard(0x146) and c:HasLevel() and (c:IsAbleToHand() or c:IsAbleToDeck()) + return c:IsSetCard(SET_DOGMATIKA) and c:HasLevel() and (c:IsAbleToHand() or c:IsAbleToDeck()) and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) diff --git a/official/c42160203.lua b/official/c42160203.lua index f53087bd07..20690cd52b 100644 --- a/official/c42160203.lua +++ b/official/c42160203.lua @@ -1,4 +1,5 @@ --覇王眷竜ダーク・リベリオン +--Supreme King Dragon Dark Rebellion local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -11,24 +12,24 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_CONFIRM) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --special summon - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,1)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON) - e4:SetType(EFFECT_TYPE_QUICK_O) - e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(0,TIMING_BATTLE_START) - e4:SetCondition(s.spcon) - e4:SetCost(s.spcost) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) - c:RegisterEffect(e4) + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_FREE_CHAIN) + e2:SetRange(LOCATION_MZONE) + e2:SetHintTiming(0,TIMING_BATTLE_START) + e2:SetCondition(s.spcon) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) end -s.listed_series={0x10f8,0x20f8} +s.listed_series={SET_SUPREME_KING_GATE,SET_SUPREME_KING_DRAGON} function s.matfilter(c,xyz,sumtype,tp) return c:IsType(TYPE_PENDULUM,xyz,sumtype,tp) and c:IsAttribute(ATTRIBUTE_DARK,xyz,sumtype,tp) end @@ -37,10 +38,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and bc:GetAttack()>0 end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=c:GetBattleTarget() @@ -49,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -57,22 +54,22 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(atk) c:RegisterEffect(e2) end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsFaceup() and (c:IsSetCard(0x10f8) or c:IsSetCard(0x20f8)) + return c:IsFaceup() and c:IsSetCard({SET_SUPREME_KING_GATE,SET_SUPREME_KING_DRAGON}) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -90,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c42166000.lua b/official/c42166000.lua index b38ced559b..e9dd4e5f50 100644 --- a/official/c42166000.lua +++ b/official/c42166000.lua @@ -73,9 +73,9 @@ end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) g:DeleteGroup() end function s.tglimit(e,c) return c:GetCode()~=id -end +end \ No newline at end of file diff --git a/official/c42167046.lua b/official/c42167046.lua index 6719e491b6..641f432201 100644 --- a/official/c42167046.lua +++ b/official/c42167046.lua @@ -1,4 +1,5 @@ --グレイモヤ不発弾 +--Widespread Dud local s,id=GetID() function s.initial_effect(c) --Activate @@ -65,4 +66,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42172465.lua b/official/c42172465.lua index aa383a6399..909af3ec6b 100644 --- a/official/c42172465.lua +++ b/official/c42172465.lua @@ -1,10 +1,11 @@ --創星改帰 ---Rebirth Revision +--World Reassembly --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --activate + --Special Summon 1 "World Legacy" monster from your hand or Deck local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -13,29 +14,30 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfe} -function s.filter(c,e,tp) - return c:IsSetCard(0xfe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +s.listed_series={SET_WORLD_LEGACY} +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCondition(s.descon) - e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount()) + e1:SetCondition(s.descon) + e1:SetOperation(s.desop) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) end @@ -48,4 +50,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42175079.lua b/official/c42175079.lua index c8633d9fad..9077bd98c6 100644 --- a/official/c42175079.lua +++ b/official/c42175079.lua @@ -1,4 +1,5 @@ --大噴火 +--Volcanic Eruption local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,7 +18,7 @@ function s.filter(c) return c:IsFaceup() and c:IsCode(10080320) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()==tp + return Duel.IsPhase(PHASE_END) and Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -28,4 +29,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42198835.lua b/official/c42198835.lua index 468f4c9201..6c4c636301 100644 --- a/official/c42198835.lua +++ b/official/c42198835.lua @@ -1,9 +1,9 @@ --- 外法の騎士 --- Illegal Knight --- Scripted by Hatter +--外法の騎士 +--Illegal Knight +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Change control + --Change control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_CONTROL+CATEGORY_TOHAND) diff --git a/official/c42201897.lua b/official/c42201897.lua index 2bfaf643fa..b609fcfc40 100644 --- a/official/c42201897.lua +++ b/official/c42201897.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c42216237.lua b/official/c42216237.lua index e019705a08..41c2753ad6 100644 --- a/official/c42216237.lua +++ b/official/c42216237.lua @@ -1,4 +1,5 @@ --ゼラの天使 +--Angel of Zera local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +24,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1,id) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -36,7 +37,7 @@ function s.atkval(e,c) end function s.spreg(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(Duel.GetTurnCount()) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c42228966.lua b/official/c42228966.lua index a7ed892195..7cba3994b0 100644 --- a/official/c42228966.lua +++ b/official/c42228966.lua @@ -44,15 +44,15 @@ s.listed_names={id} function s.checkop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsDamageCalculated() then return end if Duel.GetAttackTarget() then - Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 and Duel.GetFlagEffect(0,id)==0 + return Duel.IsPhase(PHASE_MAIN2) and Duel.GetFlagEffect(0,id)==0 end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.setfilter(c) return c:IsCode(id) and c:IsSSetable() @@ -78,4 +78,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.DiscardDeck(Duel.GetTurnPlayer(),5,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42230449.lua b/official/c42230449.lua index 8b667a62d0..21f4ac6e58 100644 --- a/official/c42230449.lua +++ b/official/c42230449.lua @@ -19,29 +19,29 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x14b} +s.listed_series={SET_NUMERON} s.xyz_number=2 function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsStatus(STATUS_OPPO_BATTLE) and c:IsRelateToBattle() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,nil) for tc in g:Iter() do --Double ATK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c42233477.lua b/official/c42233477.lua index 32e3f70abb..f60156d46e 100644 --- a/official/c42233477.lua +++ b/official/c42233477.lua @@ -1,7 +1,8 @@ --バーバリアン・レイジ +--Battleguard Rage local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsRace,RACE_WARRIOR),CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,s.condition) + aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsRace,RACE_WARRIOR),CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,aux.StatChangeDamageStepCondition) --eff local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -24,13 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() return tc and eg:IsContains(tc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42237854.lua b/official/c42237854.lua index ebadf35e92..7691cb92f6 100644 --- a/official/c42237854.lua +++ b/official/c42237854.lua @@ -42,7 +42,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,ft,nil) @@ -56,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,0,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) --atk @@ -65,14 +65,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.atkval) c:RegisterEffect(e1) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.tgfilter,nil,e) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e,nil,RESET_EVENT+RESETS_STANDARD_DISABLE) + aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e,nil,RESET_EVENT|RESETS_STANDARD_DISABLE) if #g<=0 or ft<=0 then return end local tg=nil if ft<#g then @@ -100,11 +100,11 @@ function s.equipop(c,e,tp,tc,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(Card.EquipByEffectLimit) e1:SetLabelObject(e:GetLabelObject()) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end function s.atkval(e,c) local atk=0 diff --git a/official/c42239546.lua b/official/c42239546.lua index 9cf3effdbf..a0bd121684 100644 --- a/official/c42239546.lua +++ b/official/c42239546.lua @@ -1,4 +1,5 @@ --C・モーグ +--Chrysalis Mole local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,24 +18,20 @@ s.listed_names={80344569,42015635} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(42015635) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(80344569) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsEnvironment(42015635) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42256406.lua b/official/c42256406.lua index 07d3366ce9..fc0f90859e 100644 --- a/official/c42256406.lua +++ b/official/c42256406.lua @@ -1,4 +1,5 @@ --カードブロッカー +--Card Blocker local s,id=GetID() function s.initial_effect(c) --to defense @@ -85,8 +86,8 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct*500) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c4227096.lua b/official/c4227096.lua index 8c3e0286fb..623162f245 100644 --- a/official/c4227096.lua +++ b/official/c4227096.lua @@ -1,4 +1,5 @@ --捕違い +--Mistaken Arrest local s,id=GetID() function s.initial_effect(c) --activate @@ -13,10 +14,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TO_HAND) e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) then + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c42280216.lua b/official/c42280216.lua index 14c530aefb..3536a4f491 100644 --- a/official/c42280216.lua +++ b/official/c42280216.lua @@ -1,4 +1,5 @@ --太陽の神官 +--Oracle of the Sun local s,id=GetID() function s.initial_effect(c) --special summon @@ -44,4 +45,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c42291297.lua b/official/c42291297.lua index 6e732b2c68..6044ae6e6d 100644 --- a/official/c42291297.lua +++ b/official/c42291297.lua @@ -1,4 +1,5 @@ --花札衛-雨四光- +--Flower Cardian Lightshower local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -9,7 +10,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe6)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FLOWER_CARDIAN)) e2:SetValue(1) c:RegisterEffect(e2) --cannot be target @@ -42,7 +43,7 @@ function s.initial_effect(c) e5:SetOperation(s.epop) c:RegisterEffect(e5) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.damcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and r==REASON_RULE end @@ -57,7 +58,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.epcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.eptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -82,7 +83,7 @@ function s.epop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_DP) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) Duel.RegisterEffect(e1,tp) elseif c:IsFaceup() and c:IsRelateToEffect(e) then Duel.NegateRelatedChain(c,RESET_TURN_SET) @@ -90,11 +91,11 @@ function s.epop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_OPPO_TURN) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c42303365.lua b/official/c42303365.lua index 4fced83d1b..2732d1d2e6 100644 --- a/official/c42303365.lua +++ b/official/c42303365.lua @@ -1,4 +1,5 @@ --レプティレス・バイパー +--Reptilianne Viper local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -26,4 +27,4 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()==0 then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c4230620.lua b/official/c4230620.lua index c420e10b14..162c863039 100644 --- a/official/c4230620.lua +++ b/official/c4230620.lua @@ -1,4 +1,5 @@ --サイキックブレイク +--Psi-Station local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -24,10 +25,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=eg:GetFirst() return c:IsOnField() and c:IsRace(RACE_PSYCHIC) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return true end @@ -41,13 +38,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(300) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c42309337.lua b/official/c42309337.lua index 0e08835ac6..4dd2fcbb56 100644 --- a/official/c42309337.lua +++ b/official/c42309337.lua @@ -1,4 +1,5 @@ --カウンター・カウンター +--Counter Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42314669.lua b/official/c42314669.lua index 95b597e83b..86323a9410 100644 --- a/official/c42314669.lua +++ b/official/c42314669.lua @@ -14,7 +14,7 @@ function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -25,9 +25,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsType(TYPE_SYNCHRO) -end +end \ No newline at end of file diff --git a/official/c42328171.lua b/official/c42328171.lua index 9a4274422e..2b78640fa1 100644 --- a/official/c42328171.lua +++ b/official/c42328171.lua @@ -1,4 +1,5 @@ --ゼンマイバット +--Wind-Up Bat local s,id=GetID() function s.initial_effect(c) --salvage @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end function s.filter(c) - return c:IsSetCard(0x58) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_WIND_UP) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -36,4 +37,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c42338879.lua b/official/c42338879.lua index 890f698c1e..92f86b989b 100644 --- a/official/c42338879.lua +++ b/official/c42338879.lua @@ -1,4 +1,5 @@ --こけコッコ +--Cockadoodledoo local s,id=GetID() function s.initial_effect(c) --special summon @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.recon(e) return e:GetHandler():IsFaceup() -end +end \ No newline at end of file diff --git a/official/c42352091.lua b/official/c42352091.lua index 3b4d9786e9..6ad72cf116 100644 --- a/official/c42352091.lua +++ b/official/c42352091.lua @@ -8,10 +8,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -38,11 +38,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 or not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.field,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,tp) end if not Duel.CheckPhaseActivity() then Duel.RegisterFlagEffect(tp,CARD_MAGICAL_MIDBREAKER,RESET_CHAIN,0,1) end diff --git a/official/c423585.lua b/official/c423585.lua index faa591b79e..10de6cca80 100644 --- a/official/c423585.lua +++ b/official/c423585.lua @@ -52,7 +52,7 @@ function s.costfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -72,7 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c42364257.lua b/official/c42364257.lua index 513dedd777..86ace7a871 100644 --- a/official/c42364257.lua +++ b/official/c42364257.lua @@ -1,4 +1,5 @@ --避雷針 +--Anti Raigeki local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42364374.lua b/official/c42364374.lua index e56725dd9b..09d6abb011 100644 --- a/official/c42364374.lua +++ b/official/c42364374.lua @@ -1,4 +1,5 @@ --アーマード・フライ +--Arsenal Bug local s,id=GetID() function s.initial_effect(c) --atk def @@ -17,4 +18,4 @@ end function s.con(e) local c=e:GetHandler() return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_INSECT),c:GetControler(),LOCATION_MZONE,0,1,c) -end +end \ No newline at end of file diff --git a/official/c423705.lua b/official/c423705.lua index f5e56b0ec6..4ea0833a3b 100644 --- a/official/c423705.lua +++ b/official/c423705.lua @@ -24,4 +24,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42377643.lua b/official/c42377643.lua index 338848763d..5c1df8a33d 100644 --- a/official/c42377643.lua +++ b/official/c42377643.lua @@ -1,7 +1,6 @@ --うにの軍貫 --Gunkan Suship Uni --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -29,13 +28,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Gunkan" archetype -s.listed_series={0x168} +s.listed_series={SET_GUNKAN} --Specifically lists "Gunkan Suship Shari" s.listed_names={CARD_SUSHIP_SHARI} - --Check for a "Gunkan" card to reveal function s.cfilter(c) - return c:IsSetCard(0x168) and not c:IsPublic() + return c:IsSetCard(SET_GUNKAN) and not c:IsPublic() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end @@ -78,7 +76,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Gunkan" monster with a level function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x168) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_GUNKAN) and c:HasLevel() end --Activation legality function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -103,7 +101,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then diff --git a/official/c42378577.lua b/official/c42378577.lua index 75cadc7f8c..f29dec44b6 100644 --- a/official/c42378577.lua +++ b/official/c42378577.lua @@ -67,4 +67,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c42382265.lua b/official/c42382265.lua index 81feca6239..c35d5bfa15 100644 --- a/official/c42382265.lua +++ b/official/c42382265.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1,id) e1:SetTarget(s.scaletg) diff --git a/official/c42386471.lua b/official/c42386471.lua index 5ac686e9a9..219ce17dbd 100644 --- a/official/c42386471.lua +++ b/official/c42386471.lua @@ -1,4 +1,5 @@ --トゥーン・ヂェミナイ・エルフ +--Toon Gemini Elf local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -43,7 +44,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.sfilter(c) @@ -76,5 +77,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) -end + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c42388271.lua b/official/c42388271.lua index db94e1e30a..117cce566d 100644 --- a/official/c42388271.lua +++ b/official/c42388271.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -49,10 +49,6 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end --Cost of sending from hand to GY -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end --Check for link monsters that can be special summoned function s.spfilter(c,e,tp) return c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsCanBeEffectTarget(e) @@ -79,7 +75,7 @@ function s.edfilter(c,tp) end --If this ever happened and monster was normal summoned function s.dkcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.edfilter,1,nil,1-tp) and e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) and rp~=tp + return eg:IsExists(s.edfilter,1,nil,1-tp) and e:GetHandler():IsNormalSummoned() and rp~=tp end --Check for a monster function s.dkfilter(c) @@ -97,5 +93,4 @@ function s.dkop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c4239451.lua b/official/c4239451.lua index 216165624e..0779fcdb87 100644 --- a/official/c4239451.lua +++ b/official/c4239451.lua @@ -1,4 +1,5 @@ --EMヒックリカエル +--Performapal Turn Toad local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -45,7 +46,7 @@ function s.adop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SWAP_ATTACK_FINAL) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SWAP_DEFENSE_FINAL) @@ -54,7 +55,7 @@ function s.adop1(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0 + return Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() and Duel.GetCurrentChain()==0 end function s.adtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsDefenseAbove(0) end @@ -73,11 +74,11 @@ function s.adop2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SWAP_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SWAP_DEFENSE_FINAL) e2:SetValue(atk) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c42421606.lua b/official/c42421606.lua index 2769f7864f..1d5a056ba0 100644 --- a/official/c42421606.lua +++ b/official/c42421606.lua @@ -17,17 +17,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.efcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.eftg) e2:SetOperation(s.efop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end s.roll_dice=true s.xyz_number=85 -function s.efcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) @@ -40,7 +36,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) elseif dc==3 then if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end elseif dc==4 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -52,14 +48,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end elseif dc==5 then @@ -74,4 +70,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c42425831.lua b/official/c42425831.lua index 6c5a2ce598..fe608444a6 100644 --- a/official/c42425831.lua +++ b/official/c42425831.lua @@ -33,15 +33,15 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SendtoDeck(cg,nil,1,REASON_COST) + Duel.SendtoDeck(cg,nil,SEQ_DECKBOTTOM,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then - return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) + return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,1-tp,LOCATION_GRAVE) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -50,4 +50,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not g or #g==0 then return end local rg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42429678.lua b/official/c42429678.lua index 7bde48ea99..a1b3eb0221 100644 --- a/official/c42429678.lua +++ b/official/c42429678.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x135) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_IGNISTER) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42431833.lua b/official/c42431833.lua index 39bdb205ac..505616f5be 100644 --- a/official/c42431833.lua +++ b/official/c42431833.lua @@ -1,5 +1,5 @@ --スプライト・ガンマ・バースト ---Splight Gamma Burst +--Spright Gamma Burst --Scripted by Zefile local s,id=GetID() function s.initial_effect(c) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,14 +24,11 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atkfilter(c) return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) end @@ -47,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1400) sc:RegisterEffect(e1) local e2=e1:Clone() @@ -68,7 +65,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(1400) tc:RegisterEffect(e1) end diff --git a/official/c42444868.lua b/official/c42444868.lua index 2c29be72d5..c3e6102e17 100644 --- a/official/c42444868.lua +++ b/official/c42444868.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10a} +s.listed_series={SET_PARSHATH} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsType(TYPE_COUNTER) and not c:IsPublic() @@ -32,19 +32,19 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetRange(LOCATION_HAND) e2:SetOperation(s.clearop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) e2:SetLabel(Duel.GetCurrentChain()) e2:SetLabelObject(e1) tc:RegisterEffect(e2) if not Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end Duel.PayLPCost(tp,1000) end @@ -53,11 +53,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PARSHATH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)) end @@ -65,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ec=re:GetHandler() if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then ec:CancelToGrave() - if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then + if Duel.SendtoDeck(ec,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil,e,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() @@ -80,4 +80,4 @@ function s.clearop(e,tp,eg,ep,ev,re,r,rp) if ev~=e:GetLabel() then return end e:GetLabelObject():Reset() e:Reset() -end +end \ No newline at end of file diff --git a/official/c42461852.lua b/official/c42461852.lua index 756e5655df..c6cc6bcda3 100644 --- a/official/c42461852.lua +++ b/official/c42461852.lua @@ -1,5 +1,5 @@ --サイバネット・ストーム ---Prototype, requires a core update for full implementation +--Cynet Storm local s,id=GetID() function s.initial_effect(c) --activate @@ -60,5 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end - +end \ No newline at end of file diff --git a/official/c42463414.lua b/official/c42463414.lua index d07a60d521..0701fd28f5 100644 --- a/official/c42463414.lua +++ b/official/c42463414.lua @@ -1,4 +1,5 @@ --ニードル・ギルマン +--Spined Gillman local s,id=GetID() function s.initial_effect(c) --atk up @@ -12,5 +13,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.atktg(e,c) - return c:IsRace(0x60040) -end + return c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) +end \ No newline at end of file diff --git a/official/c42469671.lua b/official/c42469671.lua index 6fa1b2d06f..2db1381e45 100644 --- a/official/c42469671.lua +++ b/official/c42469671.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={10000020} +s.listed_names={CARD_SLIFER} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalCodeRule,10000020),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalCodeRule,CARD_SLIFER),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -48,14 +48,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(s.atkcon) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetOperation(s.checkop) e2:SetLabelObject(e1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end @@ -68,6 +68,6 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local a=eg:GetFirst() if Duel.GetFlagEffect(tp,id)>0 or not a:IsControler(tp) then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) e:GetLabelObject():SetLabel(a:GetFieldID()) -end +end \ No newline at end of file diff --git a/official/c42472002.lua b/official/c42472002.lua index 6cf7679abe..3a52d43692 100644 --- a/official/c42472002.lua +++ b/official/c42472002.lua @@ -21,9 +21,9 @@ function s.initial_effect(c) e2:SetOperation(s.mtop) c:RegisterEffect(e2) end -s.listed_series={0x207a,0x107a} +s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) + return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(SET_NOBLE_ARMS) end function s.spcon(e,c) if c==nil then return true end @@ -36,7 +36,7 @@ end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - if not rc:IsSetCard(0x107a) then return end + if not rc:IsSetCard(SET_NOBLE_KNIGHT) then return end --reg eff local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -44,17 +44,17 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.effcon) e1:SetOperation(s.effop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + rc:RegisterFlagEffect(0,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerCanAdditionalSummon(tp) @@ -68,7 +68,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e0:SetDescription(aux.Stringid(id,2)) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) Duel.RegisterEffect(e0,tp) @@ -79,14 +79,14 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x107a) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_NOBLE_KNIGHT) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x107a) -end + return not c:IsOriginalSetCard(SET_NOBLE_KNIGHT) +end \ No newline at end of file diff --git a/official/c42502956.lua b/official/c42502956.lua index e17a68ef16..cedd70fac2 100644 --- a/official/c42502956.lua +++ b/official/c42502956.lua @@ -1,4 +1,5 @@ --エアーズロック・サンライズ +--Ayers Rock Sunrise local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,15 +28,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - local ct=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_BEAST+RACE_WINGEDBEAST+RACE_PLANT) + local ct=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_BEAST|RACE_WINGEDBEAST|RACE_PLANT) tc=g:GetFirst() for tc in aux.Next(g) do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*-200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c42516299.lua b/official/c42516299.lua index 71afa405a9..7283ed81eb 100644 --- a/official/c42516299.lua +++ b/official/c42516299.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) diff --git a/official/c42517468.lua b/official/c42517468.lua index bb0856268a..aeaa91d999 100644 --- a/official/c42517468.lua +++ b/official/c42517468.lua @@ -1,7 +1,6 @@ --ジャマ・ピンク --Ojama Pink --Scripted by The Razgriz - local s,id=GetID() function s.initial_effect(c) --Draw and discard @@ -16,8 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xf} - +s.listed_series={SET_OJAMA} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) or e:GetHandler():IsPreviousLocation(LOCATION_HAND) end @@ -34,14 +32,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sealbool=false if h1>0 then Duel.ShuffleHand(tp) - if Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)>0 then + if Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD)>0 then local dc=Duel.GetOperatedGroup():GetFirst() - if dc:IsSetCard(0xf) then sealbool=true end + if dc:IsSetCard(SET_OJAMA) then sealbool=true end end end if h2>0 then Duel.ShuffleHand(1-tp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end if sealbool and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -54,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetValue(zone) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end end \ No newline at end of file diff --git a/official/c4252828.lua b/official/c4252828.lua index 12f639d84f..0027a71239 100644 --- a/official/c4252828.lua +++ b/official/c4252828.lua @@ -51,7 +51,7 @@ function s.equipop(c,e,tp,tc) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(800) tc:RegisterEffect(e2) end @@ -71,5 +71,5 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipGroup():Filter(s.eqfilter,nil):GetFirst() - Duel.Destroy(ec,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(ec,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c42534368.lua b/official/c42534368.lua index 251c15eb2f..a5c5308669 100644 --- a/official/c42534368.lua +++ b/official/c42534368.lua @@ -1,6 +1,5 @@ --黙する死者 --Silent Doom - local s,id=GetID() function s.initial_effect(c) --Special summon 1 normal monster from GY, it cannot attack @@ -34,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c4253484.lua b/official/c4253484.lua index f40c2a949c..a44ce9dd36 100644 --- a/official/c4253484.lua +++ b/official/c4253484.lua @@ -1,4 +1,5 @@ --剣闘獣ホプロムス +--Gladiator Beast Hoplomus local s,id=GetID() function s.initial_effect(c) --def @@ -13,15 +14,15 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} function s.defcon(e) return e:GetHandler():GetFlagEffect(id)>0 @@ -29,18 +30,12 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,101,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,101,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -49,6 +44,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,101,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c42541548.lua b/official/c42541548.lua index dc5fc41640..975f5d25c5 100644 --- a/official/c42541548.lua +++ b/official/c42541548.lua @@ -1,4 +1,5 @@ --鬼ゴブリン +--Coach Goblin local s,id=GetID() function s.initial_effect(c) --draw @@ -17,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter(c) return c:IsType(TYPE_NORMAL) and c:IsAbleToDeckAsCost() @@ -27,7 +28,7 @@ function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,1,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -39,4 +40,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42542842.lua b/official/c42542842.lua index 1f70168b8a..e150e99244 100644 --- a/official/c42542842.lua +++ b/official/c42542842.lua @@ -19,12 +19,12 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter) end -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.counterfilter(c) - return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(0x121) + return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_MAYAKASHI) end function s.cfilter(c,tp) - return c:IsSetCard(0x121) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsControler(tp) + return c:IsSetCard(SET_MAYAKASHI) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -37,7 +37,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -53,8 +53,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end \ No newline at end of file diff --git a/official/c42544773.lua b/official/c42544773.lua index f124e686ba..672e675d41 100644 --- a/official/c42544773.lua +++ b/official/c42544773.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.effcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) @@ -21,18 +21,13 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end s.listed_series={SET_MAGISTUS} s.listed_names={id} -function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsSetCard(SET_MAGISTUS) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end @@ -105,4 +100,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c42551040.lua b/official/c42551040.lua index f4cc77b185..b65c8fb5bc 100644 --- a/official/c42551040.lua +++ b/official/c42551040.lua @@ -1,4 +1,5 @@ --武神器-イクタ +--Bujingi Boar local s,id=GetID() function s.initial_effect(c) --position @@ -9,14 +10,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.poscon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x88) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -38,7 +39,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c42560034.lua b/official/c42560034.lua index 349ba5f31e..c7504c1cf0 100644 --- a/official/c42560034.lua +++ b/official/c42560034.lua @@ -1,9 +1,9 @@ --- 夜の逃飛行 --- Night Flight --- Scripted by Hatter +--夜の逃飛行 +--Night Flight +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Return face-up monster to hand + --Return face-up monster to hand local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -24,7 +24,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then - -- Cannot activate cards/effects with the same name + --Cannot activate cards/effects with the same name local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -32,7 +32,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c42562690.lua b/official/c42562690.lua index 0011434c22..1090c1d5f1 100644 --- a/official/c42562690.lua +++ b/official/c42562690.lua @@ -1,4 +1,5 @@ --EMアメンボート +--Performapal Skeeter Skimmer local s,id=GetID() function s.initial_effect(c) --negate attack @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.ChangePosition(c,POS_FACEUP_DEFENSE)~=0 then Duel.NegateAttack() end -end +end \ No newline at end of file diff --git a/official/c42566602.lua b/official/c42566602.lua index 9b1d7f151a..890a76eecf 100644 --- a/official/c42566602.lua +++ b/official/c42566602.lua @@ -1,4 +1,5 @@ --瑚之龍 +--Coral Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -31,7 +32,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end @@ -48,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -59,4 +60,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42577802.lua b/official/c42577802.lua index c79804dbca..5e6c430e02 100644 --- a/official/c42577802.lua +++ b/official/c42577802.lua @@ -4,15 +4,14 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0x159), + local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_MYUTANT), matfilter=Card.IsAbleToRemove,extrafil=s.extrafil, extraop=Fusion.BanishMaterial,extratg=s.extrtarget}) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,aux.FALSE) end -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} function s.check(g1,g2) return function(tp,sg,fc) local c1=#(sg&g1) @@ -23,7 +22,7 @@ end function s.extrafil(e,tp,mg) if Duel.GetCustomActivityCount(id,1-e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 then return nil end local loc=LOCATION_DECK - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then loc=loc|LOCATION_GRAVE end local g=Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,loc,0,mg) @@ -31,6 +30,6 @@ function s.extrafil(e,tp,mg) end function s.extrtarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND+LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE+LOCATION_DECK) -end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND|LOCATION_MZONE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE|LOCATION_DECK) +end \ No newline at end of file diff --git a/official/c42578427.lua b/official/c42578427.lua index cde55dd126..991b2603f0 100644 --- a/official/c42578427.lua +++ b/official/c42578427.lua @@ -1,4 +1,5 @@ --ねずみ取り +--Eatgaboon local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()<=500 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42589641.lua b/official/c42589641.lua index 6a41b4d9bb..46c3cab775 100644 --- a/official/c42589641.lua +++ b/official/c42589641.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.hdcost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.hdtg) e4:SetOperation(s.hdop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) @@ -60,24 +60,24 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local p1=false local p2=false for tc in aux.Next(eg) do - if not tc:IsSetCard(0x9c) then + if not tc:IsSetCard(SET_TELLARKNIGHT) then if tc:GetSummonPlayer()==0 then p1=true else p2=true end end end - if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,0,1) end + if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end + if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) end end function s.xyzfilter(c,lc,SUMMON_TYPE_XYZ,tp) - return Duel.GetFlagEffect(c:GetControler(),id)==0 and c:IsSetCard(0x9c,lc,SUMMON_TYPE_XYZ,tp) + return Duel.GetFlagEffect(c:GetControler(),id)==0 and c:IsSetCard(SET_TELLARKNIGHT,lc,SUMMON_TYPE_XYZ,tp) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -85,19 +85,19 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,3)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9c) + return not c:IsSetCard(SET_TELLARKNIGHT) end function s.splimit(e,se,sp,st,spos,tgp) return (st&SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ or Duel.GetFlagEffect(tgp,id)==0 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -108,10 +108,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoHand(g,nil,REASON_EFFECT) end -function s.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) @@ -126,7 +122,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayCount()>0 and e:GetHandler():GetPreviousLocation()==LOCATION_MZONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -141,4 +137,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4259068.lua b/official/c4259068.lua index 23e0439275..fa7f8a0a84 100644 --- a/official/c4259068.lua +++ b/official/c4259068.lua @@ -1,4 +1,5 @@ --魔力倹約術 +--Spell Economics local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ function s.costchange(e,re,rp,val) else return val end -end +end \ No newline at end of file diff --git a/official/c42592719.lua b/official/c42592719.lua index 1dda15113f..2a19c82071 100644 --- a/official/c42592719.lua +++ b/official/c42592719.lua @@ -1,4 +1,5 @@ --剣闘獣アレクサンデル +--Gladiator Beast Alexander local s,id=GetID() function s.initial_effect(c) --immune spell @@ -15,10 +16,10 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -30,7 +31,7 @@ function s.initial_effect(c) e3:SetValue(s.splimit) c:RegisterEffect(e3) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} function s.splimit(e,se,sp,st) return st==(SUMMON_TYPE_SPECIAL+107) or st&SUMMON_TYPE_PENDULUM==SUMMON_TYPE_PENDULUM @@ -39,23 +40,17 @@ function s.imcon(e) return e:GetHandler():GetFlagEffect(id)>0 end function s.imfilter(e,te) - return te:IsActiveType(TYPE_SPELL) + return te:IsSpellEffect() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,111,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,111,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -63,6 +58,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,111,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c425934.lua b/official/c425934.lua index cbe63bc303..26c1fe87f9 100644 --- a/official/c425934.lua +++ b/official/c425934.lua @@ -11,4 +11,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_CANNOT_DISCARD_HAND) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c42596828.lua b/official/c42596828.lua index 6ad67f70af..275c5ed159 100644 --- a/official/c42596828.lua +++ b/official/c42596828.lua @@ -32,7 +32,7 @@ function s.defcfilter(c) end function s.defcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.defcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.defcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.defcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.defop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,7 +41,7 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -66,7 +66,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(function(e2,c2) return c2==c or c2==bc end) e1:SetValue(function(e3,c3) return c3:GetDefense() end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c42598242.lua b/official/c42598242.lua index 370fd7d7cd..ace8a6812e 100644 --- a/official/c42598242.lua +++ b/official/c42598242.lua @@ -1,4 +1,5 @@ --スペシャルハリケーン +--Special Hurricane local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -26,4 +27,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42600274.lua b/official/c42600274.lua index 649b4ee628..f765445696 100644 --- a/official/c42600274.lua +++ b/official/c42600274.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) end function s.hspcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,1,true,1,true,c,c:GetControler(),nil,false,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,1,true,1,true,c,c:GetControler(),nil,false,e:GetHandler(),RACE_WARRIOR|RACE_FAIRY) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,true,true,true,c,nil,nil,false,e:GetHandler(),RACE_WARRIOR+RACE_FAIRY) + local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,true,true,true,c,nil,nil,false,e:GetHandler(),RACE_WARRIOR|RACE_FAIRY) if g then g:KeepAlive() e:SetLabelObject(g) @@ -46,7 +46,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_RITUAL) end function s.thfilter(c) - return c:GetType()==0x82 and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42620460.lua b/official/c42620460.lua index 53641ec46d..10c3479be2 100644 --- a/official/c42620460.lua +++ b/official/c42620460.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.rmvcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rmvtg) e2:SetOperation(s.rmvop) c:RegisterEffect(e2) diff --git a/official/c42632209.lua b/official/c42632209.lua index dda980dba7..29451d6933 100644 --- a/official/c42632209.lua +++ b/official/c42632209.lua @@ -57,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c42647539.lua b/official/c42647539.lua index 33897c06f0..bfb8652070 100644 --- a/official/c42647539.lua +++ b/official/c42647539.lua @@ -1,4 +1,5 @@ --ガーゴイルの道化師 +--Ryu-Kishin Clown local s,id=GetID() function s.initial_effect(c) --pos @@ -33,4 +34,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c42664989.lua b/official/c42664989.lua index 1f31176963..30cd44cd34 100644 --- a/official/c42664989.lua +++ b/official/c42664989.lua @@ -1,4 +1,5 @@ --天よりの宝札 +--Card of Sanctity local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,8 +14,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end - local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler()) end + local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ht<2 then Duel.Draw(p,2-ht,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4266839.lua b/official/c4266839.lua index 44f6f9f5a2..da60f58a0f 100644 --- a/official/c4266839.lua +++ b/official/c4266839.lua @@ -1,4 +1,5 @@ --精神寄生体 +--Kiseitai local s,id=GetID() function s.initial_effect(c) --damage @@ -27,7 +28,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) --recover @@ -35,20 +36,20 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.recon) e2:SetTarget(s.retg) e2:SetOperation(s.reop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) return e:GetOwner()==c end function s.recon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.retg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -63,4 +64,4 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp) local atk=ec:GetAttack() Duel.Recover(tp,atk/2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42671151.lua b/official/c42671151.lua index 99cb60d5f2..cc61dc6ecd 100644 --- a/official/c42671151.lua +++ b/official/c42671151.lua @@ -33,11 +33,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c42679662.lua b/official/c42679662.lua index 73744cadb3..86c7b64b61 100644 --- a/official/c42679662.lua +++ b/official/c42679662.lua @@ -1,4 +1,5 @@ --ヴェルズ・アザトホース +--Evilswarm Azzathoth local s,id=GetID() function s.initial_effect(c) --flip @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToDeck() + return c:IsSpecialSummoned() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -24,6 +25,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42682609.lua b/official/c42682609.lua index dbdc2c52a7..793a5378d4 100644 --- a/official/c42682609.lua +++ b/official/c42682609.lua @@ -1,4 +1,5 @@ --C・ドルフィーナ +--Chrysalis Dolphin local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,24 +18,20 @@ s.listed_names={17955766,42015635} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(42015635) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(17955766) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsEnvironment(42015635) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42685062.lua b/official/c42685062.lua index d4c72cb035..44d655d687 100644 --- a/official/c42685062.lua +++ b/official/c42685062.lua @@ -1,4 +1,5 @@ --地獄からの使い +--Emissary from Pandemonium local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -25,7 +26,7 @@ end function s.sumop(e,tp,eg,ep,ev,re,r,rp,c) local g=Duel.SelectTribute(tp,c,1,1) c:SetMaterial(g) - Duel.Release(g,REASON_SUMMON+REASON_MATERIAL) + Duel.Release(g,REASON_SUMMON|REASON_MATERIAL) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) @@ -40,4 +41,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp,c) e3:SetCode(EFFECT_SET_BASE_DEFENSE) e3:SetValue(900) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c42703248.lua b/official/c42703248.lua index 649fb0ccd4..0fe161fb79 100644 --- a/official/c42703248.lua +++ b/official/c42703248.lua @@ -1,4 +1,5 @@ --ハリケーン +--Giant Trunade local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42705243.lua b/official/c42705243.lua index 76ed07f1fa..50a09e926b 100644 --- a/official/c42705243.lua +++ b/official/c42705243.lua @@ -15,15 +15,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.spfilter(c,e,tp) - return c:IsSetCard(0x18e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MIKANKO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.eqfilter(c,tc,tp) return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) @@ -31,7 +31,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Banish it if it leaves the field local e1=Effect.CreateEffect(e:GetHandler()) @@ -39,13 +39,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1) Duel.SpecialSummonComplete() --Equip the summoned monster with an appropriate Equip Spell if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end - local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tc,tp) + local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,tc,tp) if #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local sg=tg:Select(tp,1,1,nil) diff --git a/official/c42709949.lua b/official/c42709949.lua index 9c004efd88..73a7268fce 100644 --- a/official/c42709949.lua +++ b/official/c42709949.lua @@ -1,4 +1,5 @@ --守護神の矛 +--Phalanx Pike local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -11,4 +12,4 @@ function s.initial_effect(c) end function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,c:GetCode())*900 -end +end \ No newline at end of file diff --git a/official/c42713844.lua b/official/c42713844.lua index f97545d96e..c5aa696059 100644 --- a/official/c42713844.lua +++ b/official/c42713844.lua @@ -1,4 +1,5 @@ --Subterror Behemoth Umastryx +--Subterror Behemoth Umastryx local s,id=GetID() function s.initial_effect(c) --flip @@ -66,7 +67,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +75,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c42717221.lua b/official/c42717221.lua index d0efa1a9a9..d8cd7d8ead 100644 --- a/official/c42717221.lua +++ b/official/c42717221.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.gycon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -64,7 +64,7 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -72,7 +72,7 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(c:GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) end end @@ -87,7 +87,7 @@ function s.tgtg(e,c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsFusionSummoned() and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsSpell() and c:IsAbleToHand() @@ -103,4 +103,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c42737833.lua b/official/c42737833.lua index 38554c2d8d..3e8a52006f 100644 --- a/official/c42737833.lua +++ b/official/c42737833.lua @@ -1,4 +1,5 @@ --XX-セイバー エマーズブレイド +--XX-Saber Emmersblade local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:GetLevel()<=4 and c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()<=4 and c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c42741437.lua b/official/c42741437.lua index d886cf2834..6681d43200 100644 --- a/official/c42741437.lua +++ b/official/c42741437.lua @@ -1,26 +1,26 @@ --- エクソシスター・ミカエリス --- Exorsister Mikailis --- Scripted by Hatter +--エクソシスター・ミカエリス +--Exosister Mikailis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Level 4 monsters + --2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - -- Check materials on Xyz Summon + --Check materials on Xyz Summon local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) - -- Battle destruction immunity + --Battle destruction immunity local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(function(_,c)return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_GRAVE)end) + e1:SetValue(function(_,c)return c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_GRAVE)end) c:RegisterEffect(e1) - -- Banish 1 card the opponent controls + --Banish 1 card the opponent controls local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_REMOVE) @@ -34,32 +34,32 @@ function s.initial_effect(c) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) - -- Search 1 "Exosister" Spell/Trap + --Search 1 "Exosister" Spell/Trap local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.thcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x174) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END + if g:IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and chkc:IsAbleToRemove() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_ONFIELD) and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -68,12 +68,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) - return c:IsSetCard(0x174) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_EXOSISTER) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c42752141.lua b/official/c42752141.lua index 75ab96fa4f..023633b0a8 100644 --- a/official/c42752141.lua +++ b/official/c42752141.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c42776855.lua b/official/c42776855.lua index f11a61da9b..db038d6755 100644 --- a/official/c42776855.lua +++ b/official/c42776855.lua @@ -1,7 +1,8 @@ --追走の翼 +--Follow Wing local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,s.filter,nil,nil,nil,0x1e0) + aux.AddPersistentProcedure(c,0,s.filter,nil,nil,nil,TIMINGS_CHECK_MONSTER_E) --indes local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -60,7 +61,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -70,4 +71,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42776960.lua b/official/c42776960.lua index 685959538b..a4c8c498e5 100644 --- a/official/c42776960.lua +++ b/official/c42776960.lua @@ -30,21 +30,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetTargetRange(1,0) e1:SetCondition(s.con) e1:SetValue(0) tc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_LEAVE_FIELD) e3:SetLabel(1-tp) e3:SetOperation(s.leaveop) - e3:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_MSCHANGE+RESET_TURN_SET) + e3:SetReset(RESET_EVENT|RESET_OVERLAY|RESET_MSCHANGE|RESET_TURN_SET) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() @@ -54,4 +54,4 @@ function s.con(e) end function s.leaveop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(e:GetLabel(),WIN_REASON_RELAY_SOUL) -end +end \ No newline at end of file diff --git a/official/c42790071.lua b/official/c42790071.lua index 344775873f..9683fa0fe6 100644 --- a/official/c42790071.lua +++ b/official/c42790071.lua @@ -29,13 +29,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} s.listed_names={id} function s.counterfilter(c) - return c:IsSetCard(0x103) + return c:IsSetCard(SET_ALTERGEIST) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and rp==tp end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -56,16 +56,16 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(id,2)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x103) + return not c:IsSetCard(SET_ALTERGEIST) end function s.filter(c,e,tp) - return c:IsSetCard(0x103) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_ALTERGEIST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c42793609.lua b/official/c42793609.lua index a5cb5f9269..9d92773cae 100644 --- a/official/c42793609.lua +++ b/official/c42793609.lua @@ -1,4 +1,5 @@ --極星宝ブリージンガ・メン +--Nordic Relic Brisingamen local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) @@ -39,6 +37,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) ac:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c4280258.lua b/official/c4280258.lua index 02185a12bb..57439b34ff 100644 --- a/official/c4280258.lua +++ b/official/c4280258.lua @@ -31,7 +31,7 @@ function s.lcheck(g,lc,sumtype,tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsSummonType(SUMMON_TYPE_LINK) then return end + if not c:IsLinkSummoned() then return end --Set original ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c42810973.lua b/official/c42810973.lua index 6f90cd32ea..4fa30861cb 100644 --- a/official/c42810973.lua +++ b/official/c42810973.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) end s.material={63977008} s.listed_names={63977008} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,63977008) or c:IsHasEffect(20932152) end @@ -32,11 +32,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetLabelObject(tc) e1:SetOperation(s.retop) @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c42829885.lua b/official/c42829885.lua index 019bafec0b..eb362147e1 100644 --- a/official/c42829885.lua +++ b/official/c42829885.lua @@ -1,4 +1,5 @@ --強引な番兵 +--The Forceful Sentry local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(p,g) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c42851643.lua b/official/c42851643.lua index c8494916d8..5877f6b3aa 100644 --- a/official/c42851643.lua +++ b/official/c42851643.lua @@ -1,4 +1,5 @@ --穿孔重機ドリルジャンボ +--Jumbo Drill local s,id=GetID() function s.initial_effect(c) --lvup @@ -37,7 +38,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -49,4 +50,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c42868711.lua b/official/c42868711.lua index 85af56957d..19af66a53c 100644 --- a/official/c42868711.lua +++ b/official/c42868711.lua @@ -32,7 +32,7 @@ function s.distg(e,c) return c:IsControler(1-e:GetHandlerPlayer()) and c:IsHasCardTarget(e:GetHandler()) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end + if rp==tp or not re:IsSpellTrapEffect() then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g==0 then return end @@ -41,4 +41,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(re:GetHandler(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c42874792.lua b/official/c42874792.lua index 0c482d999c..fe95b2d093 100644 --- a/official/c42874792.lua +++ b/official/c42874792.lua @@ -1,4 +1,5 @@ --ゼンマイラビット +--Wind-Up Rabbit local s,id=GetID() function s.initial_effect(c) --remove @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsAbleToRemove() + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -27,14 +28,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then - if Duel.GetCurrentPhase()==PHASE_DRAW then + if Duel.IsTurnPlayer(tp) then + if Duel.IsPhase(PHASE_DRAW) then e1:SetLabel(Duel.GetTurnCount()) else e1:SetLabel(Duel.GetTurnCount()+2) @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) else e1:SetLabel(Duel.GetTurnCount()+1) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) tc:RegisterEffect(e1) @@ -54,4 +55,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetHandler()) e:Reset() -end +end \ No newline at end of file diff --git a/official/c42878636.lua b/official/c42878636.lua index ba1ec8c9cc..d848768068 100644 --- a/official/c42878636.lua +++ b/official/c42878636.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCondition(s.actcon) c:RegisterEffect(e2) --special summon - local params = {aux.FilterBoolFunction(Card.IsSetCard,0x7)} + local params = {aux.FilterBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR)} local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -50,4 +50,4 @@ function s.aclimit(e,re,tp) end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c42880485.lua b/official/c42880485.lua index 33f18229c3..3a9d9f3b73 100644 --- a/official/c42880485.lua +++ b/official/c42880485.lua @@ -45,15 +45,15 @@ function s.initial_effect(c) e7:SetValue(1) c:RegisterEffect(e7) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.splimcon(e) return not e:GetHandler():IsForbidden() end function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0x9a) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -69,7 +69,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -84,5 +84,5 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.otfilter(c,tp) - return c:IsSetCard(0x9a) and (c:IsControler(tp) or c:IsFaceup()) -end + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and (c:IsControler(tp) or c:IsFaceup()) +end \ No newline at end of file diff --git a/official/c42883273.lua b/official/c42883273.lua index 309fde1c8f..5d47b86b80 100644 --- a/official/c42883273.lua +++ b/official/c42883273.lua @@ -1,4 +1,5 @@ --森の住人 ウダン +--Wodan the Resident of the Forest local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,4 +12,4 @@ function s.initial_effect(c) end function s.value(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),0,LOCATION_MZONE,LOCATION_MZONE,nil)*100 -end +end \ No newline at end of file diff --git a/official/c42899204.lua b/official/c42899204.lua index 08d23a6a9e..f261ecec97 100644 --- a/official/c42899204.lua +++ b/official/c42899204.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e4:SetTarget(aux.PersistentTargetFilter) e4:SetCondition(s.sccon) - e4:SetValue(0x129) + e4:SetValue(SET_EVIL_EYE) c:RegisterEffect(e4) --destroy local e5=Effect.CreateEffect(c) @@ -48,10 +48,10 @@ function s.initial_effect(c) e5:SetOperation(s.desop) c:RegisterEffect(e5) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={CARD_EVIL_EYE_SELENE} function s.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x129) + return c:IsFaceup() and c:IsSetCard(SET_EVIL_EYE) end function s.cfilter2(c,e,tp,eg) return c:IsSummonPlayer(1-tp) and c:IsCanBeEffectTarget(e) and c:IsControlerCanBeChanged() and c:IsPosition(POS_FACEUP_ATTACK) @@ -80,7 +80,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e1:SetRange(LOCATION_MZONE) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetCondition(s.con) tc:RegisterEffect(e1) end @@ -104,4 +104,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42901635.lua b/official/c42901635.lua index f3254422f5..cd9b1ac1cd 100644 --- a/official/c42901635.lua +++ b/official/c42901635.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x2066} +s.listed_series={SET_MAGNET_WARRIOR} s.listed_names={42023223,79418928,15502037} function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.cchk1,1,nil,sg) @@ -55,9 +55,9 @@ function s.spcon(e,c) local c=e:GetHandler() if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,42023223) - local rg2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,79418928) - local rg3=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,15502037) + local rg1=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,42023223) + local rg2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,79418928) + local rg3=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,15502037) local rg=rg1:Clone() rg:Merge(rg2) rg:Merge(rg3) @@ -66,9 +66,9 @@ function s.spcon(e,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,42023223) - rg:Merge(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,79418928)) - rg:Merge(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,c,15502037)) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,42023223) + rg:Merge(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,79418928)) + rg:Merge(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,c,15502037)) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -84,13 +84,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.costfilter(c) - return c:IsMonster() and (c:IsSetCard(0x2066) or c:IsCode(99785935,39256679,11549357)) and c:IsLevelBelow(4) and c:IsAbleToRemoveAsCost() + return c:IsMonster() and (c:IsSetCard(SET_MAGNET_WARRIOR) or c:IsCode(99785935,39256679,11549357)) and c:IsLevelBelow(4) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -145,4 +145,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c4290468.lua b/official/c4290468.lua index 8c23a5ed13..4f7b50f4d5 100644 --- a/official/c4290468.lua +++ b/official/c4290468.lua @@ -1,6 +1,5 @@ --スプレンディッド・ローズ --Splendid Rose - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -35,9 +34,9 @@ function s.costfilter(c) return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -52,18 +51,18 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end function s.dacon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and e:GetHandler():GetAttackedGroupCount()~=0 + return Duel.IsBattlePhase() and e:GetHandler():GetAttackedGroupCount()~=0 and Duel.GetAttacker()==nil and Duel.GetCurrentChain()==0 end function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.daop(e,tp,eg,ep,ev,re,r,rp) @@ -74,7 +73,7 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(c:GetAttack()/2) c:RegisterEffect(e1) --Can make a second attack @@ -83,7 +82,7 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) c:RegisterEffect(e2) end \ No newline at end of file diff --git a/official/c42908201.lua b/official/c42908201.lua index 97bac75bea..5974dc1fae 100644 --- a/official/c42908201.lua +++ b/official/c42908201.lua @@ -1,5 +1,5 @@ --デスマニア・デビル ---Desmania Devil +--Desmanian Devil --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -28,5 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c42921475.lua b/official/c42921475.lua index 7983a0cdea..21c8f43000 100644 --- a/official/c42921475.lua +++ b/official/c42921475.lua @@ -1,7 +1,8 @@ --妖精伝姫-ターリア +--Fairy Tail - Sleeper local s,id=GetID() function s.initial_effect(c) - --flip + --FLIP: You can Special Summon 1 monster from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --change effect + --Change the activated effect of an opponent's Normal Spell/Trap to "Change 1 face-up monster your opponent controls to face-down Defense Position" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) @@ -41,21 +42,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.chcon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - return rp==1-tp and (rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end -function s.cfilter(c) - return not c:IsStatus(STATUS_BATTLE_DESTROYED) + return rp==1-tp and rc:IsNormalSpellTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,e:GetHandler()) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,e:GetHandler()) + local c=e:GetHandler() + if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,false,nil,c) end + local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,false,nil,c) Duel.Release(g,REASON_COST) end -function s.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() -end function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,rp,0,LOCATION_MZONE,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,rp,0,LOCATION_MZONE,1,nil) end end function s.chop(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() @@ -64,11 +60,11 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) end function s.repop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP then + if c:IsNormalSpellTrap() then c:CancelToGrave(false) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end diff --git a/official/c42925441.lua b/official/c42925441.lua index 4e3f68eddb..b1078d2712 100644 --- a/official/c42925441.lua +++ b/official/c42925441.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.effop) c:RegisterEffect(e2) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -33,12 +33,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetDescription(aux.Stringid(12670770,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3) c:SetTurnCounter(0) c:RegisterEffect(e1) if s.effcost(e,tp,eg,ep,ev,re,r,rp,0) @@ -50,7 +50,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -63,27 +63,27 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESETS_STANDARD_PHASE_END,0,1) end function s.costfilter1(c,e,tp) - return c:IsAbleToGraveAsCost() and c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and Duel.GetMZoneCount(tp,c)>0 + return c:IsAbleToGraveAsCost() and c:IsFaceup() and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode()) end function s.spfilter1(c,e,tp,code) - return c:IsSetCard(0x55) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PHOTON) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.costfilter2(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and c:IsAbleToGraveAsCost() end function s.thfilter(c) - return c:IsSetCard(0x55) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PHOTON) and not c:IsCode(id) and c:IsAbleToHand() end function s.costfilter3(c,e,tp) return c:IsAbleToGraveAsCost() and c:IsFaceup() and c:IsCode(CARD_GALAXYEYES_P_DRAGON) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalCode()) end function s.spfilter2(c,e,tp,code) - return c:IsSetCard(0x55) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PHOTON) and c:GetOriginalCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c) end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -155,5 +155,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) end end end -end - +end \ No newline at end of file diff --git a/official/c42932862.lua b/official/c42932862.lua index d45ed4bd64..f2dcc8d4ac 100644 --- a/official/c42932862.lua +++ b/official/c42932862.lua @@ -1,5 +1,5 @@ --冥占術姫タロットレイス ---Nether Prediction Princess Tarotreith +--Prediction Princess Tarotreith --Scripted by DyXel local s,id=GetID() function s.initial_effect(c) diff --git a/official/c42940335.lua b/official/c42940335.lua index 6777fd88be..1c14f754ce 100644 --- a/official/c42940335.lua +++ b/official/c42940335.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -95,4 +95,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c42940404.lua b/official/c42940404.lua index 8a90ae52ce..89b692fd9c 100644 --- a/official/c42940404.lua +++ b/official/c42940404.lua @@ -1,6 +1,5 @@ --マシンナーズ・ギアフレーム --Machina Gearframe - local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),false) @@ -14,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.sop) c:RegisterEffect(e1) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} s.listed_names={id} function s.sfilter(c) - return c:IsSetCard(0x36) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MACHINA) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.stg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end @@ -30,4 +29,4 @@ function s.sop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c42945701.lua b/official/c42945701.lua index 9074917db6..1dcae3c486 100644 --- a/official/c42945701.lua +++ b/official/c42945701.lua @@ -1,4 +1,5 @@ --火霊術-「紅」 +--Spiritual Fire Art - Kurenai local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c42956963.lua b/official/c42956963.lua index cb04ec30ba..a14a3193d3 100644 --- a/official/c42956963.lua +++ b/official/c42956963.lua @@ -20,13 +20,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x45,TYPES_TOKEN,2000,2000,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ARCHFIEND,TYPES_TOKEN,2000,2000,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<3 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x45,TYPES_TOKEN,2000,2000,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ARCHFIEND,TYPES_TOKEN,2000,2000,6,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then return end for i=1,3 do local token=Duel.CreateToken(tp,id+1) if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) then @@ -45,4 +45,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(c:GetPreviousControler(),800,REASON_EFFECT) end e:Reset() -end +end \ No newline at end of file diff --git a/official/c42969214.lua b/official/c42969214.lua index 5c75ac5b63..865d62e5a0 100644 --- a/official/c42969214.lua +++ b/official/c42969214.lua @@ -1,6 +1,5 @@ --アイアイアン --Aye-Iron - local s,id=GetID() function s.initial_effect(c) --Gain 400 ATK, cannot attack this turn @@ -22,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -33,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c42994702.lua b/official/c42994702.lua index 4019f05f90..39589173a4 100644 --- a/official/c42994702.lua +++ b/official/c42994702.lua @@ -1,4 +1,5 @@ --さまようミイラ +--Wandering Mummy local s,id=GetID() function s.initial_effect(c) --turn set @@ -14,7 +15,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.filter(c) @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) Duel.ShuffleSetCard(g) end -end +end \ No newline at end of file diff --git a/official/c43002864.lua b/official/c43002864.lua index ace928574b..f498f84e38 100644 --- a/official/c43002864.lua +++ b/official/c43002864.lua @@ -1,4 +1,5 @@ --レプティレス・ガードナー +--Reptilianne Gardna local s,id=GetID() function s.initial_effect(c) --search @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3c} +s.listed_series={SET_REPTILIANNE} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) @@ -22,7 +23,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return c:IsSetCard(0x3c) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_REPTILIANNE) and c:IsMonster() and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c43004235.lua b/official/c43004235.lua index 78f968d10b..91c1dc96b2 100644 --- a/official/c43004235.lua +++ b/official/c43004235.lua @@ -1,7 +1,6 @@ --海造賊-祝宴 --Plunder Patroll Parrrty --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Draw, then shuffle card(s) from hand to deck @@ -29,10 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.eqpop) c:RegisterEffect(e2) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x13f),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PLUNDER_PATROLL),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_EQUIP),tp,LOCATION_ONFIELD,0,nil) @@ -54,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.eqptgfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x13f) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_MZONE) and c:IsSummonPlayer(tp) + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_MZONE) and c:IsSummonPlayer(tp) end function s.eqptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg and eg:IsExists(s.eqptgfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end @@ -76,16 +74,16 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end function s.eqlimit(e,c) return c:GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c43011492.lua b/official/c43011492.lua index 4ce4f54c7b..8e09cce6fe 100644 --- a/official/c43011492.lua +++ b/official/c43011492.lua @@ -1,5 +1,5 @@ --惨禍の呪眼 ---Evil Eye of Disaster +--Evil Eye Confrontation --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.descond) @@ -16,20 +16,20 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={CARD_EVIL_EYE_SELENE} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x129) + return c:IsFaceup() and c:IsSetCard(SET_EVIL_EYE) end function s.descond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.desfilter(chkc) and chkc~=e:GetHandler() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,c,TYPE_SPELL+TYPE_TRAP) end + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() and chkc~=e:GetHandler() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,c,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,c) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -41,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end Duel.Destroy(tc,REASON_EFFECT,dest) end -end +end \ No newline at end of file diff --git a/official/c43014054.lua b/official/c43014054.lua index 67be718bd0..ed6aaeecd3 100644 --- a/official/c43014054.lua +++ b/official/c43014054.lua @@ -1,4 +1,5 @@ --バイス・バーサーカー +--Vice Berserker local s,id=GetID() function s.initial_effect(c) --damage & atk @@ -30,8 +31,8 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(2000) rc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c43017476.lua b/official/c43017476.lua index 307249b179..6127df4c76 100644 --- a/official/c43017476.lua +++ b/official/c43017476.lua @@ -1,4 +1,5 @@ --デューテリオン +--Duoterion local s,id=GetID() function s.initial_effect(c) --search @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,14 +28,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x100} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_BONDING} function s.filter(c) - return c:IsSetCard(0x100) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_BONDING) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -64,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c43034264.lua b/official/c43034264.lua index 228817f2cf..b6f24a2542 100644 --- a/official/c43034264.lua +++ b/official/c43034264.lua @@ -13,8 +13,8 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_FZONE) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_QLI)) c:RegisterEffect(e2) --cannot disable summon local e3=Effect.CreateEffect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) e3:SetRange(LOCATION_FZONE) e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_QLI)) c:RegisterEffect(e3) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} \ No newline at end of file diff --git a/official/c43047672.lua b/official/c43047672.lua index fa1f1a32ed..adf5526c73 100644 --- a/official/c43047672.lua +++ b/official/c43047672.lua @@ -1,4 +1,5 @@ --RR-ファイナル・フォートレス・ファルコン +--Raidraptor - Final Fortress Falcon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -35,9 +36,9 @@ function s.initial_effect(c) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.imfilter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) end function s.imcon(e) return e:GetHandler():GetOverlayGroup():IsExists(s.imfilter,1,nil) @@ -45,12 +46,8 @@ end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xba) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_REMOVED,0,1,nil) end @@ -60,7 +57,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_REMOVED,0,nil) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) end end function s.atcon(e,tp,eg,ep,ev,re,r,rp) @@ -68,14 +65,14 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:CanChainAttack(0) end function s.atfilter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.atfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c43061293.lua b/official/c43061293.lua index 23ec3e4127..3d5d03732e 100644 --- a/official/c43061293.lua +++ b/official/c43061293.lua @@ -27,4 +27,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d1,d2,d3=Duel.TossDice(tp,3) Duel.Damage(p,(d1+d2+d3)*100,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43066927.lua b/official/c43066927.lua index 5d2fe454da..68469169d6 100644 --- a/official/c43066927.lua +++ b/official/c43066927.lua @@ -86,4 +86,4 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) elseif op==2 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c43114901.lua b/official/c43114901.lua index 6634c7725a..ab77ad886a 100644 --- a/official/c43114901.lua +++ b/official/c43114901.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) if not Gemini.EffectStatusCondition(e) then return false end local tc=eg:GetFirst() @@ -23,7 +23,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) end function s.filter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -36,4 +36,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c43138260.lua b/official/c43138260.lua index a84baa1f5d..839be4515c 100644 --- a/official/c43138260.lua +++ b/official/c43138260.lua @@ -1,6 +1,5 @@ --エクシーズ・リモーラ --Xyz Remora - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -62,18 +61,18 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Negate their effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) --Cannot change their battle positions local e4=Effect.CreateEffect(c) @@ -81,14 +80,14 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_CLIENT_HINT) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4) --Cannot be used as Xyz material, except for a WATER monster local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e5:SetValue(s.xyzlimit) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e5) end Duel.SpecialSummonComplete() diff --git a/official/c43140791.lua b/official/c43140791.lua index 78e66e9e1d..2bc317c0ca 100644 --- a/official/c43140791.lua +++ b/official/c43140791.lua @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) @@ -39,7 +39,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -49,17 +49,17 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x3e,TYPES_TOKEN,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_WORM,TYPES_TOKEN,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x3e,TYPES_TOKEN,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_WORM,TYPES_TOKEN,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH) then for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c43147039.lua b/official/c43147039.lua index dfc991524b..96f5afd0e5 100644 --- a/official/c43147039.lua +++ b/official/c43147039.lua @@ -13,34 +13,34 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) --search + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e2:SetCost(s.cost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.tgop) + c:RegisterEffect(e2) + --cannot attack local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) - e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetCost(s.cost) - e3:SetTarget(s.thtg) - e3:SetOperation(s.tgop) + e3:SetOperation(s.atklimit) c:RegisterEffect(e3) - --cannot attack + --effect gain local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetOperation(s.atklimit) + e4:SetCode(EVENT_BE_MATERIAL) + e4:SetCondition(s.efcon) + e4:SetOperation(s.efop) c:RegisterEffect(e4) - --effect gain - local e5=Effect.CreateEffect(c) - e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_BE_MATERIAL) - e5:SetCondition(s.efcon) - e5:SetOperation(s.efop) - c:RegisterEffect(e5) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() end function s.spcon(e,c) if c==nil then return true end @@ -72,12 +72,11 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.efcon(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_XYZ)~=0 - and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) + return (r&REASON_XYZ)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.efop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -88,15 +87,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end -end - +end \ No newline at end of file diff --git a/official/c43175027.lua b/official/c43175027.lua index 338f368051..0939e793ca 100644 --- a/official/c43175027.lua +++ b/official/c43175027.lua @@ -1,7 +1,6 @@ --極氷獣ブリザード・ウルフ --Glacial Beast Blizzard Wolf --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -21,7 +20,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) @@ -52,7 +51,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end --Start of opponent's battle phase and player controls no monsters function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -70,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c43175858.lua b/official/c43175858.lua index 781843f674..20a0069193 100644 --- a/official/c43175858.lua +++ b/official/c43175858.lua @@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsType(TYPE_TOON) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + and c:IsType(TYPE_TOON) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=eg:FilterCount(s.repfilter,nil,tp) @@ -68,4 +68,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c43191636.lua b/official/c43191636.lua index 9caad17293..64e888f1f8 100644 --- a/official/c43191636.lua +++ b/official/c43191636.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) --Change to defense position after attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -35,6 +35,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c43202238.lua b/official/c43202238.lua index 58cfd1be7a..89458626ce 100644 --- a/official/c43202238.lua +++ b/official/c43202238.lua @@ -1,4 +1,5 @@ --邪竜星-ガイザー +--Yazi, Evil of the Yang Zing local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -36,9 +37,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9e) + return c:IsFaceup() and c:IsSetCard(SET_YANG_ZING) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -78,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c43210483.lua b/official/c43210483.lua index 52c710e992..551f849f00 100644 --- a/official/c43210483.lua +++ b/official/c43210483.lua @@ -1,10 +1,10 @@ --- 音響戦士ギタリス --- Symphonic Warrior Guitaris --- Scripted by Hatter +--音響戦士ギタリス +--Symphonic Warrior Guitariss +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Return self and another "Symphonic Warrior" to hand + --Return self and another "Symphonic Warrior" to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sthtg) e1:SetOperation(s.sthop) c:RegisterEffect(e1) - -- Special Summon self + --Special Summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Return scale to hand + --Return scale to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND) @@ -41,10 +41,10 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.listed_names={75304793} function s.sthfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsAbleToHand() end function s.sthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43215738.lua b/official/c43215738.lua index 24bdcd2991..5dfd272762 100644 --- a/official/c43215738.lua +++ b/official/c43215738.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c43218406.lua b/official/c43218406.lua index 3032b4d9ff..f6a9f6c940 100644 --- a/official/c43218406.lua +++ b/official/c43218406.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.descost) + e1:SetCost(Cost.PayLP(1500)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -37,10 +37,6 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsSummonLocation,tp,LOCATION_MZONE,LOCATION_MZONE,nil,LOCATION_EXTRA) if chk==0 then return #g>0 end @@ -59,14 +55,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetOperation(s.checkop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(e1) Duel.RegisterEffect(e2,tp) end @@ -112,4 +108,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43219114.lua b/official/c43219114.lua index 70c31d0363..b6e32a9938 100644 --- a/official/c43219114.lua +++ b/official/c43219114.lua @@ -1,5 +1,5 @@ --白き龍の威光 ---Majesty with Dragons of White +--Majesty of the White Dragons --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) c:RegisterEffect(e2) end s.listed_names={CARD_BLUEEYES_W_DRAGON} diff --git a/official/c43225434.lua b/official/c43225434.lua index 437ea29991..8dc5c4996c 100644 --- a/official/c43225434.lua +++ b/official/c43225434.lua @@ -1,4 +1,5 @@ --決闘融合-バトル・フュージョン +--Battle Fusion local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) e1:SetValue(at:GetAttack()) a:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c43228023.lua b/official/c43228023.lua index 97fb8d7ac3..32836e6555 100644 --- a/official/c43228023.lua +++ b/official/c43228023.lua @@ -1,7 +1,6 @@ --青眼の究極亜龍 --Blue-Eyes Alternative Ultimate Dragon --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -39,9 +38,8 @@ function s.initial_effect(c) e4:SetValue(s.valcheck) c:RegisterEffect(e4) end -s.material_setcode=0xdd +s.material_setcode=SET_BLUE_EYES s.listed_names={CARD_BLUEEYES_W_DRAGON,38517737} - function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() end @@ -58,7 +56,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c43236494.lua b/official/c43236494.lua index 6a0faa18fc..318dd8ec15 100644 --- a/official/c43236494.lua +++ b/official/c43236494.lua @@ -33,11 +33,11 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_FZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) - e3:SetCost(aux.SelfToGraveCost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.pltg) e3:SetOperation(s.plop) c:RegisterEffect(e3) diff --git a/official/c43237273.lua b/official/c43237273.lua index 5e7a5b02fc..63d198d568 100644 --- a/official/c43237273.lua +++ b/official/c43237273.lua @@ -28,12 +28,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) if not tc:IsType(TYPE_TRAPMONSTER) then - cid=c:CopyEffect(code, RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END, 1) + cid=c:CopyEffect(code, RESETS_STANDARD_PHASE_END, 1) end end end \ No newline at end of file diff --git a/official/c43241495.lua b/official/c43241495.lua index 522ca2725d..7439069933 100644 --- a/official/c43241495.lua +++ b/official/c43241495.lua @@ -1,4 +1,5 @@ --EMトランポリンクス +--Performapal Trampolynx local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.cfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -55,4 +56,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43250041.lua b/official/c43250041.lua index ce67d12b2f..15ec5f22f8 100644 --- a/official/c43250041.lua +++ b/official/c43250041.lua @@ -1,4 +1,5 @@ --ドレインシールド +--Draining Shield local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c43256007.lua b/official/c43256007.lua index 62198e80c9..d47d6afc99 100644 --- a/official/c43256007.lua +++ b/official/c43256007.lua @@ -1,7 +1,6 @@ --アイスバリアのアテンダント ---Attendant of the Ice Barrier +--Zuijin of the Ice Barrier --LUA by Kohana Sonogami - local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -29,16 +28,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Listed of Archetype -s.listed_series={0x2f} - ---Activation Cost -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_ICE_BARRIER} --Check for "Ice Barrier" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x2f) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICE_BARRIER) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Select the Location/Target function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -78,7 +71,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-2) tc:RegisterEffect(e1) if not tc:IsImmuneToEffect(e1) and c:IsRelateToEffect(e) then @@ -89,10 +82,10 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c43262273.lua b/official/c43262273.lua index 02e589d94c..088608192a 100644 --- a/official/c43262273.lua +++ b/official/c43262273.lua @@ -1,4 +1,5 @@ --紅蓮の指名者 +--Appointer of the Red Lotus local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,17 +35,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) local tc=sg:GetFirst() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentPhase()==PHASE_END then + if Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_END) then e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) else e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) end e1:SetLabelObject(tc) e1:SetCondition(s.retcon) @@ -59,10 +60,10 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) e:Reset() return false else - return Duel.GetTurnPlayer()==1-tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(1-tp) and Duel.GetTurnCount()~=e:GetLabel() end end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoHand(tc,1-tp,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43266605.lua b/official/c43266605.lua index b4757b5506..186d964bf7 100644 --- a/official/c43266605.lua +++ b/official/c43266605.lua @@ -1,6 +1,5 @@ --PSYフレーム・マルチスレッダー --PSY-Frame Multi-Threader - local s,id=GetID() function s.initial_effect(c) --Name becomes "PSY-Frame Driver" while in hand or GY @@ -8,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetValue(CARD_PSYFRAME_DRIVER) c:RegisterEffect(e1) --Substitute destruction for a "PSY-Frame" card(s) @@ -34,11 +33,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xc1} - +s.listed_series={SET_PSY_FRAME} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xc1) and c:IsOnField() and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsSetCard(SET_PSY_FRAME) and c:IsOnField() and c:IsControler(tp) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -51,7 +49,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD+REASON_REPLACE) end function s.cfilter(c,tp) - return c:IsSetCard(0xc1) and c:IsType(TYPE_TUNER) and c:IsControler(tp) + return c:IsSetCard(SET_PSY_FRAME) and c:IsType(TYPE_TUNER) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -70,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c43268675.lua b/official/c43268675.lua index 6a58661608..e460215f49 100644 --- a/official/c43268675.lua +++ b/official/c43268675.lua @@ -1,4 +1,5 @@ --幻奏の音女オペラ +--Opera the Melodious Diva local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -19,12 +20,12 @@ function s.initial_effect(c) e3:SetOperation(s.indop) c:RegisterEffect(e3) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.indcon(e,tp,eg,ep,ev,re,r,rp) @@ -35,11 +36,11 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x9b)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MELODIOUS)) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c43270827.lua b/official/c43270827.lua index 3cc25aae40..caccbb9126 100644 --- a/official/c43270827.lua +++ b/official/c43270827.lua @@ -1,5 +1,5 @@ --セリオンズ・クロス ---Therions' Cross +--Therion Cross --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -14,10 +14,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_ARGYRO_SYSTEM} -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x17b),tp,LOCATION_MZONE,0,1,nil) + return rp==1-tp and re:IsMonsterEffect() + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_THERION),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() diff --git a/official/c43318266.lua b/official/c43318266.lua index 2c798b442b..c5bf2fbddd 100644 --- a/official/c43318266.lua +++ b/official/c43318266.lua @@ -36,23 +36,23 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x18} -s.counter_place_list={0x1019} +s.listed_series={SET_CLOUDIAN} +s.counter_place_list={COUNTER_FOG} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) + return c:IsFaceup() and c:IsSetCard(SET_CLOUDIAN) end function s.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x1019,ct) + e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+COUNTER_FOG,ct) end end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,2,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x1019,2,REASON_COST) + if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_FOG,2,REASON_COST) end + e:GetHandler():RemoveCounter(tp,COUNTER_FOG,2,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4333086.lua b/official/c4333086.lua index 1c2e53052f..0be6e490ca 100644 --- a/official/c4333086.lua +++ b/official/c4333086.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} function s.filter(c) - return c:IsSetCard(0xd9) and c:IsMonster() and c:IsAbleToRemove() + return c:IsSetCard(SET_SHIRANUI) and c:IsMonster() and c:IsAbleToRemove() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -66,4 +66,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c43331750.lua b/official/c43331750.lua index 3c9decbde9..771d3e18f9 100644 --- a/official/c43331750.lua +++ b/official/c43331750.lua @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not te then return end local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c43332022.lua b/official/c43332022.lua index dcad065fa6..97a017d9f9 100644 --- a/official/c43332022.lua +++ b/official/c43332022.lua @@ -1,4 +1,5 @@ --ジュラック・ガリム +--Jurrac Gallim local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,6 +27,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetReasonCard() if not tc:IsRelateToBattle() then return end if Duel.IsExistingMatchingCard(Card.IsDiscardable,1-tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(id,1)) then - Duel.DiscardHand(1-tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(1-tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil) else Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43338320.lua b/official/c43338320.lua index 632fd4dda5..4bb8f47603 100644 --- a/official/c43338320.lua +++ b/official/c43338320.lua @@ -89,4 +89,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c43340443.lua b/official/c43340443.lua index 77feef29b4..6e1f385fe4 100644 --- a/official/c43340443.lua +++ b/official/c43340443.lua @@ -26,4 +26,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateSummon(eg:GetFirst()) Duel.SendtoHand(eg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43341600.lua b/official/c43341600.lua index fb702e217b..686dfaa154 100644 --- a/official/c43341600.lua +++ b/official/c43341600.lua @@ -1,5 +1,5 @@ --フライアのリンゴ ---Apple of Enlightnment +--Apple of Enlightenment --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -26,12 +26,12 @@ function s.initial_effect(c) e3:SetCode(EVENT_REMOVE) c:RegisterEffect(e3) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsAbleToRemove() and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) end - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x122),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x122),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE),tp,LOCATION_MZONE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) @@ -48,13 +48,13 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x122),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE),tp,LOCATION_MZONE,0,nil) if chk==0 then return Duel.IsPlayerCanDraw(tp,ct+1) end Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x122),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE),tp,LOCATION_MZONE,0,nil) Duel.Draw(p,ct+1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4334811.lua b/official/c4334811.lua index 893960bd4b..8af7a6a0c7 100644 --- a/official/c4334811.lua +++ b/official/c4334811.lua @@ -1,4 +1,5 @@ --スクラップ・リサイクラー +--Scrap Recycler local s,id=GetID() function s.initial_effect(c) --send to grave @@ -59,4 +60,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4335427.lua b/official/c4335427.lua index 9ebe4c3400..17607edd4b 100644 --- a/official/c4335427.lua +++ b/official/c4335427.lua @@ -84,15 +84,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.rmfilter(c) - return c:IsAbleToRemove() and (c:IsLocation(0x0a) or aux.SpElimFilter(c,false,true)) + return c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND|LOCATION_SZONE) or aux.SpElimFilter(c,false,true)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0x1e,0x1e,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) Duel.SetChainLimit(aux.FALSE) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0x1e,0x1e,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4335645.lua b/official/c4335645.lua index c9ebf29953..f3f8ddff23 100644 --- a/official/c4335645.lua +++ b/official/c4335645.lua @@ -1,4 +1,5 @@ --ニュードリュア +--Newdoria local s,id=GetID() function s.initial_effect(c) --destroy @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43359262.lua b/official/c43359262.lua index dda77966b3..e9dcecf66e 100644 --- a/official/c43359262.lua +++ b/official/c43359262.lua @@ -1,4 +1,5 @@ --エレクトロ軍曹 +--Sergeant Electro local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c43366227.lua b/official/c43366227.lua index 7a459148c7..897df33c3f 100644 --- a/official/c43366227.lua +++ b/official/c43366227.lua @@ -1,4 +1,5 @@ --セブン・ソード・ウォリアー +--Seven Swords Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -81,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43378048.lua b/official/c43378048.lua index 803aadaf19..3c50967474 100644 --- a/official/c43378048.lua +++ b/official/c43378048.lua @@ -1,5 +1,5 @@ --混沌幻魔アーミタイル ---Armityle the Chaos Phantom +--Armityle the Chaos Phantasm local s,id=GetID() function s.initial_effect(c) --fusion material @@ -30,8 +30,8 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.atkcon(e) return Duel.GetTurnPlayer()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c43383478.lua b/official/c43383478.lua index 0cedcf6157..9340c80cdd 100644 --- a/official/c43383478.lua +++ b/official/c43383478.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_DESTROY+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_DESTROY|TIMING_END_PHASE) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -21,31 +21,31 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local p1=false local p2=false for tc in aux.Next(eg) do - if tc:IsSetCard(0xba) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) then + if tc:IsSetCard(SET_RAIDRAPTOR) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) then if tc:IsPreviousControler(0) then p1=true else p2=true end end end - if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,0,1) end + if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end + if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)~=0 end function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,pg) end function s.filter2(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) - and c:IsRank(rk) and c:IsSetCard(0xba) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsRank(rk) and c:IsSetCard(SET_RAIDRAPTOR) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -73,4 +73,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c43385557.lua b/official/c43385557.lua index 9a6feb195c..539f54449b 100644 --- a/official/c43385557.lua +++ b/official/c43385557.lua @@ -1,4 +1,5 @@ --マジカル・アンドロイド +--Magical Android local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -19,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,4 +32,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,0,nil) Duel.Recover(tp,ct*600,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43387895.lua b/official/c43387895.lua index 2c36693528..75fe270ca1 100644 --- a/official/c43387895.lua +++ b/official/c43387895.lua @@ -26,7 +26,7 @@ function s.contactfil(tp) return Duel.GetReleaseGroup(tp) end function s.contactop(g) - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION diff --git a/official/c43405287.lua b/official/c43405287.lua index 3d94732fa8..b26b05b2d7 100644 --- a/official/c43405287.lua +++ b/official/c43405287.lua @@ -1,4 +1,5 @@ --D-チェーン +--D - Chain local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,18 +9,15 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xc008} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_DESTINY_HERO} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) + return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -32,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --draw local e1=Effect.CreateEffect(c) @@ -45,14 +43,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Atkup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -60,14 +58,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(0xc008) + return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(SET_DESTINY_HERO) end function s.damfilter(c,rc) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc @@ -85,4 +83,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43411769.lua b/official/c43411769.lua index a0b8c0be12..8530df7174 100644 --- a/official/c43411769.lua +++ b/official/c43411769.lua @@ -1,5 +1,5 @@ --守護竜ガルミデス ---Garmides the Guardragon +--Guardragon Garmides --scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) @@ -61,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43413875.lua b/official/c43413875.lua index bcbe58dd88..1da788229b 100644 --- a/official/c43413875.lua +++ b/official/c43413875.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c,tp) - return c:IsSetCard(0xe6) and c:GetLevel()==8 and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==8 and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -69,7 +69,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -90,4 +90,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43417563.lua b/official/c43417563.lua index 766dd77c2c..4f69da79d0 100644 --- a/official/c43417563.lua +++ b/official/c43417563.lua @@ -1,5 +1,6 @@ --踊りによる誘発 +--Commencement Dance local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,4849037) -end +end \ No newline at end of file diff --git a/official/c43422537.lua b/official/c43422537.lua index 5e4e7bc933..7bcd7d34eb 100644 --- a/official/c43422537.lua +++ b/official/c43422537.lua @@ -27,6 +27,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(2) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c43426903.lua b/official/c43426903.lua index 32fbfa7397..0435dee6c5 100644 --- a/official/c43426903.lua +++ b/official/c43426903.lua @@ -1,6 +1,5 @@ --レプティレス・ゴルゴーン --Reptilianne Gorgon - local s,id=GetID() function s.initial_effect(c) --Attacked monster's ATK becomes 0, also cannot change its battle position @@ -24,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) d:RegisterEffect(e1) --Cannot change its battle position local e2=Effect.CreateEffect(e:GetHandler()) @@ -32,6 +31,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) d:RegisterEffect(e2) end \ No newline at end of file diff --git a/official/c43434803.lua b/official/c43434803.lua index db0eb34bad..c79c57298f 100644 --- a/official/c43434803.lua +++ b/official/c43434803.lua @@ -1,4 +1,5 @@ --浅すぎた墓穴 +--The Shallow Grave local s,id=GetID() function s.initial_effect(c) --Activate @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(oc,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c43436049.lua b/official/c43436049.lua index 74c9a477b1..f7115ae2e0 100644 --- a/official/c43436049.lua +++ b/official/c43436049.lua @@ -1,4 +1,5 @@ --ジャンク・ブレイカー +--Junk Breaker local s,id=GetID() function s.initial_effect(c) --disable @@ -14,21 +15,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE|PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) @@ -41,19 +38,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c43452193.lua b/official/c43452193.lua index e6f4ada29e..f7493c936e 100644 --- a/official/c43452193.lua +++ b/official/c43452193.lua @@ -1,4 +1,5 @@ --異次元トンネル-ミラーゲート- +--Mirror Gate local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return Duel.GetTurnPlayer()~=tp and at and at:IsFaceup() and at:IsSetCard(0x3008) + return Duel.IsTurnPlayer(1-tp) and at and at:IsFaceup() and at:IsSetCard(SET_ELEMENTAL_HERO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() @@ -29,8 +30,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() if a:IsRelateToEffect(e) and a:CanAttack() and at:IsRelateToEffect(e) then - if Duel.SwapControl(a,at,RESET_PHASE+PHASE_END,1) then + if Duel.SwapControl(a,at,RESET_PHASE|PHASE_END,1) then Duel.CalculateDamage(a,at) end end -end +end \ No newline at end of file diff --git a/official/c43455065.lua b/official/c43455065.lua index 40ee08ce7e..c0d4afb5dd 100644 --- a/official/c43455065.lua +++ b/official/c43455065.lua @@ -1,4 +1,5 @@ --魔力の泉 +--Magical Spring local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,11 +30,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,0,nil) if ct>0 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,ct,ct,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,ct,ct,REASON_EFFECT|REASON_DISCARD) end end local rct=1 - if Duel.GetTurnPlayer()~=tp then rct=2 end + if Duel.IsTurnPlayer(1-tp) then rct=2 end local c=e:GetHandler() --indestructable local e1=Effect.CreateEffect(c) @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetTarget(s.indtg) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,rct) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -54,13 +55,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_INACTIVATE) e2:SetValue(s.efilter) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,rct) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_DISEFFECT) e3:SetValue(s.efilter) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,rct) Duel.RegisterEffect(e3,tp) --cannot disable local e4=Effect.CreateEffect(c) @@ -69,14 +70,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetTargetRange(0,LOCATION_ONFIELD) e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e4:SetTarget(s.indtg) - e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) + e4:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,rct) Duel.RegisterEffect(e4,tp) end function s.indtg(e,c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.efilter(e,ct) local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local tc=te:GetHandler() - return tp~=e:GetHandlerPlayer() and tc:IsType(TYPE_SPELL+TYPE_TRAP) -end + return tp~=e:GetHandlerPlayer() and tc:IsSpellTrap() +end \ No newline at end of file diff --git a/official/c43464884.lua b/official/c43464884.lua index 52f409c305..36d1d30f65 100644 --- a/official/c43464884.lua +++ b/official/c43464884.lua @@ -38,7 +38,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -67,7 +67,7 @@ function s.cgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) @@ -90,5 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c43476205.lua b/official/c43476205.lua index f8b51c9792..65eef4eec1 100644 --- a/official/c43476205.lua +++ b/official/c43476205.lua @@ -13,11 +13,11 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and rk>0 and c:IsFaceup() and c:IsSetCard(0xba) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and rk>0 and c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,pg) end function s.filter2(c,e,tp) @@ -29,11 +29,11 @@ end function s.filter3(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) - and c:IsSetCard(0xba) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsSetCard(SET_RAIDRAPTOR) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end e:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -51,7 +51,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if Duel.GetTurnPlayer()~=tp then + if Duel.IsTurnPlayer(1-tp) then if not tc or not tc:IsRelateToEffect(e) or not tc:IsFaceup() or Duel.GetControl(tc,tp)==0 then return end Duel.BreakEffect() end @@ -66,4 +66,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c43487744.lua b/official/c43487744.lua index 70b6d97cac..af52b805b9 100644 --- a/official/c43487744.lua +++ b/official/c43487744.lua @@ -1,4 +1,5 @@ --ホワイト・ホール +--White Hole local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.indval(e,re,rp) return Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c43490025.lua b/official/c43490025.lua index 83ab503264..eeb7f31bb5 100644 --- a/official/c43490025.lua +++ b/official/c43490025.lua @@ -1,6 +1,5 @@ --FNo.0 未来皇ホープ-フューチャー・スラッシュ --Number F0: Utopic Future Slash - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -28,7 +27,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.atkcon) - e4:SetCost(s.atkcost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) c:RegisterEffect(e4) @@ -40,22 +39,21 @@ function s.initial_effect(c) e5:SetLabel(c:GetOriginalCode()) c:RegisterEffect(e5) end -s.listed_series={0x48,0x107f} +s.listed_series={SET_NUMBER,SET_UTOPIA} s.xyz_number=0 s.listed_names={65305468} - function s.xyzfilter(c,xyz,sumtype,tp) - return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and not c:IsSetCard(0x48,xyz,sumtype,tp) + return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and not c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) return mg:GetClassCount(Card.GetRank)==1 end function s.ovfilter(c,tp,lc) - return c:IsFaceup() and (c:IsSetCard(0x107f,lc,SUMMON_TYPE_XYZ,tp) or c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65305468)) + return c:IsFaceup() and (c:IsSetCard(SET_UTOPIA,lc,SUMMON_TYPE_XYZ,tp) or c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65305468)) end function s.atkfilter(c) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 @@ -63,10 +61,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end end @@ -80,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c43502497.lua b/official/c43502497.lua index 474b9fb176..18c8d17e5c 100644 --- a/official/c43502497.lua +++ b/official/c43502497.lua @@ -100,4 +100,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c43509019.lua b/official/c43509019.lua index dd045ac104..719a9326fa 100644 --- a/official/c43509019.lua +++ b/official/c43509019.lua @@ -28,4 +28,4 @@ end function s.cbop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.ChangeAttackTarget(nil) -end +end \ No newline at end of file diff --git a/official/c43527730.lua b/official/c43527730.lua index 950471a217..74fceae689 100644 --- a/official/c43527730.lua +++ b/official/c43527730.lua @@ -1,5 +1,5 @@ --御巫の水舞踏 ---Arabesque of the Mikanko +--Mikanko Water Arabesque --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -21,16 +21,16 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x18e) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MIKANKO) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():CheckEquipTarget(c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local eqc=e:GetHandler():GetEquipTarget() if chk==0 then return eqc and eqc:IsAbleToHand() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,eqc:GetOriginalCode()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,eqc:GetOriginalCode()) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,eqc,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -38,7 +38,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local eqc=c:GetEquipTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,eqc:GetOriginalCode()) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,eqc:GetOriginalCode()) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then local eq=g:GetFirst() if Duel.Equip(tp,c,eq) and eqc:IsFaceup() and eqc:IsAbleToHand() then diff --git a/official/c43528009.lua b/official/c43528009.lua index 70aa84fb3a..0de31068c8 100644 --- a/official/c43528009.lua +++ b/official/c43528009.lua @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43530283.lua b/official/c43530283.lua index de092c6e12..0251ed0b73 100644 --- a/official/c43530283.lua +++ b/official/c43530283.lua @@ -1,4 +1,5 @@ --勇気の砂時計 +--Hourglass of Courage local s,id=GetID() function s.initial_effect(c) --atkup @@ -20,16 +21,16 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(s.defval) c:RegisterEffect(e2) - if Duel.GetTurnPlayer()==tp then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) + if Duel.IsTurnPlayer(tp) then + c:RegisterFlagEffect(id,RESETS_STANDARD_DISABLE_PHASE_END|RESET_SELF_TURN,0,2) else - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_DISABLE_PHASE_END|RESET_SELF_TURN,0,1) end end end @@ -46,4 +47,4 @@ function s.defval(e,c) else return c:GetBaseDefense()/2 end -end +end \ No newline at end of file diff --git a/official/c43534808.lua b/official/c43534808.lua index fa4c61dc60..bc9c396085 100644 --- a/official/c43534808.lua +++ b/official/c43534808.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) @@ -62,11 +62,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsType(TYPE_TOKEN) -end - +end \ No newline at end of file diff --git a/official/c43543777.lua b/official/c43543777.lua index 907dbd4382..67a3a66126 100644 --- a/official/c43543777.lua +++ b/official/c43543777.lua @@ -30,7 +30,7 @@ function s.thfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end diff --git a/official/c43573231.lua b/official/c43573231.lua index 05b9fb125f..b142662f18 100644 --- a/official/c43573231.lua +++ b/official/c43573231.lua @@ -1,4 +1,5 @@ --幻蝶の刺客モルフォ +--Morpho Butterspy local s,id=GetID() function s.initial_effect(c) --atk,def @@ -17,7 +18,8 @@ end function s.cfilter(c,e,tp) local np=c:GetPosition() local pp=c:GetPreviousPosition() - return c:IsControler(tp) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1) or (pp==0x8 and np==0x1)) and c:IsCanBeEffectTarget(e) + return c:IsControler(tp) and c:IsCanBeEffectTarget(e) + and ((pp==POS_FACEUP_ATTACK and np==POS_FACEUP_DEFENSE) or (pp==POS_FACEUP_DEFENSE and np==POS_FACEUP_ATTACK) or (pp==POS_FACEDOWN_DEFENSE and np==POS_FACEUP_ATTACK)) end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return eg:IsContains(chkc) and s.cfilter(chkc,e,1-tp) end @@ -33,10 +35,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c43575579.lua b/official/c43575579.lua index bc3db67451..e02667cebf 100644 --- a/official/c43575579.lua +++ b/official/c43575579.lua @@ -26,12 +26,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 then - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_DECK|LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE,0,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) if Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_REMOVED,0,1,nil) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SendtoDeck(td,nil,2,REASON_EFFECT) + Duel.SendtoDeck(td,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_DELAY) @@ -39,20 +39,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.con) e1:SetOperation(s.op) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) then e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,2) else e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) end end end function s.con(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and (r&REASON_RULE)~=0 and Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() - and Duel.GetCurrentPhase()==PHASE_DRAW and #eg>0 + return ep==tp and (r&REASON_RULE)~=0 and Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() + and Duel.IsPhase(PHASE_DRAW) and #eg>0 end function s.op(e,tp,eg,ep,ev,re,r,rp) if #eg<1 then return end @@ -63,4 +63,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,4000,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c43577607.lua b/official/c43577607.lua index 22a42cd2a2..16db7eaed1 100644 --- a/official/c43577607.lua +++ b/official/c43577607.lua @@ -1,4 +1,5 @@ --竜星の気脈 +--Yang Zing Prana local s,id=GetID() function s.initial_effect(c) --Activate @@ -56,25 +57,25 @@ function s.initial_effect(c) e6:SetType(EFFECT_TYPE_IGNITION) e6:SetRange(LOCATION_SZONE) e6:SetCondition(s.effcon) - e6:SetCost(s.descost) + e6:SetCost(Cost.SelfToGrave) e6:SetTarget(s.destg) e6:SetOperation(s.desop) e6:SetLabel(5) c:RegisterEffect(e6) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.confilter(c) - return c:IsSetCard(0x9e) and c:IsMonster() + return c:IsSetCard(SET_YANG_ZING) and c:IsMonster() end function s.effcon(e) local g=Duel.GetMatchingGroup(s.confilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) return g:GetClassCount(Card.GetAttribute)>=e:GetLabel() end function s.atktg(e,c) - return c:IsSetCard(0x9e) + return c:IsSetCard(SET_YANG_ZING) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9e) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_YANG_ZING) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -87,10 +88,6 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) @@ -101,4 +98,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43580269.lua b/official/c43580269.lua index c81b30322d..187f855a41 100644 --- a/official/c43580269.lua +++ b/official/c43580269.lua @@ -1,4 +1,5 @@ --エメス・ザ・インフィニティ +--Emes the Infinity local s,id=GetID() function s.initial_effect(c) --atkup @@ -23,7 +24,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c43582229.lua b/official/c43582229.lua index 5e268db51c..2221d31e85 100644 --- a/official/c43582229.lua +++ b/official/c43582229.lua @@ -1,5 +1,5 @@ --氷結界の晶壁 ---Clear Wall of the Ice Barrier +--Freezing Chains of the Ice Barrier --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -15,15 +15,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCondition(s.unacon) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ICE_BARRIER)) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(s.unaval) c:RegisterEffect(e2) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x2f) and c:IsLevelBelow(4) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(SET_ICE_BARRIER) and c:IsLevelBelow(4) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -50,13 +50,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.unafilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) + return c:IsFaceup() and c:IsSetCard(SET_ICE_BARRIER) end function s.unacon(e) return Duel.IsExistingMatchingCard(s.unafilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,3,nil) end function s.unaval(e,te) local tc=te:GetOwner() - return tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:IsSummonLocation(LOCATION_EXTRA) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() - and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and te:GetActivateLocation()==LOCATION_MZONE -end + return tc:IsSpecialSummoned() and tc:IsSummonLocation(LOCATION_EXTRA) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() + and te:IsMonsterEffect() and te:IsActivated() and te:GetActivateLocation()==LOCATION_MZONE +end \ No newline at end of file diff --git a/official/c43583400.lua b/official/c43583400.lua index 99397481a9..e6ae463fbf 100644 --- a/official/c43583400.lua +++ b/official/c43583400.lua @@ -1,4 +1,5 @@ --アンチエイリアン +--Antialian local s,id=GetID() function s.initial_effect(c) --summon @@ -25,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE + return Duel.IsBattlePhase() and #(e:GetHandler():GetBattledGroup()-e:GetHandler())>0 end function s.sumfilter(c) @@ -56,5 +57,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c43586926.lua b/official/c43586926.lua index 4050afda30..6c86f810d8 100644 --- a/official/c43586926.lua +++ b/official/c43586926.lua @@ -1,4 +1,5 @@ --ドル・ドラ +--Twin-Headed Behemoth local s,id=GetID() function s.initial_effect(c) --to grave @@ -22,7 +23,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -37,10 +38,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c43598843.lua b/official/c43598843.lua index 04228835e6..c2b9fc68bb 100644 --- a/official/c43598843.lua +++ b/official/c43598843.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.effop) c:RegisterEffect(e2) end diff --git a/official/c43641473.lua b/official/c43641473.lua index 1c16baecd5..948b843e29 100644 --- a/official/c43641473.lua +++ b/official/c43641473.lua @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(ec,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c43642620.lua b/official/c43642620.lua index c5da852309..66596e226f 100644 --- a/official/c43642620.lua +++ b/official/c43642620.lua @@ -1,4 +1,5 @@ --マンモス・ゾンビ +--Zombie Mammoth local s,id=GetID() function s.initial_effect(c) --self destroy @@ -37,4 +38,4 @@ end function s.dmop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43644025.lua b/official/c43644025.lua index 5fd7f21cc6..4f460b677b 100644 --- a/official/c43644025.lua +++ b/official/c43644025.lua @@ -1,4 +1,5 @@ --コクーン・リボーン +--Cocoon Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -55,4 +56,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c43658697.lua b/official/c43658697.lua index 2eb916c2e6..adb94f8d3f 100644 --- a/official/c43658697.lua +++ b/official/c43658697.lua @@ -1,6 +1,5 @@ --U.A.フラッグシップ・ディール --U.A. Signing Deal - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "U.A." monster from deck @@ -13,10 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb2} - +s.listed_series={SET_UA} function s.filter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,12 +31,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) --Cannot be used as synchro material local e3=Effect.CreateEffect(e:GetHandler()) @@ -46,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(1) tc:RegisterEffect(e3) --Cannot be used as Xyz material diff --git a/official/c43661068.lua b/official/c43661068.lua index 59174557a5..30cdcadfec 100644 --- a/official/c43661068.lua +++ b/official/c43661068.lua @@ -35,8 +35,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) lc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c43664494.lua b/official/c43664494.lua index e8e9719e45..b7cc71c9e3 100644 --- a/official/c43664494.lua +++ b/official/c43664494.lua @@ -1,7 +1,6 @@ --プランキッズ・プランク --Prank-Kids Pranks --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,19 +33,18 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} s.listed_names={43664495} - function s.cfilter(c) - return c:IsSetCard(0x120) and c:IsDiscardable() + return c:IsSetCard(SET_PRANK_KIDS) and c:IsDiscardable() end function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x120,TYPES_TOKEN,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_PRANK_KIDS,TYPES_TOKEN,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end @@ -54,7 +52,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x120,TYPES_TOKEN,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_PRANK_KIDS,TYPES_TOKEN,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP) then return end local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) --Cannot be tributed @@ -64,7 +62,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -72,10 +70,10 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tdfilter(c) - return c:IsSetCard(0x120) and not c:IsCode(id) and c:IsAbleToDeck() + return c:IsSetCard(SET_PRANK_KIDS) and not c:IsCode(id) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -90,10 +88,10 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tg=Duel.GetTargetCards(e) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) diff --git a/official/c4367330.lua b/official/c4367330.lua index dcd23c7c54..e42d595ac8 100644 --- a/official/c4367330.lua +++ b/official/c4367330.lua @@ -1,4 +1,5 @@ --十二獣ラビーナ +--Zoodiac Bunnyblast local s,id=GetID() function s.initial_effect(c) --to hand @@ -19,18 +20,18 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} s.listed_names={id} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.thfilter(c) - return c:IsSetCard(0xf1) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_ZOODIAC) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -49,14 +50,10 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetOriginalRace()==RACE_BEASTWARRIOR and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp - and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and Duel.IsChainNegatable(ev) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):IsContains(c) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) @@ -66,4 +63,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43685562.lua b/official/c43685562.lua index 0f52781643..d975cde2cc 100644 --- a/official/c43685562.lua +++ b/official/c43685562.lua @@ -1,5 +1,5 @@ --ジョウルリ-パンクデンジャラス・ガブ ---Joururi P.U.N.K. Dangerous Gabu +--Joruri-P.U.N.K. Dangerous Gabu --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.negop) c:RegisterEffect(e1) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} --Negate Effect function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() @@ -28,7 +28,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil) end function s.recfilter(c) - return c:IsFaceup() and c:IsSetCard(0x173) + return c:IsFaceup() and c:IsSetCard(SET_PUNK) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -38,13 +38,13 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local atk=tc:GetTextAttack() if atk>0 and Duel.IsExistingMatchingCard(s.recfilter,tp,LOCATION_MZONE,0,1,nil) @@ -54,4 +54,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c43694075.lua b/official/c43694075.lua index ee9c13fd6e..1bff91a9cc 100644 --- a/official/c43694075.lua +++ b/official/c43694075.lua @@ -1,5 +1,6 @@ --ローの祈り +--Novox's Prayer local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,3627449) -end +end \ No newline at end of file diff --git a/official/c43694481.lua b/official/c43694481.lua index b01a2db88f..74684b9f84 100644 --- a/official/c43694481.lua +++ b/official/c43694481.lua @@ -1,4 +1,5 @@ --ブリザード・ファルコン +--Blizzard Falcon local s,id=GetID() function s.initial_effect(c) --damage @@ -26,4 +27,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43697559.lua b/official/c43697559.lua index 4e494c4da2..7c5cf459f5 100644 --- a/official/c43697559.lua +++ b/official/c43697559.lua @@ -19,4 +19,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_CHAIN) e1:SetDescription(aux.Stringid(id,0)) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c43698897.lua b/official/c43698897.lua index da65da3931..ca12d3fc6b 100644 --- a/official/c43698897.lua +++ b/official/c43698897.lua @@ -14,8 +14,8 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) e2:SetCost(s.spcost) - e2:SetTarget(Fusion.SummonEffTG(aux.FilterBoolFunction(Card.IsSetCard,0xad))) - e2:SetOperation(Fusion.SummonEffOP(aux.FilterBoolFunction(Card.IsSetCard,0xad))) + e2:SetTarget(Fusion.SummonEffTG(aux.FilterBoolFunction(Card.IsSetCard,SET_FRIGHTFUR))) + e2:SetOperation(Fusion.SummonEffOP(aux.FilterBoolFunction(Card.IsSetCard,SET_FRIGHTFUR))) c:RegisterEffect(e2) --tohand local e3=Effect.CreateEffect(c) @@ -28,10 +28,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x46,0xad} +s.listed_series={SET_FUSION,SET_FRIGHTFUR} s.listed_names={6077601} function s.spfilter(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -54,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43708041.lua b/official/c43708041.lua index a02ea67d9c..53eb3e75d5 100644 --- a/official/c43708041.lua +++ b/official/c43708041.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_DECREASE_TRIBUTE) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_HAND,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107d)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_HAZY_FLAME)) e2:SetValue(0x1) c:RegisterEffect(e2) --salvage @@ -29,14 +29,14 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x7d,0x107d} +s.listed_series={SET_HAZY,SET_HAZY_FLAME} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToGraveAsCost() and c:IsStatus(STATUS_EFFECT_ENABLED) end Duel.SendtoGrave(c,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x7d) and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_HAZY) and c:GetCode()~=id and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end diff --git a/official/c43708640.lua b/official/c43708640.lua index 80c3fe88c4..735f7b6d32 100644 --- a/official/c43708640.lua +++ b/official/c43708640.lua @@ -1,4 +1,5 @@ --ミノケンサテュロス +--Minoan Centaur local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -13,15 +14,11 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsLevel(4) and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -41,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c43709490.lua b/official/c43709490.lua index e67ce1f366..4a7ed7c9c3 100644 --- a/official/c43709490.lua +++ b/official/c43709490.lua @@ -1,22 +1,22 @@ --- 被検体ミュートリアGB-88 --- Myutant GB-88 --- Scripted by Hatter +--被検体ミュートリアGB-88 +--Myutant GB-88 +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special summon itself from hand + --Special summon itself from hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.hspcon) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special summon 1 level 8 "Myutant" monster, that is banished or in GY + --Special summon 1 level 8 "Myutant" monster, that is banished or in GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) diff --git a/official/c43711255.lua b/official/c43711255.lua index 6933a9547c..f4c2aaef9e 100644 --- a/official/c43711255.lua +++ b/official/c43711255.lua @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(ac) e:GetHandler():SetHint(CHINT_CARD,ac) Duel.AdjustInstantly(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c43714890.lua b/official/c43714890.lua index d57c711e44..7e36829d4f 100644 --- a/official/c43714890.lua +++ b/official/c43714890.lua @@ -1,4 +1,5 @@ --人投げトロール +--Man-Thro' Tro' local s,id=GetID() function s.initial_effect(c) --damage @@ -31,4 +32,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43716289.lua b/official/c43716289.lua index 98ff701f52..f1977e4031 100644 --- a/official/c43716289.lua +++ b/official/c43716289.lua @@ -1,4 +1,5 @@ --ポイズンマミー +--Poison Mummy local s,id=GetID() function s.initial_effect(c) --flip @@ -20,4 +21,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43722862.lua b/official/c43722862.lua index 368aa95b14..7fc74aa1ad 100644 --- a/official/c43722862.lua +++ b/official/c43722862.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0xf0} +s.listed_series={SET_WINDWITCH} function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WIND)) end @@ -45,14 +45,14 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,3)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -69,7 +69,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xf0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WINDWITCH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -91,13 +91,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end diff --git a/official/c43730887.lua b/official/c43730887.lua index 55858098c7..779a33f91d 100644 --- a/official/c43730887.lua +++ b/official/c43730887.lua @@ -1,4 +1,5 @@ --ホールディング・アームズ +--Holding Arms local s,id=GetID() function s.initial_effect(c) --summon success @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c43735670.lua b/official/c43735670.lua index b5f3cb2c5b..b37ba11d98 100644 --- a/official/c43735670.lua +++ b/official/c43735670.lua @@ -25,13 +25,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} s.listed_names={id} function s.mfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x12b,lc,sumtype,tp) and c:IsLevelBelow(4) + return c:IsSetCard(SET_MARINCESS,lc,sumtype,tp) and c:IsLevelBelow(4) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -39,7 +39,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end @@ -47,7 +47,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsCode(id) and sumtype&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK end function s.thfilter(c) - return c:IsSetCard(0x12b) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -67,10 +67,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit2) Duel.RegisterEffect(e1,tp) end function s.splimit2(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c43739056.lua b/official/c43739056.lua index 762864808f..6333f82b55 100644 --- a/official/c43739056.lua +++ b/official/c43739056.lua @@ -27,8 +27,8 @@ end function s.aclimit(e,re,tp) local c=e:GetHandler() local rc=re:GetHandler() - return rc~=c and re:IsActiveType(TYPE_MONSTER) and rc:IsOnField() - and rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsAttribute(c:GetAttribute()) + return rc~=c and re:IsMonsterEffect() and rc:IsOnField() + and rc:IsSpecialSummoned() and rc:IsAttribute(c:GetAttribute()) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c43748308.lua b/official/c43748308.lua index ca523628fe..0c1f62ca17 100644 --- a/official/c43748308.lua +++ b/official/c43748308.lua @@ -27,14 +27,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x7c,0x79} +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} s.listed_names={id} function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) - and re:GetHandler():IsSetCard(0x7c) + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellTrapEffect() + and re:GetHandler():IsSetCard(SET_FIRE_FORMATION) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() @@ -50,7 +50,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD,0,nil) @@ -66,7 +66,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x79) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_FIST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c43751755.lua b/official/c43751755.lua index cca299f9d8..daec53092a 100644 --- a/official/c43751755.lua +++ b/official/c43751755.lua @@ -1,4 +1,5 @@ --C・パンテール +--Chrysalis Pantail local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,24 +18,20 @@ s.listed_names={43237273,42015635} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(42015635) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(43237273) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsEnvironment(42015635) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4376658.lua b/official/c4376658.lua index 45bfa738d2..4666f8ba35 100644 --- a/official/c4376658.lua +++ b/official/c4376658.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end \ No newline at end of file diff --git a/official/c43785278.lua b/official/c43785278.lua index 7de4a75807..522c2f0170 100644 --- a/official/c43785278.lua +++ b/official/c43785278.lua @@ -1,4 +1,5 @@ --フーコーの魔砲石 +--Foucault's Cannon local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -27,7 +28,7 @@ function s.initial_effect(c) end function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -48,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43791861.lua b/official/c43791861.lua index d2bbc59c1c..9df7558677 100644 --- a/official/c43791861.lua +++ b/official/c43791861.lua @@ -1,4 +1,5 @@ --鳳王獣ガイルーダ +--Phoenix Beast Gairuda local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,4 +13,4 @@ function s.condtion(e) local ph=Duel.GetCurrentPhase() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end +end \ No newline at end of file diff --git a/official/c43797906.lua b/official/c43797906.lua index 2ea01df62c..f5bcb149c3 100644 --- a/official/c43797906.lua +++ b/official/c43797906.lua @@ -1,4 +1,5 @@ --アトランティスの戦士 +--Warrior of Atlantis local s,id=GetID() function s.initial_effect(c) --search @@ -7,17 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={295517} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsOriginalCode(295517) and c:IsAbleToHand() end @@ -31,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c43803845.lua b/official/c43803845.lua index 66dc2eed02..ff6e408260 100644 --- a/official/c43803845.lua +++ b/official/c43803845.lua @@ -27,4 +27,4 @@ function s.initial_effect(c) local e4=e3:Clone() e4:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e4) -end +end \ No newline at end of file diff --git a/official/c43813459.lua b/official/c43813459.lua index c117b71800..c269a93997 100644 --- a/official/c43813459.lua +++ b/official/c43813459.lua @@ -1,4 +1,5 @@ --反射光子流 +--Photon Current local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,6 +30,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c43839002.lua b/official/c43839002.lua index d4c38d8581..9558792db6 100644 --- a/official/c43839002.lua +++ b/official/c43839002.lua @@ -1,6 +1,5 @@ --サイバネット・バックドア --Cynet Backdoor - local s,id=GetID() function s.initial_effect(c) --Banish 1 of your cyberse monsters, add 1 cyberse monster whose ATK is lower than banished monster's ATK @@ -32,11 +31,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)>0 then + if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT|REASON_TEMPORARY)>0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - if Duel.GetCurrentPhase()==PHASE_STANDBY then e1:SetLabel(Duel.GetTurnCount()) end + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + if Duel.IsPhase(PHASE_STANDBY) then e1:SetLabel(Duel.GetTurnCount()) end e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -53,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -69,7 +68,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c43841694.lua b/official/c43841694.lua index 6e3ee78e65..e54e865e79 100644 --- a/official/c43841694.lua +++ b/official/c43841694.lua @@ -1,4 +1,5 @@ --魔導書の奇跡 +--Spellbook of Miracles local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.filter(c,e,tp) return c:IsType(TYPE_XYZ) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsSpell() + return c:IsFaceup() and c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,sg) end end -end +end \ No newline at end of file diff --git a/official/c43845801.lua b/official/c43845801.lua index 6bbeb1dd1e..87e27ea2ee 100644 --- a/official/c43845801.lua +++ b/official/c43845801.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end s.listed_names={23995346} --"Blue-Eyes Ultimate Dragon" function s.tgfilter(c) - return c:IsCode(23995346) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsFaceup() and not c:HasFlagEffect(id) + return c:IsCode(23995346) and c:IsFusionSummoned() and c:IsFaceup() and not c:HasFlagEffect(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc) end diff --git a/official/c43857222.lua b/official/c43857222.lua index 7a2e45cf5c..f53ba13a63 100644 --- a/official/c43857222.lua +++ b/official/c43857222.lua @@ -1,11 +1,11 @@ --- ライブラの魔法秤 --- Magicalibra --- Scripted by Hatter +--ライブラの魔法秤 +--Magicalibra +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Pendulum properties + --Pendulum properties Pendulum.AddProcedure(c) - -- Change levels + --Change levels local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -34,7 +34,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e):Filter(Card.IsFaceup,nil) if not c:IsRelateToEffect(e) or #tg<1 then return end local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END + local reset=RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END if #tg==1 then local tc=tg:GetFirst() if tc:GetLevel()<=lv then return end @@ -46,4 +46,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) (tg-rd):GetFirst():UpdateLevel(lv,reset,c) end end -end +end \ No newline at end of file diff --git a/official/c43863925.lua b/official/c43863925.lua index 4e5c4ed192..355c0c10d3 100644 --- a/official/c43863925.lua +++ b/official/c43863925.lua @@ -1,9 +1,9 @@ --- エクソシスター・ステラ --- Exorsister Stella --- Scripted by Hatter +--エクソシスター・ステラ +--Exosister Stella +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon from hand + --Special Summon from hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special Summon Xyz + --Special Summon Xyz local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -28,9 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={16474916} -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.hspfilter(c,e,tp) - return c:IsSetCard(0x174) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EXOSISTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,7 +48,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x174) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_EXOSISTER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c43886072.lua b/official/c43886072.lua index 373d390912..9f2685aaa3 100644 --- a/official/c43886072.lua +++ b/official/c43886072.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --2 "Prank-Kids" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x120),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PRANK_KIDS),2,2) --A "Prank-Kids" pointed by this card gains 1000 ATK/DEF local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -24,27 +24,22 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e2:SetCondition(s.thcon) - e2:SetCost(aux.CostWithReplace(s.thcost,CARD_PRANKKIDS_MEOWMU)) + e2:SetCost(aux.CostWithReplace(Cost.SelfTribute,CARD_PRANKKIDS_MEOWMU)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} function s.atktg(e,c) - return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x120) + return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(SET_PRANK_KIDS) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsTurnPlayer(tp) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.thfilter(c,e) - return c:IsSetCard(0x120) and not c:IsLinkMonster() and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() + return c:IsSetCard(SET_PRANK_KIDS) and not c:IsLinkMonster() and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() end function s.thcheck(sg,e,tp) return sg:GetClassCount(Card.GetCode)==2 @@ -67,14 +62,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.indtg) - e1:SetValue(s.indval) + e1:SetValue(aux.indoval) Duel.RegisterEffect(e1,tp) end function s.indtg(e,c) - return c:IsSetCard(0x120) -end -function s.indval(e,re,rp) - return rp==1-e:GetHandlerPlayer() + return c:IsSetCard(SET_PRANK_KIDS) end \ No newline at end of file diff --git a/official/c4388680.lua b/official/c4388680.lua index b5b251530e..3b393ff84a 100644 --- a/official/c4388680.lua +++ b/official/c4388680.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattleTarget()~=nil end @@ -37,10 +37,10 @@ end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 - and Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) end + and Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c) + local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -50,19 +50,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsRitualSummoned() end function s.thfilter(c) - return c:GetType()==TYPE_RITUAL+TYPE_SPELL and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x106) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_VENDREAD) and c:IsAbleToGrave() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) @@ -82,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c43889633.lua b/official/c43889633.lua index 49e7bc4066..54305c3aed 100644 --- a/official/c43889633.lua +++ b/official/c43889633.lua @@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsExistingMatchingCard(function(c) return c:GetFlagEffectLabel(id)==fid end,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then return end e:Reset() end -end +end \ No newline at end of file diff --git a/official/c43892408.lua b/official/c43892408.lua index c75ff2fe60..a61daba045 100644 --- a/official/c43892408.lua +++ b/official/c43892408.lua @@ -1,4 +1,5 @@ --竜騎士ブラック・マジシャン・ガール +--Dark Magician Girl the Dragon Knight local s,id=GetID() function s.initial_effect(c) --fusion material @@ -26,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={1784686} -s.material_setcode={0x10a2,0x20a2} +s.material_setcode={SET_DARK_MAGICIAN,SET_MAGICIAN_GIRL} function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION or se:GetHandler():IsCode(1784686) end @@ -46,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43898403.lua b/official/c43898403.lua index 4d46f994cd..e1e16423b0 100644 --- a/official/c43898403.lua +++ b/official/c43898403.lua @@ -1,4 +1,5 @@ --ツインツイスター +--Twin Twisters local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -15,10 +16,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end @@ -30,4 +31,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43906884.lua b/official/c43906884.lua index 08ac9c3b84..0c33c52c15 100644 --- a/official/c43906884.lua +++ b/official/c43906884.lua @@ -1,4 +1,5 @@ --BF-マイン +--Blackwing - Boobytrap local s,id=GetID() function s.initial_effect(c) --draw @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) end function s.con(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 and rp~=tp + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and (e:GetHandler():GetPreviousLocation()&LOCATION_ONFIELD)~=0 and (e:GetHandler():GetPreviousPosition()&POS_FACEDOWN)~=0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) @@ -32,4 +33,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) then return end Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c43912676.lua b/official/c43912676.lua index fd4e058460..17105a3d63 100644 --- a/official/c43912676.lua +++ b/official/c43912676.lua @@ -1,4 +1,5 @@ --異層空間 +--Celestia local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,7 +39,7 @@ function s.rescon(sg,e,tp,mg) return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,sg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(cg,e,tp,3,3,s.rescon,0) end local rg=aux.SelectUnselectGroup(cg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(rg,POS_FACEUP,REASON_COST) @@ -56,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43925870.lua b/official/c43925870.lua index ea32b6c1b5..70bdad269d 100644 --- a/official/c43925870.lua +++ b/official/c43925870.lua @@ -50,4 +50,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43930492.lua b/official/c43930492.lua index fc4eeb2f6b..1b5cbdf713 100644 --- a/official/c43930492.lua +++ b/official/c43930492.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -65,4 +65,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c43932460.lua b/official/c43932460.lua index f737eed07f..d71566fcd2 100644 --- a/official/c43932460.lua +++ b/official/c43932460.lua @@ -1,4 +1,5 @@ --ナチュル・ランドオルス +--Naturia Landoise local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -20,7 +21,7 @@ function s.initial_effect(c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return e~=re and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsSpell() and c:IsAbleToGraveAsCost() @@ -44,4 +45,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43940008.lua b/official/c43940008.lua index 19003ff17c..72d8ac81da 100644 --- a/official/c43940008.lua +++ b/official/c43940008.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_FZONE) e1:SetCountLimit(1) e1:SetOperation(s.rvop) diff --git a/official/c43944080.lua b/official/c43944080.lua index fbdfabf147..ab476300e8 100644 --- a/official/c43944080.lua +++ b/official/c43944080.lua @@ -61,4 +61,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c43959432.lua b/official/c43959432.lua index 2626e52abd..8e5a3ab0b6 100644 --- a/official/c43959432.lua +++ b/official/c43959432.lua @@ -20,7 +20,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.IsDuelType(DUEL_TRAP_MONSTERS_NOT_USE_ZONE) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) @@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1000,1000,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCondition(s.poscon) e1:SetOperation(s.posop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) --atk local e2=Effect.CreateEffect(c) @@ -50,13 +50,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(s.atkval) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2,true) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3,true) Duel.SpecialSummonComplete() - aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e,nil,RESET_EVENT+RESETS_STANDARD) + aux.AddEREquipLimit(c,nil,s.eqval,s.equipop,e,nil,RESET_EVENT|RESETS_STANDARD) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.BreakEffect() @@ -89,4 +89,4 @@ function s.atkval(e,c) end function s.eqfilter(c) return c:GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c43973174.lua b/official/c43973174.lua index 749ade5088..3abc5b0d41 100644 --- a/official/c43973174.lua +++ b/official/c43973174.lua @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c43986064.lua b/official/c43986064.lua index 230661965a..f2ac39c55e 100644 --- a/official/c43986064.lua +++ b/official/c43986064.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -68,4 +68,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) end -end +end \ No newline at end of file diff --git a/official/c43994202.lua b/official/c43994202.lua index 16858257da..0dddb42564 100644 --- a/official/c43994202.lua +++ b/official/c43994202.lua @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -67,5 +67,5 @@ function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) end function s.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) + return re:GetHandler():IsCode(e:GetLabel()) and re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c44009443.lua b/official/c44009443.lua index befcc17324..af59b3cee0 100644 --- a/official/c44009443.lua +++ b/official/c44009443.lua @@ -1,4 +1,5 @@ --影星軌道兵器ハイドランダー +--Orbital Hydralander local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -57,4 +58,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44028461.lua b/official/c44028461.lua index 699ee5ef24..5b97cc58ad 100644 --- a/official/c44028461.lua +++ b/official/c44028461.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end @@ -25,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -34,11 +34,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.filter(c,e,tp) - return c:IsAttackBelow(2000) and c:IsSetCard(0x33) and c:IsMonster() + return c:IsAttackBelow(2000) and c:IsSetCard(SET_BLACKWING) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -50,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44035031.lua b/official/c44035031.lua index 786262cfbe..c3dc90e58c 100644 --- a/official/c44035031.lua +++ b/official/c44035031.lua @@ -1,4 +1,5 @@ --グラヴィティ・ウォリアー +--Gravity Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -28,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -38,11 +39,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsDefensePos() end @@ -59,8 +60,8 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c4404099.lua b/official/c4404099.lua index 6706f36c4f..decc5c3db3 100644 --- a/official/c4404099.lua +++ b/official/c4404099.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetTarget(s.addct) e1:SetOperation(s.addc) c:RegisterEffect(e1) @@ -51,13 +51,13 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ct>0 and not e:GetHandler():IsLocation(LOCATION_DECK) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_FISH+RACE_SEASERPENT),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_FISH|RACE_SEASERPENT),tp,LOCATION_MZONE,0,nil) for tc in aux.Next(g) do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c44046281.lua b/official/c44046281.lua index 1dfc40a183..8a0cd5527a 100644 --- a/official/c44046281.lua +++ b/official/c44046281.lua @@ -1,4 +1,5 @@ --ディメンション・ゲート +--Dimension Gate local s,id=GetID() function s.initial_effect(c) --Activate @@ -78,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44052074.lua b/official/c44052074.lua index 989fcb754b..e23b8da38c 100644 --- a/official/c44052074.lua +++ b/official/c44052074.lua @@ -22,18 +22,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tktg) e2:SetOperation(s.tkop) c:RegisterEffect(e2) end s.listed_names={44052075} -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x7) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_ANCIENT_GEAR) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=e:GetHandler() end @@ -64,7 +64,7 @@ function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,ft) end if chk==0 then return ft>-1 and Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,ft) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x7,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ANCIENT_GEAR,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,ft) @@ -75,8 +75,8 @@ end function s.tkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x7,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ANCIENT_GEAR,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c440556.lua b/official/c440556.lua index 4752899123..eec5154f32 100644 --- a/official/c440556.lua +++ b/official/c440556.lua @@ -1,6 +1,5 @@ --バハムート・シャーク --Bahamut Shark - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -14,15 +13,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsRankBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -41,6 +36,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c4408198.lua b/official/c4408198.lua index f5d1c171bc..2dd273f6f4 100644 --- a/official/c4408198.lua +++ b/official/c4408198.lua @@ -1,5 +1,5 @@ --エクソシスター・アーメント ---Exorsister Amento +--Exosister Arment --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -12,26 +12,22 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) or Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_GRAVE) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0x174) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_EXOSISTER) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,pg) end function s.filter2(c,e,tp,mc,pg) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x174) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_EXOSISTER) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end @@ -55,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c44088292.lua b/official/c44088292.lua index 02bb933399..9f7f8a964e 100644 --- a/official/c44088292.lua +++ b/official/c44088292.lua @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44092304.lua b/official/c44092304.lua index d8455e79e4..12db5ed4aa 100644 --- a/official/c44092304.lua +++ b/official/c44092304.lua @@ -1,7 +1,6 @@ --夢迷枕パラソムニア ---Dream Pillow Parasomnia +--Parasomnia Pillow --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -67,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RACE) diff --git a/official/c44095762.lua b/official/c44095762.lua index a5d8877a4b..86c0b01f8a 100644 --- a/official/c44095762.lua +++ b/official/c44095762.lua @@ -1,4 +1,5 @@ --聖なるバリア-ミラーフォース- +--Mirror Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsAttackPos() @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44097050.lua b/official/c44097050.lua index 74fc68da59..ef9b05f26f 100644 --- a/official/c44097050.lua +++ b/official/c44097050.lua @@ -27,20 +27,20 @@ function s.initial_effect(c) e2:SetOperation(s.op) c:RegisterEffect(e2) end -s.listed_series={0x101b} +s.listed_series={SET_MECHA_PHANTOM_BEAST} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x101b,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_MECHA_PHANTOM_BEAST,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x101b,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_MECHA_PHANTOM_BEAST,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then local token1=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP) local token2=Duel.CreateToken(tp,id+1) @@ -55,12 +55,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -68,7 +68,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return (sumtype&SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK end function s.spfilter(c,e,tp) - return c:IsSetCard(0x101b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_MECHA_PHANTOM_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.svfilter(c,tp) return c:IsTrap() and c:IsAbleToHand() @@ -131,5 +131,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end - +end \ No newline at end of file diff --git a/official/c44125452.lua b/official/c44125452.lua index 81dd5d0b3b..29b1d5769b 100644 --- a/official/c44125452.lua +++ b/official/c44125452.lua @@ -1,4 +1,5 @@ --薔薇の妖精 +--Rose Fairy local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44133040.lua b/official/c44133040.lua index fd0d1ea5ea..7bc4e4fb39 100644 --- a/official/c44133040.lua +++ b/official/c44133040.lua @@ -3,7 +3,7 @@ --scripted by Naim local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x129)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_EVIL_EYE)) --Prevent destruction by battle local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -45,11 +45,11 @@ function s.initial_effect(c) e6:SetOperation(s.setop) c:RegisterEffect(e6) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={id} function s.atkupcond(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() - return ((re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x129) and re:GetHandler()~=e:GetHandler()) + return ((re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_EVIL_EYE) and re:GetHandler()~=e:GetHandler()) or re:GetHandler()==ec) and tp==rp end function s.atkupop(e,tp,eg,ep,ev,re,r,rp) @@ -61,7 +61,7 @@ function s.atkupop(e,tp,eg,ep,ev,re,r,rp) end end function s.rfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x129) and c:IsAbleToRemoveAsCost() and not c:IsCode(id) + return c:IsSpellTrap() and c:IsSetCard(SET_EVIL_EYE) and c:IsAbleToRemoveAsCost() and not c:IsCode(id) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -79,4 +79,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end +end \ No newline at end of file diff --git a/official/c44139064.lua b/official/c44139064.lua index 33fd25ee57..01e0ca6fb1 100644 --- a/official/c44139064.lua +++ b/official/c44139064.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) end @@ -48,12 +48,12 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.thfilter(c) - return c:IsSetCard(0x16) and c:IsAbleToHand() + return c:IsSetCard(SET_ROID) and c:IsAbleToHand() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=e:GetHandler() end @@ -81,10 +81,10 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) if not a:IsControler(tp) then a=Duel.GetAttackTarget() end - return a and a:IsSetCard(0x16) and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return a and a:IsSetCard(SET_ROID) and Duel.IsPhase(PHASE_DAMAGE_CAL) end function s.atkfilter(c) - return c:IsMonster() and c:IsSetCard(0x16) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_ROID) and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_DECK,0,1,nil) @@ -98,7 +98,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) --lizard check @@ -115,7 +115,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SWAP_BASE_AD) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL|PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c44146295.lua b/official/c44146295.lua index e0f44ad186..725c898aad 100644 --- a/official/c44146295.lua +++ b/official/c44146295.lua @@ -55,7 +55,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then local reset=RESET_SELF_TURN if Duel.IsTurnPlayer(tp) then reset=RESET_OPPO_TURN end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -65,7 +65,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) @@ -77,7 +77,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c44155002.lua b/official/c44155002.lua index 9b9deca6ab..68f51ef72a 100644 --- a/official/c44155002.lua +++ b/official/c44155002.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x35),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FABLED),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --Negate and destroy local e1=Effect.CreateEffect(c) @@ -14,11 +14,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.disop(e,tp,eg,ep,ev,re,r,rp) if ep==tp or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end local rc=re:GetHandler() if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44163252.lua b/official/c44163252.lua index abcd4e2262..69c75f6882 100644 --- a/official/c44163252.lua +++ b/official/c44163252.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.gyop) c:RegisterEffect(e2) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x122) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VALKYRIE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,4 +49,4 @@ function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.gyop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44175358.lua b/official/c44175358.lua index e85cb15f77..0ba6c5d469 100644 --- a/official/c44175358.lua +++ b/official/c44175358.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c44178886.lua b/official/c44178886.lua index 8f5915d992..867b88bf07 100644 --- a/official/c44178886.lua +++ b/official/c44178886.lua @@ -1,4 +1,5 @@ --ライトロード・モンク エイリン +--Ehren, Lightsworn Monk local s,id=GetID() function s.initial_effect(c) --to deck @@ -31,7 +32,7 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local t=Duel.GetAttackTarget() if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then - Duel.SendtoDeck(t,nil,2,REASON_EFFECT) + Duel.SendtoDeck(t,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -43,4 +44,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44179224.lua b/official/c44179224.lua index 77418f637c..147fa7c6d5 100644 --- a/official/c44179224.lua +++ b/official/c44179224.lua @@ -1,4 +1,5 @@ --魔界劇団-カーテン・ライザー +--Abyss Actor - Curtain Raiser local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -35,7 +36,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x20ec,0x10ec} +s.listed_series={SET_ABYSS_SCRIPT,SET_ABYSS_ACTOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end @@ -57,7 +58,7 @@ function s.atkcon(e) return Duel.GetMatchingGroupCount(nil,tp,LOCATION_MZONE,0,c)==0 end function s.thcfilter(c) - return c:IsSpell() and c:IsSetCard(0x20ec) and c:IsAbleToGraveAsCost() + return c:IsSpell() and c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_DECK,0,1,nil) end @@ -66,7 +67,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -79,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44182827.lua b/official/c44182827.lua index 8194097437..f91b88be23 100644 --- a/official/c44182827.lua +++ b/official/c44182827.lua @@ -1,4 +1,5 @@ --輪廻転生 +--Samsara local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.rmtarget(e,c) return c:GetReason()==REASON_RELEASE+REASON_RITUAL+REASON_EFFECT+REASON_MATERIAL -end +end \ No newline at end of file diff --git a/official/c44186624.lua b/official/c44186624.lua index 9b45267dcd..2f606dac68 100644 --- a/official/c44186624.lua +++ b/official/c44186624.lua @@ -1,4 +1,5 @@ --DDD制覇王カイゼル +--D/D/D Supreme King Kaiser local s,id=GetID() function s.initial_effect(c) --spsummon success @@ -30,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end @@ -42,17 +43,17 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -77,7 +78,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c44190146.lua b/official/c44190146.lua index a771eb6ace..1bbfd7f5d1 100644 --- a/official/c44190146.lua +++ b/official/c44190146.lua @@ -1,7 +1,6 @@ --デメット爺さん --Grandpa Demetto --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -52,7 +51,6 @@ function s.initial_effect(c) end --Specifically lists "Princess Cologne" s.listed_names={75574498} - --Check for "Princess Cologne" function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsCode(75574498) @@ -97,19 +95,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(ATTRIBUTE_DARK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end end - function s.rcon(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():GetLabelObject():Merge(re:GetHandler():GetOverlayGroup()) return false @@ -150,4 +147,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c44201739.lua b/official/c44201739.lua index 9aa051730b..6c84b49035 100644 --- a/official/c44201739.lua +++ b/official/c44201739.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -57,11 +57,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp==1-tp and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:HasFlagEffect(id) and Duel.IsChainNegatable(ev) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.tgfilter(c,codes) return c:IsAbleToGrave() and c:IsCode(codes) end diff --git a/official/c44209392.lua b/official/c44209392.lua index 088694f8b7..a46b8a366a 100644 --- a/official/c44209392.lua +++ b/official/c44209392.lua @@ -1,4 +1,5 @@ --城壁 +--Castle Walls local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsDefenseAbove(0) end @@ -31,8 +29,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c44221928.lua b/official/c44221928.lua index c073ceeb59..1c5258a52e 100644 --- a/official/c44221928.lua +++ b/official/c44221928.lua @@ -1,5 +1,6 @@ --Breath of Acclamation +--Breath of Acclamation local s,id=GetID() function s.initial_effect(c) Ritual.AddProcEqual(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND)) -end +end \ No newline at end of file diff --git a/official/c44223284.lua b/official/c44223284.lua index f95d97b67c..aa65260a61 100644 --- a/official/c44223284.lua +++ b/official/c44223284.lua @@ -1,4 +1,5 @@ --深海王デビルシャーク +--Abyssal Kingshark local s,id=GetID() function s.initial_effect(c) --battle indes @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_EFFECT)~=0 and not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) -end +end \ No newline at end of file diff --git a/official/c44227727.lua b/official/c44227727.lua index bde522a215..d1811d7c8b 100644 --- a/official/c44227727.lua +++ b/official/c44227727.lua @@ -1,7 +1,6 @@ --海造賊-進水式 --Plunder Patroll Shipshape Ships Shipping --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Fusion summon 1 fiend fusion monster @@ -15,19 +14,18 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end -s.listed_series={0x13f} +s.listed_series={SET_PLUNDER_PATROLL} s.listed_names={80621422} - function s.efilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x13f) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,c) + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,c) end function s.eqfilter(c,tc) - return not c:IsForbidden() and ((c:IsCode(80621422) and c:CheckEquipTarget(tc)) or (c:IsMonster() and c:IsSetCard(0x13f))) + return not c:IsForbidden() and ((c:IsCode(80621422) and c:CheckEquipTarget(tc)) or (c:IsMonster() and c:IsSetCard(SET_PLUNDER_PATROLL))) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.efilter(chkc,tp) end @@ -38,7 +36,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not (tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsSetCard(0x13f)) then return end + if not (tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsSetCard(SET_PLUNDER_PATROLL)) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc) local eq=g:GetFirst() @@ -47,7 +45,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) eq:RegisterEffect(e1) diff --git a/official/c4423206.lua b/official/c4423206.lua index 144217f49a..426c90a3ba 100644 --- a/official/c4423206.lua +++ b/official/c4423206.lua @@ -1,4 +1,5 @@ --M.X-セイバー インヴォーカー +--M-X-Saber Invoker local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,17 +12,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsRace(RACE_WARRIOR+RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) + return c:IsRace(RACE_WARRIOR|RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,7 +33,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -58,4 +55,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44236692.lua b/official/c44236692.lua index 4a40cf2934..fde128e611 100644 --- a/official/c44236692.lua +++ b/official/c44236692.lua @@ -1,6 +1,5 @@ --ネクロ・リンカー --Necro Linker - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Synchron" tuner from GY @@ -10,19 +9,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x1017} - -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_SYNCHRON} function s.filter(c,e,tp) - return c:IsSetCard(0x1017) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SYNCHRON) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -43,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c44250812.lua b/official/c44250812.lua index 79ec60d3b0..e4e5f51bf1 100644 --- a/official/c44250812.lua +++ b/official/c44250812.lua @@ -1,4 +1,5 @@ --ガガガクラーク +--Gagaga Clerk local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,12 +11,12 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_GAGAGA) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c44256816.lua b/official/c44256816.lua index 90f84831b4..5c86fe7697 100644 --- a/official/c44256816.lua +++ b/official/c44256816.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.counterfilter(c) - return c:IsSetCard(0x9b) + return c:IsSetCard(SET_MELODIOUS) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -36,21 +36,21 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9b) + return not c:IsSetCard(SET_MELODIOUS) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x9b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_MELODIOUS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44273680.lua b/official/c44273680.lua index 08557ffe0e..ebc618e1c2 100644 --- a/official/c44273680.lua +++ b/official/c44273680.lua @@ -1,4 +1,5 @@ --光天使ブックス +--Star Seraph Sage local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x86} +s.listed_series={SET_STAR_SERAPH} function s.cfilter(c) return c:IsSpell() and c:IsAbleToGraveAsCost() end @@ -22,7 +23,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STAR_SERAPH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44308317.lua b/official/c44308317.lua index 75bfda9776..0c1e54d185 100644 --- a/official/c44308317.lua +++ b/official/c44308317.lua @@ -1,7 +1,6 @@ --氷結界の依巫 --Speaker for the Ice Barriers --Scripted by Kohana Sonogami - local s,id=GetID() function s.initial_effect(c) --Cannot Change Battle Position @@ -32,23 +31,22 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetCondition(s.tokencon) e3:SetTarget(s.tokentg) e3:SetOperation(s.tokenop) c:RegisterEffect(e3) end s.listed_names={44308318} -s.listed_series={0x2f} - +s.listed_series={SET_ICE_BARRIER} function s.changecon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.changetg(e,c) return c:IsDefensePos() end function s.spcfilter(c) - return c:IsFaceup() and c:IsMonster() and c:IsSetCard(0x2f) + return c:IsFaceup() and c:IsMonster() and c:IsSetCard(SET_ICE_BARRIER) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil) @@ -64,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.tokenfilter(c) - return c:IsFaceup() and c:IsMonster() and c:IsSetCard(0x2f) + return c:IsFaceup() and c:IsMonster() and c:IsSetCard(SET_ICE_BARRIER) end function s.tokencon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.tokenfilter,tp,LOCATION_MZONE,0,1,nil) diff --git a/official/c44311445.lua b/official/c44311445.lua index 8f5267f028..0cc401ba72 100644 --- a/official/c44311445.lua +++ b/official/c44311445.lua @@ -27,13 +27,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} s.listed_names={74641045} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsRankBelow(4) and c:IsSetCard(0x71,lc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsRankBelow(4) and c:IsSetCard(SET_MADOLCHE,lc,SUMMON_TYPE_XYZ,tp) end function s.tdfilter(c) - return c:IsSetCard(0x71) and c:IsAbleToDeck() + return c:IsSetCard(SET_MADOLCHE) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end @@ -45,11 +45,11 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.cfilter(c,tp) - return c:IsSetCard(0x71) and c:IsLocation(LOCATION_DECK) + return c:IsSetCard(SET_MADOLCHE) and c:IsLocation(LOCATION_DECK) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -62,7 +62,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) c:RegisterFlagEffect(id,RESET_CHAIN,0,1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x71) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_MADOLCHE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c44330098.lua b/official/c44330098.lua index 2be733008a..c080e4096d 100644 --- a/official/c44330098.lua +++ b/official/c44330098.lua @@ -76,13 +76,13 @@ function s.sumop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE) e2:SetValue(val) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e2) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end @@ -99,4 +99,4 @@ end function s.sumop3(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4433488.lua b/official/c4433488.lua index 8f68b881e8..73410dce0e 100644 --- a/official/c4433488.lua +++ b/official/c4433488.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,sp) - return c:IsLinkMonster() and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSummonPlayer()==sp + return c:IsLinkMonster() and c:IsLinkSummoned() and c:GetSummonPlayer()==sp end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44341034.lua b/official/c44341034.lua index 27c8a5910b..5c97dbf8e8 100644 --- a/official/c44341034.lua +++ b/official/c44341034.lua @@ -1,4 +1,5 @@ --ダーク・バグ +--Dark Bug local s,id=GetID() function s.initial_effect(c) --summon success @@ -30,13 +31,13 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c44352516.lua b/official/c44352516.lua index 973f65ada1..83bde26835 100644 --- a/official/c44352516.lua +++ b/official/c44352516.lua @@ -1,5 +1,5 @@ --サイバーダーク・インフェルノ ---c44352516.lua +--Cyberdark Inferno local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,15 +43,15 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x4093,0x46} +s.listed_series={SET_CYBERDARK,SET_FUSION} function s.indestg(e,c) - return c:IsSetCard(0x4093) and c:IsType(TYPE_EFFECT) and c:GetEquipCount()>0 + return c:IsSetCard(SET_CYBERDARK) and c:IsType(TYPE_EFFECT) and c:GetEquipCount()>0 end function s.filter(c) - return c:IsSetCard(0x4093) and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_CYBERDARK) and c:IsFaceup() and c:IsAbleToHand() end function s.filter2(c) - return c:IsSetCard(0x4093) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_CYBERDARK) and c:IsSummonable(true,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -79,7 +79,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -92,4 +92,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44362883.lua b/official/c44362883.lua index 26cc02b78e..03b8bce807 100644 --- a/official/c44362883.lua +++ b/official/c44362883.lua @@ -31,7 +31,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp,s.lizfilter) @@ -44,5 +44,5 @@ function s.lizfilter(e,c) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK) -end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK) +end \ No newline at end of file diff --git a/official/c44364077.lua b/official/c44364077.lua index 11a4d197be..020898af7d 100644 --- a/official/c44364077.lua +++ b/official/c44364077.lua @@ -1,4 +1,5 @@ --EMヘイタイガー +--Performapal Salutiger local s,id=GetID() function s.initial_effect(c) --search @@ -13,14 +14,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end function s.filter(c) - return c:IsSetCard(0x9f) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44364207.lua b/official/c44364207.lua index 937b19f157..56fa11b586 100644 --- a/official/c44364207.lua +++ b/official/c44364207.lua @@ -1,4 +1,5 @@ --ジェイドナイト +--Jade Knight local s,id=GetID() function s.initial_effect(c) --indes @@ -49,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44373896.lua b/official/c44373896.lua index 8d9b087937..2d7592df40 100644 --- a/official/c44373896.lua +++ b/official/c44373896.lua @@ -1,5 +1,5 @@ --Destruction Dragon ---Scripted by ahtelel +--Destruction Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c44394295.lua b/official/c44394295.lua index f380085acd..0809feb8dc 100644 --- a/official/c44394295.lua +++ b/official/c44394295.lua @@ -1,13 +1,13 @@ --影依融合 ---Shaddol Fusion +--Shaddoll Fusion local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x9d),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.fextra(e,tp,mg) if Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil) diff --git a/official/c44397496.lua b/official/c44397496.lua index eedaacc1e0..3e12180c5b 100644 --- a/official/c44397496.lua +++ b/official/c44397496.lua @@ -1,4 +1,5 @@ --レッドアイズ・スピリッツ +--Red-Eyes Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.filter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44405066.lua b/official/c44405066.lua index 45be0e4031..4481df8fd9 100644 --- a/official/c44405066.lua +++ b/official/c44405066.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c4440873.lua b/official/c4440873.lua index 62265d08c6..8624ec7e15 100644 --- a/official/c4440873.lua +++ b/official/c4440873.lua @@ -1,4 +1,5 @@ --強烈なはたき落とし +--Drastic Drop Off local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,10 +30,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=eg:Filter(s.filter,nil,e,1-tp) if #sg==0 then elseif #sg==1 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local dg=sg:Select(1-tp,1,1,nil) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c44413654.lua b/official/c44413654.lua index fb72545453..fa626a56dc 100644 --- a/official/c44413654.lua +++ b/official/c44413654.lua @@ -25,17 +25,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.tdfilter(c) return c:IsSpellTrap() and c:IsAbleToDeck() end function s.mpfilter(c) - return c:IsSetCard(0x26) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and s.tdfilter(chkc) end @@ -43,7 +43,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.tdfilter,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,s.tdfilter,tp,0,LOCATION_ONFIELD,1,2,nil) - Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g+1,tp,LOCATION_ONFIELD+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g+1,tp,LOCATION_ONFIELD|LOCATION_HAND) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) @@ -57,14 +57,14 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c44424095.lua b/official/c44424095.lua index cc1eec81ff..bbc0757e5b 100644 --- a/official/c44424095.lua +++ b/official/c44424095.lua @@ -1,4 +1,5 @@ --D・スピードユニット +--Morphtronic Accelerator local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.filter(c) - return c:IsSetCard(0x26) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end @@ -31,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil) if #g==0 then return end Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.ShuffleDeck(tp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(tc,REASON_EFFECT)==0 then return end Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44436472.lua b/official/c44436472.lua index 2784f3ca67..75a8ba182c 100644 --- a/official/c44436472.lua +++ b/official/c44436472.lua @@ -1,4 +1,5 @@ --ダブルコストン +--Double Coston local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c44440058.lua b/official/c44440058.lua index ee8387da10..c49fba1c1f 100644 --- a/official/c44440058.lua +++ b/official/c44440058.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x13d} +s.listed_series={SET_NEMESES} function s.tdfilter(c) return c:IsMonster() and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) end @@ -53,12 +53,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsFacedown() then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44451698.lua b/official/c44451698.lua index b2cb62976c..81cb81aef8 100644 --- a/official/c44451698.lua +++ b/official/c44451698.lua @@ -1,7 +1,6 @@ --妖精弓士イングナル --Fairy Archer Ingunar --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 6+ plant monster @@ -52,13 +51,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c44455560.lua b/official/c44455560.lua index fa6bf5f739..736e7fdad6 100644 --- a/official/c44455560.lua +++ b/official/c44455560.lua @@ -46,11 +46,11 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end - local dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c) + local dg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,c) if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND|LOCATION_MZONE) else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -93,4 +93,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c44459942.lua b/official/c44459942.lua index 3921c9ab7c..a55a384d63 100644 --- a/official/c44459942.lua +++ b/official/c44459942.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.tknspcond) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tknsptg) e2:SetOperation(s.tknspop) c:RegisterEffect(e2) diff --git a/official/c4446672.lua b/official/c4446672.lua index 492780abe6..fc5ceff01f 100644 --- a/official/c4446672.lua +++ b/official/c4446672.lua @@ -1,4 +1,5 @@ --古代の機械爆弾 +--Ancient Gear Explosive local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7) + return c:IsFaceup() and c:IsSetCard(SET_ANCIENT_GEAR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,tc:GetBaseAttack()/2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c44472639.lua b/official/c44472639.lua index 6b21c32c87..b6efdeb9ae 100644 --- a/official/c44472639.lua +++ b/official/c44472639.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DRAW_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_DRAW_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -27,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil)*600 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44478599.lua b/official/c44478599.lua index a9cdb4c6dc..750bbb6f5c 100644 --- a/official/c44478599.lua +++ b/official/c44478599.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -37,8 +37,8 @@ function s.initial_effect(c) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0x2157,0x1157} -s.listed_names={27520594} +s.listed_series={SET_SUNVINE,SET_SUNAVALON} +s.listed_names={27520594} --"Sunseed Genius Loci" function s.matcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsType,1,nil,TYPE_LINK,lc,sumtype,tp) end @@ -47,7 +47,7 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -58,10 +58,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.atfilter(c,lg) - return c:IsSetCard(0x2157) and c:IsLinkMonster() and lg and lg:IsContains(c) + return c:IsSetCard(SET_SUNVINE) and c:IsLinkMonster() and lg and lg:IsContains(c) end function s.valfilter(c) - return c:IsSetCard(0x1157) and c:IsLinkMonster() + return c:IsSetCard(SET_SUNAVALON) and c:IsLinkMonster() end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local lg=e:GetHandler():GetLinkedGroup() @@ -81,7 +81,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(ct-1) tc:RegisterEffect(e1) elseif ct==0 then @@ -89,8 +89,8 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end \ No newline at end of file diff --git a/official/c44481227.lua b/official/c44481227.lua index 390d2b33ae..ee99ac8cbd 100644 --- a/official/c44481227.lua +++ b/official/c44481227.lua @@ -1,6 +1,5 @@ --EMラクダウン --Performapal Camelump - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -51,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) gc:RegisterEffect(e1) end if tc:IsRelateToEffect(e) then @@ -61,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -76,7 +75,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c44487250.lua b/official/c44487250.lua index 12d8b06dda..b3a96f0b61 100644 --- a/official/c44487250.lua +++ b/official/c44487250.lua @@ -1,4 +1,5 @@ --エクシーズ・ブロック +--Xyz Block local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return rp~=tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44505297.lua b/official/c44505297.lua index edf6903cfa..498fbb287c 100644 --- a/official/c44505297.lua +++ b/official/c44505297.lua @@ -1,5 +1,5 @@ --甲虫装機 エクサビートル ---c44505297 +--Inzektor Exa-Beetle local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -25,13 +25,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCategory(CATEGORY_TOGRAVE) - e2:SetCost(s.tgcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.eqfilter(c) return c:IsMonster() and not c:IsForbidden() @@ -51,7 +51,7 @@ function s.equipop(c,e,tp,tc) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) local def=tc:GetTextDefense()/2 @@ -59,7 +59,7 @@ function s.equipop(c,e,tp,tc) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_DEFENSE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(def) tc:RegisterEffect(e3) end @@ -70,10 +70,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) s.equipop(c,e,tp,tc) end end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil) diff --git a/official/c4450854.lua b/official/c4450854.lua index 8f39a6b3a9..bd7ee11729 100644 --- a/official/c4450854.lua +++ b/official/c4450854.lua @@ -1,4 +1,5 @@ --隠されし機殻 +--Qlimate Change local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xaa) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_QLI) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44509898.lua b/official/c44509898.lua index 76a6705c42..398f9dd13a 100644 --- a/official/c44509898.lua +++ b/official/c44509898.lua @@ -1,6 +1,5 @@ --ピンポイント・ガード --Pinpoint Guard - local s,id=GetID() function s.initial_effect(c) --When opponent's monster declares an attack, special summon 1 level 4 or lower monster from GY @@ -15,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -38,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c44536921.lua b/official/c44536921.lua index 2d0007aa5a..9c5f8e7467 100644 --- a/official/c44536921.lua +++ b/official/c44536921.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_COUNTER) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON) + e1:SetHintTiming(0,TIMING_SUMMON|TIMING_SPSUMMON) e1:SetCountLimit(1,id) e1:SetCost(s.cost) e1:SetTarget(s.target) @@ -22,16 +22,16 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end s.counter_place_list={COUNTER_PREDATOR} -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.thcfilter(c) - return c:IsMonster() and c:IsSetCard(0x10f3) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_PREDAPLANT) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -65,7 +65,7 @@ function s.lvcon(e) return e:GetHandler():GetCounter(COUNTER_PREDATOR)>0 end function s.cfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:GetSummonPlayer()==tp and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsAttribute(ATTRIBUTE_DARK) and c:GetSummonPlayer()==tp and c:IsFusionSummoned() end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44584775.lua b/official/c44584775.lua index 56b9c72c20..de9b02d637 100644 --- a/official/c44584775.lua +++ b/official/c44584775.lua @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44586426.lua b/official/c44586426.lua index c0964c6ffe..8f6c40a84d 100644 --- a/official/c44586426.lua +++ b/official/c44586426.lua @@ -1,5 +1,5 @@ --太陽電池メン ---Solar Batteryman +--Batteryman Solar local s,id=GetID() function s.initial_effect(c) --gy @@ -74,14 +74,14 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end function s.nmfilter(c,cd) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsType(TYPE_EFFECT) - and c:IsOriginalSetCard(0x28) and not c:IsOriginalCode(cd) + and c:IsOriginalSetCard(SET_BATTERYMAN) and not c:IsOriginalCode(cd) end function s.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local cd=e:GetHandler():GetCode() - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.nmfilter(chkc,cd) end - if chk==0 then return Duel.IsExistingTarget(s.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,cd) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.nmfilter(chkc,cd) end + if chk==0 then return Duel.IsExistingTarget(s.nmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,cd) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.nmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,cd) + Duel.SelectTarget(tp,s.nmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,cd) end function s.nmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -91,8 +91,7 @@ function s.nmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(tc:GetOriginalCode()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c44595286.lua b/official/c44595286.lua index bc9a837c01..937c3b6013 100644 --- a/official/c44595286.lua +++ b/official/c44595286.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(0,TIMING_TOHAND+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_TOHAND|TIMINGS_CHECK_MONSTER_E) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(s.condition) e1:SetCost(s.cost) @@ -26,10 +26,10 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end + if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD|LOCATION_HAND)>0 end end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c44612603.lua b/official/c44612603.lua index 1c4384c24e..2e9c1abb84 100644 --- a/official/c44612603.lua +++ b/official/c44612603.lua @@ -1,4 +1,5 @@ --生存境界 +--Survival's End local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -33,7 +34,7 @@ function s.spfilter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) @@ -56,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local fid=e:GetHandler():GetFieldID() local tc=sg2:GetFirst() for tc in aux.Next(sg2) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0,fid) end sg2:KeepAlive() local e1=Effect.CreateEffect(e:GetHandler()) @@ -106,4 +107,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44632120.lua b/official/c44632120.lua index 7dbc350190..00df9f3fd3 100644 --- a/official/c44632120.lua +++ b/official/c44632120.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={71036835,7021574,34419588,70914287,CARD_KURIBOH} -s.listed_series={0xa4} +s.listed_series={SET_KURIBOH} function s.spcfilter1(c,tp) - return c:IsPreviousSetCard(0xa4) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_KURIBOH) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter1,1,nil,tp) @@ -70,14 +70,14 @@ function s.spfilter2(c,e,tp) return c:IsCode(70914287) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44635489.lua b/official/c44635489.lua index 8a2676390f..50d3e4ce44 100644 --- a/official/c44635489.lua +++ b/official/c44635489.lua @@ -1,4 +1,5 @@ --セイクリッド・シェアト +--Constellar Siat local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetValue(s.xyzlimit) c:RegisterEffect(e3) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 @@ -36,14 +37,14 @@ function s.spcon(e,c) end function s.filter(c,clv) local lv=c:GetLevel() - return c:IsSetCard(0x53) and lv~=0 and lv~=clv + return c:IsSetCard(SET_CONSTELLAR) and lv~=0 and lv~=clv and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE)) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc,e:GetHandler():GetLevel()) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -54,11 +55,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e:GetHandler():RegisterEffect(e1) end end function s.xyzlimit(e,c) if not c then return false end - return not c:IsSetCard(0x53) -end + return not c:IsSetCard(SET_CONSTELLAR) +end \ No newline at end of file diff --git a/official/c44640691.lua b/official/c44640691.lua index 3b0fe3d379..1160b8afc7 100644 --- a/official/c44640691.lua +++ b/official/c44640691.lua @@ -64,7 +64,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_CANNOT_ACT+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_CANNOT_ACT|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -74,10 +74,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(1,0) e2:SetValue(s.aclimit) e2:SetLabel(tc:GetCode()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end function s.aclimit(e,re,tp) return re:GetHandler():IsCode(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e) -end +end \ No newline at end of file diff --git a/official/c44644529.lua b/official/c44644529.lua index 98d99efd86..2b5deb6ebb 100644 --- a/official/c44644529.lua +++ b/official/c44644529.lua @@ -1,7 +1,6 @@ --双天の転身 --Dual Avatar Ascendance --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -27,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c44649322.lua b/official/c44649322.lua index 64cdb9050d..8b9bc09863 100644 --- a/official/c44649322.lua +++ b/official/c44649322.lua @@ -1,35 +1,35 @@ --- 伝承の大御巫 --- The Great Mikanko of Legend --- Scripted by Hatter +--伝承の大御巫 +--The Great Mikanko Ceremony +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon 1 "Mikanko" monster + --Special Summon 1 "Mikanko" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Send 1 "Mikanko" card to the GY + --Send 1 "Mikanko" card to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsSetCard(0x18e) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsMonster() and c:IsSetCard(SET_MIKANKO) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,8 +43,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then local c=e:GetHandler() local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,2)) - -- Return to the hand in the opponent's End Phase + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,2)) + --Return to the hand in the opponent's End Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -68,7 +68,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) end function s.tgfilter(c) - return c:IsSetCard(0x18e) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_MIKANKO) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c44656450.lua b/official/c44656450.lua index c7833f658a..2cfe443aaf 100644 --- a/official/c44656450.lua +++ b/official/c44656450.lua @@ -1,6 +1,5 @@ --失楽の魔女 --Condemned Witch --- local s,id=GetID() function s.initial_effect(c) --search @@ -19,19 +18,19 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x11d} +s.listed_series={SET_FORBIDDEN} s.listed_names={id} function s.thfilter(c) - return (c:IsSetCard(0x11d) or c:IsCode(25789292,27243130,54773234,96864811)) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() + return (c:IsSetCard(SET_FORBIDDEN) or c:IsCode(25789292,27243130,54773234,96864811)) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -46,11 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.spfilter(c,e,tp) return c:IsLevel(4) and c:IsRace(RACE_FAIRY) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -67,5 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c44656491.lua b/official/c44656491.lua index ac4c7d9f4b..330dd8e93e 100644 --- a/official/c44656491.lua +++ b/official/c44656491.lua @@ -1,4 +1,5 @@ --平和の使者 +--Messenger of Peace local s,id=GetID() function s.initial_effect(c) --activate @@ -18,7 +19,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.mtcon) @@ -29,7 +30,7 @@ function s.atktarget(e,c) return c:GetAttack()>=1500 end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,100) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -37,4 +38,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c4466015.lua b/official/c4466015.lua index a707523fb0..8267978900 100644 --- a/official/c4466015.lua +++ b/official/c4466015.lua @@ -12,22 +12,22 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.counter_list={0x1009} +s.counter_list={COUNTER_VENOM} function s.filter(c) - return c:GetCounter(0x1009)>0 + return c:GetCounter(COUNTER_VENOM)>0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetCounter(0x1009)*700) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetCounter(COUNTER_VENOM)*700) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - local ct=tc:GetCounter(0x1009) + local ct=tc:GetCounter(COUNTER_VENOM) if ct>0 then - tc:RemoveCounter(tp,0x1009,ct,REASON_EFFECT) + tc:RemoveCounter(tp,COUNTER_VENOM,ct,REASON_EFFECT) Duel.Damage(1-tp,ct*700,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44663232.lua b/official/c44663232.lua index 7f973fc6ef..54c5e98572 100644 --- a/official/c44663232.lua +++ b/official/c44663232.lua @@ -1,6 +1,5 @@ --異怪の妖精 エルフォビア --Ghost Fairy Elfobia - local s,id=GetID() function s.initial_effect(c) --Activate limit @@ -32,10 +31,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetLabel(e:GetLabel()+1) - e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_MAIN1|RESET_OPPO_TURN) e1:SetValue(s.val) Duel.RegisterEffect(e1,tp) end function s.val(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsLevelAbove(e:GetLabel()) + return re:IsMonsterEffect() and re:GetHandler():IsLevelAbove(e:GetLabel()) end \ No newline at end of file diff --git a/official/c44665365.lua b/official/c44665365.lua index aab9608034..6833357cdb 100644 --- a/official/c44665365.lua +++ b/official/c44665365.lua @@ -22,7 +22,7 @@ s.listed_names={27383110} function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.costfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() @@ -44,4 +44,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44676200.lua b/official/c44676200.lua index 59fb2247ee..3123635dc2 100644 --- a/official/c44676200.lua +++ b/official/c44676200.lua @@ -1,4 +1,5 @@ --ヒーローバリア +--Hero Barrier local s,id=GetID() function s.initial_effect(c) --negate attack @@ -9,12 +10,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()0 diff --git a/official/c44702857.lua b/official/c44702857.lua index e1570a7c5d..fd03bceb68 100644 --- a/official/c44702857.lua +++ b/official/c44702857.lua @@ -1,4 +1,5 @@ --バイトロン +--Bitelon local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c44708154.lua b/official/c44708154.lua index 8629a817eb..319c2d6702 100644 --- a/official/c44708154.lua +++ b/official/c44708154.lua @@ -1,5 +1,5 @@ --Uk-P.U.N.K.アメイジング・ドラゴン ---Ukiyoe P.U.N.K. Amazing Dragon +--Ukiyoe-P.U.N.K. Amazing Dragon --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -29,18 +29,18 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) return c:IsRace(RACE_PSYCHIC) and c:IsLevel(3) and (c:IsFaceup() or not c:IsOnField()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil):GetClassCount(Card.GetCode) + local ct=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil):GetClassCount(Card.GetCode) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) @@ -52,7 +52,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x173) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PUNK) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44716890.lua b/official/c44716890.lua index 59f9c4f409..b58634cba2 100644 --- a/official/c44716890.lua +++ b/official/c44716890.lua @@ -38,4 +38,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_COST) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c44717069.lua b/official/c44717069.lua index a1d1844b77..102fa5eeae 100644 --- a/official/c44717069.lua +++ b/official/c44717069.lua @@ -1,4 +1,5 @@ --スターフィッシュ +--Starfish local s,id=GetID() function s.initial_effect(c) --lvup @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c4472318.lua b/official/c4472318.lua index b735795bda..563badf879 100644 --- a/official/c4472318.lua +++ b/official/c4472318.lua @@ -1,4 +1,4 @@ --- +--岩竜ベアロック --Bayerock Dragon --scripted by Naim local s,id=GetID() diff --git a/official/c44729197.lua b/official/c44729197.lua index cfa9273418..8d5451afde 100644 --- a/official/c44729197.lua +++ b/official/c44729197.lua @@ -1,4 +1,5 @@ --スチームロイド +--Steamroid local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.val(e,c) if Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil then return 500 elseif e:GetHandler()==Duel.GetAttackTarget() then return -500 else return 0 end -end +end \ No newline at end of file diff --git a/official/c4474060.lua b/official/c4474060.lua index 929b799c4f..17cd6737d8 100644 --- a/official/c4474060.lua +++ b/official/c4474060.lua @@ -1,3 +1,4 @@ +--SPYRAL GEAR-ドローン --SPYRAL GEAR - Drone local s,id=GetID() function s.initial_effect(c) @@ -22,8 +23,8 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCondition(aux.StatChangeDamageStepCondition) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -39,7 +40,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} s.listed_names={41091257} function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end @@ -47,15 +48,8 @@ end function s.stop(e,tp,eg,ep,ev,re,r,rp) Duel.SortDecktop(tp,1-tp,3) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xee) + return c:IsFaceup() and c:IsSetCard(SET_SPYRAL) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -72,12 +66,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.cfilter(c,tp) - return c:IsSetCard(0xee) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_SPYRAL) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end function s.thfilter(c) @@ -104,4 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44762290.lua b/official/c44762290.lua index 7e7478871e..c510cf5256 100644 --- a/official/c44762290.lua +++ b/official/c44762290.lua @@ -1,4 +1,5 @@ --光学迷彩アーマー +--Opti-Camouflage Armor local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterEqualFunction(Card.GetLevel,1)) @@ -7,4 +8,4 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c44763025.lua b/official/c44763025.lua index afe9879745..e8f82bcdaa 100644 --- a/official/c44763025.lua +++ b/official/c44763025.lua @@ -1,4 +1,5 @@ --いたずら好きな双子悪魔 +--Delinquent Duo local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end Duel.SetTargetPlayer(tp) @@ -26,12 +23,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) if #g>0 then local sg=g:RandomSelect(p,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) g:RemoveCard(sg:GetFirst()) if #g>0 then Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_DISCARD) sg=g:Select(1-p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) end end -end +end \ No newline at end of file diff --git a/official/c44763696.lua b/official/c44763696.lua index 3f638383a5..f483327679 100644 --- a/official/c44763696.lua +++ b/official/c44763696.lua @@ -22,15 +22,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.thcd) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} function s.cfilter(c,tp) - return c:IsSetCard(0x23) + return c:IsSetCard(SET_MALEFIC) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.condfilter(c,tp) - return c:IsSetCard(0x23) + return c:IsSetCard(SET_MALEFIC) and not c:IsReason(REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end @@ -56,7 +56,7 @@ function s.thcd(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.condfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0x23) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MALEFIC) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44771289.lua b/official/c44771289.lua index 8d44c9cc42..f0fad68df5 100644 --- a/official/c44771289.lua +++ b/official/c44771289.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0xb1))) + c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_BURNING_ABYSS))) --atk & def local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -12,14 +12,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb1) + return c:IsFaceup() and c:IsSetCard(SET_BURNING_ABYSS) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end @@ -34,10 +34,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c4478086.lua b/official/c4478086.lua index b45c24e1a3..0339b50e03 100644 --- a/official/c4478086.lua +++ b/official/c4478086.lua @@ -40,7 +40,7 @@ function s.thfilter(c) return c:IsCode(65801012) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -72,12 +72,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -88,11 +88,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ge1:SetDescription(aux.Stringid(id,2)) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) end function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_FUSION) -end +end \ No newline at end of file diff --git a/official/c44789585.lua b/official/c44789585.lua index e7f15ad3e8..2a5ec94cd9 100644 --- a/official/c44789585.lua +++ b/official/c44789585.lua @@ -1,4 +1,5 @@ --ナチュル・ビーンズ +--Naturia Beans local s,id=GetID() function s.initial_effect(c) --battle indes @@ -33,4 +34,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44790889.lua b/official/c44790889.lua index d0c83c1d9b..f7691d7d7a 100644 --- a/official/c44790889.lua +++ b/official/c44790889.lua @@ -1,4 +1,5 @@ --ハンマーラッシュ・バウンサー +--Hammer Bounzer local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -25,7 +26,7 @@ function s.ntcon(e,c,minc) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget()~=nil - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) + and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -34,7 +35,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) diff --git a/official/c44792253.lua b/official/c44792253.lua index 8110095b4b..0266cb5d6f 100644 --- a/official/c44792253.lua +++ b/official/c44792253.lua @@ -1,4 +1,5 @@ --D.D.デストロイヤー +--D.D. Destroyer local s,id=GetID() function s.initial_effect(c) --destroy @@ -27,4 +28,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44800181.lua b/official/c44800181.lua index 11b2af60e7..2b483c2b09 100644 --- a/official/c44800181.lua +++ b/official/c44800181.lua @@ -1,4 +1,5 @@ --コンボマスター +--Combo Master local s,id=GetID() function s.initial_effect(c) --chain @@ -18,11 +19,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.chop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()>1 + if Duel.IsPhase(PHASE_MAIN1) and Duel.IsTurnPlayer(tp) and Duel.GetCurrentChain()>1 and e:GetHandler():GetFlagEffect(id)==0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.atkcon(e) return e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c44811425.lua b/official/c44811425.lua index c46c901041..6b3b020c55 100644 --- a/official/c44811425.lua +++ b/official/c44811425.lua @@ -1,4 +1,5 @@ --ワーム・リンクス +--Worm Linx local s,id=GetID() function s.initial_effect(c) --flip @@ -23,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET,0,1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -37,4 +38,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44818.lua b/official/c44818.lua index 0b11ea926f..67752d0cfa 100644 --- a/official/c44818.lua +++ b/official/c44818.lua @@ -1,7 +1,6 @@ --ホーリーナイツ・オルビタエル --Starry Knight Orbitael --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -33,14 +32,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Starry Knight" archetype -s.listed_series={0x15b} - +s.listed_series={SET_STARRY_KNIGHT} function s.releasefilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsReleasableByEffect() end --Check for "Starry Knight" spell/trap function s.setfilter(c) - return c:IsSetCard(0x15b) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_STARRY_KNIGHT) and c:IsSpellTrap() and c:IsSSetable() end --Activation legality function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -83,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44822037.lua b/official/c44822037.lua index c18f4c41f7..edff894b1a 100644 --- a/official/c44822037.lua +++ b/official/c44822037.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,1800,4,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.ngcost) e1:SetTarget(s.ngtg) e1:SetOperation(s.ngop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -55,7 +55,7 @@ function s.ngcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain()==0 and tp~=ep end function s.ngfilter(c) - return c:IsSummonLocation(LOCATION_SZONE) and c:IsType(TYPE_TRAP+TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() + return c:IsSummonLocation(LOCATION_SZONE) and c:IsContinuousTrap() and c:IsAbleToGraveAsCost() end function s.ngcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.ngfilter,tp,LOCATION_MZONE,0,1,nil) end diff --git a/official/c4483989.lua b/official/c4483989.lua index a213042b1f..260554cd31 100644 --- a/official/c4483989.lua +++ b/official/c4483989.lua @@ -25,13 +25,13 @@ end s.toss_coin=true function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return tp~=Duel.GetTurnPlayer() and at and at:IsPosition(POS_FACEUP_DEFENSE) + return Duel.IsTurnPlayer(1-tp) and at and at:IsPosition(POS_FACEUP_DEFENSE) end function s.atktg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end e:SetLabel(0) local at=Duel.GetAttackTarget() - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() + if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.IsTurnPlayer(1-tp) and at and at:IsPosition(POS_FACEUP_DEFENSE) then e:SetLabel(1) Duel.GetAttacker():CreateEffectRelation(e) diff --git a/official/c44843954.lua b/official/c44843954.lua index 09087d21aa..da3e68c996 100644 --- a/official/c44843954.lua +++ b/official/c44843954.lua @@ -79,4 +79,4 @@ function s.tedop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoExtraP(tc,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44852429.lua b/official/c44852429.lua index 0d05329151..11506128af 100644 --- a/official/c44852429.lua +++ b/official/c44852429.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0xaf),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_DD),1,99) c:EnableReviveLimit() --Negate Spell/Trap local e1=Effect.CreateEffect(c) @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xae,0xaf} +s.listed_series={SET_DARK_CONTRACT,SET_DD} function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsNegatableSpellTrap() end if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -47,10 +47,10 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - if Duel.GetCurrentPhase()==PHASE_STANDBY then - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) + if Duel.IsPhase(PHASE_STANDBY) then + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,2) else - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY) end tc:RegisterEffect(e1) local e2=e1:Clone() @@ -66,10 +66,10 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.recfilter(c) - return c:IsFaceup() and c:IsSetCard(0xae) + return c:IsFaceup() and c:IsSetCard(SET_DARK_CONTRACT) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -83,4 +83,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Recover(p,ct*1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44860890.lua b/official/c44860890.lua index 7520dbedbb..b69f291e41 100644 --- a/official/c44860890.lua +++ b/official/c44860890.lua @@ -22,12 +22,12 @@ function s.initial_effect(c) e2:SetValue(s.indval) c:RegisterEffect(e2) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.setcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -40,7 +40,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.indtg(e,c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() end function s.indval(e,re,tp) return e:GetHandler():GetControler()~=tp diff --git a/official/c44874522.lua b/official/c44874522.lua index 31963392f0..0adfada4b3 100644 --- a/official/c44874522.lua +++ b/official/c44874522.lua @@ -38,19 +38,19 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x7,0x51} +s.listed_series={SET_ANCIENT_GEAR,SET_GADGET} function s.valcheck(e,c) local g=c:GetMaterial() local flag=0 local tc=g:GetFirst() for tc in aux.Next(g) do - if tc:IsSetCard(0x7) then flag=(flag|0x1) end - if tc:IsSetCard(0x51) then flag=(flag|0x2) end + if tc:IsSetCard(SET_ANCIENT_GEAR) then flag=(flag|SET_ALLY_OF_JUSTICE) end + if tc:IsSetCard(SET_GADGET) then flag=(flag|SET_GENEX) end end e:SetLabel(flag) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local flag=e:GetLabelObject():GetLabel() @@ -59,7 +59,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x2)~=0 then @@ -67,12 +67,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end end function s.aclimit(e,re,tp) - return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) + return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect()) end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() @@ -81,7 +81,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler() end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end diff --git a/official/c44883600.lua b/official/c44883600.lua index 26916f4d7a..dfabdbbb7c 100644 --- a/official/c44883600.lua +++ b/official/c44883600.lua @@ -1,4 +1,5 @@ --ダブル・ディフェンダー +--Double Defender local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,2,nil,POS_FACEUP_DEFENSE) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,0,2,nil,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.NegateAttack() end -end +end \ No newline at end of file diff --git a/official/c44883830.lua b/official/c44883830.lua index eb596c0426..03e88987bf 100644 --- a/official/c44883830.lua +++ b/official/c44883830.lua @@ -1,4 +1,5 @@ --死の合唱 +--Des Croaking local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44887817.lua b/official/c44887817.lua index bf1b961527..b6a45f0862 100644 --- a/official/c44887817.lua +++ b/official/c44887817.lua @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone(e1) @@ -71,4 +71,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44889144.lua b/official/c44889144.lua index c59fdac26e..f0cf9ff89e 100644 --- a/official/c44889144.lua +++ b/official/c44889144.lua @@ -1,9 +1,9 @@ --- --- Libromancer Intervention --- Scripted by Hatter +--リブロマンサー・インターフェア +--Libromancer Intervention +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Return 1 "Libromancer" Ritual monster to hand and negate + --Return 1 "Libromancer" Ritual monster to hand and negate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) @@ -16,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and Duel.IsChainDisablable(ev) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x17d) and c:IsRitualMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_LIBROMANCER) and c:IsRitualMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -30,20 +30,20 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x17d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LIBROMANCER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and Duel.NegateEffect(ev) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c44891812.lua b/official/c44891812.lua index dad509434f..a443406834 100644 --- a/official/c44891812.lua +++ b/official/c44891812.lua @@ -1,4 +1,5 @@ --超重武者オタス-K +--Superheavy Samurai Helper local s,id=GetID() function s.initial_effect(c) --def up @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.defcon) - e1:SetCost(s.defcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.deftg) e1:SetOperation(s.defop) c:RegisterEffect(e1) @@ -23,22 +24,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.defcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL+TYPE_TRAP)==0 -end -function s.defcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) + return Duel.GetMatchingGroupCount(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,nil)==0 end function s.deffilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) and c:HasNonZeroDefense() + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:HasNonZeroDefense() end function s.deftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local a=Duel.GetAttacker() @@ -60,7 +56,7 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(tc:GetDefense()) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) ac:RegisterEffect(e1) end end @@ -69,12 +65,11 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return at:GetControler()~=tp and Duel.GetAttackTarget()==nil end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) - and s.spfilter(chkc,e,tp) and chkc~=c end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) and chkc~=c end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -83,7 +78,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44901281.lua b/official/c44901281.lua index 50e15d390d..0f8d40b0be 100644 --- a/official/c44901281.lua +++ b/official/c44901281.lua @@ -18,9 +18,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON) c:RegisterEffect(e3) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) + return c:IsFaceup() and c:IsSetCard(SET_X_SABER) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) @@ -33,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c44910027.lua b/official/c44910027.lua index cf41f3f2a1..0fb0fdb9bb 100644 --- a/official/c44910027.lua +++ b/official/c44910027.lua @@ -1,4 +1,5 @@ --ヴィクトリー・ドラゴン +--Victory Dragon local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -25,4 +26,4 @@ function s.initial_effect(c) end function s.tlimit(e,c) return not c:IsRace(RACE_DRAGON) -end +end \ No newline at end of file diff --git a/official/c44913552.lua b/official/c44913552.lua index df903f22c3..2ab17d57cc 100644 --- a/official/c44913552.lua +++ b/official/c44913552.lua @@ -1,4 +1,5 @@ --タイム・イーター +--Timeater local s,id=GetID() function s.initial_effect(c) --skip draw @@ -20,6 +21,6 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetCode(EFFECT_SKIP_M1) - e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_MAIN1|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c44920699.lua b/official/c44920699.lua index 7c45872773..40741e5520 100644 --- a/official/c44920699.lua +++ b/official/c44920699.lua @@ -1,4 +1,5 @@ --炎舞-「天璇」 +--Fire Formation - Tensen local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,22 +9,19 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) - -- - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD) - e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) - e3:SetValue(300) - c:RegisterEffect(e3) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() + --Beast-Warrior monsters you control gain 300 ATK + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD) + e2:SetRange(LOCATION_SZONE) + e2:SetTargetRange(LOCATION_MZONE,0) + e2:SetCode(EFFECT_UPDATE_ATTACK) + e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR)) + e2:SetValue(300) + c:RegisterEffect(e2) end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) @@ -35,14 +33,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(700) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c44928016.lua b/official/c44928016.lua index 3f8c15409b..88ce8e1666 100644 --- a/official/c44928016.lua +++ b/official/c44928016.lua @@ -1,4 +1,5 @@ --にん人 +--World Carrotweight Champion local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,7 +21,7 @@ function s.cfilter(c,ft) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local loc=LOCATION_MZONE+LOCATION_HAND + local loc=LOCATION_MZONE|LOCATION_HAND if ft==0 then loc=LOCATION_MZONE end if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.cfilter,tp,loc,0,1,nil,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44932065.lua b/official/c44932065.lua index 60a797abf2..78fc2bc55b 100644 --- a/official/c44932065.lua +++ b/official/c44932065.lua @@ -26,11 +26,11 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} s.listed_names={id} s.counter_list={COUNTER_PREDATOR} function s.thfilter(c) - return c:IsSetCard(0x10f3) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_PREDAPLANT) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c44935634.lua b/official/c44935634.lua index 66f6ade7a8..ae9eb4b03e 100644 --- a/official/c44935634.lua +++ b/official/c44935634.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -33,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.thfilter(c) @@ -50,5 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c44944304.lua b/official/c44944304.lua index d9e4b1f48f..bc14dcc5e3 100644 --- a/official/c44944304.lua +++ b/official/c44944304.lua @@ -1,4 +1,5 @@ --EMラフメイカー +--Performapal Laugh Maker local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -67,13 +68,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000*ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousAttackOnField()>c:GetBaseAttack() + return c:IsReason(REASON_EFFECT|REASON_BATTLE) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousAttackOnField()>c:GetBaseAttack() end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -92,4 +93,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44947065.lua b/official/c44947065.lua index fee9b78e1d..7745bb3702 100644 --- a/official/c44947065.lua +++ b/official/c44947065.lua @@ -1,4 +1,5 @@ --強者の苦痛 +--Burden of the Mighty local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.val(e,c) return c:GetLevel()*-100 -end +end \ No newline at end of file diff --git a/official/c44954628.lua b/official/c44954628.lua index 062829364d..bc1a766908 100644 --- a/official/c44954628.lua +++ b/official/c44954628.lua @@ -1,4 +1,5 @@ --巨大戦艦 テトラン +--B.E.S. Tetran local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x1f) @@ -84,7 +85,7 @@ function s.descost2(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -98,4 +99,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c44956694.lua b/official/c44956694.lua index 0bf2861cd1..b4ba3d8102 100644 --- a/official/c44956694.lua +++ b/official/c44956694.lua @@ -1,4 +1,5 @@ --ROMクラウディア +--ROM Cloudia local s,id=GetID() function s.initial_effect(c) --tohand @@ -58,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c44968459.lua b/official/c44968459.lua index 1b90061106..cbc8d033b2 100644 --- a/official/c44968459.lua +++ b/official/c44968459.lua @@ -1,4 +1,5 @@ --サイレント・バーニング +--Silent Burning local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,20 +19,20 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xe8} +s.listed_series={SET_SILENT_MAGICIAN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe8) + return c:IsFaceup() and c:IsSetCard(SET_SILENT_MAGICIAN) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ct1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local ph=Duel.GetCurrentPhase() - return ct1>ct2 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return ct1>ct2 and Duel.IsBattlePhase() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -53,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xe8) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SILENT_MAGICIAN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -66,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c44968687.lua b/official/c44968687.lua index 1447467b8f..e0fdae3588 100644 --- a/official/c44968687.lua +++ b/official/c44968687.lua @@ -1,6 +1,5 @@ --伝説のフィッシャーマン三世 --The Legendary Fisherman III - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -58,7 +57,6 @@ function s.initial_effect(c) c:RegisterEffect(e7) end s.listed_names={3643300} - function s.spcon(e,c) if c==nil then return true end return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,false,1,true,c,c:GetControler(),nil,false,nil,3643300) @@ -93,12 +91,12 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return te:IsSpellTrapEffect() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>0 end @@ -107,23 +105,23 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_REMOVED) - if Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)~=0 then + if Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(0,1) e2:SetValue(DOUBLE_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL|PHASE_END) Duel.RegisterEffect(e2,tp) end end diff --git a/official/c45002991.lua b/official/c45002991.lua index acff85fef4..910f5e509d 100644 --- a/official/c45002991.lua +++ b/official/c45002991.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.listed_series={0xfe,0x116} +s.listed_series={SET_WORLD_LEGACY,SET_CRUSADIA} function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsType,1,nil,TYPE_LINK,lc,sumtype,tp) end @@ -50,7 +50,7 @@ function s.disfilter(c,e) return c:IsNegatable() and c:IsCanBeEffectTarget(e) end function s.cfilter(c,tg,lg) - return (c:IsSetCard(0xfe) or c:IsSetCard(0x116)) and lg:IsContains(c) + return c:IsSetCard({SET_WORLD_LEGACY,SET_CRUSADIA}) and lg:IsContains(c) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local tg=Duel.GetMatchingGroup(s.disfilter,tp,0,LOCATION_ONFIELD,nil,e) @@ -69,28 +69,28 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then + if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c45005708.lua b/official/c45005708.lua index eeed72e9cb..ce8bb032dd 100644 --- a/official/c45005708.lua +++ b/official/c45005708.lua @@ -29,7 +29,7 @@ end s.listed_names={CARD_ALBAZ} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.tgfilter(c,e,tp,sc) if not (c:IsRace(RACE_DRAGON) and c:IsFaceup()) then return false end diff --git a/official/c45010690.lua b/official/c45010690.lua index aefa07e9a4..4e54a59997 100644 --- a/official/c45010690.lua +++ b/official/c45010690.lua @@ -27,6 +27,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.BreakEffect() - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45014450.lua b/official/c45014450.lua index e441029e26..d96016e422 100644 --- a/official/c45014450.lua +++ b/official/c45014450.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1050),aux.FilterBoolFunctionEx(Card.IsSetCard,0x99)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_STARVING_VENOM),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ODD_EYES)) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -46,8 +46,8 @@ function s.initial_effect(c) e6:SetOperation(s.penop) c:RegisterEffect(e6) end -s.listed_series={0x1050,0x99} -s.material_setcode={0x1050,0x50,0x99} +s.listed_series={SET_STARVING_VENOM,SET_ODD_EYES} +s.material_setcode={SET_STARVING_VENOM,SET_VENOM,SET_ODD_EYES} function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION or (st&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end @@ -70,13 +70,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000*ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.copyfilter(c) return c:IsFaceup() and not c:IsType(TYPE_TOKEN) @@ -97,17 +97,17 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) if not tc:IsType(TYPE_TRAPMONSTER) then - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end local atk=tc:GetAttack() local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end @@ -131,4 +131,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c45023678.lua b/official/c45023678.lua index 43375b9d2a..f41f894dad 100644 --- a/official/c45023678.lua +++ b/official/c45023678.lua @@ -1,4 +1,5 @@ --ライトニングパニッシャー +--Lightning Punisher local s,id=GetID() function s.initial_effect(c) --chain @@ -50,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45025640.lua b/official/c45025640.lua index b5cbb20134..63dafd39f8 100644 --- a/official/c45025640.lua +++ b/official/c45025640.lua @@ -35,5 +35,4 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c45033006.lua b/official/c45033006.lua index 1213ea9659..e958aa1a62 100644 --- a/official/c45033006.lua +++ b/official/c45033006.lua @@ -1,4 +1,5 @@ --A・O・J エネミー・キャッチャー +--Ally of Justice Enemy Catcher local s,id=GetID() function s.initial_effect(c) --control @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFacedown() and tc:IsDefensePos() then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c45037489.lua b/official/c45037489.lua index 52af587bdf..104a7bd7ba 100644 --- a/official/c45037489.lua +++ b/official/c45037489.lua @@ -22,12 +22,12 @@ function s.initial_effect(c) end s.material={19642774} s.listed_names={19642774} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,19642774) or c:IsHasEffect(20932152) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and Duel.GetTurnPlayer()==tp + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and Duel.IsTurnPlayer(tp) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +43,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45041488.lua b/official/c45041488.lua index 69f30aaeef..a5abffe63d 100644 --- a/official/c45041488.lua +++ b/official/c45041488.lua @@ -21,14 +21,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -68,13 +68,9 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -86,4 +82,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45045866.lua b/official/c45045866.lua index 02b28d6e51..f4c1353a8a 100644 --- a/official/c45045866.lua +++ b/official/c45045866.lua @@ -1,4 +1,5 @@ --オーシャンズ・オーパー +--Ocean's Keeper local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c45064756.lua b/official/c45064756.lua index 960512add8..3b0c62c0dc 100644 --- a/official/c45064756.lua +++ b/official/c45064756.lua @@ -36,7 +36,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE) e1:SetTarget(s.rctg) e1:SetValue(race) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --id chk local e2=Effect.CreateEffect(c) @@ -70,4 +70,4 @@ function s.val(race) if chk==0 then return true end return race end -end +end \ No newline at end of file diff --git a/official/c45065541.lua b/official/c45065541.lua index 1d2fbb0850..975111f228 100644 --- a/official/c45065541.lua +++ b/official/c45065541.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c45072394.lua b/official/c45072394.lua index f5e540c785..1c9c1ff928 100644 --- a/official/c45072394.lua +++ b/official/c45072394.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) @@ -41,12 +41,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,loc,1,1,nil):GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) e:SetLabelObject(tc) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c,e,tp) return c==e:GetLabelObject():GetLabelObject() and c:GetFlagEffect(id)>0 @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45078193.lua b/official/c45078193.lua index 8faf1cc820..7aa9e17f7a 100644 --- a/official/c45078193.lua +++ b/official/c45078193.lua @@ -1,4 +1,5 @@ --サイバー・ダーク・カノン +--Cyberdark Cannon local s,id=GetID() function s.initial_effect(c) --search @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -36,14 +37,9 @@ function s.initial_effect(c) e3:SetOperation(s.op) c:RegisterEffect(e3) end -s.listed_series={0x4093} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_CYBERDARK} function s.filter(c) - return c:IsSetCard(0x4093) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() + return c:IsSetCard(SET_CYBERDARK) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -88,4 +84,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45082499.lua b/official/c45082499.lua index b51dff003f..e5ea959c6f 100644 --- a/official/c45082499.lua +++ b/official/c45082499.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.eqcon) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) diff --git a/official/c45103815.lua b/official/c45103815.lua index 35b07fc810..8598401f47 100644 --- a/official/c45103815.lua +++ b/official/c45103815.lua @@ -31,7 +31,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c45112597.lua b/official/c45112597.lua index 4aaf008ea0..825903007b 100644 --- a/official/c45112597.lua +++ b/official/c45112597.lua @@ -91,4 +91,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45115956.lua b/official/c45115956.lua index f97fb670cf..e0052e3334 100644 --- a/official/c45115956.lua +++ b/official/c45115956.lua @@ -1,5 +1,5 @@ --戦華史略-矯詔之叛 ---Ancient Warriors Saga – Defying the Warlord's Demands +--Ancient Warriors Saga - Deception and Betrayal --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -26,14 +26,14 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.atcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.attg) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.spfilter(c,e,sp) - return c:IsSetCard(0x137) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -51,17 +51,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,tc:GetLevel()*100,REASON_EFFECT) end end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(0x137) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(SET_ANCIENT_WARRIORS) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() + local tc=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() if tc:IsControler(1-tp) then e:SetLabel(1) else @@ -77,7 +72,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if e:GetLabel()==1 and tc:IsControlerCanBeChanged() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c45118716.lua b/official/c45118716.lua index ee69228bfe..78e05b73b9 100644 --- a/official/c45118716.lua +++ b/official/c45118716.lua @@ -1,4 +1,5 @@ --マジック・リサイクラー +--Spell Recycler local s,id=GetID() function s.initial_effect(c) --todeck @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -32,6 +33,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if Duel.DiscardDeck(tp,1,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45133463.lua b/official/c45133463.lua index 40917c832c..f62b94a24e 100644 --- a/official/c45133463.lua +++ b/official/c45133463.lua @@ -1,4 +1,5 @@ --死神の呼び声 +--Call of the Reaper local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45141013.lua b/official/c45141013.lua index f6f08e7460..a30b21d191 100644 --- a/official/c45141013.lua +++ b/official/c45141013.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end function s.operation(e,tp,eg,ep,ev,re,r,rp) --Cannot Normal or Special Summon Effect Monsters @@ -22,7 +22,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,1) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) diff --git a/official/c45141844.lua b/official/c45141844.lua index 6f6d920252..7e690d2a0e 100644 --- a/official/c45141844.lua +++ b/official/c45141844.lua @@ -1,4 +1,5 @@ --執念深き老魔術師 +--Old Vindictive Magician local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45148985.lua b/official/c45148985.lua index 0f52da7122..d1368ace89 100644 --- a/official/c45148985.lua +++ b/official/c45148985.lua @@ -49,12 +49,12 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.rmlimit(e,c,tp,r) return c==e:GetHandler() and r==REASON_EFFECT end function s.sprfilter(c) - return c:IsSetCard(0x105) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,true,true)) + return c:IsSetCard(SET_METAPHYS) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,true,true)) end function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==#sg,sg:GetClassCount(Card.GetCode)~=#sg @@ -62,11 +62,11 @@ end function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) return aux.SelectUnselectGroup(g,e,tp,5,5,s.rescon,0) end function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,c) + local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,c) local rg=aux.SelectUnselectGroup(g,e,tp,5,5,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #rg>0 then rg:KeepAlive() @@ -85,7 +85,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x105) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_METAPHYS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -98,7 +98,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) @@ -106,7 +106,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetLabel(Duel.GetTurnCount()+1) e2:SetLabelObject(tc) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) e2:SetCondition(s.rmcon) e2:SetOperation(s.rmop) Duel.RegisterEffect(e2,tp) @@ -124,4 +124,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45154513.lua b/official/c45154513.lua index aef49c4be7..51eeb7892f 100644 --- a/official/c45154513.lua +++ b/official/c45154513.lua @@ -1,7 +1,6 @@ --アルグールマゼラ --Alghoul Mazera --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -9,7 +8,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DESTROY_REPLACE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.reptg) e1:SetValue(s.repval) diff --git a/official/c45159319.lua b/official/c45159319.lua index 4c3ef08cfb..35d415a78b 100644 --- a/official/c45159319.lua +++ b/official/c45159319.lua @@ -1,4 +1,5 @@ --モアイ迎撃砲 +--Moai Interceptor Cannons local s,id=GetID() function s.initial_effect(c) --turn set @@ -14,7 +15,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c45170821.lua b/official/c45170821.lua index d1c83c19ae..3d4abbaef0 100644 --- a/official/c45170821.lua +++ b/official/c45170821.lua @@ -1,9 +1,10 @@ --V・HERO アドレイション +--Vision HERO Adoration local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x8),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO),2) --summon success local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -15,10 +16,10 @@ function s.initial_effect(c) e2:SetOperation(s.valop) c:RegisterEffect(e2) end -s.listed_series={0x8} -s.material_setcode=0x8 +s.listed_series={SET_HERO} +s.material_setcode=SET_HERO function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) + return c:IsFaceup() and c:IsSetCard(SET_HERO) end function s.valtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -40,11 +41,11 @@ function s.valop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(val) o:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) o:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c45171524.lua b/official/c45171524.lua index 56d72dbe71..002da90a76 100644 --- a/official/c45171524.lua +++ b/official/c45171524.lua @@ -1,4 +1,4 @@ ---Japanese name +--巳剣勧請 --Mitsurugi Prayers --scripted by Naim local s,id=GetID() diff --git a/official/c45178472.lua b/official/c45178472.lua index ea53ecd10a..fc49b32136 100644 --- a/official/c45178472.lua +++ b/official/c45178472.lua @@ -1,4 +1,5 @@ --フルハウス +--Full House local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45184165.lua b/official/c45184165.lua index c55b18a381..e68e39eb95 100644 --- a/official/c45184165.lua +++ b/official/c45184165.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCountLimit(1,id) e1:SetCondition(s.thcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -23,14 +23,14 @@ function s.initial_effect(c) e2:SetOperation(s.efop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) end function s.thfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToHand() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -58,19 +58,19 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -79,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c45195443.lua b/official/c45195443.lua index 8b9406b0ec..c2c148dd6e 100644 --- a/official/c45195443.lua +++ b/official/c45195443.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x8} +s.listed_series={SET_HERO} s.listed_names={id} function s.spfilter1(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,7 +47,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsSpell() and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x8) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_HERO) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -62,4 +62,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c45206713.lua b/official/c45206713.lua index 904a040c7a..dcafff5253 100644 --- a/official/c45206713.lua +++ b/official/c45206713.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --spsummon - local params = {aux.FilterBoolFunction(Card.IsSetCard,0x10af),Fusion.InHandMat,nil,nil,Fusion.ForcedHandler} + local params = {aux.FilterBoolFunction(Card.IsSetCard,SET_DDD),Fusion.InHandMat,nil,nil,Fusion.ForcedHandler} local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) @@ -18,14 +18,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xaf,0x10af} +s.listed_series={SET_DD,SET_DDD} function s.spfilter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45215225.lua b/official/c45215225.lua index a6adf092af..7498a4ff3b 100644 --- a/official/c45215225.lua +++ b/official/c45215225.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xa9,0xc3,0xad} +s.listed_series={SET_FLUFFAL,SET_EDGE_IMP,SET_FRIGHTFUR} function s.filter(c,e,tp) - return (c:IsSetCard(0xa9) or c:IsSetCard(0xc3)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_FLUFFAL) or c:IsSetCard(SET_EDGE_IMP)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -66,12 +66,8 @@ end function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_FUSION) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter2(c,e,tp) - return c:IsSetCard(0xad) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FRIGHTFUR) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter2(chkc,e,tp) end @@ -84,10 +80,10 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45215453.lua b/official/c45215453.lua index 7aafb75c55..e6256847f5 100644 --- a/official/c45215453.lua +++ b/official/c45215453.lua @@ -1,4 +1,5 @@ --ヴァイロン・デルタ +--Vylon Delta local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -18,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefensePos() + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsDefensePos() end function s.filter(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() @@ -36,4 +37,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c45222299.lua b/official/c45222299.lua index b3a6f02c68..6f6e0b5ec0 100644 --- a/official/c45222299.lua +++ b/official/c45222299.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end @@ -32,6 +32,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,g) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleHand(1-tp) end \ No newline at end of file diff --git a/official/c45231177.lua b/official/c45231177.lua index 1e2c3d4807..e4c8a24964 100644 --- a/official/c45231177.lua +++ b/official/c45231177.lua @@ -1,7 +1,8 @@ --炎の剣士 +--Flame Swordsman local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,34460851,44287299) -end +end \ No newline at end of file diff --git a/official/c45236142.lua b/official/c45236142.lua index 7d99d44a5a..c7f6282c32 100644 --- a/official/c45236142.lua +++ b/official/c45236142.lua @@ -25,8 +25,8 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) - e3:SetCost(s.searchcost) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.searchtg) e3:SetOperation(s.searchop) c:RegisterEffect(e3) @@ -60,12 +60,7 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) -end -function s.searchcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.sfilter(c) return c:IsCode(CARD_ADVANCED_DARK) and c:IsAbleToHand() diff --git a/official/c45247637.lua b/official/c45247637.lua index 240a5f893f..f1e987af17 100644 --- a/official/c45247637.lua +++ b/official/c45247637.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.ccon) @@ -56,4 +56,4 @@ function s.cop2(e,tp,eg,ep,ev,re,r,rp) end function s.ctval(e,c) return e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c45282603.lua b/official/c45282603.lua index 7786737374..b781d77de3 100644 --- a/official/c45282603.lua +++ b/official/c45282603.lua @@ -1,5 +1,5 @@ --召喚師セームベル ---Sambeell the Summoner +--Saambell the Summoner local s,id=GetID() function s.initial_effect(c) --Special Summon a monster with the same Level as this card diff --git a/official/c45283341.lua b/official/c45283341.lua index 613b80eb28..b984365580 100644 --- a/official/c45283341.lua +++ b/official/c45283341.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and Duel.IsMainPhase() end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) c:RegisterEffect(e2) diff --git a/official/c45286019.lua b/official/c45286019.lua index 8b444770ae..8f43f37bd5 100644 --- a/official/c45286019.lua +++ b/official/c45286019.lua @@ -1,4 +1,5 @@ --ギアギアーノ Mk-III +--Geargiano Mk-III local s,id=GetID() function s.initial_effect(c) --spsummon @@ -15,13 +16,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} s.listed_names={id} function s.counterfilter(c) - return c:IsSetCard(0x72) + return c:IsSetCard(SET_GEARGIA) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x72) + return re:GetHandler():IsSetCard(SET_GEARGIA) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -29,38 +30,38 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x72) + return not c:IsSetCard(SET_GEARGIA) end function s.filter(c,e,tp) - return c:IsSetCard(0x72) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GEARGIA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c45298492.lua b/official/c45298492.lua index eecd41a3bf..9fdaae458b 100644 --- a/official/c45298492.lua +++ b/official/c45298492.lua @@ -1,4 +1,5 @@ --スカー・ウォリアー +--Scarred Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -27,4 +28,4 @@ function s.atlimit(e,c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c45305419.lua b/official/c45305419.lua index d9af803063..8ec4ceae8e 100644 --- a/official/c45305419.lua +++ b/official/c45305419.lua @@ -1,4 +1,5 @@ --継承の印 +--Symbol of Heritage local s,id=GetID() function s.initial_effect(c) --Activate @@ -44,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -55,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45311864.lua b/official/c45311864.lua index 6a3d3b1060..788a77b081 100644 --- a/official/c45311864.lua +++ b/official/c45311864.lua @@ -1,4 +1,5 @@ --盗人ゴブリン +--Goblin Thief local s,id=GetID() function s.initial_effect(c) --recover&damage @@ -19,4 +20,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,500,REASON_EFFECT,true) Duel.Recover(tp,500,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c45313724.lua b/official/c45313724.lua index e8faa8e9e9..b7d213ce31 100644 --- a/official/c45313724.lua +++ b/official/c45313724.lua @@ -31,24 +31,24 @@ function s.dsdlv8filter(c) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO) end function s.dfilter(c,tp) - return (s.dsdlv8filter(c) or (c:IsSetCard(0xb) and c:IsMonster())) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) + return (s.dsdlv8filter(c) or (c:IsSetCard(SET_INFERNITY) and c:IsMonster())) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) end function s.repfilter(c) - return c:IsSetCard(0xb) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_INFERNITY) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.dfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function s.repval(e,c) - return c:IsControler(e:GetHandlerPlayer()) and (s.dsdlv8filter(c) or (c:IsSetCard(0xb) and c:IsMonster())) and c:IsReason(REASON_EFFECT) + return c:IsControler(e:GetHandlerPlayer()) and (s.dsdlv8filter(c) or (c:IsSetCard(SET_INFERNITY) and c:IsMonster())) and c:IsReason(REASON_EFFECT) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end function s.sdcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)>0 -end +end \ No newline at end of file diff --git a/official/c45313993.lua b/official/c45313993.lua index 7677371e29..1aa640e5b4 100644 --- a/official/c45313993.lua +++ b/official/c45313993.lua @@ -1,4 +1,5 @@ --レッド・ウルフ +--Red Warg local s,id=GetID() function s.initial_effect(c) --summon success @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst():IsSetCard(0x57) + return ep==tp and eg:GetFirst():IsSetCard(SET_RESONATOR) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,8 +33,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c45337544.lua b/official/c45337544.lua index 0ffb5ac91a..b71ddcae5d 100644 --- a/official/c45337544.lua +++ b/official/c45337544.lua @@ -1,9 +1,9 @@ --- ヒロイック・エンヴォイ --- Heroic Envoy --- Scripted by Hatter +--ヒロイック・エンヴォイ +--Heroic Envoy +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search 1 "Heroic" monster + --Search 1 "Heroic" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.dthtg) e1:SetOperation(s.dthop) c:RegisterEffect(e1) - -- Add 1 "Heroic" card from the GY to the hand + --Add 1 "Heroic" card from the GY to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -22,14 +22,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp) return Duel.GetLP(tp)<=500 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.gthtg) e2:SetOperation(s.gthop) c:RegisterEffect(e2) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.thfilter(c) - return c:IsSetCard(0x6f) and c:IsAbleToHand() + return c:IsSetCard(SET_HEROIC) and c:IsAbleToHand() end function s.dthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(s.thfilter,Card.IsMonster),tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c45349196.lua b/official/c45349196.lua index 520b1379f1..9797be444f 100644 --- a/official/c45349196.lua +++ b/official/c45349196.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) @@ -29,23 +29,23 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x3b} -s.material_setcode={0x3b,0x45} +s.listed_series={SET_RED_EYES} +s.material_setcode={SET_RED_EYES,SET_ARCHFIEND} function s.mfilter1(c,fc,sumtype,tp) - return c:IsSetCard(0x45,fc,sumtype,tp) and c:IsType(TYPE_NORMAL,fc,sumtype,tp) and c:GetLevel()==6 + return c:IsSetCard(SET_ARCHFIEND,fc,sumtype,tp) and c:IsType(TYPE_NORMAL,fc,sumtype,tp) and c:GetLevel()==6 end function s.mfilter2(c,fc,sumtype,tp) - return c:IsSetCard(0x3b,fc,sumtype,tp) and c:IsType(TYPE_NORMAL,fc,sumtype,tp) + return c:IsSetCard(SET_RED_EYES,fc,sumtype,tp) and c:IsType(TYPE_NORMAL,fc,sumtype,tp) end function s.accon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetBattledGroupCount()>0 + return c:IsFusionSummoned() and c:GetBattledGroupCount()>0 end function s.filter(c) - return c:IsSetCard(0x3b) and c:IsType(TYPE_NORMAL) and c:IsAbleToDeck() + return c:IsSetCard(SET_RED_EYES) and c:IsType(TYPE_NORMAL) and c:IsAbleToDeck() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -60,6 +60,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)~=0 then Duel.BreakEffect() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c45354718.lua b/official/c45354718.lua index de2e4ed5dc..6a6934d6bb 100644 --- a/official/c45354718.lua +++ b/official/c45354718.lua @@ -14,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xf7} +s.listed_series={SET_LYRILUSC} function s.filter(c) - return c:IsSetCard(0xf7) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard(SET_LYRILUSC) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end end function s.spfilter(c,e,tp,tc) - return c:IsSetCard(0xf7) and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LYRILUSC) and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if not tc then return end aux.ToHandOrElse(tc,tp) - if not tc:IsLocation(LOCATION_HAND+LOCATION_GRAVE) then return end + if not tc:IsLocation(LOCATION_HAND|LOCATION_GRAVE) then return end local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp,tc) if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sc=sg:Select(tp,1,1,nil):GetFirst() Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45358284.lua b/official/c45358284.lua index 2e5745a486..aff43003fe 100644 --- a/official/c45358284.lua +++ b/official/c45358284.lua @@ -1,4 +1,5 @@ --ミラー・レディバグ +--Mirror Ladybug local s,id=GetID() function s.initial_effect(c) --special summon @@ -46,10 +47,10 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lvs) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.descon(e) return e:GetHandler():GetLevel()>12 -end +end \ No newline at end of file diff --git a/official/c45379225.lua b/official/c45379225.lua index 55ea8ebc61..7042682a36 100644 --- a/official/c45379225.lua +++ b/official/c45379225.lua @@ -1,4 +1,5 @@ --サイコ・ヘルストランサー +--Psychic Lifetrancer local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -20,9 +21,9 @@ function s.filter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -34,4 +35,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45383307.lua b/official/c45383307.lua index d1bca2eef5..b821e87e1f 100644 --- a/official/c45383307.lua +++ b/official/c45383307.lua @@ -1,4 +1,5 @@ --トラミッド・クルーザー +--Triamid Cruiser local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,7 +40,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xe2} +s.listed_series={SET_TRIAMID} function s.lpfilter(c) return c:IsRace(RACE_ROCK) end @@ -51,7 +52,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,500,REASON_EFFECT) end function s.drfilter(c) - return c:IsSetCard(0xe2) and c:IsMonster() + return c:IsSetCard(SET_TRIAMID) and c:IsMonster() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.drfilter,1,nil) @@ -64,11 +65,11 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)~=0 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end function s.thfilter(c) - return c:IsSetCard(0xe2) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TRIAMID) and c:IsMonster() and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -85,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4538826.lua b/official/c4538826.lua index a68ae4a1e3..92dfd6754b 100644 --- a/official/c4538826.lua +++ b/official/c4538826.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -60,10 +60,6 @@ function s.initial_effect(c) e6:SetOperation(function(e) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end) c:RegisterEffect(e6) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.thfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end diff --git a/official/c45410988.lua b/official/c45410988.lua index 31558e22f9..6a68091d90 100644 --- a/official/c45410988.lua +++ b/official/c45410988.lua @@ -5,14 +5,14 @@ function s.initial_effect(c) --Activate Ritual.AddProcGreater{handler=c,filter=s.ritualfil,lv=8,extrafil=s.extrafil,extratg=s.extratg} end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} s.fit_monster={19025379} --should be removed in hardcode overhaul s.listed_names={19025379} function s.ritualfil(c) return c:IsCode(19025379) and c:IsRitualMonster() end function s.mfilter(c) - return not Duel.IsPlayerAffectedByEffect(c:GetControler(),69832741) and c:HasLevel() and c:IsSetCard(0x3b) + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),CARD_SPIRIT_ELIMINATION) and c:HasLevel() and c:IsSetCard(SET_RED_EYES) and c:IsMonster() and c:IsAbleToRemove() end function s.extrafil(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c45420955.lua b/official/c45420955.lua index b274c11e8c..2c5fd033f4 100644 --- a/official/c45420955.lua +++ b/official/c45420955.lua @@ -1,6 +1,5 @@ --迅雷の暴君 グローザー ---Grozer the Thunderclap Tyrant - +--Groza, Tyrant of Thunder local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCountLimit(1,id) e1:SetCondition(s.negcon) e1:SetTarget(s.negtg) @@ -39,7 +38,7 @@ function s.dfilter(c) return c:IsMonster() and c:IsDiscardable() end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.IsMainPhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.disfilter(chkc) and chkc:IsLocation(LOCATION_MZONE) end @@ -48,7 +47,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end function s.negop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.dfilter,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end + if Duel.DiscardHand(tp,s.dfilter,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end local c=e:GetHandler() local tc=Duel.GetFirstTarget() if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then @@ -57,14 +56,14 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -106,7 +105,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) c:RegisterEffect(e1) elseif opt==2 then --Cannot be destroyed by opponent's card effects @@ -116,7 +115,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) else --Cannot be targeted by opponent's card effects local e1=Effect.CreateEffect(c) @@ -125,10 +124,10 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.efilter(e,re,rp) return e:GetHandlerPlayer()==1-rp -end +end \ No newline at end of file diff --git a/official/c45425051.lua b/official/c45425051.lua index 1372d1df22..581bae2a55 100644 --- a/official/c45425051.lua +++ b/official/c45425051.lua @@ -1,4 +1,5 @@ --妖精王オベロン +--Fairy King Truesdale local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -20,4 +21,4 @@ function s.con(e) end function s.tg(e,c) return c:IsRace(RACE_PLANT) -end +end \ No newline at end of file diff --git a/official/c4542651.lua b/official/c4542651.lua index fb5cb415ab..46139e6e57 100644 --- a/official/c4542651.lua +++ b/official/c4542651.lua @@ -1,4 +1,5 @@ --カオス・シールド +--Yellow Luster Shield local s,id=GetID() function s.initial_effect(c) --activate @@ -14,4 +15,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(300) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c45439263.lua b/official/c45439263.lua index 1b5e04db8b..469ebc61ce 100644 --- a/official/c45439263.lua +++ b/official/c45439263.lua @@ -1,4 +1,5 @@ --ラヴァル・コアトル +--Laval Coatl local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.spcon(e,c) if c==nil then return true end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - return Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 -end + return Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_LAVAL):GetClassCount(Card.GetCode)>=3 +end \ No newline at end of file diff --git a/official/c45445571.lua b/official/c45445571.lua index 31fa999cd2..ff69ea44ff 100644 --- a/official/c45445571.lua +++ b/official/c45445571.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e0:SetDescription(aux.Stringid(id,0)) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e0:SetCode(EVENT_PHASE+PHASE_STANDBY) + e0:SetCode(EVENT_PHASE|PHASE_STANDBY) e0:SetRange(LOCATION_MZONE) e0:SetCountLimit(1) e0:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -43,7 +43,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c45450218.lua b/official/c45450218.lua index 5d8cb523e0..529e7d191b 100644 --- a/official/c45450218.lua +++ b/official/c45450218.lua @@ -1,4 +1,5 @@ --A・O・J リーサル・ウェポン +--Ally of Justice Omni-Weapon local s,id=GetID() function s.initial_effect(c) --check @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4545683.lua b/official/c4545683.lua index e04e61a89c..d2df215b39 100644 --- a/official/c4545683.lua +++ b/official/c4545683.lua @@ -1,5 +1,5 @@ --機皇帝グランエル∞ ---c4545683 +--Meklord Emperor Granel local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -59,7 +59,7 @@ function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:IsType(TYPE_SYNCHRO) end function s.filter(c,tp) - return c:IsMonster() and (c:GetReason()&0x41)==0x41 and c:IsPreviousControler(tp) + return c:IsMonster() and (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -100,7 +100,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -128,4 +128,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c45458027.lua b/official/c45458027.lua index b53b071266..05af6882d5 100644 --- a/official/c45458027.lua +++ b/official/c45458027.lua @@ -1,4 +1,5 @@ --ネジマキシキガミ +--Gearspring Spirit local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -44,8 +45,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c4545854.lua b/official/c4545854.lua index f5cb3defb1..fbd96f1079 100644 --- a/official/c4545854.lua +++ b/official/c4545854.lua @@ -1,4 +1,5 @@ --エクシーズ・テリトリー +--Xyz Territory local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local a=Duel.GetAttacker() @@ -46,4 +47,4 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c45462149.lua b/official/c45462149.lua index 8e11c08eaf..96baa2632f 100644 --- a/official/c45462149.lua +++ b/official/c45462149.lua @@ -1,5 +1,5 @@ --コード・トーカー・インヴァート ---Code Talker Invert +--Code Talker Inverted --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -19,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.filter(c,e,tp,zone) return c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) diff --git a/official/c45462639.lua b/official/c45462639.lua index b53fc6fcb7..8f983408e9 100644 --- a/official/c45462639.lua +++ b/official/c45462639.lua @@ -57,7 +57,7 @@ function s.addc(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -76,5 +76,5 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c45467446.lua b/official/c45467446.lua index 4f83f40c99..2153b9dcf6 100644 --- a/official/c45467446.lua +++ b/official/c45467446.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetValue(TYPE_NORMAL) c:RegisterEffect(e1) local e2=e1:Clone() @@ -34,7 +34,7 @@ function s.initial_effect(c) e5:SetCode(EVENT_FREE_CHAIN) e5:SetRange(LOCATION_MZONE) e5:SetCondition(s.spcon) - e5:SetCost(s.spcost) + e5:SetCost(Cost.SelfTribute) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) c:RegisterEffect(e5) @@ -59,10 +59,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -79,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45484331.lua b/official/c45484331.lua index fd0300bb67..787ea6d154 100644 --- a/official/c45484331.lua +++ b/official/c45484331.lua @@ -3,7 +3,7 @@ --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add to hand + --Add to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK) @@ -30,12 +30,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_ALBAZ} -s.listed_series={0x160} +s.listed_series={SET_BRANDED} function s.spconfilter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_ALBAZ) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -50,17 +50,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x160) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_BRANDED) and c:IsSpellTrap() and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil):GetFirst() if not (tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND)) then return end Duel.ConfirmCards(1-tp,tc) Duel.ShuffleHand(tp) @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4549095.lua b/official/c4549095.lua index 2a056d99a8..f5b0ea539b 100644 --- a/official/c4549095.lua +++ b/official/c4549095.lua @@ -1,4 +1,5 @@ --BK カウンターブロー +--Battlin' Boxer Counterpunch local s,id=GetID() function s.initial_effect(c) --atkup @@ -8,31 +9,31 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.condition(e,tp,eg,ep,ev,re,r,rp) local phase=Duel.GetCurrentPhase() if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and a:IsSetCard(0x84) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsSetCard(0x84) and d:IsRelateToBattle()) + return (a:IsControler(tp) and a:IsSetCard(SET_BATTLIN_BOXER) and a:IsRelateToBattle()) + or (d and d:IsControler(tp) and d:IsSetCard(SET_BATTLIN_BOXER) and d:IsRelateToBattle()) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end + if Duel.IsTurnPlayer(1-tp) then a=Duel.GetAttackTarget() end if not a:IsRelateToBattle() then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) a:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c45496268.lua b/official/c45496268.lua index 91d08bc307..b7a5935927 100644 --- a/official/c45496268.lua +++ b/official/c45496268.lua @@ -1,4 +1,5 @@ --SDロボ・エレファン +--Super Defense Robot Elephan local s,id=GetID() function s.initial_effect(c) --spsummon @@ -28,10 +29,10 @@ function s.initial_effect(c) e3:SetValue(s.xyzlimit) c:RegisterEffect(e3) end -s.listed_series={0x85} +s.listed_series={SET_SUPER_DEFENSE_ROBOT} s.listed_names={71071546} function s.filter(c,e,tp) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,7 +49,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:GetLevel()~=8 + return c:IsFaceup() and (c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) or c:IsCode(71071546)) and c:GetLevel()~=8 end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end @@ -64,11 +65,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.xyzlimit(e,c) if not c then return false end return not c:IsRace(RACE_MACHINE) -end +end \ No newline at end of file diff --git a/official/c45500495.lua b/official/c45500495.lua index cb30b49761..c9928605cb 100644 --- a/official/c45500495.lua +++ b/official/c45500495.lua @@ -1,4 +1,5 @@ --ヘル・ブランブル +--Queen of Thorns local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,4 +27,4 @@ function s.ccost(e,c,tp) end function s.acop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,1000) -end +end \ No newline at end of file diff --git a/official/c45531624.lua b/official/c45531624.lua index 57dd7f9d84..fdaae7c7ad 100644 --- a/official/c45531624.lua +++ b/official/c45531624.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0xe4} +s.listed_series={SET_CELTIC_GUARD} function s.atcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)>=1 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CELTIC_GUARD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -54,7 +54,7 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.GetAttacker()==e:GetHandler() end function s.drfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe4) + return c:IsFaceup() and c:IsSetCard(SET_CELTIC_GUARD) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.drfilter,tp,LOCATION_MZONE,0,nil) diff --git a/official/c45533023.lua b/official/c45533023.lua index 82fad3f894..fa45d1e70f 100644 --- a/official/c45533023.lua +++ b/official/c45533023.lua @@ -1,4 +1,5 @@ --RR-ブレイズ・ファルコン +--Raidraptor - Blaze Falcon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -26,7 +27,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) c:RegisterEffect(e3) @@ -50,12 +51,8 @@ function s.desop1(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end @@ -69,4 +66,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45547649.lua b/official/c45547649.lua index 7af8fb3e1d..813ce4ec64 100644 --- a/official/c45547649.lua +++ b/official/c45547649.lua @@ -1,4 +1,5 @@ --バード・フェイス +--Birdface local s,id=GetID() function s.initial_effect(c) --search @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c45584727.lua b/official/c45584727.lua index 317bec7ebd..9d5680f22a 100644 --- a/official/c45584727.lua +++ b/official/c45584727.lua @@ -1,7 +1,6 @@ --ワルキューレの抱擁 --Valkyrie's Embrace --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Change 1 of your "Valkyrie" monsters to defense position, banish 1 of opponent's monsters @@ -18,10 +17,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x122} - +s.listed_series={SET_VALKYRIE} function s.counterfilter(c) - return c:IsSetCard(0x122) + return c:IsSetCard(SET_VALKYRIE) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -29,25 +27,25 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x122) + return not c:IsSetCard(SET_VALKYRIE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(aux.NOT(Card.IsSetCard),tp,LOCATION_MZONE,0,1,nil,0x122) + return not Duel.IsExistingMatchingCard(aux.NOT(Card.IsSetCard),tp,LOCATION_MZONE,0,1,nil,SET_VALKYRIE) end function s.filter(c) - return c:IsSetCard(0x122) and c:IsFaceup() and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() + return c:IsSetCard(SET_VALKYRIE) and c:IsFaceup() and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -67,4 +65,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and tg2:GetFirst() and tg2:GetFirst():IsRelateToEffect(e) then Duel.Remove(tg2,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45586855.lua b/official/c45586855.lua index 57a31092bb..52711f10f3 100644 --- a/official/c45586855.lua +++ b/official/c45586855.lua @@ -1,4 +1,5 @@ --A・O・J サイクロン・クリエイター +--Ally of Justice Cyclone Creator local s,id=GetID() function s.initial_effect(c) --to hand @@ -15,7 +16,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_TUNER) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local sg=rg:Select(tp,ct,ct,nil) Duel.HintSelection(sg) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45591967.lua b/official/c45591967.lua index fcce3fd532..cab2d8ac86 100644 --- a/official/c45591967.lua +++ b/official/c45591967.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.counterfilter(c) - return not c:IsSummonType(SUMMON_TYPE_PENDULUM) + return not c:IsPendulumSummoned() end function s.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -38,7 +38,7 @@ function s.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -82,4 +82,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,300,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45593005.lua b/official/c45593005.lua index 59218460ac..69539708a9 100644 --- a/official/c45593005.lua +++ b/official/c45593005.lua @@ -1,4 +1,5 @@ --D・マグネンI +--Morphtronic Magnen Bar local s,id=GetID() function s.initial_effect(c) --atk @@ -41,7 +42,7 @@ function s.tga(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(c:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -61,9 +62,9 @@ function s.opa(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.cond(e) return e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c45593826.lua b/official/c45593826.lua index 7d98c702ac..a0cebd8655 100644 --- a/official/c45593826.lua +++ b/official/c45593826.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 ドラゴネル +--Draghig, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -31,15 +32,15 @@ function s.initial_effect(c) e3:SetOperation(s.dtop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -55,15 +56,15 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.dttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xb1) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,SET_BURNING_ABYSS) end end function s.dtop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0xb1) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,SET_BURNING_ABYSS) local tc=g:GetFirst() if tc then Duel.ShuffleDeck(tp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c45620686.lua b/official/c45620686.lua index 471fd502f8..26d986862b 100644 --- a/official/c45620686.lua +++ b/official/c45620686.lua @@ -1,4 +1,5 @@ --騒々虫 +--Noisy Gnat local s,id=GetID() function s.initial_effect(c) --lvup @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.lvcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.lvtg) e1:SetOperation(s.lvop) c:RegisterEffect(e1) end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.lvfilter(c) return c:IsFaceup() and not c:IsType(TYPE_XYZ) end @@ -32,7 +29,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c45627618.lua b/official/c45627618.lua index 0f695a3568..63569fe161 100644 --- a/official/c45627618.lua +++ b/official/c45627618.lua @@ -62,7 +62,7 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()==1 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -81,7 +81,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -107,4 +107,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c45644898.lua b/official/c45644898.lua index d60794f680..1e3d580b01 100644 --- a/official/c45644898.lua +++ b/official/c45644898.lua @@ -1,17 +1,18 @@ --青き眼の祭司 +--Master with Eyes of Blue local s,id=GetID() function s.initial_effect(c) - --tohand + --Add 1 Level 1 LIGHT Tuner from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) - --To grave + --Send 1 Effect Monster you control to the GY, and if you do, Special Summon 1 "Blue-Eyes" monster from your GY, other than the sent monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) @@ -19,55 +20,49 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} function s.thfilter(c) - return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and c:IsAbleToHand() + return c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) -end -function s.gvfilter(c) - return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave() +function s.tgfilter(c,tp) + return c:IsType(TYPE_EFFECT) and c:IsFaceup() and c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLUE_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.gvfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.gvfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectTarget(tp,s.gvfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) + local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) - and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) + if tc:IsRelateToEffect(e) and tc:IsMonster() and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,tc,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,tc,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c45651298.lua b/official/c45651298.lua index 050d6b9627..5a07771dd0 100644 --- a/official/c45651298.lua +++ b/official/c45651298.lua @@ -21,4 +21,4 @@ function s.spcon(e,c) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE,nil)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c45653036.lua b/official/c45653036.lua index 32fe1d569f..e783dfa8bd 100644 --- a/official/c45653036.lua +++ b/official/c45653036.lua @@ -1,4 +1,5 @@ --暴風雨 +--Rain Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x18} +s.listed_series={SET_CLOUDIAN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) and c:IsAttackAbove(1000) + return c:IsFaceup() and c:IsSetCard(SET_CLOUDIAN) and c:IsAttackAbove(1000) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc) end @@ -22,7 +23,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil) end function s.filter1(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -42,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=g1:Select(tp,1,1,nil) @@ -52,11 +53,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local dg=g2:Select(tp,2,2,nil) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c45655875.lua b/official/c45655875.lua index 7db1ac2fc3..896afb939d 100644 --- a/official/c45655875.lua +++ b/official/c45655875.lua @@ -1,12 +1,12 @@ --魔鍵召獣-アンシャラボラス ---Magikey Summon Beast - Ansyalabolas +--Magikey Beast - Ansyalabolas --script by V.J.Wilson local s,id=GetID() function s.initial_effect(c) --Fusion summoned properly if to be revived by effect c:EnableReviveLimit() --Fusion Proc - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x167),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MAGIKEY),s.matfilter) --Return fusion spell local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -38,12 +38,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={99426088} -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.matfilter(c,fc,sumtype,tp) return c:IsType(TYPE_NORMAL,fc,sumtype,tp) and not c:IsType(TYPE_TOKEN,fc,sumtype,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.thfilter(c) return c:IsCode(99426088) and c:IsAbleToHand() @@ -62,7 +62,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end --check for attack pos monster function s.atkfilter(c) - return c:IsMonster() and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x167)) + return c:IsMonster() and (c:IsType(TYPE_NORMAL) or c:IsSetCard(SET_MAGIKEY)) end function s.posfilter(c,tp) if c:IsFaceup() and c:IsAttackPos() and c:IsCanChangePosition() then @@ -89,8 +89,8 @@ function s.posop(e,tp,ev,eg,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c45659520.lua b/official/c45659520.lua index f55a1444d7..a4bf97d41e 100644 --- a/official/c45659520.lua +++ b/official/c45659520.lua @@ -9,26 +9,26 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x6008} +s.listed_series={SET_EVIL_HERO} function s.spfilter(c,e,tp) - return c:IsSetCard(0x6008) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EVIL_HERO) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45662855.lua b/official/c45662855.lua index 3fb94a63ad..528f20923e 100644 --- a/official/c45662855.lua +++ b/official/c45662855.lua @@ -17,12 +17,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x47,0x1047} +s.listed_series={SET_GEM,SET_GEM_KNIGHT} function s.tgfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToHand() end function s.costfilter(c,tp) - return c:IsSetCard(0x47) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GEM) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE,0,1,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -44,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c45666710.lua b/official/c45666710.lua index 87329195e3..35a49e01e8 100644 --- a/official/c45666710.lua +++ b/official/c45666710.lua @@ -1,7 +1,6 @@ --星義の執行者 --Nemeses Adrastea --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon 1 of your "Nemeses" monsters, that is banished or in GY @@ -16,17 +15,17 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x13d} +s.listed_series={SET_NEMESES} function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x13d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsFaceup() and c:IsSetCard(SET_NEMESES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_GRAVE+LOCATION_REMOVED) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,LOCATION_GRAVE|LOCATION_REMOVED) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -39,7 +38,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c45667991.lua b/official/c45667991.lua index 47e1528333..dca9c74809 100644 --- a/official/c45667991.lua +++ b/official/c45667991.lua @@ -49,7 +49,7 @@ function s.rcop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_DRAGON) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end @@ -63,7 +63,7 @@ function s.rcop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_DRAGON) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -82,14 +82,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end @@ -100,4 +100,4 @@ function s.atkcon(e) end function s.atkval(e,c) return e:GetHandler():GetBaseAttack()*2 -end +end \ No newline at end of file diff --git a/official/c45674286.lua b/official/c45674286.lua index 8e4e3e7d8e..9e00fa3702 100644 --- a/official/c45674286.lua +++ b/official/c45674286.lua @@ -1,7 +1,6 @@ --マシンナーズ・アンクラスペア ---Machina Unclasspare +--Machina Unclaspare --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -33,10 +32,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Machina" archetype -s.listed_series={0x36} +s.listed_series={SET_MACHINA} --Specifically lists itself s.listed_names={id} - --If added to hand besides drawing function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsReason(REASON_DRAW) @@ -59,12 +57,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -73,7 +71,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp) end --Check for "Machina" monster, except "Machina Unclasspare" function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x36) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_MACHINA) and not c:IsCode(id) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c45688586.lua b/official/c45688586.lua index 5ffe7f9a3f..8c4a720c1b 100644 --- a/official/c45688586.lua +++ b/official/c45688586.lua @@ -1,4 +1,5 @@ --カラクリ蜘蛛 +--Karakuri Spider local s,id=GetID() function s.initial_effect(c) --destroy @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45702014.lua b/official/c45702014.lua index bbc3b7232d..2acb09e97b 100644 --- a/official/c45702014.lua +++ b/official/c45702014.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.attop) c:RegisterEffect(e2) end -s.listed_series={0x400d} +s.listed_series={SET_ELEMENTSABER} function s.costfilter(c) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) local fg=Group.CreateGroup() @@ -36,7 +36,7 @@ function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) fg:AddCard(pe:GetHandler()) end local loc=LOCATION_HAND - if #fg>0 then loc=LOCATION_HAND+LOCATION_DECK end + if #fg>0 then loc=LOCATION_HAND|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil):GetFirst() @@ -48,7 +48,7 @@ function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) fc=fg:Select(tp,1,1,nil) end Duel.Hint(HINT_CARD,0,fc:GetCode()) - fc:RegisterFlagEffect(61557074,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + fc:RegisterFlagEffect(61557074,RESETS_STANDARD_PHASE_END,0,0) end Duel.SendtoGrave(tc,REASON_COST) end @@ -84,6 +84,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c45702357.lua b/official/c45702357.lua index d5ccf8bbb5..eb8240c885 100644 --- a/official/c45702357.lua +++ b/official/c45702357.lua @@ -1,7 +1,6 @@ --リバーシブル・ビートル --Reversible Beetle --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Shuffle face-up monsters in its column to deck @@ -58,4 +57,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c45705025.lua b/official/c45705025.lua index f45277c2d6..a292f45ed4 100644 --- a/official/c45705025.lua +++ b/official/c45705025.lua @@ -1,4 +1,5 @@ --紋章獣ユニコーン +--Heraldic Beast Unicorn local s,id=GetID() function s.initial_effect(c) --revive @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -32,13 +33,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c45711266.lua b/official/c45711266.lua index 8170bf38bb..1c593f31e3 100644 --- a/official/c45711266.lua +++ b/official/c45711266.lua @@ -1,4 +1,5 @@ --ジュラック・プティラ +--Jurrac Ptera local s,id=GetID() function s.initial_effect(c) --tohand @@ -31,8 +32,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c45725480.lua b/official/c45725480.lua index c5a2f14833..97cd77f764 100644 --- a/official/c45725480.lua +++ b/official/c45725480.lua @@ -1,4 +1,5 @@ --七星の宝刀 +--Sacred Sword of Seven Stars local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,9 +18,9 @@ function s.filter(c) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:GetLevel()==7 and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -31,4 +32,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45730592.lua b/official/c45730592.lua index 46041fce4d..b7a2da35ab 100644 --- a/official/c45730592.lua +++ b/official/c45730592.lua @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x140) and c:IsType(TYPE_SYNCHRO) + return c:IsFaceup() and c:IsSetCard(SET_ADAMANCIPATOR) and c:IsType(TYPE_SYNCHRO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45742626.lua b/official/c45742626.lua index 60332d103e..41dc5214be 100644 --- a/official/c45742626.lua +++ b/official/c45742626.lua @@ -1,4 +1,5 @@ --巡死神リーパー +--Pilgrim Reaper local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -30,10 +31,6 @@ end function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsAttribute,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,ATTRIBUTE_DARK)*200 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) and Duel.IsPlayerCanDiscardDeck(1-tp,5) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,5) @@ -44,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) g1:Merge(g2) Duel.DisableShuffleCheck() Duel.SendtoGrave(g1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4575541.lua b/official/c4575541.lua index 460108c262..4ef29d7233 100644 --- a/official/c4575541.lua +++ b/official/c4575541.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) diff --git a/official/c45778242.lua b/official/c45778242.lua index bf26774e43..f767f8fbe3 100644 --- a/official/c45778242.lua +++ b/official/c45778242.lua @@ -1,4 +1,5 @@ --クラインアント +--Cliant local s,id=GetID() function s.initial_effect(c) --atk/def @@ -24,7 +25,7 @@ function s.initial_effect(c) end function s.atkcon(e) local tp=e:GetHandlerPlayer() - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsNormalSummoned() end function s.repfilter(c,e) return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_CYBERSE) @@ -33,10 +34,10 @@ end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() - and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,c,e) end + and Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,c,e) end if Duel.SelectEffectYesNo(tp,c,96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,c,e) + local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,c,e) e:SetLabelObject(g:GetFirst()) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) return true @@ -45,5 +46,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c45778932.lua b/official/c45778932.lua index b69cd3a9d4..49bd415f3d 100644 --- a/official/c45778932.lua +++ b/official/c45778932.lua @@ -1,4 +1,5 @@ --デザートストーム +--Rising Air Current local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c45792753.lua b/official/c45792753.lua index 703278e5f8..cf1d1cd8aa 100644 --- a/official/c45792753.lua +++ b/official/c45792753.lua @@ -1,29 +1,29 @@ --- --- Ghoti Chain --- Scripted by Hatter +--ゴーティス・チェイン +--Ghoti Chain +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon 1 "Ghoti" monster + --Special Summon 1 "Ghoti" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x18b} -local LOCATION_REMOVED_HAND_DECK_GRAVE=LOCATION_REMOVED+LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE +s.listed_series={SET_GHOTI} +local LOCATION_REMOVED_HAND_DECK_GRAVE=LOCATION_REMOVED|LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE function s.spcostfilter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_FISH) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED_HAND_DECK_GRAVE,0,1,nil,e,tp,c:GetOriginalCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x18b) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) + return c:IsSetCard(SET_GHOTI) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -47,14 +47,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_REMOVED_HAND_DECK_GRAVE,0,1,1,nil,e,tp,e:GetLabel()):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) tc:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c45796834.lua b/official/c45796834.lua index 20c3e46fb3..4d47d11c07 100644 --- a/official/c45796834.lua +++ b/official/c45796834.lua @@ -1,7 +1,6 @@ --光天のマハー・ヴァイロ ---Lightsky Maha Vailo +--Maha Vailo, Light of the Heavens --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -63,7 +62,7 @@ function s.moncond(e) return Duel.IsBattlePhase() and c:GetEquipCount()>=2 end function s.monlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end --If targeted by opponent's card/effect and this card is equipped with 3+ equips function s.ngcon(e,tp,eg,ep,ev,re,r,rp) @@ -98,10 +97,10 @@ end function s.actcon(e) local c=e:GetHandler() local ph=Duel.GetCurrentPhase() - return c:GetEquipCount()>=4 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return c:GetEquipCount()>=4 and Duel.IsBattlePhase() end --If 5+ equips, this card inflicts double battle damage function s.damcon(e) local c=e:GetHandler() return c:GetEquipCount()>=5 -end +end \ No newline at end of file diff --git a/official/c45801022.lua b/official/c45801022.lua index 3572a4f678..0b2bb1b98e 100644 --- a/official/c45801022.lua +++ b/official/c45801022.lua @@ -1,4 +1,5 @@ --エレキツネザル +--Wattlemur local s,id=GetID() function s.initial_effect(c) --bp limit @@ -21,13 +22,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.con) e1:SetLabel(Duel.GetTurnCount()) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + if Duel.IsTurnPlayer(tp) then + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) end Duel.RegisterEffect(e1,tp) end function s.con(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c45803070.lua b/official/c45803070.lua index a1d9e05eff..4eef20bd71 100644 --- a/official/c45803070.lua +++ b/official/c45803070.lua @@ -1,4 +1,5 @@ --ティオの蟲惑魔 +--Traptrix Dionaea local s,id=GetID() function s.initial_effect(c) --immune @@ -30,13 +31,13 @@ function s.initial_effect(c) e3:SetOperation(s.setop) c:RegisterEffect(e3) end -s.listed_series={0x4c,0x89,0x108a} +s.listed_series={SET_TRAP_HOLE,SET_HOLE,SET_TRAPTRIX} function s.efilter(e,te) local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end function s.filter(c,e,tp) - return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_TRAPTRIX) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.setfilter(c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsSSetable() + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end @@ -72,27 +73,27 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end e1:SetLabelObject(tc) e1:SetValue(fid) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp + return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsTurnPlayer(tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if tc:GetFlagEffectLabel(id)==e:GetValue() then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45809008.lua b/official/c45809008.lua index 1b3c461376..98f8f2d41b 100644 --- a/official/c45809008.lua +++ b/official/c45809008.lua @@ -1,4 +1,5 @@ --デステニー・ドロー +--Destiny Draw local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.filter(c) - return c:IsSetCard(0xc008) and c:IsDiscardable() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45812361.lua b/official/c45812361.lua index b0d9fffd6c..1bad60cd41 100644 --- a/official/c45812361.lua +++ b/official/c45812361.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN1 + return e:GetHandler():GetFlagEffect(id)~=0 and Duel.IsPhase(PHASE_MAIN1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsReleasable() end @@ -40,7 +40,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) @@ -53,12 +53,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.Draw(tp,2,REASON_EFFECT) if ct==0 then return end Duel.BreakEffect() - Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE|PHASE_END,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetCode(EFFECT_CANNOT_BP) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c45815891.lua b/official/c45815891.lua index d0ad545d37..f49999db8c 100644 --- a/official/c45815891.lua +++ b/official/c45815891.lua @@ -1,7 +1,8 @@ --スクラップ・デスデーモン +--Scrap Archfiend local s,id=GetID() function s.initial_effect(c) --synchro summon Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c45819647.lua b/official/c45819647.lua index e08ed2e00c..6088d66d12 100644 --- a/official/c45819647.lua +++ b/official/c45819647.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetCountLimit(1) e3:SetCondition(s.spcon) e3:SetCost(s.spcost) @@ -42,36 +42,36 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x12a} +s.listed_series={SET_ENDYMION} function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER,lc,sumtype,tp) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.ctfilter(c) return c:IsSpell() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup() or c:GetEquipTarget() or c:IsLocation(LOCATION_FZONE)) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) if ct>0 then Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,COUNTER_SPELL) end end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) if c:IsRelateToEffect(e) and ct>0 then c:AddCounter(COUNTER_SPELL,ct) end end function s.cacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x12a),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ENDYMION),0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_SPELL,3,REASON_COST) end @@ -83,16 +83,16 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local zone=e:GetHandler():GetLinkedZone(tp) - return zone~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,zone) + return zone~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,zone) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local zone=e:GetHandler():GetLinkedZone(tp) if zone==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,zone) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,zone) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE,zone) end -end +end \ No newline at end of file diff --git a/official/c45836982.lua b/official/c45836982.lua index cd10a8ed7f..04359446f0 100644 --- a/official/c45836982.lua +++ b/official/c45836982.lua @@ -73,4 +73,4 @@ function s.lpcon(e,tp,eg,ep,ev,re,r,rp) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,3000) -end +end \ No newline at end of file diff --git a/official/c45852939.lua b/official/c45852939.lua index 6ad8a4bba1..8aa94138ba 100644 --- a/official/c45852939.lua +++ b/official/c45852939.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function() return Duel.IsAbleToEnterBP() end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c45869829.lua b/official/c45869829.lua index 51bcb83806..b56c0db1b8 100644 --- a/official/c45869829.lua +++ b/official/c45869829.lua @@ -1,4 +1,5 @@ --速攻魔力増幅器 +--Quick Booster local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,7 +36,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -56,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c45871897.lua b/official/c45871897.lua index 63af1e1a5a..aee5271f27 100644 --- a/official/c45871897.lua +++ b/official/c45871897.lua @@ -13,4 +13,4 @@ function s.initial_effect(c) end function s.defval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_ROCK),c:GetControler(),LOCATION_REMOVED,0,nil)*700 -end +end \ No newline at end of file diff --git a/official/c458748.lua b/official/c458748.lua index ec72fbebd8..e40396d765 100644 --- a/official/c458748.lua +++ b/official/c458748.lua @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c4587638.lua b/official/c4587638.lua index 54db9723d4..26a69a545f 100644 --- a/official/c4587638.lua +++ b/official/c4587638.lua @@ -1,4 +1,5 @@ --吠え猛る大地 +--Roaring Earth local s,id=GetID() function s.initial_effect(c) --activate @@ -45,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) diff --git a/official/c45877457.lua b/official/c45877457.lua index a117f67473..51c75ac3be 100644 --- a/official/c45877457.lua +++ b/official/c45877457.lua @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c45885288.lua b/official/c45885288.lua index 77c309a69e..d5c61453e3 100644 --- a/official/c45885288.lua +++ b/official/c45885288.lua @@ -36,7 +36,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,LOCATION_HAND,0,1,1,c) g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -65,7 +65,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c45895206.lua b/official/c45895206.lua index de82d3383f..b7ce83c7c6 100644 --- a/official/c45895206.lua +++ b/official/c45895206.lua @@ -1,4 +1,5 @@ --闇をかき消す光 +--Dark-Piercing Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c45898858.lua b/official/c45898858.lua index 4ebaac46bd..a225c3bd13 100644 --- a/official/c45898858.lua +++ b/official/c45898858.lua @@ -1,5 +1,5 @@ --ボンディング-H2O ---Bonding H20 +--Bonding - H2O local s,id=GetID() function s.initial_effect(c) --Special Summon "Water Dragon" from the hand, Deck or GY diff --git a/official/c45906428.lua b/official/c45906428.lua index 169c6cf550..042b7732bc 100644 --- a/official/c45906428.lua +++ b/official/c45906428.lua @@ -2,17 +2,17 @@ --Miracle Fusion local s,id=GetID() function s.initial_effect(c) - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),Fusion.OnFieldMat(Card.IsAbleToRemove),s.fextra,Fusion.BanishMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),Fusion.OnFieldMat(Card.IsAbleToRemove),s.fextra,Fusion.BanishMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) end \ No newline at end of file diff --git a/official/c4591250.lua b/official/c4591250.lua index 7b25215eea..b217023222 100644 --- a/official/c4591250.lua +++ b/official/c4591250.lua @@ -1,8 +1,9 @@ --アマゾネス女帝 +--Amazoness Empress local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,15951532,aux.FilterBoolFunctionEx(Card.IsSetCard,0x4)) + Fusion.AddProcMix(c,true,true,15951532,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_AMAZONESS)) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -21,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_PIERCE) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_AMAZONESS)) c:RegisterEffect(e3) --special summon local e4=Effect.CreateEffect(c) @@ -35,15 +36,15 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} s.listed_names={15951532} -s.material_setcode=0x4 +s.material_setcode=SET_AMAZONESS function s.indtg(e,c) - return c:IsSetCard(0x4) and c~=e:GetHandler() + return c:IsSetCard(SET_AMAZONESS) and c~=e:GetHandler() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsFusionSummoned() and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP) end @@ -52,14 +53,14 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c45935145.lua b/official/c45935145.lua index d9385289ab..d6ebc1a846 100644 --- a/official/c45935145.lua +++ b/official/c45935145.lua @@ -1,5 +1,5 @@ --死祖の隷竜ウォロー ---Volo, the Doom-Originator Vassal Dragon +--Wollow, Founder of the Drudge Dragons --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) diff --git a/official/c45939611.lua b/official/c45939611.lua index 79ba90599e..5494ccad04 100644 --- a/official/c45939611.lua +++ b/official/c45939611.lua @@ -1,4 +1,5 @@ --リトル・フェアリー +--Little Fairy local s,id=GetID() function s.initial_effect(c) --lvup @@ -23,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c45939841.lua b/official/c45939841.lua index 157d5069f4..f93d44af70 100644 --- a/official/c45939841.lua +++ b/official/c45939841.lua @@ -1,4 +1,5 @@ --ツイスター +--Twister local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.filter(c) return c:IsFaceup() and c:IsSpellTrap() end @@ -32,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45943123.lua b/official/c45943123.lua index 94a6999cd4..c9927a1b0a 100644 --- a/official/c45943123.lua +++ b/official/c45943123.lua @@ -1,5 +1,5 @@ --エアー・トルピード ---Torpedo Take Down +--Torpedo Takedown --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) diff --git a/official/c45943516.lua b/official/c45943516.lua index cdb1343dfe..7555f933af 100644 --- a/official/c45943516.lua +++ b/official/c45943516.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) e2:SetCondition(s.spcon) @@ -31,9 +31,9 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x161) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_WAR_ROCK) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -52,7 +52,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x161) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WAR_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c45948430.lua b/official/c45948430.lua index 1faf2515d1..131ecab737 100644 --- a/official/c45948430.lua +++ b/official/c45948430.lua @@ -3,22 +3,22 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,0x10cf),lv=8,extrafil=s.extragroup, + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,SET_BLACK_LUSTER_SOLDIER),lv=8,extrafil=s.extragroup, extraop=s.extraop,matfilter=s.matfilter,location=LOCATION_HAND|LOCATION_GRAVE,forcedselection=s.ritcheck,specificmatfilter=s.specificfilter,extratg=s.extratg}) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x10cf} +s.listed_series={SET_BLACK_LUSTER_SOLDIER} function s.extragroup(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetMatchingGroup(s.matfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + return Duel.GetMatchingGroup(s.matfilter1,tp,LOCATION_HAND|LOCATION_DECK,0,nil) end function s.extraop(mat,e,tp,eg,ep,ev,re,r,rp,tc) Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.specificfilter(c,rc,mg,tp) return mg:IsExists(s.matfilter2,1,nil,c,tp,rc) @@ -33,7 +33,7 @@ function s.matfilter(c,e,tp) return s.matfilter1(c) end function s.matfilter1(c) - return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsLocation(LOCATION_HAND+LOCATION_DECK) and c:IsAbleToGrave() + return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsLocation(LOCATION_HAND|LOCATION_DECK) and c:IsAbleToGrave() end function s.ritcheck(e,tp,g,sc) return #g==2 and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_LIGHT) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK) and g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK),#g>2 diff --git a/official/c45950291.lua b/official/c45950291.lua index 11acb64597..2ea7d9b3ba 100644 --- a/official/c45950291.lua +++ b/official/c45950291.lua @@ -74,7 +74,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -94,7 +94,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -107,4 +107,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c45955628.lua b/official/c45955628.lua index 415eaa725d..ff478b63d7 100644 --- a/official/c45955628.lua +++ b/official/c45955628.lua @@ -1,7 +1,6 @@ --呪眼の眷属 カトブレパス --Catoblepas, Familiar of the Evil Eye --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Targeted "Evil Eye" spell/trap cannot be destroyed by opponent's card effects @@ -26,17 +25,16 @@ function s.initial_effect(c) e2:SetOperation(s.ssop) c:RegisterEffect(e2) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={id} - function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0x129) + return c:IsFaceup() and c:IsSetCard(SET_EVIL_EYE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and aux.FaceupFilter(Card.IsSetCard,0x129)(chkc) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x129),tp,LOCATION_SZONE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and aux.FaceupFilter(Card.IsSetCard,SET_EVIL_EYE)(chkc) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_EVIL_EYE),tp,LOCATION_SZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x129),tp,LOCATION_SZONE,0,1,1,nil) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_EVIL_EYE),tp,LOCATION_SZONE,0,1,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -49,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCountLimit(1) e1:SetValue(s.value) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end @@ -57,7 +55,7 @@ function s.value(e,re,r,rp) return (r&REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer() end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x129) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_EVIL_EYE) and not c:IsCode(id) end function s.sscond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -76,7 +74,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c45960523.lua b/official/c45960523.lua index 38fdd21bb1..1124e4fa35 100644 --- a/official/c45960523.lua +++ b/official/c45960523.lua @@ -1,4 +1,5 @@ --メタファイズ・ダイダロス +--Metaphys Daedalus local s,id=GetID() function s.initial_effect(c) --remove @@ -17,22 +18,22 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetRange(LOCATION_REMOVED) e2:SetCondition(s.rmcon2) - e2:SetCost(s.rmcost2) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.rmtg2) e2:SetOperation(s.rmop2) c:RegisterEffect(e2) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} s.listed_names={id} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x105) + return re and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_METAPHYS) end function s.rmfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove() and c:IsFaceup() + return c:IsSpecialSummoned() and c:IsAbleToRemove() and c:IsFaceup() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) @@ -48,12 +49,8 @@ end function s.rmcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end -function s.rmcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_COST) -end function s.rmfilter2(c) - return c:IsSetCard(0x105) and not c:IsCode(id) and c:IsAbleToRemove() + return c:IsSetCard(SET_METAPHYS) and not c:IsCode(id) and c:IsAbleToRemove() end function s.rmtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -65,4 +62,4 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c45974017.lua b/official/c45974017.lua index d38b9178e3..a564bc9b8d 100644 --- a/official/c45974017.lua +++ b/official/c45974017.lua @@ -22,16 +22,16 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.damcon) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.pcfilter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.pctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.pcfilter(chkc) end @@ -71,7 +71,7 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c45985838.lua b/official/c45985838.lua index 850d04b4c2..06bf250a27 100644 --- a/official/c45985838.lua +++ b/official/c45985838.lua @@ -1,4 +1,5 @@ --プロミネンス・ドラゴン +--Solar Flare Dragon local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -40,4 +41,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c45986603.lua b/official/c45986603.lua index 34ff46dd50..7e1aa43d73 100644 --- a/official/c45986603.lua +++ b/official/c45986603.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCategory(CATEGORY_RECOVER) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.reccon) @@ -30,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,tc) Duel.SetOperationInfo(0,CATEGORY_CONTROL,tc,1,0,0) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -45,4 +45,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) end function s.ctval(e,c) return e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c4599182.lua b/official/c4599182.lua index c96578e710..a08e10c1d0 100644 --- a/official/c4599182.lua +++ b/official/c4599182.lua @@ -1,9 +1,9 @@ --- 舞い戻った死神 --- Return of the Reaper --- Scripted by Hatter +--舞い戻った死神 +--This Creepy Little Punk +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Set itself from GY + --Set itself from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -26,20 +26,20 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.spfilter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INFERNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED + local loc=LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local loc=LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED + local loc=LOCATION_HAND|LOCATION_GRAVE|LOCATION_REMOVED Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,loc,0,1,1,nil,e,tp) if #g>0 then @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.setconfilter(c,rp,tp) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0xb) + and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_INFERNITY) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp==1-tp)) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c46005939.lua b/official/c46005939.lua index b1d97f0e16..251ee6d2a5 100644 --- a/official/c46005939.lua +++ b/official/c46005939.lua @@ -21,7 +21,7 @@ local function reglevel(c,tc,lv) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_XYZ_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(lv) tc:RegisterEffect(e1,true) return e1 @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -79,4 +79,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if e1 then e1:Reset() end if e2 then e2:Reset() end end -end +end \ No newline at end of file diff --git a/official/c46008667.lua b/official/c46008667.lua index 73002d4693..9148f8bc96 100644 --- a/official/c46008667.lua +++ b/official/c46008667.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x107a)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_NOBLE_KNIGHT)) --Special Ssummon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -25,15 +25,15 @@ function s.initial_effect(c) e3:SetValue(aux.tgoval) c:RegisterEffect(e3) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0x107a) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode(),pg) end function s.filter2(c,e,tp,mc,code,pg) return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ) - and c:IsSetCard(0x107a) and not c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + and c:IsSetCard(SET_NOBLE_KNIGHT) and not c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c46009906.lua b/official/c46009906.lua index ef8458d87c..4f98f5fdb8 100644 --- a/official/c46009906.lua +++ b/official/c46009906.lua @@ -1,4 +1,5 @@ --猛獣の歯 +--Beast Fangs local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_BEAST)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c46031686.lua b/official/c46031686.lua index 5c021ad9eb..a8616645b1 100644 --- a/official/c46031686.lua +++ b/official/c46031686.lua @@ -1,4 +1,5 @@ --ダメージ・ポラリライザー +--Damage Polarizer local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ex=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return ex and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46033517.lua b/official/c46033517.lua index b61fe6c974..b18bbca55b 100644 --- a/official/c46033517.lua +++ b/official/c46033517.lua @@ -1,7 +1,6 @@ --マシンナーズ・ルインフォース --Machina Ruinforce --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Can only be summoned with its on procedure @@ -43,12 +42,12 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCountLimit(1,{id,1}) e3:SetCode(EVENT_DESTROYED) - e3:SetCondition(function(_,_,_,_,_,_,r) return (r&(REASON_EFFECT+REASON_BATTLE))~=0 end) + e3:SetCondition(function(_,_,_,_,_,_,r) return (r&(REASON_EFFECT|REASON_BATTLE))~=0 end) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.spfilter(c) return c:HasLevel() and c:IsMonster() and c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost() end @@ -98,13 +97,11 @@ function s.rescon2(sg,e,tp,mg) return sg:GetSum(Card.GetLevel)<=12 end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x36) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MACHINA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) - end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) @@ -116,4 +113,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46035545.lua b/official/c46035545.lua index 94967ce00c..467d22b5b9 100644 --- a/official/c46035545.lua +++ b/official/c46035545.lua @@ -1,6 +1,5 @@ --DD魔導賢者ニコラ --D/D Savant Nikola - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -38,20 +37,19 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xaf,0x10af} - +s.listed_series={SET_DD,SET_DDD} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0xaf) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DD) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.atkcfilter(c) - return c:IsSetCard(0x10af) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_DDD) and c:IsMonster() and c:IsDiscardable() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.atkcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.atkcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsLevelBelow(6) + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsLevelBelow(6) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -68,7 +66,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -80,10 +78,10 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_PZONE) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DDD) and c:IsAbleToHand() end function s.pfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -112,7 +110,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) pc:RegisterEffect(e1) end end diff --git a/official/c46037213.lua b/official/c46037213.lua index cadaad5595..e656e8a983 100644 --- a/official/c46037213.lua +++ b/official/c46037213.lua @@ -1,4 +1,5 @@ --ガーディアン・トライス +--Guardian Tryce local s,id=GetID() function s.initial_effect(c) --sum limit @@ -52,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46037983.lua b/official/c46037983.lua index f79d0ed534..5017a8145e 100644 --- a/official/c46037983.lua +++ b/official/c46037983.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_REMOVED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.selfspcond) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetCountLimit(1,{id,2}) e3:SetCondition(s.syncsumcond) e3:SetTarget(s.syncsumtg) diff --git a/official/c46044841.lua b/official/c46044841.lua index 74a3e66c46..7efecd8928 100644 --- a/official/c46044841.lua +++ b/official/c46044841.lua @@ -1,4 +1,5 @@ --ガスタ・ファルコ +--Gusto Falco local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_BATTLE)==0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEUP) end function s.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c46052429.lua b/official/c46052429.lua index fe270351e0..64f5787260 100644 --- a/official/c46052429.lua +++ b/official/c46052429.lua @@ -1,4 +1,5 @@ --高等儀式術 +--Advanced Ritual Art local s,id=GetID() function s.initial_effect(c) local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,extrafil=s.extrafil,extraop=s.extraop,matfilter=s.forcedgroup}) @@ -13,4 +14,4 @@ function s.extraop(mat,e,tp,eg,ep,ev,re,r,rp,tc) end function s.forcedgroup(c,e,tp) return c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_NORMAL) and c:IsAbleToGrave() -end +end \ No newline at end of file diff --git a/official/c46057733.lua b/official/c46057733.lua index d314794072..c4729b9e9a 100644 --- a/official/c46057733.lua +++ b/official/c46057733.lua @@ -1,5 +1,5 @@ --燐廻の三弦猫 ---Reincarnating Shamisen Calico +--Shamisen Samsara Sorrowcat --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) e1:SetCountLimit(1,id) e1:SetTarget(s.syncsumtg) @@ -71,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c46060017.lua b/official/c46060017.lua index 1d4bc43137..8c268b86b8 100644 --- a/official/c46060017.lua +++ b/official/c46060017.lua @@ -75,4 +75,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c4606229.lua b/official/c4606229.lua index 3b2ee15da5..a60ed06c5b 100644 --- a/official/c4606229.lua +++ b/official/c4606229.lua @@ -110,4 +110,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp) -end +end \ No newline at end of file diff --git a/official/c46066477.lua b/official/c46066477.lua index 798d43cf41..d9dc5fa2cd 100644 --- a/official/c46066477.lua +++ b/official/c46066477.lua @@ -1,4 +1,5 @@ --エンタメ・バンド・ハリケーン +--Performance Hurricane local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46083111.lua b/official/c46083111.lua index dc9879bcd0..1595198232 100644 --- a/official/c46083111.lua +++ b/official/c46083111.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} s.listed_names={id} function s.tgfilter(c) return c:IsMonster() and c:IsAbleToGrave() @@ -47,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c46083380.lua b/official/c46083380.lua index 49e3888d78..e5d452fadc 100644 --- a/official/c46083380.lua +++ b/official/c46083380.lua @@ -1,4 +1,5 @@ --攻通規制 +--Attraffic Control local s,id=GetID() function s.initial_effect(c) --activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.atcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>=3 -end +end \ No newline at end of file diff --git a/official/c46089249.lua b/official/c46089249.lua index c029486706..fec486dc3d 100644 --- a/official/c46089249.lua +++ b/official/c46089249.lua @@ -1,4 +1,5 @@ --コアキリング +--Koa'ki Ring local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RDComplete() end end -end +end \ No newline at end of file diff --git a/official/c46104361.lua b/official/c46104361.lua index 14ff7de8cf..a7461dea15 100644 --- a/official/c46104361.lua +++ b/official/c46104361.lua @@ -1,5 +1,5 @@ --サイバース・ホワイトハット ---Cyberse Whitehat +--Cyberse White Hat --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -53,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c4611269.lua b/official/c4611269.lua index 0b5f95d659..77560518dd 100644 --- a/official/c4611269.lua +++ b/official/c4611269.lua @@ -1,4 +1,5 @@ --ライオ・アリゲーター +--Lion Alligator local s,id=GetID() function s.initial_effect(c) --pierce @@ -16,4 +17,4 @@ function s.condition(e) end function s.target(e,c) return c:IsRace(RACE_REPTILE) -end +end \ No newline at end of file diff --git a/official/c46123974.lua b/official/c46123974.lua index e69274f2fc..e4b0de2045 100644 --- a/official/c46123974.lua +++ b/official/c46123974.lua @@ -1,9 +1,9 @@ --- --- Libromancer Geek Boy --- Scripted by Hatter +--リブロマンサー・Gボーイ +--Libromancer Geek Boy +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Search 1 "Libromancer" Spell + --Search 1 "Libromancer" Spell local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.spcostfilter(c) return c:IsRitualMonster() and not c:IsPublic() end @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x17d) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_LIBROMANCER) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c46128076.lua b/official/c46128076.lua index 5139a1fc51..358d11a6a7 100644 --- a/official/c46128076.lua +++ b/official/c46128076.lua @@ -1,4 +1,5 @@ --黒魔導師クラン +--Ebon Magician Curran local s,id=GetID() function s.initial_effect(c) --damage @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) Duel.Damage(p,ct*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46130346.lua b/official/c46130346.lua index 05cdcd1c74..4e81634428 100644 --- a/official/c46130346.lua +++ b/official/c46130346.lua @@ -1,4 +1,5 @@ --ファイヤー・ボール +--Hinotama local s,id=GetID() function s.initial_effect(c) --damage @@ -20,4 +21,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46132282.lua b/official/c46132282.lua index 71261652c9..6a573cab09 100644 --- a/official/c46132282.lua +++ b/official/c46132282.lua @@ -1,6 +1,5 @@ --甲化鎧骨格 --Powered Inzektron - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -17,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.effop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -29,7 +28,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -42,10 +41,10 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,0) e3:SetValue(0) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=e3:Clone() e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end \ No newline at end of file diff --git a/official/c46136942.lua b/official/c46136942.lua index 2f97fcc69b..be325486f2 100644 --- a/official/c46136942.lua +++ b/official/c46136942.lua @@ -59,10 +59,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_PZONE,0,nil) -end +end \ No newline at end of file diff --git a/official/c4614116.lua b/official/c4614116.lua index 4cf4d2e270..2c3a9720a4 100644 --- a/official/c4614116.lua +++ b/official/c4614116.lua @@ -1,4 +1,5 @@ --闇・エネルギー +--Dark Energy local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c46145256.lua b/official/c46145256.lua index 06947383b8..ba8fb2c9d2 100644 --- a/official/c46145256.lua +++ b/official/c46145256.lua @@ -1,4 +1,5 @@ --閃光の結界像 +--Barrier Statue of the Heavens local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:GetAttribute()~=ATTRIBUTE_LIGHT -end +end \ No newline at end of file diff --git a/official/c46159582.lua b/official/c46159582.lua index dd26d929b0..0820887e20 100644 --- a/official/c46159582.lua +++ b/official/c46159582.lua @@ -1,4 +1,5 @@ --リチュアの儀水鏡 +--Gishki Aquamirror local s,id=GetID() function s.initial_effect(c) Ritual.AddProcEqual(c,s.ritual_filter) @@ -9,21 +10,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToDeck) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.ritual_filter(c) - return c:IsSetCard(0x3a) and c:IsRitualMonster() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) + return c:IsSetCard(SET_GISHKI) and c:IsRitualMonster() end function s.thfilter(c) - return c:IsSetCard(0x3a) and c:IsRitualMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GISHKI) and c:IsRitualMonster() and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -34,8 +31,8 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.op(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c46169154.lua b/official/c46169154.lua index e4d893535b..7c405c741c 100644 --- a/official/c46169154.lua +++ b/official/c46169154.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_names={0x161} +s.listed_series={SET_WAR_ROCK} --Normal Summon without Tributing function s.cfilter(c) return c:IsFacedown() or not c:IsRace(RACE_WARRIOR) @@ -47,7 +47,7 @@ function s.tgfilter(c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and not c:IsCode(id) and c:IsAbleToGrave() end function s.atkfilter(c) - return c:IsSetCard(0x161) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_WAR_ROCK) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) @@ -68,7 +68,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(200) tc:RegisterEffect(e1) end diff --git a/official/c46186135.lua b/official/c46186135.lua index b15e6f5375..fbefc69e46 100644 --- a/official/c46186135.lua +++ b/official/c46186135.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -63,10 +63,6 @@ end function s.contactop(g) Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,e:GetHandler()) @@ -108,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(tg,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46195773.lua b/official/c46195773.lua index 8cee6b2982..aa3b8ee3b8 100644 --- a/official/c46195773.lua +++ b/official/c46195773.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) end s.material={67270095} s.listed_names={67270095} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,scard,sumtype,tp) return c:IsSummonCode(scard,sumtype,tp,67270095) or c:IsHasEffect(20932152) end @@ -46,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(d:GetAttack()/2) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c46232525.lua b/official/c46232525.lua index 25d87ed9c6..1f0b423fb4 100644 --- a/official/c46232525.lua +++ b/official/c46232525.lua @@ -1,4 +1,5 @@ --ヘルモスの爪 +--The Claw of Hermos local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,12 +26,12 @@ function s.spfilter(c,e,tp,race,mc) return c:IsType(TYPE_FUSION) and c.material_race and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and race==c.material_race end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and not tc:IsImmuneToEffect(e) then if tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end @@ -46,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c46237548.lua b/official/c46237548.lua index 633ae9f4b1..43753b69c5 100644 --- a/official/c46237548.lua +++ b/official/c46237548.lua @@ -30,13 +30,13 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_NORMAL)==3 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46239604.lua b/official/c46239604.lua index 3fc3275d56..3a93df1a42 100644 --- a/official/c46239604.lua +++ b/official/c46239604.lua @@ -1,4 +1,5 @@ --魔知ガエル +--Dupe Frog local s,id=GetID() function s.initial_effect(c) --change code @@ -29,7 +30,7 @@ function s.initial_effect(c) e3:SetValue(s.atlimit) c:RegisterEffect(e3) end -s.listed_series={0x12} +s.listed_series={SET_FROG} s.listed_names={id} function s.atlimit(e,c) return c~=e:GetHandler() @@ -38,17 +39,17 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x12) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_FROG) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c46241344.lua b/official/c46241344.lua index f7e88e0aa8..248ef8d16b 100644 --- a/official/c46241344.lua +++ b/official/c46241344.lua @@ -26,20 +26,20 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x7c,0x79} +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x7c) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsAbleToHand() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) end function s.gyfilter(c) - return c:IsMonster() and c:IsSetCard(0x79) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_FIRE_FIST) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end @@ -53,5 +53,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c46247282.lua b/official/c46247282.lua index bd2d16b3a3..80907605e2 100644 --- a/official/c46247282.lua +++ b/official/c46247282.lua @@ -90,4 +90,4 @@ function s.disop(e,tp) zone=zone&~dz end return zone -end +end \ No newline at end of file diff --git a/official/c46253216.lua b/official/c46253216.lua index 6f626b4c44..ef370b82c0 100644 --- a/official/c46253216.lua +++ b/official/c46253216.lua @@ -1,4 +1,5 @@ --フレンドリーファイヤ +--Bad Aim local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46259438.lua b/official/c46259438.lua index 21a378084c..825003685f 100644 --- a/official/c46259438.lua +++ b/official/c46259438.lua @@ -1,4 +1,5 @@ --契約洗浄 +--Contract Laundering local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xae} +s.listed_series={SET_DARK_CONTRACT} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xae) and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_DARK_CONTRACT) and c:GetSequence()<5 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ct2=Duel.Draw(tp,ct1,REASON_EFFECT) Duel.BreakEffect() Duel.Recover(tp,ct2*1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46261704.lua b/official/c46261704.lua index 314825bdf0..c00cbe03b9 100644 --- a/official/c46261704.lua +++ b/official/c46261704.lua @@ -30,7 +30,7 @@ s.listed_series={SET_PHOTON,SET_GALAXY} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) end function s.spfilter(c,e,tp) @@ -65,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) + return c:IsFaceup() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) end diff --git a/official/c46271408.lua b/official/c46271408.lua index cfbc9b3d22..ca0b02b775 100644 --- a/official/c46271408.lua +++ b/official/c46271408.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1115} +s.listed_series={SET_SKY_STRIKER_ACE} function s.cfilter(c) return c:GetSequence()<5 end @@ -21,7 +21,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c,e,tp,spchk) - return c:IsSetCard(0x1115) and c:IsMonster() and c:IsLevel(4) and (c:IsAbleToHand() or (spchk and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) + return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsMonster() and c:IsLevel(4) and (c:IsAbleToHand() or (spchk and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local spchk=Duel.GetMatchingGroupCount(Card.IsSpell,tp,LOCATION_GRAVE,0,nil)>=3 @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end, 1152) end -end +end \ No newline at end of file diff --git a/official/c46272804.lua b/official/c46272804.lua index 0daeee0ee5..e93ad6c1cb 100644 --- a/official/c46272804.lua +++ b/official/c46272804.lua @@ -1,4 +1,5 @@ --ランス・リンドブルム +--Lancer Lindwurm local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c4628897.lua b/official/c4628897.lua index f4635bbc87..be17a30270 100644 --- a/official/c4628897.lua +++ b/official/c4628897.lua @@ -38,11 +38,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.material_setcode=0xe9 +s.material_setcode=SET_MAGNA_WARRIOR function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -67,15 +67,15 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,75347539) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,42901635) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,75347539) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,42901635) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp,75347539) - local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp,42901635) + local g1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp,75347539) + local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp,42901635) if #g1>0 and #g2>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg1=g1:Select(tp,1,1,nil) @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sg1:Merge(sg2) Duel.SpecialSummon(sg1,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46290741.lua b/official/c46290741.lua index d07aabf9f9..cf47efee71 100644 --- a/official/c46290741.lua +++ b/official/c46290741.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -87,4 +87,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46291010.lua b/official/c46291010.lua index 731b506ae7..06d6fe9e08 100644 --- a/official/c46291010.lua +++ b/official/c46291010.lua @@ -33,4 +33,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c46294982.lua b/official/c46294982.lua index 6eea05dbf4..1852f3063d 100644 --- a/official/c46294982.lua +++ b/official/c46294982.lua @@ -62,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) c:RegisterEffect(e1) end @@ -80,7 +80,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c46303688.lua b/official/c46303688.lua index 1c2da071ec..38a99b70c0 100644 --- a/official/c46303688.lua +++ b/official/c46303688.lua @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4632019.lua b/official/c4632019.lua index 55aa4066c2..b663287609 100644 --- a/official/c4632019.lua +++ b/official/c4632019.lua @@ -1,9 +1,9 @@ --- ヤマタコオロチ --- Yamatako Orochi --- Scripted by Hatter +--ヤマタコオロチ +--Yamatako Orochi +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Can be treated as Level 8 for a Synchro Summon + --Can be treated as Level 8 for a Synchro Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SYNCHRO_LEVEL) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_ONFIELD) e1:SetValue(function(e) return 8*65536+e:GetHandler():GetLevel() end) c:RegisterEffect(e1) - -- Synchro Monster gains effect + --Synchro Monster gains effect local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -27,22 +27,22 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() if rc:GetOriginalLevel()<=8 then - -- Gain 800 ATK/DEF + --Gain 800 ATK/DEF local e1=Effect.CreateEffect(rc) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) rc:RegisterEffect(e2) else - -- Inflict piercing damage + --Inflict piercing damage local e1=Effect.CreateEffect(rc) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end if not rc:IsType(TYPE_EFFECT) then @@ -50,8 +50,8 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end \ No newline at end of file diff --git a/official/c46337945.lua b/official/c46337945.lua index b7bbb6ac53..664f122508 100644 --- a/official/c46337945.lua +++ b/official/c46337945.lua @@ -1,4 +1,5 @@ --儀水鏡の瞑想術 +--Aquamirror Meditation local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.costfilter(c) - return not c:IsPublic() and c:GetType()==0x82 + return not c:IsPublic() and c:IsRitualSpell() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -24,10 +25,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.filter(c) - return c:IsSetCard(0x3a) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GISHKI) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,2,2,nil) @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c46354113.lua b/official/c46354113.lua index f49e540e2a..040a8719f8 100644 --- a/official/c46354113.lua +++ b/official/c46354113.lua @@ -1,4 +1,5 @@ --ロケット・ヘルモス・キャノン +--Rocket Hermos Cannon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -41,22 +42,22 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --extra attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --pierce local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_PIERCE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c46358784.lua b/official/c46358784.lua index 294978c9fb..e8b011386e 100644 --- a/official/c46358784.lua +++ b/official/c46358784.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_BATTLE_START) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_BATTLE_START) e2:SetCountLimit(1) e2:SetTarget(s.postg) e2:SetOperation(s.posop) @@ -63,8 +63,8 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end \ No newline at end of file diff --git a/official/c46363422.lua b/official/c46363422.lua index ad1383e541..f883801d46 100644 --- a/official/c46363422.lua +++ b/official/c46363422.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.counter_place_list={COUNTER_SPELL} -s.listed_names={78193831} +s.listed_names={CARD_BUSTER_BLADER} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -41,7 +41,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(e:GetHandler(),REASON_COST) end function s.filter(c,e,tp) - return c:IsCode(78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsCode(CARD_BUSTER_BLADER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46372010.lua b/official/c46372010.lua index 3bf0dbf345..13a4fee25f 100644 --- a/official/c46372010.lua +++ b/official/c46372010.lua @@ -1,4 +1,5 @@ --地獄門の契約書 +--Dark Contract with the Gate local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,16 +22,16 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.damcon) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.filter(c) - return c:IsSetCard(0xaf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -46,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -58,4 +59,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4638410.lua b/official/c4638410.lua index 38e1fcc814..86f4b2cf41 100644 --- a/official/c4638410.lua +++ b/official/c4638410.lua @@ -27,5 +27,5 @@ function s.etarget(e,c) return c:GetOwner()==e:GetHandlerPlayer() end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) and te:GetOwner()~=e:GetOwner() -end + return te:IsTrapEffect() and te:GetOwner()~=e:GetOwner() +end \ No newline at end of file diff --git a/official/c46384403.lua b/official/c46384403.lua index c699412487..42b151e24e 100644 --- a/official/c46384403.lua +++ b/official/c46384403.lua @@ -1,4 +1,5 @@ --素早いマンタ +--Nimble Manta local s,id=GetID() function s.initial_effect(c) --special summon diff --git a/official/c46384672.lua b/official/c46384672.lua index 0c54c5a055..a75ea085bf 100644 --- a/official/c46384672.lua +++ b/official/c46384672.lua @@ -28,16 +28,16 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_names={73879377} s.LVnum=5 -s.LVset=0x111 +s.LVset=SET_ARMED_DRAGON function s.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.cfilter(c,tp) local atk=c:GetAttack() @@ -73,24 +73,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(73879377) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c46396218.lua b/official/c46396218.lua index 5e7fa71526..66272fa0df 100644 --- a/official/c46396218.lua +++ b/official/c46396218.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.distg) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) c:RegisterEffect(e2) diff --git a/official/c46404281.lua b/official/c46404281.lua index cac77de60f..7be62b05c1 100644 --- a/official/c46404281.lua +++ b/official/c46404281.lua @@ -1,4 +1,5 @@ --ラヴァルのマグマ砲兵 +--Laval Magma Cannoneer local s,id=GetID() function s.initial_effect(c) --damage @@ -32,4 +33,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46411259.lua b/official/c46411259.lua index 0f6462c52a..3d41c06d3b 100644 --- a/official/c46411259.lua +++ b/official/c46411259.lua @@ -1,4 +1,5 @@ --突然変異 +--Metamorphosis local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46425662.lua b/official/c46425662.lua index ab73de8278..d78697efe4 100644 --- a/official/c46425662.lua +++ b/official/c46425662.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.attop) c:RegisterEffect(e2) end -s.listed_series={0x400d,0x113} +s.listed_series={SET_ELEMENTSABER,SET_ELEMENTAL_LORD} s.listed_names={id} function s.costfilter(c) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local fg=Group.CreateGroup() @@ -35,7 +35,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) fg:AddCard(pe:GetHandler()) end local loc=LOCATION_HAND - if #fg>0 then loc=LOCATION_HAND+LOCATION_DECK end + if #fg>0 then loc=LOCATION_HAND|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil):GetFirst() @@ -47,12 +47,12 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) fc=fg:Select(tp,1,1,nil) end Duel.Hint(HINT_CARD,0,fc:GetCode()) - fc:RegisterFlagEffect(61557074,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + fc:RegisterFlagEffect(61557074,RESETS_STANDARD_PHASE_END,0,0) end Duel.SendtoGrave(tc,REASON_COST) end function s.thfilter(c) - return (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return (c:IsSetCard(SET_ELEMENTSABER) or c:IsSetCard(SET_ELEMENTAL_LORD)) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -83,6 +83,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c46427957.lua b/official/c46427957.lua index 156b5fa8c7..f93a57f6e4 100644 --- a/official/c46427957.lua +++ b/official/c46427957.lua @@ -1,4 +1,5 @@ --破滅の女神ルイン +--Ruin, Queen of Oblivion local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,4 +18,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c46435376.lua b/official/c46435376.lua index ca51efad03..3906eaa1de 100644 --- a/official/c46435376.lua +++ b/official/c46435376.lua @@ -1,7 +1,6 @@ --インフェルニティ・セイジ --Infernity Sage --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -28,8 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Infernity" archetype -s.listed_series={0xb} - +s.listed_series={SET_INFERNITY} --Activation legality function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) @@ -41,12 +39,12 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end end --Check for an "Infernity" monster function s.tgfilter(c) - return c:IsSetCard(0xb) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_INFERNITY) and c:IsMonster() and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c464362.lua b/official/c464362.lua index e77ca0d91e..8bd4ae55d2 100644 --- a/official/c464362.lua +++ b/official/c464362.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) c:SetUniqueOnField(1,0,id) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9),1,99,30068120) + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL),1,99,30068120) --destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) @@ -22,14 +22,14 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xad)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FRIGHTFUR)) e3:SetValue(s.atkval) c:RegisterEffect(e3) end -s.listed_series={0xa9,0xad} -s.material_setcode={0xa9,0xc3} +s.listed_series={SET_FLUFFAL,SET_FRIGHTFUR} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -44,8 +44,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end function s.atkfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xa9) or c:IsSetCard(0xad)) + return c:IsFaceup() and (c:IsSetCard(SET_FLUFFAL) or c:IsSetCard(SET_FRIGHTFUR)) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*300 -end +end \ No newline at end of file diff --git a/official/c46448938.lua b/official/c46448938.lua index bfd6e00684..7a77a7e0b2 100644 --- a/official/c46448938.lua +++ b/official/c46448938.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) @@ -25,14 +25,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.regcon) e1:SetOperation(s.regop1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_NEGATED) e2:SetCondition(s.regcon) e2:SetOperation(s.regop2) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -40,13 +40,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCountLimit(1) e3:SetCondition(s.effcon) e3:SetOperation(s.effop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) e1:SetLabelObject(e3) e2:SetLabelObject(e3) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.regop1(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabelObject():GetLabel() @@ -61,7 +61,7 @@ function s.effcon(e,tp,eg,ep,ev,re,r,rp) return e:GetLabel()>0 end function s.sfilter(c) - return c:IsSetCard(0x106e) and c:GetCode()~=id and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:GetCode()~=id and c:IsSpell() and c:IsAbleToHand() end function s.spfilter(c,lv,e,tp) return c:IsLevelBelow(lv) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -82,4 +82,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c4647954.lua b/official/c4647954.lua index 693fa81baf..fd00ddbb98 100644 --- a/official/c4647954.lua +++ b/official/c4647954.lua @@ -1,7 +1,6 @@ --ZS-昇華賢者 ---ZS – Ascend Sage +--ZS - Ascended Sage --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -26,8 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Utopia" and "Rank-Up-Magic" archetypes -s.listed_series={0x107f,0x95} - +s.listed_series={SET_UTOPIA,SET_RANK_UP_MAGIC} --If you control no cards function s.spcon(e,c) if c==nil then return true end @@ -37,7 +35,7 @@ end --If an "Utopia" Xyz used this card as material function s.efcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return r==REASON_XYZ and c:GetReasonCard():IsSetCard(0x107f) + return r==REASON_XYZ and c:GetReasonCard():IsSetCard(SET_UTOPIA) end --Grant effect to "Utopia "Xyz monster using this card as material function s.efop(e,tp,eg,ep,ev,re,r,rp) @@ -52,24 +50,24 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.xyzcon) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end --If Xyz summoned function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end --Check for "Rank-Up-Magic" normal spell function s.filter(c) - return c:IsSetCard(0x95) and c:GetType()==TYPE_SPELL and c:IsAbleToHand() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsNormalSpell() and c:IsAbleToHand() end --Activation legality function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -84,4 +82,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c46480475.lua b/official/c46480475.lua index 6a272ecbae..fc6bf1f1a1 100644 --- a/official/c46480475.lua +++ b/official/c46480475.lua @@ -1,4 +1,5 @@ --不協和音 +--Discord local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,11 +32,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCountLimit(1) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) e:GetHandler():RegisterEffect(e1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -44,4 +45,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if ct==0 then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46497537.lua b/official/c46497537.lua index f5671be189..466093e93d 100644 --- a/official/c46497537.lua +++ b/official/c46497537.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) diff --git a/official/c46500985.lua b/official/c46500985.lua index 666098d14c..94891ed211 100644 --- a/official/c46500985.lua +++ b/official/c46500985.lua @@ -1,4 +1,5 @@ --メタモルF +--Metamorformation local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe1)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_METALFOES)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -29,13 +30,13 @@ function s.initial_effect(c) e4:SetValue(s.efilter) c:RegisterEffect(e4) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.immcon(e) - return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil,0xe1) + return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil,SET_METALFOES) end function s.etarget(e,c) - return c:IsSetCard(0xe1) and not c:IsType(TYPE_EFFECT) + return c:IsSetCard(SET_METALFOES) and not c:IsType(TYPE_EFFECT) end function s.efilter(e,re) return re:GetOwnerPlayer()~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c46502013.lua b/official/c46502013.lua index ca312d0824..c5890361c4 100644 --- a/official/c46502013.lua +++ b/official/c46502013.lua @@ -1,4 +1,5 @@ --ガリトラップ-ピクシーの輪- +--Pixie Ring local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -23,4 +24,4 @@ function s.tfilter(c,atk) end function s.atlimit(e,c) return c:IsFaceup() and not Duel.IsExistingMatchingCard(s.tfilter,c:GetControler(),LOCATION_MZONE,0,1,c,c:GetAttack()) -end +end \ No newline at end of file diff --git a/official/c46502744.lua b/official/c46502744.lua index a3d9be12c5..9be8628b1a 100644 --- a/official/c46502744.lua +++ b/official/c46502744.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) end s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) + return ep~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1) + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD,0,1) Duel.SpecialSummonComplete() end end @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c46508640.lua b/official/c46508640.lua index 4217cbc907..72edbc2ce4 100644 --- a/official/c46508640.lua +++ b/official/c46508640.lua @@ -1,4 +1,5 @@ --龍脈に棲む者 +--Dweller in the Depths local s,id=GetID() function s.initial_effect(c) --destroy @@ -11,8 +12,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:GetSequence()~=5 + return c:IsFaceup() and c:IsContinuousSpell() and c:GetSequence()~=5 end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.cfilter,c:GetControler(),LOCATION_SZONE,0,nil)*300 -end +end \ No newline at end of file diff --git a/official/c46518210.lua b/official/c46518210.lua index b62fed4313..ac6ff18ad4 100644 --- a/official/c46518210.lua +++ b/official/c46518210.lua @@ -74,4 +74,4 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46552140.lua b/official/c46552140.lua index 3511d74ec7..e03666fcb3 100644 --- a/official/c46552140.lua +++ b/official/c46552140.lua @@ -31,15 +31,15 @@ function s.initial_effect(c) e4:SetOperation(s.tdop) c:RegisterEffect(e4) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x140) + local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,SET_ADAMANCIPATOR) return aux.SelectUnselectGroup(g,e,tp,1,5,nil,chk) end end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x140) + local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,SET_ADAMANCIPATOR) local rg=aux.SelectUnselectGroup(g,e,tp,1,5,nil,1,tp,aux.Stringid(id,1)) if #rg>0 then Duel.ConfirmCards(1-tp,rg) @@ -47,4 +47,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToDeckTop(rg) Duel.SortDecktop(tp,tp,#rg) end -end +end \ No newline at end of file diff --git a/official/c46565218.lua b/official/c46565218.lua index 649deeeee2..8b710a90a3 100644 --- a/official/c46565218.lua +++ b/official/c46565218.lua @@ -1,4 +1,5 @@ --サタンクロース +--Santa Claws local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,7 +27,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_LEAVE+RESET_TEMP_REMOVE+RESET_TURN_SET)+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_LEAVE|RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -38,4 +39,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46570372.lua b/official/c46570372.lua index 9cd4991f5b..9ecdfbb700 100644 --- a/official/c46570372.lua +++ b/official/c46570372.lua @@ -1,16 +1,16 @@ --- 鎮魂の決闘 --- Battle of Sleeping Spirits --- Scripted by Hatter +--鎮魂の決闘 +--Battle of Sleeping Spirits +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_BATTLE_END) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -43,25 +43,25 @@ function s.spsummon(e,p,turn,tp) local tc=Duel.SelectMatchingCard(p,s.spfilter,p,LOCATION_GRAVE,0,1,1,nil,e,p,turn):GetFirst() if tc and Duel.SpecialSummon(tc,0,p,p,false,false,POS_FACEUP_ATTACK)>0 and p==tp and tc:IsCode(CARD_NEOS) then - -- Double ATK during Damage Step + --Double ATK during Damage Step local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLE_START) e1:SetCountLimit(1) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler() - -- Double ATK + --Double ATK local e1=Effect.CreateEffect(e:GetOwner()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetRange(LOCATION_MZONE) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c46571052.lua b/official/c46571052.lua index e854eddb19..7c57061def 100644 --- a/official/c46571052.lua +++ b/official/c46571052.lua @@ -1,4 +1,5 @@ --ブラッド・オーキス +--Vampiric Orchis local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46572756.lua b/official/c46572756.lua index 83bf6db37c..9e9d28b164 100644 --- a/official/c46572756.lua +++ b/official/c46572756.lua @@ -1,4 +1,5 @@ --レアル・ジェネクス・ウルティマム +--R-Genex Ultimum local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) end function s.filter(c) - return c:IsSetCard(0x2) and c:IsAbleToDeck() + return c:IsSetCard(SET_GENEX) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -32,6 +33,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46576366.lua b/official/c46576366.lua index f22c98149e..e4e508faa2 100644 --- a/official/c46576366.lua +++ b/official/c46576366.lua @@ -57,4 +57,4 @@ function s.atchop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c46589034.lua b/official/c46589034.lua index 6b6d23a344..9b232eb4d2 100644 --- a/official/c46589034.lua +++ b/official/c46589034.lua @@ -1,4 +1,5 @@ --RR-ペイン・レイニアス +--Raidraptor - Pain Lanius local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,9 +20,9 @@ function s.initial_effect(c) e2:SetValue(s.xyzlimit) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) and c:IsLevelAbove(1) and c:GetAttack()~=0 and c:GetDefense()~=0 + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and c:IsLevelAbove(1) and c:GetAttack()~=0 and c:GetDefense()~=0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc) end @@ -50,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -59,4 +60,4 @@ end function s.xyzlimit(e,c) if not c then return false end return not c:IsRace(RACE_WINGEDBEAST) -end +end \ No newline at end of file diff --git a/official/c46593546.lua b/official/c46593546.lua index 7d2b04f201..156e87d961 100644 --- a/official/c46593546.lua +++ b/official/c46593546.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,3)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c46606977.lua b/official/c46606977.lua index 419c7ed3c2..4c25c0086d 100644 --- a/official/c46606977.lua +++ b/official/c46606977.lua @@ -1,5 +1,5 @@ --ネメシス・アンブレラ ---Nemesis Umbrella +--Nemeses Umbrella --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x13d} +s.listed_series={SET_NEMESES} s.listed_names={id} function s.tdfilter(c) return c:IsMonster() and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) @@ -43,11 +43,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.thfilter(c) - return c:IsSetCard(0x13d) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NEMESES) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -61,5 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c46609443.lua b/official/c46609443.lua index b8acef899d..902f5498b5 100644 --- a/official/c46609443.lua +++ b/official/c46609443.lua @@ -1,4 +1,5 @@ --カオスエンドマスター +--Chaos-End Master local s,id=GetID() function s.initial_effect(c) --search @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46613515.lua b/official/c46613515.lua index 942c9cda3b..2390320f76 100644 --- a/official/c46613515.lua +++ b/official/c46613515.lua @@ -1,4 +1,5 @@ --クリアクリボー +--Clear Kuriboh local s,id=GetID() function s.initial_effect(c) --negate @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -23,18 +24,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.drcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsChainNegatable(ev) and (aux.damcon1(e,tp,eg,ep,ev,re,r,rp) or aux.damcon1(e,1-tp,eg,ep,ev,re,r,rp)) - and re:IsActiveType(TYPE_MONSTER) and ep~=tp -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + and re:IsMonsterEffect() and ep~=tp end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,4 +61,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c46647144.lua b/official/c46647144.lua index 549ba4b47d..cdc70120d6 100644 --- a/official/c46647144.lua +++ b/official/c46647144.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --cannot target @@ -37,7 +37,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={TOKEN_WORLD_LEGACY} -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() @@ -47,11 +47,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(a,d) return a and d and a:IsRelateToBattle() and d:IsRelateToBattle() and g:IsExists(Card.IsType,1,nil,TYPE_LINK) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetLabelObject() if tc and tc:IsFaceup() and tc:IsRelateToBattle() then @@ -59,12 +54,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.atktg(e,c) - return c:IsFaceup() and c:IsSetCard(0xfe) and c~=e:GetHandler() + return c:IsFaceup() and c:IsSetCard(SET_WORLD_LEGACY) and c~=e:GetHandler() end function s.tkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_EXTRA) @@ -76,12 +71,12 @@ function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0xfe,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0xfe,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_WORLD_LEGACY,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_WORLD_LEGACY,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then local t1=Duel.CreateToken(tp,id+1) local t2=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(t2,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c46652477.lua b/official/c46652477.lua index e32d38d6db..6e62a2faa7 100644 --- a/official/c46652477.lua +++ b/official/c46652477.lua @@ -1,4 +1,5 @@ --転生の予言 +--The Transmigration Prophecy local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,5 +22,5 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c46656406.lua b/official/c46656406.lua index 192fb1e654..1181fb8f43 100644 --- a/official/c46656406.lua +++ b/official/c46656406.lua @@ -1,4 +1,5 @@ --呪言の鏡 +--Mirror of Oaths local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46657337.lua b/official/c46657337.lua index 84564b424a..5fb4f8fc5e 100644 --- a/official/c46657337.lua +++ b/official/c46657337.lua @@ -1,4 +1,5 @@ --ムカムカ +--Muka Muka local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*300 -end +end \ No newline at end of file diff --git a/official/c46659709.lua b/official/c46659709.lua index 6cdd1ea236..51c7d25d11 100644 --- a/official/c46659709.lua +++ b/official/c46659709.lua @@ -1,4 +1,5 @@ --銀河戦士 +--Galaxy Soldier local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x7b} +s.listed_series={SET_GALAXY} function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost() end @@ -41,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end function s.filter(c) - return c:IsSetCard(0x7b) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GALAXY) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c46660187.lua b/official/c46660187.lua index 80746f4569..4597823b50 100644 --- a/official/c46660187.lua +++ b/official/c46660187.lua @@ -1,5 +1,5 @@ --War Rock Big Blow ---Scripted by fiftyfour +--War Rock Big Blow local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,tp) - return c:IsPreviousSetCard(0x161) and c:GetReasonPlayer()==1-tp + return c:IsPreviousSetCard(SET_WAR_ROCK) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46668237.lua b/official/c46668237.lua index b32135430c..fe1fe30b1f 100644 --- a/official/c46668237.lua +++ b/official/c46668237.lua @@ -1,4 +1,5 @@ --森の番人グリーン・バブーン +--Green Baboon, Defender of the Forest local s,id=GetID() function s.initial_effect(c) --spsummon @@ -6,10 +7,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,10 +22,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) and (r&REASON_DESTROY)~=0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -34,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c46696593.lua b/official/c46696593.lua index 5576593cb9..da8b2d6eae 100644 --- a/official/c46696593.lua +++ b/official/c46696593.lua @@ -1,7 +1,8 @@ --紅陽鳥 +--Crimson Sunbird local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,75582395,10202894) -end +end \ No newline at end of file diff --git a/official/c46700124.lua b/official/c46700124.lua index 12a3e05175..52c8b74acf 100644 --- a/official/c46700124.lua +++ b/official/c46700124.lua @@ -1,4 +1,5 @@ --機械王 +--Machine King local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)*100 -end +end \ No newline at end of file diff --git a/official/c46701379.lua b/official/c46701379.lua index 72440b4627..69e6a66983 100644 --- a/official/c46701379.lua +++ b/official/c46701379.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x122)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VALKYRIE)) e1:SetValue(s.atkval) c:RegisterEffect(e1) --mill @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetOperation(s.gyop) c:RegisterEffect(e2) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} s.listed_names={id} function s.atkval(e,c) local tp=e:GetHandlerPlayer() return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonster),tp,0,LOCATION_REMOVED,nil)*200 end function s.gycfilter(c) - return c:IsFaceup() and c:IsSetCard(0x122) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_VALKYRIE) and not c:IsCode(id) end function s.gycon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.gycfilter,tp,LOCATION_MZONE,0,1,nil) @@ -49,4 +49,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46710683.lua b/official/c46710683.lua index 89f21e34ff..d36aeaec55 100644 --- a/official/c46710683.lua +++ b/official/c46710683.lua @@ -20,6 +20,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c46724542.lua b/official/c46724542.lua index 2be034b787..3a1018e9e1 100644 --- a/official/c46724542.lua +++ b/official/c46724542.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e1) --Increase ATK/DEF @@ -33,7 +33,7 @@ function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsSummonCode,1,nil,lc,sumtype,tp,CARD_CYBER_DRAGON) end function s.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) and e:GetHandler():GetAttackAnnouncedCount()<1 + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() and e:GetHandler():GetAttackAnnouncedCount()<1 end function s.filter(c) return c:IsFaceup() and c:IsAttackAbove(2100) and c:IsRace(RACE_MACHINE) @@ -47,13 +47,13 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(2100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -61,13 +61,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) e4:SetValue(1) c:RegisterEffect(e4) end -end +end \ No newline at end of file diff --git a/official/c46759931.lua b/official/c46759931.lua index dd6a916a48..52b2e2ffdb 100644 --- a/official/c46759931.lua +++ b/official/c46759931.lua @@ -1,9 +1,10 @@ --V・HERO トリニティー +--Vision HERO Trinity local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x8),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO),3) --summon success local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -24,20 +25,20 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) c:RegisterEffect(e3) end -s.listed_series={0x8} -s.material_setcode=0x8 +s.listed_series={SET_HERO} +s.material_setcode=SET_HERO function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(c:GetBaseAttack()*2) c:RegisterEffect(e1) end function s.atkcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) -end + return e:GetHandler():IsFusionSummoned() +end \ No newline at end of file diff --git a/official/c46772449.lua b/official/c46772449.lua index 13229e1d03..9c8a18f243 100644 --- a/official/c46772449.lua +++ b/official/c46772449.lua @@ -49,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c46796664.lua b/official/c46796664.lua index b773f39cd5..f4909e5ac8 100644 --- a/official/c46796664.lua +++ b/official/c46796664.lua @@ -1,4 +1,5 @@ --DD魔導賢者コペルニクス +--D/D Savant Copernicus local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -35,23 +36,23 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} s.listed_names={id} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0xaf) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DD) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_SPELL) and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetFlagEffect(id)==0 + return Duel.IsChainNegatable(ev) and re:IsSpellEffect() and aux.damcon1(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetFlagEffect(id)==0 end function s.disop(e,tp,eg,ep,ev,re,r,rp) if not Duel.SelectEffectYesNo(tp,e:GetHandler()) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) if not Duel.NegateEffect(ev) then return end Duel.BreakEffect() Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.tgfilter(c) - return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and not c:IsCode(id) and c:IsAbleToGrave() + return (c:IsSetCard(SET_DD) or c:IsSetCard(SET_DARK_CONTRACT)) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,4 +64,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46809548.lua b/official/c46809548.lua index b8420336b3..b7fb96edca 100644 --- a/official/c46809548.lua +++ b/official/c46809548.lua @@ -50,7 +50,7 @@ function s.thcfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.thcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.thcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return not c:IsCode(id) and c:IsMonster() and c:IsDefense(c:GetAttack()) and c:IsAttackAbove(0) and c:IsDefenseAbove(0) @@ -82,4 +82,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.HintSelection(g) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46815301.lua b/official/c46815301.lua index 94e2e91df5..25672f56f0 100644 --- a/official/c46815301.lua +++ b/official/c46815301.lua @@ -1,12 +1,12 @@ --- --- Askaan, the Bicorned Ghoti --- Scripted by Hatter +--ゴーティスの双角アスカーン +--Askaan, the Bicorned Ghoti +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 1 Tuner + 1+ Non-Tuner monsters + --1 Tuner + 1+ Non-Tuner monsters Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - -- Banish 1 Fish monster you control and 1 card your opponent controls + --Banish 1 Fish monster you control and 1 card your opponent controls local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -32,10 +32,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.rmrescon(sg,e,tp) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.rmfilter(c,e,tp) return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) @@ -59,9 +59,9 @@ function s.spcostfilter(c,tp) return c:IsRace(RACE_FISH) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c46820049.lua b/official/c46820049.lua index 17b69737fe..3d8bd5b344 100644 --- a/official/c46820049.lua +++ b/official/c46820049.lua @@ -1,4 +1,5 @@ --地獄将軍・メフィスト +--Mefist the Infernal General local s,id=GetID() function s.initial_effect(c) --handes @@ -28,5 +29,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c4682617.lua b/official/c4682617.lua index cf9e5f2115..1a09570778 100644 --- a/official/c4682617.lua +++ b/official/c4682617.lua @@ -16,21 +16,21 @@ function s.initial_effect(c) --activity check Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x20ec,0x10ec} +s.listed_series={SET_ABYSS_SCRIPT,SET_ABYSS_ACTOR} function s.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x20ec)) + return not (re:IsSpellEffect() and re:GetHandler():IsSetCard(SET_ABYSS_SCRIPT)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.ctfilter(c) - return c:IsSpell() and c:IsSetCard(0x20ec) + return c:IsSpell() and c:IsSetCard(SET_ABYSS_SCRIPT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_GRAVE,0,nil) if ct<1 then return end @@ -64,5 +64,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c) - return not (c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM)) -end + return not (c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM)) +end \ No newline at end of file diff --git a/official/c46833854.lua b/official/c46833854.lua index 8d3d549c23..59c719ca6a 100644 --- a/official/c46833854.lua +++ b/official/c46833854.lua @@ -15,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.con(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=2 end function s.cfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and not c:IsPublic() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() @@ -32,7 +32,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -47,4 +47,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46848859.lua b/official/c46848859.lua index 7cc6d2bf8a..2700efda87 100644 --- a/official/c46848859.lua +++ b/official/c46848859.lua @@ -1,4 +1,5 @@ --ネイビィロイド +--Carrierroid local s,id=GetID() function s.initial_effect(c) --Negate @@ -33,7 +34,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46871387.lua b/official/c46871387.lua index 56089e403b..a163038c71 100644 --- a/official/c46871387.lua +++ b/official/c46871387.lua @@ -1,4 +1,5 @@ --No.55 ゴゴゴゴライアス +--Number 55: Gogogo Goliath local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,10 +27,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=55 -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_EARTH) and c:GetLevel()==4 and c:IsAbleToHand() end @@ -46,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c46874015.lua b/official/c46874015.lua index 724bbc5be4..7b6741b3cb 100644 --- a/official/c46874015.lua +++ b/official/c46874015.lua @@ -1,4 +1,5 @@ --六武衆推参! +--Return of the Six Samurai local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -33,11 +34,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46877100.lua b/official/c46877100.lua index 538392c821..ea220edfec 100644 --- a/official/c46877100.lua +++ b/official/c46877100.lua @@ -1,9 +1,9 @@ --- スケアクロー・アクロア --- Scareclaw Acro --- Scripted by Hatter +--スケアクロー・アクロア +--Scareclaw Acro +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon procedure + --Special Summon procedure local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetValue(s.hspval) c:RegisterEffect(e1) - -- Boost ATK + --Boost ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) diff --git a/official/c4688231.lua b/official/c4688231.lua index 3bb5c5c2f7..e5e7db740a 100644 --- a/official/c4688231.lua +++ b/official/c4688231.lua @@ -1,9 +1,10 @@ --メタルフォーゼ・ミスリエル +--Metalfoes Mithrilium local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe1),aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_METALFOES),aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) --return local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) @@ -25,10 +26,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xe1} -s.material_setcode=0xe1 +s.listed_series={SET_METALFOES} +s.material_setcode=SET_METALFOES function s.retfilter1(c) - return c:IsSetCard(0xe1) and c:IsAbleToDeck() + return c:IsSetCard(SET_METALFOES) and c:IsAbleToDeck() end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -44,7 +45,7 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) local g1=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) - if Duel.SendtoDeck(g1,nil,0,REASON_EFFECT)~=0 then + if Duel.SendtoDeck(g1,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then local og=Duel.GetOperatedGroup() if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local g2=g:Filter(Card.IsLocation,nil,LOCATION_ONFIELD) @@ -56,22 +57,22 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,e,tp) if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 then return false end - return c:IsSetCard(0xe1) and c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) + return c:IsSetCard(SET_METALFOES) and c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if loc==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,loc,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46895036.lua b/official/c46895036.lua index 7cb7300687..3810d9daec 100644 --- a/official/c46895036.lua +++ b/official/c46895036.lua @@ -1,4 +1,5 @@ --ゴーストリック・デュラハン +--Ghostrick Dullahan local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,8 +23,8 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -38,20 +39,13 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*200 end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -64,13 +58,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x8d) and c:IsAbleToHand() + return c:IsSetCard(SET_GHOSTRICK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -85,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c46897277.lua b/official/c46897277.lua index 6a73338f81..3e9dcd368a 100644 --- a/official/c46897277.lua +++ b/official/c46897277.lua @@ -21,13 +21,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(0,1) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c46898368.lua b/official/c46898368.lua index 2fc3650410..8301e747bd 100644 --- a/official/c46898368.lua +++ b/official/c46898368.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.counterfilter(c) return c:IsAttribute(ATTRIBUTE_FIRE) end @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -39,7 +39,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -68,4 +68,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Draw(p,tc:GetLink(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46910446.lua b/official/c46910446.lua index b255f4200a..499765cb78 100644 --- a/official/c46910446.lua +++ b/official/c46910446.lua @@ -1,4 +1,5 @@ --ヘル・アライアンス +--Chthonian Alliance local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -14,4 +15,4 @@ function s.filter(c,code) end function s.value(e,c) return Duel.GetMatchingGroupCount(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,c,c:GetCode())*800 -end +end \ No newline at end of file diff --git a/official/c46918794.lua b/official/c46918794.lua index aea387bf01..4e4cc5b90f 100644 --- a/official/c46918794.lua +++ b/official/c46918794.lua @@ -1,4 +1,5 @@ --火炎地獄 +--Tremendous Fire local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT,true) Duel.Damage(tp,500,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c46924949.lua b/official/c46924949.lua index 8b81e653d8..cfd6228ef2 100644 --- a/official/c46924949.lua +++ b/official/c46924949.lua @@ -1,5 +1,5 @@ --縄張恐竜 ---Beat Raptor +--Beatraptor --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c46925518.lua b/official/c46925518.lua index 830135182b..365c1fbce3 100644 --- a/official/c46925518.lua +++ b/official/c46925518.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e3:SetOperation(s.fdop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -36,7 +36,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -57,14 +57,14 @@ function s.fdop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.condition) e1:SetOperation(s.operation) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c) return c:IsFaceup() and c:IsCanTurnSet() end function s.spfilter(c,e,tp,lv) - return c:IsSetCard(0x8d) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GHOSTRICK) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) @@ -83,4 +83,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tg) end end -end +end \ No newline at end of file diff --git a/official/c46935289.lua b/official/c46935289.lua index 3beb336dff..abda30667b 100644 --- a/official/c46935289.lua +++ b/official/c46935289.lua @@ -37,14 +37,14 @@ function s.spcheck(g,lc,sumtype,tp) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + return re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.disfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.disfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.disfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c4694209.lua b/official/c4694209.lua index 94531eafad..6e2e594e92 100644 --- a/official/c4694209.lua +++ b/official/c4694209.lua @@ -67,9 +67,9 @@ function s.addc2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetTarget(s.reptg) e1:SetOperation(s.repop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -78,4 +78,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,0x1021,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c46947713.lua b/official/c46947713.lua index 2cbd00212a..03f0ad5fa6 100644 --- a/official/c46947713.lua +++ b/official/c46947713.lua @@ -46,7 +46,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) --lizard check @@ -70,7 +70,7 @@ function s.filter(c,e,tp,zone) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end @@ -80,7 +80,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc = Duel.GetFirstTarget() - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) end diff --git a/official/c46955770.lua b/official/c46955770.lua index 5a3361ae06..2401c0a924 100644 --- a/official/c46955770.lua +++ b/official/c46955770.lua @@ -1,4 +1,5 @@ --墓守の異端者 +--Gravekeeper's Heretic local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -16,4 +17,4 @@ function s.con(e) end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() -end +end \ No newline at end of file diff --git a/official/c46961802.lua b/official/c46961802.lua index b679dff0cf..a2bb9f1762 100644 --- a/official/c46961802.lua +++ b/official/c46961802.lua @@ -1,4 +1,5 @@ --クロス・アタック +--Cross Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,18 +34,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc1:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + tc2:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetOperation(s.atop) e3:SetLabelObject(tc2) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e3) local e4=e3:Clone() e4:SetLabelObject(tc1) @@ -56,7 +57,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetOwner()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) oc:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c46967601.lua b/official/c46967601.lua index 4f3833a677..f4feac4c1e 100644 --- a/official/c46967601.lua +++ b/official/c46967601.lua @@ -1,4 +1,5 @@ --呪いのお札 +--Cursed Bill local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -36,4 +37,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,g:GetFirst():GetTextDefense(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c46984349.lua b/official/c46984349.lua index 9b5e65ca46..efc3fb67e4 100644 --- a/official/c46984349.lua +++ b/official/c46984349.lua @@ -16,12 +16,12 @@ end function s.cfilter(c,tp) return c:IsMonster() and aux.SpElimFilter(c,true,true) and c:IsLevelAbove(1) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,0,c:GetLevel(),RACE_SPELLCASTER,ATTRIBUTE_LIGHT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,0,c:GetLevel(),RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() e:SetLabel(tc:GetLevel()) Duel.Remove(tc,POS_FACEUP,REASON_COST) end @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local lv=e:GetLabel() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) if Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) then c:AddMonsterAttributeComplete() @@ -42,8 +42,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c46999905.lua b/official/c46999905.lua index 4ea99d0699..3406b596a1 100644 --- a/official/c46999905.lua +++ b/official/c46999905.lua @@ -1,5 +1,5 @@ --絆醒師セームベル ---Saambell the Reuniter +--Saambell the Star Bonder --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -69,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47013502.lua b/official/c47013502.lua index b76148d33c..9497025bf9 100644 --- a/official/c47013502.lua +++ b/official/c47013502.lua @@ -23,9 +23,9 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(0,1) e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actlimit(e,te,tp) return te:GetHandler():IsType(TYPE_COUNTER) -end +end \ No newline at end of file diff --git a/official/c47017574.lua b/official/c47017574.lua index 068cc8d8bb..70cbce6853 100644 --- a/official/c47017574.lua +++ b/official/c47017574.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(s.discost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -56,10 +56,6 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,97403510) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end end @@ -71,19 +67,19 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c47021196.lua b/official/c47021196.lua index ee854f1694..09db2fa6b8 100644 --- a/official/c47021196.lua +++ b/official/c47021196.lua @@ -1,5 +1,5 @@ --U.A.プレイングマネージャー ---U.A. Playing Manager +--U.A. Player Manager --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -40,9 +40,9 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0xb2} +s.listed_series={SET_UA} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsSummonPlayer(tp) + return c:IsFaceup() and c:IsSetCard(SET_UA) and c:IsSummonPlayer(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -76,7 +76,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.disfilter(c) - return c:IsFaceup() and not c:IsSetCard(0xb2) + return c:IsFaceup() and not c:IsSetCard(SET_UA) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -88,12 +88,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c47025270.lua b/official/c47025270.lua index f7c821f317..ba9438d743 100644 --- a/official/c47025270.lua +++ b/official/c47025270.lua @@ -23,7 +23,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.BreakEffect() - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end end \ No newline at end of file diff --git a/official/c47027714.lua b/official/c47027714.lua index c1e679a8ce..1a03ad15f3 100644 --- a/official/c47027714.lua +++ b/official/c47027714.lua @@ -52,7 +52,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,#eg,0,0) end function s.rmfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove() + return c:IsSpecialSummoned() and c:IsAbleToRemove() end function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47030842.lua b/official/c47030842.lua index 2328e2ac09..c7302de5f0 100644 --- a/official/c47030842.lua +++ b/official/c47030842.lua @@ -1,4 +1,5 @@ --ギアギアクセル +--Geargiaccelerator local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) + return c:IsFaceup() and c:IsSetCard(SET_GEARGIA) end function s.spcon(e,c) if c==nil then return true end @@ -35,7 +36,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x72) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GEARGIA) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -50,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c47060347.lua b/official/c47060347.lua index 0267a67cf2..79d77a2788 100644 --- a/official/c47060347.lua +++ b/official/c47060347.lua @@ -46,4 +46,4 @@ function s.leave(e,tp,eg,ep,ev,re,r,rp) if e:GetLabelObject():GetLabel()==0 then Duel.Damage(e:GetHandler():GetPreviousControler(),3000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47075569.lua b/official/c47075569.lua index a231f45951..a38220a3d6 100644 --- a/official/c47075569.lua +++ b/official/c47075569.lua @@ -1,4 +1,5 @@ --EMペンデュラム・マジシャン +--Performapal Pendulum Sorcerer local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -22,16 +23,16 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} s.listed_names={id} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) and c:IsControler(tp) and c:IsPendulumSummoned() end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -42,12 +43,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.thfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsOnField() end @@ -77,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) -end +end \ No newline at end of file diff --git a/official/c47077697.lua b/official/c47077697.lua index 9c0b39b174..716aa643db 100644 --- a/official/c47077697.lua +++ b/official/c47077697.lua @@ -79,11 +79,11 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-atk) sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) sc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c47084486.lua b/official/c47084486.lua index 7d6a832b35..94d34d5b79 100644 --- a/official/c47084486.lua +++ b/official/c47084486.lua @@ -1,4 +1,5 @@ --虚無魔人 +--Vanity's Fiend local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -16,4 +17,4 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c4709881.lua b/official/c4709881.lua index c7c85f863f..e3b2c5c946 100644 --- a/official/c4709881.lua +++ b/official/c4709881.lua @@ -1,8 +1,9 @@ --星杯剣士アウラム +--Auram the World Chalice Blademaster local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfd),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WORLD_CHALICE),2,2) c:EnableReviveLimit() --atkup local e1=Effect.CreateEffect(c) @@ -36,15 +37,15 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xfe,0xfd} +s.listed_series={SET_WORLD_LEGACY,SET_WORLD_CHALICE} function s.atkfilter(c) - return c:IsMonster() and c:IsSetCard(0xfe) + return c:IsMonster() and c:IsSetCard(SET_WORLD_LEGACY) end function s.atkval(e,c) return Duel.GetMatchingGroup(s.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)*300 end function s.cfilter(c,g,tp,zone) - return c:IsSetCard(0xfd) and g:IsContains(c) + return c:IsSetCard(SET_WORLD_CHALICE) and g:IsContains(c) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0 end function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -78,7 +79,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xfd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_CHALICE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c47106439.lua b/official/c47106439.lua index 6601ff0568..df35caff5f 100644 --- a/official/c47106439.lua +++ b/official/c47106439.lua @@ -8,21 +8,16 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) --ritual level Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) end -s.listed_series={0x3a} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_GISHKI} function s.filter(c) - return c:IsSetCard(0x3a) and c:IsRitualMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GISHKI) and c:IsRitualMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -35,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c47111934.lua b/official/c47111934.lua index 90589c2c13..bb197a2724 100644 --- a/official/c47111934.lua +++ b/official/c47111934.lua @@ -1,4 +1,5 @@ --ワーム・ヤガン +--Worm Yagan local s,id=GetID() function s.initial_effect(c) --special summon @@ -44,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -64,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47120245.lua b/official/c47120245.lua index e35b92a4dd..ba0898a903 100644 --- a/official/c47120245.lua +++ b/official/c47120245.lua @@ -1,4 +1,5 @@ --聖騎士ボールス +--Noble Knight Borz local s,id=GetID() function s.initial_effect(c) --Normal monster @@ -39,25 +40,25 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x207a} +s.listed_series={SET_NOBLE_ARMS} function s.eqcon1(e) - return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) + return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.eqcon2(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) + return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return s.eqcon2(e) end function s.thfilter(c) - return c:IsSetCard(0x207a) and c:IsAbleToHand() + return c:IsSetCard(SET_NOBLE_ARMS) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,3,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,0x207a) + local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_DECK,0,nil,SET_NOBLE_ARMS) if #g>=3 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,3,3,nil) @@ -71,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47121070.lua b/official/c47121070.lua index 5d9f074080..ff2706ec5e 100644 --- a/official/c47121070.lua +++ b/official/c47121070.lua @@ -41,7 +41,7 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(tc,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) --You take no battle damage for the rest of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -53,4 +53,4 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end -end +end \ No newline at end of file diff --git a/official/c47126872.lua b/official/c47126872.lua index aaa136aa7b..a683d2dc48 100644 --- a/official/c47126872.lua +++ b/official/c47126872.lua @@ -1,4 +1,5 @@ --スペースタイムポリス +--Space-Time Police local s,id=GetID() function s.initial_effect(c) --remove @@ -37,7 +38,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then e:SetLabelObject(tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end @@ -64,4 +65,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) else Duel.SSet(tp,tc,1-tp) end -end +end \ No newline at end of file diff --git a/official/c47128571.lua b/official/c47128571.lua index 111c863753..b39b5b64b1 100644 --- a/official/c47128571.lua +++ b/official/c47128571.lua @@ -35,8 +35,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.BreakEffect() local turnp=Duel.GetTurnPlayer() - Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1,1) + Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) end end -end +end \ No newline at end of file diff --git a/official/c47132793.lua b/official/c47132793.lua index eef0a2950f..75a5bc57c4 100644 --- a/official/c47132793.lua +++ b/official/c47132793.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c47149093.lua b/official/c47149093.lua index 4a29289fb3..1a357c0e2e 100644 --- a/official/c47149093.lua +++ b/official/c47149093.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_SZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(_,c) return c:IsSetCard(0x1034) end) + e1:SetTarget(function(_,c) return c:IsSetCard(SET_CRYSTAL_BEAST) end) e1:SetValue(function(_,c) return c:GetBaseDefense() end) c:RegisterEffect(e1) --Special Summon 1 "Crystal Beast" monster from hand or Deck and halve damage @@ -32,9 +32,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.cbstfilter(c,tp) - return c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsSetCard(0x1034) and c:IsFaceup() + return c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsFaceup() and c:IsControler(tp) end function s.spcond(e,tp,eg,ep,ev,re,r,rp) @@ -46,12 +46,12 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(c,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) --Halve all damage @@ -62,16 +62,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Special Summon 1 "Crystal Beast" monster if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.damval(e,re,val,r,rp,rc) return math.floor(val/2) -end +end \ No newline at end of file diff --git a/official/c47150851.lua b/official/c47150851.lua index c88ac90d4a..60575ded41 100644 --- a/official/c47150851.lua +++ b/official/c47150851.lua @@ -1,4 +1,5 @@ --ガーディアン・グラール +--Guardian Grarl local s,id=GetID() function s.initial_effect(c) --sum limit @@ -36,4 +37,4 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==1 and Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c47158777.lua b/official/c47158777.lua index f6420bc449..0772ac93e6 100644 --- a/official/c47158777.lua +++ b/official/c47158777.lua @@ -1,10 +1,8 @@ --破壊剣士の守護絆竜 --Protector Whelp of the Destruction Swordsman --Logical Nonsense - --Substitute ID local s,id=GetID() - function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() @@ -28,7 +26,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DAMAGE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1,{id,1}) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.dmgcon) @@ -37,19 +35,18 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Related to "Destruction Sword" archetype -s.listed_series={0xd6,0xd7} - +s.listed_series={SET_DESTRUCTION_SWORD,SET_BUSTER_BLADER} --Check for "Destruction Sword" card to send to GY function s.tgfilter(c) - return c:IsSetCard(0xd6) and c:IsAbleToGrave() + return c:IsSetCard(SET_DESTRUCTION_SWORD) and c:IsAbleToGrave() end --Check for "Buster Blader" monster function s.filter(c,e,tp) - return c:IsSetCard(0xd7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BUSTER_BLADER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --If link summoned function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -72,11 +69,11 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end --If it's player's Battle Phase and opponent has no monsters function s.dmgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)==0 end --Check for "Buster Blader" monster that didn't attack function s.dmgfilter(c) - return c:GetAttackAnnouncedCount()==0 and c:IsFaceup() and c:IsSetCard(0xd7) + return c:GetAttackAnnouncedCount()==0 and c:IsFaceup() and c:IsSetCard(SET_BUSTER_BLADER) end --Activation legality function s.dmgtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c47163170.lua b/official/c47163170.lua index c11f8a139a..59ee541248 100644 --- a/official/c47163170.lua +++ b/official/c47163170.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --Link Summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14f),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TRI_BRIGADE),2,2) --Special Summon 1 banished Level 4 or lower Beast/Beast-Warrior/Winged Beast local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -30,10 +30,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x14f) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_TRI_BRIGADE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -84,9 +84,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x14f) -end + return not c:IsSetCard(SET_TRI_BRIGADE) +end \ No newline at end of file diff --git a/official/c47171541.lua b/official/c47171541.lua index fe141643c2..c90d122284 100644 --- a/official/c47171541.lua +++ b/official/c47171541.lua @@ -44,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47185546.lua b/official/c47185546.lua index 280d44b865..e7d798657c 100644 --- a/official/c47185546.lua +++ b/official/c47185546.lua @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c47195442.lua b/official/c47195442.lua index 21591c20e2..1145e50425 100644 --- a/official/c47195442.lua +++ b/official/c47195442.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c47198668.lua b/official/c47198668.lua index 0e0556ad87..6f7b91e7f4 100644 --- a/official/c47198668.lua +++ b/official/c47198668.lua @@ -1,6 +1,5 @@ --DDD死偉王ヘル・アーマゲドン --D/D/D Doom King Armageddon - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -35,10 +34,9 @@ function s.initial_effect(c) e3:SetValue(s.efilter) c:RegisterEffect(e3) end -s.listed_series={0xaf} - +s.listed_series={SET_DD} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xaf) + return c:IsFaceup() and c:IsSetCard(SET_DD) end function s.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter1(chkc) end @@ -55,14 +53,14 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.filter2(c,e,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsMonster() + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) - and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsCanBeEffectTarget(e) + and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and c:IsCanBeEffectTarget(e) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsDirectAttacked() end @@ -72,7 +70,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -90,12 +88,12 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.efilter(e,re,rp) - if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return false end + if not re:IsSpellTrapEffect() then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) return not g:IsContains(e:GetHandler()) diff --git a/official/c47217354.lua b/official/c47217354.lua index 27a384541a..f085670d52 100644 --- a/official/c47217354.lua +++ b/official/c47217354.lua @@ -1,4 +1,5 @@ --魔轟神レイヴン +--Fabled Raven local s,id=GetID() function s.initial_effect(c) --lv atk up @@ -18,19 +19,19 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local ct=Duel.DiscardHand(tp,aux.TRUE,1,60,REASON_EFFECT+REASON_DISCARD) + local ct=Duel.DiscardHand(tp,aux.TRUE,1,60,REASON_EFFECT|REASON_DISCARD) if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct*400) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e2:SetValue(ct) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c4722253.lua b/official/c4722253.lua index 9e0068b341..addb72711b 100644 --- a/official/c4722253.lua +++ b/official/c4722253.lua @@ -51,9 +51,9 @@ function s.cfilter2(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -69,4 +69,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47222536.lua b/official/c47222536.lua index d9ef216398..bd57d1050f 100644 --- a/official/c47222536.lua +++ b/official/c47222536.lua @@ -70,4 +70,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47228077.lua b/official/c47228077.lua index 0a295ed85a..836ba7a1d2 100644 --- a/official/c47228077.lua +++ b/official/c47228077.lua @@ -1,7 +1,8 @@ --ヴァイロン・ペンタクロ +--Vylon Pentachloro local s,id=GetID() function s.initial_effect(c) - aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x30),true,false) + aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_VYLON),true,false) --destroy local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) @@ -15,7 +16,7 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.descon(e,tp,eg,ep,ev,re,r,rp) return aux.IsUnionState(e) and e:GetHandler():GetEquipTarget()==eg:GetFirst() end @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47233801.lua b/official/c47233801.lua index fa46ae47c1..fe48aedace 100644 --- a/official/c47233801.lua +++ b/official/c47233801.lua @@ -1,4 +1,5 @@ --黒蛇病 +--Dark Snake Syndrome local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,14 +14,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,7 +32,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local dam=c:GetFlagEffectLabel(id) if dam==nil then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0,200) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0,200) dam=200 else dam=dam*2 @@ -40,4 +41,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,dam,REASON_EFFECT,true) Duel.Damage(1-tp,dam,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c47247413.lua b/official/c47247413.lua index 8546a6e1da..79b87dcdda 100644 --- a/official/c47247413.lua +++ b/official/c47247413.lua @@ -1,4 +1,5 @@ --差し戻し +--Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,5 +29,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) local rg=g:Select(1-tp,1,1,nil) Duel.ConfirmCards(tp,rg) - Duel.SendtoDeck(rg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c47264717.lua b/official/c47264717.lua index 7e6ff60e91..296ec090da 100644 --- a/official/c47264717.lua +++ b/official/c47264717.lua @@ -7,16 +7,16 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa3} +s.listed_series={SET_STARDUST} function s.cfilter(c) - return c:IsSetCard(0xa3) and c:IsFaceup() + return c:IsSetCard(SET_STARDUST) and c:IsFaceup() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) diff --git a/official/c47274077.lua b/official/c47274077.lua index 64abfca956..463dec0bdb 100644 --- a/official/c47274077.lua +++ b/official/c47274077.lua @@ -1,4 +1,5 @@ --ネオス・フォース +--Neos Force local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,CARD_NEOS)) @@ -58,5 +59,5 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c47292920.lua b/official/c47292920.lua index db65ba0c27..931991b7bc 100644 --- a/official/c47292920.lua +++ b/official/c47292920.lua @@ -34,13 +34,13 @@ function s.spfilter(c,e,tp) --pending rulings, cannot SS Normal Pendulums with a die roll Pendulum Effect end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c47295267.lua b/official/c47295267.lua index b21f63bead..debe6e7dee 100644 --- a/official/c47295267.lua +++ b/official/c47295267.lua @@ -1,4 +1,5 @@ --サイバネティック・ゾーン +--Cybernetic Zone local s,id=GetID() function s.initial_effect(c) --remove @@ -23,11 +24,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -41,22 +42,22 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetOwner()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) tc:RegisterEffect(e2) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsRace(RACE_MACHINE) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsRace(RACE_MACHINE) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4729591.lua b/official/c4729591.lua index 6eae770389..6984e153da 100644 --- a/official/c4729591.lua +++ b/official/c4729591.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14a),1) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_APPLIANCER),1) --cannot be Link Material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) e2:SetLabel(1) @@ -35,21 +35,17 @@ function s.initial_effect(c) e3:SetLabel(0) c:RegisterEffect(e3) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} s.listed_names={id} function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetMutualLinkedGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp,colinked) - return c:IsSetCard(0x14a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) + return c:IsSetCard(SET_APPLIANCER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) and ((c:IsType(TYPE_LINK) and colinked) or (c:IsLevelBelow(4) and not colinked)) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -66,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4731783.lua b/official/c4731783.lua index 8916ad7ba9..9f591a2b5d 100644 --- a/official/c4731783.lua +++ b/official/c4731783.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c4732017.lua b/official/c4732017.lua index ecc7e69551..34ea89ae07 100644 --- a/official/c4732017.lua +++ b/official/c4732017.lua @@ -1,4 +1,5 @@ --灼熱ゾンビ +--Molten Zombie local s,id=GetID() function s.initial_effect(c) --draw @@ -25,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47325505.lua b/official/c47325505.lua index fd659f5a7d..b07dbd8399 100644 --- a/official/c47325505.lua +++ b/official/c47325505.lua @@ -1,4 +1,5 @@ --化石調査 +--Fossil Dig local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c47346782.lua b/official/c47346782.lua index d63912b6c2..241177a314 100644 --- a/official/c47346782.lua +++ b/official/c47346782.lua @@ -1,5 +1,5 @@ --寝ガエル ---Othello Frog +--Centerfrog local s,id=GetID() function s.initial_effect(c) --Cannot be material @@ -87,4 +87,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) Duel.GetControl(g2,tp) end end -end +end \ No newline at end of file diff --git a/official/c47346845.lua b/official/c47346845.lua index 66dceda385..a5d8712a9b 100644 --- a/official/c47346845.lua +++ b/official/c47346845.lua @@ -1,4 +1,5 @@ --電池メン-単四型 +--Batteryman AAA local s,id=GetID() function s.initial_effect(c) --special summon @@ -21,14 +22,14 @@ function s.filter(c,e,tp) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c473469.lua b/official/c473469.lua index 6c9145d5b1..985edb7cc3 100644 --- a/official/c473469.lua +++ b/official/c473469.lua @@ -15,13 +15,13 @@ function s.initial_effect(c) end function s.filter(c,tp) return c:IsTrap() and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) - and (c:GetReason()&0x41)==0x41 + and (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and eg:IsExists(s.filter,1,nil,tp) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) and chkc~=e:GetHandler() end @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47349116.lua b/official/c47349116.lua index f398db5e23..4d687875dd 100644 --- a/official/c47349116.lua +++ b/official/c47349116.lua @@ -1,4 +1,5 @@ --星刻の魔術師 +--Timestar Magician local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.thcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,34 +33,30 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.matfilter(c,xyz,sumtype,tp) - return c:IsSetCard(0x98,xyz,sumtype,tp) and c:IsType(TYPE_PENDULUM,xyz,sumtype,tp) + return c:IsSetCard(SET_MAGICIAN,xyz,sumtype,tp) and c:IsType(TYPE_PENDULUM,xyz,sumtype,tp) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or ((st&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_EXTRA) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_EXTRA,0,1,1,nil) local tc=g:GetFirst() if not tc then return end Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_PZONE) - and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE|LOCATION_PZONE) + and c:IsType(TYPE_PENDULUM) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.tgfilter(c) @@ -78,4 +75,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c47349310.lua b/official/c47349310.lua index 142c0c40fb..718be0dddd 100644 --- a/official/c47349310.lua +++ b/official/c47349310.lua @@ -1,4 +1,5 @@ --スカイオニヒトクイエイ +--Skystarray local s,id=GetID() function s.initial_effect(c) --reg @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_REMOVE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetCountLimit(1) e3:SetCondition(s.rmcon) e3:SetTarget(s.rmtg) @@ -28,7 +29,7 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetAttackTarget() then return end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -40,21 +41,21 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end + if Duel.Remove(c,0,REASON_EFFECT|REASON_TEMPORARY)==0 then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabelObject(c) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) Duel.RegisterEffect(e1,tp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c47355498.lua b/official/c47355498.lua index d47474abbc..4ed8466611 100644 --- a/official/c47355498.lua +++ b/official/c47355498.lua @@ -117,4 +117,4 @@ function s.cannotsptg(e,c,sp,sumtype,sumpos,target_p,sumeff) return c:IsLocation(LOCATION_GRAVE) and sumeff and not sumeff:IsActivated() and not sumeff:IsHasProperty(EFFECT_FLAG_CANNOT_DISABLE) and not Duel.IsPlayerAffectedByEffect(c:GetControler(),EFFECT_NECRO_VALLEY_IM) and not c:IsHasEffect(EFFECT_NECRO_VALLEY_IM) and not sumeff:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY_IM) -end +end \ No newline at end of file diff --git a/official/c47360060.lua b/official/c47360060.lua index 565918f8d7..c1d0117f5d 100644 --- a/official/c47360060.lua +++ b/official/c47360060.lua @@ -1,4 +1,5 @@ --反射の聖刻印 +--Hieratic Seal of Reflection local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.cfilter(c) - return c:IsSetCard(0x69) and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_HIERATIC) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47363932.lua b/official/c47363932.lua index 3e1731f60a..f11c9f0805 100644 --- a/official/c47363932.lua +++ b/official/c47363932.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x24,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_SCRAP,lc,sumtype,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SCRAP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -63,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(0x24) and c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) + return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(SET_SCRAP) and c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -89,4 +89,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(d,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c47387961.lua b/official/c47387961.lua index 9cf4dd8ed4..a5be42cb0f 100644 --- a/official/c47387961.lua +++ b/official/c47387961.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x76),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERALDIC_BEAST),4,2) c:EnableReviveLimit() --attack up local e1=Effect.CreateEffect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} s.xyz_number=8 function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) @@ -38,28 +38,28 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetValue(tc:GetAttack()) c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_DISABLE_EFFECT) - e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e5:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e5) end -end +end \ No newline at end of file diff --git a/official/c47393199.lua b/official/c47393199.lua index a35db58f8f..2bd8a7c52f 100644 --- a/official/c47393199.lua +++ b/official/c47393199.lua @@ -1,5 +1,5 @@ --崩界の守護竜 ---Guardragon of Corruption +--Guardragon Cataclysm --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -57,5 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c47395382.lua b/official/c47395382.lua index f8c6b6334a..8ff4a9a20a 100644 --- a/official/c47395382.lua +++ b/official/c47395382.lua @@ -1,8 +1,9 @@ --魔轟神レイジオン +--Fabled Ragin local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x35),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FABLED),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --draw local e1=Effect.CreateEffect(c) @@ -16,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.con(e,tp,eg,ep,ev,re,r,rp,chk) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -35,4 +36,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local h=Duel.GetFieldGroupCount(p,LOCATION_HAND,0) if h>=2 then return end Duel.Draw(p,2-h,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4740489.lua b/official/c4740489.lua index eb2e117b1f..870448c29a 100644 --- a/official/c4740489.lua +++ b/official/c4740489.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0x2066} +s.listed_series={SET_MAGNET_WARRIOR} function s.cfilter(c) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_ROCK) and c:IsAttribute(ATTRIBUTE_EARTH) end @@ -38,7 +38,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2066) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -77,4 +77,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToBattle() then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47408488.lua b/official/c47408488.lua index a72ef11caa..493df4cd30 100644 --- a/official/c47408488.lua +++ b/official/c47408488.lua @@ -30,16 +30,16 @@ function s.initial_effect(c) e4:SetOperation(s.plop) c:RegisterEffect(e4) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} s.counter_place_list={0x6} function s.ctfilter(c) - return c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsSetCard(0x1034) and c:IsFaceup() + return c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsFaceup() and c:IsOriginalType(TYPE_MONSTER) end function s.ctcon1(e,tp,eg,ep,ev,re,r,rp) if not eg:IsExists(s.ctfilter,1,nil) then return end if Duel.GetCurrentChain()>0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) return false end return true @@ -63,7 +63,7 @@ function s.plcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(c,REASON_COST) end function s.plfilter(c) - return c:IsSetCard(0x1034) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsMonster() and not c:IsForbidden() end function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetHandler():GetCounter(0x6) @@ -84,8 +84,8 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c47415292.lua b/official/c47415292.lua index 4c6affd211..6747ad6a9d 100644 --- a/official/c47415292.lua +++ b/official/c47415292.lua @@ -1,4 +1,5 @@ --漆黒の闘龍 +--Pitch-Dark Dragon local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,11321183),true) @@ -19,4 +20,4 @@ function s.initial_effect(c) e5:SetCondition(aux.IsUnionState) c:RegisterEffect(e5) end -s.listed_names={11321183} +s.listed_names={11321183} \ No newline at end of file diff --git a/official/c47421985.lua b/official/c47421985.lua index 78b49d995c..321a348ddf 100644 --- a/official/c47421985.lua +++ b/official/c47421985.lua @@ -25,7 +25,7 @@ function s.reccon(e,tp,eg,ep,ev,re,r,rp) if ev==1 then t=Duel.GetAttacker() end if not c:IsRelateToBattle() or c:IsFacedown() then return false end e:SetLabel(t:GetAttack()) - return t:GetLocation()==LOCATION_GRAVE and t:IsMonster() + return t:IsLocation(LOCATION_GRAVE) and t:IsMonster() end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +36,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47432275.lua b/official/c47432275.lua index 2aca8ee394..0aaddc0852 100644 --- a/official/c47432275.lua +++ b/official/c47432275.lua @@ -32,9 +32,9 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47435107.lua b/official/c47435107.lua index 73a21b2dfa..c39128850b 100644 --- a/official/c47435107.lua +++ b/official/c47435107.lua @@ -1,4 +1,5 @@ --原初の叫喚 +--Primal Cry local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,10441498) @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp,turn) return c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetTurnID()==turn @@ -37,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47436247.lua b/official/c47436247.lua index c0c68fb85f..a64acf621b 100644 --- a/official/c47436247.lua +++ b/official/c47436247.lua @@ -2,7 +2,7 @@ --Shien's Dojo local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x3) + c:EnableCounterPermit(COUNTER_BUSHIDO) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -29,29 +29,29 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x3d,0x20} -s.counter_place_list={0x3} +s.listed_series={SET_SIX_SAMURAI,SET_SHIEN} +s.counter_place_list={COUNTER_BUSHIDO} function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3,1) + e:GetHandler():AddCounter(COUNTER_BUSHIDO,1) end end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - local ct=e:GetHandler():GetCounter(0x3) + local ct=e:GetHandler():GetCounter(COUNTER_BUSHIDO) e:SetLabel(ct) Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function s.filter(c,ct,e,tp) - return c:IsLevelBelow(ct) and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) + return c:IsLevelBelow(ct) and (c:IsSetCard(SET_SIX_SAMURAI) or c:IsSetCard(SET_SHIEN)) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x3),e,tp) end + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(COUNTER_BUSHIDO),e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47439573.lua b/official/c47439573.lua index 8cbefeef91..5d89ca174e 100644 --- a/official/c47439573.lua +++ b/official/c47439573.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_GRAVE) + return c:IsControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_GRAVE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,1-tp) @@ -41,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c47453433.lua b/official/c47453433.lua index 6ea59b41de..0657a7c2ef 100644 --- a/official/c47453433.lua +++ b/official/c47453433.lua @@ -1,4 +1,5 @@ --振り出し +--Back to Square One local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,10 +15,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToDeck() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -26,6 +27,6 @@ end function s.activate(e) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47457347.lua b/official/c47457347.lua index ff36f0da7b..b3900abcd2 100644 --- a/official/c47457347.lua +++ b/official/c47457347.lua @@ -1,4 +1,5 @@ --魔法名-「大いなる獣」 +--Omega Summon local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xf4} +s.listed_series={SET_INVOKED} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xf4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_INVOKED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -47,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c47474172.lua b/official/c47474172.lua index bc2b0125f3..30e5ec4f75 100644 --- a/official/c47474172.lua +++ b/official/c47474172.lua @@ -1,5 +1,5 @@ --魔筒覗ベイオネーター ---Bayoneter the Magical Scope +--Bayonater, the Baneful Barrel --scripted by Logical Nonsense --Substitute ID local s,id=GetID() @@ -33,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c47475363.lua b/official/c47475363.lua index e670d30f05..bb5235b936 100644 --- a/official/c47475363.lua +++ b/official/c47475363.lua @@ -28,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47480070.lua b/official/c47480070.lua index 09a703ec5a..b7b0950322 100644 --- a/official/c47480070.lua +++ b/official/c47480070.lua @@ -1,4 +1,5 @@ --アマゾネスの聖戦士 +--Amazoness Paladin local s,id=GetID() function s.initial_effect(c) --atkup @@ -10,10 +11,10 @@ function s.initial_effect(c) e1:SetValue(s.val) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.val(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_MZONE,0,nil)*100 end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) -end + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) +end \ No newline at end of file diff --git a/official/c47482043.lua b/official/c47482043.lua index 15da44b8b8..f8d51db2ab 100644 --- a/official/c47482043.lua +++ b/official/c47482043.lua @@ -23,12 +23,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ANCIENT_GEAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -46,8 +46,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c47504322.lua b/official/c47504322.lua index 5191a43507..12477cc506 100644 --- a/official/c47504322.lua +++ b/official/c47504322.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.PayLP(800)) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Special Summon 1 "War Rock" from hand or Deck @@ -28,15 +28,11 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc0,bc1=Duel.GetBattleMonster(tp) return bc0 and bc1 and bc0:IsAttribute(ATTRIBUTE_EARTH) and bc0:IsRace(RACE_WARRIOR) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetBattleMonster(tp) if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then @@ -46,7 +42,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -56,17 +52,17 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x161) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WAR_ROCK) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #sg==0 then return end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end \ No newline at end of file diff --git a/official/c47506081.lua b/official/c47506081.lua index c01f1cfa39..4b6b694460 100644 --- a/official/c47506081.lua +++ b/official/c47506081.lua @@ -1,4 +1,5 @@ --グレンザウルス +--Grenosaurus local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCondition(s.damcon) - e1:SetCost(s.damcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -21,10 +22,6 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -34,4 +31,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47507260.lua b/official/c47507260.lua index ec4b33142f..50a6cbbdcf 100644 --- a/official/c47507260.lua +++ b/official/c47507260.lua @@ -27,16 +27,16 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_names={74591968} s.LVnum=2 -s.LVset=0x5f +s.LVset=SET_MYSTIC_SWORDSMAN function s.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() @@ -55,24 +55,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(74591968) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c47529357.lua b/official/c47529357.lua index 432fa56ad4..bb27d35500 100644 --- a/official/c47529357.lua +++ b/official/c47529357.lua @@ -1,4 +1,5 @@ --ミスト・ボディ +--Mist Body local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -8,4 +9,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c47556396.lua b/official/c47556396.lua index c6625a7e12..c6bf212898 100644 --- a/official/c47556396.lua +++ b/official/c47556396.lua @@ -1,4 +1,5 @@ --Subterror Behemoth Speleogeist +--Subterror Behemoth Speleogeist local s,id=GetID() function s.initial_effect(c) --flip @@ -52,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -77,7 +78,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -85,4 +86,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c47558785.lua b/official/c47558785.lua index f486d338d2..f670c8d561 100644 --- a/official/c47558785.lua +++ b/official/c47558785.lua @@ -29,9 +29,9 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(-sch) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c4756629.lua b/official/c4756629.lua index 2a2d83af1e..d12ef7f00a 100644 --- a/official/c4756629.lua +++ b/official/c4756629.lua @@ -32,18 +32,18 @@ function s.initial_effect(c) e3:SetOperation(s.decop) c:RegisterEffect(e3) end -s.listed_series={0xa} +s.listed_series={SET_LSWARM} function s.rmfilter(c,tp) - return c:IsSetCard(0xa) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LSWARM) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,c) end function s.filter(c) - return c:IsSetCard(0xa) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_LSWARM) and c:IsMonster() and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -61,14 +61,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end if c:IsRelateToEffect(e) and c:IsFaceup() then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.sumfilter(c) - return c:IsSetCard(0xa) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_LSWARM) and c:IsSummonable(true,nil) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end @@ -93,7 +93,7 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.econ) e1:SetCountLimit(1) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -101,13 +101,13 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetTargetRange(1,0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.econ(e) return #{Duel.GetPlayerEffect(e:GetHandlerPlayer(),id)}~=0 end function s.rfilter(e,c) - return c:IsSetCard(0xa) -end + return c:IsSetCard(SET_LSWARM) +end \ No newline at end of file diff --git a/official/c47579719.lua b/official/c47579719.lua index f0a22c42ef..2e09e5dff3 100644 --- a/official/c47579719.lua +++ b/official/c47579719.lua @@ -1,4 +1,5 @@ --セイクリッド・ヒアデス +--Constellar Hyades local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition() end @@ -29,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c47594192.lua b/official/c47594192.lua index a7640cea24..8313ec960e 100644 --- a/official/c47594192.lua +++ b/official/c47594192.lua @@ -1,4 +1,5 @@ --スリーカード +--Three of a Kind local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47596607.lua b/official/c47596607.lua index 69c92045db..f99246b05b 100644 --- a/official/c47596607.lua +++ b/official/c47596607.lua @@ -1,4 +1,5 @@ --摩天楼2-ヒーローシティ +--Skyscraper 2 - Hero City local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,9 +19,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c,e,tp) - return c:IsSetCard(0x3008) and (c:GetReason()&REASON_BATTLE)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and (c:GetReason()&REASON_BATTLE)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47598941.lua b/official/c47598941.lua index 2e8c5dd397..2841281544 100644 --- a/official/c47598941.lua +++ b/official/c47598941.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --place a card in the pendulum zone local e2=Effect.CreateEffect(c) @@ -36,10 +36,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e4) end -s.listed_series={0xe0} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_AMORPHAGE} function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_PZONE) and c:IsPreviousControler(tp) end @@ -47,7 +44,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c) - return c:IsSetCard(0xe0) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return c:IsSetCard(SET_AMORPHAGE) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.settg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) @@ -65,8 +62,8 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.atktg(e,c) - return not c:IsSetCard(0xe0) + return not c:IsSetCard(SET_AMORPHAGE) end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0xe0),0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*-100 -end + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*-100 +end \ No newline at end of file diff --git a/official/c47606319.lua b/official/c47606319.lua index ffeb741cf9..6744a300eb 100644 --- a/official/c47606319.lua +++ b/official/c47606319.lua @@ -31,14 +31,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -57,7 +57,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -67,4 +67,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47611119.lua b/official/c47611119.lua index 14b2ee3128..1683643be3 100644 --- a/official/c47611119.lua +++ b/official/c47611119.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) c:SetSPSummonOnce(id) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,99645428,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047)) + Fusion.AddProcMix(c,false,false,99645428,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT)) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -24,19 +24,19 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.filter(c) - return c:IsSetCard(0x1047) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsMonster() and c:IsAbleToGrave() end function s.ctfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetTargetPlayer(1-tp) @@ -44,7 +44,7 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) @@ -54,4 +54,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,ct*500,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c47658964.lua b/official/c47658964.lua index 5c33589c93..7ae205e10c 100644 --- a/official/c47658964.lua +++ b/official/c47658964.lua @@ -13,15 +13,15 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={47658965} -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g - if Duel.IsPlayerAffectedByEffect(tp,69832741) then + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,5,nil) else g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,Duel.GetLocationCount(tp,LOCATION_MZONE),nil) @@ -30,17 +30,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.IsPlayerAffectedByEffect(tp,69832741)) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x39,TYPES_TOKEN,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE) end + if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION)) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_LAVAL,TYPES_TOKEN,0,0,1,RACE_PYRO,ATTRIBUTE_FIRE) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,e:GetLabel(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if ft0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -52,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) end end -end +end \ No newline at end of file diff --git a/official/c47664723.lua b/official/c47664723.lua index 7721baa2d9..77755eb9d5 100644 --- a/official/c47664723.lua +++ b/official/c47664723.lua @@ -1,4 +1,5 @@ --堕天使エデ・アーラエ +--Darklord Edeh Arae local s,id=GetID() function s.initial_effect(c) --spsum success @@ -13,6 +14,6 @@ function s.gete(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e:GetHandler():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c47674738.lua b/official/c47674738.lua index 4548a9ca0b..4120a4e1cb 100644 --- a/official/c47674738.lua +++ b/official/c47674738.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.thfilter(c) - return c:IsSetCard(0x140) and c:IsAbleToHand() + return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end @@ -59,7 +59,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE) end function s.spfilter(c,e,tp) return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) @@ -77,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47679935.lua b/official/c47679935.lua index 7c49db7a8d..3d8eec403f 100644 --- a/official/c47679935.lua +++ b/official/c47679935.lua @@ -1,4 +1,5 @@ --暴走魔法陣 +--Magical Meltdown local s,id=GetID() function s.initial_effect(c) --Activate @@ -51,7 +52,7 @@ function s.efilter(e,ct) return p==tp and te:IsHasCategory(CATEGORY_FUSION_SUMMON) end function s.limfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsSummonPlayer(tp) and c:IsFusionSummoned() end function s.limcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.limfilter,1,nil,tp) @@ -60,7 +61,7 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentChain()==0 then Duel.SetChainLimitTillChainEnd(s.chainlm) elseif Duel.GetCurrentChain()==1 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) @@ -84,4 +85,4 @@ function s.limop2(e,tp,eg,ep,ev,re,r,rp) end function s.chainlm(e,rp,tp) return tp==rp -end +end \ No newline at end of file diff --git a/official/c47687766.lua b/official/c47687766.lua index b18cbe612b..a453486adc 100644 --- a/official/c47687766.lua +++ b/official/c47687766.lua @@ -32,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) @@ -40,10 +40,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c) return c:GetRace()~=RACE_MACHINE -end +end \ No newline at end of file diff --git a/official/c47693640.lua b/official/c47693640.lua index ad73cac32f..e586d12f5d 100644 --- a/official/c47693640.lua +++ b/official/c47693640.lua @@ -1,4 +1,5 @@ --ゾンビタイガー +--Zombie Tiger local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,10209545),true) @@ -40,5 +41,5 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c47699948.lua b/official/c47699948.lua index e4c87bf87b..a50730efb2 100644 --- a/official/c47699948.lua +++ b/official/c47699948.lua @@ -31,10 +31,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1017} +s.listed_series={SET_SYNCHRON} --To GY + Firewall Lite function s.cfilter(c,e,tp,ft) - if not (c:IsSetCard(0x1017) and c:IsMonster() and c:IsAbleToGraveAsCost()) then return false end + if not (c:IsSetCard(SET_SYNCHRON) and c:IsMonster() and c:IsAbleToGraveAsCost()) then return false end if not c:IsLocation(LOCATION_MZONE) then return ft>0 and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,c,e,0,tp,false,false) else @@ -43,9 +43,9 @@ function s.cfilter(c,e,tp,ft) end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp,ft) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e,tp,ft) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,e,tp,ft) Duel.SendtoGrave(g,REASON_COST) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -63,13 +63,13 @@ end --Pop + Special Summon function s.filter(c,e,tp,ft) if not c:IsLocation(LOCATION_MZONE) then - return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp) + return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp) else - return ft>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp) + return ft>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp) end end function s.spfilter(c,code,e,tp) - return c:IsSetCard(0x1017) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsOriginalCode(code) + return c:IsSetCard(SET_SYNCHRON) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsOriginalCode(code) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c,ft=e:GetHandler(),Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -78,7 +78,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_ONFIELD,0,1,1,c,e,tp,ft) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,LOCATION_ONFIELD) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -86,9 +86,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tc:GetCode(),e,tp) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,tc:GetCode(),e,tp) if #sc>0 then Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c47705572.lua b/official/c47705572.lua index 6d3117fcc2..f5c48f33a2 100644 --- a/official/c47705572.lua +++ b/official/c47705572.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.splimit) c:RegisterEffect(e1) --Fusion summon - local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0xdf),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove), + local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_LUNALIGHT),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove), extrafil=s.fextra,extraop=Fusion.BanishMaterial,extratg=s.extratarget} local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -33,20 +33,20 @@ function s.initial_effect(c) e3:SetTarget(s.ptg) c:RegisterEffect(e3) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return not (c:IsSetCard(0xdf) and c:IsMonster()) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not (c:IsSetCard(SET_LUNALIGHT) and c:IsMonster()) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE) end function s.ptg(e,c) - return c:IsSetCard(0xdf) and c:IsMonster() + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() end \ No newline at end of file diff --git a/official/c47710198.lua b/official/c47710198.lua index d75b184344..9b8c8d5e9e 100644 --- a/official/c47710198.lua +++ b/official/c47710198.lua @@ -123,4 +123,4 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp) if Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)>0 then Duel.Damage(1-tp,1200,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47728740.lua b/official/c47728740.lua index 4d58074aa9..4a3eb2982c 100644 --- a/official/c47728740.lua +++ b/official/c47728740.lua @@ -33,15 +33,15 @@ function s.initial_effect(c) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.sscon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) end function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -61,18 +61,18 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c47731128.lua b/official/c47731128.lua index 1396f403ec..618026c9e7 100644 --- a/official/c47731128.lua +++ b/official/c47731128.lua @@ -1,4 +1,5 @@ --結界術師 メイコウ +--Mei-Kou, Master of Barriers local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,18 +9,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) - local tpe=c:GetType() - return c:IsFaceup() and (tpe==0x20002 or tpe==0x20004) + return c:IsFaceup() and c:IsContinuousSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -33,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47737087.lua b/official/c47737087.lua index f2626425b4..5186cf2536 100644 --- a/official/c47737087.lua +++ b/official/c47737087.lua @@ -1,4 +1,5 @@ --E・HERO ランパートガンナー +--Elemental HERO Rampart Blaster local s,id=GetID() function s.initial_effect(c) --fusion material @@ -37,7 +38,7 @@ function s.initial_effect(c) e5:SetValue(s.atkval) c:RegisterEffect(e5) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.dacon(e) return e:GetHandler():IsDefensePos() end @@ -48,4 +49,4 @@ function s.atkcon(e) end function s.atkval(e,c) return c:GetAttack()/2 -end +end \ No newline at end of file diff --git a/official/c47754278.lua b/official/c47754278.lua index 7288bdb215..dd94296fb3 100644 --- a/official/c47754278.lua +++ b/official/c47754278.lua @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47759571.lua b/official/c47759571.lua index e073985e36..bd5f9a2038 100644 --- a/official/c47759571.lua +++ b/official/c47759571.lua @@ -73,7 +73,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) then + if c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) diff --git a/official/c47766694.lua b/official/c47766694.lua index f43155227c..c85d843277 100644 --- a/official/c47766694.lua +++ b/official/c47766694.lua @@ -1,4 +1,5 @@ --荒野の大竜巻 +--Wild Tornado local s,id=GetID() function s.initial_effect(c) --Activate @@ -62,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c47778083.lua b/official/c47778083.lua index 0b1a23e89c..232b9a5e4a 100644 --- a/official/c47778083.lua +++ b/official/c47778083.lua @@ -1,5 +1,5 @@ --ボーン・テンプル・ブロック ---Thunder King, the Lightningstrike Kaiju +--Bone Temple Block local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +12,6 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.counter_list={0x37} function s.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -36,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetLabelObject(sc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end local sc=e:GetLabelObject() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local oc=g:GetFirst() @@ -50,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount()) sc:RegisterEffect(e1,true) @@ -64,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount()) oc:RegisterEffect(e1,true) diff --git a/official/c47795344.lua b/official/c47795344.lua index b34ddd6e9e..d7eca04f61 100644 --- a/official/c47795344.lua +++ b/official/c47795344.lua @@ -1,4 +1,5 @@ --ナチュル・ハイドランジー +--Naturia Hydrangea local s,id=GetID() function s.initial_effect(c) --special summon @@ -11,9 +12,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.chainfilter(re,tp,cid) - return not (re:GetHandler():IsSetCard(0x2a) and re:IsActiveType(TYPE_MONSTER) + return not (re:GetHandler():IsSetCard(SET_NATURIA) and re:IsMonsterEffect() and Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE) end function s.spcon(e,c) @@ -21,4 +22,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c4779823.lua b/official/c4779823.lua index d62e7671f0..6f4291f4b7 100644 --- a/official/c4779823.lua +++ b/official/c4779823.lua @@ -1,4 +1,5 @@ --ライトロード・アーク ミカエル +--Michael, the Arch-Lightsworn local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) @@ -39,11 +40,7 @@ function s.initial_effect(c) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.listed_series={0x38} -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end +s.listed_series={SET_LIGHTSWORN} function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -58,7 +55,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x38) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() and c:IsAbleToDeck() end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -84,4 +81,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47805931.lua b/official/c47805931.lua index c7c1cde0fc..d179255d11 100644 --- a/official/c47805931.lua +++ b/official/c47805931.lua @@ -1,4 +1,5 @@ --No.20 蟻岩土ブリリアント +--Number 20: Giga-Brilliant local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=20 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() @@ -29,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c47810543.lua b/official/c47810543.lua index 1681a03002..11b4903a66 100644 --- a/official/c47810543.lua +++ b/official/c47810543.lua @@ -22,12 +22,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x108} +s.listed_series={SET_MAGICAL_MUSKET} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x108) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGICAL_MUSKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,12 +48,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_SZONE) e1:SetLabel(nseq+16) e1:SetOperation(s.disop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end end function s.disop(e,tp) return 0x1<=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return e:GetHandler():IsType(TYPE_EQUIP) and Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() end function s.mtcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -94,7 +92,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) ec:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c47826112.lua b/official/c47826112.lua index 6401de61b2..287cf0e019 100644 --- a/official/c47826112.lua +++ b/official/c47826112.lua @@ -1,4 +1,5 @@ --海皇龍 ポセイドラ +--Poseidra, the Atlantean Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -63,8 +64,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c47829960.lua b/official/c47829960.lua index 5fba6fdcbd..eed6cc8e41 100644 --- a/official/c47829960.lua +++ b/official/c47829960.lua @@ -33,7 +33,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c47840168.lua b/official/c47840168.lua index 96933f1fd4..96ef1ab182 100644 --- a/official/c47840168.lua +++ b/official/c47840168.lua @@ -1,7 +1,6 @@ --レフトハンド・シャーク ---Left Hand Shark +--Left-Hand Shark --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -38,7 +37,6 @@ function s.initial_effect(c) end --Specifically lists "Right Hand Shark" s.listed_names={11845050} - --Check for "Right Hand Shark" function s.spfilter(c) return c:IsFaceup() and c:IsCode(11845050) @@ -65,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end @@ -85,7 +83,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) c:RegisterEffect(e1) @@ -109,6 +107,6 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) end \ No newline at end of file diff --git a/official/c47852924.lua b/official/c47852924.lua index 547cff157b..04a1916768 100644 --- a/official/c47852924.lua +++ b/official/c47852924.lua @@ -1,4 +1,5 @@ --天使の生き血 +--Soul of the Pure local s,id=GetID() function s.initial_effect(c) --recover @@ -20,4 +21,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c47852925.lua b/official/c47852925.lua deleted file mode 100644 index e7c1129ef7..0000000000 --- a/official/c47852925.lua +++ /dev/null @@ -1 +0,0 @@ ---天使の生き血 local s,id=GetID() function s.initial_effect(c) --recover local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_RECOVER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800) end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c4786063.lua b/official/c4786063.lua index 31473d3710..a37bbb6a93 100644 --- a/official/c4786063.lua +++ b/official/c4786063.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e2:SetCost(s.defcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.deftg) e2:SetOperation(s.defop) c:RegisterEffect(e2) @@ -62,11 +62,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(c,REASON_RULE) end end -function s.defcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.deffilter(c) return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end @@ -97,4 +92,4 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c47863787.lua b/official/c47863787.lua index aa2b59fe6e..2d4a7fd7ac 100644 --- a/official/c47863787.lua +++ b/official/c47863787.lua @@ -1,4 +1,5 @@ --アーティファクト-ラブリュス +--Artifact Labrys local s,id=GetID() function s.initial_effect(c) --set @@ -29,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) @@ -45,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0x97) and c:IsReason(REASON_DESTROY) + return c:IsControler(tp) and c:IsSetCard(SET_ARTIFACT) and c:IsReason(REASON_DESTROY) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -54,4 +55,4 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end +end \ No newline at end of file diff --git a/official/c47870325.lua b/official/c47870325.lua index f9dedc1473..24cd8d94db 100644 --- a/official/c47870325.lua +++ b/official/c47870325.lua @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)>0 then local og=Duel.GetOperatedGroup() for tc in og:Iter() do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end @@ -68,7 +68,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=tg:GetFirst() if tc:IsDiscardable(REASON_EFFECT) and Duel.SelectYesNo(p,aux.Stringid(id,3)) then Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_DISCARD) Duel.NegateAttack() else --double damage @@ -78,7 +78,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(DOUBLE_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,p) end end diff --git a/official/c47873397.lua b/official/c47873397.lua index 15d4c02da9..7dd5ae732a 100644 --- a/official/c47873397.lua +++ b/official/c47873397.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_GRAVE) e4:SetCondition(s.damcon) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetOperation(s.damop) c:RegisterEffect(e4) end @@ -81,4 +81,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(function(_,_,val,r) return r&REASON_EFFECT>0 and val*2 or val end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c47882565.lua b/official/c47882565.lua index 27d5fefd2c..02365902b0 100644 --- a/official/c47882565.lua +++ b/official/c47882565.lua @@ -9,24 +9,21 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_MAIN_END) - e1:SetCondition(s.condition) + e1:SetCondition(function() return Duel.IsMainPhase() end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xe5} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()&PHASE_MAIN1+PHASE_MAIN2>0 -end +s.listed_series={SET_CIPHER} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and rk>0 and c:IsFaceup() and c:IsSetCard(0xe5) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and rk>0 and c:IsFaceup() and c:IsSetCard(SET_CIPHER) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+1,pg) end function s.filter2(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(0xe5) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ) and mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(SET_CIPHER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -54,18 +51,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) if not sc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) end sc:CompleteProcedure() - sc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + sc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end end function s.atkfilter(c) @@ -73,4 +70,4 @@ function s.atkfilter(c) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsLevelAbove,4),c:GetControler(),LOCATION_MZONE,0,nil)*500 -end +end \ No newline at end of file diff --git a/official/c47897376.lua b/official/c47897376.lua index 0792d8c286..33e045303f 100644 --- a/official/c47897376.lua +++ b/official/c47897376.lua @@ -26,22 +26,22 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.dtcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x140) + return re and re:GetHandler():IsSetCard(SET_ADAMANCIPATOR) end function s.dtfilter(c) - return c:IsSetCard(0x140) and c:IsAbleToDeck() + return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsAbleToDeck() end function s.dttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.dtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.dtfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.dtop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dtfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dtfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil):GetFirst() if tc then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) if not tc:IsLocation(LOCATION_EXTRA) then Duel.ConfirmDecktop(tp,1) end @@ -52,10 +52,10 @@ function s.tdfilter(c) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and c:IsAbleToDeck() end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) and c:IsAbleToDeck() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tc=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil):GetFirst() Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_GRAVE) if tc:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) @@ -64,8 +64,8 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) - and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) + and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c47910940.lua b/official/c47910940.lua index 8381da5258..b46cd97d53 100644 --- a/official/c47910940.lua +++ b/official/c47910940.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) @@ -75,7 +75,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(600*ct) c:RegisterEffect(e1) end diff --git a/official/c47929865.lua b/official/c47929865.lua index a7f22a0560..518fcf1241 100644 --- a/official/c47929865.lua +++ b/official/c47929865.lua @@ -1,4 +1,5 @@ --マジドッグ +--Magidog local s,id=GetID() function s.initial_effect(c) --draw @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c47942531.lua b/official/c47942531.lua index 2a829bbf79..3a4f7426d8 100644 --- a/official/c47942531.lua +++ b/official/c47942531.lua @@ -1,4 +1,5 @@ --偉大魔獣 ガーゼット +--Great Maju Garzett local s,id=GetID() function s.initial_effect(c) --tribute check @@ -26,10 +27,10 @@ function s.valcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) end end function s.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) -end +end \ No newline at end of file diff --git a/official/c47946130.lua b/official/c47946130.lua index 3f6cece190..7ea275c557 100644 --- a/official/c47946130.lua +++ b/official/c47946130.lua @@ -1,9 +1,9 @@ --剛鬼ザ・ジャイアント・オーガ ---Gouki the Giant Ogre +--Gouki The Giant Ogre local s,id=GetID() function s.initial_effect(c) --Link Summon procedure - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),3) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),3) c:EnableReviveLimit() --Prevent destruction by battle local e1=Effect.CreateEffect(c) @@ -46,9 +46,9 @@ function s.initial_effect(c) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.immval(e,te) - return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and e:GetHandlerPlayer() ~= te:GetHandlerPlayer() + return te:GetOwner()~=e:GetHandler() and te:IsMonsterEffect() and e:GetHandlerPlayer() ~= te:GetHandlerPlayer() and te:GetOwner():GetAttack()<=e:GetHandler():GetAttack() and te:IsActivated() end function s.negfilter(c,g) @@ -76,7 +76,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) c:RegisterEffect(e1) @@ -97,7 +97,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c4796100.lua b/official/c4796100.lua index d88c492874..69e9d49537 100644 --- a/official/c4796100.lua +++ b/official/c4796100.lua @@ -1,4 +1,5 @@ --有翼幻獣キマイラ +--Chimera the Flying Mythical Beast local s,id=GetID() function s.initial_effect(c) --fusion material @@ -15,7 +16,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.material_setcode=0x1b +s.material_setcode=SET_PHANTOM_BEAST function s.spfilter(c,e,tp) return c:IsCode(5818798,77207191) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47961808.lua b/official/c47961808.lua index bda7fc42b5..3288174918 100644 --- a/official/c47961808.lua +++ b/official/c47961808.lua @@ -1,4 +1,5 @@ --業火の結界像 +--Barrier Statue of the Inferno local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:GetAttribute()~=ATTRIBUTE_FIRE -end +end \ No newline at end of file diff --git a/official/c47963370.lua b/official/c47963370.lua index a65ca0468f..7b99b53217 100644 --- a/official/c47963370.lua +++ b/official/c47963370.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_DARK_MAGICIAN) c:RegisterEffect(e1) --destroy @@ -36,10 +36,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xcf} +s.listed_series={SET_CHAOS} s.listed_names={21082832,CARD_DARK_MAGICIAN} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -56,10 +56,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsRitualSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xcf) and c:IsRitualMonster() and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_CHAOS) and c:IsRitualMonster() and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c47985614.lua b/official/c47985614.lua index da172fe71f..3f05eeb2d6 100644 --- a/official/c47985614.lua +++ b/official/c47985614.lua @@ -1,4 +1,5 @@ --ガジェット・アームズ +--Gadget Arms local s,id=GetID() function s.initial_effect(c) --flip @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.filter(c) - return c:IsSetCard(0x26) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c48009503.lua b/official/c48009503.lua index 42938e743d..53a66b9f93 100644 --- a/official/c48009503.lua +++ b/official/c48009503.lua @@ -1,4 +1,5 @@ --H-C ガーンデーヴァ +--Heroic Champion - Gandiva local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -20,10 +21,6 @@ end function s.filter(c,e,tp) return c:IsFaceup() and c:IsControler(1-tp) and c:IsLevelBelow(4) and (not e or c:IsRelateToEffect(e)) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter,1,nil,nil,tp) end Duel.SetTargetCard(eg) @@ -32,4 +29,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48015771.lua b/official/c48015771.lua index ae71959431..66097f12a3 100644 --- a/official/c48015771.lua +++ b/official/c48015771.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) --check local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE_START+PHASE_MAIN1) + e4:SetCode(EVENT_PHASE_START|PHASE_MAIN1) e4:SetRange(LOCATION_FZONE) e4:SetOperation(s.chkop) c:RegisterEffect(e4) @@ -54,7 +54,7 @@ end function s.chkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:GetCounter(0x148)==6 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,0,aux.Stringid(id,0)) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,0,aux.Stringid(id,0)) end end function s.gycon(e,tp,eg,ep,ev,re,r,rp) @@ -73,5 +73,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and #g>0 and Duel.SendtoGrave(c,REASON_EFFECT)>0 and c:IsLocation(LOCATION_GRAVE) then Duel.SendtoGrave(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c48017189.lua b/official/c48017189.lua index 484a22037f..fb49b82596 100644 --- a/official/c48017189.lua +++ b/official/c48017189.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE|LOCATION_HAND) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.rthcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rthtg) e2:SetOperation(s.rthop) c:RegisterEffect(e2) diff --git a/official/c48017809.lua b/official/c48017809.lua index d57f5727f7..06a131c8da 100644 --- a/official/c48017809.lua +++ b/official/c48017809.lua @@ -1,4 +1,5 @@ --蜃気楼の筒 +--Mirage Tube local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48032131.lua b/official/c48032131.lua index b0b5c42b01..38067f9cd2 100644 --- a/official/c48032131.lua +++ b/official/c48032131.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_SZONE) e1:SetHintTiming(0,TIMING_STANDBY_PHASE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1,id) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) @@ -44,10 +44,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x8,0xc008} +s.listed_series={SET_HERO,SET_DESTINY_HERO} s.listed_names={76263644} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) + return c:IsFaceup() and c:IsSetCard(SET_HERO) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -63,20 +63,20 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(400) sc:RegisterEffect(e1) end end end function s.cfilter(c,tp) - return c:IsFaceup() and ((c:IsLevelAbove(8) and c:IsSetCard(0xc008)) or c:IsCode(76263644)) and c:IsControler(tp) + return c:IsFaceup() and ((c:IsLevelAbove(8) and c:IsSetCard(SET_DESTINY_HERO)) or c:IsCode(76263644)) and c:IsControler(tp) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local loc=LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND + local loc=LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_HAND if chkc then return chkc:IsOnField() and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,loc,1,nil) end local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,loc,1,1,nil) @@ -85,7 +85,7 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local loc=LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND + local loc=LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_HAND local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,loc,1,1,nil) if #g>0 then Duel.HintSelection(g) @@ -97,7 +97,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_SZONE) end function s.thfilter(c) - return c:IsSetCard(0xc008) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -110,5 +110,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c48048590.lua b/official/c48048590.lua index 1053043592..1d56365cf5 100644 --- a/official/c48048590.lua +++ b/official/c48048590.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x46} +s.listed_series={SET_FUSION} function s.counterfilter(c) return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_FUSION) end @@ -43,7 +43,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) --lizard check @@ -58,11 +58,11 @@ end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and s.cost(e,tp,eg,ep,ev,re,r,rp,0) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) s.cost(e,tp,eg,ep,ev,re,r,rp,1) end function s.thfilter(c) - return c:GetType()==TYPE_SPELL and c:IsSetCard(0x46) and c:IsAbleToHand() + return c:IsNormalSpell() and c:IsSetCard(SET_FUSION) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -101,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c48049769.lua b/official/c48049769.lua index 8a9f5ea129..15b121c052 100644 --- a/official/c48049769.lua +++ b/official/c48049769.lua @@ -17,13 +17,13 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) --oath effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(hg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,hg) end -end +end \ No newline at end of file diff --git a/official/c48063985.lua b/official/c48063985.lua index 1603008608..b2e42473b8 100644 --- a/official/c48063985.lua +++ b/official/c48063985.lua @@ -1,9 +1,10 @@ --聖霊獣騎 カンナホーク +--Ritual Beast Ulti-Cannahawk local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10b5),aux.FilterBoolFunctionEx(Card.IsSetCard,0x20b5)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RITUAL_BEAST_TAMER),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SPIRITUAL_BEAST)) Fusion.AddContactProc(c,s.contactfil,s.contactop,true) --search local e3=Effect.CreateEffect(c) @@ -30,19 +31,19 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xb5,0x10b5,0x20b5} -s.material_setcode={0xb5,0x10b5,0x20b5} +s.listed_series={SET_RITUAL_BEAST,SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} +s.material_setcode={SET_RITUAL_BEAST,SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb5) + return c:IsFaceup() and c:IsSetCard(SET_RITUAL_BEAST) end function s.thfilter(c) - return c:IsSetCard(0xb5) and c:IsAbleToHand() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.tgfilter(chkc) end @@ -57,7 +58,7 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #sg>0 then @@ -68,14 +69,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_COST) end function s.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_RITUAL_BEAST_TAMER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.IsExistingTarget(s.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp) end function s.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_SPIRITUAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -105,4 +106,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c48068378.lua b/official/c48068378.lua index b8d74eb7c8..7c82d9754b 100644 --- a/official/c48068378.lua +++ b/official/c48068378.lua @@ -47,7 +47,7 @@ function s.ls(e,tp,eg,ep,ev,re,r,rp,c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end @@ -72,5 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end - +end \ No newline at end of file diff --git a/official/c4807253.lua b/official/c4807253.lua index fd0a80450c..7616d9844f 100644 --- a/official/c4807253.lua +++ b/official/c4807253.lua @@ -1,6 +1,5 @@ --Emフレイム・イーター --Performage Flame Eater - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -26,8 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xc6} - +s.listed_series={SET_PERFORMAGE} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -53,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) end @@ -64,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,2)) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.damval(e,re,val,r,rp,rc) @@ -75,7 +73,7 @@ function s.damval(e,re,val,r,rp,rc) return 0 end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xc6) + return not c:IsSetCard(SET_PERFORMAGE) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c48086335.lua b/official/c48086335.lua index 6dd15abedb..12d40c2f74 100644 --- a/official/c48086335.lua +++ b/official/c48086335.lua @@ -1,4 +1,5 @@ --アーティファクト-フェイルノート +--Artifact Failnaught local s,id=GetID() function s.initial_effect(c) --set @@ -28,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.setop) c:RegisterEffect(e3) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) @@ -44,10 +45,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) - return c:IsSetCard(0x97) and c:IsMonster() and c:IsSSetable() + return c:IsSetCard(SET_ARTIFACT) and c:IsMonster() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -61,4 +62,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c48092532.lua b/official/c48092532.lua index a5d812428b..c93a37cb5b 100644 --- a/official/c48092532.lua +++ b/official/c48092532.lua @@ -1,4 +1,5 @@ --異次元の生還者 +--D.D. Survivor local s,id=GetID() function s.initial_effect(c) --removed @@ -26,7 +27,7 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -34,7 +35,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id+1)==0 end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+0x4760000+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT|RESET_TURN_SET|RESET_TOGRAVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY|RESET_PHASE|PHASE_END,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4810585.lua b/official/c4810585.lua index c7448da39d..357499a60b 100644 --- a/official/c4810585.lua +++ b/official/c4810585.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) e3:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4810828.lua b/official/c4810828.lua index de659c654d..36254a03f1 100644 --- a/official/c4810828.lua +++ b/official/c4810828.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.SelfToHand) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -38,10 +38,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsExists(s.cfilter,1,nil,tp) and Duel.IsChainNegatable(ev) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -56,10 +52,6 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) return tp~=ep and Duel.GetCurrentChain()==0 end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end - Duel.SendtoHand(e:GetHandler(),nil,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,0,0) @@ -68,4 +60,4 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48115277.lua b/official/c48115277.lua index 0c4460b381..977f2476a8 100644 --- a/official/c48115277.lua +++ b/official/c48115277.lua @@ -33,7 +33,7 @@ end s.listed_names={48115278} function s.op(e,tp,eg,ep,ev,re,r,rp) if Duel.IsTurnPlayer(tp) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,0) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) @@ -43,7 +43,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ct=c:GetFlagEffectLabel(id) if not ct then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,0) else c:SetFlagEffectLabel(id,ct+1) end @@ -79,9 +79,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c48130397.lua b/official/c48130397.lua index 5f938d6c38..6307994248 100644 --- a/official/c48130397.lua +++ b/official/c48130397.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil) @@ -19,4 +19,4 @@ function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(aux.FALSE) end -end +end \ No newline at end of file diff --git a/official/c48135190.lua b/official/c48135190.lua index 0f499d1c4d..6e5c83b08e 100644 --- a/official/c48135190.lua +++ b/official/c48135190.lua @@ -1,4 +1,5 @@ --砂利ケーン +--Gravelstorm local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48144509.lua b/official/c48144509.lua index 8353d677c2..c087fad560 100644 --- a/official/c48144509.lua +++ b/official/c48144509.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.fcheck(tp,sg,fc) return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=2 end @@ -21,5 +21,5 @@ function s.fextra(e,tp,mg) return nil end function s.exfilter(c) - return c:IsSetCard(0x99) and c:IsAbleToGrave() -end + return c:IsSetCard(SET_ODD_EYES) and c:IsAbleToGrave() +end \ No newline at end of file diff --git a/official/c48144778.lua b/official/c48144778.lua index d3d25e7859..c61790a515 100644 --- a/official/c48144778.lua +++ b/official/c48144778.lua @@ -1,7 +1,6 @@ --インフェルニティ・コンジュラー ---Infernity Conjuror +--Infernity Conjurer --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --All of opponent's monsters loses 800 ATK @@ -46,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c48148828.lua b/official/c48148828.lua index ce43f81fbc..93519e6041 100644 --- a/official/c48148828.lua +++ b/official/c48148828.lua @@ -1,4 +1,5 @@ --異次元の狂獣 +--D.D. Crazy Beast local s,id=GetID() function s.initial_effect(c) --remove @@ -21,4 +22,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48150362.lua b/official/c48150362.lua index 9dd95a7670..02fa4f4f9a 100644 --- a/official/c48150362.lua +++ b/official/c48150362.lua @@ -1,5 +1,5 @@ --D-HERO ドローガイ ---Destiny HERO - Drawguy +--Destiny HERO - Drawhand local s,id=GetID() function s.initial_effect(c) --Both players draw 1 @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -35,10 +35,9 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x8} - +s.listed_series={SET_HERO} function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x8) + return re and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_HERO) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -51,12 +50,12 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end function s.spreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -77,8 +76,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c48152161.lua b/official/c48152161.lua index 35a9f01aee..b6fb61b427 100644 --- a/official/c48152161.lua +++ b/official/c48152161.lua @@ -1,5 +1,5 @@ --神属の堕天使 ---Darklord Divinity +--The Sanctified Darklord local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,16 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.costfilter(c) - return c:IsSetCard(0xef) + return c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) @@ -43,14 +43,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) Duel.AdjustInstantly(tc) local atk=tc:GetAttack() @@ -58,4 +58,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c48156348.lua b/official/c48156348.lua index c151aa7ac6..9da1b36176 100644 --- a/official/c48156348.lua +++ b/official/c48156348.lua @@ -1,9 +1,10 @@ --剣闘獣ガイザレス +--Gladiator Beast Gyzarus local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,41470137,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19)) + Fusion.AddProcMix(c,true,true,41470137,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR)) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) --destroy local e3=Effect.CreateEffect(c) @@ -20,7 +21,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.spcon) e4:SetCost(s.spcost) @@ -28,15 +29,15 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={41470137} -s.material_setcode=0x19 +s.material_setcode=SET_GLADIATOR function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA @@ -61,10 +62,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(c,e,tp) - return not c:IsCode(41470137) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,120,tp,false,false) + return not c:IsCode(41470137) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,120,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -84,10 +85,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) local tc=sg:GetFirst() Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) tc=sg:GetNext() Duel.SpecialSummonStep(tc,120,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c48179391.lua b/official/c48179391.lua index 2dfe3da912..288b970fb4 100644 --- a/official/c48179391.lua +++ b/official/c48179391.lua @@ -50,7 +50,7 @@ function s.initial_effect(c) aux.addContinuousLizardCheck(c,LOCATION_FZONE) end function s.desfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c48183890.lua b/official/c48183890.lua index cb65993f2c..6cd9f7a556 100644 --- a/official/c48183890.lua +++ b/official/c48183890.lua @@ -42,7 +42,7 @@ function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsRace,1,nil,RACE_INSECT|RACE_PLANT,lc,sumtype,tp) end function s.ntfilter(c) - return c:GetType()==TYPE_TRAP + return c:IsNormalTrap() end function s.atkcon(e) return Duel.IsExistingMatchingCard(s.ntfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) diff --git a/official/c48206762.lua b/official/c48206762.lua index ba745a510b..df2d1719c1 100644 --- a/official/c48206762.lua +++ b/official/c48206762.lua @@ -1,4 +1,5 @@ --契約の履行 +--Fulfillment of the Contract local s,id=GetID() function s.initial_effect(c) --Activate @@ -48,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -59,4 +60,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4820694.lua b/official/c4820694.lua index c3b1f70826..c3c297c677 100644 --- a/official/c4820694.lua +++ b/official/c4820694.lua @@ -1,4 +1,5 @@ --セイクリッド・テンペスト +--Constellar Tempest local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,7 +23,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) @@ -31,12 +32,12 @@ function s.initial_effect(c) e3:SetOperation(s.matop) c:RegisterEffect(e3) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 + return c:IsFaceup() and c:IsSetCard(SET_CONSTELLAR) and c:IsType(TYPE_XYZ) and c:GetOverlayCount()>0 end function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -58,10 +59,10 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_CONSTELLAR) and c:IsType(TYPE_XYZ) end function s.mfilter(c) - return c:IsSetCard(0x53) and c:IsMonster() + return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -82,4 +83,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(tc,g) end -end +end \ No newline at end of file diff --git a/official/c48210156.lua b/official/c48210156.lua index 9040d06259..8322a5790a 100644 --- a/official/c48210156.lua +++ b/official/c48210156.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.filter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -33,7 +33,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EVENT_DESTROY) e4:SetLabelObject(e3) e4:SetOperation(s.checkop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4) end local e1=Effect.CreateEffect(c) @@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) Duel.SpecialSummonComplete() end @@ -77,4 +77,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,1000,REASON_EFFECT) e:SetLabel(0) e:Reset() -end +end \ No newline at end of file diff --git a/official/c48216773.lua b/official/c48216773.lua index cbec17c732..7381e9c32f 100644 --- a/official/c48216773.lua +++ b/official/c48216773.lua @@ -1,4 +1,5 @@ --強制退出装置 +--Compulsory Escape Device local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,5 +24,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_MZONE,0,1,1,nil) dg1:Merge(dg2) Duel.HintSelection(dg1) - Duel.SendtoDeck(dg1,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(dg1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c48228390.lua b/official/c48228390.lua index f1e83483e9..d92ce5ed09 100644 --- a/official/c48228390.lua +++ b/official/c48228390.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCondition(function() return Duel.IsBattlePhase() end) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) diff --git a/official/c48229808.lua b/official/c48229808.lua index 26297e428f..3fa246663a 100644 --- a/official/c48229808.lua +++ b/official/c48229808.lua @@ -25,10 +25,10 @@ function s.initial_effect(c) end s.listed_names={11224103} s.LVnum=8 -s.LVset=0x3 +s.LVset=SET_HORUS_BLACK_FLAME_DRAGON function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48252330.lua b/official/c48252330.lua index c44bd7ccee..28f88a3b2e 100644 --- a/official/c48252330.lua +++ b/official/c48252330.lua @@ -1,4 +1,5 @@ --マドルチェ・バトラスク +--Madolche Butlerusk local s,id=GetID() function s.initial_effect(c) --to deck @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.shop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -33,11 +34,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) + return c:IsFaceup() and c:IsSetCard(SET_MADOLCHE) end function s.shcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) @@ -57,4 +58,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c4825390.lua b/official/c4825390.lua index 5eb91bcdba..87d2080b97 100644 --- a/official/c4825390.lua +++ b/official/c4825390.lua @@ -1,7 +1,6 @@ --イチロクの魔物台帳 ---Pawnshop Ledgerbook +--Ichiroku's Ledger Book --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -28,14 +27,14 @@ end --Banish up to 2 of opponent's monsters until End Phase function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) - if Duel.Remove(tg,0,REASON_EFFECT+REASON_TEMPORARY)>0 then + if Duel.Remove(tg,0,REASON_EFFECT|REASON_TEMPORARY)>0 then local c=e:GetHandler() for rc in tg:Iter() do local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(rc) e1:SetCountLimit(1) e1:SetOperation(s.retop) diff --git a/official/c48276469.lua b/official/c48276469.lua index 48ce700713..53c632d135 100644 --- a/official/c48276469.lua +++ b/official/c48276469.lua @@ -1,4 +1,5 @@ --連鎖炸薬 +--Chain Burst local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,7 +24,7 @@ function s.initial_effect(c) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local c=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and e:GetHandler():GetFlagEffect(1)>0 then Duel.Damage(rp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48285768.lua b/official/c48285768.lua index 3ada7d0a94..3b7f253840 100644 --- a/official/c48285768.lua +++ b/official/c48285768.lua @@ -1,7 +1,6 @@ --スプリガンズ・メリーメイカ ---Sprigguns Merry-Maker +--Springans Merrymaker --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -27,7 +26,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.bancon) @@ -36,11 +35,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Sprigguns" archetype -s.listed_series={0x158} - +s.listed_series={SET_SPRINGANS} --Check for a "Sprigguns" monster function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x158) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_SPRINGANS) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -72,11 +70,11 @@ function s.banop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then local ct=c:GetOverlayCount() - Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY) + Duel.Remove(c,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(c) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -93,5 +91,5 @@ function s.banop(e,tp,eg,ep,ev,re,r,rp) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) - Duel.ReturnToField(e:GetLabelObject()) -end + Duel.ReturnToField(e:GetLabelObject()) +end \ No newline at end of file diff --git a/official/c48308134.lua b/official/c48308134.lua index f367041d8f..0de9f1e411 100644 --- a/official/c48308134.lua +++ b/official/c48308134.lua @@ -1,5 +1,5 @@ --幻煌龍の螺旋突 ---Spiral Crash of the Mythic Radiance Dragon +--Phantasm Spiral Crash local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL)) @@ -30,8 +30,8 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.posfilter(c) return c:IsAttackPos() and c:IsCanChangePosition() @@ -41,7 +41,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then local tc=g:GetFirst() if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c48310593.lua b/official/c48310593.lua index 8feb680f82..dd294af6e1 100644 --- a/official/c48310593.lua +++ b/official/c48310593.lua @@ -1,4 +1,5 @@ --無念の手札 +--Finite Cards local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetTargetRange(1,1) e2:SetValue(3) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c48333324.lua b/official/c48333324.lua index e1719aa1d1..6343fe6653 100644 --- a/official/c48333324.lua +++ b/official/c48333324.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1048} +s.listed_series={SET_NUMBER_C} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) @@ -21,7 +21,7 @@ function s.filter1(c,e,tp) end function s.filter2(c,e,tp,mc,rk,rc,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsRace(rc) and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsRace(rc) and c:IsSetCard(SET_NUMBER_C) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.disfilter(c) @@ -56,20 +56,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) nc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) nc:RegisterEffect(e2) if nc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) nc:RegisterEffect(e3) end end end -end +end \ No newline at end of file diff --git a/official/c48343627.lua b/official/c48343627.lua index 48f28e6eb6..4aa12b70b2 100644 --- a/official/c48343627.lua +++ b/official/c48343627.lua @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48348921.lua b/official/c48348921.lua index 21ba6c20b9..f03754bb4f 100644 --- a/official/c48348921.lua +++ b/official/c48348921.lua @@ -10,11 +10,11 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --Unaffected by opponent's monster effects diff --git a/official/c48355999.lua b/official/c48355999.lua index 57a00bdaa4..043a733d6a 100644 --- a/official/c48355999.lua +++ b/official/c48355999.lua @@ -34,14 +34,14 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END) @@ -61,7 +61,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e4:SetDescription(aux.Stringid(id,1)) e4:SetTargetRange(1,0) e4:SetTarget(s.splimit) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c48356796.lua b/official/c48356796.lua index 51d50cd764..b4a9d7eb12 100644 --- a/official/c48356796.lua +++ b/official/c48356796.lua @@ -1,4 +1,5 @@ --閃光の宝札 +--Mystical Cards of Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.drawcon(e) end function s.disop(e,tp,eg,ep,ev,re,r,rp) return Duel.SelectDisableField(tp,1,LOCATION_SZONE,0,0) -end +end \ No newline at end of file diff --git a/official/c48357738.lua b/official/c48357738.lua index e8f0cdde74..2912585366 100644 --- a/official/c48357738.lua +++ b/official/c48357738.lua @@ -1,4 +1,5 @@ --暴君の暴飲暴食 +--Tyrant's Tummyache local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.descon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)>=3 -end +end \ No newline at end of file diff --git a/official/c4836680.lua b/official/c4836680.lua index 7aba893fa1..b65d4e61fa 100644 --- a/official/c4836680.lua +++ b/official/c4836680.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.con(POS_FACEUP_ATTACK)) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -40,9 +40,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.thfilter(c) - return (c:IsSetCard(0x99) or c:IsSetCard(0x9f)) and c:IsAbleToHand() + return (c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -62,11 +62,11 @@ end function s.con(pos) return function(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsPosition(pos) + return c:IsPendulumSummoned() and c:IsPosition(pos) end end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x99) or c:IsSetCard(0x9f)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -83,7 +83,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return (c:IsSetCard(0x99) or c:IsSetCard(0x9f)) and c:IsType(TYPE_PENDULUM) + return (c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and c:IsType(TYPE_PENDULUM) and (not c:IsForbidden() or c:IsAbleToGrave()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -91,7 +91,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if not tc then return end diff --git a/official/c48370501.lua b/official/c48370501.lua index f7db4d04cd..681f6182c4 100644 --- a/official/c48370501.lua +++ b/official/c48370501.lua @@ -1,4 +1,5 @@ --ヴァイロン・シグマ +--Vylon Sigma local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -34,4 +35,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Equip(tp,g:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c48372950.lua b/official/c48372950.lua index a33a9f8af0..394fa87bf9 100644 --- a/official/c48372950.lua +++ b/official/c48372950.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.ntfilter(c) - return c:IsFaceup() and c:IsSetCard(0x11a) + return c:IsFaceup() and c:IsSetCard(SET_DINOWRESTLER) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -35,10 +35,10 @@ function s.ntcon(e,c,minc) and Duel.IsExistingMatchingCard(s.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) and Duel.GetTurnPlayer()==tp + return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) and Duel.IsTurnPlayer(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x11a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOWRESTLER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -56,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4837861.lua b/official/c4837861.lua index 6273935629..45e7f9454c 100644 --- a/official/c4837861.lua +++ b/official/c4837861.lua @@ -1,5 +1,5 @@ --機皇神龍トリスケリア ---Meklord Astro Dragon Triskelia +--Meklord Astro Dragon Triskelion --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetValue(s.atkval) c:RegisterEffect(e4) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipGroup():IsExists(Card.IsOriginalType,1,nil,TYPE_SYNCHRO) end @@ -65,11 +65,11 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(c) sg:RegisterEffect(e1) - sg:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + sg:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) Duel.ShuffleExtra(1-tp) end end @@ -78,7 +78,7 @@ function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.spfilter(c) - return c:IsSetCard(0x13) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_MEKLORD) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==#sg,sg:GetClassCount(Card.GetCode)~=#sg @@ -86,11 +86,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -113,4 +113,4 @@ function s.adcon(e,tp,eg,ep,ev,re,r,rp) end function s.atkval(e,c) return e:GetHandler():GetEquipGroup():Filter(s.efilter,nil):GetSum(Card.GetAttack) -end +end \ No newline at end of file diff --git a/official/c48381268.lua b/official/c48381268.lua index ea04fc5841..4051d1d16b 100644 --- a/official/c48381268.lua +++ b/official/c48381268.lua @@ -1,4 +1,5 @@ --D・ボードン +--Morphtronic Boarden local s,id=GetID() function s.initial_effect(c) --atk @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCondition(s.cona) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MORPHTRONIC)) c:RegisterEffect(e1) --def local e2=Effect.CreateEffect(c) @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cona(e) return e:GetHandler():IsAttackPos() end @@ -29,5 +30,5 @@ function s.cond(e) return e:GetHandler():IsDefensePos() end function s.tgd(e,c) - return c:IsSetCard(0x26) and c~=e:GetHandler() -end + return c:IsSetCard(SET_MORPHTRONIC) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c48386462.lua b/official/c48386462.lua index 55eab8f545..af4f44acc9 100644 --- a/official/c48386462.lua +++ b/official/c48386462.lua @@ -47,7 +47,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end elseif op==2 then --Discard 1 card, then draw 1 card - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)>0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end @@ -55,7 +55,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) --During the End Phase of this turn, draw 1 card local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE|PHASE_END) + e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(function(_,_tp) Duel.Draw(_tp,1,REASON_EFFECT) end) e1:SetReset(RESET_PHASE|PHASE_END) diff --git a/official/c48411996.lua b/official/c48411996.lua index 07824beba4..21068573c4 100644 --- a/official/c48411996.lua +++ b/official/c48411996.lua @@ -20,16 +20,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x22,TYPES_TOKEN,0,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_JURRAC,TYPES_TOKEN,0,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE) then return end for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetValue(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),0x22)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetValue(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),SET_JURRAC)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c48421595.lua b/official/c48421595.lua index ceec8131c9..f799b91df5 100644 --- a/official/c48421595.lua +++ b/official/c48421595.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(19642774) c:RegisterEffect(e1) --Level Gain @@ -54,7 +54,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #tc>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c48422921.lua b/official/c48422921.lua index 638e66d772..7f1cd90215 100644 --- a/official/c48422921.lua +++ b/official/c48422921.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -38,14 +38,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetOwnerPlayer(tp) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) local reg=tc:GetFlagEffectLabel(id) if reg then reg=(reg|att) tc:SetFlagEffectLabel(id,reg) else - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,att) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,att) end end end @@ -56,4 +56,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetBattleTarget() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48424886.lua b/official/c48424886.lua index 02b54aa1e0..28fc177003 100644 --- a/official/c48424886.lua +++ b/official/c48424886.lua @@ -1,8 +1,9 @@ --エルシャドール・エグリスタ +--El Shaddoll Grysta local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9d),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) --cannot spsummon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -34,8 +35,8 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x9d} -s.material_setcode=0x9d +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL function s.matfilter(c,lc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_FIRE,lc,sumtype,tp) or c:IsHasEffect(4904633) end @@ -43,7 +44,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp~=ep and Duel.GetCurrentChain()==0 end function s.filter(c) - return c:IsSetCard(0x9d) + return c:IsSetCard(SET_SHADDOLL) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -61,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -75,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48427163.lua b/official/c48427163.lua index d1271cf617..2b6964a7e6 100644 --- a/official/c48427163.lua +++ b/official/c48427163.lua @@ -1,4 +1,5 @@ --月光紫蝶 +--Lunalight Purple Butterfly local s,id=GetID() function s.initial_effect(c) --atk up @@ -6,8 +7,8 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) - e1:SetCost(s.atkcost) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -17,18 +18,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xdf) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return c:IsFaceup() and c:IsSetCard(SET_LUNALIGHT) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -43,12 +40,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xdf) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c48439321.lua b/official/c48439321.lua index bce137f7af..7877d7d489 100644 --- a/official/c48439321.lua +++ b/official/c48439321.lua @@ -1,4 +1,5 @@ --マドルチェ・ワルツ +--Madolche Waltz local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,9 +19,9 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.check(c,tp) - return c and c:IsControler(tp) and c:IsSetCard(0x71) + return c and c:IsControler(tp) and c:IsSetCard(SET_MADOLCHE) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return s.check(Duel.GetAttacker(),tp) or s.check(Duel.GetAttackTarget(),tp) @@ -35,4 +36,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48444114.lua b/official/c48444114.lua index 4310a3f7fd..41c6a95c5b 100644 --- a/official/c48444114.lua +++ b/official/c48444114.lua @@ -1,4 +1,5 @@ --月光香 +--Luna Light Perfume local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.filter(c,e,tp) - return c:IsSetCard(0xdf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LUNALIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -44,10 +45,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter2(c) - return c:IsSetCard(0xdf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_LUNALIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil) end @@ -60,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c48445393.lua b/official/c48445393.lua index aae1fdef33..1f4602fdcc 100644 --- a/official/c48445393.lua +++ b/official/c48445393.lua @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c48447192.lua b/official/c48447192.lua index bebf510e2c..7b5a126181 100644 --- a/official/c48447192.lua +++ b/official/c48447192.lua @@ -1,7 +1,8 @@ --剣の煌き +--Sword of Sparkles local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x100d)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_X_SABER)) --destroy local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -25,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.descon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() return ec and eg:IsContains(ec) @@ -55,6 +56,6 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48453776.lua b/official/c48453776.lua index 2ed8858550..cf0e2e7a7f 100644 --- a/official/c48453776.lua +++ b/official/c48453776.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.sgcost) + e3:SetCost(Cost.PayLP(1000)) e3:SetTarget(s.sgtg) e3:SetOperation(s.sgop) c:RegisterEffect(e3) @@ -46,16 +46,16 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT,RACE_FAIRY) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK,RACE_FIEND) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT,RACE_FAIRY) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK,RACE_FIEND) local rg=rg1:Clone() rg:Merge(rg2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-4 and #rg1>0 and #rg2>2 and aux.SelectUnselectGroup(rg,e,tp,4,4,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT,RACE_FAIRY) - rg:Merge(Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK,RACE_FIEND)) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT,RACE_FAIRY) + rg:Merge(Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK,RACE_FIEND)) local g=aux.SelectUnselectGroup(rg,e,tp,4,4,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -70,18 +70,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Remove(g,POS_FACEUP,REASON_COST) g:DeleteGroup() end -function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end - local g=Duel.GetFieldGroup(tp,0xe,0xe) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1) end function s.sgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0xe,0xe) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD) Duel.SendtoGrave(g,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48461764.lua b/official/c48461764.lua index 5a5a3388ad..feafe39a2d 100644 --- a/official/c48461764.lua +++ b/official/c48461764.lua @@ -49,7 +49,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1200) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) Duel.BreakEffect() Duel.Destroy(c,REASON_EFFECT) @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48468330.lua b/official/c48468330.lua index 7fcc188589..ed002a043d 100644 --- a/official/c48468330.lua +++ b/official/c48468330.lua @@ -1,5 +1,5 @@ --魔神童 ---Majindou +--Terrifying Toddler of Torment local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -52,5 +52,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c4848423.lua b/official/c4848423.lua index 684a4bf02a..ee0d97cd90 100644 --- a/official/c4848423.lua +++ b/official/c4848423.lua @@ -1,4 +1,5 @@ --衛生兵マッスラー +--Muscle Medic local s,id=GetID() function s.initial_effect(c) --damage conversion @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.rev(e,re,r,rp,rc) return r&REASON_BATTLE~=0 and (Duel.GetAttacker()==e:GetHandler() or (Duel.GetAttackTarget() and Duel.GetAttackTarget()==e:GetHandler())) -end +end \ No newline at end of file diff --git a/official/c48486809.lua b/official/c48486809.lua index 9a7758fc20..984595e56a 100644 --- a/official/c48486809.lua +++ b/official/c48486809.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e3:SetCost(aux.SelfTributeCost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.destg1) e3:SetOperation(s.desop1) c:RegisterEffect(e3) @@ -105,4 +105,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if atk>0 then Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4849037.lua b/official/c4849037.lua index 0e2a1d4271..512f5f58f9 100644 --- a/official/c4849037.lua +++ b/official/c4849037.lua @@ -1,4 +1,5 @@ --ダンシング・ソルジャー +--Performance of Sword local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c48497555.lua b/official/c48497555.lua index a45eda1816..210d6da4d8 100644 --- a/official/c48497555.lua +++ b/official/c48497555.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.condition(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - return rc:IsOnField() and rc:IsControler(1-tp) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) + return rc:IsOnField() and rc:IsControler(1-tp) and re:IsSpellTrapEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x43) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_JUNK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -61,4 +61,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c48505422.lua b/official/c48505422.lua index 0e27cd2155..4e1b5aa43e 100644 --- a/official/c48505422.lua +++ b/official/c48505422.lua @@ -1,4 +1,5 @@ --真六武衆-シナイ +--Legendary Six Samurai - Shinai local s,id=GetID() function s.initial_effect(c) --special summon @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.rlop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={74094021} function s.spfilter(c) return c:IsFaceup() and c:IsCode(74094021) @@ -35,7 +36,7 @@ function s.rlcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x3d) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -50,4 +51,4 @@ function s.rlop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c48519867.lua b/official/c48519867.lua index 1f23527ad1..8f8bc540eb 100644 --- a/official/c48519867.lua +++ b/official/c48519867.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x140) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_ADAMANCIPATOR) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToDeckBottom(ac,tp) Duel.SortDeckbottom(tp,tp,ac) end -end +end \ No newline at end of file diff --git a/official/c48539234.lua b/official/c48539234.lua index b1f383dc96..f04c501be8 100644 --- a/official/c48539234.lua +++ b/official/c48539234.lua @@ -1,4 +1,5 @@ --便乗 +--Appropriate local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Draw(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48546368.lua b/official/c48546368.lua index 6fc1d9b233..0b9aee6423 100644 --- a/official/c48546368.lua +++ b/official/c48546368.lua @@ -41,7 +41,7 @@ s.listed_names={79306385} function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost() @@ -75,4 +75,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(Card.IsSummonPlayer,nil,1-tp) Duel.NegateSummon(g) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48568432.lua b/official/c48568432.lua index 1c477b02d8..2ad5b6f7db 100644 --- a/official/c48568432.lua +++ b/official/c48568432.lua @@ -1,4 +1,5 @@ --トライゴン +--Trigon local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),true,false) @@ -35,4 +36,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4857085.lua b/official/c4857085.lua index 2eac885f26..838d53b1f9 100644 --- a/official/c4857085.lua +++ b/official/c4857085.lua @@ -1,4 +1,5 @@ --Ωメガネ +--Omega Goggles local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,0) @@ -19,7 +20,7 @@ function s.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.cftg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -32,4 +33,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) local sg=g:RandomSelect(tp,1) Duel.ConfirmCards(tp,sg) Duel.ShuffleHand(1-tp) -end +end \ No newline at end of file diff --git a/official/c48576971.lua b/official/c48576971.lua index 022bfc6d7d..3da2b06cf7 100644 --- a/official/c48576971.lua +++ b/official/c48576971.lua @@ -1,4 +1,5 @@ --与奪の首飾り +--Necklace of Command local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -54,6 +55,6 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) elseif e:GetLabel()==1 then local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local g=Duel.GetFieldGroup(p,LOCATION_HAND,0):RandomSelect(p,d) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c48582558.lua b/official/c48582558.lua index 417e483955..ebf328a121 100644 --- a/official/c48582558.lua +++ b/official/c48582558.lua @@ -1,6 +1,5 @@ --バウンサー・ガード --Bounzer Guard - local s,id=GetID() function s.initial_effect(c) --Targeted "Bounzer" monster cannot be targeted by card effect, also cannot be destroyed by battle @@ -10,13 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START) c:RegisterEffect(e1) end -s.listed_series={0x6b} - +s.listed_series={SET_BOUNZER} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6b) + return c:IsFaceup() and c:IsSetCard(SET_BOUNZER) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot be targeted by card effects local e2=Effect.CreateEffect(e:GetHandler()) @@ -43,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD) @@ -51,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(0,LOCATION_MZONE) e3:SetValue(s.atklimit) e3:SetLabel(tc:GetRealFieldID()) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end diff --git a/official/c48588176.lua b/official/c48588176.lua index f367c417ac..b2921d6d2d 100644 --- a/official/c48588176.lua +++ b/official/c48588176.lua @@ -1,4 +1,5 @@ --ダニポン +--Danipon local s,id=GetID() function s.initial_effect(c) --special summon @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c48589580.lua b/official/c48589580.lua index e136e7de91..10eb512cc4 100644 --- a/official/c48589580.lua +++ b/official/c48589580.lua @@ -35,7 +35,7 @@ end s.listed_names={CARD_SANCTUARY_SKY} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c,sanc_chk) if not c:IsAbleToHand() then return false end diff --git a/official/c48596760.lua b/official/c48596760.lua index a8d308220b..061be71af0 100644 --- a/official/c48596760.lua +++ b/official/c48596760.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) @@ -28,20 +28,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -68,4 +68,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48608796.lua b/official/c48608796.lua index e2ba76190f..1c63c3fd4c 100644 --- a/official/c48608796.lua +++ b/official/c48608796.lua @@ -1,4 +1,5 @@ --LL-アセンブリー・ナイチンゲール +--Lyrilusc - Assembled Nightingale local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -31,11 +32,11 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(s.indcost) + e4:SetCost(Cost.Detach(1)) e4:SetOperation(s.indop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xf7} +s.listed_series={SET_LYRILUSC} function s.atkval(e,c) return c:GetOverlayCount()*200 end @@ -43,10 +44,6 @@ function s.raval(e,c) local oc=e:GetHandler():GetOverlayCount() return math.max(0,oc-1) end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -54,8 +51,8 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf7)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_LYRILUSC)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -66,6 +63,6 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,0) e3:SetValue(1) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) -end +end \ No newline at end of file diff --git a/official/c4861205.lua b/official/c4861205.lua index c1a28823bd..6073fdebbe 100644 --- a/official/c4861205.lua +++ b/official/c4861205.lua @@ -1,4 +1,5 @@ --ミイラの呼び声 +--Call of the Mummy local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c48626373.lua b/official/c48626373.lua index 1e71d760b8..c8b53cb02d 100644 --- a/official/c48626373.lua +++ b/official/c48626373.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) - e3:SetCost(aux.dxmcostgen(3,3)) + e3:SetCost(Cost.Detach(3,3)) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) diff --git a/official/c48633301.lua b/official/c48633301.lua index f8fbd85cc8..e28b9d741d 100644 --- a/official/c48633301.lua +++ b/official/c48633301.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} s.listed_names={id} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x27) + return c:IsFaceup() and c:IsSetCard(SET_TG) end function s.spcon(e,c) if c==nil then return true end @@ -42,12 +42,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x27) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TG) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -60,5 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c48636108.lua b/official/c48636108.lua index 33cb7a1290..c01577bedc 100644 --- a/official/c48636108.lua +++ b/official/c48636108.lua @@ -22,29 +22,29 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x107,0xb2} +s.listed_series={SET_FA,SET_UA} function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if not d then return false end if d:IsControler(tp) then a,d=d,a end - return (a:IsSetCard(0x107) or a:IsSetCard(0xb2)) and not a:IsStatus(STATUS_BATTLE_DESTROYED) + return (a:IsSetCard(SET_FA) or a:IsSetCard(SET_UA)) and not a:IsStatus(STATUS_BATTLE_DESTROYED) and d:IsStatus(STATUS_BATTLE_DESTROYED) end function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and (c:IsSetCard(0x107) or c:IsSetCard(0xb2)) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and (c:IsSetCard(SET_FA) or c:IsSetCard(SET_UA)) end function s.sprescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetCode)>=#sg end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp) + local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,nil,e,tp) if #tg==0 or ft<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local g=aux.SelectUnselectGroup(tg,e,tp,1,ft,s.sprescon,1,tp,HINTMSG_SPSUMMON) @@ -54,5 +54,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.dmcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return ep==1-tp and tc:IsControler(tp) and (tc:IsSetCard(0x107) or tc:IsSetCard(0xb2)) -end + return ep==1-tp and tc:IsControler(tp) and (tc:IsSetCard(SET_FA) or tc:IsSetCard(SET_UA)) +end \ No newline at end of file diff --git a/official/c48642904.lua b/official/c48642904.lua index 8282251288..777c45ad8b 100644 --- a/official/c48642904.lua +++ b/official/c48642904.lua @@ -1,4 +1,5 @@ --催眠術 +--Mesmeric Control local s,id=GetID() function s.initial_effect(c) --activate @@ -14,6 +15,6 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c48653261.lua b/official/c48653261.lua index 8de68b33fc..1ca44566e6 100644 --- a/official/c48653261.lua +++ b/official/c48653261.lua @@ -1,4 +1,5 @@ --ガードペナルティ +--Guard Penalty local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.drcon) e1:SetOperation(s.drop) e1:SetLabel(tc:GetRealFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -40,4 +41,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) e:Reset() -end +end \ No newline at end of file diff --git a/official/c48654267.lua b/official/c48654267.lua index 417cb2e1a8..383bf1747c 100644 --- a/official/c48654267.lua +++ b/official/c48654267.lua @@ -128,8 +128,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ft4=math.min(ect,ft4) end local loc=0 - if ft1>0 then loc=loc+LOCATION_DECK+LOCATION_GRAVE end - if ft2>0 or ft3>0 or ft4>0 then loc=loc+LOCATION_EXTRA end + if ft1>0 then loc=loc|LOCATION_DECK|LOCATION_GRAVE end + if ft2>0 or ft3>0 or ft4>0 then loc=loc|LOCATION_EXTRA end if loc==0 then return end local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,loc,0,nil,e,tp) if #sg==0 then return end diff --git a/official/c48654323.lua b/official/c48654323.lua index ad02a6909b..73070e4eca 100644 --- a/official/c48654323.lua +++ b/official/c48654323.lua @@ -1,21 +1,21 @@ --- 凶導の白聖骸 --- White Exalted of Dogmatika --- Scripted by Hatter +--凶導の白聖骸 +--White Relic of Dogmatika +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- Gain ATK + --Gain ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e)return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)end) + e1:SetCondition(function(e)return e:GetHandler():IsRitualSummoned()end) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Cannot be destroyed by battle + --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetTarget(s.indtg) e2:SetValue(1) c:RegisterEffect(e2) - -- Send to GY + --Send to GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOGRAVE) @@ -39,7 +39,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={60921537} -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} function s.atkrescon(sg) return sg:IsExists(Card.IsAttackAbove,1,nil,1) end @@ -60,18 +60,18 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=tg:FilterSelect(tp,s.atkfilter,1,1,nil,tg):GetFirst() if tc then Duel.HintSelection(tc,true) - -- Update ATK + --Update ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue((tg-tc):GetFirst():GetAttack()) tc:RegisterEffect(e1) end end function s.indtg(e,c) - return c:IsSetCard(0x146) and c:IsLevelAbove(8) + return c:IsSetCard(SET_DOGMATIKA) and c:IsLevelAbove(8) end function s.tgconfilter(c,tp) return c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousControler(1-tp) diff --git a/official/c48658295.lua b/official/c48658295.lua index 91f2c2d532..5b11bad845 100644 --- a/official/c48658295.lua +++ b/official/c48658295.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(Fusion.SummonEffTG(params)) diff --git a/official/c48659020.lua b/official/c48659020.lua index aa1f558a7b..384ca02ae3 100644 --- a/official/c48659020.lua +++ b/official/c48659020.lua @@ -1,4 +1,5 @@ --魂を呼ぶ者 +--Spirit Caller local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c48675364.lua b/official/c48675364.lua index 9e18fb4299..88e471c5d6 100644 --- a/official/c48675364.lua +++ b/official/c48675364.lua @@ -1,4 +1,5 @@ --ジェネラルデーモン +--Archfiend General local s,id=GetID() function s.initial_effect(c) --search @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,11 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={94585852} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(94585852) and c:IsAbleToHand() end @@ -42,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.descon(e) return not Duel.IsEnvironment(94585852) -end +end \ No newline at end of file diff --git a/official/c48680970.lua b/official/c48680970.lua index 12074fc304..96cae8ad5a 100644 --- a/official/c48680970.lua +++ b/official/c48680970.lua @@ -93,16 +93,16 @@ function s.spfilter(c,e,tp) return c:IsCode(CARD_DARK_MAGICIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c48686504.lua b/official/c48686504.lua index 5fb0d3979e..26364a0726 100644 --- a/official/c48686504.lua +++ b/official/c48686504.lua @@ -1,4 +1,5 @@ --ローンファイア・ブロッサム +--Lonefire Blossom local s,id=GetID() function s.initial_effect(c) --spsummon @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4869446.lua b/official/c4869446.lua index c96174162a..daec09ee22 100644 --- a/official/c4869446.lua +++ b/official/c4869446.lua @@ -1,4 +1,5 @@ --砂漠の裁き +--Judgment of the Desert local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end function s.postg(e,c) return e:GetHandler():IsHasCardTarget(c) -end +end \ No newline at end of file diff --git a/official/c48700891.lua b/official/c48700891.lua index 23feed9996..2f84c197eb 100644 --- a/official/c48700891.lua +++ b/official/c48700891.lua @@ -1,4 +1,5 @@ --記憶破壊者 +--Memory Crusher local s,id=GetID() function s.initial_effect(c) --damage @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,ct*100,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48705086.lua b/official/c48705086.lua index 2f8a07c353..153b0ed4e0 100644 --- a/official/c48705086.lua +++ b/official/c48705086.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.gysptg) e2:SetOperation(s.gyspop) c:RegisterEffect(e2) diff --git a/official/c48712195.lua b/official/c48712195.lua index 24014dd25b..47e121362a 100644 --- a/official/c48712195.lua +++ b/official/c48712195.lua @@ -1,4 +1,5 @@ --カードトレーダー +--Card Trader local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DRAW) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.drcon) @@ -22,7 +23,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end @@ -40,4 +41,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48716139.lua b/official/c48716139.lua index 65f961f989..4b002e0100 100644 --- a/official/c48716139.lua +++ b/official/c48716139.lua @@ -23,7 +23,7 @@ s.listed_card_types={TYPE_SPIRIT} function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() - return c:IsReason(REASON_LOST_TARGET) and (ec:GetLocation()==LOCATION_HAND) and ec:IsPreviousControler(tp) + return c:IsReason(REASON_LOST_TARGET) and ec:IsLocation(LOCATION_HAND) and ec:IsPreviousControler(tp) end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c48716527.lua b/official/c48716527.lua index 3b4cee5929..63ad4a81a8 100644 --- a/official/c48716527.lua +++ b/official/c48716527.lua @@ -1,4 +1,5 @@ --帝王の溶撃 +--The Monarchs Erupt local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE) @@ -26,17 +27,17 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.actcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.distg(e,c) - return not c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return not c:IsTributeSummoned() end function s.tgcon(e) local tp=e:GetHandlerPlayer() - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END + return Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_END) and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c48736598.lua b/official/c48736598.lua index 8a726522cf..f227171108 100644 --- a/official/c48736598.lua +++ b/official/c48736598.lua @@ -27,29 +27,29 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x13c} +s.listed_series={SET_CODEBREAKER} function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x13c,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_CODEBREAKER,lc,sumtype,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetMutualLinkedGroupCount()>0 end function s.spfilter(c,e,tp,p,zones) - return c:IsSetCard(0x13c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zones[p]) + return c:IsSetCard(SET_CODEBREAKER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,p,zones[p]) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local zones={} zones[0]=aux.GetMMZonesPointedTo(0) zones[1]=aux.GetMMZonesPointedTo(1) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,tp,zones) or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,1-tp,zones) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,tp,zones) or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,1-tp,zones) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local zones={} zones[0]=aux.GetMMZonesPointedTo(0) zones[1]=aux.GetMMZonesPointedTo(1) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp,tp,zones)+Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp,1-tp,zones) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp,tp,zones)+Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp,1-tp,zones) if #g==0 then return end local ft=Duel.GetLocationCount(0,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zones[0])+Duel.GetLocationCount(1,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zones[1]) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -68,16 +68,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13c) and c:IsLinked() + return c:IsFaceup() and c:IsSetCard(SET_CODEBREAKER) and c:IsLinked() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil),nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil),nil) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end diff --git a/official/c48737767.lua b/official/c48737767.lua index 29fccf827d..314fd50177 100644 --- a/official/c48737767.lua +++ b/official/c48737767.lua @@ -1,4 +1,5 @@ --切り盛り隊長 +--Marmiting Captain local s,id=GetID() function s.initial_effect(c) --todeck @@ -20,7 +21,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) - if #g>0 and Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then + if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then Duel.ShuffleDeck(tp) Duel.BreakEffect() if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c48739166.lua b/official/c48739166.lua index 78120b1eb0..d3a6c10e57 100644 --- a/official/c48739166.lua +++ b/official/c48739166.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,7 +28,7 @@ end s.xyz_number=101 function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToChangeControler() - and not c:IsType(TYPE_TOKEN) and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and not c:IsType(TYPE_TOKEN) and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -50,4 +50,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c48742406.lua b/official/c48742406.lua index b33112ebaa..8456cde596 100644 --- a/official/c48742406.lua +++ b/official/c48742406.lua @@ -23,7 +23,7 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c48745395.lua b/official/c48745395.lua index f93c97d34c..c69457768c 100644 --- a/official/c48745395.lua +++ b/official/c48745395.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) end s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.setfilter(c) - return c:GetType()==TYPE_TRAP and c:IsSSetable() and not c:IsForbidden() and c:GetActivateEffect() + return c:IsNormalTrap() and c:IsSSetable() and not c:IsForbidden() and c:GetActivateEffect() and c:GetActivateEffect():GetCode()==EVENT_ATTACK_ANNOUNCE end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -75,10 +75,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.trapval(c) - return c:GetType()==TYPE_TRAP + return c:IsNormalTrap() end function s.atkval(e,c) local tp=e:GetHandlerPlayer() local g=Duel.GetMatchingGroup(s.trapval,tp,LOCATION_GRAVE,0,nil) return g:GetClassCount(Card.GetCode)*400 -end +end \ No newline at end of file diff --git a/official/c48768179.lua b/official/c48768179.lua index d265d609e2..8559b24d11 100644 --- a/official/c48768179.lua +++ b/official/c48768179.lua @@ -43,4 +43,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Send the top card of your opponent's Deck to the GY Duel.DiscardDeck(1-tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48770333.lua b/official/c48770333.lua index 91ef3db598..985206c457 100644 --- a/official/c48770333.lua +++ b/official/c48770333.lua @@ -2,7 +2,7 @@ --Thunder King, the Lightningstrike Kaiju local s,id=GetID() function s.initial_effect(c) - c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0xd3),LOCATION_MZONE) + c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,SET_KAIJU),LOCATION_MZONE) --special summon rule local e1,e2=aux.AddKaijuProcedure(c) --multi attack @@ -16,13 +16,14 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xd3} +s.listed_series={SET_KAIJU} +s.counter_list={COUNTER_KAIJU} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,3,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,3,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -32,7 +33,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if c:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) @@ -40,7 +41,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e2:SetValue(2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c48783998.lua b/official/c48783998.lua index 5dfb04bb5a..083c05c67a 100644 --- a/official/c48783998.lua +++ b/official/c48783998.lua @@ -51,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c48784854.lua b/official/c48784854.lua index 50241766b3..dbe662aa3c 100644 --- a/official/c48784854.lua +++ b/official/c48784854.lua @@ -1,4 +1,4 @@ --- +--光の継承 --Heritage of the Light --Scripted by Eerie Code local s,id=GetID() @@ -25,13 +25,13 @@ function s.typecheck(sc,card_type) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,card_type),0,LOCATION_MZONE,LOCATION_MZONE,1,sc) end function s.drcfilter(c) - if c:IsSummonType(SUMMON_TYPE_RITUAL) then + if c:IsRitualSummoned() then return s.typecheck(c,TYPE_RITUAL) - elseif c:IsSummonType(SUMMON_TYPE_FUSION) then + elseif c:IsFusionSummoned() then return s.typecheck(c,TYPE_FUSION) - elseif c:IsSummonType(SUMMON_TYPE_SYNCHRO) then + elseif c:IsSynchroSummoned() then return s.typecheck(c,TYPE_SYNCHRO) - elseif c:IsSummonType(SUMMON_TYPE_XYZ) then + elseif c:IsXyzSummoned() then return s.typecheck(c,TYPE_XYZ) else return false @@ -50,4 +50,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48791583.lua b/official/c48791583.lua index 5fce1c38c2..abdef6f0d5 100644 --- a/official/c48791583.lua +++ b/official/c48791583.lua @@ -1,7 +1,8 @@ --召喚獣メガラニカ +--Invoked Magellanica local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,86120751,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH)) -end +end \ No newline at end of file diff --git a/official/c48800175.lua b/official/c48800175.lua index 587e8a2761..8368e4ce3b 100644 --- a/official/c48800175.lua +++ b/official/c48800175.lua @@ -1,4 +1,5 @@ --ドラゴン・目覚めの旋律 +--The Melody of Awakening Dragon local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsRace(RACE_DRAGON) and c:IsAttackAbove(3000) and c:IsDefenseBelow(2500) and c:IsAbleToHand() @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c48805472.lua b/official/c48805472.lua index 46f56860f7..615b02e4c4 100644 --- a/official/c48805472.lua +++ b/official/c48805472.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -34,7 +34,7 @@ end s.drcostfilter=aux.AND(s.filter,Card.IsDiscardable) function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.drcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.drcostfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.drcostfilter,1,1,REASON_COST|REASON_DISCARD) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -59,4 +59,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48806195.lua b/official/c48806195.lua index 4f15d92128..3a08ba2b0b 100644 --- a/official/c48806195.lua +++ b/official/c48806195.lua @@ -1,9 +1,9 @@ --セリオンズ"エンプレス"アラシア ---Therions' "Empress" Arasia +--Therion "Empress" Alasia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) @@ -27,25 +27,25 @@ function s.initial_effect(c) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) - -- Equipped monster gains ATK + --Equipped monster gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x17b) end) + e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_THERION) end) e3:SetValue(700) c:RegisterEffect(e3) - -- Equipped monster gains effect + --Equipped monster gains effect local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x17b) end) + e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(SET_THERION) end) e4:SetLabelObject(e2) c:RegisterEffect(e4) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.eqfilter(c) - return c:IsMonster() and (c:IsSetCard(0x17b) or c:IsRace(RACE_REPTILE)) + return c:IsMonster() and (c:IsSetCard(SET_THERION) or c:IsRace(RACE_REPTILE)) end function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) @@ -76,10 +76,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,sp) - return c:IsFaceup() and c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(0x17b) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsFaceup() and c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(SET_THERION) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end diff --git a/official/c48814566.lua b/official/c48814566.lua index 1a7194d831..139bbb810b 100644 --- a/official/c48814566.lua +++ b/official/c48814566.lua @@ -1,5 +1,5 @@ --魔獣の大餌 ---Feed Back +--Banquet of Millions --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -31,11 +31,11 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local rmog=Duel.GetOperatedGroup() if rmct>0 and rmct==rmog:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) then local org=og:RandomSelect(tp,rmct) - if Duel.Remove(org,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)>0 then + if Duel.Remove(org,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY)>0 then local fid=c:GetFieldID() local opg=Duel.GetOperatedGroup() for oc in aux.Next(opg) do - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + oc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end opg:KeepAlive() local e1=Effect.CreateEffect(c) @@ -47,7 +47,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(opg) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -67,5 +67,5 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local sg=g:Filter(s.retfilter,nil,e:GetLabel()) g:DeleteGroup() - Duel.SendtoDeck(sg,1-tp,2,REASON_EFFECT+REASON_RETURN) -end + Duel.SendtoDeck(sg,1-tp,SEQ_DECKSHUFFLE,REASON_EFFECT|REASON_RETURN) +end \ No newline at end of file diff --git a/official/c48815792.lua b/official/c48815792.lua index 6547d525f0..ea758d0f47 100644 --- a/official/c48815792.lua +++ b/official/c48815792.lua @@ -38,7 +38,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end @@ -47,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp==1-tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp==1-tp and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsMonster() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() @@ -71,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c48829461.lua b/official/c48829461.lua index 4800b62d3e..3587df0246 100644 --- a/official/c48829461.lua +++ b/official/c48829461.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -19,26 +19,23 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_GRAVE+LOCATION_MZONE) + e2:SetRange(LOCATION_GRAVE|LOCATION_MZONE) e2:SetCode(id) e2:SetCountLimit(1,{id,1}) c:RegisterEffect(e2) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} s.listed_names={74509280} function s.spcon(e,tp,eg,ep,ev,re,r,r,rp) return Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end + function s.spfilter(c,e,tp,chk) return c:IsCode(74509280) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not chk or Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,c)) end function s.thfilter(c) - return c:IsSetCard(0x23) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MALEFIC) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,true) end @@ -60,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c48832775.lua b/official/c48832775.lua index 345c1ad66e..d6d39e30fd 100644 --- a/official/c48832775.lua +++ b/official/c48832775.lua @@ -1,12 +1,12 @@ --- ダイノルフィア・ケントレギナ --- Dinoruffia Kentregina --- Scripted by Hatter +--ダイノルフィア・ケントレギナ +--Dinomorphia Kentregina +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 “Dinoruffia” monsters with different names + --2 “Dinoruffia” monsters with different names Fusion.AddProcMixN(c,true,true,s.ffilter,2) - -- Lose ATK equal to LP + --Lose ATK equal to LP local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -14,20 +14,20 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(function(_,c)return -Duel.GetLP(c:GetControler())end) c:RegisterEffect(e1) - -- Apply Normal Trap effect + --Apply Normal Trap effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) e2:SetCondition(function()return Duel.IsMainPhase()end) e2:SetCost(s.efcost) e2:SetTarget(s.eftg) e2:SetOperation(s.efop) c:RegisterEffect(e2) - -- Special Summon + --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -40,15 +40,15 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.ffilter(c,fc,sumtype,tp,sub,mg,sg) - return c:IsSetCard(0x175,fc,sumtype,tp) and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetCode(fc,sumtype,tp),fc,sumtype,tp)) + return c:IsSetCard(SET_DINOMORPHIA,fc,sumtype,tp) and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetCode(fc,sumtype,tp),fc,sumtype,tp)) end function s.fusfilter(c,code,fc,sumtype,tp) return c:IsSummonCode(fc,sumtype,tp,code) and not c:IsHasEffect(511002961) end function s.effilter(c) - return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x175) and c:GetType()==TYPE_TRAP + return c:IsAbleToRemoveAsCost() and c:IsSetCard(SET_DINOMORPHIA) and c:IsNormalTrap() and c:CheckActivateEffect(false,true,false)~=nil end function s.efcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -90,7 +90,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x175) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOMORPHIA) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -104,4 +104,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end \ No newline at end of file +end diff --git a/official/c48868994.lua b/official/c48868994.lua index 16fd5b1ad8..b316bcf78a 100644 --- a/official/c48868994.lua +++ b/official/c48868994.lua @@ -71,7 +71,7 @@ function s.equipop(c,e,tp,tc) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(id) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end function s.opd(e,tp,eg,ep,ev,re,r,rp) @@ -80,4 +80,4 @@ function s.opd(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackPos() then s.equipop(c,e,tp,tc) end -end +end \ No newline at end of file diff --git a/official/c48891960.lua b/official/c48891960.lua index 879a017860..d2985cc69c 100644 --- a/official/c48891960.lua +++ b/official/c48891960.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x29),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DRAGUNITY),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --Banish local e1=Effect.CreateEffect(c) @@ -30,14 +30,14 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.cfilter(c) - return c:IsSetCard(0x29) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -55,13 +55,13 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_SYNCHRO) - return #pg<=0 and c:IsSetCard(0x29) and c:IsAttackBelow(3000) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return #pg<=0 and c:IsSetCard(SET_DRAGUNITY) and c:IsAttackBelow(3000) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + and c:IsSynchroSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c48905153.lua b/official/c48905153.lua index 111d947e9f..d1d7bfe2cc 100644 --- a/official/c48905153.lua +++ b/official/c48905153.lua @@ -1,4 +1,5 @@ --十二獣ドランシア +--Zoodiac Drident local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -26,38 +27,34 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0xf1,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_ZOODIAC,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.atkfilter(c) - return c:IsSetCard(0xf1) and c:GetAttack()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetAttack()>=0 end function s.atkval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.atkfilter,nil) return g:GetSum(Card.GetAttack) end function s.deffilter(c) - return c:IsSetCard(0xf1) and c:GetDefense()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetDefense()>=0 end function s.defval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.deffilter,nil) return g:GetSum(Card.GetDefense) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -71,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c48928529.lua b/official/c48928529.lua index 38909f25f7..f35a3d89c7 100644 --- a/official/c48928529.lua +++ b/official/c48928529.lua @@ -1,6 +1,5 @@ --No.83 ギャラクシー・クィーン --Number 83: Galaxy Queen - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -13,16 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=83 - -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local tc=g:GetFirst() @@ -33,7 +27,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetValue(1) tc:RegisterEffect(e1) --Inflict piercing damage @@ -42,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c48934760.lua b/official/c48934760.lua index e74434a5d5..153a80b455 100644 --- a/official/c48934760.lua +++ b/official/c48934760.lua @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) -end +end \ No newline at end of file diff --git a/official/c48940337.lua b/official/c48940337.lua index c93ca53e7e..c1f225511d 100644 --- a/official/c48940337.lua +++ b/official/c48940337.lua @@ -1,4 +1,5 @@ --ランスフォリンクス +--Lancephorhynchus local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -14,4 +15,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c48948935.lua b/official/c48948935.lua index 94f57b79c5..859f1afddd 100644 --- a/official/c48948935.lua +++ b/official/c48948935.lua @@ -85,7 +85,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) eqc:RegisterEffect(e1) @@ -93,10 +93,10 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) eqc:RegisterEffect(e2) end end function s.eqlimit(e,c) return e:GetLabelObject()==c -end +end \ No newline at end of file diff --git a/official/c48958757.lua b/official/c48958757.lua index bb6f25e11f..91a6c60a48 100644 --- a/official/c48958757.lua +++ b/official/c48958757.lua @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,100,tp,tp,op==2,false,POS_FACEUP) tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c48964966.lua b/official/c48964966.lua index 33e97518b4..c48f089916 100644 --- a/official/c48964966.lua +++ b/official/c48964966.lua @@ -1,4 +1,5 @@ --アテナ +--Athena local s,id=GetID() function s.initial_effect(c) --special summon @@ -84,4 +85,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c48976825.lua b/official/c48976825.lua index 6806bcb568..1904e3f5c7 100644 --- a/official/c48976825.lua +++ b/official/c48976825.lua @@ -1,4 +1,5 @@ --異次元からの埋葬 +--Burial from a Different Dimension local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,6 +26,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c48996569.lua b/official/c48996569.lua index 5ae0b5d023..e010c57a07 100644 --- a/official/c48996569.lua +++ b/official/c48996569.lua @@ -1,4 +1,5 @@ --E・HERO グラン・ネオス +--Elemental HERO Grand Neos local s,id=GetID() function s.initial_effect(c) --fusion material @@ -19,13 +20,13 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -45,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49003716.lua b/official/c49003716.lua index dad22ce4cb..db7b1808d1 100644 --- a/official/c49003716.lua +++ b/official/c49003716.lua @@ -1,4 +1,5 @@ --BF-黒槍のブラスト +--Blackwing - Bora the Spear local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,12 +16,12 @@ function s.initial_effect(c) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c49010598.lua b/official/c49010598.lua index 1606429faa..fc8109d220 100644 --- a/official/c49010598.lua +++ b/official/c49010598.lua @@ -1,4 +1,5 @@ --天罰 +--Divine Wrath local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,12 +14,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49027020.lua b/official/c49027020.lua index f905b7f2b4..821262bdbd 100644 --- a/official/c49027020.lua +++ b/official/c49027020.lua @@ -33,11 +33,11 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_names={12801833} +s.listed_names={12801833} --"Traptrip Garden" s.listed_series={SET_HOLE,SET_TRAP_HOLE} function s.immfilter(e,te) local c=te:GetOwner() - return c:IsNormalTrap() and (c:IsSetCard(SET_HOLE) or c:IsSetCard(SET_TRAP_HOLE)) + return c:IsNormalTrap() and c:IsSetCard({SET_HOLE,SET_TRAP_HOLE}) end function s.thfilter(c) return c:IsCode(12801833) and c:IsAbleToHand() @@ -104,4 +104,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,1-tp,1-tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49032236.lua b/official/c49032236.lua index 841752c7ca..c116ccf45f 100644 --- a/official/c49032236.lua +++ b/official/c49032236.lua @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=81 @@ -36,11 +36,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.efilter(e,re) local c=e:GetHandler() return c~=re:GetOwner() and not c:IsStatus(STATUS_BATTLE_DESTROYED) -end +end \ No newline at end of file diff --git a/official/c49033797.lua b/official/c49033797.lua index fc237d33a0..cd6e4a0115 100644 --- a/official/c49033797.lua +++ b/official/c49033797.lua @@ -56,4 +56,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c4904633.lua b/official/c4904633.lua index 0a578e219e..0a2b2fdaf3 100644 --- a/official/c4904633.lua +++ b/official/c4904633.lua @@ -1,4 +1,5 @@ --影依の原核 +--Shaddoll Core local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,25 +23,25 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} s.listed_names={id} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1450,1950,9,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(id) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -48,7 +49,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -62,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c4904812.lua b/official/c4904812.lua index 31a4807932..3e1cd23cbc 100644 --- a/official/c4904812.lua +++ b/official/c4904812.lua @@ -1,4 +1,5 @@ --ジェネクス・ウンディーネ +--Genex Undine local s,id=GetID() function s.initial_effect(c) --search @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c4906301.lua b/official/c4906301.lua index 030c266964..8cd5ebe563 100644 --- a/official/c4906301.lua +++ b/official/c4906301.lua @@ -1,4 +1,5 @@ --ネクロ・ガードナー +--Necro Gardna local s,id=GetID() function s.initial_effect(c) --disable attack @@ -9,12 +10,12 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_ATTACK) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetAttacker() then Duel.NegateAttack() @@ -22,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.disop) Duel.RegisterEffect(e1,tp) @@ -31,4 +32,4 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c49064413.lua b/official/c49064413.lua index bcee008f81..ed20a6a6ae 100644 --- a/official/c49064413.lua +++ b/official/c49064413.lua @@ -1,4 +1,5 @@ --仮面魔獣マスクド・ヘルレイザー +--The Masked Beast local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c49080532.lua b/official/c49080532.lua index c36b70a191..16382f898a 100644 --- a/official/c49080532.lua +++ b/official/c49080532.lua @@ -1,4 +1,5 @@ --インフェルニティ・ビートル +--Infernity Beetle local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -17,10 +18,6 @@ s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -41,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49082032.lua b/official/c49082032.lua index a8bba157b3..a7a5f2f002 100644 --- a/official/c49082032.lua +++ b/official/c49082032.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x95,0x1048,0x1073} +s.listed_series={SET_RANK_UP_MAGIC,SET_NUMBER_C,SET_CXYZ} function s.cfilter(c) return c:IsSpell() and c:IsDiscardable() end @@ -38,8 +38,8 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) - if g:GetFirst():IsSetCard(0x95) then e:SetLabel(0) else e:SetLabel(1) end + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) + if g:GetFirst():IsSetCard(SET_RANK_UP_MAGIC) then e:SetLabel(0) else e:SetLabel(1) end end function s.filter1(c,e,tp) local rk=c:GetRank() @@ -50,7 +50,7 @@ end function s.filter2(c,e,tp,mc,rk,rc,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsRace(rc) - and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and mc:IsCanBeXyzMaterial(c,tp) + and (c:IsSetCard(SET_NUMBER_C) or c:IsSetCard(SET_CXYZ)) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -75,7 +75,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() if e:GetLabel()==1 then local fid=c:GetFieldID() - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -97,5 +97,5 @@ function s.thcon2(e,tp,eg,ep,ev,re,r,rp) else return true end end function s.thop2(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetLabelObject(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(e:GetLabelObject(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c49088914.lua b/official/c49088914.lua index 83ee6cb33d..757d33ba10 100644 --- a/official/c49088914.lua +++ b/official/c49088914.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x150} +s.listed_series={SET_VIRTUAL_WORLD} s.listed_names={id} local key=TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP function s.togravefilter(c,ctype) - return c:IsSetCard(0x150) and not c:IsType(ctype&key) and c:IsAbleToGrave() + return c:IsSetCard(SET_VIRTUAL_WORLD) and not c:IsType(ctype&key) and c:IsAbleToGrave() end function s.tgfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x150) and Duel.IsExistingMatchingCard(s.togravefilter,tp,LOCATION_DECK,0,1,nil,c:GetType()) + return c:IsFaceup() and c:IsSetCard(SET_VIRTUAL_WORLD) and Duel.IsExistingMatchingCard(s.togravefilter,tp,LOCATION_DECK,0,1,nil,c:GetType()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end @@ -34,7 +34,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.tohandfilter(c,type1,type2) - return c:IsSetCard(0x150) and not c:IsType(type1&key) and not c:IsType(type2&key) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_VIRTUAL_WORLD) and not c:IsType(type1&key) and not c:IsType(type2&key) and not c:IsCode(id) and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) --Send to GY and Special Summon @@ -71,4 +71,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not (c:IsLevelAbove(3) or c:IsRankAbove(3)) -end +end \ No newline at end of file diff --git a/official/c49105782.lua b/official/c49105782.lua index 3154be5f2f..580ceac86c 100644 --- a/official/c49105782.lua +++ b/official/c49105782.lua @@ -1,7 +1,6 @@ --死翼のフレスヴェイス --Hraesvelgr, the Desperate Doom Eagle --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -47,6 +46,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c49109013.lua b/official/c49109013.lua index 99e5c714b6..764b3e1891 100644 --- a/official/c49109013.lua +++ b/official/c49109013.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -73,7 +73,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c49121795.lua b/official/c49121795.lua index f6cc899804..66ff2b1699 100644 --- a/official/c49121795.lua +++ b/official/c49121795.lua @@ -1,4 +1,5 @@ --重装甲列車アイアン・ヴォルフ +--Heavy Armored Train Ironwolf local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.dacon) - e1:SetCost(s.dacost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.datg) e1:SetOperation(s.daop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,10 +32,6 @@ end function s.dacon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.dacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.dafilter(c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) end @@ -53,14 +50,14 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if tc:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -85,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c49131917.lua b/official/c49131917.lua index d2bed703f1..1a113e0cbb 100644 --- a/official/c49131917.lua +++ b/official/c49131917.lua @@ -1,10 +1,10 @@ --- ヴァリアンツの巫女-東雲 --- Shinonome, Priestess of the Valiants --- Scripted by Hatter +--ヴァリアンツの巫女-東雲 +--Shinonome the Vaylantz Priestess +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,19 +14,19 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Search 1 "Valiants" Spell + --Search 1 "Valiants" Spell local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) end) + e2:SetCondition(function(e) return e:GetHandler():IsSpecialSummoned() end) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) e2:SetLabel(TYPE_SPELL) c:RegisterEffect(e2) - -- Search 1 "Valiants" monster + --Search 1 "Valiants" monster local e3=e2:Clone() e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -38,11 +38,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x17e} +s.listed_series={SET_VAYLANTZ} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then - local zone=(1<0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49191560.lua b/official/c49191560.lua index 8abc428a2a..9ce1e25d3b 100644 --- a/official/c49191560.lua +++ b/official/c49191560.lua @@ -1,4 +1,5 @@ --魔導剣士 シャリオ +--Charioteer of Prophecy local s,id=GetID() function s.initial_effect(c) --salvage @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsDiscardable() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD|REASON_COST) end function s.filter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand() @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c49195710.lua b/official/c49195710.lua index d2848b4d1e..a3a35fe37b 100644 --- a/official/c49195710.lua +++ b/official/c49195710.lua @@ -1,4 +1,5 @@ --CNo.65 裁断魔王ジャッジ・デビル +--Number C65: King Overfiend local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -33,10 +34,6 @@ function s.initial_effect(c) end s.xyz_number=65 s.listed_names={3790062} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() end @@ -54,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -63,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.accon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,3790062) -end +end \ No newline at end of file diff --git a/official/c49202162.lua b/official/c49202162.lua index b77a750c1a..20bd0f1e8b 100644 --- a/official/c49202162.lua +++ b/official/c49202162.lua @@ -38,7 +38,7 @@ function s.matcheck(e,c) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) --Your opponent cannot destroy with card effects. local e2=e1:Clone() @@ -73,7 +73,7 @@ function s.doperation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) elseif op==2 then local e1=Effect.CreateEffect(c) @@ -83,7 +83,7 @@ function s.doperation(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.atcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,2) c:RegisterEffect(e1) elseif op==3 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -96,5 +96,4 @@ end function s.atcon(e,tp) local c=e:GetHandler() return Duel.GetTurnCount()>e:GetLabel() -end - +end \ No newline at end of file diff --git a/official/c49202331.lua b/official/c49202331.lua index f973d2974f..92096139fc 100644 --- a/official/c49202331.lua +++ b/official/c49202331.lua @@ -1,4 +1,5 @@ --CX 超巨大空中要塞バビロン +--CXyz Skypalace Babylon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCountLimit(1) e2:SetCondition(s.atcon) - e2:SetCost(s.atcost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.atop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end @@ -51,10 +52,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) return aux.bdcon(e,tp,eg,ep,ev,re,r,rp) and c:CanChainAttack() and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,3814632) end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c49204190.lua b/official/c49204190.lua index ecf4635ac0..79c7a7beb9 100644 --- a/official/c49204190.lua +++ b/official/c49204190.lua @@ -1,4 +1,5 @@ --奇策 +--Nitwit Outwit local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) return c:GetAttack()>0 and c:IsDiscardable() end @@ -34,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) local atk=g:GetFirst():GetAttack() - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SetTargetParam(atk) @@ -47,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c49217579.lua b/official/c49217579.lua index 0658d5e017..b374bbf100 100644 --- a/official/c49217579.lua +++ b/official/c49217579.lua @@ -1,4 +1,5 @@ --幻影の騎士-ミラージュ・ナイト- +--Mirage Knight local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -29,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and e:GetHandler():GetBattleTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and e:GetHandler():GetBattleTarget() end function s.atkval(e,c) return e:GetHandler():GetBattleTarget():GetBaseAttack() @@ -41,4 +42,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49221191.lua b/official/c49221191.lua index 8b33456acc..20956828de 100644 --- a/official/c49221191.lua +++ b/official/c49221191.lua @@ -1,4 +1,5 @@ --CNo.32 海咬龍シャーク・ドレイク・バイス +--Number C32: Shark Drake Veiss local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -25,7 +26,7 @@ function s.ovfilter(c,tp,lc) return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,65676461) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetLP(tp)<=1000 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.GetLP(tp)<=1000 and aux.StatChangeDamageStepCondition() end function s.rfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c) @@ -33,10 +34,10 @@ function s.rfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -56,14 +57,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - if Duel.GetTurnPlayer()~=tp then - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + if Duel.IsTurnPlayer(1-tp) then + e1:SetReset(RESETS_STANDARD_PHASE_END,2) else - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) end tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c4923662.lua b/official/c4923662.lua index 33713b978b..768f696330 100644 --- a/official/c4923662.lua +++ b/official/c4923662.lua @@ -1,4 +1,5 @@ --カオス・バースト +--Chaos Burst local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,false,nil,nil) end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49238328.lua b/official/c49238328.lua index 231bf11ed1..ff962d1238 100644 --- a/official/c49238328.lua +++ b/official/c49238328.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) @@ -53,6 +53,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c49249907.lua b/official/c49249907.lua index 780cc2efcd..de9e00e6b8 100644 --- a/official/c49249907.lua +++ b/official/c49249907.lua @@ -1,4 +1,5 @@ --妖仙獣 凶旋嵐 +--Yosenju Magat local s,id=GetID() function s.initial_effect(c) --summon @@ -31,10 +32,10 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0xb3) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YOSENJU) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -61,4 +62,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49251811.lua b/official/c49251811.lua index 9061553da7..620dc25f47 100644 --- a/official/c49251811.lua +++ b/official/c49251811.lua @@ -1,4 +1,5 @@ --魔法探査の石版 +--Mystic Probe local s,id=GetID() function s.initial_effect(c) --activate @@ -20,9 +21,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.distarget(e,c) - return c:GetType()==TYPE_CONTINUOUS+TYPE_SPELL -end + return c:IsContinuousSpell() +end \ No newline at end of file diff --git a/official/c49267971.lua b/official/c49267971.lua index eda53512df..232823cb9d 100644 --- a/official/c49267971.lua +++ b/official/c49267971.lua @@ -1,4 +1,5 @@ --死角からの一撃 +--Blind Spot Strike local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_DEFENSE) @@ -35,8 +33,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc1:GetDefense()) tc2:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c49275969.lua b/official/c49275969.lua index 26dc971468..95b3f532e9 100644 --- a/official/c49275969.lua +++ b/official/c49275969.lua @@ -1,5 +1,5 @@ --氷の王 ニードヘッグ ---Nidhogg, Generaid of Ice +--Nidhogg, Generaider Boss of Ice --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -18,12 +18,12 @@ function s.initial_effect(c) e1:SetOperation(s.disop) c:RegisterEffect(e1) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.discon(e,tp,eg,ep,ev,re,r,rp) return tp~=ep and Duel.GetCurrentChain()==0 end function s.cfilter(c) - return c:IsSetCard(0x134) or c:IsRace(RACE_WYRM) + return c:IsSetCard(SET_GENERAIDER) or c:IsRace(RACE_WYRM) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end diff --git a/official/c4928565.lua b/official/c4928565.lua index bea49d8509..3e07c71066 100644 --- a/official/c4928565.lua +++ b/official/c4928565.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) end s.listed_series={SET_TEARLAMENTS,SET_KASHTIRA} function s.rmfilter(c) - return (c:IsSetCard(SET_TEARLAMENTS) or c:IsSetCard(SET_KASHTIRA)) and c:IsAbleToRemove() + return c:IsSetCard({SET_TEARLAMENTS,SET_KASHTIRA}) and c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,4 +86,4 @@ function s.tgmltg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tgmlop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4929256.lua b/official/c4929256.lua index ec8777d5f6..c359a91cac 100644 --- a/official/c4929256.lua +++ b/official/c4929256.lua @@ -1,4 +1,5 @@ --氷帝メビウス +--Mobius the Frost Monarch local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,10 +15,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49299410.lua b/official/c49299410.lua index 3fea8745f5..990525f1a1 100644 --- a/official/c49299410.lua +++ b/official/c49299410.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.decltg) e2:SetOperation(s.efflimop) c:RegisterEffect(e2) diff --git a/official/c49306994.lua b/official/c49306994.lua index f249e8515c..20faf035c7 100644 --- a/official/c49306994.lua +++ b/official/c49306994.lua @@ -67,18 +67,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e3) end end diff --git a/official/c4931121.lua b/official/c4931121.lua index 373d503293..8fc49f41ae 100644 --- a/official/c4931121.lua +++ b/official/c4931121.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_TOHAND|TIMINGS_CHECK_MONSTER) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -34,7 +34,7 @@ function s.filter(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) + local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE|LOCATION_HAND) if #conf>0 then Duel.ConfirmCards(tp,conf) local dg=conf:Filter(s.filter,nil) @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.turncon) e2:SetOperation(s.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e2,tp) e2:SetLabelObject(e1) local descnum=tp==c:GetOwner() and 0 or 1 @@ -67,12 +67,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(e2) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e3) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,3)) - e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e4:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) e4:SetTargetRange(0,1) Duel.RegisterEffect(e4,tp) end @@ -89,7 +89,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(ep) end function s.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.turnop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -100,4 +100,4 @@ function s.turnop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():Reset() if re then re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c49328340.lua b/official/c49328340.lua index a87d18ee77..4a5cc0d547 100644 --- a/official/c49328340.lua +++ b/official/c49328340.lua @@ -45,6 +45,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,2,REASON_EFFECT)==2 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c49352945.lua b/official/c49352945.lua index ba5a12db31..066e08fe2c 100644 --- a/official/c49352945.lua +++ b/official/c49352945.lua @@ -29,24 +29,24 @@ function s.initial_effect(c) aux.EnableNeosReturn(c,nil,nil,nil,e2) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) @@ -60,4 +60,4 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49366157.lua b/official/c49366157.lua index 5d8a073ef9..7089ad4458 100644 --- a/official/c49366157.lua +++ b/official/c49366157.lua @@ -1,4 +1,5 @@ --マジェスペクター・サイクロン +--Majespecter Cyclone local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49370016.lua b/official/c49370016.lua index f2155e81c5..36578ef2c6 100644 --- a/official/c49370016.lua +++ b/official/c49370016.lua @@ -1,14 +1,14 @@ --- P.U.N.K. JAMエクストリーム・セッション --- P.U.N.K. JAM Extreme Session --- Scripted by Hatter +--P.U.N.K. JAMエクストリーム・セッション +--P.U.N.K. JAM Extreme Session +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Draw + --Draw local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DRAW) @@ -33,18 +33,18 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} function s.spcostfilter(c) - return c:IsSetCard(0x173) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_PUNK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x173) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PUNK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,7 +62,7 @@ end function s.drcon(e,tp,eg,ep,ev,re,r,rp) if not re then return end local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc:IsControler(tp) and rc:IsLocation(LOCATION_MZONE) and rc:IsRace(RACE_PSYCHIC) + return re:IsMonsterEffect() and rc:IsControler(tp) and rc:IsLocation(LOCATION_MZONE) and rc:IsRace(RACE_PSYCHIC) and rc:IsFaceup() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c49374988.lua b/official/c49374988.lua index 009763d855..ab2305c01c 100644 --- a/official/c49374988.lua +++ b/official/c49374988.lua @@ -1,4 +1,5 @@ --マドルチェ・メェプル +--Madolche Baaple local s,id=GetID() function s.initial_effect(c) --to deck @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -34,11 +35,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.filter1(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsSetCard(0x71) + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsSetCard(SET_MADOLCHE) end function s.filter2(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() @@ -66,8 +67,8 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c49375719.lua b/official/c49375719.lua index 4780569dc4..79f586285b 100644 --- a/official/c49375719.lua +++ b/official/c49375719.lua @@ -1,4 +1,5 @@ --サイバー・チュチュ +--Cyber Tutu local s,id=GetID() function s.initial_effect(c) --direct attack @@ -13,4 +14,4 @@ function s.filter(c,atk) end function s.dacon(e) return not Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) -end +end \ No newline at end of file diff --git a/official/c49389190.lua b/official/c49389190.lua index bd6bdb820e..4de4072060 100644 --- a/official/c49389190.lua +++ b/official/c49389190.lua @@ -1,7 +1,6 @@ --夢魔鏡の乙女-イケロス --Ikelos, the Dream Mirror Sprite --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Add 1 "Dream Mirror" card from deck @@ -22,24 +21,23 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.dspcon) - e2:SetCost(s.dspcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.dsptg) e2:SetOperation(s.dspop) c:RegisterEffect(e2) end s.listed_names={75888208,CARD_DREAM_MIRROR_TERROR,id} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.thcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.thfilter(c) - return c:IsSetCard(0x131) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DREAM_MIRROR) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,13 +52,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.dspcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_DREAM_MIRROR_TERROR),tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) -end -function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.dspfilter(c,e,tp) return c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c49389523.lua b/official/c49389523.lua index 1c0e983795..738e996120 100644 --- a/official/c49389523.lua +++ b/official/c49389523.lua @@ -1,4 +1,5 @@ --ライトニング・トライコーン +--Lightning Tricorn local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49394035.lua b/official/c49394035.lua index 3d1394b77a..c5e1a022cb 100644 --- a/official/c49394035.lua +++ b/official/c49394035.lua @@ -1,7 +1,6 @@ --ヴェンデット・コア --Vendread Core --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -25,8 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.mtop) c:RegisterEffect(e2) end -s.listed_series={0x106} - +s.listed_series={SET_VENDREAD} function s.cfilter(c) return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() end @@ -50,18 +48,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) - and eg:IsExists(Card.IsSetCard,1,nil,0x106) + and eg:IsExists(Card.IsSetCard,1,nil,SET_VENDREAD) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x106) + local g=eg:Filter(Card.IsSetCard,nil,SET_VENDREAD) local rc=g:GetFirst() if not rc then return end --Cannot be targeted by opponent's card effects @@ -71,15 +69,15 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,3061) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,3061) end \ No newline at end of file diff --git a/official/c49398568.lua b/official/c49398568.lua index f2522cbf30..23c15e0ab0 100644 --- a/official/c49398568.lua +++ b/official/c49398568.lua @@ -1,4 +1,5 @@ --連続魔法 +--Serial Spell local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) hg:RemoveCard(e:GetHandler()) if chk==0 then return #hg>0 and hg:FilterCount(s.cfilter,nil)==#hg end - Duel.SendtoGrave(hg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(hg,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ftg=re:GetTarget() @@ -37,4 +38,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local fop=re:GetOperation() fop(e,tp,eg,ep,ev,re,r,rp) -end +end \ No newline at end of file diff --git a/official/c4939890.lua b/official/c4939890.lua index e7112321f9..6dfd05a584 100644 --- a/official/c4939890.lua +++ b/official/c4939890.lua @@ -1,4 +1,5 @@ --シャドール・ヘッジホッグ +--Shaddoll Hedgehog local s,id=GetID() function s.initial_effect(c) --flip @@ -26,14 +27,14 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} s.listed_names={id} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function s.filter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -51,7 +52,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c49407319.lua b/official/c49407319.lua index ab9cfff1b9..2e002a5d36 100644 --- a/official/c49407319.lua +++ b/official/c49407319.lua @@ -76,4 +76,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,2000,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c4941482.lua b/official/c4941482.lua index 29a66cde93..be50e8aad3 100644 --- a/official/c4941482.lua +++ b/official/c4941482.lua @@ -1,4 +1,5 @@ --インフォーマー・スパイダー +--Informer Spider local s,id=GetID() function s.initial_effect(c) --control @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsDefensePos() and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c49441499.lua b/official/c49441499.lua index f903b53a91..42fba9037e 100644 --- a/official/c49441499.lua +++ b/official/c49441499.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -37,9 +37,9 @@ function s.initial_effect(c) end s.listed_names={34088136} s.LVnum=1 -s.LVset=0x5d +s.LVset=SET_ULTIMATE_INSECT function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) + return te:IsSpellEffect() end function s.regop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE|PHASE_END,0,1) @@ -47,25 +47,21 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id)==0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(34088136) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:RegisterFlagEffect(34088136,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE),0,0) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c49456901.lua b/official/c49456901.lua index 3d081e7382..682c6e1715 100644 --- a/official/c49456901.lua +++ b/official/c49456901.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -34,7 +34,7 @@ end s.xyz_number=104 s.listed_names={2061963} function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -52,13 +52,9 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp - and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and loc==LOCATION_MZONE and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,2061963) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -70,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) end -end +end \ No newline at end of file diff --git a/official/c49460512.lua b/official/c49460512.lua index e9f7ede736..619bea10b4 100644 --- a/official/c49460512.lua +++ b/official/c49460512.lua @@ -1,4 +1,5 @@ --BF-流離いのコガラシ +--Blackwing - Kogarashi the Wanderer local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.limitop) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.cfilter(c,tp) - return c:IsSetCard(0x33) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousPosition(POS_FACEUP) and (c:GetReason()&0x41)==0x41 + return c:IsSetCard(SET_BLACKWING) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + and c:IsPreviousPosition(POS_FACEUP) and (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -48,4 +49,4 @@ function s.limitop(e,tp,eg,ep,ev,re,r,rp) end function s.chainlm(e,rp,tp) return tp==rp -end +end \ No newline at end of file diff --git a/official/c49469105.lua b/official/c49469105.lua index a6d1433bae..98a7b27197 100644 --- a/official/c49469105.lua +++ b/official/c49469105.lua @@ -1,4 +1,5 @@ --融合破棄 +--Revoke Fusion local s,id=GetID() function s.initial_effect(c) --spsummon @@ -17,7 +18,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter1(c,g) return c.material and g:IsExists(s.filter2,1,nil,c) @@ -50,11 +51,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) sg:GetFirst():RegisterEffect(e1,true) end end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49477180.lua b/official/c49477180.lua index c382cdbfd8..911b8eb38a 100644 --- a/official/c49477180.lua +++ b/official/c49477180.lua @@ -1,7 +1,6 @@ --ヴェンデット・ストリゲス --Vendread Striges --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -25,10 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.mtop) c:RegisterEffect(e2) end -s.listed_series={0x106} - +s.listed_series={SET_VENDREAD} function s.spcfilter(c) - return c:IsSetCard(0x106) and not c:IsPublic() + return c:IsSetCard(SET_VENDREAD) and not c:IsPublic() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND,0,1,nil) end @@ -52,18 +50,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x106) + return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,SET_VENDREAD) and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x106) + local g=eg:Filter(Card.IsSetCard,nil,SET_VENDREAD) local rc=g:GetFirst() if not rc then return end local e1=Effect.CreateEffect(rc) @@ -73,17 +71,17 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLED) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -95,6 +93,6 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)~=0 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c49479374.lua b/official/c49479374.lua index 8b66fd7a25..3f9f45ecca 100644 --- a/official/c49479374.lua +++ b/official/c49479374.lua @@ -1,4 +1,5 @@ --急速充電器 +--Quick Charger local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.filter(c) - return c:IsSetCard(0x28) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_BATTERYMAN) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,2,2,nil) @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c494922.lua b/official/c494922.lua index c6f3139ff7..c88917c289 100644 --- a/official/c494922.lua +++ b/official/c494922.lua @@ -5,7 +5,7 @@ function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Synchro summon procedure - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,1,Synchro.NonTuner(Card.IsSetCard,0x9a),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,1,Synchro.NonTuner(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),1,99) --Attack while in defense position local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.setfilter(c,tp) return c:IsSpellTrap() and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) @@ -50,7 +50,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c49511705.lua b/official/c49511705.lua index 64052ff7e3..aa5643515b 100644 --- a/official/c49511705.lua +++ b/official/c49511705.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_GRAVE) e3:SetCondition(s.coincon1) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetOperation(s.coinop1) c:RegisterEffect(e3) end @@ -86,7 +86,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,hg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=hg:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(1-tp) end end @@ -118,4 +118,4 @@ function s.coinop2(e,tp,eg,ep,ev,re,r,rp) table.insert(res,COIN_HEADS) end Duel.SetCoinResult(table.unpack(res)) -end +end \ No newline at end of file diff --git a/official/c49513164.lua b/official/c49513164.lua index 43fd634026..c7dbbd7369 100644 --- a/official/c49513164.lua +++ b/official/c49513164.lua @@ -1,4 +1,5 @@ --召喚獣ライディーン +--Invoked Raidjin local s,id=GetID() function s.initial_effect(c) --fusion material @@ -33,4 +34,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c49522489.lua b/official/c49522489.lua index 88b1e14bd0..0f412d74b6 100644 --- a/official/c49522489.lua +++ b/official/c49522489.lua @@ -1,4 +1,5 @@ --悪魔ガエル +--Beelze Frog local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -13,4 +14,4 @@ end s.listed_names={10456559} function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,10456559)*300 -end +end \ No newline at end of file diff --git a/official/c49551909.lua b/official/c49551909.lua index 7ba2f004b4..f865fb23d6 100644 --- a/official/c49551909.lua +++ b/official/c49551909.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) + return c:IsFaceup() and c:IsSetCard(SET_HEROIC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.descon) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Battle damage is shared local e2=Effect.CreateEffect(c) @@ -54,14 +54,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.eqlimit(e,c) - return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(0x6f) + return c:GetControler()==e:GetOwnerPlayer() and c:IsSetCard(SET_HEROIC) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() @@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49568943.lua b/official/c49568943.lua index 6f87d46df8..6658f55532 100644 --- a/official/c49568943.lua +++ b/official/c49568943.lua @@ -1,5 +1,5 @@ --VV-真羅万象 ---Vaylantz Vorld - Shinra Bansho +--Vaylantz World - Shinra Bansho --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c49575521.lua b/official/c49575521.lua index d458562b56..99716f2be1 100644 --- a/official/c49575521.lua +++ b/official/c49575521.lua @@ -1,5 +1,5 @@ --ドラゴンメイド・フルス ---Dragonmaid Fluss +--Dragonmaid Nudyarl --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,21 +27,14 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} -function s.atkcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_DRAGONMAID} function s.tdfilter(c) return c:IsMonster() and c:IsAbleToDeck() end @@ -55,14 +48,14 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.incon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_FUSION),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:GetLevel()==2 and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==2 and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -79,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c49587034.lua b/official/c49587034.lua index a69778fe9c..e06efb18d0 100644 --- a/official/c49587034.lua +++ b/official/c49587034.lua @@ -26,14 +26,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,5) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,5) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) e1:SetLabel(0) card:RegisterEffect(e1) - card:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + card:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local descnum=tp==c:GetOwner() and 0 or 1 local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(e1) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,4) + e3:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_OPPO_TURN,4) c:RegisterEffect(e3) end end @@ -64,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c49597193.lua b/official/c49597193.lua index b5a7dfae6c..ad820e036d 100644 --- a/official/c49597193.lua +++ b/official/c49597193.lua @@ -1,9 +1,10 @@ --ジェムナイト・パーズ +--Gem-Knight Topaz local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,54620698,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047)) + Fusion.AddProcMix(c,false,false,54620698,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -29,8 +30,8 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end @@ -52,4 +53,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49600724.lua b/official/c49600724.lua index 3f30e04e47..dd07b54d46 100644 --- a/official/c49600724.lua +++ b/official/c49600724.lua @@ -1,4 +1,5 @@ --異次元への隙間 +--Crevice Into the Different Dimension local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,12 +19,12 @@ function s.filter1(c,g) return g:IsExists(Card.IsAttribute,1,c,c:GetAttribute()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc,e) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc,e) end if chk==0 then - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil,e) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil,e) return g:IsExists(s.filter1,1,nil,g) end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil,e) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil,e) local rg=g:Filter(s.filter1,nil,g) local tc=rg:GetFirst() local att=0 @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49633574.lua b/official/c49633574.lua index f67fde4897..602a08c898 100644 --- a/official/c49633574.lua +++ b/official/c49633574.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.spfilter(c,e,tp) - return c:IsSetCard(0x35) and c:IsMonster() and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:GetLevel()==3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -45,4 +45,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49645921.lua b/official/c49645921.lua index aa2626cf86..b9561c21ee 100644 --- a/official/c49645921.lua +++ b/official/c49645921.lua @@ -1,4 +1,5 @@ --セイバー・ビートル +--Saber Beetle local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c4965193.lua b/official/c4965193.lua index fa23041494..0794b847bd 100644 --- a/official/c4965193.lua +++ b/official/c4965193.lua @@ -108,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49655592.lua b/official/c49655592.lua index bf39513e62..e0860b1ceb 100644 --- a/official/c49655592.lua +++ b/official/c49655592.lua @@ -59,12 +59,12 @@ function s.initial_effect(c) e7:SetCondition(s.excon) c:RegisterEffect(e7) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkval(e,c) return c:GetLevel()*300 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -75,7 +75,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -84,7 +84,7 @@ function s.costchk(e,te_or_c,tp) return Duel.CheckLPCost(tp,ct*300) end function s.costtg(e,te,tp) - if not te:IsActiveType(TYPE_MONSTER) then return false end + if not te:IsMonsterEffect() then return false end local tc=te:GetHandler() local lv=e:GetHandler():GetLevel() if tc:GetRank()>0 then @@ -98,4 +98,4 @@ function s.costop(e,tp,eg,ep,ev,re,r,rp) end function s.excon(e) return e:GetHandler():IsLevelAbove(7) -end +end \ No newline at end of file diff --git a/official/c49658464.lua b/official/c49658464.lua index e86f1e26ee..35e2bc1980 100644 --- a/official/c49658464.lua +++ b/official/c49658464.lua @@ -1,5 +1,5 @@ --無千ジャミング ---Unlimited Free Radio Jamming +--Digit Jamming --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -38,9 +38,9 @@ function s.operation(check) local reset=0 if check then if not c:IsRelateToEffect(e) then return end - reset=RESET_EVENT+RESETS_STANDARD + reset=RESET_EVENT|RESETS_STANDARD else - reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END + reset=RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_END end local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) for tc in g:Iter() do diff --git a/official/c49669730.lua b/official/c49669730.lua index 6431d7658a..23056d93c7 100644 --- a/official/c49669730.lua +++ b/official/c49669730.lua @@ -1,4 +1,5 @@ --ウォーターハザード +--Water Hazard local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49674183.lua b/official/c49674183.lua index f19b24f945..4ac4566ef6 100644 --- a/official/c49674183.lua +++ b/official/c49674183.lua @@ -1,6 +1,5 @@ --魔天使ローズ・ソーサラー --Fallen Angel of Roses - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -15,7 +14,6 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} - function s.spfilter(c,ft) return c:IsFaceup() and c:IsRace(RACE_PLANT) and not c:IsCode(id) and c:IsAbleToHandAsCost() end @@ -46,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) e:GetHandler():RegisterEffect(e1,true) end \ No newline at end of file diff --git a/official/c49678559.lua b/official/c49678559.lua index 5eda9d5e46..71c266f884 100644 --- a/official/c49678559.lua +++ b/official/c49678559.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,10 +27,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=102 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -46,18 +42,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -73,8 +69,8 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) return true else return false end -end +end \ No newline at end of file diff --git a/official/c49680980.lua b/official/c49680980.lua index 51ca7f495b..2aca4fca0b 100644 --- a/official/c49680980.lua +++ b/official/c49680980.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -29,7 +29,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -70,11 +70,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -87,4 +83,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49681811.lua b/official/c49681811.lua index d7b68af9ee..79f1770225 100644 --- a/official/c49681811.lua +++ b/official/c49681811.lua @@ -1,4 +1,5 @@ --無敗将軍 フリード +--Freed the Matchless General local s,id=GetID() function s.initial_effect(c) --disable @@ -41,7 +42,7 @@ function s.distg(e,c) return c:GetCardTarget():IsContains(e:GetHandler()) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end + if not re:IsSpellEffect() then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g==0 then return end @@ -69,7 +70,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -84,4 +85,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c49684352.lua b/official/c49684352.lua index a8c8809c0c..19863e35d7 100644 --- a/official/c49684352.lua +++ b/official/c49684352.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x20f2} +s.listed_series={SET_PENDULUMGRAPH} function s.dbcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end @@ -45,13 +45,13 @@ function s.dbop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e1:SetCondition(s.damcon) e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) Duel.BreakEffect() Duel.Destroy(c,REASON_EFFECT) @@ -64,7 +64,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return r&REASON_EFFECT+REASON_BATTLE~=0 end function s.thfilter(c) - return c:IsSetCard(0x20f2) and c:IsAbleToHand() + return c:IsSetCard(SET_PENDULUMGRAPH) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c49689480.lua b/official/c49689480.lua index fed926ecff..3ce170c315 100644 --- a/official/c49689480.lua +++ b/official/c49689480.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) diff --git a/official/c49702428.lua b/official/c49702428.lua index 0d534359ef..8cd7828d4c 100644 --- a/official/c49702428.lua +++ b/official/c49702428.lua @@ -1,4 +1,5 @@ --黒・魔・導・爆・裂・破 +--Dark Burning Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x30a2} +s.listed_series={SET_DARK_MAGICIAN_GIRL} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x30a2) + return c:IsFaceup() and c:IsSetCard(SET_DARK_MAGICIAN_GIRL) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49721904.lua b/official/c49721904.lua index 8aefed4071..9ca912aae4 100644 --- a/official/c49721904.lua +++ b/official/c49721904.lua @@ -1,4 +1,5 @@ --真六武衆-キザン +--Legendary Six Samurai - Kizan local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,9 +23,9 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end @@ -32,9 +33,9 @@ function s.spcon(e,c) Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.valcon(e) local c=e:GetHandler() return Duel.IsExistingMatchingCard(s.vfilter,c:GetControler(),LOCATION_MZONE,0,2,c) -end +end \ No newline at end of file diff --git a/official/c49725936.lua b/official/c49725936.lua index dba574ce08..332de6f18f 100644 --- a/official/c49725936.lua +++ b/official/c49725936.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -41,7 +41,7 @@ end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -55,10 +55,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter1(c,e,tp) return c:IsLinkMonster() and c:IsLinkBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -86,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c49729312.lua b/official/c49729312.lua index 08993956c9..8fc250be34 100644 --- a/official/c49729312.lua +++ b/official/c49729312.lua @@ -1,5 +1,5 @@ --礫岩の霊長-コングレード ---Kongrade, Primate of Conglomerates +--Primineral Kongreat --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49752795.lua b/official/c49752795.lua index 20c8ac917f..28e0bf408d 100644 --- a/official/c49752795.lua +++ b/official/c49752795.lua @@ -1,5 +1,5 @@ --双天の再来 ---Dual Avatar Returns +--Dual Avatar Return --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x14e} +s.listed_series={SET_DUAL_AVATAR} s.listed_names={TOKEN_DUAL_AVATAR_SPIRIT} function s.filter(c,e,tp) - return c:IsSetCard(0x14e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DUAL_AVATAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chck:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -32,11 +32,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if tc:HasLevel() and tc:GetOriginalLevel()<5 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,0x14e,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,SET_DUAL_AVATAR,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() local token=Duel.CreateToken(tp,TOKEN_DUAL_AVATAR_SPIRIT) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c49771608.lua b/official/c49771608.lua index e6024ae594..a7d5397d9f 100644 --- a/official/c49771608.lua +++ b/official/c49771608.lua @@ -1,4 +1,5 @@ --吸収天児 +--Absorbing Kid from the Sky local s,id=GetID() function s.initial_effect(c) --recover @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49776811.lua b/official/c49776811.lua index 89ce64d4a0..acda173d59 100644 --- a/official/c49776811.lua +++ b/official/c49776811.lua @@ -1,5 +1,5 @@ --ピースリア ---Shinning Piecephilia +--Shining Piecephilia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -67,4 +67,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49785720.lua b/official/c49785720.lua index 9c41856679..fc3894e577 100644 --- a/official/c49785720.lua +++ b/official/c49785720.lua @@ -1,4 +1,5 @@ --機炎星-ゴヨウテ +--Brotherhood of the Fire Fist - Coyote local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() end function s.spcon(e,c) if c==nil then return true end @@ -20,4 +21,4 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_SZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c49808196.lua b/official/c49808196.lua index c047248296..f40e6a07f1 100644 --- a/official/c49808196.lua +++ b/official/c49808196.lua @@ -1,6 +1,5 @@ --メタボ・サッカー --Metabo Globster - local s,id=GetID() function s.initial_effect(c) --Special summon 3 tokens to your field @@ -35,7 +34,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) token:RegisterEffect(e1,true) end diff --git a/official/c49816630.lua b/official/c49816630.lua index 08e0092bc9..679c251c0d 100644 --- a/official/c49816630.lua +++ b/official/c49816630.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.tdcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) @@ -43,11 +43,6 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.tdfilter(c) return c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra() end @@ -89,7 +84,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(e,c) return e:GetOwner()==c end) c:RegisterEffect(e1) end @@ -108,4 +103,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c49820233.lua b/official/c49820233.lua index 9dbcd182cd..5abce63f6e 100644 --- a/official/c49820233.lua +++ b/official/c49820233.lua @@ -1,9 +1,10 @@ --EMガトリングール +--Performapal Gatlinghoul local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcFun2(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9f),s.ffilter,true) + Fusion.AddProcFun2(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PERFORMAPAL),s.ffilter,true) --destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -23,13 +24,13 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x9f} -s.material_setcode=0x9f +s.listed_series={SET_PERFORMAPAL} +s.material_setcode=SET_PERFORMAPAL function s.ffilter(c,fc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) and c:IsLevelAbove(5) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 end diff --git a/official/c49823708.lua b/official/c49823708.lua index 3c4ff5929f..bdaabb9fa8 100644 --- a/official/c49823708.lua +++ b/official/c49823708.lua @@ -1,4 +1,5 @@ --破壊剣士の伴竜 +--Buster Whelp of the Destruction Swordsman local s,id=GetID() function s.initial_effect(c) --search @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -28,15 +29,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) e3:SetCondition(s.spcon2) - e3:SetCost(s.spcost2) + e3:SetCost(Cost.SelfTribute2) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xd6} -s.listed_names={78193831} +s.listed_series={SET_DESTRUCTION_SWORD} +s.listed_names={CARD_BUSTER_BLADER} function s.filter(c) - return c:IsSetCard(0xd6) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DESTRUCTION_SWORD) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -50,37 +51,33 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsCode(78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsCode(CARD_BUSTER_BLADER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.cfilter(c) - return c:IsFaceup() and c:IsCode(78193831) + return c:IsFaceup() and c:IsCode(CARD_BUSTER_BLADER) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.costfilter(c) - return c:IsSetCard(0xd6) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_DESTRUCTION_SWORD) and c:IsAbleToGraveAsCost() end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) +function Cost.SelfTribute2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST) end @@ -94,4 +91,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49826746.lua b/official/c49826746.lua index bd2146d4e2..85557d3233 100644 --- a/official/c49826746.lua +++ b/official/c49826746.lua @@ -13,4 +13,4 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) c:RegisterEffect(e1) end -s.listed_names={CARD_ASSAULT_MODE} +s.listed_names={CARD_ASSAULT_MODE} \ No newline at end of file diff --git a/official/c49833312.lua b/official/c49833312.lua index 1c89b99b51..683daae218 100644 --- a/official/c49833312.lua +++ b/official/c49833312.lua @@ -1,4 +1,5 @@ --D・スクランブル +--Morphtronics, Scramble! local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49847524.lua b/official/c49847524.lua index 92903734d7..f561028416 100644 --- a/official/c49847524.lua +++ b/official/c49847524.lua @@ -15,5 +15,4 @@ function s.initial_effect(c) e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_LINK)) e1:SetValue(800) c:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c49868263.lua b/official/c49868263.lua index 17939ae78e..205ed93f88 100644 --- a/official/c49868263.lua +++ b/official/c49868263.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -47,10 +47,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP and Duel.IsChainDisablable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) @@ -59,7 +55,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateEffect(ev) end function s.disop2(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then + if re:IsSpellEffect() and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if g and g:IsContains(e:GetHandler()) then if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then @@ -71,4 +67,4 @@ end function s.distg2(e,c) return c:GetCardTargetCount()>0 and c:IsSpell() and c:GetCardTarget():IsContains(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c49879995.lua b/official/c49879995.lua index 59b640e90a..facdbae31e 100644 --- a/official/c49879995.lua +++ b/official/c49879995.lua @@ -1,4 +1,5 @@ --ファントム・ドラゴン +--Phantom Dragon local s,id=GetID() function s.initial_effect(c) --spsummon @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c49885567.lua b/official/c49885567.lua index 5ed1ce2bce..c848d00b32 100644 --- a/official/c49885567.lua +++ b/official/c49885567.lua @@ -1,4 +1,5 @@ --精霊獣 カンナホーク +--Spiritual Beast Cannahawk local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.filter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemove() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -29,9 +30,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) e1:SetLabel(0) @@ -39,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -48,4 +49,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) else e:SetLabel(1) end -end +end \ No newline at end of file diff --git a/official/c49905576.lua b/official/c49905576.lua index a46e0ed34c..5619606db4 100644 --- a/official/c49905576.lua +++ b/official/c49905576.lua @@ -19,4 +19,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4991081.lua b/official/c4991081.lua index 357e61b58b..6e3ead12e3 100644 --- a/official/c4991081.lua +++ b/official/c4991081.lua @@ -1,9 +1,9 @@ --- ハーピィズペット竜-セイント・ファイアー・ギガ --- Harpie's Pet Dragon - Fearsome Fire Blast --- scripted by Hatter +--ハーピィズペット竜-セイント・ファイアー・ギガ +--Harpie's Pet Dragon - Fearsome Fire Blast +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- monsters cannot target Harpies for attacks + --monsters cannot target Harpies for attacks local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetValue(s.atlimit) c:RegisterEffect(e1) - -- special summon itself from hand + --special summon itself from hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- send to GY + --send to GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOGRAVE) @@ -35,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.gyop) c:RegisterEffect(e3) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} function s.atlimit(e,c) - return c:IsFaceup() and c:IsLevelBelow(6) and c:IsSetCard(0x64) + return c:IsFaceup() and c:IsLevelBelow(6) and c:IsSetCard(SET_HARPIE) end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevelBelow(6) @@ -72,4 +72,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49919798.lua b/official/c49919798.lua index 091b7bceb7..64b53cb69f 100644 --- a/official/c49919798.lua +++ b/official/c49919798.lua @@ -28,15 +28,15 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0x1066) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SYMPHONIC_WARRIOR) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -51,13 +51,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cpfilter(c) - return c:IsFaceup() and c:IsMonster() and c:IsOriginalSetCard(0x1066) and not c:IsOriginalCode(id) + return c:IsFaceup() and c:IsMonster() and c:IsOriginalSetCard(SET_SYMPHONIC_WARRIOR) and not c:IsOriginalCode(id) end function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.cpfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.cpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.cpfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.cpfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,s.cpfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + Duel.SelectTarget(tp,s.cpfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) end function s.cpop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,13 +70,13 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1066) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end diff --git a/official/c49922726.lua b/official/c49922726.lua index a60cc3ab35..b676db3eb5 100644 --- a/official/c49922726.lua +++ b/official/c49922726.lua @@ -36,7 +36,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(100*ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.desfilter(c) @@ -57,7 +57,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then @@ -67,11 +67,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(-c:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if def~=0 and tc:IsDefense(0) then Duel.BreakEffect() Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c49928686.lua b/official/c49928686.lua index 2f278b266a..d43c04d9d9 100644 --- a/official/c49928686.lua +++ b/official/c49928686.lua @@ -1,9 +1,9 @@ --- スプライト・ピクシーズ --- Spright Pixies --- Scripted by Hatter +--スプライト・ピクシーズ +--Spright Pixies +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,16 +12,16 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Boost ATK/DEF of battling monster + --Boost ATK/DEF of battling monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.SelfToGrave) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -38,16 +38,11 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return a and d and a:IsFaceup() and d:IsFaceup() and a~=e:GetHandler() and (a:IsLevel(2) or a:IsRank(2) or a:IsLink(2)) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local a,d=Duel.GetBattleMonster(tp) if a and d and a:IsRelateToBattle() and a:IsFaceup() and d:IsRelateToBattle() and d:IsFaceup() and d:IsControler(1-tp) then - -- Increase ATK/DEF + --Increase ATK/DEF local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) diff --git a/official/c49936169.lua b/official/c49936169.lua index 20a8567f90..de01b82a84 100644 --- a/official/c49936169.lua +++ b/official/c49936169.lua @@ -17,20 +17,20 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x107,0xb2} +s.listed_series={SET_FA,SET_UA} function s.thfilter(c) - return c:IsAbleToHand() and c:IsMonster() and (c:IsSetCard(0x107) or c:IsSetCard(0xb2)) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) + return c:IsAbleToHand() and c:IsMonster() and (c:IsSetCard(SET_FA) or c:IsSetCard(SET_UA)) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) end function s.tdfilter(c) - return c:IsAbleToDeck() and c:IsMonster() and not c:IsPublic() and (c:IsSetCard(0x107) or c:IsSetCard(0xb2)) + return c:IsAbleToDeck() and c:IsMonster() and not c:IsPublic() and c:IsSetCard({SET_FA,SET_UA}) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -50,4 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c49941059.lua b/official/c49941059.lua index 5ca6ef4757..23066b4dcc 100644 --- a/official/c49941059.lua +++ b/official/c49941059.lua @@ -1,7 +1,6 @@ --奇跡のマジック・ゲート --Magic Gate of Miracles --Updated by Larry126 - local s,id=GetID() function s.initial_effect(c) --Change 1 of opponent's attack positions to defense position, then take control of it @@ -39,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end diff --git a/official/c49959355.lua b/official/c49959355.lua index a666cd6738..06c3d672d2 100644 --- a/official/c49959355.lua +++ b/official/c49959355.lua @@ -43,7 +43,7 @@ function s.lvtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.lvop1(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) @@ -51,7 +51,7 @@ function s.lvop1(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -77,7 +77,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(e:GetHandler()) @@ -85,15 +85,15 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.atktg) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,2)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end function s.atktg(e,c) return not c:IsRace(RACE_ZOMBIE) -end +end \ No newline at end of file diff --git a/official/c49964567.lua b/official/c49964567.lua index 221d2802e5..3b7df20242 100644 --- a/official/c49964567.lua +++ b/official/c49964567.lua @@ -1,5 +1,5 @@ --ステイセイラ・ロマリン ---Staysailor Romaryne +--Staysailor Romarin --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.trgtfilter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,c) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,c) end function s.tgfilter(c) return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsAbleToGrave() @@ -54,7 +54,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetValue(s.indval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end end @@ -69,13 +69,13 @@ function s.grfilter(c) return c:IsLevelBelow(5) and c:HasLevel() and c:IsRace(RACE_PLANT) and c:IsAbleToGrave() end function s.grtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.grfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + if chk==0 then return Duel.IsExistingMatchingCard(s.grfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.grop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.grfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.grfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c49966326.lua b/official/c49966326.lua index 11076a18ca..8a33d5776f 100644 --- a/official/c49966326.lua +++ b/official/c49966326.lua @@ -15,17 +15,17 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x150} +s.listed_series={SET_VIRTUAL_WORLD} s.listed_names={id} local key=TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP function s.tgtfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x150) and Duel.IsExistingMatchingCard(s.tgvfilter,tp,LOCATION_DECK,0,1,nil,c:GetType()&key) + return c:IsFaceup() and c:IsSetCard(SET_VIRTUAL_WORLD) and Duel.IsExistingMatchingCard(s.tgvfilter,tp,LOCATION_DECK,0,1,nil,c:GetType()&key) end function s.tgvfilter(c,type1) - return c:IsAbleToGrave() and c:IsSetCard(0x150) and not c:IsType(type1) + return c:IsAbleToGrave() and c:IsSetCard(SET_VIRTUAL_WORLD) and not c:IsType(type1) end function s.tgvfilter2(c,type1,type2) - return c:IsAbleToGrave() and c:IsSetCard(0x150) and not c:IsType(type1) and not c:IsType(type2) and not c:IsCode(id) + return c:IsAbleToGrave() and c:IsSetCard(SET_VIRTUAL_WORLD) and not c:IsType(type1) and not c:IsType(type2) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.tgtfilter(chkc,tp) end @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e0,tp) aux.RegisterClientHint(c,EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,1),nil) local tc=Duel.GetFirstTarget() @@ -71,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c) return not (c:IsLevelAbove(3) or c:IsRankAbove(3)) -end +end \ No newline at end of file diff --git a/official/c49966595.lua b/official/c49966595.lua index 257170a7a4..90d3f5e010 100644 --- a/official/c49966595.lua +++ b/official/c49966595.lua @@ -32,12 +32,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xd1} +s.listed_series={SET_GRAYDLE} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_GRAYDLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 @@ -57,7 +57,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) local c=Duel.GetAttacker() - return c:IsControler(tp) and c:IsSetCard(0xd1) and Duel.GetAttackTarget()==nil + return c:IsControler(tp) and c:IsSetCard(SET_GRAYDLE) and Duel.GetAttackTarget()==nil end function s.spfilter2(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) @@ -79,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c4997565.lua b/official/c4997565.lua index 54e5b55e1c..6c3fe26451 100644 --- a/official/c4997565.lua +++ b/official/c4997565.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -37,13 +37,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end @@ -51,7 +51,7 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local rc=re:GetHandler() - return (loc&LOCATION_ONFIELD)~=0 and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNegatableMonster() + return (loc&LOCATION_ONFIELD)~=0 and re:IsMonsterEffect() and re:GetHandler():IsNegatableMonster() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:GetHandler():IsRelateToEffect(re) and rc:IsCanBeEffectTarget(e) end @@ -73,7 +73,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.Clone(e1) e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -93,7 +93,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(500) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e3) end end diff --git a/official/c49980185.lua b/official/c49980185.lua index 83eb4ced3e..93cf736e94 100644 --- a/official/c49980185.lua +++ b/official/c49980185.lua @@ -1,4 +1,5 @@ --超能力治療 +--Supernatural Regeneration local s,id=GetID() function s.initial_effect(c) --recover @@ -28,7 +29,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) s[0]=s[0]+eg:FilterCount(Card.IsRace,nil,RACE_PSYCHIC) end function s.reccon(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return s[0]~=0 end @@ -39,4 +40,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,s[0]*1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c4998619.lua b/official/c4998619.lua index 24ff045beb..bbeefb6eca 100644 --- a/official/c4998619.lua +++ b/official/c4998619.lua @@ -37,9 +37,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop2) c:RegisterEffect(e4) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -67,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -75,7 +75,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CUBIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -87,10 +87,10 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,#g,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0xe3) and c:IsAbleToHand() + return c:IsSetCard(SET_CUBIC) and c:IsAbleToHand() end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -102,7 +102,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) g=g:Select(tp,ft,ft,nil) end if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) sg=sg:Select(tp,1,1,nil) @@ -112,4 +112,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(tp) end end -end +end \ No newline at end of file diff --git a/official/c49998907.lua b/official/c49998907.lua index ff0c95d02a..950243d586 100644 --- a/official/c49998907.lua +++ b/official/c49998907.lua @@ -15,4 +15,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SortDecktop(tp,tp,3) -end +end \ No newline at end of file diff --git a/official/c50005218.lua b/official/c50005218.lua index 8e18659c0d..45df47acb4 100644 --- a/official/c50005218.lua +++ b/official/c50005218.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x1115,0x115} +s.listed_series={SET_SKY_STRIKER_ACE,SET_SKY_STRIKER} function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=c end @@ -47,8 +47,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmDecktop(tp,3) local g=Duel.GetDecktopGroup(tp,3) if #g>0 then - local g1=g:Filter(Card.IsSetCard,nil,0x115) - if g:IsExists(Card.IsSetCard,1,nil,0x115) then + local g1=g:Filter(Card.IsSetCard,nil,SET_SKY_STRIKER) + if g:IsExists(Card.IsSetCard,1,nil,SET_SKY_STRIKER) then if g1:IsExists(Card.IsAbleToHand,1,nil) then if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -60,7 +60,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end Duel.ShuffleDeck(tp) - if g:IsExists(Card.IsSetCard,1,nil,0x115) and tc:IsRelateToEffect(e) then + if g:IsExists(Card.IsSetCard,1,nil,SET_SKY_STRIKER) and tc:IsRelateToEffect(e) then Duel.BreakEffect() Duel.SendtoGrave(tc,REASON_EFFECT) end @@ -71,7 +71,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_FZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1115) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SKY_STRIKER_ACE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50032342.lua b/official/c50032342.lua index 8639aa813e..98f9edbbf7 100644 --- a/official/c50032342.lua +++ b/official/c50032342.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.cfilter(c) - return c:IsSetCard(0x2f) and c:IsMonster() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -28,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50042011.lua b/official/c50042011.lua index f5a9809370..4bdaaa1638 100644 --- a/official/c50042011.lua +++ b/official/c50042011.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c50045299.lua b/official/c50045299.lua index d1383f49a1..8d4e24a03f 100644 --- a/official/c50045299.lua +++ b/official/c50045299.lua @@ -1,4 +1,5 @@ --ドラゴン族・封印の壺 +--Dragon Capture Jar local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsRace(RACE_DRAGON) -end +end \ No newline at end of file diff --git a/official/c50065971.lua b/official/c50065971.lua index 0d423210e9..149d415ee4 100644 --- a/official/c50065971.lua +++ b/official/c50065971.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetRange(LOCATION_GRAVE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetCountLimit(1) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) @@ -39,7 +39,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.dircon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) and not e:GetHandler():IsHasEffect(EFFECT_DIRECT_ATTACK) end function s.dirop(e,tp,eg,ep,ev,re,r,rp) @@ -48,7 +48,7 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(c:GetBaseDefense()/2) c:RegisterEffect(e1) -- @@ -56,19 +56,19 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end function s.spreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if (r&REASON_EFFECT+REASON_DESTROY)~=REASON_EFFECT+REASON_DESTROY then return end - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50074522.lua b/official/c50074522.lua index 0b7c87bc5e..088f94c00c 100644 --- a/official/c50074522.lua +++ b/official/c50074522.lua @@ -1,4 +1,5 @@ --電磁蚊 +--Magnetic Mosquito local s,id=GetID() function s.initial_effect(c) --flip @@ -17,4 +18,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50078320.lua b/official/c50078320.lua index d2c50cc9d7..7570664db7 100644 --- a/official/c50078320.lua +++ b/official/c50078320.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.declcon) - e1:SetCost(s.declcost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.declop) c:RegisterEffect(e1) --Destroy 1 face-up card on the field during the End Phase of the next turn @@ -30,11 +30,6 @@ function s.declcon(e,tp,eg,ep,ev,re,r,rp) local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE) return rp==1-tp and ex and (cv&ANNOUNCE_CARD+ANNOUNCE_CARD_FILTER)~=0 end -function s.declcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.declop(e,tp,eg,ep,ev,re,r,rp) local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE) local ac=0 @@ -67,4 +62,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) nil,2,aux.Stringid(id,2) ) end -end +end \ No newline at end of file diff --git a/official/c50078509.lua b/official/c50078509.lua index f272565e9a..d075bee3ac 100644 --- a/official/c50078509.lua +++ b/official/c50078509.lua @@ -1,7 +1,8 @@ --デモンズ・チェーン +--Fiendish Chain local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,nil,s.filter,CATEGORY_DISABLE,nil,nil,0x1c0,nil,nil,s.target) + aux.AddPersistentProcedure(c,nil,s.filter,CATEGORY_DISABLE,nil,nil,TIMINGS_CHECK_MONSTER,nil,nil,s.target) --disable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) @@ -38,4 +39,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50088247.lua b/official/c50088247.lua index b433461366..c3b075fa1e 100644 --- a/official/c50088247.lua +++ b/official/c50088247.lua @@ -1,4 +1,5 @@ --氷結界の伝道師 +--Prior of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,18 +18,18 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(s.spcost2) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.counterfilter(c) return not c:IsLevelAbove(5) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) + return c:IsFaceup() and c:IsSetCard(SET_ICE_BARRIER) end function s.spcon(e,c) if c==nil then return true end @@ -42,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) @@ -50,12 +51,8 @@ end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLevelAbove(5) end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x2f) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICE_BARRIER) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -70,4 +67,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5008836.lua b/official/c5008836.lua index aac8309b6f..744bc1c525 100644 --- a/official/c5008836.lua +++ b/official/c5008836.lua @@ -75,7 +75,7 @@ function s.valcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) @@ -85,4 +85,4 @@ function s.valcheck(e,c) end function s.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) -end +end \ No newline at end of file diff --git a/official/c50091196.lua b/official/c50091196.lua index 794a677bb9..0566f8e759 100644 --- a/official/c50091196.lua +++ b/official/c50091196.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.sccon) e2:SetTarget(s.sctarg) @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.drtarg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -43,7 +43,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -61,4 +61,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c5010422.lua b/official/c5010422.lua index d8c161dfb8..7aadb8f1e8 100644 --- a/official/c5010422.lua +++ b/official/c5010422.lua @@ -1,4 +1,5 @@ --占術姫ウィジャモリガン +--Prediction Princess Astromorrigan local s,id=GetID() function s.initial_effect(c) --flip @@ -15,7 +16,7 @@ function s.flipop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.desfilter(c) @@ -28,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50122883.lua b/official/c50122883.lua index 3eb8c80817..56f05cb593 100644 --- a/official/c50122883.lua +++ b/official/c50122883.lua @@ -1,4 +1,5 @@ --朱い靴 +--Bite Shoes local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c50134646.lua b/official/c50134646.lua index 7de4149944..8317ddd29f 100644 --- a/official/c50134646.lua +++ b/official/c50134646.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.plcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.trappltg) e2:SetOperation(s.trapplop) c:RegisterEffect(e2) diff --git a/official/c50139096.lua b/official/c50139096.lua index fbc5fc0ba1..57f0c58055 100644 --- a/official/c50139096.lua +++ b/official/c50139096.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e0:SetCode(EFFECT_CHANGE_CODE) - e0:SetRange(LOCATION_MZONE+LOCATION_HAND) + e0:SetRange(LOCATION_MZONE|LOCATION_HAND) e0:SetValue(46427957) c:RegisterEffect(e0) --Multiple attacks @@ -32,7 +32,7 @@ function s.initial_effect(c) end s.listed_names={32828635,46427957} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return Duel.IsAbleToEnterBP() and e:GetHandler():IsRitualSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,7 +43,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -65,7 +65,7 @@ function s.aclimop(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.actop) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.actcon(e,tp,eg,ep,ev,re,r,rp) @@ -86,7 +86,7 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.actlimitcon) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.actlimitcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c5014629.lua b/official/c5014629.lua index 85e8a4bba2..00eee45f68 100644 --- a/official/c5014629.lua +++ b/official/c5014629.lua @@ -1,4 +1,5 @@ --潜航母艦エアロ・シャーク +--Submersible Carrier Aero Shark local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.damcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsMonster() end @@ -34,4 +31,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_REMOVED,0,nil) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,ct*100,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50152549.lua b/official/c50152549.lua index ff8c824c22..3acd1946ef 100644 --- a/official/c50152549.lua +++ b/official/c50152549.lua @@ -1,4 +1,5 @@ --しびれ薬 +--Paralyzing Potion local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.filter(c) return not c:IsRace(RACE_MACHINE) -end +end \ No newline at end of file diff --git a/official/c50155385.lua b/official/c50155385.lua index 95ff1787e6..ac7b8e5779 100644 --- a/official/c50155385.lua +++ b/official/c50155385.lua @@ -1,4 +1,5 @@ --スピリチューアル・ウィスパー +--Spiritual Whisper local s,id=GetID() function s.initial_effect(c) --battle indes @@ -25,7 +26,7 @@ function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.filter(c) return c:IsType(TYPE_RITUAL) and c:IsAbleToHand() @@ -41,4 +42,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c50164989.lua b/official/c50164989.lua index 4117712129..d88c2b0e6b 100644 --- a/official/c50164989.lua +++ b/official/c50164989.lua @@ -1,4 +1,5 @@ --ダーク・ヴァージャー +--Dark Verger local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c50179591.lua b/official/c50179591.lua index 13360dc466..d34a183097 100644 --- a/official/c50179591.lua +++ b/official/c50179591.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.rmop2) c:RegisterEffect(e2) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x10ec) + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.rmcon1) e1:SetOperation(s.rmop1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -82,4 +82,4 @@ function s.rmop2(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(mg,POS_FACEUP,REASON_EFFECT) end Duel.ShuffleExtra(1-tp) -end +end \ No newline at end of file diff --git a/official/c50185950.lua b/official/c50185950.lua index 35020ab0d3..f8f8a3fe92 100644 --- a/official/c50185950.lua +++ b/official/c50185950.lua @@ -45,5 +45,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c50186558.lua b/official/c50186558.lua index 31375fbe95..70cb906a6f 100644 --- a/official/c50186558.lua +++ b/official/c50186558.lua @@ -47,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -60,22 +60,22 @@ function s.atkval(e,c) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsRace(RACE_DRAGON) - and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.tgfilter(c) return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave() end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) and #eg==1 - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local sg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.Hint(HINT_CARD,0,id) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_REPLACE) return true else return false end end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c50213848.lua b/official/c50213848.lua index 92603ae364..6493c73767 100644 --- a/official/c50213848.lua +++ b/official/c50213848.lua @@ -18,7 +18,7 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,69832741) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,3,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,3,3,nil,e,tp) @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Remove(g-sg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50215517.lua b/official/c50215517.lua index 68019f1235..eb26fc34e5 100644 --- a/official/c50215517.lua +++ b/official/c50215517.lua @@ -1,4 +1,5 @@ --クリムゾン・ヘル・セキュア +--Scarlet Security local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={70902743} +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} function s.cfilter(c) - return c:IsFaceup() and c:IsCode(70902743) + return c:IsFaceup() and c:IsCode(CARD_RED_DRAGON_ARCHFIEND) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50237654.lua b/official/c50237654.lua index 57b1387b8d..ccaa3c4b4e 100644 --- a/official/c50237654.lua +++ b/official/c50237654.lua @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c50243722.lua b/official/c50243722.lua index 50965c78b6..ccd51d2a35 100644 --- a/official/c50243722.lua +++ b/official/c50243722.lua @@ -1,4 +1,5 @@ --バースト・リバース +--Burst Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.filter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c50259460.lua b/official/c50259460.lua index 6deae4c0cf..82f654a14f 100644 --- a/official/c50259460.lua +++ b/official/c50259460.lua @@ -1,4 +1,5 @@ --破壊神 ヴァサーゴ +--Versago the Destroyer local s,id=GetID() function s.initial_effect(c) --fusion substitute @@ -9,5 +10,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end + return e:GetHandler():IsLocation(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c50260683.lua b/official/c50260683.lua index 3fa63f8ecb..c10b8cc20e 100644 --- a/official/c50260683.lua +++ b/official/c50260683.lua @@ -1,8 +1,9 @@ --No.36 先史遺産-超機関フォーク=ヒューク +--Number 36: Chronomaly Chateau Huyuk local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x70),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CHRONOMALY),4,2) c:EnableReviveLimit() --atkdown local e1=Effect.CreateEffect(c) @@ -14,8 +15,8 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,15 +32,8 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} s.xyz_number=36 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end @@ -56,12 +50,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.cfilter(c) - return c:IsSetCard(0x70) + return c:IsSetCard(SET_CHRONOMALY) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(s.filter2,tp,0,LOCATION_MZONE,nil,e) @@ -84,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()~=tc:GetBaseAttack() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5026221.lua b/official/c5026221.lua index 26445df571..c9c2a59ffb 100644 --- a/official/c5026221.lua +++ b/official/c5026221.lua @@ -20,17 +20,17 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - if Duel.GetTurnPlayer()==tp then - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + if Duel.IsTurnPlayer(tp) then + return Duel.IsMainPhase() else - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end end function s.filter(c,e,tp) - return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50263751.lua b/official/c50263751.lua index 8b44369c39..7fe29bad48 100644 --- a/official/c50263751.lua +++ b/official/c50263751.lua @@ -1,4 +1,5 @@ --グリード・クエーサー +--Greed Quasar local s,id=GetID() function s.initial_effect(c) --base attack @@ -36,9 +37,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) e:SetLabelObject(e1) e:SetLabel(lv) else @@ -48,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) pe:SetValue(ct) end end -end +end \ No newline at end of file diff --git a/official/c50275295.lua b/official/c50275295.lua index 268e342d84..a4ed368848 100644 --- a/official/c50275295.lua +++ b/official/c50275295.lua @@ -1,5 +1,5 @@ --電脳堺門-青龍 ---Datascape Gate - Qinglong +--Virtual World Gate - Qinglong --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -27,19 +27,19 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x150} +s.listed_series={SET_VIRTUAL_WORLD} function s.costfilter(c) - return c:IsSetCard(0x150) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.ngcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,18 +56,18 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.thfilter(c) - return c:IsSetCard(0x150) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -82,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50277355.lua b/official/c50277355.lua index 7243d4dd6b..3db36e4c8a 100644 --- a/official/c50277355.lua +++ b/official/c50277355.lua @@ -70,7 +70,7 @@ function s.ritop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,2,REASON_EFFECT)==2 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,2,2,REASON_EFFECT|REASON_DISCARD) end end function s.fusop(e,tp,eg,ep,ev,re,r,rp) @@ -111,4 +111,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() s.xyzop(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c50278554.lua b/official/c50278554.lua index b5726e6783..70b90b5299 100644 --- a/official/c50278554.lua +++ b/official/c50278554.lua @@ -1,8 +1,9 @@ --スクラップ・ツイン・ドラゴン +--Scrap Twin Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x24),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SCRAP),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --Destroy local e1=Effect.CreateEffect(c) @@ -27,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) @@ -53,7 +54,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and tp~=crp and crp~=PLAYER_NONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x24) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SCRAP) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -67,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50281477.lua b/official/c50281477.lua index 0580e518be..cdaecb69fc 100644 --- a/official/c50281477.lua +++ b/official/c50281477.lua @@ -1,4 +1,4 @@ --- +--ティスティナの瘴神 --Tainted of the Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c50282757.lua b/official/c50282757.lua index b3f4ed08c0..2985562199 100644 --- a/official/c50282757.lua +++ b/official/c50282757.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCondition(s.condition) e2:SetTarget(s.target) @@ -42,7 +42,7 @@ function s.initial_effect(c) e3:SetValue(s.indesval) c:RegisterEffect(e3) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} s.dark_calling=true s.listed_names={CARD_DARK_FUSION,58932615,84327329} function s.lizcon(e,tp,eg,ep,ev,re,r,rp) @@ -50,7 +50,7 @@ function s.lizcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),EFFECT_SUPREME_CASTLE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) and Duel.GetTurnPlayer()==tp + return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) and Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,5 +64,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.indesval(e,re) - return re:IsActiveType(TYPE_SPELL) -end + return re:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c50287060.lua b/official/c50287060.lua index 4c48fc16bc..e425fdca2a 100644 --- a/official/c50287060.lua +++ b/official/c50287060.lua @@ -1,4 +1,5 @@ --暗黒魔族ギルファー・デーモン +--Archfiend of Gilfer local s,id=GetID() function s.initial_effect(c) --equip @@ -35,14 +36,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c50292967.lua b/official/c50292967.lua index 90de4754be..acfe29ebdc 100644 --- a/official/c50292967.lua +++ b/official/c50292967.lua @@ -1,4 +1,5 @@ --パスト・イメージ +--Past Image local s,id=GetID() function s.initial_effect(c) --remove @@ -25,11 +26,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c50304345.lua b/official/c50304345.lua index db4d993c48..b45d84ee81 100644 --- a/official/c50304345.lua +++ b/official/c50304345.lua @@ -1,4 +1,5 @@ --E-HERO ヘル・ブラット +--Evil HERO Infernal Prodigy local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 @@ -26,7 +27,7 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=e:GetHandler():GetReasonCard() - if r==REASON_SUMMON and rc:IsSetCard(0x8) then + if r==REASON_SUMMON and rc:IsSetCard(SET_HERO) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) @@ -36,7 +37,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.drtarget) e1:SetOperation(s.droperation) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -49,4 +50,4 @@ end function s.droperation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Draw(p,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50311058.lua b/official/c50311058.lua index d1119b826a..69290207f3 100644 --- a/official/c50311058.lua +++ b/official/c50311058.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) @@ -30,7 +30,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e2:SetCondition(function(_,tp) return Duel.IsExistingMatchingCard(s.gfilter,tp,LOCATION_MZONE,0,1,nil) end) e2:SetTarget(s.dttg) e2:SetOperation(s.dtop) @@ -76,4 +76,4 @@ function s.dtop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) end -end +end \ No newline at end of file diff --git a/official/c50319138.lua b/official/c50319138.lua index 7818f44a8f..09356cc68a 100644 --- a/official/c50319138.lua +++ b/official/c50319138.lua @@ -1,4 +1,5 @@ --バグマンZ +--Crashbug Z local s,id=GetID() function s.initial_effect(c) --spsummon @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50321796.lua b/official/c50321796.lua index 3dcc001c89..1b6e7d8eb8 100644 --- a/official/c50321796.lua +++ b/official/c50321796.lua @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if #rg>0 then Duel.SendtoHand(rg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50323155.lua b/official/c50323155.lua index 29c92fc8fb..26224089a8 100644 --- a/official/c50323155.lua +++ b/official/c50323155.lua @@ -23,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50354944.lua b/official/c50354944.lua index 8417fba9ef..9781d442f3 100644 --- a/official/c50354944.lua +++ b/official/c50354944.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetHintTiming(TIMING_DAMAGE_STEP) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.atkcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -71,7 +71,7 @@ function s.atkfilter(c) end --Check if it is the battle phase function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end --Activation legality function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -88,7 +88,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50371210.lua b/official/c50371210.lua index e31ebc671e..d1cd86aad2 100644 --- a/official/c50371210.lua +++ b/official/c50371210.lua @@ -1,4 +1,5 @@ --光の導き +--Beacon of White local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,13 +32,13 @@ function s.initial_effect(c) e4:SetTarget(s.ftarget) c:RegisterEffect(e4) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLUE_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.gvfilter(c) - return c:IsSetCard(0xdd) + return c:IsSetCard(SET_BLUE_EYES) end function s.cfilter(c) return c:IsFaceup() and c:IsCode(id) @@ -67,14 +68,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) --Disable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_DISABLE_EFFECT) @@ -92,6 +93,6 @@ function s.ftarget(e,c) return e:GetHandler():GetEquipTarget()~=c end function s.val(e,c) - local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,0xdd) + local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,SET_BLUE_EYES) return math.max(0,ct-1) -end +end \ No newline at end of file diff --git a/official/c5037726.lua b/official/c5037726.lua index 0e0a731415..e51bc5da8b 100644 --- a/official/c5037726.lua +++ b/official/c5037726.lua @@ -1,4 +1,5 @@ --光霊術-「聖」 +--Spiritual Light Art - Hijiri local s,id=GetID() function s.initial_effect(c) --Activate @@ -67,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50383626.lua b/official/c50383626.lua index e3a0bd2381..e2089a3971 100644 --- a/official/c50383626.lua +++ b/official/c50383626.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_RELEASE) e4:SetProperty(EFFECT_FLAG_DELAY) - e4:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e4:SetRange(LOCATION_HAND|LOCATION_GRAVE) e4:SetCountLimit(1,id) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) @@ -89,9 +89,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_HAND,0,1,1,nil) if #g>0 then if Duel.SelectOption(1-tp,aux.Stringid(id,2),aux.Stringid(id,3))==0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end end \ No newline at end of file diff --git a/official/c50400231.lua b/official/c50400231.lua index 8edd90b9fb..02ea76cf1d 100644 --- a/official/c50400231.lua +++ b/official/c50400231.lua @@ -1,4 +1,5 @@ --サテライト・キャノン +--Satellite Cannon local s,id=GetID() function s.initial_effect(c) --ind @@ -28,7 +29,7 @@ function s.indval(e,c) return c:IsLevelBelow(7) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -37,7 +38,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -46,4 +47,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c==Duel.GetAttacker() then c:ResetEffect(RESET_DISABLE,RESET_EVENT) end -end +end \ No newline at end of file diff --git a/official/c50407691.lua b/official/c50407691.lua index c446534ca9..326babc5da 100644 --- a/official/c50407691.lua +++ b/official/c50407691.lua @@ -1,4 +1,5 @@ --イグナイト・ライオット +--Igknight Margrave local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c50412166.lua b/official/c50412166.lua index c707abdb04..ccd5b91dbf 100644 --- a/official/c50412166.lua +++ b/official/c50412166.lua @@ -1,4 +1,5 @@ --シャブティのお守り +--Charm of Shabti local s,id=GetID() function s.initial_effect(c) --indes @@ -8,29 +9,25 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return ph~=PHASE_MAIN2 and ph~=PHASE_END end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.tgfilter) e1:SetValue(1) Duel.RegisterEffect(e1,tp) end function s.tgfilter(e,c) - return c:IsSetCard(0x2e) -end + return c:IsSetCard(SET_GRAVEKEEPERS) +end \ No newline at end of file diff --git a/official/c5041348.lua b/official/c5041348.lua index 2993bb65f5..e5db6bc6a9 100644 --- a/official/c5041348.lua +++ b/official/c5041348.lua @@ -1,7 +1,6 @@ --天威の龍鬼神 --Draco Berserker of the Tenyi --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -33,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRelateToEffect(re) + return rp==1-tp and re:IsMonsterEffect() and re:GetHandler():IsRelateToEffect(re) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() @@ -69,7 +68,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(value) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end --Can make a second attack on monsters @@ -78,10 +77,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_EXTRA_ATTACK) e3:SetValue(1) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c50418970.lua b/official/c50418970.lua index 5692c4b450..5d5ee89487 100644 --- a/official/c50418970.lua +++ b/official/c50418970.lua @@ -1,4 +1,5 @@ --スピリット・バーナー +--Spirit Burner local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -73,7 +74,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -86,4 +87,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c50426119.lua b/official/c50426119.lua index 780f29ec1c..19f1d795c1 100644 --- a/official/c50426119.lua +++ b/official/c50426119.lua @@ -32,11 +32,11 @@ end function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sprtg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -64,12 +64,12 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -82,4 +82,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c50427388.lua b/official/c50427388.lua index 4930e98f87..13a27c6c76 100644 --- a/official/c50427388.lua +++ b/official/c50427388.lua @@ -1,4 +1,5 @@ --暴走する魔力 +--That Wacky Magic! local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,4 +38,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5043010.lua b/official/c5043010.lua index 9b747bac93..da2c9d1d52 100644 --- a/official/c5043010.lua +++ b/official/c5043010.lua @@ -93,4 +93,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50433147.lua b/official/c50433147.lua index 2ae4a07f26..f097c651fd 100644 --- a/official/c50433147.lua +++ b/official/c50433147.lua @@ -1,4 +1,5 @@ --極星の輝き +--The Nordic Lights local s,id=GetID() function s.initial_effect(c) --activate @@ -26,15 +27,15 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.indtg(e,c) - return c:IsSetCard(0x42) + return c:IsSetCard(SET_NORDIC) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x42) + return c:IsFaceup() and c:IsSetCard(SET_NORDIC) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,4 +45,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50449881.lua b/official/c50449881.lua index f789cbc5ab..fab9815a61 100644 --- a/official/c50449881.lua +++ b/official/c50449881.lua @@ -1,6 +1,5 @@ --シャーク・フォートレス --Shark Fortress - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,10 +30,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end @@ -53,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c50457953.lua b/official/c50457953.lua index 377db8aaca..66986c5bbb 100644 --- a/official/c50457953.lua +++ b/official/c50457953.lua @@ -1,4 +1,5 @@ --幻木龙 +--Mythic Tree Dragon local s,id=GetID() function s.initial_effect(c) --lvchange @@ -31,7 +32,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50474354.lua b/official/c50474354.lua index 4cef210507..3127179212 100644 --- a/official/c50474354.lua +++ b/official/c50474354.lua @@ -16,12 +16,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.chainfilter(re,tp,cid) - return re:GetHandler():IsSetCard(0x88) + return re:GetHandler():IsSetCard(SET_BUJIN) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsPhase(PHASE_MAIN2) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -33,15 +33,15 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.aclimit(e,re,tp) - return not re:GetHandler():IsSetCard(0x88) + return not re:GetHandler():IsSetCard(SET_BUJIN) end function s.filter(c) - return c:IsSetCard(0x88) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c50482813.lua b/official/c50482813.lua index 4c97381f67..2c676fed37 100644 --- a/official/c50482813.lua +++ b/official/c50482813.lua @@ -1,9 +1,9 @@ --- SR吹持童子 --- Speedroid Party Horn Kid --- scripted by Hatter +--SR吹持童子 +--Speedroid Fuki-Modoshi Piper +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- excavate and add to hand + --excavate and add to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -17,14 +17,14 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- reduce level + --reduce level local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.lvtg) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -74,7 +74,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50485594.lua b/official/c50485594.lua index 4c1a08668b..5973f7d9cf 100644 --- a/official/c50485594.lua +++ b/official/c50485594.lua @@ -1,4 +1,5 @@ --レスキューラット +--Rescue Hamster local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -26,16 +27,12 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) - e4:SetCost(s.spcost) + e4:SetCost(Cost.SelfTribute) e4:SetCondition(s.spcon) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end @@ -61,15 +58,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,hg1) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(5) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,2,nil,c:GetCode(),e,tp) @@ -102,8 +95,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc2=sg2:GetFirst() Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc1:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + tc2:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() sg1:Merge(sg2) sg1:KeepAlive() @@ -120,14 +113,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e2) local e3=e2:Clone() tc2:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE_EFFECT) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e4) local e5=e4:Clone() tc2:RegisterEffect(e5) @@ -148,4 +141,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50486289.lua b/official/c50486289.lua index 903b758de5..6f23885b7c 100644 --- a/official/c50486289.lua +++ b/official/c50486289.lua @@ -1,5 +1,5 @@ --アマゾネスの戦士長 ---Amazoness Warrior Chief +--Amazoness War Chief --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -28,10 +28,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} s.listed_names={CARD_POLYMERIZATION} function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x4) + return c:IsFacedown() or not c:IsSetCard(SET_AMAZONESS) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.setfilter(c) - return (c:IsCode(CARD_POLYMERIZATION) or (c:IsSetCard(0x4) and c:IsSpellTrap())) and c:IsSSetable() + return (c:IsCode(CARD_POLYMERIZATION) or (c:IsSetCard(SET_AMAZONESS) and c:IsSpellTrap())) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,8 +65,8 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return not c:IsSetCard(0x4) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_AMAZONESS) end) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),nil) end \ No newline at end of file diff --git a/official/c50491121.lua b/official/c50491121.lua index 34a4181041..e8fcc6fb76 100644 --- a/official/c50491121.lua +++ b/official/c50491121.lua @@ -1,4 +1,5 @@ --H・C スパルタス +--Heroic Challenger - Spartan local s,id=GetID() function s.initial_effect(c) --atkup @@ -15,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) + return c:IsFaceup() and c:IsSetCard(SET_HEROIC) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -36,7 +37,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50501121.lua b/official/c50501121.lua index bc34cef0be..fe770cc599 100644 --- a/official/c50501121.lua +++ b/official/c50501121.lua @@ -1,4 +1,5 @@ --背徳の堕天使 +--Darklord Rebellion local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,16 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.costfilter(c) - return c:IsSetCard(0xef) + return c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5050644.lua b/official/c5050644.lua index a18aa937c8..bb938299f3 100644 --- a/official/c5050644.lua +++ b/official/c5050644.lua @@ -71,4 +71,4 @@ end function s.lpop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5052212.lua b/official/c5052212.lua index 5ee74652ba..3248975541 100644 --- a/official/c5052212.lua +++ b/official/c5052212.lua @@ -9,15 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c,tp) return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and c:GetAttack()>0 and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) @@ -31,9 +28,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then if e:GetLabel()~=1 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) local atk=g:GetFirst():GetAttack() if atk<0 then atk=0 end Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -48,8 +45,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(atk) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50527144.lua b/official/c50527144.lua index dfa3a118fb..e9d7f2d7da 100644 --- a/official/c50527144.lua +++ b/official/c50527144.lua @@ -1,4 +1,5 @@ --ゴーストリック・アウト +--Ghostrick Vanish local s,id=GetID() function s.initial_effect(c) -- @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.cfilter(c) - return c:IsSetCard(0x8d) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_GHOSTRICK) and c:IsMonster() and not c:IsPublic() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -28,7 +29,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,0) e1:SetTarget(s.tgfilter) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) @@ -37,5 +38,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e2,tp) end function s.tgfilter(e,c) - return (c:IsFaceup() and c:IsSetCard(0x8d)) or (c:IsFacedown() and c:IsLocation(LOCATION_MZONE)) -end + return (c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK)) or (c:IsFacedown() and c:IsLocation(LOCATION_MZONE)) +end \ No newline at end of file diff --git a/official/c50532786.lua b/official/c50532786.lua index 16a81fec19..fa3ea45ed2 100644 --- a/official/c50532786.lua +++ b/official/c50532786.lua @@ -1,4 +1,5 @@ --ジョーズマン +--Jawsman local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -30,4 +31,4 @@ function s.atkfilter(c) end function s.atkup(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_MZONE,0,c)*300 -end +end \ No newline at end of file diff --git a/official/c50546029.lua b/official/c50546029.lua index 9cce6e06e3..0bc06971c6 100644 --- a/official/c50546029.lua +++ b/official/c50546029.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) --Link Summon c:EnableReviveLimit() Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_EARTH),2) - -- Must attack this card, if able + --Must attack this card, if able local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_MUST_ATTACK) @@ -71,20 +71,20 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) d:RegisterEffect(e1) Duel.NegateRelatedChain(d,RESET_TURN_SET) --Negate its effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) d:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) d:RegisterEffect(e3) end end diff --git a/official/c50546208.lua b/official/c50546208.lua index 063a6a3631..50b5525d09 100644 --- a/official/c50546208.lua +++ b/official/c50546208.lua @@ -1,7 +1,6 @@ --月光黄鼬 --Lunalight Yellow Marten --Logical Nonsense - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -29,13 +28,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Lunalight" archetype -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} --Specifically lists itself s.listed_names={id} - --Check for "Lunalight" card to return to hand function s.thfilter1(c,tp) - return c:IsFaceup() and c:IsSetCard(0xdf) and not c:IsCode(id) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c) + return c:IsFaceup() and c:IsSetCard(SET_LUNALIGHT) and not c:IsCode(id) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -58,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -69,7 +67,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end --Check for "Lunalight" spell/trap function s.srchfilter(c) - return c:IsSetCard(0xdf) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_LUNALIGHT) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.srchfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c50548657.lua b/official/c50548657.lua index f9c6d112c3..353c0eacce 100644 --- a/official/c50548657.lua +++ b/official/c50548657.lua @@ -1,5 +1,5 @@ --プロンプトホーン ---Prompt Horn +--Prompthorn -- local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,e,tp,g,ft) end @@ -39,7 +39,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if ft<=0 or #g==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:SelectWithSumEqual(tp,Card.GetLevel,e:GetLabel(),1,ft) @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=sg:GetFirst() for tc in aux.Next(sg) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end Duel.SpecialSummonComplete() sg:KeepAlive() @@ -79,5 +79,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.rmfilter,nil,e:GetLabel()) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c50554729.lua b/official/c50554729.lua index fadca8d534..27eb316d27 100644 --- a/official/c50554729.lua +++ b/official/c50554729.lua @@ -1,4 +1,5 @@ --アモルファージ・インフェクション +--Amorphage Infection local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe0)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_AMORPHAGE)) e2:SetValue(s.value) c:RegisterEffect(e2) local e3=e2:Clone() @@ -35,28 +36,28 @@ function s.initial_effect(c) e5:SetCondition(s.thcon2) c:RegisterEffect(e5) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xe0) + return c:IsFaceup() and c:IsSetCard(SET_AMORPHAGE) end function s.value(e,c) return Duel.GetMatchingGroupCount(s.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*100 end function s.cfilter1(c,tp) - return c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsPreviousControler(tp) + return c:IsMonster() and c:IsPreviousLocation(LOCATION_MZONE|LOCATION_HAND) and c:IsPreviousControler(tp) end function s.thcon1(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter1,1,nil,tp) end function s.cfilter2(c,tp) - return c:IsMonster() and c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsPreviousControler(tp) + return c:IsMonster() and c:IsReason(REASON_BATTLE|REASON_EFFECT) + and c:IsPreviousLocation(LOCATION_MZONE|LOCATION_HAND) and c:IsPreviousControler(tp) end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter2,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0xe0) and c:IsAbleToHand() + return c:IsSetCard(SET_AMORPHAGE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c50584941.lua b/official/c50584941.lua index c5c5dedf9e..cbbdb009d0 100644 --- a/official/c50584941.lua +++ b/official/c50584941.lua @@ -12,11 +12,11 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1045} +s.listed_series={SET_RED_DRAGON_ARCHFIEND} s.check=false function s.cfilter(c,tp) local code=c:GetOriginalCode() - return c:IsSetCard(0x1045) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_RED_DRAGON_ARCHFIEND) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c,code) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -24,17 +24,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) return true end function s.filter(c,code) - return c:IsFaceup() and c:IsSetCard(0x1045) and c:IsType(TYPE_SYNCHRO) and (not c:IsCode(code) or not c:IsOriginalCode(code)) + return c:IsFaceup() and c:IsSetCard(SET_RED_DRAGON_ARCHFIEND) and c:IsType(TYPE_SYNCHRO) and (not c:IsCode(code) or not c:IsOriginalCode(code)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e:GetLabel()) end if chk==0 then if not s.check then return false end s.check=false - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) local code=g:GetFirst():GetOriginalCode() e:SetLabel(code) @@ -51,8 +51,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - tc:ReplaceEffect(code,RESET_EVENT+RESETS_STANDARD) + tc:ReplaceEffect(code,RESET_EVENT|RESETS_STANDARD) end -end +end \ No newline at end of file diff --git a/official/c50588353.lua b/official/c50588353.lua index e00c1b12fe..47a2b7b0a2 100644 --- a/official/c50588353.lua +++ b/official/c50588353.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -38,20 +38,20 @@ function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp) end function s.hspcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.hspfilter(c,e,tp) return c:IsType(TYPE_TUNER) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.hspfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.hspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.hspop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.hspfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.hspfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then --Cannot activate its effects @@ -60,7 +60,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c50599453.lua b/official/c50599453.lua index b5c003197b..32e374f5c0 100644 --- a/official/c50599453.lua +++ b/official/c50599453.lua @@ -1,21 +1,21 @@ --- 枯鰈葉リプレース --- Leapress the Withered Flounder --- Scripted by Hatter +--枯鰈葉リプレース +--Leafplace Plaice +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Gain ATK/DEF + --Gain ATK/DEF local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.incval(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_GRAVE)*200 -end +end \ No newline at end of file diff --git a/official/c50604950.lua b/official/c50604950.lua index 26ca931929..9e57f5feca 100644 --- a/official/c50604950.lua +++ b/official/c50604950.lua @@ -1,4 +1,5 @@ --X-セイバー ガラハド +--X-Saber Galahad local s,id=GetID() function s.initial_effect(c) --atk @@ -26,10 +27,10 @@ function s.atkval(e,c) return 0 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),0xd) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),0xd) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),SET_SABER) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),SET_SABER) Duel.Release(g,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c50608164.lua b/official/c50608164.lua index 63dec505c6..73b26d11a0 100644 --- a/official/c50608164.lua +++ b/official/c50608164.lua @@ -26,27 +26,24 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(TIMING_DAMAGE_STEP) e3:SetCountLimit(1) - e3:SetCondition(s.condition) + e3:SetCondition(aux.StatChangeDamageStepCondition) e3:SetCost(s.cost) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.val(e,c) return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500 end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) - return c:IsSetCard(0x8) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) e:SetLabel(g:GetFirst():GetAttack()) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -58,12 +55,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50613779.lua b/official/c50613779.lua index 400860affa..c69b4eccc6 100644 --- a/official/c50613779.lua +++ b/official/c50613779.lua @@ -1,4 +1,5 @@ --- ダメージ・メイジ +--ダメージ・メイジ +--Damage Mage local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.Recover(tp,ev,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50615578.lua b/official/c50615578.lua index 95e83fdb9f..1ee2eb3b15 100644 --- a/official/c50615578.lua +++ b/official/c50615578.lua @@ -1,4 +1,5 @@ --カラクリ忍者 七七四九 +--Karakuri Ninja mdl 7749 "Nanashick" local s,id=GetID() function s.initial_effect(c) --must attack @@ -25,7 +26,7 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -33,7 +34,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.drfilter(c) - return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsSetCard(0x11) + return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsSetCard(SET_KARAKURI) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.drfilter,tp,LOCATION_MZONE,0,nil) @@ -46,4 +47,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(s.drfilter,tp,LOCATION_MZONE,0,nil) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Draw(p,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50619462.lua b/official/c50619462.lua index 66a9a805ee..f2b4a0a5bc 100644 --- a/official/c50619462.lua +++ b/official/c50619462.lua @@ -1,6 +1,5 @@ --烏合無象 --Cattle Call - local s,id=GetID() function s.initial_effect(c) --Activate @@ -51,12 +50,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) --Destroy it during end phase local e3=Effect.CreateEffect(c) @@ -68,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCondition(s.descon) e3:SetOperation(s.desop) Duel.RegisterEffect(e3,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Cannot attack local e4=Effect.CreateEffect(c) e4:SetDescription(3206) @@ -76,7 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CANNOT_ATTACK) e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4,true) end Duel.SpecialSummonComplete() @@ -90,4 +89,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50621530.lua b/official/c50621530.lua index bd959cccdd..46fcfc9326 100644 --- a/official/c50621530.lua +++ b/official/c50621530.lua @@ -1,4 +1,5 @@ --パワード・チューナー +--Powered Tuner local s,id=GetID() function s.initial_effect(c) --atkup @@ -15,4 +16,4 @@ function s.cfilter(c) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*500 -end +end \ No newline at end of file diff --git a/official/c50642380.lua b/official/c50642380.lua index 09ef47a95c..bcf8e9c63f 100644 --- a/official/c50642380.lua +++ b/official/c50642380.lua @@ -1,20 +1,20 @@ --- Ga-P.U.N.K.ワゴン --- Gagaku P.U.N.K. Wagon --- Scripted by Hatter +--Ga-P.U.N.K.ワゴン +--Gagaku-P.U.N.K. Wa Gon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search "P.U.N.K." Spell + --Search "P.U.N.K." Spell local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Draw 1 card + --Draw 1 card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW) @@ -32,13 +32,9 @@ function s.initial_effect(c) e3:SetCondition(s.btdrcon) c:RegisterEffect(e3) end -s.listed_series={0x173} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end +s.listed_series={SET_PUNK} function s.thfilter(c) - return c:IsSetCard(0x173) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_PUNK) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,7 +49,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.drconfilter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x173) + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(SET_PUNK) end function s.efdrcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and eg:IsExists(s.drconfilter,1,nil,tp) @@ -71,4 +67,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50669347.lua b/official/c50669347.lua index bc983dfedc..770263c699 100644 --- a/official/c50669347.lua +++ b/official/c50669347.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) end s.listed_series={SET_NEPHTHYS} function s.condition(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter1(c) return c:IsLevel(8) and c:IsRace(RACE_WINGEDBEAST) and c:IsAbleToHand() diff --git a/official/c50675040.lua b/official/c50675040.lua index 2774c90cf0..dc2d38ac51 100644 --- a/official/c50675040.lua +++ b/official/c50675040.lua @@ -1,5 +1,5 @@ --獣王無塵 ---As the Master of Beasts Pleases +--Beast King Unleashed --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c5067884.lua b/official/c5067884.lua index 113f4129cd..82b4dff226 100644 --- a/official/c5067884.lua +++ b/official/c5067884.lua @@ -1,6 +1,5 @@ --ダイナミスト・スピノス ---Dinomist Spino - +--Dinomist Spinos local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -24,10 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xd8} - +s.listed_series={SET_DINOMIST} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_DINOMIST) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,15 +38,15 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,c,0xd8) end - local rg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,c,0xd8) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,c,SET_DINOMIST) end + local rg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,c,SET_DINOMIST) Duel.Release(rg,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -71,19 +69,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local op=e:GetLabel() if op==0 then if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,0,0) + c:RegisterFlagEffect(id,RESETS_STANDARD_DISABLE_PHASE_END,0,0) --Can attack directly local e1=Effect.CreateEffect(c) e1:SetDescription(3205) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end elseif op==1 then if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,0,0) + c:RegisterFlagEffect(id+1,RESETS_STANDARD_DISABLE_PHASE_END,0,0) --Can make a second attack local e2=Effect.CreateEffect(c) e2:SetDescription(3201) @@ -91,7 +89,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end diff --git a/official/c50684552.lua b/official/c50684552.lua index 06eeecdffa..378c9ccb4d 100644 --- a/official/c50684552.lua +++ b/official/c50684552.lua @@ -1,4 +1,5 @@ --ワンダーガレージ +--Wonder Garage local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_DESTROY)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousPosition(POS_FACEDOWN) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x16) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_ROID) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50687050.lua b/official/c50687050.lua index 9129f918d4..e94d513ab2 100644 --- a/official/c50687050.lua +++ b/official/c50687050.lua @@ -48,7 +48,7 @@ function s.contactfil(tp) return Duel.GetReleaseGroup(tp) end function s.contactop(g) - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) local c=e:GetHandler() diff --git a/official/c50690129.lua b/official/c50690129.lua index 008b48bc3d..8db2e1d79c 100644 --- a/official/c50690129.lua +++ b/official/c50690129.lua @@ -34,11 +34,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-2) tc:RegisterEffect(e1) if not tc:IsImmuneToEffect(e1) and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c50692511.lua b/official/c50692511.lua index b5ac1d0669..176a9b4b4e 100644 --- a/official/c50692511.lua +++ b/official/c50692511.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.counterfilter(c) - return c:IsSetCard(0xba) + return c:IsSetCard(SET_RAIDRAPTOR) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -25,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -33,11 +33,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xba) + return not c:IsSetCard(SET_RAIDRAPTOR) end function s.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xba) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) end function s.filter2(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -49,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) e:SetLabel(g:GetFirst():GetCode()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -57,9 +57,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then local code=tc:GetCode() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,code) + local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,code) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c50699850.lua b/official/c50699850.lua index fb3e9c404f..4bdecb0682 100644 --- a/official/c50699850.lua +++ b/official/c50699850.lua @@ -1,9 +1,9 @@ --- 悪魔嬢ロリス --- Loris, Lady of Lament --- Scripted by Hatter +--悪魔嬢ロリス +--Loris, Lady of Lament +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Draw + --Draw local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) - -- Set + --Set local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_LEAVE_GRAVE) @@ -33,14 +33,14 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.drfilter(c,e) - return c:IsFaceup() and c:GetType()==TYPE_TRAP and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) + return c:IsFaceup() and c:IsNormalTrap() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) return #sg==3 or (#sg==6 and Duel.IsPlayerCanDraw(tp,2)) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) and chkc:IsControler(tp) and s.drfilter(chkc,e) end - local g=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil,e) + if chkc then return chkc:IsLocation(LOCATION_REMOVED|LOCATION_GRAVE) and chkc:IsControler(tp) and s.drfilter(chkc,e) end + local g=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,nil,e) if chk==0 then return #g>=3 and Duel.IsPlayerCanDraw(tp,1) end local dg=aux.SelectUnselectGroup(g,e,tp,3,6,s.rescon,1,tp,HINTMSG_TODECK,s.rescon) Duel.SetTargetCard(dg) @@ -66,7 +66,7 @@ function s.rlsetcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.rlsetconfilter,1,e:GetHandler()) end function s.setfilter(c) - return c:GetType()==TYPE_TRAP and c:IsSSetable() + return c:IsNormalTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end @@ -82,7 +82,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgsetconfilter(c,tp) - return c:GetType()==TYPE_TRAP and c:IsPreviousControler(tp) + return c:IsNormalTrap() and c:IsPreviousControler(tp) end function s.tgsetcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and r&REASON_EFFECT==REASON_EFFECT and eg:IsExists(s.tgsetconfilter,1,nil,tp) diff --git a/official/c50702124.lua b/official/c50702124.lua index 946ac542d0..cb9b2112c7 100644 --- a/official/c50702124.lua +++ b/official/c50702124.lua @@ -1,4 +1,5 @@ --シンクロ・マグネーター +--Synchro Magnet local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return #eg==1 and tc:IsControler(tp) and tc:IsSummonType(SUMMON_TYPE_SYNCHRO) + return #eg==1 and tc:IsControler(tp) and tc:IsSynchroSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then c:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c50712728.lua b/official/c50712728.lua index abba45266e..c876e612c6 100644 --- a/official/c50712728.lua +++ b/official/c50712728.lua @@ -1,4 +1,5 @@ --墓守の呪術師 +--Gravekeeper's Curse local s,id=GetID() function s.initial_effect(c) --damage @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50720316.lua b/official/c50720316.lua index 4a17e6b5e1..d45c38b346 100644 --- a/official/c50720316.lua +++ b/official/c50720316.lua @@ -1,4 +1,5 @@ --E・HERO シャドー・ミスト +--Elemental HERO Shadow Mist local s,id=GetID() function s.initial_effect(c) --search @@ -20,14 +21,14 @@ function s.initial_effect(c) e2:SetOperation(s.tgop2) c:RegisterEffect(e2) end -s.listed_series={0xa5,0x8} +s.listed_series={SET_CHANGE,SET_HERO} s.listed_names={id} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function s.thfilter1(c) - return c:IsSetCard(0xa5) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() + return c:IsSetCard(SET_CHANGE) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end @@ -42,7 +43,7 @@ function s.tgop1(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter2(c) - return c:IsSetCard(0x8) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_HERO) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -55,4 +56,4 @@ function s.tgop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c50725996.lua b/official/c50725996.lua index 87d2ca2562..3f00965db9 100644 --- a/official/c50725996.lua +++ b/official/c50725996.lua @@ -1,4 +1,5 @@ --ブラック・マジシャンズ・ナイト +--Dark Magician Knight local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c50732780.lua b/official/c50732780.lua index 76946247b6..ed065b1d3b 100644 --- a/official/c50732780.lua +++ b/official/c50732780.lua @@ -1,4 +1,5 @@ --ヘル・セキュリティ +--Stygian Security local s,id=GetID() function s.initial_effect(c) --special summon @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50750868.lua b/official/c50750868.lua index 6a45a001c7..735d0b2631 100644 --- a/official/c50750868.lua +++ b/official/c50750868.lua @@ -27,41 +27,41 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.lcheck(g,lc,sumtype,tp) return g:IsExists(s.mzfilter,1,nil,lc,sumtype,tp) end function s.mzfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x27,lc,sumtype,tp) and c:IsType(TYPE_TUNER,lc,sumtype,tp) + return c:IsSetCard(SET_TG,lc,sumtype,tp) and c:IsType(TYPE_TUNER,lc,sumtype,tp) end function s.tgtg(e,c) - return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO) + return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(SET_TG) and c:IsType(TYPE_SYNCHRO) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.spfilter(c,e,tp,zone) - return c:IsSetCard(0x27) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone) + return c:IsSetCard(SET_TG) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone) end function s.spcheck(sg,e,tp,mg) return sg:GetClassCount(Card.GetLocation)==#sg end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,zone) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,zone) return ct>2 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and aux.SelectUnselectGroup(g,e,tp,3,3,s.spcheck,0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,zone) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,zone) if #sg==0 then return end local rg=aux.SelectUnselectGroup(sg,e,tp,3,3,s.spcheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(rg,0,tp,tp,true,false,POS_FACEUP_DEFENSE,zone) @@ -72,10 +72,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x27) -end - + return not c:IsSetCard(SET_TG) +end \ No newline at end of file diff --git a/official/c50755.lua b/official/c50755.lua index 3ed965f005..74ea0346f6 100644 --- a/official/c50755.lua +++ b/official/c50755.lua @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummonStep(tc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c50756327.lua b/official/c50756327.lua index be44e2570d..818bf50439 100644 --- a/official/c50756327.lua +++ b/official/c50756327.lua @@ -1,5 +1,5 @@ --魔導原典 クロウリー ---Crowley the Origin of Prophecy +--Crowley, the First Propheseer --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -28,12 +28,12 @@ function s.initial_effect(c) e2:SetTarget(aux.FieldSummonProcTg(s.nttg)) c:RegisterEffect(e2) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) - return c:IsSetCard(0x106e) and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -69,5 +69,4 @@ function s.ntcon(e,c,minc) end function s.nttg(e,c) return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) -end - +end \ No newline at end of file diff --git a/official/c50766506.lua b/official/c50766506.lua index 73bd80d156..282eed7fed 100644 --- a/official/c50766506.lua +++ b/official/c50766506.lua @@ -18,13 +18,13 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.cfilter(c,e,tp) local lv=c:GetLevel() - return lv>0 and c:IsSetCard(0x2b) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) + return lv>0 and c:IsSetCard(SET_NINJA) and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,lv) end function s.spfilter(c,e,tp,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) + return c:IsLevelBelow(lv) and c:IsSetCard(SET_NINJA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,e,tp) end @@ -62,4 +62,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetCardTarget():Filter(Card.IsLocation,nil,LOCATION_MZONE) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50781944.lua b/official/c50781944.lua index 5617b4016d..597c4e97ad 100644 --- a/official/c50781944.lua +++ b/official/c50781944.lua @@ -1,4 +1,5 @@ --エンシェント・クリムゾン・エイプ +--Ancient Crimson Ape local s,id=GetID() function s.initial_effect(c) --lp rec @@ -30,4 +31,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c50785356.lua b/official/c50785356.lua index 7c12a04091..ebe6483834 100644 --- a/official/c50785356.lua +++ b/official/c50785356.lua @@ -1,4 +1,5 @@ --ハウリング・ウォリアー +--Feedback Warrior local s,id=GetID() function s.initial_effect(c) --lv change @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50789693.lua b/official/c50789693.lua index 8c10fde543..2f87482d61 100644 --- a/official/c50789693.lua +++ b/official/c50789693.lua @@ -1,4 +1,5 @@ --アーマー・カッパー +--Armored Kappa local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.adcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.adop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) -- @@ -27,10 +28,6 @@ function s.initial_effect(c) e2:SetOperation(s.btop) c:RegisterEffect(e2) end -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.adop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -44,7 +41,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_DEFENSE) end e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -56,7 +53,7 @@ function s.btcon(e,tp,eg,ep,ev,re,r,rp) end function s.btcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.btop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -65,14 +62,14 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c50793215.lua b/official/c50793215.lua index a9009a96ff..3aedd71780 100644 --- a/official/c50793215.lua +++ b/official/c50793215.lua @@ -1,7 +1,6 @@ --深海姫プリマドーナ --Deep Sea Prima Donna --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -83,11 +82,11 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end function s.efilter(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and e:GetHandlerPlayer()~=rp + return re:IsMonsterEffect() and e:GetHandlerPlayer()~=rp end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsAbleToDeck() end @@ -99,6 +98,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c50797682.lua b/official/c50797682.lua index 421063d666..141229a86b 100644 --- a/official/c50797682.lua +++ b/official/c50797682.lua @@ -15,32 +15,32 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end function s.matfilter(c,e,tp,rank) - return c:IsSetCard(0x70) and c:IsLevel(rank+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CHRONOMALY) and c:IsLevel(rank+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.xyzfilter(c,tp,mg) - return c:IsSetCard(0x70) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 and c:IsXyzSummonable(nil,mg,2,2) + return c:IsSetCard(SET_CHRONOMALY) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 and c:IsXyzSummonable(nil,mg,2,2) end function s.tgfilter(c,e,tp) if c:IsOriginalType(TYPE_XYZ) and c:IsFaceup() then - local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,c:GetRank()) + local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,c:GetRank()) return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg) end return false end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and s.tgfilter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and s.tgfilter(chkc,e,tp) end if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.rescon(sg,e,tp,mg) return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,tp,sg) @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end local rank=tc:GetRank() - local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,rank) + local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,rank) local sg=aux.SelectUnselectGroup(mg,e,tp,2,2,s.rescon,1,tp,HINTMSG_SPSUMMON,nil,nil,false) if #sg<2 then return end local tc1=sg:GetFirst() @@ -62,14 +62,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e3) local e4=e3:Clone() tc2:RegisterEffect(e4) diff --git a/official/c50810455.lua b/official/c50810455.lua index e368d749df..4a52e1248c 100644 --- a/official/c50810455.lua +++ b/official/c50810455.lua @@ -1,5 +1,5 @@ --鉄獣戦線 ケラス ---Tribrigade Ceras +--Tri-Brigade Kerass --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -31,7 +31,7 @@ function s.cfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,7 +53,7 @@ function s.spfilter(c,e,tp,ct,g) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local nums={} for i=1,#g do if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,i,g) then @@ -80,7 +80,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.matlimit) e1:SetTargetRange(LOCATION_ALL,LOCATION_ALL) e1:SetValue(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --client hint aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) @@ -99,4 +99,4 @@ end function s.sumlimit(e,c) if not c then return false end return c:IsControler(e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c50820852.lua b/official/c50820852.lua index 4e315129bc..43155fe6e7 100644 --- a/official/c50820852.lua +++ b/official/c50820852.lua @@ -1,7 +1,6 @@ --雛神鳥シムルグ ---Simorgh, Bird of Beginnings +--Simorgh, Bird of Beginning --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Gain an extra normal summon for "Simorgh" monsters @@ -26,8 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.ssop) c:RegisterEffect(e2) end -s.listed_series={0x12d} - +s.listed_series={SET_SIMORGH} function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerCanAdditionalSummon(tp) end @@ -38,14 +36,14 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(s.estg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.estg(e,c) - return c:IsSetCard(0x12d) + return c:IsSetCard(SET_SIMORGH) end function s.cfilter(c) return c:GetSequence()<5 @@ -67,7 +65,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -77,7 +75,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.sslimit) Duel.RegisterEffect(e1,tp) end diff --git a/official/c50823978.lua b/official/c50823978.lua index 378166a09a..862bba4a22 100644 --- a/official/c50823978.lua +++ b/official/c50823978.lua @@ -12,4 +12,4 @@ function s.initial_effect(c) end function s.dcon(e) return Duel.GetAttackTarget()==nil -end +end \ No newline at end of file diff --git a/official/c50838440.lua b/official/c50838440.lua index b45d789fbe..1175f8e1c5 100644 --- a/official/c50838440.lua +++ b/official/c50838440.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c50855622.lua b/official/c50855622.lua index 8d844d798c..a5d0a6d8d1 100644 --- a/official/c50855622.lua +++ b/official/c50855622.lua @@ -1,4 +1,4 @@ --- +--超騎甲虫アブソリュート・ヘラクレス --Ultra Beetrooper Absolute Hercules --Scripted by Zefile local s,id=GetID() @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetTarget(s.sptg) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.imcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.imop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -39,7 +39,7 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) c:RegisterEffect(e1) end function s.efilter(e,te) diff --git a/official/c50863093.lua b/official/c50863093.lua index cabec60647..44d8d31687 100644 --- a/official/c50863093.lua +++ b/official/c50863093.lua @@ -1,5 +1,5 @@ --マシンナーズ・ラディエーター ---Machina Radiator +--Machina Irradiator local s,id=GetID() function s.initial_effect(c) --special summon from hand @@ -25,13 +25,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x36) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_MACHINA) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,7 +49,7 @@ function s.tgfilter(c,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) - return c:IsSetCard(0x36) and c:IsLevelBelow(tc:GetLevel()) and not c:IsCode(tc:GetCode()) + return c:IsSetCard(SET_MACHINA) and c:IsLevelBelow(tc:GetLevel()) and not c:IsCode(tc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -69,4 +69,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50866755.lua b/official/c50866755.lua index 924bd0e5e5..53f6557c73 100644 --- a/official/c50866755.lua +++ b/official/c50866755.lua @@ -35,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5087128.lua b/official/c5087128.lua index 54d5af954f..b6eeecc279 100644 --- a/official/c5087128.lua +++ b/official/c5087128.lua @@ -1,5 +1,5 @@ --シェルヴァレット・ドラゴン ---Shellrokket Dragon +--Shelrokket Dragon --Scripted by Eerie Code; fixed by senpaizuri local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} s.listed_names={} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -71,7 +71,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -81,12 +81,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5088741.lua b/official/c5088741.lua index 12fdc4c6cf..0b0061e854 100644 --- a/official/c5088741.lua +++ b/official/c5088741.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) --Add 1 "A.I." Trap from your Deck to your hand local e3=Effect.CreateEffect(c) diff --git a/official/c50893987.lua b/official/c50893987.lua index f53730bb0c..d77aceba9a 100644 --- a/official/c50893987.lua +++ b/official/c50893987.lua @@ -1,4 +1,5 @@ --剣闘獣ティゲル +--Gladiator Beast Tygerius local s,id=GetID() function s.initial_effect(c) --search @@ -42,4 +43,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c50896944.lua b/official/c50896944.lua index a00ce0b723..ecec7e843d 100644 --- a/official/c50896944.lua +++ b/official/c50896944.lua @@ -1,4 +1,5 @@ --暗黒ブラキ +--Black Brachios local s,id=GetID() function s.initial_effect(c) --pos @@ -26,4 +27,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and not tc:IsPosition(POS_FACEUP_DEFENSE) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c50901852.lua b/official/c50901852.lua index 0bedf81238..226fc20502 100644 --- a/official/c50901852.lua +++ b/official/c50901852.lua @@ -1,5 +1,5 @@ --機巧菟-稻羽之淤岐素 ---Gizmek Inaba +--Gizmek Inaba, the Hopping Hare of Hakuto --Scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -41,7 +41,7 @@ function s.sumop(e,tp,eg,ev,ep,re,r,rp) end end function s.ffilter(c) - return c:IsDefense(c:GetAttack()) and c:IsRace(RACE_MACHINE) and c:IsFaceup() + return c:IsDefense(c:GetAttack()) and c:IsRace(RACE_MACHINE) and c:IsFaceup() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ffilter(chkc) end @@ -60,7 +60,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then @@ -74,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c50903514.lua b/official/c50903514.lua index 3a33005144..7423a3f491 100644 --- a/official/c50903514.lua +++ b/official/c50903514.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(function(e) return Duel.IsBattlePhase() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) end) + e1:SetCondition(function(e) return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(s.spcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -61,7 +61,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50913601.lua b/official/c50913601.lua index d322e9345d..0062e93f35 100644 --- a/official/c50913601.lua +++ b/official/c50913601.lua @@ -1,4 +1,5 @@ --山 +--Mountain local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON+RACE_WINGEDBEAST+RACE_THUNDER)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON|RACE_WINGEDBEAST|RACE_THUNDER)) e2:SetValue(200) c:RegisterEffect(e2) --Def @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(200) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c50920465.lua b/official/c50920465.lua index 6d43a40ac8..edd8fe67e4 100644 --- a/official/c50920465.lua +++ b/official/c50920465.lua @@ -1,4 +1,5 @@ --ブリザード・サンダーバード +--Blizzard Thunderbird local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,7 +20,7 @@ function s.cfilter(c,e,tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) end function s.filter(c,e,tp) return c:IsRace(RACE_WINGEDBEAST) and c:IsAttribute(ATTRIBUTE_WATER) @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end @@ -47,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c50933533.lua b/official/c50933533.lua index 0f13b9f202..200e305464 100644 --- a/official/c50933533.lua +++ b/official/c50933533.lua @@ -48,7 +48,7 @@ function s.valcheck(e,c) e:SetLabel(flag) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local flag=e:GetLabelObject():GetLabel() @@ -57,7 +57,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x2)~=0 then @@ -70,7 +70,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon1) e1:SetTarget(s.damtg1) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x4)~=0 then @@ -82,7 +82,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetTarget(s.damtg2) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end diff --git a/official/c50939127.lua b/official/c50939127.lua index 20378456fe..c6e1f8d3d3 100644 --- a/official/c50939127.lua +++ b/official/c50939127.lua @@ -1,4 +1,5 @@ --異次元竜 トワイライトゾーンドラゴン +--Different Dimension Dragon local s,id=GetID() function s.initial_effect(c) --indestructable @@ -16,8 +17,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.ind1(e,re,rp,c) - return not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and re:IsSpellTrapEffect() end function s.ind2(e,c) return c:IsAttackBelow(1900) -end +end \ No newline at end of file diff --git a/official/c50947142.lua b/official/c50947142.lua index 0af806172e..5657df59ff 100644 --- a/official/c50947142.lua +++ b/official/c50947142.lua @@ -23,7 +23,7 @@ function s.cfilter(c) return ct>0 end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,5 +40,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEDOWN) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end -end - +end \ No newline at end of file diff --git a/official/c50951254.lua b/official/c50951254.lua index 0ff9fa1e45..71c1bfaf35 100644 --- a/official/c50951254.lua +++ b/official/c50951254.lua @@ -40,7 +40,7 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end - c:UpdateAttack(e:GetLabel()*400,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:UpdateAttack(e:GetLabel()*400,RESETS_STANDARD_DISABLE_PHASE_END) end function s.spcfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) diff --git a/official/c50951359.lua b/official/c50951359.lua index bf99b14ab0..bee39da597 100644 --- a/official/c50951359.lua +++ b/official/c50951359.lua @@ -1,4 +1,5 @@ --チューナー・キャプチャー +--Tuner Capture local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsSummonType(SUMMON_TYPE_SYNCHRO) and ep~=tp + return tc:IsSynchroSummoned() and ep~=tp end function s.filter(c,e,tp,mg) return mg:IsContains(c) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c50954680.lua b/official/c50954680.lua index 0674d2d08b..df2019e8bd 100644 --- a/official/c50954680.lua +++ b/official/c50954680.lua @@ -31,7 +31,7 @@ s.synchro_nt_required=1 function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and rc~=c and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -48,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(rc:GetBaseAttack()) c:RegisterEffect(e1) end @@ -65,8 +65,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(bc:GetAttack()) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c50957346.lua b/official/c50957346.lua index 6ec4862f39..5a1608850c 100644 --- a/official/c50957346.lua +++ b/official/c50957346.lua @@ -1,4 +1,5 @@ --レイジアース +--Raging Earth local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51011872.lua b/official/c51011872.lua index 331eabe4e7..17d6991517 100644 --- a/official/c51011872.lua +++ b/official/c51011872.lua @@ -1,9 +1,9 @@ --トリックスター・ブラッディマリー ---Trickstar Bloody Mary +--Trickstar Crimson Heart local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfb),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TRICKSTAR),2,2) c:EnableReviveLimit() --recover local e1=Effect.CreateEffect(c) @@ -28,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.cfilter(c,g) - return c:IsSetCard(0xfb) and g:IsContains(c) + return c:IsSetCard(SET_TRICKSTAR) and g:IsContains(c) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) local lg=e:GetHandler():GetLinkedGroup() @@ -41,11 +41,11 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,200,REASON_EFFECT) end function s.costfilter(c) - return c:IsDiscardable() and c:IsSetCard(0xfb) + return c:IsDiscardable() and c:IsSetCard(SET_TRICKSTAR) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=1 @@ -58,4 +58,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,e:GetLabel(),REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51020079.lua b/official/c51020079.lua index a352d984a1..63d293f202 100644 --- a/official/c51020079.lua +++ b/official/c51020079.lua @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51023024.lua b/official/c51023024.lua index 0918e8203a..3d1cbe7fae 100644 --- a/official/c51023024.lua +++ b/official/c51023024.lua @@ -1,5 +1,5 @@ --影霊の翼 ウェンディ ---Rishaddoll Wendi +--Reeshaddoll Wendi --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.spfilter(c,e,tp,pos) - return c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) and not c:IsCode(id) + return c:IsSetCard(SET_SHADDOLL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) and not c:IsCode(id) end function s.sptg(pos) return function(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c51028231.lua b/official/c51028231.lua index f4febef6ff..6f2db74bd6 100644 --- a/official/c51028231.lua +++ b/official/c51028231.lua @@ -61,7 +61,7 @@ function s.repval(e,c) return s.filter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.indct(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 diff --git a/official/c51043053.lua b/official/c51043053.lua index 71e25c6496..6e42ed6d04 100644 --- a/official/c51043053.lua +++ b/official/c51043053.lua @@ -1,4 +1,5 @@ --防覇龍ヘリオスフィア +--Heliosphere Dragon local s,id=GetID() function s.initial_effect(c) -- @@ -37,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c51043243.lua b/official/c51043243.lua index c81987df02..c189e2e5a6 100644 --- a/official/c51043243.lua +++ b/official/c51043243.lua @@ -1,4 +1,5 @@ --ワーム・カルタロス +--Worm Cartaros local s,id=GetID() function s.initial_effect(c) --search @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -24,4 +25,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51053997.lua b/official/c51053997.lua index df3e6d61b2..2748b38b2a 100644 --- a/official/c51053997.lua +++ b/official/c51053997.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetCountLimit(1) - e3:SetCost(s.cost) + e3:SetCost(Cost.PayLP(500)) e3:SetTarget(s.target2) e3:SetOperation(s.operation) c:RegisterEffect(e3) @@ -37,13 +37,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xc1} +s.listed_series={SET_PSY_FRAME} function s.rmfilter(c) - return c:IsSetCard(0xc1) and c:IsAbleToRemove() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return c:IsSetCard(SET_PSY_FRAME) and c:IsAbleToRemove() end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.rmfilter(chkc) end @@ -56,31 +52,31 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local ct=1 - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then ct=2 end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then ct=2 end local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetValue(Duel.GetTurnCount()) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) e1:SetValue(0) end Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id+1,RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,ct) + tc:RegisterFlagEffect(id+1,RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,ct) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetValue() then return false end + if Duel.IsTurnPlayer(1-tp) or Duel.GetTurnCount()==e:GetValue() then return false end return e:GetLabelObject():GetFlagEffect(id+1)~=0 end function s.retop(e,tp,eg,ep,ev,re,r,rp) @@ -88,13 +84,13 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(tc) end function s.cfilter(c,tp) - return c:IsPreviousSetCard(0xc1) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_PSY_FRAME) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,e:GetHandler(),tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PSY_FRAME) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) @@ -110,4 +106,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51085303.lua b/official/c51085303.lua index 8cec6fcd17..bde569fa97 100644 --- a/official/c51085303.lua +++ b/official/c51085303.lua @@ -1,5 +1,5 @@ --E・HERO ブルーメ ---Elemental HERO Roison Rose +--Elemental HERO Poison Rose local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c51091138.lua b/official/c51091138.lua index 390318efeb..a3e1e69dfc 100644 --- a/official/c51091138.lua +++ b/official/c51091138.lua @@ -1,4 +1,5 @@ --導爆線 +--Fuse Line local s,id=GetID() function s.initial_effect(c) --activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51097887.lua b/official/c51097887.lua index 4da4b1d3e9..602ba24ae2 100644 --- a/official/c51097887.lua +++ b/official/c51097887.lua @@ -1,5 +1,5 @@ --鉄獣の凶襲 ---Tribrigade Airborne +--Tri-Brigade Airborne Assault --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -39,7 +39,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_FIELD) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) Duel.RegisterEffect(e0,tp) @@ -53,16 +53,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end function s.splimit(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_LINK) -end +end \ No newline at end of file diff --git a/official/c51099515.lua b/official/c51099515.lua index 16027046a8..f54478aa60 100644 --- a/official/c51099515.lua +++ b/official/c51099515.lua @@ -1,4 +1,5 @@ --恐撃 +--Ghosts From the Past local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cfilter(c) return c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end @@ -24,7 +22,7 @@ function s.rescon(sg,e,tp,mg) return Duel.IsExistingTarget(s.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,sg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(cg,e,tp,2,2,s.rescon,0) end local rg=aux.SelectUnselectGroup(cg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(rg,POS_FACEUP,REASON_COST) @@ -40,12 +38,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c51119924.lua b/official/c51119924.lua index 1d42dc581d..19d63b83d1 100644 --- a/official/c51119924.lua +++ b/official/c51119924.lua @@ -1,4 +1,5 @@ --パペット・プラント +--Puppet Plant local s,id=GetID() function s.initial_effect(c) --control @@ -15,10 +16,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) and c:IsControlerCanBeChanged() + return c:IsFaceup() and c:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) and c:IsControlerCanBeChanged() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c51124303.lua b/official/c51124303.lua index 85031f1af8..8c57e2c8a2 100644 --- a/official/c51124303.lua +++ b/official/c51124303.lua @@ -1,5 +1,5 @@ --影霊衣の万華鏡 ---Nekroz Kaliedoscope +--Nekroz Kaleidoscope local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,11 +24,11 @@ function s.initial_effect(c) if not s.ritual_matching_function then s.ritual_matching_function={} end - s.ritual_matching_function[c]=aux.FilterEqualFunction(Card.IsSetCard,0xb4) + s.ritual_matching_function[c]=aux.FilterEqualFunction(Card.IsSetCard,SET_NEKROZ) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.spfilter(c,e,tp,mc) - return c:IsSetCard(0xb4) and c:IsRitualMonster() and (not c.ritual_custom_check or c.ritual_custom_check(e,tp,Group.FromCards(mc),c)) + return c:IsSetCard(SET_NEKROZ) and c:IsRitualMonster() and (not c.ritual_custom_check or c.ritual_custom_check(e,tp,Group.FromCards(mc),c)) and (not c.mat_filter or c.mat_filter(mc,tp)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and mc:IsCanBeRitualMaterial(c) end @@ -123,18 +123,18 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.cfilter(c) - return c:IsSetCard(0xb4) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NEKROZ) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) g:AddCard(e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xb4) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -147,4 +147,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51126152.lua b/official/c51126152.lua index c71e185bf0..0444d1ec48 100644 --- a/official/c51126152.lua +++ b/official/c51126152.lua @@ -1,4 +1,5 @@ --深夜急行騎士ナイト・エクスプレス・ナイト +--Night Express Knight local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -28,8 +29,8 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(0) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c51192573.lua b/official/c51192573.lua index c06621af58..b4ddf538b8 100644 --- a/official/c51192573.lua +++ b/official/c51192573.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e4) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.otfilter(c,tp) return c:GetOwner()==1-tp @@ -47,12 +47,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c51194046.lua b/official/c51194046.lua index dcc02a64c3..3f1ecd1b27 100644 --- a/official/c51194046.lua +++ b/official/c51194046.lua @@ -1,4 +1,5 @@ --クリフォート・アセンブラ +--Qliphort Monolith local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -50,19 +51,19 @@ function s.initial_effect(c) end) end) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - if tc:IsSummonType(SUMMON_TYPE_TRIBUTE) then + if tc:IsTributeSummoned() then local p=tc:GetSummonPlayer() s[p]=s[p]+e:GetLabelObject():GetLabel() end end function s.valcheck(e,c) - local ct=c:GetMaterial():FilterCount(Card.IsSetCard,nil,0xaa) + local ct=c:GetMaterial():FilterCount(Card.IsSetCard,nil,SET_QLI) e:SetLabel(ct) end function s.clearop(e,tp,eg,ep,ev,re,r,rp) @@ -79,4 +80,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Draw(tp,s[tp],REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51196174.lua b/official/c51196174.lua index bd610cd20b..53127f29b1 100644 --- a/official/c51196174.lua +++ b/official/c51196174.lua @@ -1,4 +1,5 @@ --ザ・カリキュレーター +--The Calculator local s,id=GetID() function s.initial_effect(c) --attack @@ -13,4 +14,4 @@ end function s.atkval(e,c) local g=Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),LOCATION_MZONE,0,nil) return g:GetSum(Card.GetLevel)*300 -end +end \ No newline at end of file diff --git a/official/c51196805.lua b/official/c51196805.lua index d75928d833..346742455a 100644 --- a/official/c51196805.lua +++ b/official/c51196805.lua @@ -1,4 +1,5 @@ --ゴーストリック・スケルトン +--Ghostrick Skeleton local s,id=GetID() function s.initial_effect(c) --summon limit @@ -27,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -37,7 +38,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -62,4 +63,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetDecktopGroup(1-tp,ac) Duel.DisableShuffleCheck() Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51205763.lua b/official/c51205763.lua index 103c8f5bb5..2c741ad106 100644 --- a/official/c51205763.lua +++ b/official/c51205763.lua @@ -25,20 +25,20 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if spos~=0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 then @@ -53,7 +53,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c51208046.lua b/official/c51208046.lua index 5bf484ab60..636135ded9 100644 --- a/official/c51208046.lua +++ b/official/c51208046.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end s.listed_names={TOKEN_TRICKSTAR} -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} --Check for anything but "Trickstar" monsters function s.counterfilter(c) - return c:IsSetCard(0xfb) + return c:IsSetCard(SET_TRICKSTAR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,7 +44,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end --Check for "Trickstar" monster function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0xfb) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_TRICKSTAR) and c:IsAbleToHand() end --Performing the recycle effect function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -59,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end --Check for "Trickstar" link monster function s.cfilter1(c) - return c:IsSetCard(0xfb) and c:IsLinkMonster() + return c:IsSetCard(SET_TRICKSTAR) and c:IsLinkMonster() end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil) @@ -70,7 +70,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -78,11 +78,11 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,3),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xfb) + return not c:IsSetCard(SET_TRICKSTAR) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,0xfb,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,SET_TRICKSTAR,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) end @@ -90,7 +90,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,0xfb,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,SET_TRICKSTAR,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end local token=Duel.CreateToken(tp,TOKEN_TRICKSTAR) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end @@ -101,4 +101,4 @@ end --Checking if opponent cntrols S/T function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter2,tp,0,LOCATION_SZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c51208877.lua b/official/c51208877.lua index cc11b1b4c4..51c5bb3b5c 100644 --- a/official/c51208877.lua +++ b/official/c51208877.lua @@ -1,9 +1,9 @@ --- 運命の抱く爆弾 --- Blast Held by Fate --- Scripted by Hatter +--運命の抱く爆弾 +--Blast Held by Destiny +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy 1 monster with the highest ATK + --Destroy 1 monster with the highest ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - -- Add 1 Level 4 EARTH Fairy monster to the hand + --Add 1 Level 4 EARTH Fairy monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_TO_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) end) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c51225407.lua b/official/c51225407.lua index e446a17e77..f2cf9050e1 100644 --- a/official/c51225407.lua +++ b/official/c51225407.lua @@ -1,5 +1,5 @@ --魔妖壊劫 ---Mayakashi Memorial +--Mayakashi Winter --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -43,16 +43,16 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.atkfilter(c) - return c:IsMonster() and c:IsSetCard(0x121) + return c:IsMonster() and c:IsSetCard(SET_MAYAKASHI) end function s.atkval(e,c) local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) return g:GetClassCount(Card.GetCode)*-100 end function s.drcfilter(c) - return c:IsFaceup() and c:IsSetCard(0x121) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_MAYAKASHI) and c:IsAbleToGraveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -79,13 +79,13 @@ function s.cfilter(c,e,tp) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAYAKASHI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) g:AddCard(c) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -102,5 +102,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c51227866.lua b/official/c51227866.lua index 3c0fb34cb0..ffa9cf4e49 100644 --- a/official/c51227866.lua +++ b/official/c51227866.lua @@ -51,10 +51,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) else Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c51232472.lua b/official/c51232472.lua index 8e42c9a770..0d2147773e 100644 --- a/official/c51232472.lua +++ b/official/c51232472.lua @@ -1,4 +1,5 @@ --暗黒界の策士 グリン +--Gren, Tactician of Dark World local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,10 +15,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&0x4040)==0x4040 + return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51250293.lua b/official/c51250293.lua index 93884396e8..42818d70c4 100644 --- a/official/c51250293.lua +++ b/official/c51250293.lua @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51254277.lua b/official/c51254277.lua index 1037dd7640..c62e2cf3fe 100644 --- a/official/c51254277.lua +++ b/official/c51254277.lua @@ -1,4 +1,5 @@ --ビッグ・ジョーズ +--Big Jaws local s,id=GetID() function s.initial_effect(c) --reg @@ -15,11 +16,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetCountLimit(1) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) e:GetHandler():RegisterEffect(e1) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -31,4 +32,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.Remove(c,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51254980.lua b/official/c51254980.lua index b6c5c1ac6e..7772c18d2b 100644 --- a/official/c51254980.lua +++ b/official/c51254980.lua @@ -1,4 +1,5 @@ --ナチュル・マンティス +--Naturia Mantis local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.cfilter(c) - return c:IsSetCard(0x2a) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_NATURIA) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5126490.lua b/official/c5126490.lua index ed8e102165..fcd242644d 100644 --- a/official/c5126490.lua +++ b/official/c5126490.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_names={CARD_NEOS,78371393} +s.listed_names={CARD_NEOS,CARD_YUBEL} function s.spfilter(c,...) return c:IsFaceup() and c:IsCode(...) and c:IsAbleToGraveAsCost() end @@ -45,20 +45,20 @@ function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(s.chk,1,nil,sg) end function s.chk(c,sg) - return c:IsCode(CARD_NEOS) and sg:IsExists(Card.IsCode,1,c,78371393) + return c:IsCode(CARD_NEOS) and sg:IsExists(Card.IsCode,1,c,CARD_YUBEL) end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local g1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,CARD_NEOS) - local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,78371393) + local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,CARD_YUBEL) local g=g1:Clone() g:Merge(g2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #g1>0 and #g2>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,CARD_NEOS,78371393) + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil,CARD_NEOS,CARD_YUBEL) local g=aux.SelectUnselectGroup(sg,e,tp,2,2,s.rescon,1,tp,HINTMSG_TOGRAVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -88,4 +88,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT,true) Duel.Recover(tp,def,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c51267887.lua b/official/c51267887.lua index 63bfbce2a0..b195660f43 100644 --- a/official/c51267887.lua +++ b/official/c51267887.lua @@ -1,4 +1,5 @@ --体温の上昇 +--Raise Body Heat local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_DINOSAUR)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c51275027.lua b/official/c51275027.lua index a284bc7e05..601bbdf6e9 100644 --- a/official/c51275027.lua +++ b/official/c51275027.lua @@ -15,5 +15,5 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end \ No newline at end of file diff --git a/official/c5128859.lua b/official/c5128859.lua index 36dbfbb8e9..487ee5471d 100644 --- a/official/c5128859.lua +++ b/official/c5128859.lua @@ -1,4 +1,5 @@ --E・HERO マリン・ネオス +--Elemental HERO Marine Neos local s,id=GetID() function s.initial_effect(c) --fusion material @@ -17,13 +18,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -36,4 +37,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local sg=g:RandomSelect(tp,1) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51296484.lua b/official/c51296484.lua index 438fe5ebb9..cd6e41fd96 100644 --- a/official/c51296484.lua +++ b/official/c51296484.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -21,14 +21,9 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) c:RegisterEffect(e2) end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.tgfilter(c) return c:IsRitualSpell() and c:IsAbleToGrave() end diff --git a/official/c5130393.lua b/official/c5130393.lua index 5b1c7ab8e9..05955667a8 100644 --- a/official/c5130393.lua +++ b/official/c5130393.lua @@ -1,7 +1,6 @@ --千年の血族 --Millennium Seeker --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -32,7 +31,7 @@ function s.initial_effect(c) end --If you took battle or effect damage function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and r&(REASON_BATTLE+REASON_EFFECT)~=0 and ev>=1000 + return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)~=0 and ev>=1000 end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c51316684.lua b/official/c51316684.lua index 4c17d9dc1a..c06a116997 100644 --- a/official/c51316684.lua +++ b/official/c51316684.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.rmcon) diff --git a/official/c51324455.lua b/official/c51324455.lua index 3c2be367ae..2b580b3b1a 100644 --- a/official/c51324455.lua +++ b/official/c51324455.lua @@ -1,4 +1,5 @@ --魔製産卵床 +--Underworld Egg Clutch local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,13 +14,13 @@ function s.initial_effect(c) end function s.cfilter(c,tp) return c:IsFaceup() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + and c:IsPreviousControler(tp) and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c) - return c:IsLevelBelow(4) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c5133471.lua b/official/c5133471.lua index b7f3aa0904..3d0b656f3a 100644 --- a/official/c5133471.lua +++ b/official/c5133471.lua @@ -1,4 +1,5 @@ --ギャラクシー・サイクロン +--Galaxy Cyclone local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.activate) c:RegisterEffect(e2) @@ -50,4 +51,4 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) -end +end \ No newline at end of file diff --git a/official/c51335426.lua b/official/c51335426.lua index c3a21537d3..8e6381936e 100644 --- a/official/c51335426.lua +++ b/official/c51335426.lua @@ -17,10 +17,10 @@ function s.filter(c,tp) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsLinkMonster() and c:IsAbleToExtra() and Duel.IsPlayerCanDraw(tp,c:GetLink()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetTargetPlayer(tp) Duel.SetTargetParam(g:GetFirst():GetLink()) @@ -31,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local tc=Duel.GetFirstTarget() local ct=tc:GetLink() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then if Duel.Draw(p,ct,REASON_EFFECT)==ct then local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) if #g==0 then return end @@ -44,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c51339637.lua b/official/c51339637.lua index 91a00dd84f..cd4fe65182 100644 --- a/official/c51339637.lua +++ b/official/c51339637.lua @@ -2,7 +2,6 @@ --Salamangreat Roar --Logical Nonsense --Substitute ID - local s,id=GetID() function s.initial_effect(c) aux.EnableCheckReincarnation(c) @@ -30,16 +29,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Salamangreat" archetype -s.listed_series={0xf0} - +s.listed_series={SET_WINDWITCH} --Check for "Salamangreat" link monster function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x119) and c:IsLinkMonster() + return c:IsFaceup() and c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() end --If monster effect or spell/trap card is activated function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -57,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end --Check if "Salamangreat" is reborn link summoned function s.lkfilter(c,tp) - return c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsReincarnationSummoned() and c:GetControler()==tp + return c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsReincarnationSummoned() and c:IsControler(tp) end --If it ever happened function s.setcon(e,tp,eg,ep,ev,re,r,rp) @@ -79,7 +77,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c51345461.lua b/official/c51345461.lua index 61d253b949..9520996b10 100644 --- a/official/c51345461.lua +++ b/official/c51345461.lua @@ -1,4 +1,5 @@ --ソードハンター +--Sword Hunter local s,id=GetID() function s.initial_effect(c) --equip @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(s.eqtg) @@ -29,7 +30,7 @@ function s.equipop(c,e,tp,tc,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(Card.EquipByEffectLimit) e1:SetLabelObject(e:GetLabelObject()) tc:RegisterEffect(e1) @@ -37,7 +38,7 @@ function s.equipop(c,e,tp,tc,chk) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(200) tc:RegisterEffect(e2) end diff --git a/official/c51351302.lua b/official/c51351302.lua index ab2028d264..ecc66a71b7 100644 --- a/official/c51351302.lua +++ b/official/c51351302.lua @@ -1,4 +1,5 @@ --ウジャト眼を持つ男 +--A Man with Wdjat local s,id=GetID() function s.initial_effect(c) --confirm @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.condition) e2:SetTarget(s.target) @@ -23,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFacedown() end @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c51355346.lua b/official/c51355346.lua index b9afdd6bf4..b8ff97e9ed 100644 --- a/official/c51355346.lua +++ b/official/c51355346.lua @@ -1,4 +1,5 @@ --爆炎集合体 ガイヤ・ソウル +--Gaia Soul the Combustible Collective local s,id=GetID() function s.initial_effect(c) --atk @@ -40,7 +41,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(e:GetLabel()*1000) c:RegisterEffect(e1) end @@ -54,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51365514.lua b/official/c51365514.lua index 24a696ad67..8f84ea814f 100644 --- a/official/c51365514.lua +++ b/official/c51365514.lua @@ -1,4 +1,5 @@ --超力の聖刻印 +--Hieratic Seal of Supremacy local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.filter(c,e,tp) - return c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HIERATIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51371017.lua b/official/c51371017.lua index 9dac662aea..633ebcdbc2 100644 --- a/official/c51371017.lua +++ b/official/c51371017.lua @@ -1,4 +1,5 @@ --剣の女王 +--Princess of Tsurugi local s,id=GetID() function s.initial_effect(c) --flip @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(p,LOCATION_SZONE,0)*500 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51391183.lua b/official/c51391183.lua index c545da37f7..2b1c3f7aaa 100644 --- a/official/c51391183.lua +++ b/official/c51391183.lua @@ -35,12 +35,12 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} s.listed_names={id} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x10ec) end - local tc=Duel.GetFirstMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,e:GetHandler(),0x10ec) + if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_ABYSS_ACTOR) end + local tc=Duel.GetFirstMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,e:GetHandler(),SET_ABYSS_ACTOR) Duel.SetTargetCard(tc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(9) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -65,25 +65,25 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,3)) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x10ec) + return not c:IsSetCard(SET_ABYSS_ACTOR) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x10ec),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ABYSS_ACTOR),tp,LOCATION_MZONE,0,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x10ec),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ABYSS_ACTOR),tp,LOCATION_MZONE,0,nil) if c:IsFaceup() and c:IsRelateToEffect(e) then local atkval=g:GetClassCount(Card.GetCode)*100 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -91,7 +91,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.filter(c) - return c:IsSetCard(0x10ec) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -104,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51394546.lua b/official/c51394546.lua index 41d13ef151..05abf0bba9 100644 --- a/official/c51394546.lua +++ b/official/c51394546.lua @@ -1,4 +1,5 @@ --セメタリー・ボム +--Cemetary Bomb local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOGRAVE+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_TOGRAVE|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_GRAVE,0)*100 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51402177.lua b/official/c51402177.lua index bccf1cf776..c98a67c69a 100644 --- a/official/c51402177.lua +++ b/official/c51402177.lua @@ -1,4 +1,5 @@ --スフィンクス・テーレイア +--Sphinx Teleia local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -43,7 +44,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.cfilter(c) @@ -73,4 +74,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51402908.lua b/official/c51402908.lua index 84b39cc4c9..dc5b4c2d79 100644 --- a/official/c51402908.lua +++ b/official/c51402908.lua @@ -1,4 +1,5 @@ --The supremacy SUN +--The Supremacy Sun local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetCost(s.spcost) e3:SetTarget(s.sptg) @@ -31,7 +32,7 @@ function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -40,7 +41,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51405049.lua b/official/c51405049.lua index 73dceea759..e6dc2acf15 100644 --- a/official/c51405049.lua +++ b/official/c51405049.lua @@ -1,4 +1,5 @@ --ワンチャン!? +--Where Arf Thou? local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetOperation(s.regop) e1:SetLabel(g:GetFirst():GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.damcon) e2:SetOperation(s.damop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(e1) Duel.RegisterEffect(e2,tp) end @@ -60,4 +61,4 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,2000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51412776.lua b/official/c51412776.lua index e9ccb3c115..7092e115f6 100644 --- a/official/c51412776.lua +++ b/official/c51412776.lua @@ -31,24 +31,24 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.filter(c) - return ((c:IsSetCard(0x107a) and c:IsMonster()) or c:IsSetCard(0x207a)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster()) or c:IsSetCard(SET_NOBLE_ARMS)) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.checkfilter(c,tp) - return c:IsSetCard(0x107a) and c:IsReason(REASON_BATTLE) and c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) and c:IsControler(tp) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsReason(REASON_BATTLE) and c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) and c:IsControler(tp) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.checkfilter,1,nil,tp) then Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,nil,0,rp,ep,ev) end @@ -63,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c51435705.lua b/official/c51435705.lua index f61d934c8a..c75127321a 100644 --- a/official/c51435705.lua +++ b/official/c51435705.lua @@ -1,4 +1,5 @@ --先史遺産クリスタル・スカル +--Chronomaly Crystal Skull local s,id=GetID() function s.initial_effect(c) --search @@ -9,34 +10,30 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.shcon) - e1:SetCost(s.shcost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.shtg) e1:SetOperation(s.shop) c:RegisterEffect(e1) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x70) + return c:IsFaceup() and c:IsSetCard(SET_CHRONOMALY) end function s.shcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.shcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST) -end function s.filter(c) - return c:IsSetCard(0x70) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CHRONOMALY) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51447164.lua b/official/c51447164.lua index e5fd414473..338736f1c6 100644 --- a/official/c51447164.lua +++ b/official/c51447164.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -44,7 +44,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x27} +s.listed_series={SET_TG} s.synchro_tuner_required=1 s.synchro_nt_required=1 function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -66,15 +66,15 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.rmfilter(c) - return c:IsSetCard(0x27) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_TG) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -84,10 +84,10 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then - if Duel.GetCurrentPhase()==PHASE_STANDBY then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount()) + if Duel.IsPhase(PHASE_STANDBY) then + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2,Duel.GetTurnCount()) else - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end end end @@ -105,4 +105,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51449743.lua b/official/c51449743.lua index 61c69ee4d7..8077996946 100644 --- a/official/c51449743.lua +++ b/official/c51449743.lua @@ -1,4 +1,5 @@ --チェーン・ブラスト +--Chain Detonation local s,id=GetID() function s.initial_effect(c) --damage @@ -28,6 +29,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) elseif ct>1 then c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51452091.lua b/official/c51452091.lua index 44e00b1f6e..b5f9356408 100644 --- a/official/c51452091.lua +++ b/official/c51452091.lua @@ -38,7 +38,7 @@ function s.distarget(e,c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) and re:GetHandler()~=e:GetHandler() then + if tl==LOCATION_SZONE and re:IsTrapEffect() and re:GetHandler()~=e:GetHandler() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c51473858.lua b/official/c51473858.lua index ba6d3165d1..fe5ebdc10e 100644 --- a/official/c51473858.lua +++ b/official/c51473858.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) - e3:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e3:SetCountLimit(1,{id,1}) e3:SetCondition(function(_,tp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end) e3:SetTarget(s.selfsptg) diff --git a/official/c51474037.lua b/official/c51474037.lua index ff7cebc8c8..c956e06042 100644 --- a/official/c51474037.lua +++ b/official/c51474037.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) @@ -71,4 +71,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) opp_c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c51476410.lua b/official/c51476410.lua index fbed6785eb..85339c3233 100644 --- a/official/c51476410.lua +++ b/official/c51476410.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget((function(tg) return function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -36,11 +36,6 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.lizardcheck(c,tp) return c:IsAbleToExtra() and not c:IsHasEffect(CARD_CLOCK_LIZARD) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetOriginalCode(),{c:GetOriginalSetCard()},c:GetOriginalType(),c:GetBaseAttack(),c:GetBaseDefense(),c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute()) @@ -51,7 +46,7 @@ function s.checkextra(c) end end function s.extrafil(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,Duel.IsPlayerAffectedByEffect(tp,69832741) and LOCATION_MZONE or LOCATION_GRAVE,0,nil),s.checkextra(e:GetHandler()) + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and LOCATION_MZONE or LOCATION_GRAVE,0,nil),s.checkextra(e:GetHandler()) end function s.preop(e,tc) return Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 @@ -61,7 +56,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return c:IsFaceup() and c:IsPreviousLocation(LOCATION_GRAVE) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsSpecialSummoned() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,RACE_CYBERSE) @@ -79,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c51481927.lua b/official/c51481927.lua index 3f3e6d2ae2..03a84632ef 100644 --- a/official/c51481927.lua +++ b/official/c51481927.lua @@ -1,4 +1,5 @@ --魔法吸収 +--Spell Absorption local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,9 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler()~=e:GetHandler() and e:GetHandler():GetFlagEffect(1)>0 end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51482758.lua b/official/c51482758.lua index 50768cbf80..51d142978c 100644 --- a/official/c51482758.lua +++ b/official/c51482758.lua @@ -1,4 +1,5 @@ --罠はずし +--Remove Trap local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51497409.lua b/official/c51497409.lua index e4aa141694..fc18a3e113 100644 --- a/official/c51497409.lua +++ b/official/c51497409.lua @@ -1,4 +1,5 @@ --DDD磐石王ダリウス +--D/D/D Stone King Darius local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ddtg) e1:SetOperation(s.ddop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -21,17 +22,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCondition(s.incon) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.inop) c:RegisterEffect(e2) end -s.listed_series={0xae} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_DARK_CONTRACT} function s.ddfilter(c) - return c:IsFaceup() and c:IsSetCard(0xae) + return c:IsFaceup() and c:IsSetCard(SET_DARK_CONTRACT) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.ddfilter(chkc) end @@ -60,13 +57,13 @@ function s.inop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_BATTLED) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e2) end end @@ -76,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if dc and Duel.Destroy(dc,REASON_EFFECT)>0 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51510279.lua b/official/c51510279.lua index ab6913860a..d01f2d583f 100644 --- a/official/c51510279.lua +++ b/official/c51510279.lua @@ -1,11 +1,11 @@ --繋がれし魔鍵 ---Connected Magikey +--Magikey Duo --Scripted by edo9300 local s,id=GetID() function s.initial_effect(c) --Activate - local fparams={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0x167),sumpos=POS_FACEUP_DEFENSE} - local rparams={filter=aux.FilterBoolFunction(Card.IsSetCard,0x167),lvtype=RITPROC_GREATER,sumpos=POS_FACEUP_DEFENSE} + local fparams={fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_MAGIKEY),sumpos=POS_FACEUP_DEFENSE} + local rparams={filter=aux.FilterBoolFunction(Card.IsSetCard,SET_MAGIKEY),lvtype=RITPROC_GREATER,sumpos=POS_FACEUP_DEFENSE} local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation(Fusion.SummonEffTG(fparams),Fusion.SummonEffOP(fparams),Ritual.Target(rparams),Ritual.Operation(rparams))) c:RegisterEffect(e1) end -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.filter(c) - return (c:IsSetCard(0x167) or c:IsType(TYPE_NORMAL)) and c:IsMonster() and c:IsAbleToHand() + return (c:IsSetCard(SET_MAGIKEY) or c:IsType(TYPE_NORMAL)) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -50,4 +50,4 @@ function s.operation(fustg,fusop,rittg,ritop) end end end -end +end \ No newline at end of file diff --git a/official/c51531505.lua b/official/c51531505.lua index d630ed62c9..dc081884a6 100644 --- a/official/c51531505.lua +++ b/official/c51531505.lua @@ -1,4 +1,5 @@ --竜穴の魔術師 +--Dragonpit Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -17,19 +18,19 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x98) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_MAGICIAN) end function s.cfilter(c) return c:IsType(TYPE_PENDULUM) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51534754.lua b/official/c51534754.lua index 38bbf7892e..c682d5cdd7 100644 --- a/official/c51534754.lua +++ b/official/c51534754.lua @@ -1,4 +1,5 @@ --黄泉へ渡る船 +--Yomi Ship local s,id=GetID() function s.initial_effect(c) --destroy @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if rc:IsRelateToEffect(e) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5153769.lua b/official/c5153769.lua index b809ce470f..275426c83b 100644 --- a/official/c5153769.lua +++ b/official/c5153769.lua @@ -1,4 +1,5 @@ --マジェスペクター・ガスト +--Majespecter Gust local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - return c:IsSetCard(0xd0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAJESPECTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51543904.lua b/official/c51543904.lua index 9ead2f68a2..5662c1b0bd 100644 --- a/official/c51543904.lua +++ b/official/c51543904.lua @@ -25,30 +25,30 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x95,0x48} +s.listed_series={SET_RANK_UP_MAGIC,SET_NUMBER} s.xyz_number=99 function s.cfilter(c) - return c:IsSetCard(0x95) and c:IsSpell() and c:IsDiscardable() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() and c:IsDiscardable() end function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0x107f,lc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA,lc,SUMMON_TYPE_XYZ,tp) end function s.xyzop(e,tp,chk,mc) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local tc=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) if tc then - Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(tc,REASON_DISCARD|REASON_COST) return true else return false end end function s.filter(c,e,tp) - return c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_NUMBER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -65,12 +65,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -78,14 +78,10 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not re:IsActiveType(TYPE_MONSTER) then return end + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not re:IsMonsterEffect() then return end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsContains(c) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -97,4 +93,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51549976.lua b/official/c51549976.lua index fbfe40e53a..5a0b772df4 100644 --- a/official/c51549976.lua +++ b/official/c51549976.lua @@ -1,4 +1,5 @@ --ファイナル・インゼクション +--Final Inzektion local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x56) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,5,nil) end @@ -36,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.actcon) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actcon(e) @@ -44,5 +45,5 @@ function s.actcon(e) return ph>PHASE_MAIN1 and ph0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsSetCard(SET_SCRAP) and chkc:IsFaceup() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsSetCard(SET_SCRAP) and chkc:IsFaceup() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_SCRAP),tp,LOCATION_MZONE,0,1,1,nil) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and tc:IsControler(tp) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51562916.lua b/official/c51562916.lua index a399a457cc..c0f814f20d 100644 --- a/official/c51562916.lua +++ b/official/c51562916.lua @@ -1,4 +1,5 @@ --大波小波 +--Big Wave Small Wave local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local spg=sg:Select(tp,1,ct,nil) Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51566770.lua b/official/c51566770.lua index 720d2a3aed..1a148a7dee 100644 --- a/official/c51566770.lua +++ b/official/c51566770.lua @@ -1,4 +1,5 @@ --インフェルニティ・ガーディアン +--Infernity Guardian local s,id=GetID() function s.initial_effect(c) --cannot destroy @@ -21,4 +22,4 @@ function s.initial_effect(c) end function s.condition(e) return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)==0 -end +end \ No newline at end of file diff --git a/official/c51570882.lua b/official/c51570882.lua index 35af8773bd..9524e06b90 100644 --- a/official/c51570882.lua +++ b/official/c51570882.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10f3),s.ffilter2) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PREDAPLANT),s.ffilter2) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -34,8 +34,8 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10f3} -s.material_setcode={0xf3,0x10f3} +s.listed_series={SET_PREDAPLANT} +s.material_setcode={SET_PREDAP,SET_PREDAPLANT} function s.ffilter2(c,fc,sumtype,tp) return c:GetOriginalLevel()>=8 and c:IsAttribute(ATTRIBUTE_DARK,fc,sumtype,tp) end @@ -61,19 +61,19 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -94,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) if Duel.Destroy(dg,REASON_EFFECT)==0 then return end local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,c) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c) if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_GRAVE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -104,4 +104,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51578214.lua b/official/c51578214.lua index d08ea46114..ab2ed23801 100644 --- a/official/c51578214.lua +++ b/official/c51578214.lua @@ -1,4 +1,4 @@ --- +--騎甲虫アサルト・ローラー --Beetrooper Assault Roller --Scripted by Zefile local s,id=GetID() @@ -34,7 +34,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x172} +s.listed_series={SET_BEETROOPER} function s.spfilter(c,tp) return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c)>0 and aux.SpElimFilter(c,true) @@ -42,11 +42,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) return aux.SelectUnselectGroup(g,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local rg=aux.SelectUnselectGroup(g,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #rg>0 then rg:KeepAlive() @@ -65,7 +65,7 @@ function s.atkval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_INSECT),c:GetControler(),LOCATION_MZONE,0,c)*200 end function s.adfilter(c) - return c:IsSetCard(0x172) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_BEETROOPER) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.adfilter,tp,LOCATION_DECK,0,1,nil) end @@ -78,4 +78,4 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51589188.lua b/official/c51589188.lua index 2316e9aa46..4490f28f3b 100644 --- a/official/c51589188.lua +++ b/official/c51589188.lua @@ -1,6 +1,5 @@ --フォトン・トライデント --Photon Trident - local s,id=GetID() function s.initial_effect(c) --Targeted "Photon" monster gains 700 ATK, also inflict piercing damage @@ -10,17 +9,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x55} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_PHOTON} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x55) + return c:IsFaceup() and c:IsSetCard(SET_PHOTON) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(700) tc:RegisterEffect(e1) --Inflict piercing damage @@ -44,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --Destroy 1 spell/trap on the field local e3=Effect.CreateEffect(e:GetHandler()) @@ -57,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCondition(s.descon) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end @@ -65,7 +61,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and eg:GetFirst()==e:GetLabelObject() end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end diff --git a/official/c51606429.lua b/official/c51606429.lua index 13264a97b7..04faee4a33 100644 --- a/official/c51606429.lua +++ b/official/c51606429.lua @@ -19,20 +19,20 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,3,0,0,RACE_WARRIOR,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,3,0,0,RACE_WARRIOR,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,3,0,0,RACE_WARRIOR,ATTRIBUTE_DARK) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,3,0,0,RACE_WARRIOR,ATTRIBUTE_DARK) then c:AddMonsterAttribute(TYPE_NORMAL) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_ATTACK) c:AddMonsterAttributeComplete() @@ -40,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp + return aux.exccon(e) and Duel.IsTurnPlayer(tp) end function s.negfilter(c) return c:IsFaceup() and c:IsTrap() and not c:IsDisabled() @@ -59,20 +59,20 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c51611041.lua b/official/c51611041.lua index cdd0f55991..117108de49 100644 --- a/official/c51611041.lua +++ b/official/c51611041.lua @@ -1,9 +1,9 @@ --- 模拘撮星人 エピゴネン --- Epigonen the Imitarian --- Scripted by Hatter +--模拘撮星人 エピゴネン +--Epigonen, the Impersonation Invader +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self and Token + --Special Summon self and Token local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -43,14 +43,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) then Duel.BreakEffect() - -- Change Type and Attribute + --Change Type and Attribute local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(race) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c51616747.lua b/official/c51616747.lua index 464d85c4c7..a5ee99f42d 100644 --- a/official/c51616747.lua +++ b/official/c51616747.lua @@ -1,4 +1,5 @@ --ヌビアガード +--Nubian Guard local s,id=GetID() function s.initial_effect(c) --todeck @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToDeck() + return c:IsContinuousSpell() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,6 +30,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51617185.lua b/official/c51617185.lua index dce9050d9c..649c8e5962 100644 --- a/official/c51617185.lua +++ b/official/c51617185.lua @@ -1,4 +1,5 @@ --マシンナーズ・メガフォーム +--Machina Megaform local s,id=GetID() function s.initial_effect(c) --spsummon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -26,31 +27,27 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} s.listed_names={5556499} -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x36) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MACHINA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop1(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.cfilter(c,tp) - return not Duel.IsPlayerAffectedByEffect(c:GetControler(),69832741) + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),CARD_SPIRIT_ELIMINATION) and c:IsCode(5556499) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsAbleToRemoveAsCost() @@ -70,4 +67,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51630558.lua b/official/c51630558.lua index 8c282af0bf..c9490c36d8 100644 --- a/official/c51630558.lua +++ b/official/c51630558.lua @@ -1,4 +1,5 @@ --アドバンスドロー +--Advance Draw local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51632798.lua b/official/c51632798.lua index c86af92fc8..230833174b 100644 --- a/official/c51632798.lua +++ b/official/c51632798.lua @@ -1,4 +1,5 @@ --可変機獣 ガンナードラゴン +--Fusilier Dragon, the Dual-Mode Beast local s,id=GetID() function s.initial_effect(c) --summon & set with no tribute @@ -24,7 +25,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1400) c:RegisterEffect(e1) @@ -32,4 +33,4 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(1000) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c51644030.lua b/official/c51644030.lua index 55d5275f4c..09d2907811 100644 --- a/official/c51644030.lua +++ b/official/c51644030.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1,id) - e2:SetCondition(s.atkcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop2) c:RegisterEffect(e2) @@ -32,13 +32,10 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return e:GetHandler():IsAbleToRemove() and e:GetHandler():GetAttack()>0 @@ -56,23 +53,23 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then Duel.BreakEffect() - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if Duel.Remove(c,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetLabel(Duel.GetTurnCount()) e2:SetLabelObject(c) e2:SetCondition(s.retcon) e2:SetOperation(s.retop) if Duel.GetCurrentPhase()<=PHASE_STANDBY then - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,2) else - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY) end Duel.RegisterEffect(e2,tp) end @@ -84,4 +81,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c51650038.lua b/official/c51650038.lua index 3ca9402577..8570670128 100644 --- a/official/c51650038.lua +++ b/official/c51650038.lua @@ -88,4 +88,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if tc:IsImmuneToEffect(e) then return end Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c51670553.lua b/official/c51670553.lua index c1f5269271..f5dfcfb37e 100644 --- a/official/c51670553.lua +++ b/official/c51670553.lua @@ -1,4 +1,5 @@ --魂を吸う竹光 +--Soul Devouring Bamboo Sword local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,16 +23,16 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetRange(LOCATION_SZONE) e3:SetCondition(s.descon) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x60} +s.listed_series={SET_BAMBOO_SWORD} function s.filter(c) - return c:GetEquipCount()~=0 and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x60) + return c:GetEquipCount()~=0 and c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_BAMBOO_SWORD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -60,7 +61,7 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetCode(EFFECT_SKIP_DP) - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ct==2 then Duel.Destroy(c,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c5168381.lua b/official/c5168381.lua index cc6a5f2307..7c24383447 100644 --- a/official/c5168381.lua +++ b/official/c5168381.lua @@ -1,5 +1,5 @@ --悪魔の技 ---Archfiend Glitch +--Archfiend's Ghastly Glitch --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) diff --git a/official/c51684157.lua b/official/c51684157.lua index 1eed2548ae..36cb1eaad0 100644 --- a/official/c51684157.lua +++ b/official/c51684157.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c51686645.lua b/official/c51686645.lua index e922bef06c..d279209e2b 100644 --- a/official/c51686645.lua +++ b/official/c51686645.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -29,11 +29,6 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end - --Not during damage calcuation -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end - --Become equip card function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() diff --git a/official/c51697825.lua b/official/c51697825.lua index afacf6f329..cadd317fd4 100644 --- a/official/c51697825.lua +++ b/official/c51697825.lua @@ -1,5 +1,5 @@ --ジャック・イン・ザ・ハンド ---Jack in the Hand +--Jack-In-The-Hand --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -48,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleDeck(tp) end -end +end \ No newline at end of file diff --git a/official/c51701885.lua b/official/c51701885.lua index d8645f7327..fbd62be833 100644 --- a/official/c51701885.lua +++ b/official/c51701885.lua @@ -1,4 +1,5 @@ --テレポンD.D. +--D.D. Telepon local s,id=GetID() function s.initial_effect(c) --remove @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_REMOVED) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -44,8 +45,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) if c:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,3) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,3) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,3) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,3) e:SetLabelObject(tc) end end @@ -53,7 +54,7 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject():GetLabelObject() local c=e:GetHandler() - return tc and Duel.GetTurnCount()~=tc:GetTurnID() and Duel.GetTurnPlayer()==tp + return tc and Duel.GetTurnCount()~=tc:GetTurnID() and Duel.IsTurnPlayer(tp) and c:GetFlagEffect(id)~=0 and tc:GetFlagEffect(id)~=0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -68,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51706604.lua b/official/c51706604.lua index 4bcb48ccdc..0afcb7a80f 100644 --- a/official/c51706604.lua +++ b/official/c51706604.lua @@ -35,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.discon) e1:SetOperation(s.disop) e1:SetLabel(tc:GetOriginalCodeRule()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --redirect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END) e2:SetCondition(s.recon) e2:SetValue(LOCATION_HAND) tc:RegisterEffect(e2,true) @@ -52,7 +52,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local code1,code2=re:GetHandler():GetOriginalCodeRule() - return re:IsActiveType(TYPE_SPELL) and loc&LOCATION_ONFIELD~=0 and (code1==code or code2==code) + return re:IsSpellEffect() and loc&LOCATION_ONFIELD~=0 and (code1==code or code2==code) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) @@ -61,4 +61,4 @@ end function s.recon(e) local c=e:GetHandler() return c:IsFaceup() and c:GetDestination()==LOCATION_GRAVE -end +end \ No newline at end of file diff --git a/official/c51728779.lua b/official/c51728779.lua index 9ae03c269c..9a6187daf3 100644 --- a/official/c51728779.lua +++ b/official/c51728779.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.cpcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.cptg) e2:SetOperation(s.cpop) c:RegisterEffect(e2) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.cfilter(c) - return c:IsSetCard(0xef) and c:IsDiscardable() + return c:IsSetCard(SET_DARKLORD) and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() @@ -39,10 +39,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xef) and c:IsAbleToHand() + return c:IsSetCard(SET_DARKLORD) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -57,12 +57,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.cpfilter(c) - return c:IsSetCard(0xef) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil + return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil end function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.cpfilter(chkc) end @@ -92,5 +88,5 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) etc:ReleaseEffectRelation(te) end Duel.BreakEffect() - Duel.SendtoDeck(te:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c51735257.lua b/official/c51735257.lua index eb37707b3e..0c91af6d1d 100644 --- a/official/c51735257.lua +++ b/official/c51735257.lua @@ -1,6 +1,5 @@ --No.50 ブラック・コーン号 --Number 50: Blackship of Corn - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -21,7 +20,6 @@ function s.initial_effect(c) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=50 - function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -32,7 +30,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c,atk) diff --git a/official/c51773900.lua b/official/c51773900.lua index 572b6906cb..1d43f1ae2b 100644 --- a/official/c51773900.lua +++ b/official/c51773900.lua @@ -1,4 +1,5 @@ --カーム・マジック +--Calming Magic local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -18,7 +19,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCondition(s.sumcon) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,1) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -34,4 +35,4 @@ end function s.sumcon(e) local ph=Duel.GetCurrentPhase() return ph>=PHASE_MAIN1 and ph<=PHASE_MAIN2 -end +end \ No newline at end of file diff --git a/official/c51777272.lua b/official/c51777272.lua index 6e457b8e11..ed1a6d77cf 100644 --- a/official/c51777272.lua +++ b/official/c51777272.lua @@ -1,8 +1,9 @@ --月光舞猫姫 +--Lunalight Cat Dancer local s,id=GetID() function s.initial_effect(c) --fusion material - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xdf),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),2) c:EnableReviveLimit() --battle indestructable local e1=Effect.CreateEffect(c) @@ -30,14 +31,14 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0xdf} -s.material_setcode=0xdf +s.listed_series={SET_LUNALIGHT} +s.material_setcode=SET_LUNALIGHT function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),0xdf) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),0xdf) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),SET_LUNALIGHT) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),SET_LUNALIGHT) Duel.Release(g,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -47,14 +48,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.indct) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if c:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(2) c:RegisterEffect(e2) end @@ -73,4 +74,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51779204.lua b/official/c51779204.lua index 7e896b9233..10880e1faf 100644 --- a/official/c51779204.lua +++ b/official/c51779204.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) end s.listed_names={CARD_RED_DRAGON_ARCHFIEND} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())) + return Duel.IsAbleToEnterBP() or (Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition()) end function s.tgfilter(c) return c:IsFaceup() and c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and not c:HasFlagEffect(id) @@ -67,4 +67,4 @@ function s.effcon(e) local bc=c:GetBattleTarget() local tp=e:GetHandlerPlayer() return c:IsRelateToBattle() and bc and bc:IsControler(1-tp) and e:GetOwnerPlayer()==tp -end +end \ No newline at end of file diff --git a/official/c5177985.lua b/official/c5177985.lua index 0e40870207..8ff827a789 100644 --- a/official/c5177985.lua +++ b/official/c5177985.lua @@ -1,7 +1,6 @@ --不知火の師範 --Shiranui Swordmaster --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -27,14 +26,13 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xd9} - +s.listed_series={SET_SHIRANUI} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xd9) + return c:IsFaceup() and c:IsSetCard(SET_SHIRANUI) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil,c:GetCode()) end function s.cfilter2(c,code) - return c:IsFaceup() and c:IsSetCard(0xd9) and not c:IsCode(code) + return c:IsFaceup() and c:IsSetCard(SET_SHIRANUI) and not c:IsCode(code) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) @@ -53,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -74,7 +72,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c51782995.lua b/official/c51782995.lua index 18d7e7e681..832c0e6640 100644 --- a/official/c51782995.lua +++ b/official/c51782995.lua @@ -1,5 +1,5 @@ --ネフティスの護り手 ---Protector of Nephthys +--Defender of Nephthys local s,id=GetID() function s.initial_effect(c) --special summon @@ -25,17 +25,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.descon) e3:SetTarget(s.destg) e3:SetOperation(s.desop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x11f) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_NEPHTHYS) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.filter(c,e,tp,chk,sp) return ((chk==0 or sp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)) @@ -62,13 +62,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) then return end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -76,7 +76,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(id)>0 end function s.desfilter(c) - return c:IsSetCard(0x11f) and c:IsMonster() and not c:IsCode(id) + return c:IsSetCard(SET_NEPHTHYS) and c:IsMonster() and not c:IsCode(id) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -91,5 +91,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c51786039.lua b/official/c51786039.lua index ac47613c93..4536ce3d3f 100644 --- a/official/c51786039.lua +++ b/official/c51786039.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -62,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -79,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -104,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51788412.lua b/official/c51788412.lua index 23a4a54099..9b7ced9f5d 100644 --- a/official/c51788412.lua +++ b/official/c51788412.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x7),4) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ANCIENT_GEAR),4) --special summon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -42,15 +42,15 @@ function s.initial_effect(c) e5:SetCode(EFFECT_PIERCE) c:RegisterEffect(e5) end -s.listed_series={0x7} -s.material_setcode=0x7 +s.listed_series={SET_ANCIENT_GEAR} +s.material_setcode=SET_ANCIENT_GEAR function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return te:IsSpellTrapEffect() end function s.actcon(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.actlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c51790181.lua b/official/c51790181.lua index 168d218dfb..15ba0006b4 100644 --- a/official/c51790181.lua +++ b/official/c51790181.lua @@ -1,4 +1,5 @@ --無欲な壺 +--Pot of Benevolence local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,8 +23,8 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if e:GetHandler():IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51808422.lua b/official/c51808422.lua index 73272e4e10..e4d8dc2580 100644 --- a/official/c51808422.lua +++ b/official/c51808422.lua @@ -1,4 +1,5 @@ --XX-セイバー フォルトロール +--XX-Saber Faultroll local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -29,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) + return c:IsFaceup() and c:IsSetCard(SET_X_SABER) end function s.spcon(e,c) if c==nil then return true end @@ -39,7 +40,7 @@ function s.spcon(e,c) Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_X_SABER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -54,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51814159.lua b/official/c51814159.lua index d33da524ff..00d1ca1135 100644 --- a/official/c51814159.lua +++ b/official/c51814159.lua @@ -15,14 +15,14 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x95} +s.listed_series={SET_RANK_UP_MAGIC} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0xba) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0xba) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_RAIDRAPTOR) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_RAIDRAPTOR) Duel.Release(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x95) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -43,9 +43,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return (sumtype&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se:GetHandler():IsSetCard(0x95) -end + return (sumtype&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se:GetHandler():IsSetCard(SET_RANK_UP_MAGIC) +end \ No newline at end of file diff --git a/official/c5182107.lua b/official/c5182107.lua index 00e9903360..6b637d59e4 100644 --- a/official/c5182107.lua +++ b/official/c5182107.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcond) - e3:SetCost(aux.SelfTributeCost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51827737.lua b/official/c51827737.lua index ec000633a3..38ea705bda 100644 --- a/official/c51827737.lua +++ b/official/c51827737.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsSetCard(0x2) end - if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x2) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsSetCard(SET_GENEX) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,SET_GENEX) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,1,nil,0x2) + Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,1,nil,SET_GENEX) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -28,7 +28,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetCode()) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c51828629.lua b/official/c51828629.lua index 9817279c02..257a57dc9d 100644 --- a/official/c51828629.lua +++ b/official/c51828629.lua @@ -1,7 +1,8 @@ --魔導騎士ギルティア +--Giltia the D. Knight local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,89272878,10071456) -end +end \ No newline at end of file diff --git a/official/c5183693.lua b/official/c5183693.lua index 1f1cd890cd..e48c5ca1ed 100644 --- a/official/c5183693.lua +++ b/official/c5183693.lua @@ -1,5 +1,5 @@ --下克上の首飾り ---Amullet of Ambition +--Amulet of Ambition local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL)) @@ -36,6 +36,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51838385.lua b/official/c51838385.lua index 65597aec35..ca8703f609 100644 --- a/official/c51838385.lua +++ b/official/c51838385.lua @@ -18,4 +18,4 @@ end function s.atkcon(e) local tp=e:GetHandlerPlayer() return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)+Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_SZONE,0,nil)==0 -end +end \ No newline at end of file diff --git a/official/c51849216.lua b/official/c51849216.lua index ded79d2a09..6c962f1b84 100644 --- a/official/c51849216.lua +++ b/official/c51849216.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.cfilter(c) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x29) + return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(SET_DRAGUNITY) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end @@ -35,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsLevel(10) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsLevel(10) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) @@ -47,13 +47,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectEffectYesNo(tp,e:GetHandler()) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) - local tc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,0x29),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() Duel.HintSelection(Group.FromCards(tc)) --Increase ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(ct*100) tc:RegisterEffect(e1) end diff --git a/official/c51852507.lua b/official/c51852507.lua index f8a9eefaee..2e6e8e91bd 100644 --- a/official/c51852507.lua +++ b/official/c51852507.lua @@ -11,20 +11,16 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return ep==1-tp and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_MZONE,0,1,nil) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -36,4 +32,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51855378.lua b/official/c51855378.lua index 7d17791ccb..609e9d0169 100644 --- a/official/c51855378.lua +++ b/official/c51855378.lua @@ -1,4 +1,5 @@ --ジャンク・ブレーダー +--Junk Blader local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.cfilter(c) - return c:IsSetCard(0x43) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_JUNK) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c51858200.lua b/official/c51858200.lua index f1522eced8..0b5ccf51df 100644 --- a/official/c51858200.lua +++ b/official/c51858200.lua @@ -30,19 +30,19 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) --fusion summon - local params = {nil,aux.FilterBoolFunction(Card.IsSetCard,0xf3)} + local params = {nil,aux.FilterBoolFunction(Card.IsSetCard,SET_PREDAP)} local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0xf3} +s.listed_series={SET_PREDAP} s.counter_list={COUNTER_PREDATOR} function s.lvfdfilter(c) return c:IsLocation(LOCATION_MZONE) and c:GetCounter(COUNTER_PREDATOR)>0 @@ -58,7 +58,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetLabelObject():GetLabel()==1 end function s.thfilter(c) - return c:IsSetCard(0xf3) and c:IsAbleToHand() + return c:IsSetCard(SET_PREDAP) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51858306.lua b/official/c51858306.lua index 8cf494fd9b..0aa3befa56 100644 --- a/official/c51858306.lua +++ b/official/c51858306.lua @@ -1,4 +1,5 @@ --エクリプス・ワイバーン +--Eclipse Wyvern local s,id=GetID() function s.initial_effect(c) --remove @@ -39,8 +40,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) e:SetLabelObject(tc) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+0x1e60000,0,1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESET_TURN_SET|RESET_TOGRAVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE|RESET_TOFIELD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -56,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:GetFlagEffect(id)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c51865604.lua b/official/c51865604.lua index 5231db2931..7339b1f0ff 100644 --- a/official/c51865604.lua +++ b/official/c51865604.lua @@ -1,4 +1,5 @@ --ZS-幻影賢者 +--ZS - Vanish Sage local s,id=GetID() function s.initial_effect(c) --draw @@ -22,14 +23,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_REMOVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -49,11 +50,7 @@ function s.spfilter(c,e,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and eg:IsExists(s.spfilter,1,nil,e,tp) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) + return Duel.IsBattlePhase() and eg:IsExists(s.spfilter,1,nil,e,tp) end function s.rmfilter(c) return c:IsAttackBelow(3000) and c:IsAbleToRemove() @@ -74,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_MZONE,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5186893.lua b/official/c5186893.lua index 640f59147a..a4bd9b8a6d 100644 --- a/official/c5186893.lua +++ b/official/c5186893.lua @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c51912531.lua b/official/c51912531.lua index 349f3a9e94..29d664a0c4 100644 --- a/official/c51912531.lua +++ b/official/c51912531.lua @@ -1,4 +1,5 @@ --幻妖種ミトラ +--Mystic Macrocarpa Seed local s,id=GetID() function s.initial_effect(c) --synchro limit @@ -40,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c51916032.lua b/official/c51916032.lua index 620a982bfe..6460bbe9df 100644 --- a/official/c51916032.lua +++ b/official/c51916032.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_JINZO) c:RegisterEffect(e1) --add to hand @@ -17,19 +17,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xbc} +s.listed_series={SET_JINZO} s.listed_names={id,CARD_JINZO} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsSetCard(0xbc) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_JINZO) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -39,7 +35,7 @@ function s.cffilter(c) return c:IsFacedown() and c:GetSequence()<5 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xbc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_JINZO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -62,4 +58,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c51916853.lua b/official/c51916853.lua index 4c898fb44c..d1f780ddd1 100644 --- a/official/c51916853.lua +++ b/official/c51916853.lua @@ -1,4 +1,4 @@ --- +--マジカル・ハウンド --Magical Hound --Scripted by Hel local s,id=GetID() @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -32,5 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c51925772.lua b/official/c51925772.lua index a01133a30a..a63e31dcde 100644 --- a/official/c51925772.lua +++ b/official/c51925772.lua @@ -1,4 +1,5 @@ --ドレッド・ドラゴン +--Dread Dragon local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c51933043.lua b/official/c51933043.lua index 2fe6c3cdd0..da18279a73 100644 --- a/official/c51933043.lua +++ b/official/c51933043.lua @@ -21,15 +21,15 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,0xba),nil)==#g + return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,SET_RAIDRAPTOR),nil)==#g end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0xba) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -57,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51945556.lua b/official/c51945556.lua index 653a43fde1..bb3c62709d 100644 --- a/official/c51945556.lua +++ b/official/c51945556.lua @@ -1,4 +1,5 @@ --雷帝ザボルグ +--Zaborg the Thunder Monarch local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51960178.lua b/official/c51960178.lua index 2c028d16f9..1edaa273b9 100644 --- a/official/c51960178.lua +++ b/official/c51960178.lua @@ -1,4 +1,5 @@ --フェアリー・チア・ガール +--Fairy Cheer Girl local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -30,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c51962254.lua b/official/c51962254.lua index 97f6e581f8..1b9bc0d875 100644 --- a/official/c51962254.lua +++ b/official/c51962254.lua @@ -1,4 +1,5 @@ --ハンター・アウル +--Hunter Owl local s,id=GetID() function s.initial_effect(c) --cannot be attacked @@ -30,4 +31,4 @@ function s.upval(e,c) end function s.upfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) -end +end \ No newline at end of file diff --git a/official/c51976476.lua b/official/c51976476.lua index a49adf2d6d..0813876b3f 100644 --- a/official/c51976476.lua +++ b/official/c51976476.lua @@ -27,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c51987571.lua b/official/c51987571.lua index e9ec836070..6aba55adc0 100644 --- a/official/c51987571.lua +++ b/official/c51987571.lua @@ -1,6 +1,5 @@ --ロックストーン・ウォリアー --Rockstone Warrior - local s,id=GetID() function s.initial_effect(c) --Special summon 2 tokens to your field @@ -42,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) token:RegisterEffect(e1,true) end diff --git a/official/c51993760.lua b/official/c51993760.lua index 6629486f82..fa511f826c 100644 --- a/official/c51993760.lua +++ b/official/c51993760.lua @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsLevel(8) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (e:GetHandler():IsLocation(LOCATION_MZONE) and e:GetHandler():GetSequence()<5 or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) @@ -55,12 +51,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() local a=Duel.GetAttacker() @@ -86,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52020510.lua b/official/c52020510.lua index 308ed64e24..97c5a0eb65 100644 --- a/official/c52020510.lua +++ b/official/c52020510.lua @@ -1,5 +1,5 @@ --ダイノルフィア・アラート ---Dinoruffia Alert +--Dinomorphia Alert --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -22,17 +22,17 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.PayLPCost(tp,Duel.GetLP(tp)//2) end function s.spfilter(c,e,tp) - return c:IsMonster() and c:HasLevel() and c:IsSetCard(0x175) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsMonster() and c:HasLevel() and c:IsSetCard(SET_DINOMORPHIA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.rescon(sg,e,tp,mg) return sg:GetSum(Card.GetLevel)<=8 @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end end @@ -67,11 +67,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x175) + return not c:IsSetCard(SET_DINOMORPHIA) end function s.nodamcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and Duel.GetLP(tp)<=2000 @@ -84,14 +84,14 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c52022648.lua b/official/c52022648.lua index 777f8790a4..78976612dc 100644 --- a/official/c52022648.lua +++ b/official/c52022648.lua @@ -1,4 +1,5 @@ --妖精伝姫-シンデレラ +--Fairy Tail - Rella local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -27,28 +28,28 @@ function s.tglimit(e,c) return c~=e:GetHandler() end function s.tgval(e,re,rp) - return re:IsActiveType(TYPE_SPELL) + return re:IsSpellEffect() end function s.costfilter(c) return c:IsSpell() and c:IsDiscardable() end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.eqfilter(c,ec) return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,c) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,c) local tc=g:GetFirst() if tc then Duel.Equip(tp,tc,c) @@ -58,10 +59,10 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52031567.lua b/official/c52031567.lua index c65375cca1..120363d118 100644 --- a/official/c52031567.lua +++ b/official/c52031567.lua @@ -1,4 +1,5 @@ --E・HERO マッドボールマン +--Elemental HERO Mudballman local s,id=GetID() function s.initial_effect(c) --fusion material @@ -12,4 +13,4 @@ function s.initial_effect(c) e1:SetValue(aux.fuslimit) c:RegisterEffect(e1) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} \ No newline at end of file diff --git a/official/c52035300.lua b/official/c52035300.lua index a7df0bbc9a..978b7b2c40 100644 --- a/official/c52035300.lua +++ b/official/c52035300.lua @@ -1,4 +1,5 @@ --不死武士 +--The Immortal Bushi local s,id=GetID() function s.initial_effect(c) --release limit @@ -21,7 +22,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1) e3:SetCondition(s.condition) @@ -49,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52038441.lua b/official/c52038441.lua index c55728607c..46f136f484 100644 --- a/official/c52038441.lua +++ b/official/c52038441.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CUSTOM+id) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) e1:SetLabelObject(g) diff --git a/official/c52040216.lua b/official/c52040216.lua index 3a79767a82..7423a7d26b 100644 --- a/official/c52040216.lua +++ b/official/c52040216.lua @@ -1,4 +1,5 @@ --ハーピィズペット竜 +--Harpie's Pet Dragon local s,id=GetID() function s.initial_effect(c) --atkup @@ -19,4 +20,4 @@ function s.val(e,c) end function s.filter(c) return c:IsFaceup() and c:IsCode(CARD_HARPIE_LADY) -end +end \ No newline at end of file diff --git a/official/c5206415.lua b/official/c5206415.lua index 60c3dc6cdb..ceeb5fa13d 100644 --- a/official/c5206415.lua +++ b/official/c5206415.lua @@ -1,7 +1,6 @@ --天雷震龍-サンダー・ドラゴン --Thunder Dragonlord --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -41,10 +40,9 @@ function s.initial_effect(c) --Check if a thunder monster's effect was activated in hand Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x11c} - +s.listed_series={SET_THUNDER_DRAGON} function s.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_THUNDER) + return not (re:IsMonsterEffect() and re:GetHandler():IsRace(RACE_THUNDER) and (Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND)) end function s.spfilter(c) @@ -54,15 +52,15 @@ function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() return (Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)~=0 or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)~=0) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,c) end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,c) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,c) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.tgcheck(sg,e,tp) return sg:IsExists(Card.IsRace,1,nil,RACE_THUNDER) @@ -89,15 +87,15 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(3061) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.gycon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.gyfilter(c) - return c:IsSetCard(0x11c) and c:IsAbleToGrave() + return c:IsSetCard(SET_THUNDER_DRAGON) and c:IsAbleToGrave() end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c52068432.lua b/official/c52068432.lua index dc293a3ded..27d06c8095 100644 --- a/official/c52068432.lua +++ b/official/c52068432.lua @@ -1,4 +1,5 @@ --トリシューラの影霊衣 +--Nekroz of Trishula local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) e2:SetCondition(s.negcon) - e2:SetCost(s.negcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -35,22 +36,18 @@ function s.initial_effect(c) e3:SetOperation(s.remop) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.mat_filter(c) return c:GetLevel()~=9 end function s.tfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_NEKROZ) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsExists(s.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -61,14 +58,14 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end end function s.remcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_HAND) end function s.remop(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) @@ -86,4 +83,4 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg1) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52077741.lua b/official/c52077741.lua index 7c18e3c639..86b72fcc69 100644 --- a/official/c52077741.lua +++ b/official/c52077741.lua @@ -1,4 +1,5 @@ --翻弄するエルフの剣士 +--Obnoxious Celtic Guard local s,id=GetID() function s.initial_effect(c) --indes @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.indes(e,c) return c:GetAttack()>=1900 -end +end \ No newline at end of file diff --git a/official/c52083044.lua b/official/c52083044.lua index cef42d2ef8..965b66fe12 100644 --- a/official/c52083044.lua +++ b/official/c52083044.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.btg) e1:SetOperation(s.bop) c:RegisterEffect(e1) diff --git a/official/c52085072.lua b/official/c52085072.lua index f455a0139e..1f4cde4399 100644 --- a/official/c52085072.lua +++ b/official/c52085072.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -70,19 +70,19 @@ function s.antarget(e,c) return c~=e:GetHandler() end function s.btcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and not e:GetHandler():IsStatus(STATUS_CHAINING) + return Duel.IsBattlePhase() and not e:GetHandler():IsStatus(STATUS_CHAINING) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) end function s.btcfilter(c) return c:IsMonster() and c:GetLevel()==1 and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.btcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.btcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.btcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) and e:GetHandler():GetFlagEffect(id)==0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.btcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.btcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) end function s.btop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -92,7 +92,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -102,4 +102,4 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,re) return e:GetHandler()~=re:GetOwner() -end +end \ No newline at end of file diff --git a/official/c52090844.lua b/official/c52090844.lua index 359c003754..708edba2b5 100644 --- a/official/c52090844.lua +++ b/official/c52090844.lua @@ -1,4 +1,5 @@ --ボーガニアン +--Bowganian local s,id=GetID() function s.initial_effect(c) --damage @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52097679.lua b/official/c52097679.lua index 6d4958f787..71d54bf5d8 100644 --- a/official/c52097679.lua +++ b/official/c52097679.lua @@ -1,4 +1,5 @@ --右手に盾を左手に剣を +--Shield & Sword local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SWAP_BASE_AD) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c52098461.lua b/official/c52098461.lua index 45a5494fb4..2a3af58551 100644 --- a/official/c52098461.lua +++ b/official/c52098461.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52101615.lua b/official/c52101615.lua index a5b896d171..904a0f745a 100644 --- a/official/c52101615.lua +++ b/official/c52101615.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.subcon(e) - return e:GetHandler():IsLocation(0x1e) + return e:GetHandler():IsLocation(LOCATION_GRAVE|LOCATION_SZONE|LOCATION_MZONE|LOCATION_HAND) end function s.filter(c,e,tp,m,gc,chkf) return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_DARK) diff --git a/official/c52105192.lua b/official/c52105192.lua index 14e694503b..aee0ae3b86 100644 --- a/official/c52105192.lua +++ b/official/c52105192.lua @@ -1,4 +1,5 @@ --アームズ・ホール +--Hidden Armory local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -30,14 +31,14 @@ function s.filter(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c52112003.lua b/official/c52112003.lua index 8781ff4ba9..aa613cdd83 100644 --- a/official/c52112003.lua +++ b/official/c52112003.lua @@ -28,10 +28,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,5)) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_EXTRA_SET_COUNT) Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c52126602.lua b/official/c52126602.lua index 104e158dac..ab2a722d4e 100644 --- a/official/c52126602.lua +++ b/official/c52126602.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(s.thtg) diff --git a/official/c52128900.lua b/official/c52128900.lua index 6c22de3311..db1c27ae47 100644 --- a/official/c52128900.lua +++ b/official/c52128900.lua @@ -37,14 +37,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc1:GetBaseAttack()) tc2:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(0) tc1:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c52140003.lua b/official/c52140003.lua index 818c480d0a..5b887e211c 100644 --- a/official/c52140003.lua +++ b/official/c52140003.lua @@ -1,4 +1,5 @@ --爆弾ウニ-ボム・アーチン- +--Explosive Urchin local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,14 +17,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCountLimit(1) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) c:SetTurnCounter(0) end @@ -60,7 +61,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -69,4 +70,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if ct+1>=3 then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52145422.lua b/official/c52145422.lua index fc58ffdec6..5832ac10e0 100644 --- a/official/c52145422.lua +++ b/official/c52145422.lua @@ -1,4 +1,5 @@ --グレイドル・ドラゴン +--Graydle Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -38,7 +39,7 @@ function s.valcheck(e,c) e:GetLabelObject():SetLabel(ct) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end @@ -55,7 +56,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) + return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end function s.filter(c,e,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -75,13 +76,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c52158283.lua b/official/c52158283.lua index 065297dd1e..0e2bfa1980 100644 --- a/official/c52158283.lua +++ b/official/c52158283.lua @@ -1,4 +1,5 @@ --先史遺産コロッサル・ヘッド +--Chronomaly Colossal Head local s,id=GetID() function s.initial_effect(c) --adchange @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(tc,0,0,POS_FACEDOWN_DEFENSE,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c52159691.lua b/official/c52159691.lua index 447e316eb9..0cb2c76bf8 100644 --- a/official/c52159691.lua +++ b/official/c52159691.lua @@ -1,5 +1,5 @@ --レイダーズ・ウィング ---Raiders' Wing +--Raider's Wing local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -23,8 +23,7 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0x10db,0xba} - +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR} function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) end @@ -55,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end diff --git a/official/c52176579.lua b/official/c52176579.lua index 4d733624be..22bac817f0 100644 --- a/official/c52176579.lua +++ b/official/c52176579.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) diff --git a/official/c52182715.lua b/official/c52182715.lua index e801219101..389b58827e 100644 --- a/official/c52182715.lua +++ b/official/c52182715.lua @@ -52,4 +52,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52198054.lua b/official/c52198054.lua index 2c3ce7ae77..f0aaf4afc9 100644 --- a/official/c52198054.lua +++ b/official/c52198054.lua @@ -38,32 +38,32 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_GRAVE) e4:SetCondition(s.condition) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.tgtg) e4:SetOperation(s.tgop) e4:SetHintTiming(0,TIMING_MAIN_END) c:RegisterEffect(e4) end -s.listed_series={0x32} +s.listed_series={SET_VOLCANIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x32) end + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,SET_VOLCANIC) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x32) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,SET_VOLCANIC) if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Draw(tp,1,REASON_EFFECT) end end function s.tgfilter(c) - return c:IsSetCard(0x32) and c:IsAbleToGrave() + return c:IsSetCard(SET_VOLCANIC) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -75,4 +75,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5220687.lua b/official/c5220687.lua index 23ad799208..640fc5793b 100644 --- a/official/c5220687.lua +++ b/official/c5220687.lua @@ -1,4 +1,5 @@ --素早いビッグハムスター +--Super-Nimble Mega Hamster local s,id=GetID() function s.initial_effect(c) --flip @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c52222372.lua b/official/c52222372.lua index 9f6d6d2eab..dfe8ab51e6 100644 --- a/official/c52222372.lua +++ b/official/c52222372.lua @@ -1,4 +1,5 @@ --タービン・ジェネクス +--Genex Turbine local s,id=GetID() function s.initial_effect(c) --atk @@ -7,8 +8,8 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GENEX)) e1:SetValue(400) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} \ No newline at end of file diff --git a/official/c52228131.lua b/official/c52228131.lua index 5b05d99cdd..407222421f 100644 --- a/official/c52228131.lua +++ b/official/c52228131.lua @@ -1,4 +1,5 @@ --パリィ +--Parry local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.filter(c) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsAbleToDeck() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52240819.lua b/official/c52240819.lua index d9b71cf22f..b9bb0ef941 100644 --- a/official/c52240819.lua +++ b/official/c52240819.lua @@ -1,4 +1,5 @@ --魔界劇団-デビル・ヒール +--Abyss Actor - Evil Heel local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -37,9 +38,9 @@ function s.initial_effect(c) e4:SetOperation(s.setop) c:RegisterEffect(e4) end -s.listed_series={0x10ec,0x20ec} +s.listed_series={SET_ABYSS_ACTOR,SET_ABYSS_SCRIPT} function s.atkcfilter(c) - return c:IsSetCard(0x10ec) + return c:IsSetCard(SET_ABYSS_ACTOR) end function s.atkfilter1(c,e) return c:IsFaceup() and (not e or c:IsCanBeEffectTarget(e)) @@ -65,12 +66,12 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.atkfilter(c) - return c:IsSetCard(0x10ec) and c:IsFaceup() + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsFaceup() end function s.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -88,12 +89,12 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.cfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.cfilter(chkc) end @@ -107,4 +108,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c52248570.lua b/official/c52248570.lua index 867b7a9b93..0d441b6399 100644 --- a/official/c52248570.lua +++ b/official/c52248570.lua @@ -1,11 +1,12 @@ --プリズンクインデーモン +--Imprisoned Queen Archfiend local s,id=GetID() function s.initial_effect(c) --maintain local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.mtcon) @@ -15,7 +16,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetRange(LOCATION_GRAVE) @@ -26,7 +27,7 @@ function s.initial_effect(c) end s.listed_names={94585852} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,1000) then @@ -36,7 +37,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.IsEnvironment(94585852) + return Duel.IsTurnPlayer(tp) and Duel.IsEnvironment(94585852) end function s.filter(c) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) @@ -54,8 +55,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c52253888.lua b/official/c52253888.lua index 113e932e9a..6d2b0afa8c 100644 --- a/official/c52253888.lua +++ b/official/c52253888.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) @@ -44,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 then return end for tc in tg:Iter() do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,c:GetFieldID()) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,c:GetFieldID()) end --Must attack this card, if able local e1=Effect.CreateEffect(c) @@ -53,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetRange(LOCATION_MZONE) e1:SetTarget(s.musttg) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) diff --git a/official/c52254878.lua b/official/c52254878.lua index 8c5444f52b..6a67e0e98c 100644 --- a/official/c52254878.lua +++ b/official/c52254878.lua @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(rc) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end if c:IsAttributeExcept(att) then @@ -51,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetProperty(EFFECT_FLAG_COPY_INHERIT) e2:SetValue(att) - e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,2) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c52263685.lua b/official/c52263685.lua index fa5fae752e..1fe00e1b33 100644 --- a/official/c52263685.lua +++ b/official/c52263685.lua @@ -25,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToDeckBottom(sg) Duel.ConfirmCards(1-p,sg) Duel.SortDecktop(p,1-p,2) -end +end \ No newline at end of file diff --git a/official/c52265835.lua b/official/c52265835.lua index e5d0f825ee..acecb2dd7d 100644 --- a/official/c52265835.lua +++ b/official/c52265835.lua @@ -1,4 +1,5 @@ --A・O・J ルドラ +--Ally of Justice Rudra local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,4 +16,4 @@ function s.condtion(e) local d=Duel.GetAttackTarget() return (a==e:GetHandler() and d and d:IsFaceup() and d:IsAttribute(ATTRIBUTE_LIGHT)) or (d==e:GetHandler() and a:IsAttribute(ATTRIBUTE_LIGHT)) -end +end \ No newline at end of file diff --git a/official/c52277807.lua b/official/c52277807.lua index bb23fb0789..0f449c089a 100644 --- a/official/c52277807.lua +++ b/official/c52277807.lua @@ -1,7 +1,6 @@ --転生炎獣スピニー --Salamangreat Spinny --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -14,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -29,21 +28,16 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} s.listed_names={id} - --Check for "Salamangreat" card function s.atkfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x119) + return c:IsFaceup() and c:IsSetCard(SET_SALAMANGREAT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.atkfilter2,tp,LOCATION_ONFIELD,0,1,nil) end --Discard itself as cost -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end --Acitvation legality function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -59,13 +53,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end --Defining what to check function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x119) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_SALAMANGREAT) and not c:IsCode(id) end --Check for "Salamangreat" monster, other than "Salamangreat Spinny" function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -88,7 +82,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c52286175.lua b/official/c52286175.lua index a797938bc6..8a1b9908fd 100644 --- a/official/c52286175.lua +++ b/official/c52286175.lua @@ -1,4 +1,5 @@ --トラップ・リアクター・RR +--Trap Reactor ・Y FI local s,id=GetID() function s.initial_effect(c) --destroy&damage @@ -17,7 +18,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return re:GetHandler():IsDestructable() end @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then Duel.Damage(1-tp,800,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52296675.lua b/official/c52296675.lua index ad45883540..c53ddeeb0b 100644 --- a/official/c52296675.lua +++ b/official/c52296675.lua @@ -64,4 +64,4 @@ function s.spcon(e,c) end function s.recon(e) return e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) -end +end \ No newline at end of file diff --git a/official/c5230799.lua b/official/c5230799.lua index 4fad60a139..a8e2799293 100644 --- a/official/c5230799.lua +++ b/official/c5230799.lua @@ -32,7 +32,7 @@ s.listed_series={SET_MAGICAL_MUSKET} function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - if Duel.GetCurrentPhase()&PHASE_DAMAGE+PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if Duel.GetCurrentPhase()&PHASE_DAMAGE|PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) return c:IsColumn(seq,p,LOCATION_SZONE) end @@ -41,7 +41,7 @@ function s.cfilter(c) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end diff --git a/official/c52319752.lua b/official/c52319752.lua index 82892611ad..2144f7cfbb 100644 --- a/official/c52319752.lua +++ b/official/c52319752.lua @@ -1,4 +1,5 @@ --暗黒ヴェロキ +--Black Veloci local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.val(e,c) if Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil then return 400 elseif e:GetHandler()==Duel.GetAttackTarget() then return -400 else return 0 end -end +end \ No newline at end of file diff --git a/official/c52323207.lua b/official/c52323207.lua index 73ea28f8c1..7a112ba47e 100644 --- a/official/c52323207.lua +++ b/official/c52323207.lua @@ -1,4 +1,5 @@ --番兵ゴーレム +--Golem Sentry local s,id=GetID() function s.initial_effect(c) --turn set @@ -24,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52323874.lua b/official/c52323874.lua index 15b12ca59c..1759ca1ecc 100644 --- a/official/c52323874.lua +++ b/official/c52323874.lua @@ -1,8 +1,9 @@ --RR-デビル・イーグル +--Raidraptor - Fiend Eagle local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xba),3,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RAIDRAPTOR),3,2) c:EnableReviveLimit() --damage local e1=Effect.CreateEffect(c) @@ -11,19 +12,15 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xba} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_RAIDRAPTOR} function s.filter(c) return c:IsFaceup() and c:GetBaseAttack()>0 - and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -40,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if atk<0 then atk=0 end Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52331012.lua b/official/c52331012.lua index 187ec4ded1..bfcf08666b 100644 --- a/official/c52331012.lua +++ b/official/c52331012.lua @@ -1,5 +1,5 @@ --鉄獣戦線 銀弾のルガル ---Tribrigade Lugal the Silver Bullet +--Tri-Brigade Rugal the Silver Sheller --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -38,30 +38,30 @@ function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local c=e:GetHandler() - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local sc=g:GetFirst() if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) local fid=c:GetFieldID() - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -101,7 +101,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300*ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c52339733.lua b/official/c52339733.lua index a4184bc2f5..4ce0f53c1d 100644 --- a/official/c52339733.lua +++ b/official/c52339733.lua @@ -1,4 +1,5 @@ --竜胆ブルーム +--Lindbloom local s,id=GetID() function s.initial_effect(c) --atk @@ -24,7 +25,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(a:GetDefense()) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) a:RegisterEffect(e1) end if not d:IsLinkMonster() then @@ -32,8 +33,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(d:GetDefense()) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) d:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c52340274.lua b/official/c52340274.lua index 5dc9ea8c92..712fc15c75 100644 --- a/official/c52340274.lua +++ b/official/c52340274.lua @@ -35,8 +35,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) lc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c52346240.lua b/official/c52346240.lua index 09eeb980f4..b71a487ee4 100644 --- a/official/c52346240.lua +++ b/official/c52346240.lua @@ -1,4 +1,5 @@ --ロックキャット +--Lock Cat local s,id=GetID() function s.initial_effect(c) --summon success @@ -30,13 +31,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c52350806.lua b/official/c52350806.lua index 44e40b10f6..731c7b4020 100644 --- a/official/c52350806.lua +++ b/official/c52350806.lua @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local tc=g:RandomSelect(1-tp,1,1,nil) Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_DISCARD) if not Duel.IsPlayerCanSpecialSummon(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end if not tc:GetFirst():IsCode(id) then Duel.BreakEffect() @@ -75,11 +75,10 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if h1>0 or h2>0 then Duel.BreakEffect() end if h1>0 then Duel.ShuffleHand(tp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end if h2>0 then Duel.ShuffleHand(1-tp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end -end - +end \ No newline at end of file diff --git a/official/c52352005.lua b/official/c52352005.lua index 8747170e48..e9da2ba7bc 100644 --- a/official/c52352005.lua +++ b/official/c52352005.lua @@ -46,5 +46,5 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end \ No newline at end of file diff --git a/official/c52354896.lua b/official/c52354896.lua index 0446a8c774..28ba7112a1 100644 --- a/official/c52354896.lua +++ b/official/c52354896.lua @@ -1,5 +1,5 @@ --- ---Zan-Ki Multiplier +--斬機マルチプライヤー +--Mathmech Multiplication --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -42,7 +42,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -62,7 +62,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c52370835.lua b/official/c52370835.lua index f286e3c783..8211c6fcf0 100644 --- a/official/c52370835.lua +++ b/official/c52370835.lua @@ -1,4 +1,5 @@ --H・C ソード・シールド +--Heroic Challenger - Swordshield local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,21 +9,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) + return c:IsFaceup() and c:IsSetCard(SET_HEROIC) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -30,17 +27,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.filter) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) end function s.filter(e,c) - return c:IsSetCard(0x6f) -end + return c:IsSetCard(SET_HEROIC) +end \ No newline at end of file diff --git a/official/c5237827.lua b/official/c5237827.lua index e71697d179..55547a5a11 100644 --- a/official/c5237827.lua +++ b/official/c5237827.lua @@ -1,4 +1,5 @@ --ヴァイロン・オーム +--Vylon Ohm local s,id=GetID() function s.initial_effect(c) --remove @@ -28,17 +29,17 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) tc:RegisterEffect(e1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52394047.lua b/official/c52394047.lua index e9d02fedea..2001d09dc3 100644 --- a/official/c52394047.lua +++ b/official/c52394047.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) e3:SetHintTiming(TIMING_DAMAGE_STEP) e3:SetCountLimit(1) - e3:SetCondition(s.atkcon) + e3:SetCondition(aux.StatChangeDamageStepCondition) e3:SetCost(s.atkcost) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) @@ -41,25 +41,22 @@ function s.initial_effect(c) e4:SetOperation(s.immop) c:RegisterEffect(e4) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.mustatkcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x19),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.atkcfilter(c) - return c:IsSetCard(0x19) and c:IsMonster() and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_GLADIATOR) and c:IsMonster() and c:IsAbleToDeckAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end function s.atkfilter(c) - return c:IsFaceup() and c:HasNonZeroDefense() and c:IsSetCard(0x19) + return c:IsFaceup() and c:HasNonZeroDefense() and c:IsSetCard(SET_GLADIATOR) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -77,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(tc:GetBaseDefense()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -91,8 +88,8 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GLADIATOR)) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c52404456.lua b/official/c52404456.lua index 5bfd3c5831..ee8ff6ef75 100644 --- a/official/c52404456.lua +++ b/official/c52404456.lua @@ -1,4 +1,5 @@ --マドルチェ・メッセンジェラート +--Madolche Messengelato local s,id=GetID() function s.initial_effect(c) --to deck @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.shop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -34,17 +35,17 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_BEAST) + return c:IsFaceup() and c:IsSetCard(SET_MADOLCHE) and c:IsRace(RACE_BEAST) end function s.shcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.filter(c) - return c:IsSetCard(0x71) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MADOLCHE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -58,4 +59,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c52417194.lua b/official/c52417194.lua index e8bd079e01..00ec0d5185 100644 --- a/official/c52417194.lua +++ b/official/c52417194.lua @@ -1,4 +1,5 @@ --大暴落 +--Heavy Slump local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52430902.lua b/official/c52430902.lua index d091bc03d6..45e1719e33 100644 --- a/official/c52430902.lua +++ b/official/c52430902.lua @@ -1,4 +1,5 @@ --サイコジャンパー +--Psychic Jumper local s,id=GetID() function s.initial_effect(c) --special summon @@ -9,15 +10,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter1(c) return c:IsFaceup() and c:IsRace(RACE_PSYCHIC) and c:GetCode()~=id and c:IsAbleToChangeControler() end @@ -44,10 +41,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c5244497.lua b/official/c5244497.lua index 4a55c02dbb..f980032ad2 100644 --- a/official/c5244497.lua +++ b/official/c5244497.lua @@ -1,4 +1,5 @@ --スクープ・シューター +--Cameraclops local s,id=GetID() function s.initial_effect(c) --destroy @@ -25,4 +26,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() and d:GetDefense()>e:GetHandler():GetAttack() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52467217.lua b/official/c52467217.lua index acce4d98fa..ee179c43a0 100644 --- a/official/c52467217.lua +++ b/official/c52467217.lua @@ -1,4 +1,5 @@ --牛頭鬼 +--Gozuki local s,id=GetID() function s.initial_effect(c) --to grave @@ -44,9 +45,9 @@ function s.cfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) @@ -63,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52472775.lua b/official/c52472775.lua index 77f0490f4a..184d821eb1 100644 --- a/official/c52472775.lua +++ b/official/c52472775.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c52481437.lua b/official/c52481437.lua index 85dd683ecb..ea2b848dfb 100644 --- a/official/c52481437.lua +++ b/official/c52481437.lua @@ -1,5 +1,5 @@ --弾丸特急バレット・ライナー ---Speedy Express Bullet Liner +--Super Express Bullet Train --Scripted by AlphaKretin and Larry126 (attack cost) local s,id=GetID() function s.initial_effect(c) @@ -78,7 +78,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thfilter(c) return c:IsRace(RACE_MACHINE) and not c:IsCode(id) and c:IsAbleToHand() @@ -99,5 +99,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end - +end \ No newline at end of file diff --git a/official/c52496105.lua b/official/c52496105.lua index 8b5383c0e9..f6317ce6a6 100644 --- a/official/c52496105.lua +++ b/official/c52496105.lua @@ -2,7 +2,7 @@ --Gladiator Beast's Battle Manica local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x19)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_GLADIATOR)) --Cannot be destroyed by battle local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() diff --git a/official/c52497105.lua b/official/c52497105.lua index 2dcb9a888f..b3991dea60 100644 --- a/official/c52497105.lua +++ b/official/c52497105.lua @@ -1,6 +1,5 @@ --蛮勇鱗粉 --Berserk Scales - local s,id=GetID() function s.initial_effect(c) --Targeted monster gains 1000 ATK, cannot attack directly @@ -10,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or c~=Duel.GetAttacker() or Duel.GetAttackTarget()) end @@ -34,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) --Cannot attack directly @@ -43,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --Loses 2000 ATK during end phase local e3=Effect.CreateEffect(e:GetHandler()) @@ -52,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetOperation(s.atkdown) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -61,6 +57,6 @@ function s.atkdown(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e:GetHandler():RegisterEffect(e1,true) end \ No newline at end of file diff --git a/official/c52502677.lua b/official/c52502677.lua index efe7dec8f6..ff3e0efeb1 100644 --- a/official/c52502677.lua +++ b/official/c52502677.lua @@ -3,82 +3,74 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --name + --Make this card's Level and name become the same as 1 "Gladiator Beast" monster sent from your Deck or Extra Deck to the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) + e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(aux.gbspcon) - e1:SetCost(s.cost) - e1:SetOperation(s.operation) + e1:SetCost(s.lvnamecost) + e1:SetOperation(s.lvnameop) c:RegisterEffect(e1) - --special summon + --Special Summon 1 "Gladiator Beast" monster from your Deck, except "Gladiator Beast Attorix" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end +s.listed_series={SET_GLADIATOR_BEAST} s.listed_names={id} -s.listed_series={0x19} -function s.costfilter(c,ec) - return c:IsSetCard(0x19) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGraveAsCost() +function s.lvnamecostfilter(c,ec) + return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsMonster() and c:HasLevel() and not c:IsCode(id) and c:IsAbleToGraveAsCost() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c) end +function s.lvnamecost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.lvnamecostfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,c) - Duel.SendtoGrave(cg,REASON_COST) - e:SetLabel(cg:GetFirst():GetCode()) - e:SetLabelObject(cg:GetFirst()) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local sc=e:GetLabelObject() - if not c:IsRelateToEffect(e) or c:IsFacedown() or not sc then return end - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) - e1:SetValue(sc:GetLevel()) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetValue(e:GetLabel()) - c:RegisterEffect(e2) + local sc=Duel.SelectMatchingCard(tp,s.lvnamecostfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil):GetFirst() + Duel.SendtoGrave(sc,REASON_COST) + e:SetLabel(sc:GetLevel(),sc:GetCode()) end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.lvnameop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) + if c:IsRelateToEffect(e) and c:IsFaceup() then + local lv,code=e:GetLabel() + --This card's Level and name become the same as that monster sent to the GY + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetValue(lv) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) + c:RegisterEffect(e1) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e2:SetCode(EFFECT_CHANGE_CODE) + e2:SetValue(code) + e2:SetReset(RESETS_STANDARD_PHASE_END) + c:RegisterEffect(e2) + end end -function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,102,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GLADIATOR_BEAST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,102,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc then - Duel.SpecialSummon(tc,102,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,102,tp,tp,false,false,POS_FACEUP)>0 then + sc:RegisterFlagEffect(sc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end end diff --git a/official/c52503575.lua b/official/c52503575.lua index 20b824f4ed..4235455cfe 100644 --- a/official/c52503575.lua +++ b/official/c52503575.lua @@ -1,4 +1,5 @@ --最終突撃命令 +--Final Attack Orders local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,4 +18,4 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c525110.lua b/official/c525110.lua index d898908d6a..62c81f052b 100644 --- a/official/c525110.lua +++ b/official/c525110.lua @@ -1,6 +1,5 @@ --プチトマボー --Cherry Inmato - local s,id=GetID() function s.initial_effect(c) --Special summon 2 "Inmato" monsters from deck @@ -14,13 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x5b} - +s.listed_series={SET_INMATO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsSetCard(0x5b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INMATO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) t1:RegisterEffect(e1) if t2 then Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEUP) diff --git a/official/c52512994.lua b/official/c52512994.lua index 355d0f548d..787c491e95 100644 --- a/official/c52512994.lua +++ b/official/c52512994.lua @@ -1,4 +1,5 @@ --火車 +--Kasha local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -38,7 +39,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.rfilter(c) - return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRace(RACE_ZOMBIE) and (c:GetPreviousPosition()&POS_FACEUP)~=0 + return c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRace(RACE_ZOMBIE) and (c:GetPreviousPosition()&POS_FACEUP)~=0 end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) @@ -50,7 +51,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(rt*1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c52518793.lua b/official/c52518793.lua index 5aef02a0e7..b8b18efe12 100644 --- a/official/c52518793.lua +++ b/official/c52518793.lua @@ -1,4 +1,5 @@ --剣闘獣の檻-コロッセウム +--Colosseum - Cage of the Gladiator Beasts local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x7) @@ -22,7 +23,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_FZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GLADIATOR)) e3:SetValue(s.atkval) c:RegisterEffect(e3) local e4=e3:Clone() @@ -38,7 +39,7 @@ function s.initial_effect(c) e5:SetOperation(s.desrepop) c:RegisterEffect(e5) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.atkval(e,c) return e:GetHandler():GetCounter(0x7)*100 end @@ -57,5 +58,5 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,Card.IsCode,1,1,REASON_EFFECT+REASON_DISCARD,nil,id) -end + Duel.DiscardHand(tp,Card.IsCode,1,1,REASON_EFFECT|REASON_DISCARD,nil,id) +end \ No newline at end of file diff --git a/official/c52534264.lua b/official/c52534264.lua index 833c2d4014..2052f53fd8 100644 --- a/official/c52534264.lua +++ b/official/c52534264.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(s.atkcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetCost(s.atkcost) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) @@ -37,16 +37,13 @@ function s.initial_effect(c) e3:SetOperation(s.tdop) c:RegisterEffect(e3) end -s.listed_series={0x11e} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_DANGER} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x11e) + return c:IsFaceup() and c:IsSetCard(SET_DANGER) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -54,17 +51,17 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -72,11 +69,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c) - return c:IsSetCard(0x11e) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_DANGER) and c:IsMonster() and c:IsDiscardable() end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end @@ -85,9 +82,8 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,1,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c5253985.lua b/official/c5253985.lua index 3854fc0697..1552f1e633 100644 --- a/official/c5253985.lua +++ b/official/c5253985.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) end function s.chainfilter(re,tp,cid) if Duel.GetFlagEffect(tp,id)==0 then return true end - return not (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or not re:GetHandler():IsRace(RACE_DIVINE)) + return not (re:IsSpellTrapEffect() or not re:GetHandler():IsRace(RACE_DIVINE)) end function s.filter(c,e,ec) if not c:IsRace(RACE_DIVINE) then return false end @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(POS_FACEUP) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local s1=tc:IsSummonable(true,nil,1) local s2=tc:IsMSetable(true,nil,1) @@ -59,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetOperation(s.sumsuc) e2:SetLabel(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e2,true) Duel.Summon(tp,tc,true,nil,1) else @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EVENT_MSET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) e3:SetOperation(s.sumsuc) e3:SetLabel(tp) tc:RegisterEffect(e3,true) @@ -86,14 +86,14 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetCondition(s.accon) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,player) - Duel.RegisterFlagEffect(player,id,RESET_PHASE+PHASE_END,0,2) + Duel.RegisterFlagEffect(player,id,RESET_PHASE|PHASE_END,0,2) end end function s.accon(e) return Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or not re:GetHandler():IsRace(RACE_DIVINE) -end + return re:IsSpellTrapEffect() or not re:GetHandler():IsRace(RACE_DIVINE) +end \ No newline at end of file diff --git a/official/c5255013.lua b/official/c5255013.lua index c941d14099..40e54d7698 100644 --- a/official/c5255013.lua +++ b/official/c5255013.lua @@ -37,18 +37,18 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0xc4} +s.listed_series={SET_ZEFRA} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc1=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local tc2=Duel.GetFieldCard(tp,LOCATION_PZONE,1) - if not (tc1 and tc2 and tc1:IsSetCard(0xc4) and tc2:IsSetCard(0xc4)) then return false end + if not (tc1 and tc2 and tc1:IsSetCard(SET_ZEFRA) and tc2:IsSetCard(SET_ZEFRA)) then return false end local scl1=tc1:GetLeftScale() local scl2=tc2:GetRightScale() if scl1>scl2 then scl1,scl2=scl2,scl1 end return scl1==1 and scl2==7 end function s.filter(c) - return (c:IsFacedown() or not c:IsSetCard(0xc4)) and c:IsAbleToDeck() + return (c:IsFacedown() or not c:IsSetCard(SET_ZEFRA)) and c:IsAbleToDeck() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsLocation(LOCATION_HAND+LOCATION_EXTRA) + return not c:IsLocation(LOCATION_HAND|LOCATION_EXTRA) end function s.tgcon(e) local tp=e:GetHandlerPlayer() @@ -72,4 +72,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52551211.lua b/official/c52551211.lua index 55d763c3e8..341188e772 100644 --- a/official/c52551211.lua +++ b/official/c52551211.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.filter(c) - return c:IsSetCard(0x9d) and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -58,7 +58,7 @@ end function s.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end - if tc:IsSetCard(0x9d) then + if tc:IsSetCard(SET_SHADDOLL) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) else Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) diff --git a/official/c52553471.lua b/official/c52553471.lua index 91939c5c37..fb804550ce 100644 --- a/official/c52553471.lua +++ b/official/c52553471.lua @@ -1,5 +1,5 @@ --融合超渦 ---Fusion Over +--Over Fusion --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -16,27 +16,27 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_NEOS} -s.listed_series={0x3008,0x1f} +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} function s.tgfilter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,c,tp) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA,0,1,nil,c,tp) end function s.cfilter(c,tc,tp) if c:IsCode(tc:GetCode(nil,SUMMON_TYPE_FUSION,tp)) then return false end - return c:IsMonster() and (c:IsSetCard(0x3008) or c:IsSetCard(0x1f) or c:IsLevel(10)) and not c:IsPublic() + return c:IsMonster() and (c:IsSetCard({SET_ELEMENTAL_HERO,SET_NEO_SPACIAN}) or c:IsLevel(10)) and not c:IsPublic() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,tp) end if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA) Duel.SetPossibleOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local cc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,tc,tp):GetFirst() + local cc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,tc,tp):GetFirst() if not cc then return end Duel.ConfirmCards(1-tp,cc) local code1,code2=cc:GetOriginalCodeRule() @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(code1) e1:SetOperation(s.chngcon) tc:RegisterEffect(e1) @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(code2) tc:RegisterEffect(e2) end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_NEOS),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_NEOS),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) then Duel.SendtoGrave(cc,REASON_EFFECT) elseif cc:IsLocation(LOCATION_HAND) then Duel.SendtoDeck(cc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) @@ -66,4 +66,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.chngcon(scard,sumtype,tp) return (sumtype&MATERIAL_FUSION)~=0 -end +end \ No newline at end of file diff --git a/official/c52558805.lua b/official/c52558805.lua index 98f1344a38..61ab262e5b 100644 --- a/official/c52558805.lua +++ b/official/c52558805.lua @@ -13,18 +13,15 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1) - e1:SetCondition(s.atkcon) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.listed_series={SET_DJINN} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c,tp) return c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end diff --git a/official/c52566270.lua b/official/c52566270.lua index 782ecf8b42..7bf6f58b2c 100644 --- a/official/c52566270.lua +++ b/official/c52566270.lua @@ -20,9 +20,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x2066,0xe9} +s.listed_series={SET_MAGNET_WARRIOR,SET_MAGNA_WARRIOR} function s.cfilter(c,code) - return c:IsMonster() and c:IsLevelBelow(4) and c:IsSetCard(0x2066) + return c:IsMonster() and c:IsLevelBelow(4) and c:IsSetCard(SET_MAGNET_WARRIOR) and not c:IsCode(id,code) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -37,7 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x2066) or c:IsSetCard(0xe9)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_MAGNET_WARRIOR) or c:IsSetCard(SET_MAGNA_WARRIOR)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -47,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) if c:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -59,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52571838.lua b/official/c52571838.lua index c7af9e9675..f8c97be054 100644 --- a/official/c52571838.lua +++ b/official/c52571838.lua @@ -1,4 +1,5 @@ --忍び寄るデビルマンタ +--Creeping Doom Manta local s,id=GetID() function s.initial_effect(c) --summon success @@ -13,4 +14,4 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) end function s.chlimit(re,rp,tp) return not re:GetHandler():IsTrap() or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c52575195.lua b/official/c52575195.lua index 111b1f6e16..ed768ade2f 100644 --- a/official/c52575195.lua +++ b/official/c52575195.lua @@ -53,10 +53,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) --Return it during your next Standby Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then if Duel.IsPhase(PHASE_DRAW) then e1:SetLabel(Duel.GetTurnCount()) else diff --git a/official/c5257687.lua b/official/c5257687.lua index 27e1b23901..23996e9139 100644 --- a/official/c5257687.lua +++ b/official/c5257687.lua @@ -1,4 +1,5 @@ --X・E・N・O +--Jowls of Dark Demise local s,id=GetID() function s.initial_effect(c) --flip @@ -25,8 +26,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c52589809.lua b/official/c52589809.lua index f5adfc076e..8c6cdc7222 100644 --- a/official/c52589809.lua +++ b/official/c52589809.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -39,7 +39,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -64,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c5259518.lua b/official/c5259518.lua index 2684dfabce..3f32e7d29e 100644 --- a/official/c5259518.lua +++ b/official/c5259518.lua @@ -50,7 +50,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp) end function s.spfilter(c,e,tp) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON+RACE_PLANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON|RACE_PLANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -65,4 +65,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52607696.lua b/official/c52607696.lua index 48cd21a460..61d1e9fe12 100644 --- a/official/c52607696.lua +++ b/official/c52607696.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c52615248.lua b/official/c52615248.lua index 7ada4f16e3..3c6cd472a9 100644 --- a/official/c52615248.lua +++ b/official/c52615248.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -55,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c52624755.lua b/official/c52624755.lua index 76ed15a62a..1685c9242b 100644 --- a/official/c52624755.lua +++ b/official/c52624755.lua @@ -1,4 +1,5 @@ --闇・道化師のペーテン +--Peten the Dark Clown local s,id=GetID() function s.initial_effect(c) --sp summon @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_TO_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -18,14 +19,14 @@ function s.filter(c,e,sp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52628687.lua b/official/c52628687.lua index 85ba5fab70..626be72601 100644 --- a/official/c52628687.lua +++ b/official/c52628687.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) return true @@ -24,7 +24,7 @@ function s.cfilter(c,e,tp) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end function s.cffilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and not c:IsPublic() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and not c:IsPublic() end function s.spfilter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -35,11 +35,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if e:GetLabel()~=100 then return false end e:SetLabel(0) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp) + local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) e:SetLabel(rg:GetFirst():GetLevel()) Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) @@ -64,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) Duel.Equip(tp,c,tc) Duel.SpecialSummonComplete() @@ -73,9 +73,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetLabelObject(tc) e2:SetValue(s.eqlimit) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c52639377.lua b/official/c52639377.lua index 7905ba6934..8fe0054d13 100644 --- a/official/c52639377.lua +++ b/official/c52639377.lua @@ -1,4 +1,5 @@ --魔界闘士 バルムンク +--Underworld Fighter Balmung local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52645235.lua b/official/c52645235.lua index 2ee7b2ff6f..8be294f017 100644 --- a/official/c52645235.lua +++ b/official/c52645235.lua @@ -104,4 +104,4 @@ function s.qpovop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c52648457.lua b/official/c52648457.lua index 635a3ad5d9..7d2ad1358e 100644 --- a/official/c52648457.lua +++ b/official/c52648457.lua @@ -1,4 +1,5 @@ --ゴーゴンの眼 +--Gorgon's Eye local s,id=GetID() function s.initial_effect(c) --activate @@ -16,9 +17,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.distg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.distg(e,c) return c:IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c52653092.lua b/official/c52653092.lua index d63860014f..c57e0f11c7 100644 --- a/official/c52653092.lua +++ b/official/c52653092.lua @@ -39,31 +39,31 @@ function s.initial_effect(c) e6:SetHintTiming(0,TIMING_DRAW_PHASE) e6:SetCountLimit(1) e6:SetCondition(s.actcon) - e6:SetCost(s.actcost) + e6:SetCost(Cost.Detach(1)) e6:SetOperation(s.actop) c:RegisterEffect(e6,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x48,0x95,0x107f} +s.listed_series={SET_NUMBER,SET_RANK_UP_MAGIC,SET_UTOPIA} s.xyz_number=0 function s.xyzfilter(c,xyz,sumtype,tp) - return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsSetCard(0x48,xyz,sumtype,tp) + return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) return mg:GetClassCount(Card.GetRank)==1 end function s.cfilter(c) - return c:IsSetCard(0x95) and c:GetType()==TYPE_SPELL and c:IsDiscardable() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsNormalSpell() and c:IsDiscardable() end function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0x107f,lc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA,lc,SUMMON_TYPE_XYZ,tp) end function s.xyzop(e,tp,chk,mc) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local tc=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) if tc then - Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(tc,REASON_DISCARD|REASON_COST) return true else return false end end @@ -83,11 +83,7 @@ function s.atkval(e,c) return c:GetOverlayCount()*1000 end function s.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.actcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.actop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -96,6 +92,6 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c52665542.lua b/official/c52665542.lua index b62b7f59b8..c10d19cb14 100644 --- a/official/c52665542.lua +++ b/official/c52665542.lua @@ -39,10 +39,10 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} s.counter_place_list={0x5} function s.costfilter(c) - return c:IsMonster() and c:IsSetCard(0x38) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_LIGHTSWORN) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end @@ -53,7 +53,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(sg,REASON_COST) end function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x38) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_LIGHTSWORN) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local cc=e:GetLabelObject() @@ -81,7 +81,7 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) end function s.dfilter(c,tp) return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and not c:IsReason(REASON_REPLACE) - and c:IsSetCard(0x38) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) + and c:IsSetCard(SET_LIGHTSWORN) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -93,9 +93,9 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.value(e,c) return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) - and c:IsSetCard(0x38) and c:IsControler(e:GetHandlerPlayer()) and c:IsReason(REASON_EFFECT) + and c:IsSetCard(SET_LIGHTSWORN) and c:IsControler(e:GetHandlerPlayer()) and c:IsReason(REASON_EFFECT) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local count=e:GetLabel() Duel.RemoveCounter(tp,1,0,0x5,count*2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5267507.lua b/official/c5267507.lua index 410093daad..1ebb6ef551 100644 --- a/official/c5267507.lua +++ b/official/c5267507.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) diff --git a/official/c52675689.lua b/official/c52675689.lua index 1956d089aa..41e3ccfeb0 100644 --- a/official/c52675689.lua +++ b/official/c52675689.lua @@ -1,4 +1,5 @@ --暗黒の眠りを誘うルシファー +--Invitation to a Dark Sleep local s,id=GetID() function s.initial_effect(c) --atklimit @@ -29,10 +30,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCondition(s.rcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c52684508.lua b/official/c52684508.lua index 9efc2847b9..8346de426c 100644 --- a/official/c52684508.lua +++ b/official/c52684508.lua @@ -1,4 +1,5 @@ --黒炎弾 +--Inferno Fire Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_REDEYES_B_DRAGON)) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52687916.lua b/official/c52687916.lua index b5f7736805..7f445312ed 100644 --- a/official/c52687916.lua +++ b/official/c52687916.lua @@ -1,4 +1,5 @@ --氷結界の龍 トリシューラ +--Trishula, Dragon of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -16,20 +17,20 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.remcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - if Duel.IsPlayerAffectedByEffect(1-tp,69832741) then - return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,0x0e,1,nil) + if Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) then + return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND|LOCATION_ONFIELD,1,nil) else - return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,0x1e,1,nil) + return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end end - if Duel.IsPlayerAffectedByEffect(1-tp,69832741) then - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0x0e) + if Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND|LOCATION_ONFIELD) else - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0x1e) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) end end function s.rmfilter(c) @@ -37,7 +38,7 @@ function s.rmfilter(c) end function s.remop(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) - local g2=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g2=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local sg=Group.CreateGroup() if #g1>0 and ((#g2==0 and #g3==0) or Duel.SelectYesNo(tp,aux.Stringid(id,1))) then @@ -58,4 +59,4 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) sg:Merge(sg3) end Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52698008.lua b/official/c52698008.lua index c7cafab251..78074fe909 100644 --- a/official/c52698008.lua +++ b/official/c52698008.lua @@ -1,5 +1,5 @@ --サイバース・ウィキッド ---Cyberse Widkid +--Cyberse Wicckid --scripted by Logical Nonsense --Substitute ID local s,id=GetID() @@ -48,7 +48,7 @@ end --Check if it was link summoned function s.indcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsLinkSummoned() end --Linked Cyberse monsters function s.indtg(e,c) @@ -90,5 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c52702748.lua b/official/c52702748.lua index b34b5d44b0..2bc6555e1b 100644 --- a/official/c52702748.lua +++ b/official/c52702748.lua @@ -37,10 +37,10 @@ function s.rmfilter(c,p) return c:IsAbleToRemove(p) and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc,1-tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc,1-tp) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(1-tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,1-tp) + local g=Duel.SelectTarget(1-tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,1-tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) @@ -48,4 +48,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52707042.lua b/official/c52707042.lua index 5986881761..889bb9b7c9 100644 --- a/official/c52707042.lua +++ b/official/c52707042.lua @@ -1,4 +1,4 @@ --- +--リブロマンサー・ミスティガール --Libromancer Mystigirl --scripted by Naim local s,id=GetID() @@ -33,19 +33,19 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.matcheck(e,c) if c:GetMaterial():IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end end function s.immcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)>0 + return c:IsRitualSummoned() and c:GetFlagEffect(id)>0 end function s.immval(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER) + return aux.tgoval(e,re,rp) and re:IsMonsterEffect() end function s.disfilter(c) return c:IsFaceup() and (not c:IsAttack(0) or c:IsNegatableMonster()) @@ -67,21 +67,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Negate its effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c52709508.lua b/official/c52709508.lua index b4e39c33ae..58e56ecc2b 100644 --- a/official/c52709508.lua +++ b/official/c52709508.lua @@ -26,7 +26,7 @@ function s.valcheck(e,c) e:SetLabel(att) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabelObject():GetLabel()~=0 + return e:GetHandler():IsSynchroSummoned() and e:GetLabelObject():GetLabel()~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) local att=e:GetLabelObject():GetLabel() diff --git a/official/c52711246.lua b/official/c52711246.lua index 3435104f02..4e41fc18e7 100644 --- a/official/c52711246.lua +++ b/official/c52711246.lua @@ -1,5 +1,5 @@ --妖神-不知火 ---Shiranui Spiritsaga +--Shiranui Squiresaga --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -23,12 +23,12 @@ function s.filter(c) return c:IsAbleToRemove() and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) local tc=g:GetFirst() if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then local b1=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) @@ -40,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(300) t1:RegisterEffect(e1) end @@ -60,5 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(t3,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c52714670.lua b/official/c52714670.lua index 1f0e0d47a4..a9487a812c 100644 --- a/official/c52714670.lua +++ b/official/c52714670.lua @@ -35,12 +35,12 @@ function s.initial_effect(c) e4:SetOperation(s.rmop) c:RegisterEffect(e4) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x105) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_METAPHYS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) @@ -81,7 +81,7 @@ function s.ermop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end function s.rmcfilter(c,tp) - return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x105) and c:IsPreviousControler(tp) + return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(SET_METAPHYS) and c:IsPreviousControler(tp) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.rmcfilter,1,e:GetHandler(),tp) @@ -99,4 +99,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52738610.lua b/official/c52738610.lua index 233037b3da..e78cada8d9 100644 --- a/official/c52738610.lua +++ b/official/c52738610.lua @@ -1,4 +1,5 @@ --影霊衣の舞姫 +--Dance Princess of the Nekroz local s,id=GetID() function s.initial_effect(c) --act limit @@ -30,11 +31,11 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} s.listed_names={id} function s.chainop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(0xb4) and re:IsActiveType(TYPE_RITUAL) then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(SET_NEKROZ) and re:IsActiveType(TYPE_RITUAL) then Duel.SetChainLimit(s.chainlm) end end @@ -42,13 +43,13 @@ function s.chainlm(e,rp,tp) return tp==rp end function s.tgtg(e,c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) + return c:IsSetCard(SET_NEKROZ) and c:IsType(TYPE_RITUAL) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_NEKROZ) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -63,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c52768103.lua b/official/c52768103.lua index ffe1851312..f09c0b4421 100644 --- a/official/c52768103.lua +++ b/official/c52768103.lua @@ -1,4 +1,5 @@ --KA-2 デス・シザース +--KA-2 Des Scissors local s,id=GetID() function s.initial_effect(c) --damage @@ -28,4 +29,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52786469.lua b/official/c52786469.lua index 3c81896cab..46965f63c9 100644 --- a/official/c52786469.lua +++ b/official/c52786469.lua @@ -1,4 +1,5 @@ --ラヴァル・ウォリアー +--Laval Warrior local s,id=GetID() function s.initial_effect(c) --damage @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -27,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)<4 then return end + if Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_LAVAL):GetClassCount(Card.GetCode)<4 then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52792430.lua b/official/c52792430.lua index ff58724812..7e8b7845c1 100644 --- a/official/c52792430.lua +++ b/official/c52792430.lua @@ -26,12 +26,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} s.listed_names={id} s.counter_place_list={COUNTER_PREDATOR} function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1041,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1041,1) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(COUNTER_PREDATOR,1) end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_PREDATOR,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_PREDATOR,1) end @@ -41,7 +41,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -56,7 +56,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return bc and bc:IsLevelBelow(c:GetLevel()) and bc:IsStatus(STATUS_OPPO_BATTLE) and bc:IsRelateToBattle() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10f3) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PREDAPLANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52807032.lua b/official/c52807032.lua index c01bbc1c1c..2db46cbdca 100644 --- a/official/c52807032.lua +++ b/official/c52807032.lua @@ -1,5 +1,5 @@ --ダイノルフィア・ソニック ---Dinoruffia Sonic +--Dinomorphia Sonic --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -22,13 +22,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x175) + return c:IsFaceup() and c:IsSetCard(SET_DINOMORPHIA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -67,6 +67,6 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c52817046.lua b/official/c52817046.lua index 6f932a0f72..a8a5371ae8 100644 --- a/official/c52817046.lua +++ b/official/c52817046.lua @@ -1,4 +1,5 @@ --記憶抹消 +--Mind Wipe local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,#g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52823314.lua b/official/c52823314.lua index 55344971ca..6c8284dee4 100644 --- a/official/c52823314.lua +++ b/official/c52823314.lua @@ -1,4 +1,5 @@ --魔界発現世行きバス +--Tour Bus From the Underworld local s,id=GetID() function s.initial_effect(c) --to deck @@ -25,6 +26,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52824910.lua b/official/c52824910.lua index ed0c42d4fe..4710325502 100644 --- a/official/c52824910.lua +++ b/official/c52824910.lua @@ -1,4 +1,5 @@ --カイザー・グライダー +--Kaiser Glider local s,id=GetID() function s.initial_effect(c) --indes @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52833089.lua b/official/c52833089.lua index 67d99d958c..2dd2af236b 100644 --- a/official/c52833089.lua +++ b/official/c52833089.lua @@ -1,4 +1,5 @@ --ブラック・サンダー +--Black Thunder local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.cfilter(c,tp) - return c:IsSetCard(0x33) and c:IsLocation(LOCATION_GRAVE) + return c:IsSetCard(SET_BLACKWING) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and (c:GetReason()&REASON_BATTLE)~=0 end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,0)*400 Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52834429.lua b/official/c52834429.lua index b1c9f0e585..43b181a619 100644 --- a/official/c52834429.lua +++ b/official/c52834429.lua @@ -1,5 +1,5 @@ --オーロラの天気模様 ---The Weather Auroural Canvas +--The Weather Auroral Canvas local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -27,10 +27,10 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return #eg==1 diff --git a/official/c52838896.lua b/official/c52838896.lua index b4bd490af2..1af3f8324e 100644 --- a/official/c52838896.lua +++ b/official/c52838896.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x12f} +s.listed_series={SET_BATTLEWASP} function s.counterfilter(c) return c:IsRace(RACE_INSECT) or c:GetSummonLocation()~=LOCATION_EXTRA end @@ -26,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -41,7 +41,7 @@ function s.lizfilter(e,c) return not c:IsOriginalRace(RACE_INSECT) end function s.filter(c,e,tp) - return c:IsSetCard(0x12f) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BATTLEWASP) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) @@ -64,4 +64,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52840267.lua b/official/c52840267.lua index 73d7ef58a7..aa7fe490b3 100644 --- a/official/c52840267.lua +++ b/official/c52840267.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.cpcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.cptg) e2:SetOperation(s.cpop) c:RegisterEffect(e2) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.cfilter(c) - return c:IsSetCard(0xef) and c:IsDiscardable() + return c:IsSetCard(SET_DARKLORD) and c:IsDiscardable() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() @@ -39,7 +39,7 @@ function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -51,12 +51,8 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.cpfilter(c) - return c:IsSetCard(0xef) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil + return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil end function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.cpfilter(chkc) end @@ -86,5 +82,5 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) etc:ReleaseEffectRelation(te) end Duel.BreakEffect() - Duel.SendtoDeck(te:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c52840598.lua b/official/c52840598.lua index fe9d1c4f17..e3151472c2 100644 --- a/official/c52840598.lua +++ b/official/c52840598.lua @@ -1,4 +1,5 @@ --ブライ・シンクロン +--Bri Synchron local s,id=GetID() function s.initial_effect(c) --atk change @@ -20,16 +21,16 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c52843699.lua b/official/c52843699.lua index 2eef792a4f..b9003cb9f4 100644 --- a/official/c52843699.lua +++ b/official/c52843699.lua @@ -1,5 +1,5 @@ --絶神鳥シムルグ ---Simorgh, Bird of Extermination +--Simorgh, Bird of Perfection --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x12d} +s.listed_series={SET_SIMORGH} function s.cfilter(c,tp) return c:IsRace(RACE_WINGEDBEAST) and c:IsFaceup() and c:IsSummonPlayer(tp) end @@ -54,22 +54,22 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.sumfilter(c) - return c:IsSetCard(0x12d) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_SIMORGH) and c:IsSummonable(true,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end - local g=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end + local g=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) Duel.SetOperationInfo(0,CATEGORY_SUMMON,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local tc=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil):GetFirst() if tc then Duel.Summon(tp,tc,true,nil) end end function s.costfilter(c) - return c:IsSetCard(0x12d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_SIMORGH) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end @@ -78,7 +78,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x12d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SIMORGH) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -91,4 +91,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c5284653.lua b/official/c5284653.lua index ee31d6d68c..a55f13b782 100644 --- a/official/c5284653.lua +++ b/official/c5284653.lua @@ -1,4 +1,5 @@ --ヴェルズ・オ・ウィスプ +--Evilswarm Obliviwisp local s,id=GetID() function s.initial_effect(c) --Disable @@ -23,11 +24,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+0x57a0000) + e1:SetReset(RESET_EVENT|RESET_TURN_SET|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_TOFIELD|RESET_OVERLAY) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+0x57a0000) + e2:SetReset(RESET_EVENT|RESET_TURN_SET|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_TOFIELD|RESET_OVERLAY) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c52846880.lua b/official/c52846880.lua index 83d434160c..2e5b039a59 100644 --- a/official/c52846880.lua +++ b/official/c52846880.lua @@ -1,4 +1,5 @@ --カタストルの影霊衣 +--Nekroz of Catastor local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -33,17 +34,13 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} s.listed_names={id} function s.mat_filter(c) return not c:IsCode(id) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NEKROZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -64,7 +61,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetAttackTarget() if not bc then return false end if tc:IsControler(1-tp) then tc,bc=bc,tc end - if tc:IsSetCard(0xb4) and bc:IsSummonLocation(LOCATION_EXTRA) then + if tc:IsSetCard(SET_NEKROZ) and bc:IsSummonLocation(LOCATION_EXTRA) then e:SetLabelObject(bc) return true else return false end @@ -79,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52860176.lua b/official/c52860176.lua index 57e612a589..fe0259ac54 100644 --- a/official/c52860176.lua +++ b/official/c52860176.lua @@ -1,4 +1,5 @@ --憑依するブラッド・ソウル +--Possessed Dark Soul local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_CONTROL) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsLevelBelow(3) and c:IsControlerCanBeChanged() end @@ -27,4 +24,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.GetControl(g,tp) -end +end \ No newline at end of file diff --git a/official/c52869807.lua b/official/c52869807.lua index bfbd958fc7..4d6e7bae65 100644 --- a/official/c52869807.lua +++ b/official/c52869807.lua @@ -1,4 +1,5 @@ --BF-逆風のガスト +--Blackwing - Gust the Backblast local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetValue(-300) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and @@ -31,8 +32,8 @@ function s.atkcon(e) local d=Duel.GetAttackTarget() local tp=e:GetHandlerPlayer() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) - and d and d:IsControler(tp) and d:IsSetCard(0x33) + and d and d:IsControler(tp) and d:IsSetCard(SET_BLACKWING) end function s.atktg(e,c) return c==Duel.GetAttacker() -end +end \ No newline at end of file diff --git a/official/c52875873.lua b/official/c52875873.lua index fbfd5793e4..658fcc269f 100644 --- a/official/c52875873.lua +++ b/official/c52875873.lua @@ -1,4 +1,5 @@ --エヴォリューション・バースト +--Evolution Burst local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ s.listed_names={CARD_CYBER_DRAGON} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:IsCode(CARD_CYBER_DRAGON) then - Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end function s.cfilter(c) @@ -41,7 +42,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_OATH) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_CYBER_DRAGON)) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5288597.lua b/official/c5288597.lua index bb0d1a1256..d33c254a49 100644 --- a/official/c5288597.lua +++ b/official/c5288597.lua @@ -1,4 +1,5 @@ --トランスターン +--Transmodify local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,12 +27,12 @@ function s.cfilter(c,e,tp,ft) local val=te:GetValue() if val and val(te,c,e,0) then rc=val(te,c,e,1) end end - local eff12644061={Duel.GetPlayerEffect(tp,12644061)} + local eff12644061={Duel.GetPlayerEffect(tp,CARD_ADVANCED_DARK)} for _,te in ipairs(eff12644061) do local val=te:GetValue() if val and val(te,c,e,0) then att=val(te,c,e,1) end end - return c:GetOriginalType()&TYPE_MONSTER~=0 and lv>0 and c:IsFaceup() and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsMonsterCard() and lv>0 and c:IsFaceup() and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,lv+1,rc,att,e,tp) end function s.spfilter(c,lv,rc,att,e,tp) @@ -61,4 +62,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52900000.lua b/official/c52900000.lua index 788f16595c..87c8b09c1f 100644 --- a/official/c52900000.lua +++ b/official/c52900000.lua @@ -34,7 +34,7 @@ end s.listed_names={73055622,TOKEN_SHINOBIRD} s.listed_card_types={TYPE_SPIRIT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end diff --git a/official/c52900379.lua b/official/c52900379.lua index a220c9772f..c6bbb008df 100644 --- a/official/c52900379.lua +++ b/official/c52900379.lua @@ -1,4 +1,5 @@ --BF-追い風のアリゼ +--Blackwing - Brisote the Tailwind local s,id=GetID() function s.initial_effect(c) --special summon @@ -34,7 +35,7 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and s[c:GetControler()]>=2 @@ -43,7 +44,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do local pos=tc:GetPosition() - if tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x33) and (pos&POS_FACEUP)~=0 then + if tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(SET_BLACKWING) and (pos&POS_FACEUP)~=0 then s[tc:GetControler()]=s[tc:GetControler()]+1 end end @@ -60,4 +61,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52904476.lua b/official/c52904476.lua index e9804e6ded..304c81ff7b 100644 --- a/official/c52904476.lua +++ b/official/c52904476.lua @@ -1,5 +1,5 @@ --ネフティスの悟り手 ---Enlightened of Nephthys +--Matriarch of Nephthys local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,17 +26,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon2) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x11f) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_NEPHTHYS) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -57,24 +57,24 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) then return end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) @@ -92,4 +92,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52913738.lua b/official/c52913738.lua index 3c1682f100..7bc9373cfc 100644 --- a/official/c52913738.lua +++ b/official/c52913738.lua @@ -1,4 +1,5 @@ --破滅の儀式 +--Ritual of Destruction local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,30646525) @@ -8,23 +9,19 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.regcon) - e1:SetCost(s.regcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.regop) c:RegisterEffect(e1) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function s.regcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) + return Duel.IsPhase(PHASE_MAIN1) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLED) e1:SetOperation(s.tdop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) @@ -36,7 +33,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetTarget(s.reptg) e1:SetOperation(s.repop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e1) end end @@ -46,5 +43,5 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return true end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c5291803.lua b/official/c5291803.lua index 353cb2cd5b..9f14efd8f7 100644 --- a/official/c5291803.lua +++ b/official/c5291803.lua @@ -17,4 +17,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c52927340.lua b/official/c52927340.lua index 71dddc0c2f..938c9a4664 100644 --- a/official/c52927340.lua +++ b/official/c52927340.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:GetControler()==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x103),tp,LOCATION_ONFIELD,0,1,nil) + return at:IsControler(1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ALTERGEIST),tp,LOCATION_ONFIELD,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -58,18 +58,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetCondition(s.rcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if tc:IsType(TYPE_TRAPMONSTER) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c52947044.lua b/official/c52947044.lua index 141a521c63..1fbcfe6e20 100644 --- a/official/c52947044.lua +++ b/official/c52947044.lua @@ -3,25 +3,25 @@ local s,id=GetID() function s.initial_effect(c) --activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.ListsArchetypeAsMaterial,0xc008),Fusion.InHandMat,s.fextra,nil,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.ListsArchetypeAsMaterial,SET_DESTINY_HERO),Fusion.InHandMat,s.fextra,nil,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x8} +s.listed_series={SET_HERO,SET_DESTINY_HERO} function s.fcheck(tp,sg,fc) - return sg:IsExists(aux.FilterBoolFunction(Card.IsSetCard,0xc008,fc,SUMMON_TYPE_FUSION,tp),1,nil) + return sg:IsExists(aux.FilterBoolFunction(Card.IsSetCard,SET_DESTINY_HERO,fc,SUMMON_TYPE_FUSION,tp),1,nil) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil),s.fcheck end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND|LOCATION_DECK) end function s.stage2(e,tc,tp,mg,chk) local c=e:GetHandler() if chk==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end if chk==1 then local e2=Effect.CreateEffect(c) @@ -30,7 +30,7 @@ function s.stage2(e,tc,tp,mg,chk) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) e2:SetCountLimit(1) e2:SetLabel(Duel.GetTurnCount()) e2:SetLabelObject(tc) @@ -45,13 +45,13 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end end function s.splimit(e,c) - return not (c:IsSetCard(0x8) and c:IsAttribute(ATTRIBUTE_DARK)) + return not (c:IsSetCard(SET_HERO) and c:IsAttribute(ATTRIBUTE_DARK)) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -60,4 +60,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c52962804.lua b/official/c52962804.lua index f070a87ecc..137fc00d55 100644 --- a/official/c52962804.lua +++ b/official/c52962804.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.imop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.thfilter(c,e) - return c:IsSetCard(0x29) and c:IsMonster() and c:IsLevelBelow(4) + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonster() and c:IsLevelBelow(4) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.imcon(e,tp,eg,ep,ev,re,r,rp) local ac=Duel.GetAttacker() - return ac and ac:IsControler(tp) and ac:IsSetCard(0x29) and ac:GetOriginalLevel()>=5 + return ac and ac:IsControler(tp) and ac:IsSetCard(SET_DRAGUNITY) and ac:GetOriginalLevel()>=5 end function s.imop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -56,10 +56,10 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) Duel.GetAttacker():RegisterEffect(e1) Duel.AdjustInstantly(Duel.GetAttacker()) end function s.efilter(e,te) return te:GetHandlerPlayer()~=e:GetOwnerPlayer() -end +end \ No newline at end of file diff --git a/official/c52963531.lua b/official/c52963531.lua index fd5b4a4664..02ddea45a4 100644 --- a/official/c52963531.lua +++ b/official/c52963531.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.cfilter(c,tp) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsControler(tp) end @@ -34,7 +34,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_ODD_EYES) and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -48,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c52971673.lua b/official/c52971673.lua index 67d752faaa..419d02ac44 100644 --- a/official/c52971673.lua +++ b/official/c52971673.lua @@ -1,4 +1,5 @@ --トークン復活祭 +--Token Sundae local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52971944.lua b/official/c52971944.lua index 8942296c43..ba00a1317c 100644 --- a/official/c52971944.lua +++ b/official/c52971944.lua @@ -30,16 +30,16 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(cg,POS_FACEUP,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -48,4 +48,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c52977572.lua b/official/c52977572.lua index 9047b5b507..fac289f0ef 100644 --- a/official/c52977572.lua +++ b/official/c52977572.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) c:RegisterEffect(e3) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.filter(c,e,tp) - return c:IsSetCard(0x29) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -61,4 +61,4 @@ end function s.rdcon(e) local c,tp=e:GetHandler():GetEquipTarget(),e:GetHandlerPlayer() return Duel.GetAttackTarget()==nil and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c5298175.lua b/official/c5298175.lua index dd5a4339c5..a9314bf3a7 100644 --- a/official/c5298175.lua +++ b/official/c5298175.lua @@ -59,18 +59,18 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then e1:SetLabel(Duel.GetTurnCount()+2) else e1:SetLabel(Duel.GetTurnCount()+1) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) tc:RegisterEffect(e1) diff --git a/official/c53025096.lua b/official/c53025096.lua index 268ed37e8b..02e49d7bbe 100644 --- a/official/c53025096.lua +++ b/official/c53025096.lua @@ -1,4 +1,5 @@ --オッドアイズ・ドラゴン +--Odd-Eyes Dragon local s,id=GetID() function s.initial_effect(c) --damage @@ -29,4 +30,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53027855.lua b/official/c53027855.lua index 311722b60b..fa14f78652 100644 --- a/official/c53027855.lua +++ b/official/c53027855.lua @@ -1,4 +1,5 @@ --風霊神ウィンドローズ +--Windrose the Elemental Lord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -40,7 +41,7 @@ function s.spcon(e,c) Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND)==5 end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -62,12 +63,12 @@ function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()==effp then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,effp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c53039326.lua b/official/c53039326.lua index f9edd476c1..f8131cd82b 100644 --- a/official/c53039326.lua +++ b/official/c53039326.lua @@ -36,13 +36,13 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.cfilter(c) return c:IsCode(36623431) and not c:IsPublic() end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,7 +70,7 @@ function s.check(e,tp,eg,ep,ev,re,r,rp) local g1=Group.CreateGroup() local g2=Group.CreateGroup() for tc in aux.Next(eg) do - if tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x1d) then + if tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(SET_KOAKI_MEIRU) then if tc:GetOwner()==turnp then g1:AddCard(tc) else g2:AddCard(tc) end end end @@ -78,7 +78,7 @@ function s.check(e,tp,eg,ep,ev,re,r,rp) if #g2>0 then Duel.RaiseEvent(g2,EVENT_CUSTOM+id,re,r,rp,1-turnp,0) end end function s.filter(c) - return c:IsMonster() and c:IsSetCard(0x1d) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_KOAKI_MEIRU) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -91,4 +91,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c53046408.lua b/official/c53046408.lua index eb53be71ec..3c533f9539 100644 --- a/official/c53046408.lua +++ b/official/c53046408.lua @@ -1,4 +1,5 @@ --非常食 +--Emergency Provisions local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53054164.lua b/official/c53054164.lua index 078d1cfbf5..ff7e43d694 100644 --- a/official/c53054164.lua +++ b/official/c53054164.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcond) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,14 +31,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x147} +s.listed_series={SET_MELFFY} function s.atkcond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsAbleToEnterBP() and Duel.GetFlagEffect(tp,id)==0 end end @@ -47,10 +43,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x147)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MELFFY)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRace(RACE_BEAST) and c:IsAbleToExtra() @@ -69,7 +65,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local ft=math.min(tc:GetOverlayCount(),Duel.GetMZoneCount(tp,tc)) - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then local og=Duel.GetOperatedGroup() local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) if og:GetFirst():IsLocation(LOCATION_EXTRA) and ft>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then diff --git a/official/c53054833.lua b/official/c53054833.lua index bc3f9647d4..f165d2e5b9 100644 --- a/official/c53054833.lua +++ b/official/c53054833.lua @@ -1,4 +1,5 @@ --SRダブルヨーヨー +--Speedroid Double Yoyo local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(3) and c:IsSetCard(SET_SPEEDROID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53063039.lua b/official/c53063039.lua index a9074a6aea..e00cdfbd30 100644 --- a/official/c53063039.lua +++ b/official/c53063039.lua @@ -1,4 +1,5 @@ --Sin Claw Stream +--Malefic Claw Stream local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x23) + return c:IsFaceup() and c:IsSetCard(SET_MALEFIC) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53077251.lua b/official/c53077251.lua index eadb87d6b7..4d7cd9d2d5 100644 --- a/official/c53077251.lua +++ b/official/c53077251.lua @@ -1,5 +1,5 @@ --単一化 ---Standardization +--Universal Adapter --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -9,14 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c,tp) return c:IsFaceup() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack()) end @@ -40,8 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c53087962.lua b/official/c53087962.lua index 78bc74b8cd..7506e46d3b 100644 --- a/official/c53087962.lua +++ b/official/c53087962.lua @@ -35,14 +35,14 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCountLimit(1,id) + e4:SetCountLimit(1,id) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.thcon) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} function s.sprfilter(c) return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:HasLevel() end @@ -92,7 +92,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end function s.thfilter(c) - return c:IsSetCard(0x165) and c:IsAbleToHand() + return c:IsSetCard(SET_URSARCTIC) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -105,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c53090623.lua b/official/c53090623.lua index 4306b296a5..c1ed6d2c39 100644 --- a/official/c53090623.lua +++ b/official/c53090623.lua @@ -1,4 +1,5 @@ --黄血鬼 +--Yellow-Bellied Oni local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,7 +27,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=eg:GetFirst() - return #eg==1 and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_XYZ) + return #eg==1 and c:IsControler(tp) and c:IsXyzSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -58,11 +59,11 @@ function s.rdop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RANK) e2:SetValue(-1) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c5309481.lua b/official/c5309481.lua index 357441dded..49fea78138 100644 --- a/official/c5309481.lua +++ b/official/c5309481.lua @@ -27,11 +27,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_LEAVE-RESET_TOGRAVE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c53094821.lua b/official/c53094821.lua index 1c23ab4df5..d7ea751d6e 100644 --- a/official/c53094821.lua +++ b/official/c53094821.lua @@ -1,7 +1,6 @@ --トゥーン・テラー --Toon Terror --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Negate the activation of a monster effect or spell/trap card @@ -17,7 +16,6 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={15259703} - function s.cfilter(c) return c:IsFaceup() and c:IsCode(15259703) end @@ -28,7 +26,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) or not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) or not Duel.IsChainNegatable(ev) then return false end - return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c53100061.lua b/official/c53100061.lua index bf4a6a19dd..820e6e9fb0 100644 --- a/official/c53100061.lua +++ b/official/c53100061.lua @@ -1,4 +1,5 @@ --X-セイバー アクセル +--X-Saber Axel local s,id=GetID() function s.initial_effect(c) --draw @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xd} +s.listed_series={SET_SABER} function s.filter(c) - return c:IsSetCard(0xd) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) + return c:IsSetCard(SET_SABER) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil) @@ -30,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53112492.lua b/official/c53112492.lua index 9ba0be4c61..cbcab7515f 100644 --- a/official/c53112492.lua +++ b/official/c53112492.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end s.counter_list={COUNTER_SPELL} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_SPELL,2,REASON_COST) end @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53116300.lua b/official/c53116300.lua index 2e06938b1c..fab829c461 100644 --- a/official/c53116300.lua +++ b/official/c53116300.lua @@ -1,4 +1,5 @@ --インヴェルズを呼ぶ者 +--Steelswarm Caller local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(0x100a) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(SET_STEELSWARM) end function s.filter(c,e,tp) - return c:IsSetCard(0x100a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STEELSWARM) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53119267.lua b/official/c53119267.lua index cc85d6c7db..13002a36f5 100644 --- a/official/c53119267.lua +++ b/official/c53119267.lua @@ -23,4 +23,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local ct=eg:FilterCount(s.filter,nil,tp) Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53129443.lua b/official/c53129443.lua index 76dd25db36..181ec91125 100644 --- a/official/c53129443.lua +++ b/official/c53129443.lua @@ -1,4 +1,5 @@ --ブラック・ホール +--Dark Hole local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53134520.lua b/official/c53134520.lua index d7e3f0dde0..5e29971c87 100644 --- a/official/c53134520.lua +++ b/official/c53134520.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.mzthtg) e1:SetOperation(s.mzthop) c:RegisterEffect(e1) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.gythtg) e2:SetOperation(s.gythop) c:RegisterEffect(e2) diff --git a/official/c53136004.lua b/official/c53136004.lua index 971a6e5770..3641cbdf1a 100644 --- a/official/c53136004.lua +++ b/official/c53136004.lua @@ -1,6 +1,5 @@ --魔導皇士 アンプール --Emperor of Prophecy - local s,id=GetID() function s.initial_effect(c) --Take control 1 of opponent's monsters until end phase @@ -16,13 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x106e} - +s.listed_series={SET_SPELLBOOK} function s.cfilter1(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost() end function s.cfilter2(c) - return c:IsSetCard(0x106e) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_SPELLBOOK) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 @@ -40,7 +38,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c) diff --git a/official/c53143898.lua b/official/c53143898.lua index 757b31e9da..d420bd8d30 100644 --- a/official/c53143898.lua +++ b/official/c53143898.lua @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and tc2:IsRelateToEffect(e) and aux.nvfilter(tc2) then Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53152590.lua b/official/c53152590.lua index 4b8e33a709..b6a4c56e5e 100644 --- a/official/c53152590.lua +++ b/official/c53152590.lua @@ -1,4 +1,5 @@ --C・コイル +--Iron Chain Coil local s,id=GetID() function s.initial_effect(c) --atkup @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0x25} +s.listed_series={SET_IRON_CHAIN} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x25) + return c:IsFaceup() and c:IsSetCard(SET_IRON_CHAIN) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -30,10 +31,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c53154400.lua b/official/c53154400.lua index 7180d1d96d..89f1785156 100644 --- a/official/c53154400.lua +++ b/official/c53154400.lua @@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetRange(LOCATION_MZONE) e1:SetAbsoluteRange(tp,1,0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) end) c:RegisterEffect(e1) end diff --git a/official/c53162898.lua b/official/c53162898.lua index 8f1f1dbc2d..f52952a6e0 100644 --- a/official/c53162898.lua +++ b/official/c53162898.lua @@ -1,4 +1,5 @@ --アマゾネスの賢者 +--Amazoness Sage local s,id=GetID() function s.initial_effect(c) --destroy @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler()==Duel.GetAttacker() and e:GetHandler():IsRelateToBattle() end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53167658.lua b/official/c53167658.lua index ae6375b6a4..6d72e5ec3a 100644 --- a/official/c53167658.lua +++ b/official/c53167658.lua @@ -1,5 +1,5 @@ --遮攻カーテン ---Obstructive Curtain +--Blockout Curtain --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -45,7 +45,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabelObject(cg:GetFirst()) end c:SetStatus(STATUS_DESTROY_CONFIRMED,true) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true else return false end end @@ -55,10 +55,10 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() c:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(c,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(c,REASON_EFFECT|REASON_REPLACE) end function s.repfilter2(c,tp) - return c:IsControler(1-tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsControler(1-tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.reptg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -72,7 +72,7 @@ function s.reptg2(e,tp,eg,ep,ev,re,r,rp,chk) local cg=g:Select(tp,1,1,nil) e:SetLabelObject(cg:GetFirst()) end - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) return true else return false end end @@ -80,5 +80,5 @@ function s.repval2(e,c) return c==e:GetLabelObject() end function s.repop2(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c53174748.lua b/official/c53174748.lua index 3a8ca74313..b77d3c41f8 100644 --- a/official/c53174748.lua +++ b/official/c53174748.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c53180020.lua b/official/c53180020.lua index d070ce5569..798a2fde2c 100644 --- a/official/c53180020.lua +++ b/official/c53180020.lua @@ -1,4 +1,5 @@ --影霊衣の戦士 エグザ +--Exa, Enforcer of the Nekroz local s,id=GetID() function s.initial_effect(c) --tohand @@ -25,12 +26,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 end function s.thfilter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -45,7 +46,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_NEKROZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) and chkc~=e:GetHandler() end @@ -60,4 +61,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53183600.lua b/official/c53183600.lua index 798ee5bc31..45d94e0396 100644 --- a/official/c53183600.lua +++ b/official/c53183600.lua @@ -100,7 +100,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atcost(e,c,tp) @@ -111,4 +111,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,500) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c5318639.lua b/official/c5318639.lua index 786c5b577c..afe40d97de 100644 --- a/official/c5318639.lua +++ b/official/c5318639.lua @@ -7,14 +7,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end @@ -28,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53193261.lua b/official/c53193261.lua index 63706f1598..5734197795 100644 --- a/official/c53193261.lua +++ b/official/c53193261.lua @@ -1,4 +1,5 @@ --エレキー +--Wattkey local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xe) + return c:IsFaceup() and c:IsSetCard(SET_WATT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -23,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c53194323.lua b/official/c53194323.lua index c331305827..ed3a4d1b0c 100644 --- a/official/c53194323.lua +++ b/official/c53194323.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c53208660.lua b/official/c53208660.lua index 4dd2af3ad1..5bce883524 100644 --- a/official/c53208660.lua +++ b/official/c53208660.lua @@ -1,4 +1,5 @@ --ペンデュラム・コール +--Pendulum Call local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,22 +15,22 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.chainfilter(re,tp,cid) local rc=re:GetHandler() local loc=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION) return not (re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and not re:IsHasType(EFFECT_TYPE_ACTIVATE) - and (loc&LOCATION_PZONE)==LOCATION_PZONE and rc:IsSetCard(0x98)) + and (loc&LOCATION_PZONE)==LOCATION_PZONE and rc:IsSetCard(SET_MAGICIAN)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -55,9 +56,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetTargetRange(LOCATION_PZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x98)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MAGICIAN)) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/official/c53212882.lua b/official/c53212882.lua index 407c29f488..3f0085d5ef 100644 --- a/official/c53212882.lua +++ b/official/c53212882.lua @@ -1,9 +1,9 @@ --- ふわんだりぃず×すのーる --- Flundereeze x Snowl --- Scripted by Hatter +--ふわんだりぃず×すのーる +--Floowandereeze & Snowl +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Can conduct 3 normal summons + --Can conduct 3 normal summons local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.nstg) e1:SetOperation(s.nsop) c:RegisterEffect(e1) - -- Piercing damage + --Piercing damage local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_MZONE) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCondition(s.trcon) c:RegisterEffect(e2) - -- Flip opponent monsters face-down + --Flip opponent monsters face-down local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_POSITION) @@ -37,7 +37,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.trcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -56,7 +56,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(3) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.fdcon(e,tp,eg,ep,ev,re,r,rp) @@ -69,7 +69,7 @@ function s.fdcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.fdfilter(c) - return c:IsCanTurnSet() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsCanTurnSet() and c:IsSpecialSummoned() end function s.fdtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.fdfilter,tp,0,LOCATION_MZONE,nil) @@ -81,4 +81,4 @@ function s.fdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c53239672.lua b/official/c53239672.lua index daf34d4cbc..0ab041194e 100644 --- a/official/c53239672.lua +++ b/official/c53239672.lua @@ -1,4 +1,5 @@ --スピリットバリア +--Spirit Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.condition(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0 -end +end \ No newline at end of file diff --git a/official/c53241226.lua b/official/c53241226.lua index 9168ef8ad4..c41eea47b5 100644 --- a/official/c53241226.lua +++ b/official/c53241226.lua @@ -41,13 +41,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_NO_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --substitute local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(s.repval) oc:RegisterEffect(e2) --Equip limit @@ -56,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetLabelObject(tc) oc:RegisterEffect(e3) end @@ -66,4 +66,4 @@ function s.eqlimit(e,c) end function s.repval(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 -end +end \ No newline at end of file diff --git a/official/c53244294.lua b/official/c53244294.lua index efe1fd0aa0..6318f99a6b 100644 --- a/official/c53244294.lua +++ b/official/c53244294.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.zcon) - e2:SetCost(s.zcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.ztg) e2:SetOperation(s.zop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,17 +40,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.zcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end -function s.zcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.ztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0) +Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0 end @@ -64,10 +60,10 @@ function s.zop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetLabel(e:GetLabel()) e:GetHandler():RegisterEffect(e1) end function s.disop(e,tp) return e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c5325155.lua b/official/c5325155.lua index 6062eb6a01..998e90ce14 100644 --- a/official/c5325155.lua +++ b/official/c5325155.lua @@ -1,5 +1,5 @@ --毒の魔妖-束脛 ---Tsukahagi,the Poisonous Mayakashi +--Tsukahagi, the Poisonous Mayakashi --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -21,12 +21,12 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter) end -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.counterfilter(c) - return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(0x121) + return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(SET_MAYAKASHI) end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x121) and not c:IsCode(id) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsSetCard(SET_MAYAKASHI) and not c:IsCode(id) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and rp~=tp end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -40,7 +40,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -56,8 +56,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end \ No newline at end of file diff --git a/official/c53251824.lua b/official/c53251824.lua index 775363f48f..f72519f125 100644 --- a/official/c53251824.lua +++ b/official/c53251824.lua @@ -1,4 +1,5 @@ --RR-バニシング・レイニアス +--Raidraptor - Vanishing Lanius local s,id=GetID() function s.initial_effect(c) --special summon @@ -25,12 +26,12 @@ function s.initial_effect(c) Duel.RegisterEffect(ge2,0) end) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -44,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5325424.lua b/official/c5325424.lua index 6b18ec311b..e0b9142bd3 100644 --- a/official/c5325424.lua +++ b/official/c5325424.lua @@ -1,4 +1,5 @@ --牙竜転生 +--Dragoncarnation local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c53257892.lua b/official/c53257892.lua index b834bce92c..1001e01831 100644 --- a/official/c53257892.lua +++ b/official/c53257892.lua @@ -20,14 +20,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53262004.lua b/official/c53262004.lua index dd3ba62d3e..0158c32723 100644 --- a/official/c53262004.lua +++ b/official/c53262004.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x99),aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ODD_EYES),aux.FilterBoolFunctionEx(Card.IsType,TYPE_PENDULUM)) --Add to hand local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) @@ -29,8 +29,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x99} -s.material_setcode=0x99 +s.listed_series={SET_ODD_EYES} +s.material_setcode=SET_ODD_EYES function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToHand() end @@ -49,7 +49,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler()~=e:GetHandler() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.disfilter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() @@ -70,4 +70,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c53265336.lua b/official/c53265336.lua index b9a3369c32..67511cace2 100644 --- a/official/c53265336.lua +++ b/official/c53265336.lua @@ -1,5 +1,5 @@ --ドレミコード・スケール ---Doremichord Scale +--Solfachord Scale --Scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) @@ -14,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.filter(c) - return c:IsFaceup() and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(0x164) + return c:IsFaceup() and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and c:IsSetCard(SET_SOLFACHORD) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,0,nil)>2 end function s.spfilter(c,e,tp) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x164) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_SOLFACHORD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,0,nil) @@ -73,4 +73,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) flag=1 end -end +end \ No newline at end of file diff --git a/official/c53266486.lua b/official/c53266486.lua index f778df4e13..31aae5e02b 100644 --- a/official/c53266486.lua +++ b/official/c53266486.lua @@ -1,5 +1,5 @@ --アネスヴァレット・ドラゴン ---Anesvullet Dragon +--Anesthrokket Dragon local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} s.listed_names={id} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -51,7 +51,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -61,7 +61,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end local e4=e1:Clone() @@ -71,7 +71,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -81,12 +81,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53274132.lua b/official/c53274132.lua index 4e53cbf099..170e8cf545 100644 --- a/official/c53274132.lua +++ b/official/c53274132.lua @@ -1,6 +1,5 @@ --C・リペアラー --Iron Chain Repairman - local s,id=GetID() function s.initial_effect(c) --When this card destroys a monster by battle, inflict 300 damage @@ -27,9 +26,8 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x25} +s.listed_series={SET_IRON_CHAIN} s.listed_names={id} - function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -54,11 +52,11 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x25) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_IRON_CHAIN) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end diff --git a/official/c53286626.lua b/official/c53286626.lua index c73b4ce2ad..10b1464aeb 100644 --- a/official/c53286626.lua +++ b/official/c53286626.lua @@ -1,7 +1,6 @@ --聖蔓の播種 --Sunvine Sowing --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -26,17 +25,16 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Sunseed" and "Sunavalon" archetypes -s.listed_series={0x4157,0x1157} +s.listed_series={SET_SUNSEED,SET_SUNAVALON} --Specifically lists "Sunseed Genius Loci" s.listed_names={27520594} - --Check for a "Sunavalon" link monster function s.linkchk(c) - return c:IsLinkMonster() and c:IsSetCard(0x1157) + return c:IsLinkMonster() and c:IsSetCard(SET_SUNAVALON) end --Check for "Sunseed Genius Loci" or a "Sunseed" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x4157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUNSEED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (Duel.IsExistingMatchingCard(s.linkchk,tp,LOCATION_MZONE,0,1,nil) or c:IsCode(27520594)) end --Activation legality @@ -64,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -91,4 +89,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53291093.lua b/official/c53291093.lua index 3d45c46fc5..7a8c401680 100644 --- a/official/c53291093.lua +++ b/official/c53291093.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_list={COUNTER_A} function s.filter(c) return c:GetCounter(COUNTER_A)>0 @@ -27,7 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ALIEN) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) local sc=sg:GetFirst() local fid=e:GetHandler():GetFieldID() - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -64,4 +64,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5329790.lua b/official/c5329790.lua index dd49852a33..1e0eec0f53 100644 --- a/official/c5329790.lua +++ b/official/c5329790.lua @@ -35,7 +35,7 @@ function s.atlimit(e,c) end function s.valcon(e,re,r,rp) if r&REASON_BATTLE~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) return true else return false end end @@ -43,4 +43,4 @@ function s.damlimit(e,c) if e:GetHandler():GetFlagEffect(id)==0 then return true else return false end -end +end \ No newline at end of file diff --git a/official/c53303460.lua b/official/c53303460.lua index 9f00e85a59..91d4bdb478 100644 --- a/official/c53303460.lua +++ b/official/c53303460.lua @@ -1,4 +1,4 @@ --- 魔神儀-キャンドール +--魔神儀-キャンドール --Impcantation Candoll local s,id=GetID() function s.initial_effect(c) @@ -37,10 +37,10 @@ function s.initial_effect(c) --clock lizard aux.addContinuousLizardCheck(c,LOCATION_MZONE) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x117) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.costfilter(c) return c:IsRitualSpell() and not c:IsPublic() @@ -57,7 +57,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c53309998.lua b/official/c53309998.lua index 9f04a9f0a4..e89b199e38 100644 --- a/official/c53309998.lua +++ b/official/c53309998.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -38,7 +38,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c53315891.lua b/official/c53315891.lua index 4bbf722ebc..951461a8ac 100644 --- a/official/c53315891.lua +++ b/official/c53315891.lua @@ -1,4 +1,5 @@ --合神竜ティマイオス +--Timaeus the Knight of Destiny local s,id=GetID() function s.initial_effect(c) --fusion material @@ -33,13 +34,13 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0xa0} -s.material_setcode=0xa0 +s.listed_series={SET_LEGENDARY_KNIGHT} +s.material_setcode=SET_LEGENDARY_KNIGHT function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) end function s.econ(e) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -70,7 +71,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(atk) c:RegisterEffect(e1) local e2=e1:Clone() @@ -79,21 +80,21 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xa0) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) + return c:IsSetCard(SET_LEGENDARY_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 - and Duel.IsExistingMatchingCard(s.spfilter,tp,0x13,0,3,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0x13) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,3,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<3 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,0x13,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if #g>2 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,3,3,nil) Duel.SpecialSummon(sg,0,tp,tp,true,true,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53318263.lua b/official/c53318263.lua index bdf4922e5a..72f6b4bee6 100644 --- a/official/c53318263.lua +++ b/official/c53318263.lua @@ -40,7 +40,7 @@ function s.cfilter(c,tp) end function s.tscon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) and eg:IsExists(s.cfilter,1,nil,1-tp) end function s.tstg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -81,8 +81,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if ct>0 and dg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==ct and Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)==ct then Duel.BreakEffect() local og=Duel.GetOperatedGroup() - if Duel.SendtoDeck(hg,nil,2,REASON_EFFECT)>0 then + if Duel.SendtoDeck(hg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then Duel.SendtoHand(og,p,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c53325667.lua b/official/c53325667.lua index 571703ed41..e81a9e3dca 100644 --- a/official/c53325667.lua +++ b/official/c53325667.lua @@ -23,30 +23,30 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={71645242} -s.listed_series={0x1123} +s.listed_series={SET_ROSE_DRAGON} function s.thfilter(c) return c:IsCode(71645242) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x1123) or (c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO))) + return (c:IsSetCard(SET_ROSE_DRAGON) or (c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -62,5 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c53334641.lua b/official/c53334641.lua index e2fa9a1c49..d2ed66eab2 100644 --- a/official/c53334641.lua +++ b/official/c53334641.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.thcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -37,22 +37,18 @@ function s.initial_effect(c) e3:SetOperation(s.mtop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} s.listed_names={id} function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x8d,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) end function s.winop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetOverlayCount()==10 then Duel.Win(tp,WIN_REASON_GHOSTRICK_MISCHIEF) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) - return c:IsSetCard(0x8d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_GHOSTRICK) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -67,7 +63,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.mtfilter(c) - return c:IsSetCard(0x8d) + return c:IsSetCard(SET_GHOSTRICK) end function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) @@ -81,4 +77,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end +end \ No newline at end of file diff --git a/official/c53341729.lua b/official/c53341729.lua index 0511ee56b8..06741df26a 100644 --- a/official/c53341729.lua +++ b/official/c53341729.lua @@ -1,4 +1,5 @@ --閃光を吸い込むマジック・ミラー +--Light-Imprisoning Mirror local s,id=GetID() function s.initial_effect(c) --activate @@ -16,8 +17,8 @@ function s.initial_effect(c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and (loc==LOCATION_MZONE or loc==LOCATION_GRAVE) + if re:IsMonsterEffect() and (loc==LOCATION_MZONE or loc==LOCATION_GRAVE) and re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT) then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c53347303.lua b/official/c53347303.lua index 8f692859b2..07fbbd69c0 100644 --- a/official/c53347303.lua +++ b/official/c53347303.lua @@ -84,4 +84,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c53363708.lua b/official/c53363708.lua index 121521ed6c..05eb3759fa 100644 --- a/official/c53363708.lua +++ b/official/c53363708.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SUMMON+CATEGORY_POSITION) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) e3:SetTarget(s.nstg) @@ -38,7 +38,7 @@ end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetEquipTarget() if chk==0 then return tc and tc:IsCanChangePosition() - and Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,true,nil) end + and Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,true,nil) end Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end @@ -46,9 +46,9 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetEquipTarget() if tc and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local sc=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil):GetFirst() + local sc=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,true,nil):GetFirst() if sc then Duel.Summon(tp,sc,true,nil) end end -end +end \ No newline at end of file diff --git a/official/c5338223.lua b/official/c5338223.lua index 6b4e749751..f43b5fceee 100644 --- a/official/c5338223.lua +++ b/official/c5338223.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x304e,0x604e} +s.listed_series={SET_EVOLTILE,SET_EVOLSAUR} function s.cfilter(c,ft,tp) - return c:IsSetCard(0x304e) + return c:IsSetCard(SET_EVOLTILE) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -25,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(rg,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,170,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,170,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,170,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53388413.lua b/official/c53388413.lua index e76cf2c09c..15bfa455bc 100644 --- a/official/c53388413.lua +++ b/official/c53388413.lua @@ -1,4 +1,5 @@ --総剣司令 ガトムズ +--Commander Gottoms, Swordmaster local s,id=GetID() function s.initial_effect(c) --atk @@ -7,8 +8,8 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SABER)) e1:SetValue(400) c:RegisterEffect(e1) end -s.listed_series={0xd} +s.listed_series={SET_SABER} \ No newline at end of file diff --git a/official/c53389254.lua b/official/c53389254.lua index 562388e211..83be05303a 100644 --- a/official/c53389254.lua +++ b/official/c53389254.lua @@ -1,4 +1,5 @@ --A BF-五月雨のソハヤ +--Assault Blackwing - Sohaya the Rain Storm local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -43,18 +44,18 @@ function s.initial_effect(c) e4:SetOperation(s.spop2) c:RegisterEffect(e4) end -s.listed_series={0x1033,0x33} +s.listed_series={SET_ASSAULT_BLACKWING,SET_BLACKWING} s.listed_names={id} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x33) then + if g:IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.tncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==1 end function s.tnop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -63,14 +64,14 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1033) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ASSAULT_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -94,9 +95,9 @@ function s.costfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -108,4 +109,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53404966.lua b/official/c53404966.lua index 221c7eccb6..a63b408bb0 100644 --- a/official/c53404966.lua +++ b/official/c53404966.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c53408006.lua b/official/c53408006.lua index f2894f90f8..e585a824c4 100644 --- a/official/c53408006.lua +++ b/official/c53408006.lua @@ -1,4 +1,5 @@ --ジェム・マーチャント +--Gem-Merchant local s,id=GetID() function s.initial_effect(c) --atk,def up @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -23,24 +24,20 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and s.filter(a) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsFaceup() and s.filter(d) and d:IsRelateToBattle()) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return (a:IsControler(tp) and s.filter(a) and a:IsRelateToBattle()) + or (d and d:IsControler(tp) and d:IsFaceup() and s.filter(d) and d:IsRelateToBattle()) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end + if Duel.IsTurnPlayer(1-tp) then a=Duel.GetAttackTarget() end if not a:IsRelateToBattle() then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) a:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) a:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c53413628.lua b/official/c53413628.lua index b49c027e9a..b218d6849e 100644 --- a/official/c53413628.lua +++ b/official/c53413628.lua @@ -36,4 +36,4 @@ function s.incon(e) end function s.inval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c53417695.lua b/official/c53417695.lua index 3c418a9d49..2fec51ecb1 100644 --- a/official/c53417695.lua +++ b/official/c53417695.lua @@ -1,5 +1,5 @@ --破械唱導 ---Hakai Homily +--Escape of the Unchained --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetCountLimit(1,id) e1:SetTarget(s.destg) e1:SetOperation(s.desop) @@ -28,9 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x130} +s.listed_series={SET_UNCHAINED} function s.desfilter(c,tp,oc) - return c:IsFaceup() and c:IsSetCard(0x130) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,oc)) + return c:IsFaceup() and c:IsSetCard(SET_UNCHAINED) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,oc)) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -56,7 +56,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53442500.lua b/official/c53442500.lua index 70ad8745df..a0b9a2c7fd 100644 --- a/official/c53442500.lua +++ b/official/c53442500.lua @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53451824.lua b/official/c53451824.lua index ecdefdd016..d94208c0ed 100644 --- a/official/c53451824.lua +++ b/official/c53451824.lua @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53461122.lua b/official/c53461122.lua index 1c9ca91635..e3a4c9a181 100644 --- a/official/c53461122.lua +++ b/official/c53461122.lua @@ -1,4 +1,5 @@ --ガイアフレーム +--Earth Effigy local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c53466826.lua b/official/c53466826.lua index f0f1d8e364..751ef7f1ec 100644 --- a/official/c53466826.lua +++ b/official/c53466826.lua @@ -1,6 +1,5 @@ --ヒロイック・チャンス --Heroic Chance - local s,id=GetID() function s.initial_effect(c) --Targeted "Heroic" monster's ATK becomes doubled, cannot attack directly @@ -14,10 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x6f} - +s.listed_series={SET_HEROIC} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) + return c:IsFaceup() and c:IsSetCard(SET_HEROIC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -33,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot attack directly local e2=Effect.CreateEffect(e:GetHandler()) @@ -41,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c53485634.lua b/official/c53485634.lua index a890784dca..e364affe8c 100644 --- a/official/c53485634.lua +++ b/official/c53485634.lua @@ -19,16 +19,16 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(_,tp) return Duel.IsPlayerCanAdditionalSummon(tp) end) - e2:SetCost(s.sumcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sumtg) e2:SetOperation(s.sumop) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.spfilter(c,e,tp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsPreviousSetCard(0x3b) and c:IsSetCard(0x3b) and c:GetPreviousLevelOnField()<=7 and c:IsLevelBelow(7) and c:IsControler(tp) + and c:IsPreviousSetCard(SET_RED_EYES) and c:IsSetCard(SET_RED_EYES) and c:GetPreviousLevelOnField()<=7 and c:IsLevelBelow(7) and c:IsControler(tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,c:GetPreviousPosition()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -37,7 +37,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and #g>0 end Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,#g+1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,#g+1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.filter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,c:GetPreviousPosition()) @@ -60,11 +60,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end end @@ -74,8 +69,8 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3b)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_RED_EYES)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c53490455.lua b/official/c53490455.lua index a95e8869e8..24734e0f13 100644 --- a/official/c53490455.lua +++ b/official/c53490455.lua @@ -1,7 +1,6 @@ --転生炎獣ラクーン --Salamangreat Raccoon --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Gain LP equal to opponent's attacking monster's ATK @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.lpcon) - e1:SetCost(s.lpcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.lptg) e1:SetOperation(s.lpop) c:RegisterEffect(e1) @@ -29,15 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x119} - +s.listed_series={SET_SALAMANGREAT} function s.lpcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x119) -end -function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SET_SALAMANGREAT) end function s.lpfilter(c,e) return c and c:IsOnField() and c:IsFaceup() and c:IsCanBeEffectTarget(e) @@ -68,7 +62,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tg:RegisterEffect(e1) end end @@ -77,7 +71,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) local bc=tc:GetBattleTarget() return #eg==1 and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) - and bc:IsRelateToBattle() and bc:IsControler(tp) and bc:IsSetCard(0x119) + and bc:IsRelateToBattle() and bc:IsControler(tp) and bc:IsSetCard(SET_SALAMANGREAT) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c53493204.lua b/official/c53493204.lua index 09eca824e3..0e7cbe5508 100644 --- a/official/c53493204.lua +++ b/official/c53493204.lua @@ -1,4 +1,5 @@ --心眼の女神 +--Goddess with the Third Eye local s,id=GetID() function s.initial_effect(c) --fusion substitute @@ -9,5 +10,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end + return e:GetHandler():IsLocation(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c53503015.lua b/official/c53503015.lua index 2c5c986594..cc625b2988 100644 --- a/official/c53503015.lua +++ b/official/c53503015.lua @@ -57,7 +57,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,2,REASON_EFFECT)==2 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -78,4 +78,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c53519297.lua b/official/c53519297.lua index 44f0752976..dd4e1e71d0 100644 --- a/official/c53519297.lua +++ b/official/c53519297.lua @@ -1,4 +1,5 @@ --ブラック・ブースト +--Blackboost local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,2,nil) end @@ -31,4 +32,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5352328.lua b/official/c5352328.lua index b8a6bccb75..cb501185e6 100644 --- a/official/c5352328.lua +++ b/official/c5352328.lua @@ -1,9 +1,9 @@ --- エクソシスター・ソフィア --- Exorsister Sophia --- Scripted by Hatter +--エクソシスター・ソフィア +--Exosister Sophia +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Draw + --Draw local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) - -- Special Summon Xyz + --Special Summon Xyz local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={79858629} -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x174),tp,LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_EXOSISTER),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -48,7 +48,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x174) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_EXOSISTER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c53527835.lua b/official/c53527835.lua index e69d546208..213c85258f 100644 --- a/official/c53527835.lua +++ b/official/c53527835.lua @@ -1,4 +1,5 @@ --ダーク・シティ +--Dark City local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,13 +18,13 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.atkcon(e) s[0]=false - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.atktg(e,c) - return c==Duel.GetAttacker() and c:IsSetCard(0xc008) + return c==Duel.GetAttacker() and c:IsSetCard(SET_DESTINY_HERO) end function s.atkval(e,c) local d=Duel.GetAttackTarget() @@ -31,4 +32,4 @@ function s.atkval(e,c) s[0]=true return 1000 else return 0 end -end +end \ No newline at end of file diff --git a/official/c53530069.lua b/official/c53530069.lua index 8152335210..90e2f462f5 100644 --- a/official/c53530069.lua +++ b/official/c53530069.lua @@ -1,4 +1,5 @@ --そよ風の精霊 +--Spirit of the Breeze local s,id=GetID() function s.initial_effect(c) --recover @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) diff --git a/official/c53535814.lua b/official/c53535814.lua index e18b69aa4b..6b310a783e 100644 --- a/official/c53535814.lua +++ b/official/c53535814.lua @@ -1,7 +1,6 @@ --氷結界の浄玻璃 --Judge of the Ice Barrier --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -40,22 +39,22 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetCondition(s.poscon) e4:SetTarget(s.postg) e4:SetOperation(s.posop) c:RegisterEffect(e4) end --Lists "Ice Barrier" archetype -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.regop(e,tp,eg,ep,ev,re,r,rp) if not (re and re:IsActivated()) then return end - e:GetHandler():RegisterFlagEffect(Duel.GetCurrentChain(),RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(Duel.GetCurrentChain(),RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) end --If you control another "Ice Barrier" monster function s.dmgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not (ep==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),tp,LOCATION_MZONE,0,1,c)) then return false end + if not (ep==1-tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),tp,LOCATION_MZONE,0,1,c)) then return false end return c:GetFlagEffect(Duel.GetCurrentChain())>0 end --Opponent loses 500 LP each time they pay LP @@ -66,7 +65,7 @@ function s.dmgop(e,tp,eg,ep,ev,re,r,rp) end --Check for an "Ice Barrier" monster function s.tdfilter(c) - return c:IsSetCard(0x2f) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() and c:IsAbleToDeck() end --Check for an attack position monster function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -89,7 +88,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end --If you control an "Ice Barrier" monster function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),tp,LOCATION_MZONE,0,1,nil) end --Check for an attack position monster function s.posfilter(c) @@ -109,4 +108,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c53539634.lua b/official/c53539634.lua index 6b74eae51e..25f9559084 100644 --- a/official/c53539634.lua +++ b/official/c53539634.lua @@ -1,7 +1,8 @@ --クリッチー +--Sanwitch local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,78010363,26202165) -end +end \ No newline at end of file diff --git a/official/c53540729.lua b/official/c53540729.lua index 9af8987f08..3cf0537557 100644 --- a/official/c53540729.lua +++ b/official/c53540729.lua @@ -1,4 +1,5 @@ --ゼンマイウォリアー +--Wind-Up Warrior local s,id=GetID() function s.initial_effect(c) --atk/lv up @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:IsLevelAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -31,15 +32,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(600) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c53545926.lua b/official/c53545926.lua index e687285f5b..1736c42303 100644 --- a/official/c53545926.lua +++ b/official/c53545926.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.HasFlagEffect(0,id) end) diff --git a/official/c53550467.lua b/official/c53550467.lua index 079c33087d..23c1e6e94a 100644 --- a/official/c53550467.lua +++ b/official/c53550467.lua @@ -1,4 +1,5 @@ --聖騎士トリスタン +--Noble Knight Drystan local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -34,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) end function s.con(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) @@ -48,7 +49,7 @@ function s.tglimit(e,c) return c~=e:GetHandler() and c:GetAttack()<1800 end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSetCard,1,nil,0x207a) + return eg:IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFaceup() end @@ -62,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53567095.lua b/official/c53567095.lua index 1f9c3a743e..cf63137661 100644 --- a/official/c53567095.lua +++ b/official/c53567095.lua @@ -1,4 +1,5 @@ --ゴッドバードアタック +--Icarus Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -54,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53573406.lua b/official/c53573406.lua index 38bcc4d42a..333b351b06 100644 --- a/official/c53573406.lua +++ b/official/c53573406.lua @@ -39,7 +39,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabel(fid) e1:SetTarget(s.sumlimit) @@ -55,7 +55,7 @@ function s.filter(c,e,tp) return c:IsDefenseBelow(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -69,13 +69,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c53577438.lua b/official/c53577438.lua index 2fbf41dd94..8d8a18fb87 100644 --- a/official/c53577438.lua +++ b/official/c53577438.lua @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.atkfilter(c) return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) @@ -73,4 +73,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) tc:RegisterFlagEffect(0,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end -end +end \ No newline at end of file diff --git a/official/c53582587.lua b/official/c53582587.lua index f1a23ed1d4..20fd754e35 100644 --- a/official/c53582587.lua +++ b/official/c53582587.lua @@ -1,4 +1,5 @@ --激流葬 +--Torrential Tribute local s,id=GetID() function s.initial_effect(c) --Activate(summon) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53586134.lua b/official/c53586134.lua index 7de1812c8d..a3f3e7c168 100644 --- a/official/c53586134.lua +++ b/official/c53586134.lua @@ -1,4 +1,5 @@ --バブル・ショット +--Bubble Blaster local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,79979666)) @@ -23,4 +24,4 @@ end s.listed_names={79979666} function s.repval(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c53610653.lua b/official/c53610653.lua index 4aca7e654b..29b447f43d 100644 --- a/official/c53610653.lua +++ b/official/c53610653.lua @@ -41,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5361647.lua b/official/c5361647.lua index 9baaab995b..e353ce1304 100644 --- a/official/c5361647.lua +++ b/official/c5361647.lua @@ -1,4 +1,5 @@ --BK グラスジョー +--Battlin' Boxer Glassjaw local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) @@ -36,7 +37,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.filter(c) - return c:IsSetCard(0x84) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BATTLIN_BOXER) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -51,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c5361816.lua b/official/c5361816.lua index 25922e852b..4757149b2d 100644 --- a/official/c5361816.lua +++ b/official/c5361816.lua @@ -1,6 +1,5 @@ --聖騎士ペリノア --Noble Knight Pellinore - local s,id=GetID() function s.initial_effect(c) --Destroy 1 "Noble Arms" equipped to this card and 1 of opponent's monsters @@ -15,10 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x207a} - +s.listed_series={SET_NOBLE_ARMS} function s.desfilter(c,g) - return c:IsFaceup() and c:IsSetCard(0x207a) and g:IsContains(c) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_ARMS) and g:IsContains(c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -43,7 +41,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c53618293.lua b/official/c53618293.lua index a2aed226c6..db2b4dcca0 100644 --- a/official/c53618293.lua +++ b/official/c53618293.lua @@ -1,7 +1,6 @@ --聖蔓の乙女 --Sunvine Maiden --Scripted by Eerie Code, anime script by MLD - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -27,8 +26,7 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0x1157,0x2157} - +s.listed_series={SET_SUNAVALON,SET_SUNVINE} function s.tfilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) end @@ -48,5 +46,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,c) - return c:IsFaceup() and c:IsSpellTrap() and (c:IsSetCard(0x1157) or c:IsSetCard(0x2157)) + return c:IsFaceup() and c:IsSpellTrap() and c:IsSetCard({SET_SUNAVALON,SET_SUNVINE}) end \ No newline at end of file diff --git a/official/c53620899.lua b/official/c53620899.lua index 0bec088bcc..475087c1dc 100644 --- a/official/c53620899.lua +++ b/official/c53620899.lua @@ -30,13 +30,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)~=0 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -44,4 +44,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c53623827.lua b/official/c53623827.lua index 8ba98249d4..99f25ee27d 100644 --- a/official/c53623827.lua +++ b/official/c53623827.lua @@ -1,4 +1,5 @@ --トップ・ランナー +--Top Runner local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -9,4 +10,4 @@ function s.initial_effect(c) e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SYNCHRO)) e1:SetValue(600) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c53624265.lua b/official/c53624265.lua index 736dee0c29..ec66c57006 100644 --- a/official/c53624265.lua +++ b/official/c53624265.lua @@ -1,5 +1,5 @@ --破械童子ラキア ---Hakai Douji Rakia +--Unchained Twins - Rakea --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x130} +s.listed_series={SET_UNCHAINED} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) end @@ -46,14 +46,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) - Duel.RegisterEffect(e2,tp) + Duel.RegisterEffect(e2,tp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end @@ -66,18 +66,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and not (re and re:GetHandler():IsCode(id)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53656677.lua b/official/c53656677.lua index 0014ea04bd..e9dbf5cb05 100644 --- a/official/c53656677.lua +++ b/official/c53656677.lua @@ -40,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -48,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetLabelObject(tc) c:RegisterEffect(e2) else @@ -57,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c53666449.lua b/official/c53666449.lua index 156b0f3425..0f40e07b7d 100644 --- a/official/c53666449.lua +++ b/official/c53666449.lua @@ -31,7 +31,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local rc=re:GetHandler() if not rc then return end @@ -42,4 +42,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53670497.lua b/official/c53670497.lua index 931cffd0cf..2f57ab9c54 100644 --- a/official/c53670497.lua +++ b/official/c53670497.lua @@ -1,4 +1,5 @@ --復活の聖刻印 +--Hieratic Seal From the Ashes local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,12 +33,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.filter1(c) - return c:IsSetCard(0x69) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_HIERATIC) and c:IsMonster() and c:IsAbleToGrave() end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x69) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_HIERATIC) and c:IsMonster() end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -52,7 +53,7 @@ function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end e:SetLabel(1) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,7 +66,7 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) else Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -77,7 +78,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) else local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_REMOVED,0,1,1,nil) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -85,7 +86,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HIERATIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -100,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53678698.lua b/official/c53678698.lua index 947a4334cb..221c07ab6d 100644 --- a/official/c53678698.lua +++ b/official/c53678698.lua @@ -36,10 +36,10 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c,tp) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_DESTROY) + and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and c:IsReason(REASON_DESTROY) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -58,7 +58,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.filter(c) - return c:IsSetCard(0x88) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_BUJIN) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -74,11 +74,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.rfilter(c,tp) return c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_HAND) - and c:IsSetCard(0x88) and c:IsMonster() + and c:IsSetCard(SET_BUJIN) and c:IsMonster() end function s.regcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.rfilter,1,nil,tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) -end + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c5368615.lua b/official/c5368615.lua index 16154ad304..0fdbecafa2 100644 --- a/official/c5368615.lua +++ b/official/c5368615.lua @@ -1,8 +1,9 @@ --スチームジャイロイド +--Steam Gyroid local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,18325492,44729197) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID \ No newline at end of file diff --git a/official/c53693416.lua b/official/c53693416.lua index 9836eb3416..4592c7df9b 100644 --- a/official/c53693416.lua +++ b/official/c53693416.lua @@ -1,4 +1,5 @@ --イーグル・アイ +--Eagle Eye local s,id=GetID() function s.initial_effect(c) --summon success @@ -13,4 +14,4 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) end function s.chlimit(re,rp,tp) return not re:GetHandler():IsTrap() or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c53701259.lua b/official/c53701259.lua index ad016f4cd7..add43cc959 100644 --- a/official/c53701259.lua +++ b/official/c53701259.lua @@ -99,7 +99,7 @@ function s.recop1(e,tp,eg,ep,ev,re,r,rp) local sum=g:GetSum(s.sum) Duel.Hint(HINT_CARD,0,id) if Duel.Recover(tp,sum,REASON_EFFECT)~=0 then - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end end end @@ -121,11 +121,11 @@ function s.recop2(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(0) Duel.Hint(HINT_CARD,0,id) if Duel.Recover(tp,rec,REASON_EFFECT)~=0 then - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and rp==1-tp and s.sbcount(tp)>1 + return re:IsMonsterEffect() and rp==1-tp and s.sbcount(tp)>1 and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE end function s.disop(e,tp,eg,ep,ev,re,r,rp) @@ -138,7 +138,7 @@ function s.rmtg(e,c) return c:IsMonster() and c:GetOwner()~=e:GetHandlerPlayer() and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLevel,10),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsLevel,10),tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) return c:IsTrap() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHand() @@ -147,7 +147,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -157,4 +157,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c53701457.lua b/official/c53701457.lua index 6189c71159..5547f0cf5f 100644 --- a/official/c53701457.lua +++ b/official/c53701457.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EVENT_BATTLE_DAMAGE) e3:SetCondition(s.damcon) - e3:SetCost(s.damcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -41,10 +41,6 @@ end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) if chk==0 then return ct>0 end @@ -57,4 +53,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*500 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53714009.lua b/official/c53714009.lua index 4ac4710402..1b5233c0ac 100644 --- a/official/c53714009.lua +++ b/official/c53714009.lua @@ -1,4 +1,5 @@ --フレムベル・ウルキサス +--Flamvell Uruquizas local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,6 +30,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c5371656.lua b/official/c5371656.lua index 0fe4a7948a..c30eb55cc1 100644 --- a/official/c5371656.lua +++ b/official/c5371656.lua @@ -1,4 +1,5 @@ --魂喰らいの魔刀 +--Sword of the Soul-Eater local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,0,s.filter,nil,s.cost,s.target,s.operation) @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c53724621.lua b/official/c53724621.lua index 145b51633e..1b8252d33c 100644 --- a/official/c53724621.lua +++ b/official/c53724621.lua @@ -1,4 +1,5 @@ --EMギタートル +--Performapal Guitartle local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -25,9 +26,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_PENDULUM) and re:GetHandler():IsSetCard(0x9f) and e:GetHandler()~=re:GetHandler() + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_PENDULUM) and re:GetHandler():IsSetCard(SET_PERFORMAPAL) and e:GetHandler()~=re:GetHandler() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -50,10 +51,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c5373478.lua b/official/c5373478.lua index fb09ca21e9..59740411ce 100644 --- a/official/c5373478.lua +++ b/official/c5373478.lua @@ -1,4 +1,5 @@ --サイバー・ドラゴン・ツヴァイ +--Cyber Dragon Zwei local s,id=GetID() function s.initial_effect(c) --atkup @@ -50,7 +51,7 @@ function s.cdop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c53742162.lua b/official/c53742162.lua index 2d0fedfceb..062afe5b72 100644 --- a/official/c53742162.lua +++ b/official/c53742162.lua @@ -1,14 +1,14 @@ --- 氷水浸蝕 --- Icejade Erosion --- Scripted by Hatter +--氷水浸蝕 +--Icejade Erosion +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - -- Negate + --Negate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE) @@ -21,7 +21,7 @@ function s.initial_effect(c) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) - -- Add to hand or Special Summon + --Add to hand or Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) @@ -35,16 +35,16 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x16e} +s.listed_series={SET_ICEJADE} function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsNegatable() end if chk==0 then - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x16e),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICEJADE),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) - local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x16e),tp,LOCATION_MZONE,0,nil) + local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ICEJADE),tp,LOCATION_MZONE,0,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,1-tp,LOCATION_ONFIELD) end @@ -52,23 +52,23 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dg=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,0x16e),tp,LOCATION_MZONE,0,1,1,nil) + local dg=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_ICEJADE),tp,LOCATION_MZONE,0,1,1,nil) if #dg<=0 or Duel.Destroy(dg,REASON_EFFECT)<=0 then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) and not tc:IsDisabled() then - -- Negate effects + --Negate effects Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -80,7 +80,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and eg:IsExists(s.thconfilter,1,nil,tp) end function s.thfilter(c,ft,e,tp) - return c:IsMonster() and c:IsSetCard(0x16e) + return c:IsMonster() and c:IsSetCard(SET_ICEJADE) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -102,4 +102,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,2)) -end +end \ No newline at end of file diff --git a/official/c53754104.lua b/official/c53754104.lua index c46779ab41..18e02e7069 100644 --- a/official/c53754104.lua +++ b/official/c53754104.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -29,10 +29,6 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c5376159.lua b/official/c5376159.lua index 6606484cc9..dd7d6cb9fd 100644 --- a/official/c5376159.lua +++ b/official/c5376159.lua @@ -67,7 +67,7 @@ function s.efilter(e,te) end function s.thcfilter(c,tp) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) - and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + and c:IsControler(tp) and c:IsSynchroSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thcfilter,1,nil,tp) diff --git a/official/c53765052.lua b/official/c53765052.lua index 8c3592eb7b..1ecc9bf93e 100644 --- a/official/c53765052.lua +++ b/official/c53765052.lua @@ -57,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53776969.lua b/official/c53776969.lua index 83d754475f..32e06d5067 100644 --- a/official/c53776969.lua +++ b/official/c53776969.lua @@ -35,7 +35,7 @@ function s.matfilter(c,sc,st,tp) end function s.thcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_LINK) and c:IsInExtraMZone() + return c:IsLinkSummoned() and c:IsInExtraMZone() end function s.thfilter(c) return c:IsCode(56063182) and c:IsAbleToHand() diff --git a/official/c53778229.lua b/official/c53778229.lua index 454aa25808..6b7ed4cdb4 100644 --- a/official/c53778229.lua +++ b/official/c53778229.lua @@ -1,4 +1,5 @@ --墓地封印 +--Silent Graveyard local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCode(EVENT_CHAIN_ACTIVATING) e1:SetOperation(s.disop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) @@ -26,4 +27,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if loc==LOCATION_GRAVE then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c53782828.lua b/official/c53782828.lua index 685267e442..49c2a25cb1 100644 --- a/official/c53782828.lua +++ b/official/c53782828.lua @@ -1,9 +1,9 @@ --- S-Force レトロアクティヴ --- S-Force Retroactive --- Scripted by Hatter +--S-Force レトロアクティヴ +--S-Force Retroactive +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Use as Link Material from hand + --Use as Link Material from hand local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_HAND) @@ -19,7 +19,7 @@ function s.initial_effect(c) if s.flagmap[c]==nil then s.flagmap[c]={} end - -- Special Summon 1 Level 2 or higher "S-Force" monster from the hand + --Special Summon 1 Level 2 or higher "S-Force" monster from the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Replace cost + --Replace cost local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetDescription(aux.Stringid(id,1)) diff --git a/official/c53792930.lua b/official/c53792930.lua index 45c7aca54d..8133d21fcf 100644 --- a/official/c53792930.lua +++ b/official/c53792930.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.HasFlagEffect(tp,id) end) diff --git a/official/c5380979.lua b/official/c5380979.lua index 6100265d45..8a100b7492 100644 --- a/official/c5380979.lua +++ b/official/c5380979.lua @@ -1,9 +1,9 @@ --- ウェルカム・ラビュリンス --- Welcome Labrynth --- Scripted by Hatter +--ウェルカム・ラビュリンス +--Welcome Labrynth +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon 1 "Labrynth" monster + --Special Summon 1 "Labrynth" monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Set itself if a monster leaves the field due to a Normal Trap's effect + --Set itself if a monster leaves the field due to a Normal Trap's effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_LEAVE_GRAVE) @@ -28,9 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x17f} +s.listed_series={SET_LABRYNTH} function s.spfilter(c,e,tp) - return c:IsSetCard(0x17f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LABRYNTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,22 +47,22 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) aux.WelcomeLabrynthTrapDestroyOperation(e,tp) if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end local c=e:GetHandler() - -- Cannot Special Summon from the Deck or Extra Deck, except Fiend monsters + --Cannot Special Summon from the Deck or Extra Deck, except Fiend monsters local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and not c:IsRace(RACE_FIEND) end) + e1:SetReset(RESET_PHASE|PHASE_END,2) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and not c:IsRace(RACE_FIEND) end) Duel.RegisterEffect(e1,tp) - -- Clock Lizard check + --Clock Lizard check aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_FIEND) end) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return aux.exccon(e,tp,eg,ep,ev,re,r,rp) and rp==tp and r&REASON_EFFECT==REASON_EFFECT - and re and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetOriginalType()==TYPE_TRAP + and re and re:IsTrapEffect() and re:GetHandler():GetOriginalType()==TYPE_TRAP and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_MZONE) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c53819028.lua b/official/c53819028.lua index 1309cebf60..2d6cd80e41 100644 --- a/official/c53819028.lua +++ b/official/c53819028.lua @@ -1,4 +1,5 @@ --捕食植物セラセニアント +--Predaplant Sarraceniant local s,id=GetID() function s.initial_effect(c) --special summon @@ -37,7 +38,7 @@ function s.initial_effect(c) e4:SetCondition(s.thcon) c:RegisterEffect(e4) end -s.listed_series={0xf3} +s.listed_series={SET_PREDAP} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():GetControler()~=tp and Duel.GetAttackTarget()==nil @@ -71,7 +72,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xf3) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_PREDAP) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -84,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c53819808.lua b/official/c53819808.lua index abaff82d05..b64e455a52 100644 --- a/official/c53819808.lua +++ b/official/c53819808.lua @@ -2,7 +2,7 @@ --Temple of the Six local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x3) + c:EnableCounterPermit(COUNTER_BUSHIDO) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -27,16 +27,16 @@ function s.initial_effect(c) e4:SetValue(s.val) c:RegisterEffect(e4) end -s.listed_series={0x3d} -s.counter_place_list={0x3} +s.listed_series={SET_SIX_SAMURAI} +s.counter_place_list={COUNTER_BUSHIDO} function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3,1) + e:GetHandler():AddCounter(COUNTER_BUSHIDO,1) end end function s.val(e) - return e:GetHandler():GetCounter(0x3)*-100 + return e:GetHandler():GetCounter(COUNTER_BUSHIDO)*-100 end \ No newline at end of file diff --git a/official/c53828396.lua b/official/c53828396.lua index 8d7c0269fa..8350a1516e 100644 --- a/official/c53828396.lua +++ b/official/c53828396.lua @@ -1,4 +1,5 @@ --瞬着ボマー +--Adhesive Explosive local s,id=GetID() function s.initial_effect(c) --equip @@ -27,7 +28,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) --destroy&damage @@ -35,20 +36,20 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) return e:GetOwner()==c end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -65,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(ec,REASON_EFFECT)~=0 then else Duel.Destroy(c,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c53839837.lua b/official/c53839837.lua index c61f74196a..1f1b621048 100644 --- a/official/c53839837.lua +++ b/official/c53839837.lua @@ -1,4 +1,5 @@ --ヴァンパイア・ロード +--Vampire Lord local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -32,13 +33,13 @@ function s.initial_effect(c) end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 or rp==tp or not c:IsPreviousControler(tp) then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) or rp==tp or not c:IsPreviousControler(tp) then return end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -77,4 +78,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) elseif e:GetLabel()==1 then g=Duel.SelectMatchingCard(1-tp,s.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_SPELL) else g=Duel.SelectMatchingCard(1-tp,s.tgfilter,1-tp,LOCATION_DECK,0,1,1,nil,TYPE_TRAP) end Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53842431.lua b/official/c53842431.lua index a9a93bc428..986147a88f 100644 --- a/official/c53842431.lua +++ b/official/c53842431.lua @@ -54,13 +54,13 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x10d} +s.listed_series={SET_MYTHICAL_BEAST} s.listed_names={55424270} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) == 1 end function s.thfilter(c) - return (c:IsSetCard(0x10d) or c:IsCode(55424270)) and c:IsLevelBelow(7) + return (c:IsSetCard(SET_MYTHICAL_BEAST) or c:IsCode(55424270)) and c:IsLevelBelow(7) and c:IsType(TYPE_EFFECT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -81,7 +81,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,2) end end @@ -113,7 +113,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c53860621.lua b/official/c53860621.lua index 68ff519a48..e54401aaf5 100644 --- a/official/c53860621.lua +++ b/official/c53860621.lua @@ -54,12 +54,12 @@ function s.initial_effect(c) e6:SetOperation(s.retop) c:RegisterEffect(e6) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.eqlimit(e,c) - return c:IsSetCard(0x33) + return c:IsSetCard(SET_BLACKWING) end function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.eqfilter(chkc) end @@ -86,7 +86,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -103,4 +103,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c53871273.lua b/official/c53871273.lua index 50149ea1cf..f3cf5c016f 100644 --- a/official/c53871273.lua +++ b/official/c53871273.lua @@ -1,7 +1,6 @@ --混沌のヴァルキリア --Chaos Valkyria --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Cannot be normal summoned/set @@ -43,9 +42,9 @@ function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,12 +76,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c53890795.lua b/official/c53890795.lua index ba796c56a9..be1d234bda 100644 --- a/official/c53890795.lua +++ b/official/c53890795.lua @@ -1,4 +1,5 @@ --ロケット・ジャンパー +--Rocket Jumper local s,id=GetID() function s.initial_effect(c) --direct attack @@ -12,4 +13,4 @@ function s.dircon(e) local tp=e:GetHandler():GetControler() return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0 and not Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c53921056.lua b/official/c53921056.lua index 66339c3b15..efff317fbf 100644 --- a/official/c53921056.lua +++ b/official/c53921056.lua @@ -1,4 +1,5 @@ --氷結界の虎将 ガンターラ +--General Gantala of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.filter(c,e,tp) - return c:IsSetCard(0x2f) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICE_BARRIER) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c53923690.lua b/official/c53923690.lua index f6073692a1..8a2c75576d 100644 --- a/official/c53923690.lua +++ b/official/c53923690.lua @@ -1,4 +1,4 @@ --- +--オメガの裁き --Omega Judgment --scripted by Naim local s,id=GetID() @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -20,12 +20,12 @@ function s.tgfilter(c,e,tp) and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end local rg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_SZONE,LOCATION_ONFIELD,nil,e,tp) - if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end + if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end local tg=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_DESTROY) Duel.SetTargetCard(tg) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,3,0,0) @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c53927679.lua b/official/c53927679.lua index 3609fe307e..d3b1e6e9a8 100644 --- a/official/c53927679.lua +++ b/official/c53927679.lua @@ -1,4 +1,5 @@ --ファイヤー・トルーパー +--Fire Trooper local s,id=GetID() function s.initial_effect(c) --damage @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetTarget(s.tg) e1:SetOperation(s.op) @@ -19,10 +20,6 @@ function s.initial_effect(c) e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e3) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) diff --git a/official/c53932291.lua b/official/c53932291.lua index 71ffd35471..f800ac466a 100644 --- a/official/c53932291.lua +++ b/official/c53932291.lua @@ -17,12 +17,12 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.spfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) end @@ -32,12 +32,8 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -60,9 +56,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,tp,sumtp,sumpos) return c:GetAttribute()~=ATTRIBUTE_WIND -end +end \ No newline at end of file diff --git a/official/c53936268.lua b/official/c53936268.lua index e4ec8dd623..ad31da5626 100644 --- a/official/c53936268.lua +++ b/official/c53936268.lua @@ -22,17 +22,17 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.cfilter(c) - return c:IsSetCard(0x103) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + return c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) end function s.thfilter(c) - return c:IsSetCard(0x103) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ALTERGEIST) and c:IsMonster() and c:IsAbleToHand() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,e:GetHandler()) if g:GetFirst():IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,g) end @@ -50,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c53944920.lua b/official/c53944920.lua index fd51053ac7..82f838227f 100644 --- a/official/c53944920.lua +++ b/official/c53944920.lua @@ -1,4 +1,5 @@ --ジェネクス・ヒート +--Genex Furnace local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -18,4 +19,4 @@ function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.ntfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c53950487.lua b/official/c53950487.lua index 7ae0e7f5b6..9b21d78761 100644 --- a/official/c53950487.lua +++ b/official/c53950487.lua @@ -1,5 +1,5 @@ --- B・F-突撃のヴォウジェ --- Battlewasp - Halberd the Charge +--B・F-突撃のヴォウジェ +--Battlewasp - Halberd the Charge local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x12f} +s.listed_series={SET_BATTLEWASP} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local d=c:GetBattleTarget() @@ -46,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(d:GetAttack()/2) d:RegisterEffect(e1) end @@ -55,7 +55,7 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.damfilter(c) - return c:IsFaceup() and c:IsSetCard(0x12f) + return c:IsFaceup() and c:IsSetCard(SET_BATTLEWASP) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_MZONE,0,1,nil) end diff --git a/official/c53956001.lua b/official/c53956001.lua index 2b8a54a196..2c94e663e3 100644 --- a/official/c53956001.lua +++ b/official/c53956001.lua @@ -1,6 +1,5 @@ --曇りの天気模様 --The Weather Cloudy Canvas - local s,id=GetID() function s.initial_effect(c) --Can only control one @@ -29,11 +28,10 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} - +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) end @@ -58,14 +56,14 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Halve its ATK local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c53981499.lua b/official/c53981499.lua index e5d6c770bf..34f04a5246 100644 --- a/official/c53981499.lua +++ b/official/c53981499.lua @@ -1,4 +1,5 @@ --マイティ・ウォリアー +--Mighty Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -34,4 +35,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c53982768.lua b/official/c53982768.lua index 6050eb7784..e8c84dd8b1 100644 --- a/official/c53982768.lua +++ b/official/c53982768.lua @@ -1,4 +1,5 @@ --冥界の魔王 ハ・デス +--Dark Ruler Ha Des local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -28,11 +29,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c53989821.lua b/official/c53989821.lua index 1c273e5c1a..c6f4aa072b 100644 --- a/official/c53989821.lua +++ b/official/c53989821.lua @@ -1,4 +1,5 @@ --SPYRAL GEAR - Utility Wire +--SPYRAL GEAR - Utility Wire local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,6 +35,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5399521.lua b/official/c5399521.lua index 98dd268ffc..5bd16742cc 100644 --- a/official/c5399521.lua +++ b/official/c5399521.lua @@ -49,13 +49,13 @@ function s.initial_effect(c) e7:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e7) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.counter_place_list={0x35} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end @@ -73,7 +73,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.slcon(e) - return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x1066) + return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),SET_SYMPHONIC_WARRIOR) end function s.spcon(e,c) if c==nil then return true end @@ -89,9 +89,9 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c5402805.lua b/official/c5402805.lua index 3d22ade52d..9fb0ec26cc 100644 --- a/official/c5402805.lua +++ b/official/c5402805.lua @@ -1,4 +1,5 @@ --Skyforce Kishin +--Berserker of the Tenyi local s,id=GetID() function s.initial_effect(c) --link summon diff --git a/official/c54031490.lua b/official/c54031490.lua index c775662dfe..0fcb8b1d98 100644 --- a/official/c54031490.lua +++ b/official/c54031490.lua @@ -1,4 +1,5 @@ --紫炎の狼煙 +--Shien's Smoke Signal local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,10 +11,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.filter(c) local lv=c:GetLevel() - return c:IsSetCard(0x3d) and lv>0 and lv<4 and c:IsAbleToHand() + return c:IsSetCard(SET_SIX_SAMURAI) and lv>0 and lv<4 and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c54040221.lua b/official/c54040221.lua index 4a36a8b0c5..340e625763 100644 --- a/official/c54040221.lua +++ b/official/c54040221.lua @@ -1,4 +1,5 @@ --炎帝近衛兵 +--Royal Firestorm Guards local s,id=GetID() function s.initial_effect(c) --to deck and draw @@ -28,12 +29,12 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=4 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==4 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54040484.lua b/official/c54040484.lua index 05f09c2a70..2a09c702bc 100644 --- a/official/c54040484.lua +++ b/official/c54040484.lua @@ -41,14 +41,14 @@ function s.ctcheck(sg,e,tp) return sg:GetClassCount(Card.GetCode)==#sg and e:GetHandler():IsCanAddCounter(0x202,#sg) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) and e:GetHandler():IsCanAddCounter(0x202,1) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,0,0,0x202) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if #g==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,1,3,s.ctcheck,1,tp,HINTMSG_TOGRAVE) if #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then @@ -62,12 +62,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -80,4 +80,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveCounter(tp,0x202,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54048462.lua b/official/c54048462.lua index 9d1d652cfe..ff23d9e5b4 100644 --- a/official/c54048462.lua +++ b/official/c54048462.lua @@ -1,8 +1,9 @@ --魔轟神ヴァルキュルス +--Fabled Valkyrus local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x35),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FABLED),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --draw local e1=Effect.CreateEffect(c) @@ -17,13 +18,13 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.costfilter(c) return c:IsRace(RACE_FIEND) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -34,4 +35,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5405694.lua b/official/c5405694.lua index b7ff4da34c..d580f5ed0b 100644 --- a/official/c5405694.lua +++ b/official/c5405694.lua @@ -1,4 +1,5 @@ --カオス・ソルジャー +--Black Luster Soldier local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c54082269.lua b/official/c54082269.lua index e57026381f..be5779d561 100644 --- a/official/c54082269.lua +++ b/official/c54082269.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x33),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BLACKWING),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --immune local e1=Effect.CreateEffect(c) @@ -51,14 +51,14 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.counter_place_list={0x1002} -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end function s.acop(e,tp,eg,ep,ev,re,r,rp) local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local c=e:GetHandler() - if re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetCounter(0x1002)==0 and p~=tp and loc==LOCATION_MZONE and c:GetFlagEffect(1)>0 then + if re:IsMonsterEffect() and re:GetHandler():GetCounter(0x1002)==0 and p~=tp and loc==LOCATION_MZONE and c:GetFlagEffect(1)>0 then re:GetHandler():AddCounter(0x1002,1) end end @@ -92,5 +92,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c54088068.lua b/official/c54088068.lua index 8209807982..755cf13e6d 100644 --- a/official/c54088068.lua +++ b/official/c54088068.lua @@ -1,4 +1,5 @@ --剛鬼ヘッドバット +--Gouki Headbatt local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,10 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} function s.spcfilter(c) - return c:IsMonster() and c:IsSetCard(0xfc) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_GOUKI) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -39,7 +40,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0xfc) + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -58,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) end @@ -67,7 +68,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -80,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c54094821.lua b/official/c54094821.lua index cdbf778477..2580ba1440 100644 --- a/official/c54094821.lua +++ b/official/c54094821.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsRitualSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -24,13 +24,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) and Duel.GetCurrentPhase()<=PHASE_STANDBY then + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) return re:GetHandler():IsSpellTrap() -end +end \ No newline at end of file diff --git a/official/c54098121.lua b/official/c54098121.lua index 06c2a2ec96..3a67c9784b 100644 --- a/official/c54098121.lua +++ b/official/c54098121.lua @@ -1,4 +1,5 @@ --謎の傀儡師 +--Mysterious Puppeteer local s,id=GetID() function s.initial_effect(c) --recover @@ -29,4 +30,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54100561.lua b/official/c54100561.lua index 8f5797a00e..0580f46c22 100644 --- a/official/c54100561.lua +++ b/official/c54100561.lua @@ -1,11 +1,11 @@ --- ファドレミコード・ファンシア --- Fadoremichord Fancea --- scripted by Hatter +--ファドレミコード・ファンシア +--FaSolfachord Fancia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- pendulum summon + --pendulum summon Pendulum.AddProcedure(c) - -- cannot disable pendulum summon + --cannot disable pendulum summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTargetRange(1,0) e1:SetTarget(s.target) c:RegisterEffect(e1) - -- to extra + --to extra local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.tetg) e2:SetOperation(s.teop) c:RegisterEffect(e2) - -- destroy replace + --destroy replace local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_DESTROY_REPLACE) @@ -34,12 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.target(e,c) - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) + return c:IsPendulumSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) end function s.tefilter(c) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x164) and not c:IsCode(id) and not c:IsForbidden() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_SOLFACHORD) and not c:IsCode(id) and not c:IsForbidden() end function s.tetg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tefilter,tp,LOCATION_DECK,0,1,nil) end @@ -56,7 +56,7 @@ function s.repcon(e) end function s.filter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_PENDULUM) - and c:IsSetCard(0x164) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) + and c:IsSetCard(SET_SOLFACHORD) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -68,5 +68,5 @@ function s.repval(e,c) return s.filter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c54109233.lua b/official/c54109233.lua index c0689e09cc..08c71c72db 100644 --- a/official/c54109233.lua +++ b/official/c54109233.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) end) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) - eg:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + eg:GetFirst():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.filter(c) return c:IsLevelBelow(3) and c:GetFlagEffect(id)~=0 @@ -43,10 +43,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id+1)==0 end local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) - e:GetHandler():RegisterFlagEffect(id+1,RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,RESET_PHASE|PHASE_END,0,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54135423.lua b/official/c54135423.lua index f146b1e76c..ae83f7dfda 100644 --- a/official/c54135423.lua +++ b/official/c54135423.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe6) and c:IsLevelBelow(10) + return c:IsFaceup() and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsLevelBelow(10) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -45,18 +45,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) + aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c) - return not c:IsSetCard(0xe6) + return not c:IsSetCard(SET_FLOWER_CARDIAN) end function s.filter(c) - return c:IsSetCard(0xe6) and c:IsAbleToDeck() + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -69,12 +69,12 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=1 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==1 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5414777.lua b/official/c5414777.lua index c4f9298af8..353168b0d2 100644 --- a/official/c5414777.lua +++ b/official/c5414777.lua @@ -79,4 +79,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54149433.lua b/official/c54149433.lua index 0263fbf6da..40526d64bc 100644 --- a/official/c54149433.lua +++ b/official/c54149433.lua @@ -1,4 +1,5 @@ --炎王獣 ガルドニクス +--Fire King Avatar Garunix local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x81,0x1081} +s.listed_series={SET_FIRE_KING,SET_FIRE_KING_AVATAR} function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) + and c:IsReason(REASON_EFFECT) and c:IsSetCard(SET_FIRE_KING) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -49,7 +50,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousControler(tp) and rp~=tp and c:IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1081) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_KING_AVATAR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -63,4 +64,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54161401.lua b/official/c54161401.lua index e651c19057..f89a06cd9d 100644 --- a/official/c54161401.lua +++ b/official/c54161401.lua @@ -1,4 +1,5 @@ --ナチュル・ロック +--Naturia Rock local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c54175023.lua b/official/c54175023.lua index 6bd38eff61..69f9254c80 100644 --- a/official/c54175023.lua +++ b/official/c54175023.lua @@ -1,4 +1,5 @@ --ディメンション・ガーディアン +--Dimension Guardian local s,id=GetID() function s.initial_effect(c) aux.AddPersistentProcedure(c,0,aux.FilterBoolFunction(Card.IsPosition,POS_FACEUP_ATTACK)) @@ -29,4 +30,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54178050.lua b/official/c54178050.lua index 9a84dc37ef..750d55fde1 100644 --- a/official/c54178050.lua +++ b/official/c54178050.lua @@ -1,4 +1,5 @@ --竜の逆鱗 +--Dragon's Rage local s,id=GetID() function s.initial_effect(c) --activate @@ -14,4 +15,4 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON)) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c54178659.lua b/official/c54178659.lua index fa14f3bb60..24310b9ea0 100644 --- a/official/c54178659.lua +++ b/official/c54178659.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x109),3,3) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_THE_WEATHER),3,3) --disable special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -55,13 +55,9 @@ function s.initial_effect(c) e5:SetLabelObject(e4) c:RegisterEffect(e5) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.discon(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and Duel.GetCurrentChain()==0 and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return tp~=ep and Duel.GetCurrentChain()==0 and e:GetHandler():IsLinkSummoned() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -76,9 +72,9 @@ function s.spreg(e,tp,eg,ep,ev,re,r,rp) if not re then return end local c=e:GetHandler() local rc=re:GetHandler() - if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) then + if c:IsReason(REASON_COST) and rc:IsSetCard(SET_THE_WEATHER) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -98,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.eftg(e,c) local lg=e:GetHandler():GetLinkedGroup() - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and lg:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and lg:IsContains(c) end function s.discon2(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) diff --git a/official/c54185227.lua b/official/c54185227.lua index 24496b43b7..6621b8d042 100644 --- a/official/c54185227.lua +++ b/official/c54185227.lua @@ -25,14 +25,14 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x8,0x5008} +s.listed_series={SET_HERO,SET_VISION_HERO} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) and c:IsMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end @@ -47,12 +47,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,tp,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,sp) - return c:IsFaceup() and c:IsSetCard(0x5008) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,sp,true,false) + return c:IsFaceup() and c:IsSetCard(SET_VISION_HERO) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,sp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -70,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if ft>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end if ft<#sg then return end Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c54191698.lua b/official/c54191698.lua index a36aeb5e53..62c7afe8d0 100644 --- a/official/c54191698.lua +++ b/official/c54191698.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -31,10 +31,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=29 -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter1(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) end @@ -56,7 +52,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) end function s.spfilter2(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter3,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.spfilter3(c,e,tp,tc) return (c:IsAttribute(tc:GetAttribute()) or c:IsRace(tc:GetRace())) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -67,16 +63,16 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.spfilter2,tp,0,LOCATION_MZONE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.spfilter2,tp,0,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter3,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,tc) + local g=Duel.SelectMatchingCard(tp,s.spfilter3,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c54199839.lua b/official/c54199839.lua index a8a307d677..1552364fea 100644 --- a/official/c54199839.lua +++ b/official/c54199839.lua @@ -25,14 +25,14 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0x105) and c:IsDiscardable() + return c:IsSetCard(SET_METAPHYS) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -42,7 +42,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return c:IsMonster() and c:IsSetCard(0x105) and c:IsAbleToRemove() + return c:IsMonster() and c:IsSetCard(SET_METAPHYS) and c:IsAbleToRemove() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) @@ -57,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x105) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_METAPHYS) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c54239282.lua b/official/c54239282.lua index 9ae225dd87..d2a6b876fa 100644 --- a/official/c54239282.lua +++ b/official/c54239282.lua @@ -18,8 +18,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,1,PLAYER_ALL,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.filter(c,ty) - return c:IsType(ty&0x7) and c:IsDiscardable(REASON_EFFECT) +function s.filter(c,typ) + return c:IsType(typ) and c:IsDiscardable(REASON_EFFECT) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -27,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local oc=g:RandomSelect(tp,1):GetFirst() Duel.ConfirmCards(tp,oc) - local b=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,oc:GetType()) + local b=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,oc:GetMainCardType()) and Duel.IsPlayerCanDraw(tp,1) and c:IsRelateToEffect(e) local op=1 if b then @@ -36,9 +36,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) op=Duel.SelectOption(tp,aux.Stringid(id,1))+1 end if op==0 then - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,oc:GetType()) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,oc:GetMainCardType()) g:AddCard(oc) - if Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)==2 then + if Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD)==2 then Duel.BreakEffect() c:CancelToGrave() Duel.SendtoHand(c,1-tp,REASON_EFFECT) @@ -47,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else Duel.SetLP(tp,math.max(Duel.GetLP(tp)-1000,0)) end -end +end \ No newline at end of file diff --git a/official/c54241725.lua b/official/c54241725.lua index ef9a63ae17..0eca068d25 100644 --- a/official/c54241725.lua +++ b/official/c54241725.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_ATTACK+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_ATTACK|TIMING_END_PHASE) c:RegisterEffect(e1) --spsummon local e2=Effect.CreateEffect(c) @@ -29,19 +29,19 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e3:SetCost(s.spcost) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.tdfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToDeck() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -56,13 +56,13 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tg=Duel.GetTargetCards(e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end function s.cfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) @@ -74,17 +74,17 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,1000,2400,5,RACE_FAIRY,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,1000,2400,5,RACE_FAIRY,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,1000,2400,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,1000,2400,5,RACE_FAIRY,ATTRIBUTE_LIGHT) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_FAIRY) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c54248491.lua b/official/c54248491.lua index d747ea6e8e..8937c62a6f 100644 --- a/official/c54248491.lua +++ b/official/c54248491.lua @@ -1,4 +1,5 @@ --サクリファイス・スパイダー +--Relinquished Spider local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -16,10 +17,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,4,nil,RACE_INSECT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsPosition(POS_FACEUP_DEFENSE) end @@ -31,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54250060.lua b/official/c54250060.lua index 31bd0d5c65..8598d4b5f7 100644 --- a/official/c54250060.lua +++ b/official/c54250060.lua @@ -1,4 +1,5 @@ --召魔装着 +--Empowerment local s,id=GetID() function s.initial_effect(c) --activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON+RACE_WARRIOR+RACE_SPELLCASTER)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_DRAGON|RACE_WARRIOR|RACE_SPELLCASTER)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -41,13 +42,13 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0xca,0xcb} +s.listed_series={SET_EMPOWERED_WARRIOR,SET_AETHER} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xca) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EMPOWERED_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -64,16 +65,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,4,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,4,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,4,4,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,4,4,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xcb) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_AETHER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -87,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c54257392.lua b/official/c54257392.lua index 823599ff1c..104da59ae3 100644 --- a/official/c54257392.lua +++ b/official/c54257392.lua @@ -21,24 +21,23 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.drcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x154,0x155} - +s.listed_series={SET_LIL_LA,SET_EVIL_TWIN} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x154),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_LIL_LA),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.cfilter(c,tp) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_EFFECT) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,1-tp) and - Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x155),tp,LOCATION_MZONE,0,1,nil) + Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_EVIL_TWIN),tp,LOCATION_MZONE,0,1,nil) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end diff --git a/official/c54266211.lua b/official/c54266211.lua index 763906832c..5727093cc5 100644 --- a/official/c54266211.lua +++ b/official/c54266211.lua @@ -1,4 +1,5 @@ --エヴォルダー・ウルカノドン +--Evolsaur Vulcano local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,180,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,180,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,7 +32,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c54283059.lua b/official/c54283059.lua index 85caba53be..1021da906b 100644 --- a/official/c54283059.lua +++ b/official/c54283059.lua @@ -3,11 +3,11 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x3008),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_ELEMENTAL_HERO),aux.FALSE,s.fextra,Fusion.ShuffleMaterial) e1:SetCost(s.cost) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck),tp,LOCATION_REMOVED,0,nil) end @@ -17,7 +17,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(e) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) @@ -26,4 +26,4 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return e:GetLabelObject()~=se -end +end \ No newline at end of file diff --git a/official/c54289683.lua b/official/c54289683.lua index efd9a7364c..a7d4ded946 100644 --- a/official/c54289683.lua +++ b/official/c54289683.lua @@ -53,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local race=tc:GetRace() local att=tc:GetAttribute() local token=Duel.CreateToken(tp,TOKEN_OPTION) - tc:CreateRelation(token,RESET_EVENT+RESETS_STANDARD) + tc:CreateRelation(token,RESET_EVENT|RESETS_STANDARD) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -62,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.tokenatk) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -74,28 +74,28 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetValue(s.tokenlv) e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e3,true) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CHANGE_RACE) e4:SetValue(s.tokenrace) e4:SetLabelObject(tc) - e4:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e4,true) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) e5:SetValue(s.tokenatt) e5:SetLabelObject(tc) - e5:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e5,true) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_SELF_DESTROY) e6:SetCondition(s.tokendes) e6:SetLabelObject(tc) - e6:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e6:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e6,true) Duel.SpecialSummonComplete() else @@ -103,7 +103,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) tc:RegisterEffect(e1) end end @@ -124,4 +124,4 @@ function s.tokenatt(e,c) end function s.tokendes(e) return not e:GetLabelObject():IsRelateToCard(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c54306223.lua b/official/c54306223.lua index 8e7899c31a..7147055134 100644 --- a/official/c54306223.lua +++ b/official/c54306223.lua @@ -1,5 +1,5 @@ --ヴェノム・スワンプ ---Venom Swap +--Venom Swamp local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,10 +36,10 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x50} -s.counter_place_list={0x1009} +s.listed_series={SET_VENOM} +s.counter_place_list={COUNTER_VENOM} function s.atkval(e,c) - return c:GetCounter(0x1009)*-500 + return c:GetCounter(COUNTER_VENOM)*-500 end function s.acop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -47,9 +47,9 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) local tc=tg:GetFirst() for tc in aux.Next(tg) do - if tc:IsCanAddCounter(0x1009,1) and not tc:IsSetCard(0x50) then + if tc:IsCanAddCounter(COUNTER_VENOM,1) and not tc:IsSetCard(SET_VENOM) then local atk=tc:GetAttack() - tc:AddCounter(0x1009,1) + tc:AddCounter(COUNTER_VENOM,1) if atk>0 and tc:GetAttack()==0 then g:AddCard(tc) end @@ -70,4 +70,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54326448.lua b/official/c54326448.lua index c841f830d2..b6732a9ed9 100644 --- a/official/c54326448.lua +++ b/official/c54326448.lua @@ -1,4 +1,5 @@ --フレムベル・アーチャー +--Flamvell Archer local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.atop) c:RegisterEffect(e1) end -s.listed_series={0x2c} +s.listed_series={SET_FLAMVELL} function s.cfilter(c,tp) return c:IsFaceup() and c:IsRace(RACE_PYRO) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,c) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2c) + return c:IsFaceup() and c:IsSetCard(SET_FLAMVELL) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,tp) end @@ -35,7 +36,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c54334420.lua b/official/c54334420.lua index 8923c07202..0634032b32 100644 --- a/official/c54334420.lua +++ b/official/c54334420.lua @@ -1,5 +1,5 @@ --ふわんだりぃず×いぐるん ---Flundereeze x Eaglen +--Floowandereeze & Eglen --Logical Nonsense --Substitute ID local s,id=GetID() @@ -46,13 +46,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -77,7 +77,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) if not g:GetFirst():IsLocation(LOCATION_HAND) then return end --Normal summon 1 winged beast monster - local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if #sg1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() Duel.ShuffleHand(tp) @@ -103,4 +103,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54338958.lua b/official/c54338958.lua index 9e8f4bde50..c9838b390c 100644 --- a/official/c54338958.lua +++ b/official/c54338958.lua @@ -1,4 +1,5 @@ --インヴェルズの魔細胞 +--Steelswarm Cell local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,12 +31,12 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.sumlimit(e,c) - return not c:IsSetCard(0x100a) -end + return not c:IsSetCard(SET_STEELSWARM) +end \ No newline at end of file diff --git a/official/c54340229.lua b/official/c54340229.lua index b192babb8c..d3d252fb5f 100644 --- a/official/c54340229.lua +++ b/official/c54340229.lua @@ -1,7 +1,6 @@ --聖天樹の開花 --Sunavalon Bloom --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -66,7 +65,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(lg:GetSum(Card.GetAttack)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c54343893.lua b/official/c54343893.lua index b3f5819441..67053411bf 100644 --- a/official/c54343893.lua +++ b/official/c54343893.lua @@ -1,4 +1,5 @@ --バイス・ドラゴン +--Vice Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,12 +23,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE&~RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(1200) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c54351224.lua b/official/c54351224.lua index 26bea22f80..6b8f87fd09 100644 --- a/official/c54351224.lua +++ b/official/c54351224.lua @@ -1,4 +1,5 @@ --リチュアル・ウェポン +--Ritual Weapon local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.filter(c) return c:IsType(TYPE_RITUAL) and c:IsLevelBelow(6) -end +end \ No newline at end of file diff --git a/official/c54358015.lua b/official/c54358015.lua index 7965d14aa1..52516e81ad 100644 --- a/official/c54358015.lua +++ b/official/c54358015.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -36,11 +36,7 @@ function s.initial_effect(c) e3:SetValue(aux.indoval) c:RegisterEffect(e3) end -s.listed_series={0x7b} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_GALAXY} function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -58,5 +54,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,c) - return c:IsSetCard(0x7b) and c~=e:GetHandler() -end + return c:IsSetCard(SET_GALAXY) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c54359696.lua b/official/c54359696.lua index 0965d7bda4..df366aae9b 100644 --- a/official/c54359696.lua +++ b/official/c54359696.lua @@ -1,4 +1,5 @@ --魔導術士 ラパンデ +--Stoic of Prophecy local s,id=GetID() function s.initial_effect(c) --special summon @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6e} +s.listed_series={SET_PROPHECY} function s.filter(c) - return c:IsSetCard(0x6e) and c:GetLevel()==3 and c:IsAbleToHand() + return c:IsSetCard(SET_PROPHECY) and c:GetLevel()==3 and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c54360049.lua b/official/c54360049.lua index 1349460bea..fcc1e685f9 100644 --- a/official/c54360049.lua +++ b/official/c54360049.lua @@ -1,4 +1,5 @@ --カトブレパスと運命の魔女 +--Catoblepas and the Witch of Fate local s,id=GetID() function s.initial_effect(c) --destroy @@ -17,9 +18,9 @@ function s.cfilter(c) return c:GetTextAttack()==-2 and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,tp) @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54366836.lua b/official/c54366836.lua index f4d34e9715..c584e4dd53 100644 --- a/official/c54366836.lua +++ b/official/c54366836.lua @@ -66,9 +66,9 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) end function s.indcon(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c54374642.lua b/official/c54374642.lua index 70faaa082d..ed85741310 100644 --- a/official/c54374642.lua +++ b/official/c54374642.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.filter(c) - return c:IsSetCard(0x135) and c:IsLinkAbove(3) and c:IsFaceup() and c:GetSequence()>4 + return c:IsSetCard(SET_IGNISTER) and c:IsLinkAbove(3) and c:IsFaceup() and c:GetSequence()>4 end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(0) if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.BreakEffect() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end -end +end \ No newline at end of file diff --git a/official/c5438492.lua b/official/c5438492.lua index c0b662c2ca..db3d39b544 100644 --- a/official/c5438492.lua +++ b/official/c5438492.lua @@ -1,4 +1,5 @@ --荒野の女戦士 +--Warrior Lady of the Wasteland local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c54387923.lua b/official/c54387923.lua index 2f8e66e514..1ff2a667e8 100644 --- a/official/c54387923.lua +++ b/official/c54387923.lua @@ -1,18 +1,18 @@ --- シドレミコード・ビューティア --- Sidoremichord Beautea --- scripted by Hatter +--シドレミコード・ビューティア +--TiSolfachord Beautia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- pendulum + --pendulum Pendulum.AddProcedure(c) - -- cannot activate s/t on pendulum summon + --cannot activate s/t on pendulum summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_PZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetOperation(s.sucop) c:RegisterEffect(e1) - -- register banish effect + --register banish effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_QUICK_O) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) - -- destroy on battle + --destroy on battle local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DESTROY) @@ -35,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.sucfilter(c,tp) - return c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsPendulumSummoned() end function s.sucop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.sucfilter,1,nil,tp) then @@ -45,7 +45,7 @@ function s.sucop(e,tp,eg,ep,ev,re,r,rp) end end function s.chainlm(e,rp,tp) - return tp==rp or (e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)) + return tp==rp or (e:IsSpellTrapEffect() and not e:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.filter(c,st) return c:IsFaceup() and ((c:IsMonster() and c:IsType(TYPE_EFFECT)) or (st and c:IsSpellTrap())) @@ -60,13 +60,13 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - -- banish it if it leaves the field + --banish it if it leaves the field local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT|RESET_PHASE|PHASE_END) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end @@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5439384.lua b/official/c5439384.lua index be96b739e3..1b77c8ddf1 100644 --- a/official/c5439384.lua +++ b/official/c5439384.lua @@ -1,5 +1,5 @@ --炎雄爆誕 ---Explosive Birth of the Flame Champion +--Birth of the Prominence Flame --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.rmfilter1(c,e,tp) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDefense(200) and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() - and Duel.IsExistingMatchingCard(s.rmfilter2,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,e,tp,c:GetOriginalLevel()) and aux.SpElimFilter(c,true) + and Duel.IsExistingMatchingCard(s.rmfilter2,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil,e,tp,c:GetOriginalLevel()) and aux.SpElimFilter(c,true) end function s.rmfilter2(c,e,tp,lv) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDefense(200) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c54401832.lua b/official/c54401832.lua index 2aa100fbfb..2e9a6be7b7 100644 --- a/official/c54401832.lua +++ b/official/c54401832.lua @@ -1,9 +1,10 @@ --メタルフォーゼ・カーディナル +--Metalfoes Crimsonite local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe1),1,aux.FilterBoolFunction(Card.IsAttackBelow,3000),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_METALFOES),1,aux.FilterBoolFunction(Card.IsAttackBelow,3000),2) end -s.listed_series={0xe1} -s.material_setcode=0xe1 +s.listed_series={SET_METALFOES} +s.material_setcode=SET_METALFOES \ No newline at end of file diff --git a/official/c54407825.lua b/official/c54407825.lua index d89e6ff676..afced43af9 100644 --- a/official/c54407825.lua +++ b/official/c54407825.lua @@ -36,13 +36,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TO_GRAVE) e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -50,6 +50,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,1)) e2:SetCode(EFFECT_CANNOT_DISCARD_DECK) e2:SetTargetRange(1,1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c54408264.lua b/official/c54408264.lua index e94290d747..def6e4b04c 100644 --- a/official/c54408264.lua +++ b/official/c54408264.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={99426088} -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.filter(c) - return ((c:IsMonster() and (c:IsType(TYPE_NORMAL) or c:IsSetCard(0x167))) or c:IsCode(99426088)) and c:IsAbleToDeck() + return ((c:IsMonster() and (c:IsType(TYPE_NORMAL) or c:IsSetCard(SET_MAGIKEY))) or c:IsCode(99426088)) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -44,8 +44,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.etg(e,c) - return c:IsSetCard(0x167) or (c:IsType(TYPE_NORMAL) and not c:IsType(TYPE_TOKEN)) + return c:IsSetCard(SET_MAGIKEY) or (c:IsType(TYPE_NORMAL) and not c:IsType(TYPE_TOKEN)) end function s.efilter(e,re) return re==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c54415063.lua b/official/c54415063.lua index 11dfc4e193..7d67a42b7e 100644 --- a/official/c54415063.lua +++ b/official/c54415063.lua @@ -1,4 +1,5 @@ --ハーピィ・レディ3 +--Harpie Lady 3 local s,id=GetID() function s.initial_effect(c) --atk limit @@ -17,6 +18,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,2) bc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c54423935.lua b/official/c54423935.lua index fccbef5f1b..50cf4f72a9 100644 --- a/official/c54423935.lua +++ b/official/c54423935.lua @@ -10,12 +10,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xba) + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,cd) @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabel(sc:GetFieldID()) e1:SetCondition(s.imcon) e1:SetValue(aux.imval1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Cannot be targeted by opponent's card effects local e2=e1:Clone() diff --git a/official/c54446813.lua b/official/c54446813.lua index e1212883f0..814bc53b1f 100644 --- a/official/c54446813.lua +++ b/official/c54446813.lua @@ -8,9 +8,9 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) --search @@ -21,13 +21,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local b=a:GetBattleTarget() @@ -36,14 +36,10 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if a and b then local dif=b:GetAttack()-a:GetAttack() return a:GetControler()~=b:GetControler() and a~=e:GetHandler() - and a:IsSetCard(0x11a) and a:IsRelateToBattle() + and a:IsSetCard(SET_DINOWRESTLER) and a:IsRelateToBattle() and Duel.GetAttackTarget()~=nil and dif>=0 else return false end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local a=Duel.GetAttacker() @@ -54,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -62,15 +58,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetValue(HALF_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.thfilter(c) - return c:IsSetCard(0x11a) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DINOWRESTLER) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -83,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c54447022.lua b/official/c54447022.lua index 6f8f365292..5ee4dfb843 100644 --- a/official/c54447022.lua +++ b/official/c54447022.lua @@ -21,7 +21,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SetLP(tp,Duel.GetLP(tp)-ct*1000) -end +end \ No newline at end of file diff --git a/official/c54451023.lua b/official/c54451023.lua index d5edf63b8c..95931f6cf3 100644 --- a/official/c54451023.lua +++ b/official/c54451023.lua @@ -1,4 +1,5 @@ --植物連鎖 +--Plant Food Chain local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -25,9 +26,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_PLANT) end @@ -42,14 +40,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -57,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -67,7 +65,7 @@ function s.eqlimit(e,c) return c:GetControler()==e:GetOwnerPlayer() and c:IsRace(RACE_PLANT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetReason()&0x41==0x41 and e:GetHandler():GetEquipTarget() + return e:GetHandler():GetReason()&(REASON_DESTROY|REASON_EFFECT)==(REASON_DESTROY|REASON_EFFECT) and e:GetHandler():GetEquipTarget() end function s.spfilter(c,e,tp) return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -82,7 +80,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54455435.lua b/official/c54455435.lua index 186115f30f..c243141c7f 100644 --- a/official/c54455435.lua +++ b/official/c54455435.lua @@ -1,4 +1,5 @@ --ガスタの巫女 ウィンダ +--Winda, Priestess of Gusto local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousControler(tp) and c==Duel.GetAttackTarget() and Duel.GetAttacker():IsControler(1-tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54455664.lua b/official/c54455664.lua index 0eeff47a32..39470fa4ee 100644 --- a/official/c54455664.lua +++ b/official/c54455664.lua @@ -1,4 +1,5 @@ --ドラグニティ-ブラックスピア +--Dragunity Brandistock local s,id=GetID() function s.initial_effect(c) --Double Attack @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c54458867.lua b/official/c54458867.lua index e98827db8b..7386381186 100644 --- a/official/c54458867.lua +++ b/official/c54458867.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.ddfilter(c) - return c:IsFaceup() and c:IsSetCard(0x102) + return c:IsFaceup() and c:IsSetCard(SET_ROKKET) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ddfilter(chkc) end diff --git a/official/c54475145.lua b/official/c54475145.lua index 0fef5fa268..e477c7a6de 100644 --- a/official/c54475145.lua +++ b/official/c54475145.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -53,11 +53,6 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterFlagEffect(rp,id,0,0,0) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsCode(CARD_MILLENNIUM_CROSS) and c:IsAbleToHand() end diff --git a/official/c54484652.lua b/official/c54484652.lua index 9d06d6004f..596fd41dae 100644 --- a/official/c54484652.lua +++ b/official/c54484652.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} s.listed_names={14094090,id} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -52,18 +52,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) or (rp~=tp and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xbd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAIA_THE_FIERCE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54485355.lua b/official/c54485355.lua index 6b89233a36..d4d16ab22b 100644 --- a/official/c54485355.lua +++ b/official/c54485355.lua @@ -1,7 +1,6 @@ --昇華騎士-エクスパラディン --Sublimation Knight --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Equip 1 FIRE warrior or gemini monster from hand or deck to this card @@ -49,8 +48,8 @@ function s.filter(c) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.equipop(c,e,tp,tc) if not c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) then return end @@ -58,7 +57,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) end @@ -66,7 +65,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if c:IsFaceup() and c:IsRelateToEffect(e) then s.equipop(c,e,tp,tc) @@ -110,7 +109,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) for tc in g:Iter() do if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then tc:EnableGeminiStatus() - tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,64) + tc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,64) end end Duel.SpecialSummonComplete() diff --git a/official/c54490275.lua b/official/c54490275.lua index 14e5b9450f..26cb382344 100644 --- a/official/c54490275.lua +++ b/official/c54490275.lua @@ -1,6 +1,5 @@ --ゴーストリックの雪女 --Ghostrick Yuki-onna - local s,id=GetID() function s.initial_effect(c) --Cannot be normal summoned if player controls no "Ghostrick" monster @@ -29,10 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.posop2) c:RegisterEffect(e3) end -s.listed_series={0x8d} - +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -40,7 +38,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -69,7 +67,7 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c54493213.lua b/official/c54493213.lua index d03db64d8b..a2337139ca 100644 --- a/official/c54493213.lua +++ b/official/c54493213.lua @@ -18,4 +18,4 @@ function s.filter(c) end function s.value(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*100 -end +end \ No newline at end of file diff --git a/official/c54497620.lua b/official/c54497620.lua index 5ec7bb72eb..77ca510a89 100644 --- a/official/c54497620.lua +++ b/official/c54497620.lua @@ -1,4 +1,5 @@ --ガジェット・ドライバー +--Gadget Driver local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -8,18 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x26} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_MORPHTRONIC} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) + return c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,4 +32,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(s.tfilter,nil,e) Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) -end +end \ No newline at end of file diff --git a/official/c54498517.lua b/official/c54498517.lua index 2652969cca..b68e6e39fc 100644 --- a/official/c54498517.lua +++ b/official/c54498517.lua @@ -1,12 +1,12 @@ --- ギガンティック・スプライト --- Gigantic Splight --- Scripted by Hatter +--ギガンティック・スプライト +--Gigantic Spright +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Level 2 monsters + --2 Level 2 monsters Xyz.AddProcedure(c,nil,2,2) - -- Can use Link 2 monsters as Level 2 materials + --Can use Link 2 monsters as Level 2 materials local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) @@ -16,7 +16,7 @@ function s.initial_effect(c) e0:SetTarget(function(e,c) return c:IsLink(2) end) e0:SetValue(function(e,_,rc) return rc==e:GetHandler() and 2 or 0 end) c:RegisterEffect(e0) - -- Double own ATK + --Double own ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -25,7 +25,7 @@ function s.initial_effect(c) e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_EXTRA) end) e1:SetValue(function(_,c) return c:GetBaseAttack()*2 end) c:RegisterEffect(e1) - -- Special Summon 1 Level 2 monster + --Special Summon 1 Level 2 monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end - -- Cannot Special Summon monsters, except Level/Rank/Link 2 monsters + --Cannot Special Summon monsters, except Level/Rank/Link 2 monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) @@ -61,6 +61,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,1) e1:SetTarget(function(_,c) return not (c:IsLevel(2) or c:IsRank(2) or c:IsLink(2)) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c54507222.lua b/official/c54507222.lua index 36bbc0981a..ceb149f0c8 100644 --- a/official/c54507222.lua +++ b/official/c54507222.lua @@ -1,4 +1,5 @@ --ギャラクシー・ワーム +--Galaxy Worm local s,id=GetID() function s.initial_effect(c) --spsummon @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x7b} +s.listed_series={SET_GALAXY} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x7b) and c:IsLevelBelow(3) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GALAXY) and c:IsLevelBelow(3) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,13 +33,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c54512827.lua b/official/c54512827.lua index 8ced950a75..b5ae1cf773 100644 --- a/official/c54512827.lua +++ b/official/c54512827.lua @@ -1,4 +1,5 @@ --ゴーストリック・ランタン +--Ghostrick Lantern local s,id=GetID() function s.initial_effect(c) --summon limit @@ -38,9 +39,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -48,7 +49,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -63,7 +64,7 @@ function s.spcon1(e,tp,eg,ep,ev,re,r,rp) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x8d) + return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(SET_GHOSTRICK) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -78,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,c) end end -end +end \ No newline at end of file diff --git a/official/c54514594.lua b/official/c54514594.lua index 4e8c76fb20..d0ba34693a 100644 --- a/official/c54514594.lua +++ b/official/c54514594.lua @@ -1,6 +1,5 @@ --ヴォルカニック・ハンマー --Volcanic Hammerer - local s,id=GetID() function s.initial_effect(c) --Inflict damage equal to number of "Volcanic" monsters in your GY x 200 @@ -15,8 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -s.listed_series={0x32} - +s.listed_series={SET_VOLCANIC} function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end --Cannot attack this turn @@ -25,11 +23,11 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.damfilter(c) - return c:IsMonster() and c:IsSetCard(0x32) + return c:IsMonster() and c:IsSetCard(SET_VOLCANIC) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -40,4 +38,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_GRAVE,0,nil)*200 Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54520292.lua b/official/c54520292.lua index 365937ba78..07f5d9983b 100644 --- a/official/c54520292.lua +++ b/official/c54520292.lua @@ -1,4 +1,5 @@ --コアキメイル・アイス +--Koa'ki Meiru Ice local s,id=GetID() function s.initial_effect(c) --cost @@ -25,13 +26,13 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() end function s.cfilter2(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsPublic() + return c:IsContinuousSpell() and not c:IsPublic() end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,7 +71,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -84,4 +85,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54525057.lua b/official/c54525057.lua index 3ac71becb5..8a88b3d1f7 100644 --- a/official/c54525057.lua +++ b/official/c54525057.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} s.listed_names={id} function s.spval(e,c) return 0,aux.GetMMZonesPointedTo(c:GetControler()) @@ -39,7 +39,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return aux.IsZone(e:GetHandler(),zone,tp) end function s.thfilter(c) - return c:IsSetCard(0x116) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_CRUSADIA) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c54527349.lua b/official/c54527349.lua index 7993c3e179..7cea58a291 100644 --- a/official/c54527349.lua +++ b/official/c54527349.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.target(target) return function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -44,7 +44,7 @@ function s.extrafil(e,tp,mg1) end function s.costfilter(c,target,e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabelObject(c) - local res=c:IsSetCard(0xef) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) + local res=c:IsSetCard(SET_DARKLORD) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and target(e,tp,eg,ep,ev,re,r,rp,0) e:SetLabelObject(nil) return res @@ -53,12 +53,12 @@ function s.cost(target) return function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then e:SetLabel(0) - local res=Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,target,e,tp,eg,ep,ev,re,r,rp,chk) + local res=Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,target,e,tp,eg,ep,ev,re,r,rp,chk) if res then e:SetLabel(1) end return res end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,target,e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,target,e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) e:SetLabelObject(g:GetFirst()) end @@ -73,4 +73,4 @@ function s.stage2(e,tc,tp,sg,chk) e:SetLabel(0) e:SetLabelObject(nil) end -end +end \ No newline at end of file diff --git a/official/c54529134.lua b/official/c54529134.lua index 5ef9034195..5088204886 100644 --- a/official/c54529134.lua +++ b/official/c54529134.lua @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.filter1(c,e,tp) - return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(0x119) + return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_SALAMANGREAT) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.filter2(c,e,tp,mc) - return c:IsSetCard(0x119) and mc:IsCanBeLinkMaterial(c,tp) and c:IsLinkMonster() and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c:IsSetCard(SET_SALAMANGREAT) and mc:IsCanBeLinkMaterial(c,tp) and c:IsLinkMonster() and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCode(mc:GetCode()) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c54537489.lua b/official/c54537489.lua index 31fa0c67cc..4221038347 100644 --- a/official/c54537489.lua +++ b/official/c54537489.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) end s.listed_names={54537489} function s.splimit(e,se,sp,st) - return se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsRace(RACE_WYRM) + return se:IsMonsterEffect() and se:GetHandler():IsRace(RACE_WYRM) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetLevel()>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54539105.lua b/official/c54539105.lua index 646a91e989..ee40d7e0ef 100644 --- a/official/c54539105.lua +++ b/official/c54539105.lua @@ -1,5 +1,6 @@ --ライオンの儀式 +--War-Lion Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,33951077) -end +end \ No newline at end of file diff --git a/official/c54541900.lua b/official/c54541900.lua index f6cc8b9d69..394d17e004 100644 --- a/official/c54541900.lua +++ b/official/c54541900.lua @@ -1,7 +1,8 @@ --カルボナーラ戦士 +--Karbonala Warrior local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,56342351,92731455) -end +end \ No newline at end of file diff --git a/official/c54562327.lua b/official/c54562327.lua index b04772d0c0..f759d0734a 100644 --- a/official/c54562327.lua +++ b/official/c54562327.lua @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) aux.DelayedOperation(tc,PHASE_END,id,e,tp,function(ag) Duel.SendtoHand(ag,nil,REASON_EFFECT) end,nil,0,1,aux.Stringid(id,1)) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c54563536.lua b/official/c54563536.lua index 8236aaa22f..4c2d3b9003 100644 --- a/official/c54563536.lua +++ b/official/c54563536.lua @@ -9,10 +9,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop1) c:RegisterEffect(e1) @@ -28,13 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x36} -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_MACHINA} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x36) + return c:IsFaceup() and c:IsSetCard(SET_MACHINA) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end @@ -49,7 +45,7 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -57,7 +53,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=eg:GetFirst() return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE) - and rc:IsFaceup() and rc:IsSetCard(0x36) and rc:IsControler(tp) + and rc:IsFaceup() and rc:IsSetCard(SET_MACHINA) and rc:IsControler(tp) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -67,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54564198.lua b/official/c54564198.lua index 7084b873d5..64dfab2400 100644 --- a/official/c54564198.lua +++ b/official/c54564198.lua @@ -1,9 +1,9 @@ --- 死者所生 --- Monster Rebirth --- Scripted by Hatter +--死者所生 +--Monster Rebirth +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,12 +16,12 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Register battle destructions + --Register battle destructions aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetCode(EVENT_BATTLE_DESTROYED) - ge1:SetOperation(function()Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)end) + ge1:SetOperation(function()Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1)end) Duel.RegisterEffect(ge1,0) end) end @@ -30,9 +30,9 @@ function s.spcostfilter(c) return c:IsCode(CARD_MONSTER_REBORN) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -51,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,SUMMON_WITH_MONSTER_REBORN,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54569495.lua b/official/c54569495.lua index 7109971c82..f13c34581b 100644 --- a/official/c54569495.lua +++ b/official/c54569495.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.damcon1) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.damtg1) e2:SetOperation(s.damop1) c:RegisterEffect(e2) diff --git a/official/c545781.lua b/official/c545781.lua index 449f3186b5..5cac77f054 100644 --- a/official/c545781.lua +++ b/official/c545781.lua @@ -1,7 +1,6 @@ --妖竜マハーマ --Mahaama the Fairy Dragon --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand diff --git a/official/c54578613.lua b/official/c54578613.lua index f709aca96e..0199010f84 100644 --- a/official/c54578613.lua +++ b/official/c54578613.lua @@ -25,12 +25,12 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x29) and ec:IsLevelBelow(3) and ec:IsRace(RACE_DRAGON) + return ec:IsControler(tp) and ec:IsSetCard(SET_DRAGUNITY) and ec:IsLevelBelow(3) and ec:IsRace(RACE_DRAGON) end function s.filter(c) - return c:IsSetCard(0x29) and c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsLevelBelow(3) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -49,7 +49,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -69,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54582424.lua b/official/c54582424.lua index 9cf65e0694..0a119f842e 100644 --- a/official/c54582424.lua +++ b/official/c54582424.lua @@ -1,4 +1,5 @@ --幻蝶の刺客オオルリ +--Blue Mountain Butterspy local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then c:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c54591086.lua b/official/c54591086.lua index 5587de914b..a856bd3767 100644 --- a/official/c54591086.lua +++ b/official/c54591086.lua @@ -1,4 +1,5 @@ --魔法除去細菌兵器 +--Virus Cannon local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54594017.lua b/official/c54594017.lua index a87283d8b9..8220f4695d 100644 --- a/official/c54594017.lua +++ b/official/c54594017.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) e2:SetCondition(s.descond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c54622031.lua b/official/c54622031.lua index 6d6f4e2ccc..6410f98c16 100644 --- a/official/c54622031.lua +++ b/official/c54622031.lua @@ -1,7 +1,8 @@ --金色の魔象 +--Great Mammoth of Goldfine local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,29491031,66672569) -end +end \ No newline at end of file diff --git a/official/c54629413.lua b/official/c54629413.lua index 02147cde97..af87217ee6 100644 --- a/official/c54629413.lua +++ b/official/c54629413.lua @@ -1,4 +1,5 @@ --ゲリラカイト +--Guerilla Kite local s,id=GetID() function s.initial_effect(c) --damage @@ -26,4 +27,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54631665.lua b/official/c54631665.lua index 2e57ff1d09..e86b367f93 100644 --- a/official/c54631665.lua +++ b/official/c54631665.lua @@ -1,4 +1,5 @@ --SPYRAL RESORT +--SPYRAL Resort local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,12 +38,12 @@ function s.initial_effect(c) e4:SetOperation(s.mtop) c:RegisterEffect(e4) end -s.listed_series={0xee} +s.listed_series={SET_SPYRAL} function s.tgtg(e,c) - return c:IsSetCard(0xee) and c~=e:GetHandler() + return c:IsSetCard(SET_SPYRAL) and c~=e:GetHandler() end function s.thfilter(c) - return c:IsSetCard(0xee) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPYRAL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -58,7 +59,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter(c) return c:IsMonster() and c:IsAbleToDeckAsCost() @@ -80,4 +81,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(c,REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c54631834.lua b/official/c54631834.lua index 0849b9b6dd..78ea8c6c87 100644 --- a/official/c54631834.lua +++ b/official/c54631834.lua @@ -1,4 +1,5 @@ --端末世界 +--Terminal World local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,5 +18,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end + return Duel.IsPhase(PHASE_MAIN1) +end \ No newline at end of file diff --git a/official/c54635100.lua b/official/c54635100.lua index 6faefa5487..e53186b2ae 100644 --- a/official/c54635100.lua +++ b/official/c54635100.lua @@ -1,5 +1,5 @@ --リンクルベル ---Linklebell +--Linkerbell -- local s,id=GetID() function s.initial_effect(c) @@ -16,4 +16,4 @@ end function s.spcost(e,c,tp,st) if (st&SUMMON_TYPE_LINK)~=SUMMON_TYPE_LINK then return true end return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>=3 -end +end \ No newline at end of file diff --git a/official/c54635862.lua b/official/c54635862.lua index 562372d91e..8d2db637a4 100644 --- a/official/c54635862.lua +++ b/official/c54635862.lua @@ -1,4 +1,5 @@ --ジェントルーパー +--Gentlemander local s,id=GetID() function s.initial_effect(c) --spsummon @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.atlimit(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c54652250.lua b/official/c54652250.lua index d7d8373523..78a9ccc962 100644 --- a/official/c54652250.lua +++ b/official/c54652250.lua @@ -1,4 +1,5 @@ --人喰い虫 +--Man-Eater Bug local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54656181.lua b/official/c54656181.lua index f8ff2c34ff..69dfecd7ea 100644 --- a/official/c54656181.lua +++ b/official/c54656181.lua @@ -1,4 +1,4 @@ --- +--C戦場の指揮官 コロネル --Colonel on C-String --scripted by Naim local s,id=GetID() @@ -33,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c54658815.lua b/official/c54658815.lua index c6ad0c05d6..4da3d989c4 100644 --- a/official/c54658815.lua +++ b/official/c54658815.lua @@ -1,5 +1,5 @@ --リモート・リボーン ---Remote Reborn +--Remote Rebirth local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c5466615.lua b/official/c5466615.lua index 5c5f1272da..bcd9ba84a8 100644 --- a/official/c5466615.lua +++ b/official/c5466615.lua @@ -1,8 +1,6 @@ ---JP name +--ミュートリア連鎖応動 --Myutant Clash ---Logical Nonsense - ---Substitute ID +--scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) --Activate (without effect) @@ -37,10 +35,7 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end - --Lists "Myutant" archetype -s.listed_series={0x159} - - --Activation legality +s.listed_series={SET_MYUTANT} function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsNegatableMonster() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -53,7 +48,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end --Check for "Myutant" monster to banish function s.rmfilter(c) - return c:IsAbleToRemove() and c:IsMonster() and c:IsSetCard(0x159) + return c:IsAbleToRemove() and c:IsMonster() and c:IsSetCard(SET_MYUTANT) end --Banish 1 "Myutant" monster from GY, and if you do, negate targeted monster's effects function s.disop(e,tp,eg,ep,ev,re,r,rp) @@ -68,14 +63,14 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -87,9 +82,9 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) for rc in aux.Next(eg) do if rc:IsStatus(STATUS_OPPO_BATTLE) then if rc:IsRelateToBattle() then - if rc:IsControler(tp) and rc:IsSetCard(0x159) and rc:IsLevelAbove(8) then return true end + if rc:IsControler(tp) and rc:IsSetCard(SET_MYUTANT) and rc:IsLevelAbove(8) then return true end else - if rc:IsPreviousControler(tp) and rc:IsPreviousSetCard(0x159) then return true end + if rc:IsPreviousControler(tp) and rc:IsPreviousSetCard(SET_MYUTANT) then return true end end end end diff --git a/official/c54693926.lua b/official/c54693926.lua index 8567128c8c..0596341657 100644 --- a/official/c54693926.lua +++ b/official/c54693926.lua @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c54700519.lua b/official/c54700519.lua index a598c674f8..260fe9b246 100644 --- a/official/c54700519.lua +++ b/official/c54700519.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} --Change Position function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x165) + return c:IsFaceup() and c:IsSetCard(SET_URSARCTIC) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) @@ -42,4 +42,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c54702678.lua b/official/c54702678.lua index c0a40fe4c9..e250a5b800 100644 --- a/official/c54702678.lua +++ b/official/c54702678.lua @@ -1,4 +1,5 @@ --極戦機王ヴァルバロイド +--Barbaroid, the Ultimate Battle Machine local s,id=GetID() function s.initial_effect(c) --fusion material @@ -35,9 +36,9 @@ function s.initial_effect(c) e4:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) c:RegisterEffect(e4) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID function s.ffilter(c,fc,sumtype,tp) - return c:IsSetCard(0x16,fc,sumtype,tp) and c:IsRace(RACE_MACHINE,fc,sumtype,tp) + return c:IsSetCard(SET_ROID,fc,sumtype,tp) and c:IsRace(RACE_MACHINE,fc,sumtype,tp) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttackTarget() and e:GetHandler()==Duel.GetAttacker() @@ -68,4 +69,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54704216.lua b/official/c54704216.lua index 8885c7e231..1a5781a4e7 100644 --- a/official/c54704216.lua +++ b/official/c54704216.lua @@ -1,7 +1,8 @@ --拷問車輪 +--Nightmare Wheel local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,1,nil,CATEGORY_DISABLE,nil,TIMING_STANDBY_PHASE,0x1c0,nil,nil,nil,nil,true) + aux.AddPersistentProcedure(c,1,nil,CATEGORY_DISABLE,nil,TIMING_STANDBY_PHASE,TIMINGS_CHECK_MONSTER,nil,nil,nil,nil,true) --eff local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -19,7 +20,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCategory(CATEGORY_DAMAGE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.damcon) @@ -57,4 +58,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54706054.lua b/official/c54706054.lua index 66b44a161a..404071df58 100644 --- a/official/c54706054.lua +++ b/official/c54706054.lua @@ -1,4 +1,5 @@ --ザ・キャリブレーター +--The Calibrator local s,id=GetID() function s.initial_effect(c) --attack @@ -13,4 +14,4 @@ end function s.atkval(e,c) local g=Duel.GetMatchingGroup(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,nil) return g:GetSum(Card.GetRank)*300 -end +end \ No newline at end of file diff --git a/official/c54719828.lua b/official/c54719828.lua index b53c06cd9a..83256f4ce2 100644 --- a/official/c54719828.lua +++ b/official/c54719828.lua @@ -11,16 +11,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=16 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) @@ -43,15 +39,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,4)) e1:SetValue(s.aclimit3) end - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) end function s.aclimit1(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.aclimit2(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.aclimit3(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() end \ No newline at end of file diff --git a/official/c54734082.lua b/official/c54734082.lua index d36a344965..967928e27f 100644 --- a/official/c54734082.lua +++ b/official/c54734082.lua @@ -1,5 +1,5 @@ --Magnet Induction ---scripted by pyrQ +--Magnet Induction local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,13 +14,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2066) and c:GetOriginalLevel()<=4 + return c:IsFaceup() and c:IsSetCard(SET_MAGNET_WARRIOR) and c:GetOriginalLevel()<=4 end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x2066) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.tg) e1:SetValue(1) Duel.RegisterEffect(e1,tp) @@ -51,5 +51,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.tg(e,c) - return c:IsFaceup() and (c:IsSetCard(0x2066) or c:IsSetCard(0xe9)) -end + return c:IsFaceup() and (c:IsSetCard(SET_MAGNET_WARRIOR) or c:IsSetCard(SET_MAGNA_WARRIOR)) +end \ No newline at end of file diff --git a/official/c54747648.lua b/official/c54747648.lua index b51694325e..5e367f0635 100644 --- a/official/c54747648.lua +++ b/official/c54747648.lua @@ -1,4 +1,5 @@ --玄武の召喚士 +--Green Turtle Summoner local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54749427.lua b/official/c54749427.lua index d94f21baf6..2786a72002 100644 --- a/official/c54749427.lua +++ b/official/c54749427.lua @@ -1,4 +1,5 @@ --D-HERO ディフェンドガイ +--Destiny HERO - Defender local s,id=GetID() function s.initial_effect(c) --draw @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDefensePos() end @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Draw(p,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54752875.lua b/official/c54752875.lua index 494e183bce..5bb359e303 100644 --- a/official/c54752875.lua +++ b/official/c54752875.lua @@ -1,7 +1,8 @@ --双頭の雷龍 +--Twin-Headed Thunder Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMixN(c,true,true,31786629,2) -end +end \ No newline at end of file diff --git a/official/c54757758.lua b/official/c54757758.lua index 87dd51f4de..2ca60789f5 100644 --- a/official/c54757758.lua +++ b/official/c54757758.lua @@ -52,7 +52,7 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c54762426.lua b/official/c54762426.lua index 89443f5fb3..671a4a3212 100644 --- a/official/c54762426.lua +++ b/official/c54762426.lua @@ -1,4 +1,5 @@ --埋蔵金の地図 +--Treasure Map local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,6 +28,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Draw(p,d,REASON_EFFECT)==2 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c54766667.lua b/official/c54766667.lua index 18b9032bb2..1c5e9846a5 100644 --- a/official/c54766667.lua +++ b/official/c54766667.lua @@ -1,4 +1,5 @@ --ホーリーフレーム +--Light Effigy local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c54772065.lua b/official/c54772065.lua index caf4cf999a..e4655e4e9d 100644 --- a/official/c54772065.lua +++ b/official/c54772065.lua @@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c54773234.lua b/official/c54773234.lua index d2197718b0..983d36f86b 100644 --- a/official/c54773234.lua +++ b/official/c54773234.lua @@ -1,4 +1,5 @@ --禁じられた聖典 +--Forbidden Scripture local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,21 +22,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTarget(s.distg) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetRange(LOCATION_MZONE) e2:SetOperation(s.disop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) if a:IsRelateToBattle() then local aa=a:GetTextAttack() @@ -50,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e4:SetRange(LOCATION_MZONE) e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetReset(RESET_PHASE+PHASE_DAMAGE) + e4:SetReset(RESET_PHASE|PHASE_DAMAGE) e4:SetValue(aa) a:RegisterEffect(e4,true) local e5=Effect.CreateEffect(c) @@ -58,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e5:SetRange(LOCATION_MZONE) e5:SetCode(EFFECT_SET_DEFENSE_FINAL) - e5:SetReset(RESET_PHASE+PHASE_DAMAGE) + e5:SetReset(RESET_PHASE|PHASE_DAMAGE) e5:SetValue(ad) a:RegisterEffect(e5,true) end @@ -76,7 +77,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e6:SetRange(LOCATION_MZONE) e6:SetCode(EFFECT_SET_ATTACK_FINAL) e6:SetValue(da) - e6:SetReset(RESET_PHASE+PHASE_DAMAGE) + e6:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e6,true) local e7=Effect.CreateEffect(c) e7:SetType(EFFECT_TYPE_SINGLE) @@ -84,7 +85,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e7:SetRange(LOCATION_MZONE) e7:SetCode(EFFECT_SET_DEFENSE_FINAL) e7:SetValue(dd) - e7:SetReset(RESET_PHASE+PHASE_DAMAGE) + e7:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e7,true) end end @@ -96,4 +97,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if (loc&LOCATION_ONFIELD)~=0 then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c5479217.lua b/official/c5479217.lua index 677c5f3c29..cca2f0ec2d 100644 --- a/official/c5479217.lua +++ b/official/c5479217.lua @@ -1,4 +1,5 @@ --ジュラック・インパクト +--Jurrac Impact local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54807656.lua b/official/c54807656.lua index a6810dd8eb..512cbdb90c 100644 --- a/official/c54807656.lua +++ b/official/c54807656.lua @@ -1,5 +1,5 @@ --破械神の慟哭 ---Wail of the Hakaishin +--Wailing of the Unchained Souls --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -34,9 +34,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x130} +s.listed_series={SET_UNCHAINED} function s.cfilter(c,tp) - return c:IsSetCard(0x130) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSummonPlayer()==tp + return c:IsSetCard(SET_UNCHAINED) and c:IsLinkSummoned() and c:GetSummonPlayer()==tp end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -60,7 +60,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c54813225.lua b/official/c54813225.lua index 8837d44ab4..0bc86ce98d 100644 --- a/official/c54813225.lua +++ b/official/c54813225.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) diff --git a/official/c54828837.lua b/official/c54828837.lua index c523e5ec40..ca6ace5148 100644 --- a/official/c54828837.lua +++ b/official/c54828837.lua @@ -1,5 +1,5 @@ --失楽の霹靂 ---Cerulean Sky Fire +--Cerulean Skyfire --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -40,13 +40,13 @@ function s.cfilter(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and rp~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev) + and rp~=tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) and e:GetHandler():GetFlagEffect(id)==0 end function s.negop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) if Duel.NegateEffect(ev) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) @@ -71,10 +71,10 @@ function s.ndop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c54851325.lua b/official/c54851325.lua index b6347bdf59..6a1492f926 100644 --- a/official/c54851325.lua +++ b/official/c54851325.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.descond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c54860010.lua b/official/c54860010.lua index c11ad75355..87d3a1353f 100644 --- a/official/c54860010.lua +++ b/official/c54860010.lua @@ -1,4 +1,5 @@ --ワーム・プリンス +--Worm Prince local s,id=GetID() function s.initial_effect(c) --search @@ -23,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.filter(c) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -40,7 +41,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) + return c:IsFaceup() and c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) @@ -53,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54862960.lua b/official/c54862960.lua index ed106edc28..5750483426 100644 --- a/official/c54862960.lua +++ b/official/c54862960.lua @@ -1,25 +1,25 @@ --- 鏡の御巫ニニ --- Nini the Mirror Mikanko --- Scripted by Hatter +--鏡の御巫ニニ +--Ni-Ni the Mirror Mikanko +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Take no battle damage + --Take no battle damage local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetCondition(aux.NOT(s.eqcon)) e1:SetValue(1) c:RegisterEffect(e1) - -- Cannot be destroyed by battle + --Cannot be destroyed by battle local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCondition(s.eqcon) c:RegisterEffect(e2) - -- Reflect battle damage + --Reflect battle damage local e3=e2:Clone() e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) c:RegisterEffect(e3) - -- Take control of 1 face-up monster + --Take control of 1 face-up monster local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetCategory(CATEGORY_CONTROL) @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,id) - e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e4:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and s.eqcon(e) end) e4:SetTarget(s.cttg) e4:SetOperation(s.ctop) diff --git a/official/c54878498.lua b/official/c54878498.lua index 0dbf2e56ea..89141fb585 100644 --- a/official/c54878498.lua +++ b/official/c54878498.lua @@ -1,4 +1,5 @@ --ケルベク +--Kelbek local s,id=GetID() function s.initial_effect(c) --to hand @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.SendtoHand(a,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54878729.lua b/official/c54878729.lua index edcc5e1ab5..d914247ea3 100644 --- a/official/c54878729.lua +++ b/official/c54878729.lua @@ -1,7 +1,6 @@ --クロニクル・ソーサレス --Chronicle Sorceress --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -18,7 +17,6 @@ end local BEWD,DM=CARD_BLUEEYES_W_DRAGON,CARD_DARK_MAGICIAN --Mentions "Blue-Eyes White Dragon" and "Dark Magician" s.listed_names={BEWD,DM,id} - function s.codefilter(c,code) return not c:IsCode(id) and (c:IsCode(code) or c:ListsCode(code)) and c:IsAbleToGrave() end diff --git a/official/c54880296.lua b/official/c54880296.lua index cc87085a50..10b880ae37 100644 --- a/official/c54880296.lua +++ b/official/c54880296.lua @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,ct,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c54895237.lua b/official/c54895237.lua index fc95abe05a..8ae30e0f46 100644 --- a/official/c54895237.lua +++ b/official/c54895237.lua @@ -25,14 +25,14 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.gspcfilter(c,ft,tp,sft) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) @@ -40,7 +40,7 @@ function s.gspcfilter(c,ft,tp,sft) and Duel.IsExistingMatchingCard(s.gspfilter,tp,LOCATION_HAND,0,1,nil,c,tp) end function s.gspfilter(c,cc,tp) - return c:IsSpellTrap() and c:IsSetCard(0x109) and not c:IsForbidden() + return c:IsSpellTrap() and c:IsSetCard(SET_THE_WEATHER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc) and not c:IsType(TYPE_FIELD) end function s.gspcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -71,9 +71,9 @@ function s.spreg(e,tp,eg,ep,ev,re,r,rp) if not re then return end local c=e:GetHandler() local rc=re:GetHandler() - if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) then + if c:IsReason(REASON_COST) and rc:IsSetCard(SET_THE_WEATHER) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c5489987.lua b/official/c5489987.lua index 25b9163eb1..c7422be03e 100644 --- a/official/c5489987.lua +++ b/official/c5489987.lua @@ -1,4 +1,5 @@ --花札衛-桜に幕- +--Flower Cardian Cherry Blossom with Curtain local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.SelfDiscard) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -44,7 +45,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if c:IsRelateToEffect(e) then if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then c:CompleteProcedure() @@ -66,11 +67,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) if not tc then return false end if tc:IsControler(1-tp) then tc=Duel.GetAttacker() end e:SetLabelObject(tc) - return tc:IsFaceup() and tc:IsSetCard(0xe6) and tc:IsRelateToBattle() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return tc:IsFaceup() and tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsRelateToBattle() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -79,7 +76,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c54903668.lua b/official/c54903668.lua index 96ee9e82e2..26477ada63 100644 --- a/official/c54903668.lua +++ b/official/c54903668.lua @@ -1,4 +1,5 @@ --妖仙獣の秘技 +--Yosenjus' Secret Move local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,17 +12,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0xb3) + return c:IsFaceup() and c:IsSetCard(SET_YOSENJU) end function s.filter2(c) - return c:IsFaceup() and not c:IsSetCard(0xb3) + return c:IsFaceup() and not c:IsSetCard(SET_YOSENJU) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil) and not Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c54912977.lua b/official/c54912977.lua index c50fb76a47..a048e8a00c 100644 --- a/official/c54912977.lua +++ b/official/c54912977.lua @@ -1,4 +1,5 @@ --マジック・ランプ +--Ancient Lamp local s,id=GetID() function s.initial_effect(c) --change target @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54913680.lua b/official/c54913680.lua index 418380a538..e44c0d71c7 100644 --- a/official/c54913680.lua +++ b/official/c54913680.lua @@ -1,4 +1,5 @@ --六武ノ書 +--Six Scrolls of the Samurai local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={63176202} function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,2,false,aux.ReleaseCheckMMZ,nil) end @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c54919528.lua b/official/c54919528.lua index c28500be20..93bd49d9cb 100644 --- a/official/c54919528.lua +++ b/official/c54919528.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_REMOVE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCost(Cost.Detach(1)) diff --git a/official/c54927180.lua b/official/c54927180.lua index 1d28cc0092..fdd8a2f9d5 100644 --- a/official/c54927180.lua +++ b/official/c54927180.lua @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc2,1) end end -end +end \ No newline at end of file diff --git a/official/c54936498.lua b/official/c54936498.lua index 90ffbca9be..82bdaec5cf 100644 --- a/official/c54936498.lua +++ b/official/c54936498.lua @@ -1,4 +1,5 @@ --インフルーエンス・ドラゴン +--Influence Dragon local s,id=GetID() function s.initial_effect(c) --lv up @@ -28,7 +29,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_DRAGON) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c54941203.lua b/official/c54941203.lua index ef24f1bc0b..3948a13a13 100644 --- a/official/c54941203.lua +++ b/official/c54941203.lua @@ -1,6 +1,5 @@ --調律の魔術師 --Tuning Magician - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCountLimit(1,id) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -28,10 +27,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x98} - +s.listed_series={SET_MAGICIAN} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,0x98) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,SET_MAGICIAN) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -48,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c5494820.lua b/official/c5494820.lua index e3a0a19118..a6b5466e9a 100644 --- a/official/c5494820.lua +++ b/official/c5494820.lua @@ -1,4 +1,5 @@ --サイクロンレーザー +--Cyclon Laser local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,10992251)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_PIERCE) c:RegisterEffect(e3) end -s.listed_names={10992251} +s.listed_names={10992251} \ No newline at end of file diff --git a/official/c54959865.lua b/official/c54959865.lua index 6df20872ae..daf19ada78 100644 --- a/official/c54959865.lua +++ b/official/c54959865.lua @@ -1,4 +1,5 @@ --N・エア・ハミングバード +--Neo-Spacian Air Hummingbird local s,id=GetID() function s.initial_effect(c) --recover @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local rt=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)*500 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,rt,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c54965929.lua b/official/c54965929.lua index ab7ca1d219..cd95251ff0 100644 --- a/official/c54965929.lua +++ b/official/c54965929.lua @@ -75,13 +75,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -101,14 +100,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(math.ceil(tc:GetAttack()/2)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(math.ceil(tc:GetDefense()/2)) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c54974237.lua b/official/c54974237.lua index 530add7d0c..dfb56b5306 100644 --- a/official/c54974237.lua +++ b/official/c54974237.lua @@ -1,4 +1,5 @@ --闇のデッキ破壊ウイルス +--Eradicator Epidemic Virus local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_TOHAND|TIMING_END_PHASE) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -38,7 +39,7 @@ function s.cffilter(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ty=e:GetLabel() - local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND) + local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD|LOCATION_HAND) if #g>0 then local cg=g:Filter(s.cffilter,nil) Duel.ConfirmCards(tp,cg) @@ -54,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.desop) e1:SetLabel(ty) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -62,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.turncon) e2:SetOperation(s.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e2,tp) e2:SetLabelObject(e1) local descnum=tp==c:GetOwner() and 0 or 1 @@ -74,12 +75,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(e2) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e3) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,3)) - e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e4:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) e4:SetTargetRange(0,1) Duel.RegisterEffect(e4,tp) end @@ -96,7 +97,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(ep) end function s.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.turnop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel()+1 @@ -106,4 +107,4 @@ function s.turnop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():Reset() if re then re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c54976796.lua b/official/c54976796.lua index 00332bd8e9..1c525c6ed4 100644 --- a/official/c54976796.lua +++ b/official/c54976796.lua @@ -1,4 +1,5 @@ --レベル制限A地区 +--Level Limit - Area A local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsLevelBelow(3) and c:IsFaceup() -end +end \ No newline at end of file diff --git a/official/c54977057.lua b/official/c54977057.lua index 3c7859ed7f..25a0419022 100644 --- a/official/c54977057.lua +++ b/official/c54977057.lua @@ -18,7 +18,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -49,4 +49,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c5498296.lua b/official/c5498296.lua index 6ac26f6d58..f44c7ed6e9 100644 --- a/official/c5498296.lua +++ b/official/c5498296.lua @@ -1,4 +1,5 @@ --暗黒界の斥候 スカー +--Scarr, Scout of Dark World local s,id=GetID() function s.initial_effect(c) --search @@ -20,7 +21,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x6) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsSetCard(SET_DARK_WORLD) and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55001420.lua b/official/c55001420.lua index af64ba50dd..e743c415d2 100644 --- a/official/c55001420.lua +++ b/official/c55001420.lua @@ -1,4 +1,5 @@ --深緑の魔弓使い +--Arcane Archer of the Forest local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -49,4 +50,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55008284.lua b/official/c55008284.lua index 5e001ddb39..6553a6fe92 100644 --- a/official/c55008284.lua +++ b/official/c55008284.lua @@ -1,4 +1,5 @@ --同姓同名同盟 +--The League of Uniform Nomenclature local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) sc=g:GetNext() end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c55010259.lua b/official/c55010259.lua index 63b7f1b33e..5071868fa0 100644 --- a/official/c55010259.lua +++ b/official/c55010259.lua @@ -1,4 +1,5 @@ --ゴールド・ガジェット +--Gold Gadget local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x51} +s.listed_series={SET_GADGET} s.listed_names={id} function s.spfilter1(c,e,tp) return c:IsRace(RACE_MACHINE) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -49,7 +50,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x51) and c:GetLevel()==4 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GADGET) and c:GetLevel()==4 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -63,4 +64,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55013285.lua b/official/c55013285.lua index 762bf5d64b..ddf2d4ec62 100644 --- a/official/c55013285.lua +++ b/official/c55013285.lua @@ -1,4 +1,5 @@ --軍隊竜 +--Troop Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55034079.lua b/official/c55034079.lua index 5789ae4e57..576879abbc 100644 --- a/official/c55034079.lua +++ b/official/c55034079.lua @@ -1,7 +1,6 @@ --リンク・デス・ターレット --Link Turret --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x48) @@ -37,8 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x102} - +s.listed_series={SET_ROKKET} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end local c=e:GetHandler() @@ -68,7 +66,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x48,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_MAIN2) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x48,1,REASON_EFFECT) @@ -80,7 +78,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -88,7 +86,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not (c:IsLinkMonster() and c:IsAttribute(ATTRIBUTE_DARK)) and c:IsLocation(LOCATION_EXTRA) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -106,19 +104,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetDescription(3300) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_REDIRECT) + e3:SetReset(RESET_EVENT|RESETS_REDIRECT) e3:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e3,true) end diff --git a/official/c55046718.lua b/official/c55046718.lua index 52e369af41..96774a2bac 100644 --- a/official/c55046718.lua +++ b/official/c55046718.lua @@ -1,7 +1,8 @@ --ヴァイロン・コンポーネント +--Vylon Component local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x30)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_VYLON)) --Pierce local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -19,13 +20,13 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x30) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_VYLON) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -38,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55051920.lua b/official/c55051920.lua index 385c791253..9a32883a9d 100644 --- a/official/c55051920.lua +++ b/official/c55051920.lua @@ -1,7 +1,6 @@ --オルフェゴール・コア --Orcustrated Core --Scripted by andré and Eerie Code - local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,19 +31,18 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x11b,0xfe} +s.listed_series={SET_ORCUST,SET_WORLD_LEGACY} s.listed_names={id} - function s.cfilter(c,tp) return c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,false,true) and Duel.IsExistingTarget(s.filter,tp,LOCATION_ONFIELD,0,1,c) end function s.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x11b) or c:IsSetCard(0xfe)) and not c:IsCode(id) + return c:IsFaceup() and (c:IsSetCard(SET_ORCUST) or c:IsSetCard(SET_WORLD_LEGACY)) and not c:IsCode(id) end function s.immcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -61,14 +59,14 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end end function s.repfilter(c,tp) - return c:IsFaceup() and (c:IsSetCard(0x11b) or c:IsSetCard(0xfe)) and c:IsOnField() - and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) + return c:IsFaceup() and (c:IsSetCard(SET_ORCUST) or c:IsSetCard(SET_WORLD_LEGACY)) and c:IsOnField() + and c:IsControler(tp) and c:IsReason(REASON_EFFECT|REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGrave() and not eg:IsContains(e:GetHandler()) diff --git a/official/c55063681.lua b/official/c55063681.lua index a696b552b7..a03ff72b43 100644 --- a/official/c55063681.lua +++ b/official/c55063681.lua @@ -1,4 +1,5 @@ --パワー・サプライヤー +--Power Supplier local s,id=GetID() function s.initial_effect(c) --set target @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) e1:SetCondition(s.atkcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) else local e1=Effect.CreateEffect(c) @@ -43,12 +44,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end function s.atkcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c55063751.lua b/official/c55063751.lua index 506d03015c..e288942739 100644 --- a/official/c55063751.lua +++ b/official/c55063751.lua @@ -18,14 +18,14 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0xd3} +s.listed_series={SET_KAIJU} function s.negcon(e,tp,eg,ep,ev,re,r,rp) if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end return not re:GetHandler():IsCode(id) and Duel.IsChainNegatable(ev) end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() diff --git a/official/c55067058.lua b/official/c55067058.lua index 262604a953..a35d9e51de 100644 --- a/official/c55067058.lua +++ b/official/c55067058.lua @@ -18,10 +18,10 @@ function s.initial_effect(c) end s.xyz_number=19 function s.rcon(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_COST)~=0 and re:IsActivated(0x7e0) and re:IsActiveType(TYPE_XYZ) + return (r&REASON_COST)~=0 and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and ep==e:GetOwnerPlayer() and re:GetHandler():GetOverlayCount()>=ev-1 end function s.rop(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5506791.lua b/official/c5506791.lua index 5180c2a959..b4b1f1e9e6 100644 --- a/official/c5506791.lua +++ b/official/c5506791.lua @@ -42,11 +42,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsSetCard(0xd0) and c:IsAbleToHand() + return c:IsSetCard(SET_MAJESPECTER) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) diff --git a/official/c55072170.lua b/official/c55072170.lua index 49b4132dae..95adc4557d 100644 --- a/official/c55072170.lua +++ b/official/c55072170.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) end function s.cfilter(c,tp) return c:IsSpell() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c) @@ -64,7 +64,7 @@ function s.cfilter2(c) return c:IsSpell() and c:IsAbleToRemoveAsCost() end function s.spfilter(c,e,tp,lv) - return c:IsSetCard(0x128) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -103,7 +103,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.sfilter(c,e,tp,lv) - return c:IsSetCard(0x128) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -113,4 +113,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55099248.lua b/official/c55099248.lua index 29e516a9ae..0fe332da05 100644 --- a/official/c55099248.lua +++ b/official/c55099248.lua @@ -1,4 +1,5 @@ --ナチュル・ストロベリー +--Naturia Strawberry local s,id=GetID() function s.initial_effect(c) --atk up @@ -35,7 +36,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetLevel()*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c55100740.lua b/official/c55100740.lua index 7862cd3e57..10c7685cdc 100644 --- a/official/c55100740.lua +++ b/official/c55100740.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsType(TYPE_GEMINI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -37,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c55106249.lua b/official/c55106249.lua index a77163323d..cf2eafa2bd 100644 --- a/official/c55106249.lua +++ b/official/c55106249.lua @@ -1,4 +1,5 @@ --ブンボーグ006 +--Deskbot 006 local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -44,9 +45,9 @@ function s.initial_effect(c) e6:SetOperation(s.thop) c:RegisterEffect(e6) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xab) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DESKBOT) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.filter(c) return c:IsCanChangePosition() @@ -65,7 +66,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xab) + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.cfilter,c:GetControler(),LOCATION_EXTRA,0,nil)*500 @@ -75,7 +76,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_PZONE) end function s.thfilter(c) - return c:IsSetCard(0xab) and c:IsAbleToHand() + return c:IsSetCard(SET_DESKBOT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -89,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55117418.lua b/official/c55117418.lua index 8f8b4b08a1..cea1f0fc15 100644 --- a/official/c55117418.lua +++ b/official/c55117418.lua @@ -1,4 +1,5 @@ --能力吸収コア +--Nega-Ton Corepanel local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1d) + return c:IsFaceup() and c:IsSetCard(SET_KOAKI_MEIRU) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,36623431) end @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55119278.lua b/official/c55119278.lua index 9821a6ce19..9413a186e2 100644 --- a/official/c55119278.lua +++ b/official/c55119278.lua @@ -1,4 +1,5 @@ --D・ラジオン +--Morphtronic Radion local s,id=GetID() function s.initial_effect(c) --atk @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCondition(s.cona) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MORPHTRONIC)) e1:SetValue(800) c:RegisterEffect(e1) --def @@ -18,10 +19,10 @@ function s.initial_effect(c) e2:SetValue(1000) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cona(e) return e:GetHandler():IsAttackPos() end function s.cond(e) return e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c55125728.lua b/official/c55125728.lua index eaab0766d0..19f8e0a0e8 100644 --- a/official/c55125728.lua +++ b/official/c55125728.lua @@ -1,9 +1,9 @@ --- 春化精の女神 ヴェーラ --- Vera, the Vernalizer Fairy Goddess --- Scripted by Hatter +--春化精の女神 ヴェーラ +--Vera the Vernusylph Goddess +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate activated effect + --Negate activated effect local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCondition(s.negcon) e1:SetOperation(s.negop) c:RegisterEffect(e1) - -- Take control of 1 opponent monster + --Take control of 1 opponent monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_CONTROL) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) c:RegisterEffect(e2) - -- Special Summon 1 EARTH monster + --Special Summon 1 EARTH monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -38,16 +38,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and e:GetHandler():GetFlagEffect(id)==0 + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and e:GetHandler():GetFlagEffect(id)==0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),tp,LOCATION_MZONE,0,5,nil) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) if Duel.GetFlagEffectLabel(tp,id)==cid or not Duel.SelectEffectYesNo(tp,c) then return end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1,cid) Duel.Hint(HINT_CARD,0,id) local rc=re:GetHandler() @@ -66,13 +66,13 @@ end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp) then - -- Attribute becomes EARTH + --Attribute becomes EARTH local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(ATTRIBUTE_EARTH) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55136228.lua b/official/c55136228.lua index da4387658d..ef2b61faa4 100644 --- a/official/c55136228.lua +++ b/official/c55136228.lua @@ -1,4 +1,5 @@ --剣闘獣の底力 +--Indomitable Gladiator Beast local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ function s.initial_effect(c) end s.listed_series={SET_GLADIATOR_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end + if Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated() then return false end return true end function s.filter(c) @@ -42,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) end @@ -65,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c55144522.lua b/official/c55144522.lua index 3c83399e5e..0c556f89ee 100644 --- a/official/c55144522.lua +++ b/official/c55144522.lua @@ -22,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c55151012.lua b/official/c55151012.lua index a3c7f2993c..08bfa9285d 100644 --- a/official/c55151012.lua +++ b/official/c55151012.lua @@ -1,20 +1,20 @@ --- 氷水のトレモラ --- Tremolat of the Icejade --- Scripted by Hatter +--氷水のトレモラ +--Icejade Tremora +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon WATER monster from hand + --Special Summon WATER monster from hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.hspcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -24,16 +24,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x16e} -function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_ICEJADE} function s.hspfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -51,25 +47,25 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) end end function s.spconfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x16e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICEJADE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55154048.lua b/official/c55154048.lua index 33c9f8f630..7a1f874199 100644 --- a/official/c55154048.lua +++ b/official/c55154048.lua @@ -1,4 +1,5 @@ --極星宝ドラウプニル +--Nordic Relic Draupnir local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -20,16 +21,16 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x42,0x4b,0x5042} +s.listed_series={SET_NORDIC,SET_AESIR,SET_NORDIC_RELIC} function s.filter(c) - return c:IsSetCard(0x42) or c:IsSetCard(0x4b) + return c:IsSetCard(SET_NORDIC) or c:IsSetCard(SET_AESIR) end function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk) return e:GetHandler():IsPreviousPosition(POS_FACEUP) - and (e:GetHandler():GetReason()&0x41)==0x41 + and (e:GetHandler():GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.thfilter(c) - return c:IsSetCard(0x5042) and c:IsAbleToHand() + return c:IsSetCard(SET_NORDIC_RELIC) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -42,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55171412.lua b/official/c55171412.lua index 8b37fa5393..62f57a2ab5 100644 --- a/official/c55171412.lua +++ b/official/c55171412.lua @@ -1,4 +1,5 @@ --E・HERO アクア・ネオス +--Elemental HERO Aqua Neos local s,id=GetID() function s.initial_effect(c) --fusion material @@ -19,20 +20,20 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end @@ -42,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) local sg=g:RandomSelect(tp,1) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5519829.lua b/official/c5519829.lua index 6af04cf063..2aa3904965 100644 --- a/official/c5519829.lua +++ b/official/c5519829.lua @@ -1,4 +1,5 @@ --メンタル・カウンセラー リリー +--Counselor Lily local s,id=GetID() function s.initial_effect(c) --atk change @@ -9,17 +10,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BE_MATERIAL) e1:SetCondition(s.con) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetOperation(s.op) c:RegisterEffect(e1) end function s.con(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local sync=c:GetReasonCard() @@ -27,6 +24,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c55226153.lua b/official/c55226153.lua index 194c588a83..168d909dbc 100644 --- a/official/c55226153.lua +++ b/official/c55226153.lua @@ -1,11 +1,11 @@ --- ドドレミコード・キューティア --- Dodoremichord Cutea --- scripted by Hatter +--ドドレミコード・キューティア +--DoSolfachord Cutia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- pendulum summon + --pendulum summon Pendulum.AddProcedure(c) - -- cannot disable pendulum summon + --cannot disable pendulum summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTargetRange(1,0) e1:SetTarget(s.target) c:RegisterEffect(e1) - -- search + --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -28,7 +28,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - -- atk up + --atk up local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_UPDATE_ATTACK) @@ -39,12 +39,12 @@ function s.initial_effect(c) e4:SetValue(s.atkval) c:RegisterEffect(e4) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.target(e,c) - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) + return c:IsPendulumSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) end function s.thfilter(c) - return c:IsSetCard(0x164) and c:IsMonster() and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SOLFACHORD) and c:IsMonster() and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -62,8 +62,8 @@ function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEvenScale),e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil) end function s.atktg(e,c) - return c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) end function s.atkval(e,c) return c:GetLeftScale()*100 -end +end \ No newline at end of file diff --git a/official/c55226821.lua b/official/c55226821.lua index e73b169f5f..cd5b81f0e0 100644 --- a/official/c55226821.lua +++ b/official/c55226821.lua @@ -1,4 +1,5 @@ --稲妻の剣 +--Lightning Blade local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)) @@ -20,4 +21,4 @@ function s.initial_effect(c) end function s.adtg(e,c) return c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c55241609.lua b/official/c55241609.lua index 4230315ef9..6494bb5b88 100644 --- a/official/c55241609.lua +++ b/official/c55241609.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} function s.spval(e,c) return 0,aux.GetMMZonesPointedTo(c:GetControler()) end @@ -37,7 +37,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return aux.IsZone(e:GetHandler(),zone,tp) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x116) + return c:IsFaceup() and c:IsSetCard(SET_CRUSADIA) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c5524387.lua b/official/c5524387.lua index a245fd899a..10416a4e60 100644 --- a/official/c5524387.lua +++ b/official/c5524387.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.thfilter(c) - return c:IsSetCard(0x12b) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -48,7 +48,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.GetAttacker():IsControler(tp) end function s.cfilter(c) - return c:IsSetCard(0x12b) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MARINCESS) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -62,14 +62,14 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) if d then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e2) end local e3=Effect.CreateEffect(c) @@ -77,6 +77,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,0) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) end \ No newline at end of file diff --git a/official/c55256016.lua b/official/c55256016.lua index 398d3add02..d1487709f8 100644 --- a/official/c55256016.lua +++ b/official/c55256016.lua @@ -1,4 +1,5 @@ --アヌビスの裁き +--Judgment of Anubis local s,id=GetID() function s.initial_effect(c) --Negate @@ -17,14 +18,14 @@ function s.cfilter(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if tp==ep or not Duel.IsChainNegatable(ev) then return false end - if not (re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end + if not (re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and tc+tg:FilterCount(s.cfilter,nil)-#tg>0 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -48,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c55262310.lua b/official/c55262310.lua index 643fbe12ca..0d6f7ab25a 100644 --- a/official/c55262310.lua +++ b/official/c55262310.lua @@ -1,7 +1,6 @@ --A・Ɐ・RR ---Amaze Ɐttraction Rapid Racing +--Amaze Attraction Rapid Racing --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --From cards_specific_functions.lua @@ -27,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x15e} +s.listed_series={SET_AMAZEMENT} function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return not chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() end local tc=e:GetHandler():GetEquipTarget() @@ -43,7 +42,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() if ec and Duel.ChangePosition(ec,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)~=0 and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -58,11 +57,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) ec:RegisterEffect(e1) if not ec:IsImmuneToEffect(e1) then Duel.ChangePosition(ec,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end end -end +end \ No newline at end of file diff --git a/official/c55272555.lua b/official/c55272555.lua index 91512bebe8..3d61cc59a7 100644 --- a/official/c55272555.lua +++ b/official/c55272555.lua @@ -56,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55273560.lua b/official/c55273560.lua index f99a338c0c..e3bc26fc6c 100644 --- a/official/c55273560.lua +++ b/official/c55273560.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sstg) e2:SetOperation(s.ssop) c:RegisterEffect(e2) @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) - -- Check for Fusion Monsters sent to the GY + --Check for Fusion Monsters sent to the GY aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -48,7 +48,7 @@ function s.initial_effect(c) end s.listed_names={CARD_ALBAZ} s.listed_series={SET_SWORDSOUL} --- global check +--global check function s.checkop(e,tp,eg,ep,ev,re,r,rp) for tc in eg:Iter() do if tc:IsType(TYPE_FUSION) then diff --git a/official/c55277252.lua b/official/c55277252.lua index 3519f46a8b..bd1807cf26 100644 --- a/official/c55277252.lua +++ b/official/c55277252.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.op2) c:RegisterEffect(e2) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.disfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsDiscardable() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -37,11 +37,11 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.disfilter,tp,LOCATION_HAND,0,nil) if #g==0 then return end if #g==1 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=g:Select(tp,1,1,e:GetHandler()) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) end local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end @@ -51,7 +51,7 @@ function s.con2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.filter2(c,e,tp) - return c:IsLevelBelow(2) and c:IsSetCard(0x35) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(2) and c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,4 +65,4 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55285840.lua b/official/c55285840.lua index 689491acf9..c46ab5b0f8 100644 --- a/official/c55285840.lua +++ b/official/c55285840.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetTarget(s.xyztg) @@ -48,9 +48,9 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local g=c:GetOverlayGroup() local ty=0 - if c:IsAbleToRemove() then ty=ty | TYPE_MONSTER end - if Duel.IsPlayerCanDraw(tp,1) then ty=ty | TYPE_SPELL end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) then ty=ty | TYPE_TRAP end + if c:IsAbleToRemove() then ty=ty|TYPE_MONSTER end + if Duel.IsPlayerCanDraw(tp,1) then ty=ty|TYPE_SPELL end + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) then ty=ty|TYPE_TRAP end if chk==0 then return ty>0 and g:IsExists(Card.IsType,1,nil,ty) end end function s.op(e,tp,eg,ep,ev,re,r,rp) @@ -58,26 +58,25 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local g=c:GetOverlayGroup() local ty=0 - if c:IsAbleToRemove() then ty=ty | TYPE_MONSTER end - if Duel.IsPlayerCanDraw(tp,1) then ty=ty | TYPE_SPELL end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) then ty=ty | TYPE_TRAP end + if c:IsAbleToRemove() then ty=ty|TYPE_MONSTER end + if Duel.IsPlayerCanDraw(tp,1) then ty=ty|TYPE_SPELL end + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,nil) then ty=ty|TYPE_TRAP end if ty==0 then return end local sg=aux.SelectUnselectGroup(g:Filter(Card.IsType,nil,ty),e,tp,1,3,s.rescon,1,tp,HINTMSG_REMOVEXYZ) local lb=0 for tc in aux.Next(sg) do - lb=lb | tc:GetType() + lb=lb|tc:GetMainCardType() end - lb=lb & 0x7 Duel.SendtoGrave(sg,REASON_EFFECT) Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0) Duel.BreakEffect() if lb & TYPE_MONSTER ~=0 then if c:IsRelateToEffect(e) then - Duel.Remove(c,c:GetPosition(),REASON_EFFECT+REASON_TEMPORARY) + Duel.Remove(c,c:GetPosition(),REASON_EFFECT|REASON_TEMPORARY) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(c) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -90,9 +89,9 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if lb & TYPE_TRAP ~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsAbleToDeck),tp,0,LOCATION_ONFIELD,1,1,nil) - if #g>0 then Duel.SendtoDeck(g,nil,0,REASON_EFFECT) end + if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end end end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c55289183.lua b/official/c55289183.lua index 681118250e..a0795ddc3b 100644 --- a/official/c55289183.lua +++ b/official/c55289183.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.sumcon) @@ -66,10 +66,10 @@ function s.statop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500*ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c5530780.lua b/official/c5530780.lua index e1f71e98c8..dc4cbb0eac 100644 --- a/official/c5530780.lua +++ b/official/c5530780.lua @@ -1,18 +1,18 @@ --- エクソシスター・ジブリーヌ --- Exorsister Jibrine --- Scripted by Hatter +--エクソシスター・ジブリーヌ +--Exosister Gibrine +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Level 4 monsters + --2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - -- Check materials on Xyz Summon + --Check materials on Xyz Summon local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) - -- Effect destruction immunity + --Effect destruction immunity local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_MZONE) @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(s.indval) c:RegisterEffect(e1) - -- Negate + --Negate local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE) @@ -34,7 +34,7 @@ function s.initial_effect(c) e2:SetTarget(s.ngtg) e2:SetOperation(s.ngop) c:RegisterEffect(e2) - -- Gain ATK + --Gain ATK local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) @@ -45,18 +45,18 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x174) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END + if g:IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.indval(e,re,rp) local rc=re:GetHandler() - return rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsSummonLocation(LOCATION_GRAVE) - and re:IsActiveType(TYPE_MONSTER) and re:IsActivated() + return rc:IsSpecialSummoned() and rc:IsSummonLocation(LOCATION_GRAVE) + and re:IsMonsterEffect() and re:IsActivated() end function s.ngtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -72,17 +72,17 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then local c=e:GetHandler() Duel.NegateRelatedChain(tc,RESET_TURN_SET) - -- Negate targeted monster's effects + --Negate targeted monster's effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -99,6 +99,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_XYZ)) e1:SetValue(800) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c55312487.lua b/official/c55312487.lua index 6700bba013..5ebd53edf8 100644 --- a/official/c55312487.lua +++ b/official/c55312487.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetValue(s.catlimit) c:RegisterEffect(e2) end -s.listed_series={0x116,0xfe} +s.listed_series={SET_CRUSADIA,SET_WORLD_LEGACY} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if s.spcost(e,tp,eg,ep,ev,re,r,rp,0) and s.sptarget(e,tp,eg,ep,ev,re,r,rp,0) @@ -39,11 +39,11 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end end function s.costfilter(c,e,tp) - return c:IsMonster() and (c:IsSetCard(0x116) or c:IsSetCard(0xfe)) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,c) + return c:IsMonster() and (c:IsSetCard(SET_CRUSADIA) or c:IsSetCard(SET_WORLD_LEGACY)) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) - return c:IsMonster() and (c:IsSetCard(0x116) or c:IsSetCard(0xfe)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsMonster() and (c:IsSetCard(SET_CRUSADIA) or c:IsSetCard(SET_WORLD_LEGACY)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsOriginalCode(tc:GetOriginalCode()) end function s.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,17 +64,17 @@ function s.spoperation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,tc) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,tc) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.catfilter(c) - return c:IsFaceup() and c:IsSetCard(0x116) and c:IsLinkMonster() + return c:IsFaceup() and c:IsSetCard(SET_CRUSADIA) and c:IsLinkMonster() end function s.catcondition(e) return Duel.IsExistingMatchingCard(s.catfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.catlimit(e,c) return not c:IsLinkMonster() -end +end \ No newline at end of file diff --git a/official/c55320758.lua b/official/c55320758.lua index c986328264..e63ca9f46a 100644 --- a/official/c55320758.lua +++ b/official/c55320758.lua @@ -84,4 +84,4 @@ function s.attachop(e,tp,eg,ep,ev,re,r,rp) if xyzc:IsImmuneToEffect(e) or tc:IsImmuneToEffect(e) then return end Duel.Overlay(xyzc,tc,true) end -end +end \ No newline at end of file diff --git a/official/c55321970.lua b/official/c55321970.lua index a7ddffbc7c..649f51fb6e 100644 --- a/official/c55321970.lua +++ b/official/c55321970.lua @@ -1,4 +1,5 @@ --突風の扇 +--Gust Fan local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-200) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c55326322.lua b/official/c55326322.lua index 9b6d937664..f11841478a 100644 --- a/official/c55326322.lua +++ b/official/c55326322.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tokentg) e2:SetOperation(s.tokenop) c:RegisterEffect(e2) @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c55343236.lua b/official/c55343236.lua index 848075421e..4ae4bed8b6 100644 --- a/official/c55343236.lua +++ b/official/c55343236.lua @@ -1,4 +1,5 @@ --Sin 真紅眼の黒竜 +--Malefic Red-Eyes Black Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -27,4 +28,4 @@ function s.descon(e) end function s.antarget(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c55343303.lua b/official/c55343303.lua index 83ec4ccd62..9a7649fbb2 100644 --- a/official/c55343303.lua +++ b/official/c55343303.lua @@ -1,9 +1,9 @@ --- 氷水揺籃 --- Icejade Cradel --- Scripted by Hatter +--氷水揺籃 +--Icejade Cradle +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x16e} +s.listed_series={SET_ICEJADE} function s.filter(c,tp) - return c:IsMonster() and c:IsSetCard(0x16e) and c:IsAbleToHand() - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + return c:IsMonster() and c:IsSetCard(SET_ICEJADE) and c:IsAbleToHand() + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp) end @@ -28,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55348096.lua b/official/c55348096.lua index ce7a38f3b2..43caf14f28 100644 --- a/official/c55348096.lua +++ b/official/c55348096.lua @@ -1,4 +1,5 @@ --武器庫荒らし +--Arsenal Robber local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55349375.lua b/official/c55349375.lua index e7795bdfc5..def62f153c 100644 --- a/official/c55349375.lua +++ b/official/c55349375.lua @@ -1,7 +1,6 @@ --海造賊-青髭の海技士 --Bluebeard, the Plunder Patroll Shipwright --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -29,11 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.drawop) c:RegisterEffect(e2) end -s.listed_series={0x13f} +s.listed_series={SET_PLUNDER_PATROLL} s.listed_names={id} - function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13f) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -50,11 +48,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.drawcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE) end function s.drawcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.drawtarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end diff --git a/official/c55351724.lua b/official/c55351724.lua index 9add0f81de..809971c357 100644 --- a/official/c55351724.lua +++ b/official/c55351724.lua @@ -38,16 +38,16 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_TRIGGER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.aclimit(e,re,tp) local tc=e:GetLabelObject() return re:GetHandler():IsCode(tc:GetCode()) -end +end \ No newline at end of file diff --git a/official/c55359571.lua b/official/c55359571.lua index 168625bc50..65977676d1 100644 --- a/official/c55359571.lua +++ b/official/c55359571.lua @@ -1,4 +1,4 @@ ---Japanese name +--こちょぼの人形祀り --Kochobo's Hinamatsuri --scripted by Naim local s,id=GetID() diff --git a/official/c55375684.lua b/official/c55375684.lua index e1463a8f0b..53f51fe8e3 100644 --- a/official/c55375684.lua +++ b/official/c55375684.lua @@ -35,4 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and g:GetFirst():IsSummonLocation(LOCATION_GRAVE) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55397172.lua b/official/c55397172.lua index c8f80f13a0..0e2df2d2d6 100644 --- a/official/c55397172.lua +++ b/official/c55397172.lua @@ -1,4 +1,4 @@ ---Japanese name +--布都御魂之巳剣 --Futsu no Mitama no Mitsurugi --scripted by Naim local s,id=GetID() diff --git a/official/c55401221.lua b/official/c55401221.lua index 5ed75dbb19..2ba4feb637 100644 --- a/official/c55401221.lua +++ b/official/c55401221.lua @@ -1,4 +1,5 @@ --電池メン-単一型 +--Batteryman D local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.atlimit(e,c) return c:IsFaceup() and c:IsRace(RACE_THUNDER) and c:GetCode()~=id -end +end \ No newline at end of file diff --git a/official/c55410871.lua b/official/c55410871.lua index 577acf80f2..8d438614eb 100644 --- a/official/c55410871.lua +++ b/official/c55410871.lua @@ -36,4 +36,4 @@ end s.listed_names={21082832} function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c55415564.lua b/official/c55415564.lua index a76c58ca30..7602876ef8 100644 --- a/official/c55415564.lua +++ b/official/c55415564.lua @@ -1,7 +1,6 @@ --DDイービル --D/D Evil --Credit to Lyris - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -34,16 +33,16 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.discon) e3:SetCountLimit(1,id) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) end --Part of "D/D" archetype -s.listed_series={0xaf} +s.listed_series={SET_DD} --Check if pendulum summoned function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsControler(tp) and c:IsPendulumSummoned() end --If it ever happened function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -58,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_DISABLE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e0) local e1=e0:Clone() e1:SetDescription(3206) @@ -72,14 +71,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end --If no other "D/D" on your side function s.atkcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xaf),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DD),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end --During opponent's turn function s.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.disfilter(c) - return c:IsNegatableMonster() and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsNegatableMonster() and c:IsPendulumSummoned() end --Activation legality function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -98,13 +97,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c55416843.lua b/official/c55416843.lua index dc8c031414..63d73f4b26 100644 --- a/official/c55416843.lua +++ b/official/c55416843.lua @@ -1,6 +1,5 @@ --蛮族の狂宴LV5 --Feast of the Wild LV5 - local s,id=GetID() function s.initial_effect(c) --Special summon up to 2 level 5 warrior monsters from hand or GY @@ -17,8 +16,8 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -26,7 +25,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if ft>2 then ft=2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,ft,nil,e,tp) if #g>0 then local tc=g:GetFirst() for tc in aux.Next(g) do @@ -35,12 +34,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) --Cannot attack this turn local e3=Effect.CreateEffect(c) @@ -48,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end Duel.SpecialSummonComplete() diff --git a/official/c55424270.lua b/official/c55424270.lua index 3b3adaebcf..2c2356ea41 100644 --- a/official/c55424270.lua +++ b/official/c55424270.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) --remove counter local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.condition) @@ -35,7 +35,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -49,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local n=c:GetCounter(COUNTER_SPELL) if n~=0 then c:RemoveCounter(tp,COUNTER_SPELL,n,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55428242.lua b/official/c55428242.lua index 171bc83aa1..e2601ae2d3 100644 --- a/official/c55428242.lua +++ b/official/c55428242.lua @@ -52,4 +52,4 @@ function s.chainfilter(e,ct) local p=e:GetHandlerPlayer() local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) return p==tp and te:GetActiveType()==TYPE_TRAP -end +end \ No newline at end of file diff --git a/official/c55428811.lua b/official/c55428811.lua index 08cf56280d..40f59c5191 100644 --- a/official/c55428811.lua +++ b/official/c55428811.lua @@ -1,4 +1,5 @@ --ホープ・オブ・フィフス +--Fifth Hope local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c) - return c:IsSetCard(0x3008) and c:IsAbleToDeck() + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end local dc=2 - if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) then dc=3 end + if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler()) then dc=3 end if chk==0 then return Duel.IsPlayerCanDraw(tp,dc) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,5,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) @@ -30,12 +31,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,e:GetLabel(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55461064.lua b/official/c55461064.lua index 8fa5b68ef6..c2509dc33a 100644 --- a/official/c55461064.lua +++ b/official/c55461064.lua @@ -1,4 +1,5 @@ --D-HERO ダガーガイ +--Destiny HERO - Blade Master local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,36 +12,30 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc008) + return c:IsFaceup() and c:IsSetCard(SET_DESTINY_HERO) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c55465441.lua b/official/c55465441.lua index 8857a1f193..374c681eed 100644 --- a/official/c55465441.lua +++ b/official/c55465441.lua @@ -1,4 +1,5 @@ --ギブ&テイク +--Give and Take local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(tc2:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c55470553.lua b/official/c55470553.lua index db19573e65..caf3c41252 100644 --- a/official/c55470553.lua +++ b/official/c55470553.lua @@ -1,4 +1,5 @@ --No.98 絶望皇ホープレス +--Number 98: Antitopian local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.poscost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,12 +30,8 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} s.xyz_number=98 -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local at=Duel.GetAttacker() @@ -48,7 +45,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x107f) and not c:IsType(TYPE_TOKEN) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -67,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end +end \ No newline at end of file diff --git a/official/c55484152.lua b/official/c55484152.lua index fc6db3ee9c..8dceb78a7e 100644 --- a/official/c55484152.lua +++ b/official/c55484152.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetCost(s.setcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) @@ -66,10 +66,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.setfilter(c) return c:IsSetCard(SET_SANGEN) and c:IsSpellTrap() and c:IsSSetable() end diff --git a/official/c55488859.lua b/official/c55488859.lua index f9467b7bd7..a79cc37be2 100644 --- a/official/c55488859.lua +++ b/official/c55488859.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,150,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,150,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,150,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55496220.lua b/official/c55496220.lua index e2c4f39b4f..95a10f4a47 100644 --- a/official/c55496220.lua +++ b/official/c55496220.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.filter(c,code) return c:IsFaceup() and c:IsCode(code) end @@ -30,7 +30,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsSetCard(0xe5) and tc:IsRelateToBattle() + return tc and tc:IsFaceup() and tc:IsSetCard(SET_CIPHER) and tc:IsRelateToBattle() and Duel.IsExistingMatchingCard(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,tc,tc:GetCode()) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -47,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c55501446.lua b/official/c55501446.lua index ab9e7183ea..2fa2f534ce 100644 --- a/official/c55501446.lua +++ b/official/c55501446.lua @@ -1,4 +1,5 @@ --ライト・サーペント +--Lightserpent local s,id=GetID() function s.initial_effect(c) --spsummon @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55521751.lua b/official/c55521751.lua index 213c9d8cdd..7e166ca8ac 100644 --- a/official/c55521751.lua +++ b/official/c55521751.lua @@ -92,4 +92,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,ct,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c55538156.lua b/official/c55538156.lua index c15709c1a1..fb2099a52c 100644 --- a/official/c55538156.lua +++ b/official/c55538156.lua @@ -1,7 +1,6 @@ --極炎舞-「辰斗」 --Ultimate Fire Formation - Sinto --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Negate the activation of opponent's spell/trap card @@ -15,13 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x79,0x7c} - +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x79) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FIST) and c:IsMonster() end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and (c:IsSpell() or c:IsTrap()) + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and (c:IsSpell() or c:IsTrap()) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) diff --git a/official/c5554990.lua b/official/c5554990.lua index 841cdef137..938e10e581 100644 --- a/official/c5554990.lua +++ b/official/c5554990.lua @@ -1,4 +1,5 @@ --エレキンメダイ +--Wattberyx local s,id=GetID() function s.initial_effect(c) --handes @@ -23,5 +24,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c55553602.lua b/official/c55553602.lua index 69e34efa6c..5460d50cdb 100644 --- a/official/c55553602.lua +++ b/official/c55553602.lua @@ -1,4 +1,5 @@ --EMドラマチックシアター +--Performapal Dramatic Theater local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.atkfilter(c) return c:IsFaceup() and c:GetRace()~=0 end @@ -35,7 +36,7 @@ function s.atkvalue(e,c) return ct*200 end function s.confilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:GetRace()~=0 + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) and c:GetRace()~=0 end function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.confilter,tp,LOCATION_MZONE,0,nil) @@ -43,19 +44,19 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ct==4 end function s.spfilter(c,e,sp) - return c:IsSetCard(0x99) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsSetCard(SET_ODD_EYES) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55554175.lua b/official/c55554175.lua index 0c05f125ab..71128b4941 100644 --- a/official/c55554175.lua +++ b/official/c55554175.lua @@ -1,5 +1,5 @@ --EMクラシックリボー ---Performapal ClassiKuriboh +--Performapal Classikuriboh --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,{id,0}) - e3:SetCost(s.sccost) + e3:SetCost(Cost.SelfDiscard) e3:SetTarget(s.sctg) e3:SetOperation(s.scop) c:RegisterEffect(e3) @@ -55,12 +55,7 @@ function s.bpcon(e,tp,eg,ep,ev,re,r,rp) return re and re==e:GetLabelObject() end function s.bpop(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) -end -function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_DISCARD+REASON_COST) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and chkc:GetScale()~=1 end @@ -76,7 +71,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -97,4 +92,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c5556499.lua b/official/c5556499.lua index d9fd76bc8f..ec9916a028 100644 --- a/official/c5556499.lua +++ b/official/c5556499.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -69,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=g:SelectWithSumGreater(tp,Card.GetLevel,8) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_COST|REASON_DISCARD) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) @@ -97,7 +97,7 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,hg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=hg:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c5556668.lua b/official/c5556668.lua index d63a1e50a4..d8c19450ba 100644 --- a/official/c5556668.lua +++ b/official/c5556668.lua @@ -1,4 +1,5 @@ --エクスチェンジ +--Exchange local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ag2=g1:Select(1-tp,1,1,nil) Duel.SendtoHand(ag1,tp,REASON_EFFECT) Duel.SendtoHand(ag2,1-tp,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c55569674.lua b/official/c55569674.lua index 32876f7390..1bc81cc380 100644 --- a/official/c55569674.lua +++ b/official/c55569674.lua @@ -1,4 +1,5 @@ --女神の聖剣-エアトス +--Celestial Sword - Eatos local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -43,8 +44,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500*ct) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c55573346.lua b/official/c55573346.lua index 19173c7722..bec54d17da 100644 --- a/official/c55573346.lua +++ b/official/c55573346.lua @@ -26,5 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c55584558.lua b/official/c55584558.lua index cecd07171a..37098421b5 100644 --- a/official/c55584558.lua +++ b/official/c55584558.lua @@ -56,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then diff --git a/official/c55586621.lua b/official/c55586621.lua index 516f51a322..09892243ab 100644 --- a/official/c55586621.lua +++ b/official/c55586621.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -36,12 +36,12 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.value(e,c) return c:GetLevel()*400 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -50,17 +50,17 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local rc=tc:GetReasonCard() - return #eg==1 and rc:IsControler(tp) and rc:IsSetCard(0x31) and tc:IsPreviousControler(1-tp) + return #eg==1 and rc:IsControler(tp) and rc:IsSetCard(SET_FORTUNE_LADY) and tc:IsPreviousControler(1-tp) and tc:IsMonster() and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FORTUNE_LADY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end diff --git a/official/c55589254.lua b/official/c55589254.lua index 8d428b808d..6163b9168f 100644 --- a/official/c55589254.lua +++ b/official/c55589254.lua @@ -44,15 +44,15 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_WATER) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_WATER) local rg=rg1:Clone() rg:Merge(rg2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg1>0 and #rg2>1 and aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE+ATTRIBUTE_WATER) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE+ATTRIBUTE_WATER) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -69,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -83,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55591586.lua b/official/c55591586.lua index f37275d779..b6ed9371c2 100644 --- a/official/c55591586.lua +++ b/official/c55591586.lua @@ -63,8 +63,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -73,7 +73,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -89,7 +89,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.atkcond(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND + return re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_HAND end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -98,7 +98,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -109,9 +109,9 @@ function s.thcfilter(c) return c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -127,7 +127,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) end @@ -141,10 +141,9 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then if Duel.SelectOption(tp,aux.Stringid(id,5),aux.Stringid(id,6))==0 then - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(sg,nil,1,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c55599882.lua b/official/c55599882.lua index c840757aee..18991b0f4e 100644 --- a/official/c55599882.lua +++ b/official/c55599882.lua @@ -1,4 +1,5 @@ --武神決戦 +--Bujintervention local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -30,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+0x1620000+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESET_TURN_SET|RESET_TOHAND|RESET_TODECK|RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end end @@ -47,9 +48,9 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetBattleTarget() if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)==0 then return end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,nil,tc:GetCode()) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE,nil,tc:GetCode()) if #g>0 then Duel.BreakEffect() Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55608151.lua b/official/c55608151.lua index 669119ac0d..023378135b 100644 --- a/official/c55608151.lua +++ b/official/c55608151.lua @@ -1,4 +1,5 @@ --グリフォンの翼 +--Gryphon Wing local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(18144506) and Duel.IsChainDisablable(ev) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5560911.lua b/official/c5560911.lua index 18718e02e9..c6b83c074f 100644 --- a/official/c5560911.lua +++ b/official/c5560911.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.cost) e1:SetTarget(s.target) diff --git a/official/c55610199.lua b/official/c55610199.lua index 72e34611be..7971de023b 100644 --- a/official/c55610199.lua +++ b/official/c55610199.lua @@ -5,14 +5,14 @@ local s,id=GetID() function s.initial_effect(c) --Fusion Material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),aux.FilterBoolFunctionEx(Card.IsRace,RACE_FAIRY)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),aux.FilterBoolFunctionEx(Card.IsRace,RACE_FAIRY)) --Your "Gem-Knight" monsters cannot be destroyed once during each opponent's turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(_,c) return c:IsSetCard(0x1047) end) + e1:SetTarget(function(_,c) return c:IsSetCard(SET_GEM_KNIGHT) end) e1:SetValue(s.indval) c:RegisterEffect(e1) --Destroy 1 face-up card the opponent controls @@ -29,23 +29,23 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.indval(e,re,r,rp) if Duel.IsTurnPlayer(1-e:GetHandlerPlayer()) and (r&REASON_EFFECT)~=0 then return 1 else return 0 end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and Duel.IsTurnPlayer(tp) and re:IsActiveType(TYPE_MONSTER) + return ep==1-tp and Duel.IsTurnPlayer(tp) and re:IsMonsterEffect() end function s.descfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.descfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.descfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c55610595.lua b/official/c55610595.lua index b257670bc6..9f179928ee 100644 --- a/official/c55610595.lua +++ b/official/c55610595.lua @@ -1,4 +1,5 @@ --BF-上弦のピナーカ +--Blackwing - Pinaki the Waxing Moon local s,id=GetID() function s.initial_effect(c) --synchro limit @@ -16,11 +17,11 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} s.listed_names={id} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x33) + return not c:IsSetCard(SET_BLACKWING) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,12 +34,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,id) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x33) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -51,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55615891.lua b/official/c55615891.lua index 3b39fbf36b..cabc2b1d53 100644 --- a/official/c55615891.lua +++ b/official/c55615891.lua @@ -1,4 +1,5 @@ --E・HERO ワイルド・ウィングマン +--Elemental HERO Wild Wingman local s,id=GetID() function s.initial_effect(c) --fusion material @@ -23,16 +24,16 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -40,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5562461.lua b/official/c5562461.lua index df93927042..7f707a6197 100644 --- a/official/c5562461.lua +++ b/official/c5562461.lua @@ -1,4 +1,5 @@ --闇の幻影 +--Dark Illusion local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.cfilter(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(s.cfilter,1,nil) and Duel.IsChainNegatable(ev) end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55624610.lua b/official/c55624610.lua index e4763f893b..ff074d8d92 100644 --- a/official/c55624610.lua +++ b/official/c55624610.lua @@ -36,4 +36,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c55673611.lua b/official/c55673611.lua index 43c16e79ac..c367f874c4 100644 --- a/official/c55673611.lua +++ b/official/c55673611.lua @@ -1,4 +1,5 @@ --サイコ・トリガー +--Psychic Trigger local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,10 +20,10 @@ function s.filter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) and Duel.IsPlayerCanDraw(tp,2) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) and Duel.IsPlayerCanDraw(tp,2) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)==2 then Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55688914.lua b/official/c55688914.lua index 57c72ca4d1..ca9128e255 100644 --- a/official/c55688914.lua +++ b/official/c55688914.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_MAIN_END|TIMING_DAMAGE_STEP) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetCost(s.opccost) e2:SetTarget(s.vstg) e2:SetOperation(s.vsop) @@ -90,8 +90,8 @@ function s.vsop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local op=e:GetLabel() if op==1 then - c:UpdateDefense(3000,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:UpdateDefense(3000,RESETS_STANDARD_DISABLE_PHASE_END) elseif op==2 then - c:UpdateAttack(3000,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:UpdateAttack(3000,RESETS_STANDARD_DISABLE_PHASE_END) end end \ No newline at end of file diff --git a/official/c55690251.lua b/official/c55690251.lua index 17040cdc80..50c860fb49 100644 --- a/official/c55690251.lua +++ b/official/c55690251.lua @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and tc and tc:IsRelateToEffect(e) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55696885.lua b/official/c55696885.lua index 828ab39cd3..98c9a65d8c 100644 --- a/official/c55696885.lua +++ b/official/c55696885.lua @@ -1,4 +1,5 @@ --疫病狼 +--Plague Wolf local s,id=GetID() function s.initial_effect(c) --atkup @@ -18,7 +19,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -28,7 +29,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55702233.lua b/official/c55702233.lua index 1c25038f0c..a051758b92 100644 --- a/official/c55702233.lua +++ b/official/c55702233.lua @@ -1,7 +1,6 @@ --生きる偲びのシルキィ --Ret-time Reviver Emit-ter --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -44,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c55704856.lua b/official/c55704856.lua index bda28eff3d..b8c4502138 100644 --- a/official/c55704856.lua +++ b/official/c55704856.lua @@ -2,12 +2,13 @@ --Cyberload Fusion local s,id=GetID() function s.initial_effect(c) - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.ListsArchetypeAsMaterial,0x1093),Fusion.OnFieldMat(Card.IsAbleToDeck),s.fextra,Fusion.ShuffleMaterial,nil,s.stage2) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.ListsArchetypeAsMaterial,SET_CYBER_DRAGON),Fusion.OnFieldMat(Card.IsAbleToDeck),s.fextra,Fusion.ShuffleMaterial,nil,s.stage2) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end +s.listed_series={SET_CYBER_DRAGON} function s.fcheck(tp,sg,fc) - return sg:IsExists(aux.FilterBoolFunction(Card.IsSetCard,0x1093,fc,SUMMON_TYPE_FUSION,tp),1,nil) + return sg:IsExists(aux.FilterBoolFunction(Card.IsSetCard,SET_CYBER_DRAGON,fc,SUMMON_TYPE_FUSION,tp),1,nil) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(aux.AND(Card.IsAbleToDeck,Card.IsFaceup)),tp,LOCATION_REMOVED,0,nil),s.fcheck @@ -20,12 +21,10 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetLabel(tc:GetFieldID()) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.atktg(e,c) return e:GetLabel()~=c:GetFieldID() -end - - +end \ No newline at end of file diff --git a/official/c55705473.lua b/official/c55705473.lua index 25bf9e6246..c6a796bc6f 100644 --- a/official/c55705473.lua +++ b/official/c55705473.lua @@ -43,9 +43,9 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.BreakEffect() if Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==0 then - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end end diff --git a/official/c55713623.lua b/official/c55713623.lua index 8d180483f1..7b5731e281 100644 --- a/official/c55713623.lua +++ b/official/c55713623.lua @@ -1,4 +1,5 @@ --収縮 +--Shrink local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetBaseAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c55725117.lua b/official/c55725117.lua index 5ec374ac88..96031d9f87 100644 --- a/official/c55725117.lua +++ b/official/c55725117.lua @@ -1,5 +1,5 @@ --- プランキッズ・ドロップ --- Prank-Kids Dropsies +--プランキッズ・ドロップ +--Prank-Kids Dropsies local s,id=GetID() function s.initial_effect(c) --recover @@ -14,32 +14,31 @@ function s.initial_effect(c) e1:SetOperation(s.recop) c:RegisterEffect(e1) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} s.listed_names={id} function s.reccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x120) and r & REASON_FUSION+REASON_LINK ~=0 + return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(SET_PRANK_KIDS) and r & REASON_FUSION+REASON_LINK ~=0 end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x120) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_PRANK_KIDS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,nil,e,tp) if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c55727845.lua b/official/c55727845.lua index bbc6039d3b..4b4e5c5059 100644 --- a/official/c55727845.lua +++ b/official/c55727845.lua @@ -1,4 +1,5 @@ --No.96 ブラック・ミスト +--Number 96: Dark Mist local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,16 +11,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=96 -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local at=Duel.GetAttackTarget() if chk==0 then return ((at and at:IsFaceup() and Duel.GetAttacker()==e:GetHandler()) or at==e:GetHandler()) @@ -35,7 +32,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -43,7 +40,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c55733143.lua b/official/c55733143.lua index e831193b92..20eafb0333 100644 --- a/official/c55733143.lua +++ b/official/c55733143.lua @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) else Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55735315.lua b/official/c55735315.lua index d89caa6451..2d528b99c1 100644 --- a/official/c55735315.lua +++ b/official/c55735315.lua @@ -1,4 +1,5 @@ --魂食神龍ドレイン・ドラゴン +--Soul Drain Dragon local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -37,7 +38,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(Duel.GetLP(1-tp)-Duel.GetLP(tp)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -46,10 +47,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(0,1) e2:SetValue(0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() e3:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) -end +end \ No newline at end of file diff --git a/official/c55737443.lua b/official/c55737443.lua index bbfa97ef22..3851a65009 100644 --- a/official/c55737443.lua +++ b/official/c55737443.lua @@ -1,5 +1,5 @@ --守護神エクゾード ---Exxod, Master of the Guard +--Exxod, Master of The Guard local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -34,10 +34,10 @@ function s.initial_effect(c) end function s.spcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,nil,0x5c) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,nil,SET_SPHINX) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,nil,0x5c) + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,nil,SET_SPHINX) if g then g:KeepAlive() e:SetLabelObject(g) @@ -65,4 +65,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c55742055.lua b/official/c55742055.lua index 763e86216a..c15394f857 100644 --- a/official/c55742055.lua +++ b/official/c55742055.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) e4:SetTarget(s.target3) e4:SetOperation(s.operation3) c:RegisterEffect(e4) - -- draw + --draw local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,3)) e5:SetCategory(CATEGORY_DRAW) @@ -60,30 +60,29 @@ function s.initial_effect(c) e5:SetOperation(s.operation4) c:RegisterEffect(e5) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.confilter(c) - return c:IsFaceup() and c:IsSetCard(0x107a) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return false end - local g=Duel.GetMatchingGroup(s.confilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) + if Duel.IsTurnPlayer(1-tp) then return false end + local g=Duel.GetMatchingGroup(s.confilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,nil) return g:GetClassCount(Card.GetCode)>=e:GetLabel() end function s.filter1(c) - return c:IsSetCard(0x107a) and c:IsAbleToGrave() + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsAbleToGrave() end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.operation1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_EFFECT) end function s.filter2(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -91,10 +90,9 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.eqfilter(c,tc,tp) - return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) + return c:IsType(TYPE_EQUIP) and c:IsSetCard(SET_NOBLE_ARMS) and c:CheckEquipTarget(tc) and c:CheckUniqueOnField(tp) end function s.operation2(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp) @@ -109,7 +107,7 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x107a) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -119,15 +117,14 @@ function s.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.operation3(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function s.condition4(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp then return false end - local g=Duel.GetMatchingGroup(s.confilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,nil) + if Duel.IsTurnPlayer(1-tp) then return false end + local g=Duel.GetMatchingGroup(s.confilter,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,nil) return g:GetClassCount(Card.GetCode)==12 end function s.target4(e,tp,eg,ep,ev,re,r,rp,chk) @@ -135,6 +132,5 @@ function s.target4(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.operation4(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5574510.lua b/official/c5574510.lua index ae0698d529..65cee2f2fe 100644 --- a/official/c5574510.lua +++ b/official/c5574510.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_SZONE) e1:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e1:SetCost(aux.DiscardCost()) + e1:SetCost(Cost.Discard()) e1:SetTarget(s.dietg) e1:SetOperation(s.dieop) c:RegisterEffect(e1) diff --git a/official/c55749927.lua b/official/c55749927.lua index 0fe41901a0..24249a1899 100644 --- a/official/c55749927.lua +++ b/official/c55749927.lua @@ -1,5 +1,5 @@ --オリファンの角笛 ---Olifant Horn +--Horn of Olifant --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1,id) e1:SetTarget(s.rmvtg) e1:SetOperation(s.rvmop) @@ -20,24 +20,24 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(0,TIMING_END_PHASE|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x149} +s.listed_series={SET_ROLAND} function s.filter(c) return c:IsSpell() and c:IsType(TYPE_EQUIP) and c:IsAbleToRemove() end function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) end function s.rvmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil) if #g and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if #dg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -50,7 +50,7 @@ function s.rvmop(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x149) and c:IsDestructable(e) + return c:IsFaceup() and c:IsSetCard(SET_ROLAND) and c:IsDestructable(e) end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -81,12 +81,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end end @@ -99,10 +99,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e0:SetDescription(aux.Stringid(id,3)) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - if Duel.GetTurnPlayer()==tp then - e0:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) then + e0:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e0:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e0:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) @@ -110,5 +110,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsRace(RACE_WARRIOR) -end - +end \ No newline at end of file diff --git a/official/c55758589.lua b/official/c55758589.lua index be5d9e7650..f8771dd17a 100644 --- a/official/c55758589.lua +++ b/official/c55758589.lua @@ -1,4 +1,5 @@ --フォトン・ワイバーン +--Photon Wyvern local s,id=GetID() function s.initial_effect(c) --Destroy @@ -25,4 +26,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c55761792.lua b/official/c55761792.lua index b1198733df..8e803bb45d 100644 --- a/official/c55761792.lua +++ b/official/c55761792.lua @@ -1,5 +1,6 @@ --カオスの儀式 +--Black Luster Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,5405694) -end +end \ No newline at end of file diff --git a/official/c55762976.lua b/official/c55762976.lua index eb8d6abf7d..fa8a63716d 100644 --- a/official/c55762976.lua +++ b/official/c55762976.lua @@ -1,7 +1,6 @@ --グッサリ@イグニスター --Gussari @Ignister --Scripted by Eerie Code, anime version scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -36,7 +35,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,2}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetCondition(s.btcon) e3:SetOperation(s.btop) c:RegisterEffect(e3) @@ -87,7 +86,7 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(3000) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) a:RegisterEffect(e1) local e2=e1:Clone() d:RegisterEffect(e2) diff --git a/official/c55763552.lua b/official/c55763552.lua index b54509d435..cfc6f950ce 100644 --- a/official/c55763552.lua +++ b/official/c55763552.lua @@ -1,4 +1,5 @@ --壺魔人 +--Dragon Piper local s,id=GetID() function s.initial_effect(c) --flip @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local pg=Duel.GetMatchingGroup(s.pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.ChangePosition(pg,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c55766177.lua b/official/c55766177.lua index 03f749b5a3..8e0c115bbf 100644 --- a/official/c55766177.lua +++ b/official/c55766177.lua @@ -1,7 +1,6 @@ --弑逆の魔轟神 ---Fabled Regicide +--Fabled Treason --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Fabled" monster from GY, destroy 1 card on the field @@ -15,10 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x35} - +s.listed_series={SET_FABLED} function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsSetCard(0x35) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsMonster() and c:IsSetCard(SET_FABLED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -36,10 +34,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end local ex1,tg1=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) local ex2,tg2=Duel.GetOperationInfo(0,CATEGORY_DESTROY) - if tg1 and tg1:GetFirst():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(tg1,0,tp,tp,false,false,POS_FACEUP)~=0 then + if tg1 and tg1:GetFirst():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(tg1,0,tp,tp,false,false,POS_FACEUP)~=0 then if tg2 and tg2:GetFirst():IsRelateToEffect(e) then Duel.Destroy(tg2,REASON_EFFECT) end diff --git a/official/c5577149.lua b/official/c5577149.lua index 37c206a5de..fd0818acca 100644 --- a/official/c5577149.lua +++ b/official/c5577149.lua @@ -1,5 +1,5 @@ --バーバリアン0号 ---Battleguard #0 +--Battleguard Cadet --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetRange(LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2178)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_BATTLEGUARD)) e1:SetValue(500) c:RegisterEffect(e1) --Search 1 "Feast of the Wild LV5" @@ -33,12 +33,12 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(s.spcost) + e4:SetCost(Cost.SelfTribute) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x2178} +s.listed_series={SET_BATTLEGUARD} s.listed_names={55416843} function s.thfilter(c) return c:IsCode(55416843) and c:IsAbleToHand() @@ -55,11 +55,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_WARRIOR) and c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -75,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55773067.lua b/official/c55773067.lua index 51d63f0c3c..0d6a8774cf 100644 --- a/official/c55773067.lua +++ b/official/c55773067.lua @@ -1,4 +1,5 @@ --はたき落とし +--Drop Off local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,10 +24,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=eg:Filter(Card.IsRelateToEffect,nil,e) if #sg==0 then elseif #sg==1 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,ep,HINTMSG_TOGRAVE) local dg=sg:Select(ep,1,1,nil) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c5577649.lua b/official/c5577649.lua index ac7f22a7b3..c50cd7e380 100644 --- a/official/c5577649.lua +++ b/official/c5577649.lua @@ -1,4 +1,5 @@ --スクラップ・クラッシュ +--Scrap Crash local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,tp) - return c:IsSetCard(0x24) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_SCRAP) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:GetPreviousLocation()==LOCATION_MZONE and (c:GetPreviousPosition()&POS_FACEUP)~=0 end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -29,4 +30,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c55787576.lua b/official/c55787576.lua index aa9d387143..2a698b8a7c 100644 --- a/official/c55787576.lua +++ b/official/c55787576.lua @@ -28,33 +28,29 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,id) - e4:SetCost(s.spcost) + e4:SetCost(Cost.PayLP(1000)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.immval(e,te) local tc=te:GetOwner() - return tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:IsSummonLocation(LOCATION_EXTRA) and te:IsActiveType(TYPE_MONSTER) + return tc:IsSpecialSummoned() and tc:IsSummonLocation(LOCATION_EXTRA) and te:IsMonsterEffect() and te:IsActivated() and te:GetActivateLocation()==LOCATION_MZONE end function s.tgtg(e,c) - return c:IsFaceup() and c:IsSetCard(0xfe) and (e:GetHandler():GetColumnGroup():IsContains(c) or e:GetHandler()==c) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + return c:IsFaceup() and c:IsSetCard(SET_WORLD_LEGACY) and (e:GetHandler():GetColumnGroup():IsContains(c) or e:GetHandler()==c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,1-tp,false,false) @@ -62,7 +58,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),1-tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),1-tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp) if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,1)) then Duel.BreakEffect() diff --git a/official/c55794644.lua b/official/c55794644.lua index 0d85567377..6b79363693 100644 --- a/official/c55794644.lua +++ b/official/c55794644.lua @@ -25,19 +25,19 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x44} +s.listed_series={SET_THE_AGENT} s.listed_names={CARD_SANCTUARY_SKY} function s.spfilter(c) - return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,true) + return c:IsSetCard(SET_THE_AGENT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,true) end function s.hspcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) return aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -74,11 +74,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55818463.lua b/official/c55818463.lua index b85eab7b89..07c3826bfc 100644 --- a/official/c55818463.lua +++ b/official/c55818463.lua @@ -1,4 +1,5 @@ --死王リッチーロード +--Lich Lord, King of the Underworld local s,id=GetID() function s.initial_effect(c) --tribute limit @@ -33,4 +34,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c55821894.lua b/official/c55821894.lua index 02d17e122f..34f11eacbe 100644 --- a/official/c55821894.lua +++ b/official/c55821894.lua @@ -1,4 +1,5 @@ --アマゾネスの格闘戦士 +--Amazoness Fighter local s,id=GetID() function s.initial_effect(c) --battle dam 0 @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c55824220.lua b/official/c55824220.lua index f821c7cb8e..c2464c92ba 100644 --- a/official/c55824220.lua +++ b/official/c55824220.lua @@ -3,6 +3,6 @@ local s,id=GetID() function s.initial_effect(c) --Activate - c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047))) + c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT))) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} \ No newline at end of file diff --git a/official/c55838342.lua b/official/c55838342.lua index 15fece65de..8b4e866d0b 100644 --- a/official/c55838342.lua +++ b/official/c55838342.lua @@ -12,17 +12,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x01040116,0x21,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x01040116,TYPE_MONSTER|TYPE_EFFECT,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x01040116,0x21,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x01040116,TYPE_MONSTER|TYPE_EFFECT,300,2100,2,RACE_INSECT,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.thcon) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -44,7 +44,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLinkedGroup(tp,LOCATION_MZONE,0):IsContains(e:GetHandler()) end function s.filter(c) - return c:IsSetCard(0xfe) and c:IsAbleToHand() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -57,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55863245.lua b/official/c55863245.lua index 89898980b9..a7ccf0d69b 100644 --- a/official/c55863245.lua +++ b/official/c55863245.lua @@ -1,4 +1,5 @@ --たつのこ +--Tatsunoko local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,7 +27,7 @@ function s.syncon(e) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end function s.synval(e,c,sc) if c:IsLocation(LOCATION_HAND) then @@ -68,4 +69,4 @@ function s.synchktg(e,c,sg,tg,ntg,tsg,ntsg) else return true end -end +end \ No newline at end of file diff --git a/official/c55870497.lua b/official/c55870497.lua index 590ba54301..35ca8e1f05 100644 --- a/official/c55870497.lua +++ b/official/c55870497.lua @@ -18,10 +18,10 @@ function s.initial_effect(c) e3:SetOperation(s.skipop) c:RegisterEffect(e3) end -s.listed_series={0x60} +s.listed_series={SET_BAMBOO_SWORD} function s.skipcon(e,tp,eg,ep,ev,re,r,rp) return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) - and re:GetHandler():IsSetCard(0x60) + and re:GetHandler():IsSetCard(SET_BAMBOO_SWORD) end function s.skipop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -30,6 +30,6 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SKIP_M1) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c55875323.lua b/official/c55875323.lua index 5de47204ea..3e5960052a 100644 --- a/official/c55875323.lua +++ b/official/c55875323.lua @@ -1,6 +1,5 @@ --でんきトカゲ --Electric Lizard - local s,id=GetID() function s.initial_effect(c) --A non-zombie monster that attacked this card cannot attack next turn @@ -28,7 +27,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.atkcon) e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,2) tc:RegisterEffect(e1) end end diff --git a/official/c55878038.lua b/official/c55878038.lua index 0a108db9ac..701afb8de6 100644 --- a/official/c55878038.lua +++ b/official/c55878038.lua @@ -1,7 +1,6 @@ --混源龍レヴィオニア --Chaos Dragon Levianeer --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -35,11 +34,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then local tab={} @@ -116,7 +115,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -132,12 +131,12 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil) if #hg>0 then local sg=hg:RandomSelect(tp,1) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -147,11 +146,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55885348.lua b/official/c55885348.lua index f5b7546675..0d4b99748d 100644 --- a/official/c55885348.lua +++ b/official/c55885348.lua @@ -1,4 +1,5 @@ --Kozmo-ダークシミター +--Kozmo Dark Destroyer local s,id=GetID() function s.initial_effect(c) --destroy @@ -30,12 +31,12 @@ function s.initial_effect(c) e4:SetCode(EVENT_TO_GRAVE) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCondition(s.spcon) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -51,10 +52,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -68,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c55888045.lua b/official/c55888045.lua index 4800352721..db285259d0 100644 --- a/official/c55888045.lua +++ b/official/c55888045.lua @@ -30,4 +30,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or Duel.GetCurrentChain()~=ev+1 or c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)<1 then return end local g=Duel.GetMatchingGroup(Card.IsNegatable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) g:ForEach(function(tc) tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) end) -end +end \ No newline at end of file diff --git a/official/c55920742.lua b/official/c55920742.lua index 3a8e662891..6ba9af7d12 100644 --- a/official/c55920742.lua +++ b/official/c55920742.lua @@ -1,9 +1,9 @@ --- No-P.U.N.K.フォクシー・チューン --- Noh P.U.N.K. Foxy Tune --- Scripted by Hatter +--No-P.U.N.K.フォクシー・チューン +--Noh-P.U.N.K. Foxy Tune +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Gain LP + --Gain LP local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_RECOVER) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.lptg) e1:SetOperation(s.lpop) c:RegisterEffect(e1) - -- Special Summon self + --Special Summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -25,19 +25,19 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Send to GY and Special Summon from Deck + --Send to GY and Special Summon from Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.tgcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) local dam=e:GetHandler():GetBattleTarget():GetBaseAttack() if chk==0 then return dam>0 end @@ -50,9 +50,9 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckMMZ,nil,0x173) end + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckMMZ,nil,SET_PUNK) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckMMZ,nil,0x173) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckMMZ,nil,SET_PUNK) Duel.Release(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,12 +65,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.tgspfilter(c,e,tp) - return c:IsSetCard(0x173) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PUNK) and not c:IsLevel(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -92,4 +88,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c5592689.lua b/official/c5592689.lua index ecfed9b6d3..ad509a9d20 100644 --- a/official/c5592689.lua +++ b/official/c5592689.lua @@ -1,4 +1,5 @@ --サクリファイス・ロータス +--Samsara Lotus local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCondition(s.dmcon) e2:SetTarget(s.dmtg) @@ -28,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -44,7 +45,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) end end function s.dmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.dmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -56,4 +57,4 @@ function s.dmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c55935416.lua b/official/c55935416.lua index 2a54880318..aff752c2b5 100644 --- a/official/c55935416.lua +++ b/official/c55935416.lua @@ -1,4 +1,5 @@ --No.56 ゴールドラット +--Number 56: Gold Rat local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,16 +12,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.drcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=56 -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -35,4 +32,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55936191.lua b/official/c55936191.lua index dbb131ccca..b20a203f58 100644 --- a/official/c55936191.lua +++ b/official/c55936191.lua @@ -1,5 +1,5 @@ --ベアルクティ-ミクタナス ---Ursarctic Mictanus +--Ursarctic Miktanus local s,id=GetID() function s.initial_effect(c) --special summon @@ -16,9 +16,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} function s.thfilter(c) - return c:IsSetCard(0x165) and c:IsAbleToHand() and c:IsMonster() and not c:IsCode(id) + return c:IsSetCard(SET_URSARCTIC) and c:IsAbleToHand() and c:IsMonster() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -32,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55969226.lua b/official/c55969226.lua index 3f30fb41d6..b071781dca 100644 --- a/official/c55969226.lua +++ b/official/c55969226.lua @@ -1,4 +1,5 @@ --青竜の召喚士 +--Blue Dragon Summoner local s,id=GetID() function s.initial_effect(c) --tohand @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON+RACE_WARRIOR+RACE_SPELLCASTER) and c:IsAbleToHand() + return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON|RACE_WARRIOR|RACE_SPELLCASTER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c55982698.lua b/official/c55982698.lua index 24efd0a5f5..674f9e9286 100644 --- a/official/c55982698.lua +++ b/official/c55982698.lua @@ -1,4 +1,5 @@ --A・O・J リバース・ブレイク +--Ally of Justice Reverse Break local s,id=GetID() function s.initial_effect(c) --destroy @@ -39,4 +40,4 @@ function s.sdfilter(c) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c55985014.lua b/official/c55985014.lua index e1ee10ef63..1c3523b632 100644 --- a/official/c55985014.lua +++ b/official/c55985014.lua @@ -1,4 +1,5 @@ --ミラクル・キッズ +--Miracle Kids local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_names={32679370} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,32679370) @@ -31,8 +29,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-val) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c55990317.lua b/official/c55990317.lua index 3accbe163f..0fa1acbcaa 100644 --- a/official/c55990317.lua +++ b/official/c55990317.lua @@ -41,7 +41,7 @@ end s.listed_series={SET_RUNICK} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsFieldSpell() and c:IsSetCard(SET_RUNICK) and c:IsAbleToHand() @@ -70,7 +70,7 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return r&(REASON_EFFECT|REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) @@ -82,6 +82,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c55991637.lua b/official/c55991637.lua index e9f4c06c12..1b27a968ba 100644 --- a/official/c55991637.lua +++ b/official/c55991637.lua @@ -1,4 +1,5 @@ --火竜の火炎弾 +--Dragon's Gunfire local s,id=GetID() function s.initial_effect(c) --damage @@ -54,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and s.dfilter(tc) and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c55997110.lua b/official/c55997110.lua index 62dac46f56..efd509c9b5 100644 --- a/official/c55997110.lua +++ b/official/c55997110.lua @@ -1,4 +1,5 @@ --EMハンサムライガー +--Performapal Handsamuraiger local s,id=GetID() function s.initial_effect(c) --search @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c5600127.lua b/official/c5600127.lua index 71efd1fb39..9b8804fe74 100644 --- a/official/c5600127.lua +++ b/official/c5600127.lua @@ -1,7 +1,8 @@ --ヒューマノイド・ドレイク +--Humanoid Worm Drake local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,73216412,46821314) -end +end \ No newline at end of file diff --git a/official/c56001930.lua b/official/c56001930.lua index d1efbf60d7..b203f3d323 100644 --- a/official/c56001930.lua +++ b/official/c56001930.lua @@ -1,5 +1,5 @@ --怪蹴一色 ---The Stomping of the Normal +--The Return to the Normal --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56003780.lua b/official/c56003780.lua index 481e0c12cf..0982b44b3e 100644 --- a/official/c56003780.lua +++ b/official/c56003780.lua @@ -21,21 +21,21 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} s.listed_names={id} function s.cfilter(c,e,tp,sc) - return c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsFaceup() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.tdfilter(c) - return c:IsSetCard(0x119) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToDeck() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToDeck() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end local c=e:GetHandler() - local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,LOCATION_MZONE,0,nil,0x119) + local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,LOCATION_MZONE,0,nil,SET_SALAMANGREAT) if chk==0 then return zone>0 and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) @@ -46,8 +46,8 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,LOCATION_MZONE,0,nil,0x119) - if tc:IsRelateToEffect(e) and s.tdfilter(tc) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) + local zone=aux.GetMMZonesPointedTo(tp,Card.IsSetCard,LOCATION_MZONE,0,nil,SET_SALAMANGREAT) + if tc:IsRelateToEffect(e) and s.tdfilter(tc) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) and zone>0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone) end diff --git a/official/c56043446.lua b/official/c56043446.lua index dc73fdd379..1450ed278a 100644 --- a/official/c56043446.lua +++ b/official/c56043446.lua @@ -1,4 +1,5 @@ --万力魔神バイサー・デス +--Viser Des local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,17 +27,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) e2:SetCondition(s.rcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,3) c:RegisterEffect(e2) end end @@ -44,7 +45,7 @@ function s.rcon(e) return e:GetHandler():GetFirstCardTarget()~=nil end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() @@ -56,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ct==3 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56043447.lua b/official/c56043447.lua deleted file mode 100644 index dc73fdd379..0000000000 --- a/official/c56043447.lua +++ /dev/null @@ -1,59 +0,0 @@ ---万力魔神バイサー・デス -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end - if chk==0 then return true end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then - c:SetCardTarget(tc) - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetCondition(s.descon) - e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) - c:RegisterEffect(e1) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetValue(1) - e2:SetCondition(s.rcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3) - c:RegisterEffect(e2) - end -end -function s.rcon(e) - return e:GetHandler():GetFirstCardTarget()~=nil -end -function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.desop(e,tp,eg,ep,ev,re,r,rp) - local tc=e:GetHandler():GetFirstCardTarget() - if not tc then return end - local ct=e:GetLabel() - ct=ct+1 - e:SetLabel(ct) - e:GetHandler():SetTurnCounter(ct) - if ct==3 then - Duel.Destroy(tc,REASON_EFFECT) - end -end diff --git a/official/c56049970.lua b/official/c56049970.lua index 544db7c81b..ee54a97fac 100644 --- a/official/c56049970.lua +++ b/official/c56049970.lua @@ -20,17 +20,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} function s.desfilter(c,ft) return c:IsFaceup() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xea) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTRON) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,7 +59,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -71,7 +71,7 @@ function s.lizfilter(e,c) return not (c:IsOriginalRace(RACE_MACHINE) and c:IsOriginalType(TYPE_SYNCHRO)) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xea) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTRON) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -85,4 +85,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56051086.lua b/official/c56051086.lua index 7d3fc99724..8c4a0c03ff 100644 --- a/official/c56051086.lua +++ b/official/c56051086.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -43,17 +43,13 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=43 function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x48) -end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return ec:IsControler(tp) and ec:IsSetCard(SET_NUMBER) end function s.filter(c) - return c:IsSetCard(0x48) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_NUMBER) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -72,7 +68,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.indcon(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x48) + return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_NUMBER) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp @@ -89,7 +85,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) Duel.Damage(1-tp,ev,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56051648.lua b/official/c56051648.lua index 32e33c699f..ad010f6fe3 100644 --- a/official/c56051648.lua +++ b/official/c56051648.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end s.listed_names={69550260} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,3,nil,RACE_INSECT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c56052205.lua b/official/c56052205.lua index ab65f9bfed..ef77ef806a 100644 --- a/official/c56052205.lua +++ b/official/c56052205.lua @@ -1,4 +1,5 @@ --貫ガエル +--Unifrog local s,id=GetID() function s.initial_effect(c) --direct @@ -18,16 +19,16 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x12) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_FROG) and c:GetCode()~=id end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.GetAttackTarget()==nil and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and s.filter(chkc) end @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56058749.lua b/official/c56058749.lua index d7980c5bd5..7d5a3c00ac 100644 --- a/official/c56058749.lua +++ b/official/c56058749.lua @@ -1,5 +1,5 @@ --ドレミコード・ムジカ ---Doremichord Musica +--Solfachord Musica --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetTarget(s.target) c:RegisterEffect(e1) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.cfilter(c,f) - return c:IsFaceup() and c:IsSetCard(0x164) and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and f(c) + return c:IsFaceup() and c:IsSetCard(SET_SOLFACHORD) and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and f(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end @@ -94,4 +94,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56058888.lua b/official/c56058888.lua index 87e0258232..808830e058 100644 --- a/official/c56058888.lua +++ b/official/c56058888.lua @@ -1,4 +1,5 @@ --王宮の陥落 +--Royal Surrender local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56063182.lua b/official/c56063182.lua index e374016b2f..f0004cd598 100644 --- a/official/c56063182.lua +++ b/official/c56063182.lua @@ -1,5 +1,5 @@ --肆世壊=ライフォビア ---Lifobia, the Wanton and Willful World of Desire +--Primitive Planet Reichphobia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -35,9 +35,9 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x17c} +s.listed_series={SET_SCARECLAW} function s.thfilter(c) - return ((c:IsSetCard(0x17c) and c:IsMonster()) or c:IsCode(CARD_VISAS_STARFROST)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_SCARECLAW) and c:IsMonster()) or c:IsCode(CARD_VISAS_STARFROST)) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end diff --git a/official/c5606466.lua b/official/c5606466.lua index 3ffb8210e0..9500f670c6 100644 --- a/official/c5606466.lua +++ b/official/c5606466.lua @@ -1,4 +1,5 @@ --異次元の落とし穴 +--D.D. Trap Hole local s,id=GetID() function s.initial_effect(c) --Activate @@ -65,4 +66,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc1 and tc1:IsRelateToEffect(e) and tc2 and tc2:IsRelateToEffect(e) and sc:IsFacedown() then Duel.Destroy(g,REASON_EFFECT,LOCATION_REMOVED) end -end +end \ No newline at end of file diff --git a/official/c56074358.lua b/official/c56074358.lua index 68c7ea91a3..1d48b73319 100644 --- a/official/c56074358.lua +++ b/official/c56074358.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_FZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MORPHTRONIC)) e3:SetValue(s.atkval) c:RegisterEffect(e3) --special summon @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} s.counter_place_list={0x8} function s.atkval(e,c) return e:GetHandler():GetCounter(0x8)*300 @@ -58,7 +58,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and (c:GetPreviousLocation()&LOCATION_ONFIELD)~=0 end function s.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5609226.lua b/official/c5609226.lua index fd32059878..493f6989c2 100644 --- a/official/c5609226.lua +++ b/official/c5609226.lua @@ -1,6 +1,5 @@ --チューナーズ・バリア --Tuner's Barrier - local s,id=GetID() function s.initial_effect(c) --Targeted tuner monster cannot be destroyed by battle or card effect @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_BATTLE_START) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_BATTLE_START) c:RegisterEffect(e1) end function s.filter(c) @@ -32,13 +31,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c56094445.lua b/official/c56094445.lua index 4599b74f17..39300d72ce 100644 --- a/official/c56094445.lua +++ b/official/c56094445.lua @@ -1,4 +1,5 @@ --古代の機械兵士 +--Ancient Gear Soldier local s,id=GetID() function s.initial_effect(c) --actlimit @@ -17,4 +18,4 @@ function s.aclimit(e,re,tp) end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c56099748.lua b/official/c56099748.lua index 6bc5f7b13f..d383e25f47 100644 --- a/official/c56099748.lua +++ b/official/c56099748.lua @@ -1,5 +1,5 @@ --ヴィサス=スタフロスト ---Visas=Stafrost +--Visas Starfrost --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -46,13 +46,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then local bc=c:GetBattleTarget() - local atk=math.max(bc:GetBaseAttack(),bc:GetBaseDefense())/2 + local atk=math.max(bc:GetBaseAttack(),bc:GetBaseDefense())/2 --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c56100345.lua b/official/c56100345.lua index 8ec8b057a8..2b7ee419b5 100644 --- a/official/c56100345.lua +++ b/official/c56100345.lua @@ -60,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c56105047.lua b/official/c56105047.lua index 03516987ee..9207c74979 100644 --- a/official/c56105047.lua +++ b/official/c56105047.lua @@ -1,4 +1,5 @@ --ゴゴゴゴースト +--Gogogo Ghost local s,id=GetID() function s.initial_effect(c) --spsummon @@ -34,4 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c56111151.lua b/official/c56111151.lua index 00841297cd..f3cf991a4c 100644 --- a/official/c56111151.lua +++ b/official/c56111151.lua @@ -2,8 +2,8 @@ --Kyoutou Waterfront local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x37) - c:SetCounterLimit(0x37,5) + c:EnableCounterPermit(COUNTER_KAIJU) + c:SetCounterLimit(COUNTER_KAIJU,5) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -36,22 +36,22 @@ function s.initial_effect(c) e4:SetOperation(s.desrepop) c:RegisterEffect(e4) end -s.listed_series={0xd3} -s.counter_place_list={0x37} +s.listed_series={SET_KAIJU} +s.counter_place_list={COUNTER_KAIJU} function s.cfilter(c) return c:IsPreviousLocation(LOCATION_ONFIELD) end function s.counter(e,tp,eg,ep,ev,re,r,rp) local ct=eg:FilterCount(s.cfilter,nil) if ct>0 then - e:GetHandler():AddCounter(0x37,ct,true) + e:GetHandler():AddCounter(COUNTER_KAIJU,ct,true) end end function s.thfilter(c) - return c:IsSetCard(0xd3) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x37)>=3 + return e:GetHandler():GetCounter(COUNTER_KAIJU)>=3 end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -68,9 +68,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsReason(REASON_REPLACE+REASON_RULE) - and e:GetHandler():IsCanRemoveCounter(tp,0x37,1,REASON_EFFECT) end + and e:GetHandler():IsCanRemoveCounter(tp,COUNTER_KAIJU,1,REASON_EFFECT) end return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RemoveCounter(tp,0x37,1,REASON_EFFECT) -end + e:GetHandler():RemoveCounter(tp,COUNTER_KAIJU,1,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c5611760.lua b/official/c5611760.lua index f451eabb03..3a62c6b69a 100644 --- a/official/c5611760.lua +++ b/official/c5611760.lua @@ -1,9 +1,9 @@ --- 救いの架け橋 --- Bridge of Salvation --- Scripted by Hatter +--救いの架け橋 +--Rainbow Bridge of Salvation +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) - -- Search 1 "Crystal Beast" and 1 Field Spell + --Search 1 "Crystal Beast" and 1 Field Spell local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -23,18 +23,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCondition(function(_,tp) return Duel.GetFlagEffect(tp,id+1)==0 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelAbove,10),tp,LOCATION_MZONE,LOCATION_MZONE,nil) return #g>1 and g:GetClassCount(Card.GetRace)>1 and Duel.GetFlagEffect(tp,id)==0 end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE + local loc=LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,loc,loc,nil,e:GetHandler()) if chk==0 then return #g>0 and Duel.IsPlayerCanDraw(tp,5) and Duel.IsPlayerCanDraw(1-tp,5) end Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) @@ -43,11 +43,11 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end Duel.RegisterFlagEffect(tp,id,0,0,0) - local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE + local loc=LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,loc,loc,nil,e:GetHandler()) - if #g>0 and Duel.SendtoDeck(g,nil,0,REASON_EFFECT)>0 then + if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then local og=Duel.GetOperatedGroup() - if not og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end + if not og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then return end local dg=og:Filter(Card.IsLocation,nil,LOCATION_DECK) local ct=dg:FilterCount(Card.IsControler,nil,tp) if ct>0 then Duel.ShuffleDeck(tp) end @@ -58,7 +58,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.cbfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0x1034) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.fsfilter,tp,LOCATION_DECK,0,1,c) end function s.fsfilter(c) @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g<2 then return end Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) -end +end \ No newline at end of file diff --git a/official/c56119752.lua b/official/c56119752.lua index 9988adb213..3c9b9ddb3c 100644 --- a/official/c56119752.lua +++ b/official/c56119752.lua @@ -1,4 +1,5 @@ --プレゼントカード +--Present Card local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,8 +20,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) - if Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)~=0 then + if Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD)~=0 then Duel.BreakEffect() Duel.Draw(1-tp,5,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56120475.lua b/official/c56120475.lua index bf2709bc1a..a6283f662c 100644 --- a/official/c56120475.lua +++ b/official/c56120475.lua @@ -1,4 +1,5 @@ --炸裂装甲 +--Sakuretsu Armor local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:CanAttack() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56132807.lua b/official/c56132807.lua index fc98dec83b..c2ceda001a 100644 --- a/official/c56132807.lua +++ b/official/c56132807.lua @@ -1,4 +1,5 @@ --アップル・マジシャン・ガール +--Apple Magician Girl local s,id=GetID() function s.initial_effect(c) --spsummon @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x20a2} +s.listed_series={SET_MAGICIAN_GIRL} function s.spfilter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -47,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(math.ceil(a:GetAttack()/2)) a:RegisterEffect(e1) end @@ -57,7 +58,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.thfilter(c) - return c:IsSetCard(0x20a2) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MAGICIAN_GIRL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c56146300.lua b/official/c56146300.lua index d5891341a1..9d3e830e5a 100644 --- a/official/c56146300.lua +++ b/official/c56146300.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) diff --git a/official/c5614808.lua b/official/c5614808.lua index dec6b61d07..c08c2f5d75 100644 --- a/official/c5614808.lua +++ b/official/c5614808.lua @@ -1,4 +1,5 @@ --白闘気白鯨 +--White Aura Whale local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -41,7 +42,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) end @@ -56,16 +57,16 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.cfilter(c,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,8 +80,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c56161953.lua b/official/c56161953.lua index 8a23cc54b4..5542140403 100644 --- a/official/c56161953.lua +++ b/official/c56161953.lua @@ -1,7 +1,6 @@ --スクリプトン --Scrypton --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -32,9 +31,9 @@ function s.costfilter(c) return c:IsRace(RACE_CYBERSE) and c:IsAbleToRemoveAsCost() and not c:IsCode(id) and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,6 +63,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c5616412.lua b/official/c5616412.lua index ebbb2bef60..7c722a6b36 100644 --- a/official/c5616412.lua +++ b/official/c5616412.lua @@ -1,4 +1,5 @@ --カウンターパンチ +--Destruction Punch local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56166150.lua b/official/c56166150.lua index b976c70dc6..f8d49e93f3 100644 --- a/official/c56166150.lua +++ b/official/c56166150.lua @@ -27,19 +27,19 @@ function s.initial_effect(c) e2:SetOperation(s.ddop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} s.listed_names={id} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x38) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) + return c:IsMonster() and c:IsSetCard(SET_LIGHTSWORN) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x38) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_LIGHTSWORN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -59,8 +59,8 @@ end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c - and rc:IsSetCard(0x38) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c + and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsControler(tp) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -68,4 +68,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56174248.lua b/official/c56174248.lua index bcb5d4f328..44288bdbf1 100644 --- a/official/c56174248.lua +++ b/official/c56174248.lua @@ -1,4 +1,5 @@ --魔導鬼士 ディアール +--Prophecy Destroyer local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.rfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_GRAVE,0,3,nil) end @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56196385.lua b/official/c56196385.lua index 66261c6fd6..d3974416e0 100644 --- a/official/c56196385.lua +++ b/official/c56196385.lua @@ -1,7 +1,6 @@ --鉄獣戦線 キット ---Tri-Brigade Kit +--Tri-Brigade Kitt --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -29,10 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Tri-Brigade" archetype -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} --Specifically lists itself s.listed_names={id} - --Check for beast, beast-warrior, or winged beast monsters to banish as cost function s.rmfilter(c) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) @@ -44,7 +42,7 @@ function s.spfilter(c,e,tp,ct,g) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local nums={} for i=1,#g do if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,i,g) then @@ -73,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.matlimit) e1:SetTargetRange(LOCATION_ALL,LOCATION_ALL) e1:SetValue(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Client hint aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) @@ -96,7 +94,7 @@ function s.sumlimit(e,c) end --Check for "Tri-Brigade" card, except "Tri-Brigade Kit" function s.tgfilter(c) - return c:IsSetCard(0x14f) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_TRI_BRIGADE) and not c:IsCode(id) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c56209279.lua b/official/c56209279.lua index 0ef4840809..135f41d4e6 100644 --- a/official/c56209279.lua +++ b/official/c56209279.lua @@ -1,4 +1,5 @@ --インフェルニティ・ネクロマンサー +--Infernity Necromancer local s,id=GetID() function s.initial_effect(c) --to defense @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.potg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return e:GetHandler():IsAttackPos() end Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) @@ -38,7 +39,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsDisabled() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end function s.filter(c,e,tp) - return c:IsSetCard(0xb) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INFERNITY) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -53,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56223084.lua b/official/c56223084.lua index d82a76b72b..c2e4c69773 100644 --- a/official/c56223084.lua +++ b/official/c56223084.lua @@ -1,4 +1,5 @@ --ハリマンボウ +--Needle Sunfish local s,id=GetID() function s.initial_effect(c) --atkdown @@ -25,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c56240989.lua b/official/c56240989.lua index 7cef65d1c6..3ed1bc5632 100644 --- a/official/c56240989.lua +++ b/official/c56240989.lua @@ -1,4 +1,5 @@ --エヴォルド・カシネリア +--Evoltile Casinerio local s,id=GetID() function s.initial_effect(c) --destroy @@ -13,24 +14,20 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsLevelBelow(6) and c:IsRace(RACE_DINOSAUR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,154,tp,false,false) @@ -60,19 +57,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc2=dg:Filter(Card.IsCode,tc1,tc1:GetCode()):GetFirst() Duel.SpecialSummonStep(tc1,154,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc2,154,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc1:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + tc2:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1,true) local e2=e1:Clone() tc2:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e3,true) local e4=e3:Clone() tc2:RegisterEffect(e4,true) @@ -105,4 +102,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.rmfilter,nil,e:GetLabel()) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56246017.lua b/official/c56246017.lua index 75a27c4f00..66adccbc5a 100644 --- a/official/c56246017.lua +++ b/official/c56246017.lua @@ -10,16 +10,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_series={SET_ARCHFIEND} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.filter(c,e,tp) return c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c56252810.lua b/official/c56252810.lua index 11d52cef17..01c9ba3378 100644 --- a/official/c56252810.lua +++ b/official/c56252810.lua @@ -1,6 +1,5 @@ --Re-BUSTER --Assault Revival - local s,id=GetID() function s.initial_effect(c) --Destroy all your monsters, special summon 1 "/Assault Mode" monster from GY @@ -15,9 +14,8 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x104f} +s.listed_series={SET_ASSAULT_MODE} s.listed_names={CARD_ASSAULT_MODE} - function s.cfilter(c) return c:IsCode(CARD_ASSAULT_MODE) and c:IsAbleToRemoveAsCost() end @@ -28,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x104f) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_ASSAULT_MODE) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,12 +51,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Cannot be tributed local e3=Effect.CreateEffect(c) @@ -66,13 +64,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_UNRELEASABLE_SUM) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(1) tc:RegisterEffect(e3,true) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) e4:SetValue(1) tc:RegisterEffect(e4,true) --Banish it if it leaves the field @@ -81,7 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e5:SetReset(RESET_EVENT+RESETS_REDIRECT) + e5:SetReset(RESET_EVENT|RESETS_REDIRECT) e5:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e5,true) end diff --git a/official/c56256517.lua b/official/c56256517.lua index 2c140db75e..f436a13d30 100644 --- a/official/c56256517.lua +++ b/official/c56256517.lua @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabel(fid) e1:SetLabelObject(g) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c56260110.lua b/official/c56260110.lua index 6718934b67..9ddcaf33cc 100644 --- a/official/c56260110.lua +++ b/official/c56260110.lua @@ -1,4 +1,5 @@ --雷鳴 +--Raimei local s,id=GetID() function s.initial_effect(c) --damage @@ -20,4 +21,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56286179.lua b/official/c56286179.lua index 385ace3e37..184f5e7d9e 100644 --- a/official/c56286179.lua +++ b/official/c56286179.lua @@ -1,4 +1,5 @@ --ドリル・シンクロン +--Drill Synchron local s,id=GetID() function s.initial_effect(c) --pierce @@ -41,4 +42,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56292140.lua b/official/c56292140.lua index f7b268818a..0463c0d0f3 100644 --- a/official/c56292140.lua +++ b/official/c56292140.lua @@ -1,4 +1,5 @@ --No.51 怪腕のフィニッシュ・ホールド +--Number 51: Finisher the Strong Arm local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x40) @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetCost(s.ctcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.descon) @@ -36,10 +37,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=51 -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x40) @@ -62,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56294501.lua b/official/c56294501.lua index e92ae33c60..9ecfbf032f 100644 --- a/official/c56294501.lua +++ b/official/c56294501.lua @@ -54,7 +54,7 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp) end end function s.dncond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.dntg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,nil) end @@ -67,4 +67,4 @@ function s.dnop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c56321639.lua b/official/c56321639.lua index 8bbb525951..711dae87c2 100644 --- a/official/c56321639.lua +++ b/official/c56321639.lua @@ -52,12 +52,12 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} s.counter_list={COUNTER_SPELL} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local c=re:GetHandler() - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:IsSetCard(0x106e) and e:GetHandler():GetFlagEffect(1)>0 + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and c:IsSetCard(SET_SPELLBOOK) and e:GetHandler():GetFlagEffect(1)>0 end function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(COUNTER_SPELL,1) @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c56337500.lua b/official/c56337500.lua index 0e8da1556d..26f9c39eb8 100644 --- a/official/c56337500.lua +++ b/official/c56337500.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x118} +s.listed_series={SET_CYNET} function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsRace(RACE_CYBERSE) end @@ -45,7 +45,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -63,7 +63,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) s.cost(e,tp,eg,ep,ev,re,r,rp,1) end function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x118) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_CYNET) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -81,7 +81,7 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() end function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -104,15 +104,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end -end - +end \ No newline at end of file diff --git a/official/c56343672.lua b/official/c56343672.lua index 3c123d2cc3..8db623e134 100644 --- a/official/c56343672.lua +++ b/official/c56343672.lua @@ -9,17 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToDeck) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={id} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) -end function s.spfilter(c,e,tp) return c:GetLevel()>0 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -47,20 +42,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local fid=c:GetFieldID() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:SelectWithSumEqual(tp,Card.GetLevel,6,1,ct) - local tc=sg:GetFirst() - for tc in aux.Next(sg) do + for tc in sg:Iter() do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end Duel.SpecialSummonComplete() sg:KeepAlive() diff --git a/official/c56346071.lua b/official/c56346071.lua index 4c49b4668e..9e76172f2f 100644 --- a/official/c56346071.lua +++ b/official/c56346071.lua @@ -1,4 +1,5 @@ --トーテム・ファイブ +--Totem Five local s,id=GetID() function s.initial_effect(c) --destroy @@ -28,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.Damage(1-tp,#sg*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56347375.lua b/official/c56347375.lua index 974734400b..22e5cc014e 100644 --- a/official/c56347375.lua +++ b/official/c56347375.lua @@ -1,10 +1,10 @@ --- 竜剣士イグニスP --- Ignis Phoenix, the Dracoslayer --- Scripted by Hatter +--竜剣士イグニスP +--Ignis Phoenix, the Dracoslayer +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Shuffle 1 Pendulum Monster to the Deck + --Shuffle 1 Pendulum Monster to the Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) - -- Special Summon 1 "Dracoslayer" or "Igknight" monster from the Deck + --Special Summon 1 "Dracoslayer" or "Igknight" monster from the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -28,12 +28,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xc7,0xc8} +s.listed_series={SET_DRACOSLAYER,SET_IGKNIGHT} function s.tdfilter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() end function s.thfilter(c) - return (c:IsSetCard(0xc7) or c:IsSetCard(0xc8)) and not c:IsType(TYPE_PENDULUM) and c:IsMonster() and c:IsAbleToHand() + return (c:IsSetCard(SET_DRACOSLAYER) or c:IsSetCard(SET_IGKNIGHT)) and not c:IsType(TYPE_PENDULUM) and c:IsMonster() and c:IsAbleToHand() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_EXTRA,0,1,nil) @@ -57,10 +57,10 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0xc7) or c:IsSetCard(0xc8)) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_DRACOSLAYER) or c:IsSetCard(SET_IGKNIGHT)) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -72,12 +72,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - -- Treated as a tuner + --Treated as a tuner local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c56350972.lua b/official/c56350972.lua index 89b5642b49..86bfc9f1c3 100644 --- a/official/c56350972.lua +++ b/official/c56350972.lua @@ -1,4 +1,5 @@ --竜姫神サフィラ +--Saffira, Queen of Dragons local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -23,10 +24,10 @@ function s.initial_effect(c) end s.listed_names={80566312} function s.regcon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.regfilter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) + return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end function s.regcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.regfilter,1,nil) @@ -41,7 +42,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.filter(c) @@ -91,12 +92,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) elseif sel==2 then local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g==0 then return end local sg=g:RandomSelect(tp,1) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -105,4 +106,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c56364287.lua b/official/c56364287.lua index 34bc5bf9f2..d2b03e842d 100644 --- a/official/c56364287.lua +++ b/official/c56364287.lua @@ -1,5 +1,5 @@ --サイバー・ドラゴン・ヘルツ ---Cyber Dragon Hertz +--Cyber Dragon Herz --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e1) --level change @@ -44,7 +44,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(5) c:RegisterEffect(e1) @@ -53,7 +53,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) e2:SetLabelObject(e) e2:SetTarget(s.splimit) @@ -67,15 +67,14 @@ function s.thfilter(c) return c:IsCode(CARD_CYBER_DRAGON) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,e:GetHandler()) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c56387350.lua b/official/c56387350.lua index 894006b36d..0da48b4efc 100644 --- a/official/c56387350.lua +++ b/official/c56387350.lua @@ -1,4 +1,5 @@ --ヴァンパイア・ベビー +--Vampire Baby local s,id=GetID() function s.initial_effect(c) --spsummon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -42,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ft,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c56399890.lua b/official/c56399890.lua index c05d6fb32c..3b84a156c3 100644 --- a/official/c56399890.lua +++ b/official/c56399890.lua @@ -1,4 +1,5 @@ --魔轟神獣キャシー +--The Fabled Catsith local s,id=GetID() function s.initial_effect(c) --destroy @@ -28,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56401775.lua b/official/c56401775.lua index 4e845f8df7..6e189af30b 100644 --- a/official/c56401775.lua +++ b/official/c56401775.lua @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5640330.lua b/official/c5640330.lua index c4c6b31c9f..435f94fe1e 100644 --- a/official/c5640330.lua +++ b/official/c5640330.lua @@ -54,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56410040.lua b/official/c56410040.lua index 1983fa87a1..4f2df7153f 100644 --- a/official/c56410040.lua +++ b/official/c56410040.lua @@ -1,4 +1,5 @@ --ジャンク・フォアード +--Junk Forward local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,4 +16,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 -end +end \ No newline at end of file diff --git a/official/c56410769.lua b/official/c56410769.lua index 6213319ca2..9878c68f66 100644 --- a/official/c56410769.lua +++ b/official/c56410769.lua @@ -1,4 +1,4 @@ ---Japanese name +--波紋鳥 --Ripple Bird --scripted by Naim local s,id=GetID() @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1)) + e1:SetCost(Cost.Detach(1,1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) diff --git a/official/c5641251.lua b/official/c5641251.lua index 12d489ff0e..226771f363 100644 --- a/official/c5641251.lua +++ b/official/c5641251.lua @@ -31,13 +31,13 @@ function s.initial_effect(c) e3:SetOperation(s.lvlop) c:RegisterEffect(e3) end -s.listed_series={0x107} +s.listed_series={SET_FA} s.roll_dice=true function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_FA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 @@ -60,7 +60,7 @@ function s.lvlcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetAttackTarget() if not bc then return false end if tc:IsControler(1-tp) then bc,tc=tc,bc end - return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x107) and tc:HasLevel() + return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(SET_FA) and tc:HasLevel() end function s.lvlop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -77,10 +77,10 @@ function s.lvlop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(4) tc:RegisterEffect(e1) else Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56413937.lua b/official/c56413937.lua index 73798f7911..cfc8db6f20 100644 --- a/official/c56413937.lua +++ b/official/c56413937.lua @@ -1,7 +1,8 @@ --戦場の死装束 +--Warrior of Tradition local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,38942059,16899564) -end +end \ No newline at end of file diff --git a/official/c56421754.lua b/official/c56421754.lua index 2676caf425..eca8c2295f 100644 --- a/official/c56421754.lua +++ b/official/c56421754.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetCondition(s.actcon) c:RegisterEffect(e2) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) diff --git a/official/c56427559.lua b/official/c56427559.lua index fb2cc2287d..18ca02741b 100644 --- a/official/c56427559.lua +++ b/official/c56427559.lua @@ -1,4 +1,5 @@ --ギミック・パペット-ギア・チェンジャー +--Gimmick Puppet Gear Changer local s,id=GetID() function s.initial_effect(c) --lvchange @@ -20,10 +21,10 @@ function s.initial_effect(c) e2:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e2) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.lvfilter(c,lv) local clv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x1083) and clv>0 and clv~=lv + return c:IsFaceup() and c:IsSetCard(SET_GIMMICK_PUPPET) and clv>0 and clv~=lv end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc,e:GetHandler():GetLevel()) end @@ -39,7 +40,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c56433456.lua b/official/c56433456.lua index eeb7ecd64b..61682c7607 100644 --- a/official/c56433456.lua +++ b/official/c56433456.lua @@ -1,4 +1,5 @@ --天空の聖域 +--The Sanctuary in the Sky local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,4 +17,4 @@ function s.initial_effect(c) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY)) e2:SetValue(1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c5645210.lua b/official/c5645210.lua index 9230e9e638..5b23ff0355 100644 --- a/official/c5645210.lua +++ b/official/c5645210.lua @@ -1,4 +1,5 @@ --The splendid VENUS +--Splendid Venus local s,id=GetID() function s.initial_effect(c) --atk,def @@ -35,5 +36,5 @@ end function s.effectfilter(e,ct) local p=e:GetHandler():GetControler() local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) - return p==tp and te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and (loc&LOCATION_ONFIELD)~=0 -end + return p==tp and te:IsSpellTrapEffect() and (loc&LOCATION_ONFIELD)~=0 +end \ No newline at end of file diff --git a/official/c564541.lua b/official/c564541.lua index 6492ac3f65..aa56653b1a 100644 --- a/official/c564541.lua +++ b/official/c564541.lua @@ -1,6 +1,5 @@ --ミンゲイドラゴン --Totem Dragon - local s,id=GetID() function s.initial_effect(c) --Treated as 2 tributes for tribute summon of a dragon monster @@ -14,7 +13,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1) e2:SetCondition(s.spcon) @@ -48,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c56460688.lua b/official/c56460688.lua index b5e6b3c2b7..d6d9d58478 100644 --- a/official/c56460688.lua +++ b/official/c56460688.lua @@ -1,4 +1,5 @@ --異次元隔離マシーン +--Different Dimension Gate local s,id=GetID() function s.initial_effect(c) --remove @@ -37,13 +38,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local tg=Duel.GetTargetCards(e) - if Duel.Remove(tg,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if Duel.Remove(tg,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local g=Duel.GetOperatedGroup() local tc=g:GetFirst() for tc in aux.Next(g) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE,0,1) g:KeepAlive() e:SetLabelObject(g) end @@ -61,4 +62,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) g:DeleteGroup() e:GetLabelObject():SetLabelObject(nil) end -end +end \ No newline at end of file diff --git a/official/c56461575.lua b/official/c56461575.lua index 5f407750cc..934be40ca3 100644 --- a/official/c56461575.lua +++ b/official/c56461575.lua @@ -1,7 +1,6 @@ --螺旋蘇生 --Spiral Reborn --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 7+ dragon monster from GY @@ -41,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(s.indval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) diff --git a/official/c56465981.lua b/official/c56465981.lua index 2d17b1fa93..e8ea0edd7f 100644 --- a/official/c56465981.lua +++ b/official/c56465981.lua @@ -1,5 +1,5 @@ --龍相剣現 ---The Xiangjian Dragonsword Appears +--Swordsoul Emergence --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.thfilter(c,sync) - return (c:IsSetCard(0x16d) or (sync and c:IsRace(RACE_WYRM))) and c:IsMonster() and c:IsAbleToHand() + return (c:IsSetCard(SET_SWORDSOUL) or (sync and c:IsRace(RACE_WYRM))) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local sync=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_SYNCHRO),tp,LOCATION_MZONE,0,1,nil) @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x16d) or c:IsRace(RACE_WYRM)) and c:HasLevel() + return c:IsFaceup() and (c:IsSetCard(SET_SWORDSOUL) or c:IsRace(RACE_WYRM)) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end @@ -64,7 +64,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) if op==0 then e1:SetValue(1) else @@ -72,4 +72,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,chk) end tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c56495147.lua b/official/c56495147.lua index 84ddb452cf..3cbbd4e61f 100644 --- a/official/c56495147.lua +++ b/official/c56495147.lua @@ -1,9 +1,9 @@ --- 相剣師-泰阿 --- Swordsoul of Taia --- Scripted by Hatter +--相剣師-泰阿 +--Swordsoul of Taia +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon token + --Special Summon token local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.tktg) e1:SetOperation(s.tkop) c:RegisterEffect(e1) - -- Send to GY + --Send to GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE) @@ -28,23 +28,23 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={TOKEN_SWORDSOUL} -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.filter(c) - return c:IsSetCard(0x16d) or (c:IsMonster() and c:IsRace(RACE_WYRM)) + return c:IsSetCard(SET_SWORDSOUL) or (c:IsMonster() and c:IsRace(RACE_WYRM)) end function s.tkcostfilter(c) return s.filter(c) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tkcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tkcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.tkcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tkcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,0x16d,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,SET_SWORDSOUL,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) @@ -54,7 +54,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local token=Duel.CreateToken(tp,TOKEN_SWORDSOUL) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Cannot Special Summon non-Synchro monsters from Extra Deck + --Cannot Special Summon non-Synchro monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -62,11 +62,11 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) - -- Lizard check + --Lizard check local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -84,4 +84,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56499179.lua b/official/c56499179.lua index c6aceff740..4888cfe067 100644 --- a/official/c56499179.lua +++ b/official/c56499179.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thgatetg) e1:SetOperation(s.thgateop) c:RegisterEffect(e1) diff --git a/official/c5650082.lua b/official/c5650082.lua index 48fda5c81b..1d3659f11f 100644 --- a/official/c5650082.lua +++ b/official/c5650082.lua @@ -1,4 +1,5 @@ --神風のバリア -エア・フォース- +--Storming Mirror Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsAttackPos() and c:IsAbleToHand() @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56506740.lua b/official/c56506740.lua index e545c571b9..3ab18c75c8 100644 --- a/official/c56506740.lua +++ b/official/c56506740.lua @@ -95,4 +95,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c56510115.lua b/official/c56510115.lua index 9f65f8afb8..dd20c190d0 100644 --- a/official/c56510115.lua +++ b/official/c56510115.lua @@ -12,15 +12,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.actcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.acttg) e1:SetOperation(s.actop) c:RegisterEffect(e1) end s.listed_series={SET_SOLFACHORD,SET_GRANSOLFACHORD} -function s.actcon(e) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.solfilter(c) return c:IsFaceup() and c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) end diff --git a/official/c56511382.lua b/official/c56511382.lua index 0692cb9af1..2e01f6a123 100644 --- a/official/c56511382.lua +++ b/official/c56511382.lua @@ -1,4 +1,5 @@ --A・ジェネクス・ボルキャノン +--Genex Ally Volcannon local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_GENEX) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -42,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) Duel.Damage(1-tp,lv*400,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56514812.lua b/official/c56514812.lua index e3c1eebe30..6b93d50e5e 100644 --- a/official/c56514812.lua +++ b/official/c56514812.lua @@ -1,4 +1,5 @@ --くノ一ウォリアー +--Kunoichi local s,id=GetID() function s.initial_effect(c) --handes @@ -19,5 +20,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c56524813.lua b/official/c56524813.lua index 90bb3494ce..be5b393b98 100644 --- a/official/c56524813.lua +++ b/official/c56524813.lua @@ -1,4 +1,5 @@ --逆巻くエリア +--Raging Eria local s,id=GetID() function s.initial_effect(c) --spsummon @@ -39,7 +40,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end @@ -47,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(Card.IsCode,1,nil,id) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56526564.lua b/official/c56526564.lua index 2e2d0b6dac..ea3721d771 100644 --- a/official/c56526564.lua +++ b/official/c56526564.lua @@ -1,5 +1,5 @@ --絶縁の落とし穴 ---Breakoff Trap Hole +--Break Off Trap Hole local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsLinkMonster() and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsLinkMonster() and c:IsLinkSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56532353.lua b/official/c56532353.lua index 3afe56928d..a7bf02dafc 100644 --- a/official/c56532353.lua +++ b/official/c56532353.lua @@ -22,20 +22,20 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCondition(s.condition) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} s.listed_names={CARD_BLUEEYES_W_DRAGON} -s.material_setcode=0xdd +s.material_setcode=SET_BLUE_EYES function s.costfilter(c) - return c:IsSetCard(0xdd) and c:IsType(TYPE_FUSION) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BLUE_EYES) and c:IsType(TYPE_FUSION) and c:IsAbleToGraveAsCost() end function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsFusionSummoned() and Duel.GetAttacker()==c and c:CanChainAttack(0) and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c) end @@ -49,7 +49,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() end function s.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xdd) + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(SET_BLUE_EYES) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56532632.lua b/official/c56532632.lua index 4da2ecb51f..36d24ab114 100644 --- a/official/c56532632.lua +++ b/official/c56532632.lua @@ -1,4 +1,5 @@ --威風堂々 +--Chivalry local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return ep~=tp and ph>PHASE_MAIN1 and ph0 @@ -85,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c56588755.lua b/official/c56588755.lua index 1bb456d98b..db2e2ed5e2 100644 --- a/official/c56588755.lua +++ b/official/c56588755.lua @@ -1,7 +1,6 @@ --ドラグマ・ジェネシス --Dogmatika Genesis --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -44,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_DISABLE) if g1:GetFirst():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) + Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local og=Duel.GetOperatedGroup() if og:GetFirst():IsLocation(LOCATION_EXTRA) then local tc=g2:GetFirst() @@ -60,4 +59,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c56594520.lua b/official/c56594520.lua index 2c5e26a53f..164fe2a400 100644 --- a/official/c56594520.lua +++ b/official/c56594520.lua @@ -1,4 +1,5 @@ --ガイアパワー +--Gaia Power local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c56597272.lua b/official/c56597272.lua index d3489fa7a5..d3626b21d5 100644 --- a/official/c56597272.lua +++ b/official/c56597272.lua @@ -24,16 +24,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x18,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_WATER) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_CLOUDIAN,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_WATER) then return end for i=1,2 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - e1:SetValue(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),0x18)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + e1:SetValue(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),SET_CLOUDIAN)) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c56605802.lua b/official/c56605802.lua index 569270e18b..732bde6c3f 100644 --- a/official/c56605802.lua +++ b/official/c56605802.lua @@ -1,4 +1,5 @@ --幻影コオロギ +--Phantom Cricket local s,id=GetID() function s.initial_effect(c) --flip @@ -24,6 +25,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56606928.lua b/official/c56606928.lua index 24a057dbee..922299012c 100644 --- a/official/c56606928.lua +++ b/official/c56606928.lua @@ -1,4 +1,5 @@ --永遠の渇水 +--Eternal Drought local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56611470.lua b/official/c56611470.lua index 1a4e7c579d..2612593302 100644 --- a/official/c56611470.lua +++ b/official/c56611470.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.filter(c,e) - return c:IsFaceup() and c:IsSetCard(0x97) and c:IsCanBeEffectTarget(e) + return c:IsFaceup() and c:IsSetCard(SET_ARTIFACT) and c:IsCanBeEffectTarget(e) end function s.xyzfilter(c,mg,tp,chk) return c:IsXyzSummonable(nil,mg,2,2) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) @@ -63,7 +63,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.attg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.tfilter,nil,e) if #g<2 then return end @@ -75,7 +75,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.attg(e,c) - return not c:IsSetCard(0x97) + return not c:IsSetCard(SET_ARTIFACT) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) diff --git a/official/c56619314.lua b/official/c56619314.lua index 4c66e69da8..f66c59f3d5 100644 --- a/official/c56619314.lua +++ b/official/c56619314.lua @@ -30,8 +30,8 @@ function s.chk(c,sg) return c:IsRace(RACE_DRAGON) and sg:IsExists(Card.IsRace,1,c,RACE_FIEND) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,2,true,s.spcheck,e:GetHandler(),RACE_DRAGON+RACE_FIEND) end - local sg=Duel.SelectReleaseGroupCost(tp,Card.IsRace,2,2,true,s.spcheck,e:GetHandler(),RACE_DRAGON+RACE_FIEND) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,2,true,s.spcheck,e:GetHandler(),RACE_DRAGON|RACE_FIEND) end + local sg=Duel.SelectReleaseGroupCost(tp,Card.IsRace,2,2,true,s.spcheck,e:GetHandler(),RACE_DRAGON|RACE_FIEND) Duel.Release(sg,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e) return c:IsSpellTrap() and c:IsDestructable(e) @@ -58,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -69,4 +69,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c56619778.lua b/official/c56619778.lua index 65cd7d34b1..0313246c4b 100644 --- a/official/c56619778.lua +++ b/official/c56619778.lua @@ -1,5 +1,5 @@ --LL-バード・ストライク ---Lyrilusc – Bird Strike +--Lyrilusc - Bird Strike --Logical Nonsense --Substitute ID local s,id=GetID() @@ -10,13 +10,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xf7),tp,LOCATION_MZONE,0,1,nil)end) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_LYRILUSC),tp,LOCATION_MZONE,0,1,nil)end) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil)end end) e1:SetOperation(s.activate) c:RegisterEffect(e1) end --Lists "Lyrilusc" archetype -s.listed_series={0xf7} +s.listed_series={SET_LYRILUSC} --Negate all of opponent's current monsters function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,nil) @@ -25,12 +25,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c56638325.lua b/official/c56638325.lua index 5abeb90903..64f6eaad3d 100644 --- a/official/c56638325.lua +++ b/official/c56638325.lua @@ -1,4 +1,5 @@ --星輝士 デルタテロス +--Stellarknight Delteros local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -29,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -45,7 +46,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.limcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayCount()>0 and eg:IsExists(Card.IsSummonPlayer,1,nil,tp) end @@ -53,7 +54,7 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentChain()==0 then Duel.SetChainLimitTillChainEnd(s.chainlm) elseif Duel.GetCurrentChain()==1 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.limop2(e,tp,eg,ep,ev,re,r,rp) @@ -65,10 +66,6 @@ end function s.chainlm(e,rp,tp) return tp==rp end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -86,18 +83,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56641453.lua b/official/c56641453.lua index adfac47c1e..85f13d406d 100644 --- a/official/c56641453.lua +++ b/official/c56641453.lua @@ -65,4 +65,4 @@ function s.damval(e,re,val,r,rp,rc) else return val end -end +end \ No newline at end of file diff --git a/official/c56647086.lua b/official/c56647086.lua index 3af9006a83..d028724cc0 100644 --- a/official/c56647086.lua +++ b/official/c56647086.lua @@ -1,4 +1,5 @@ --暗黒の侵略者 +--Invader of Darkness local s,id=GetID() function s.initial_effect(c) --act limit @@ -12,5 +13,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.aclimit(e,re,tp) - return re:GetHandler():GetType()==TYPE_SPELL+TYPE_QUICKPLAY and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end + return re:GetHandler():IsQuickPlaySpell() and re:IsHasType(EFFECT_TYPE_ACTIVATE) +end \ No newline at end of file diff --git a/official/c56655675.lua b/official/c56655675.lua index e363f71323..d2fa04842e 100644 --- a/official/c56655675.lua +++ b/official/c56655675.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x40b5),aux.FilterBoolFunctionEx(Card.IsSetCard,0x10b5),aux.FilterBoolFunctionEx(Card.IsSetCard,0x20b5)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RITUAL_BEAST_ULTI),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RITUAL_BEAST_TAMER),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SPIRITUAL_BEAST)) Fusion.AddContactProc(c,s.contactfil,s.contactop,true,aux.TRUE,1) --negate local e1=Effect.CreateEffect(c) @@ -15,13 +15,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xb5,0x40b5,0x10b5,0x20b5} -s.material_setcode={0xb5,0x10b5,0x20b5,0x40b5} +s.listed_series={SET_RITUAL_BEAST,SET_RITUAL_BEAST_ULTI,SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} +s.material_setcode={SET_RITUAL_BEAST,SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST,SET_RITUAL_BEAST_ULTI} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 @@ -37,15 +37,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.discost) e1:SetTarget(s.distg) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e:GetHandler():RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return re~=e and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.filter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemoveAsCost() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -64,4 +64,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56673112.lua b/official/c56673112.lua index f225cdd231..e92fb84699 100644 --- a/official/c56673112.lua +++ b/official/c56673112.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcond) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -20,10 +20,6 @@ s.listed_names={CARD_JACK_KNIGHT,CARD_KING_KNIGHT,CARD_QUEEN_KNIGHT} function s.spcond(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp,ft) return c:IsCode(CARD_JACK_KNIGHT,CARD_KING_KNIGHT,CARD_QUEEN_KNIGHT) and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and ft>0) or c:IsAbleToHand()) @@ -54,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) aux.Stringid(id,1)) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c56673480.lua b/official/c56673480.lua index 9a78fd90a9..09576c1ec9 100644 --- a/official/c56673480.lua +++ b/official/c56673480.lua @@ -1,4 +1,5 @@ --ドン・サウザンドの契約 +--Contract with Don Thousand local s,id=GetID() function s.initial_effect(c) --activate @@ -72,13 +73,13 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local pg=e:GetLabelObject() if c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,1) pg:Clear() end local tc=eg:GetFirst() for tc in aux.Next(eg) do pg:AddCard(tc) - tc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,1) end return false end @@ -98,4 +99,4 @@ end function s.scon2(e) local tp=e:GetHandlerPlayer() return Duel.IsExistingMatchingCard(s.sfilter,tp,0,LOCATION_HAND,1,nil,e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c56675280.lua b/official/c56675280.lua index b3e1e113b9..b02eead132 100644 --- a/official/c56675280.lua +++ b/official/c56675280.lua @@ -1,4 +1,5 @@ --EMインコーラス +--Performapal Parrotrio local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -22,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x98,0x99,0x9f} +s.listed_series={SET_MAGICIAN,SET_ODD_EYES,SET_PERFORMAPAL} s.listed_names={id} function s.scfilter(c) - return (c:IsSetCard(0x98) or c:IsSetCard(0x99) or c:IsSetCard(0x9f)) and not c:IsCode(id) + return (c:IsSetCard(SET_MAGICIAN) or c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and not c:IsCode(id) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_PZONE,0,1,e:GetHandler()) @@ -40,14 +41,14 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(7) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) c:RegisterEffect(e2) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9f) and not c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAPAL) and not c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -61,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56677752.lua b/official/c56677752.lua index 84265518d8..7015cc0f7e 100644 --- a/official/c56677752.lua +++ b/official/c56677752.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -39,13 +39,13 @@ function s.initial_effect(c) e3:SetOperation(s.penop) c:RegisterEffect(e3) end -s.listed_series={0x99,0x9f} +s.listed_series={SET_ODD_EYES,SET_PERFORMAPAL} s.listed_names={id} function s.texcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) end function s.cfilter(c) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x99) and not c:IsForbidden() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_ODD_EYES) and not c:IsForbidden() end function s.textg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -62,7 +62,7 @@ function s.texop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcfilter(c) - return c:IsFaceup() and c:IsOriginalType(TYPE_MONSTER) and (c:IsSetCard(0x99) or c:IsSetCard(0x9f)) + return c:IsFaceup() and c:IsOriginalType(TYPE_MONSTER) and (c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -98,4 +98,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c56681873.lua b/official/c56681873.lua index 447ab8a382..5404f76caa 100644 --- a/official/c56681873.lua +++ b/official/c56681873.lua @@ -1,4 +1,5 @@ --魔装戦士 テライガー +--Terratiger, the Empowered Warrior local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,4 +27,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c56700100.lua b/official/c56700100.lua index 9817f3bbf1..df47e3d461 100644 --- a/official/c56700100.lua +++ b/official/c56700100.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -35,10 +35,6 @@ function s.initial_effect(c) end s.listed_names={id} s.listed_series={SET_PURRELY} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.thfilter(c) return c:IsSetCard(SET_PURRELY) and c:IsAbleToHand() and not c:IsCode(id) end diff --git a/official/c56713174.lua b/official/c56713174.lua index 7857a9bd7b..a43852099c 100644 --- a/official/c56713174.lua +++ b/official/c56713174.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_THUNDRA) @@ -31,12 +31,8 @@ function s.initial_effect(c) e3:SetCondition(s.thcon) c:RegisterEffect(e3) end -s.listed_series={0x11c} +s.listed_series={SET_THUNDER_DRAGON} s.listed_names={id} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.thfilter(c) return c:IsCode(id) and c:IsAbleToHand() end @@ -56,7 +52,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter2(c) - return c:IsSetCard(0x11c) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_THUNDER_DRAGON) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -69,4 +65,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c5672432.lua b/official/c5672432.lua index a37b3d3a3a..3b992d4581 100644 --- a/official/c5672432.lua +++ b/official/c5672432.lua @@ -1,4 +1,5 @@ --EMリバイバル +--Performapal Revival local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,24 +14,24 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56727340.lua b/official/c56727340.lua index 07d46a3abe..c1a4f204d0 100644 --- a/official/c56727340.lua +++ b/official/c56727340.lua @@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56733747.lua b/official/c56733747.lua index 60af69c276..635110619f 100644 --- a/official/c56733747.lua +++ b/official/c56733747.lua @@ -1,5 +1,5 @@ --- E・HERO シャイニング・ネオス・ウィングマン --- Elemental HERO Shining Neos Wingman +--E・HERO シャイニング・ネオス・ウィングマン +--Elemental HERO Shining Neos Wingman local s,id=GetID() function s.initial_effect(c) --Fusion Materials @@ -52,9 +52,9 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x185} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_WINGMAN} function s.ffilter(c,fc,sumtype,tp) - return c:IsType(TYPE_FUSION,fc,sumtype,tp) and c:IsSetCard(0x185,fc,sumtype,tp) + return c:IsType(TYPE_FUSION,fc,sumtype,tp) and c:IsSetCard(SET_WINGMAN,fc,sumtype,tp) end --Destroy opponent's cards up to the number of different Attributes function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c56746202.lua b/official/c56746202.lua index e32026f69a..5fdecdfdb7 100644 --- a/official/c56746202.lua +++ b/official/c56746202.lua @@ -48,4 +48,4 @@ end function s.synlimit(e,c) if not c then return false end return not c:IsSetCard(SET_SCRAP) -end +end \ No newline at end of file diff --git a/official/c56747793.lua b/official/c56747793.lua index 3d49e5fe9f..eb978f3287 100644 --- a/official/c56747793.lua +++ b/official/c56747793.lua @@ -1,4 +1,5 @@ --団結の力 +--United We Stand local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsFaceup,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)*800 -end +end \ No newline at end of file diff --git a/official/c56768355.lua b/official/c56768355.lua index 1395e68d5c..7210007e24 100644 --- a/official/c56768355.lua +++ b/official/c56768355.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x30),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_VYLON),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetValue(s.indval) c:RegisterEffect(e2) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c,ec) return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) @@ -56,4 +56,4 @@ function s.indval(e,re) if not re then return false end local ty=re:GetActiveType() return (ty&TYPE_SPELL+TYPE_TRAP)~=0 and (ty&TYPE_EQUIP)==0 -end +end \ No newline at end of file diff --git a/official/c56769674.lua b/official/c56769674.lua index 6e96cb8533..5a2cb7beac 100644 --- a/official/c56769674.lua +++ b/official/c56769674.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DRAW_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_DRAW_PHASE) e1:SetTarget(s.target) c:RegisterEffect(e1) --race @@ -28,4 +28,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.value(e,c) return e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c56773577.lua b/official/c56773577.lua index 33febef36f..61095e1e8f 100644 --- a/official/c56773577.lua +++ b/official/c56773577.lua @@ -1,6 +1,5 @@ --ネクロバレーの神殿 --Necrovalley Temple - local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,14 +41,13 @@ function s.initial_effect(c) e5:SetOperation(s.setop) c:RegisterEffect(e5) end -s.listed_series={0x2e,0x91} +s.listed_series={SET_GRAVEKEEPERS,SET_NECROVALLEY} s.listed_names={CARD_NECROVALLEY} - function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2e),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsEnvironment(CARD_NECROVALLEY) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GRAVEKEEPERS),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsEnvironment(CARD_NECROVALLEY) end function s.accon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) + return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,tp) and not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil) end function s.filter(c,tp) @@ -58,7 +56,7 @@ end function s.acop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) @@ -66,7 +64,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) end function s.setfilter(c) - return c:IsSetCard(0x91) and not c:IsCode(id) and c:IsSSetable() + return c:IsSetCard(SET_NECROVALLEY) and not c:IsCode(id) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -77,4 +75,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c56784842.lua b/official/c56784842.lua index f0c8fbf339..c357b1d91d 100644 --- a/official/c56784842.lua +++ b/official/c56784842.lua @@ -1,4 +1,5 @@ --エンジェルO7 +--Angel O7 local s,id=GetID() function s.initial_effect(c) --act limit @@ -11,17 +12,17 @@ function s.initial_effect(c) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsSummonType(SUMMON_TYPE_TRIBUTE) then return end + if not c:IsTributeSummoned() then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_ACTIVATE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) c:RegisterEffect(e1) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) -end + return re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c56790702.lua b/official/c56790702.lua index 144283c19e..a4eda8c93c 100644 --- a/official/c56790702.lua +++ b/official/c56790702.lua @@ -1,16 +1,16 @@ --- --- D.D. Assault Carrier --- Scripted by Hatter +--異次元の強襲艦 +--D.D. Assault Carrier +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Attack cost + --Attack cost local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_COST) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -54,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56804361.lua b/official/c56804361.lua index 36aa83caf7..765f47cd88 100644 --- a/official/c56804361.lua +++ b/official/c56804361.lua @@ -1,4 +1,5 @@ --魔装聖龍 イーサルウェポン +--Aether, the Empowering Dragon local s,id=GetID() function s.initial_effect(c) --tohand @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56809158.lua b/official/c56809158.lua index 3a11d99311..0ae979c523 100644 --- a/official/c56809158.lua +++ b/official/c56809158.lua @@ -1,7 +1,6 @@ --紅蓮の機界騎士 --Mekk-Knight Red Moon --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -25,8 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x10c} - +s.listed_series={SET_MEKK_KNIGHT} function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -40,7 +38,7 @@ function s.hspval(e,c) return 0,zone end function s.costfilter(c) - return c:IsSetCard(0x10c) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -65,4 +63,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56818977.lua b/official/c56818977.lua index f983522ab6..6cc17f3810 100644 --- a/official/c56818977.lua +++ b/official/c56818977.lua @@ -1,7 +1,6 @@ --スプリガンズ・ピード --Springans Pedor --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) @@ -23,19 +22,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end --Lists "Sprigguns" archetype -s.listed_series={0x158} +s.listed_series={SET_SPRINGANS} --Specifically lists itself s.listed_names={id} - --Check for "Sprigguns" Xyz monster function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) end --Activation legality function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,13 +54,9 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) end end --Tribute itself as cost -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end --Check for "Spriggun" monster, except "Sprigguns Pede" function s.filter(c,e,tp) - return c:IsSetCard(0x158) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPRINGANS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -78,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56824871.lua b/official/c56824871.lua index 0b8591e4c3..3a7790b9bd 100644 --- a/official/c56824871.lua +++ b/official/c56824871.lua @@ -40,7 +40,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetCode(EFFECT_ADD_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end function s.thfilter(c) @@ -48,10 +48,10 @@ function s.thfilter(c) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56827051.lua b/official/c56827051.lua index c5257aaed4..05ae31188e 100644 --- a/official/c56827051.lua +++ b/official/c56827051.lua @@ -1,4 +1,5 @@ --影霊衣の巫女 エリアル +--Ariel, Priestess of the Nekroz local s,id=GetID() function s.initial_effect(c) --level change @@ -23,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.cfilter(c) - return c:IsSetCard(0xb4) and not c:IsPublic() + return c:IsSetCard(SET_NEKROZ) and not c:IsPublic() end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -52,14 +53,14 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 end function s.filter(c) - return c:IsSetCard(0xb4) and c:IsMonster() and not c:IsType(TYPE_RITUAL) and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsMonster() and not c:IsType(TYPE_RITUAL) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -72,4 +73,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c56832966.lua b/official/c56832966.lua index bd240c17c0..789fcc002f 100644 --- a/official/c56832966.lua +++ b/official/c56832966.lua @@ -34,22 +34,22 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} s.xyz_number=39 function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==4 + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==4 end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x107f) + return e:GetHandler():GetBattleTarget()~=nil and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_UTOPIA) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:GetFlagEffect(id)==0 end c:RemoveOverlayCard(tp,2,2,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(5000) c:RegisterEffect(e1) end diff --git a/official/c56839613.lua b/official/c56839613.lua index 5f4734d0c5..78eea97360 100644 --- a/official/c56839613.lua +++ b/official/c56839613.lua @@ -1,4 +1,5 @@ --電池メン-ボタン型 +--Batteryman Micro-Cell local s,id=GetID() function s.initial_effect(c) --flip effect @@ -26,10 +27,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} s.listed_names={id} function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x28) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_BATTERYMAN) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE,0,0) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) @@ -60,4 +61,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56840427.lua b/official/c56840427.lua index ee2572e4e0..9f29958667 100644 --- a/official/c56840427.lua +++ b/official/c56840427.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp) return Duel.GetLP(tp)<=1000 end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) diff --git a/official/c56840658.lua b/official/c56840658.lua index 9573ebb450..b504b95e42 100644 --- a/official/c56840658.lua +++ b/official/c56840658.lua @@ -1,4 +1,5 @@ --引きガエル +--Poison Draw Frog local s,id=GetID() function s.initial_effect(c) --draw @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56856951.lua b/official/c56856951.lua index 35916e6e27..78372606de 100644 --- a/official/c56856951.lua +++ b/official/c56856951.lua @@ -1,4 +1,5 @@ --メテオ・プロミネンス +--Meteor Flare local s,id=GetID() function s.initial_effect(c) --damage @@ -56,7 +57,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -69,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c56889.lua b/official/c56889.lua index 4b23f8e66a..bd384ab368 100644 --- a/official/c56889.lua +++ b/official/c56889.lua @@ -22,10 +22,10 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x7} -s.listed_names={83104731,95735217} +s.listed_series={SET_ANCIENT_GEAR} +s.listed_names={CARD_ANCIENT_GEAR_GOLEM,95735217} function s.rmfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7) and c:IsAbleToRemove() + return c:IsFaceup() and c:IsSetCard(SET_ANCIENT_GEAR) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.rmfilter(chkc) end @@ -36,18 +36,18 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)>0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetLabelObject(tc) e1:SetCountLimit(1) - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsPhase(PHASE_STANDBY) then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.retcon) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,2) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) end e1:SetOperation(s.retop) Duel.RegisterEffect(e1,tp) @@ -64,13 +64,13 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsCode(83104731,95735217) - and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsCode(CARD_ANCIENT_GEAR_GOLEM,95735217) + and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -81,4 +81,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56894757.lua b/official/c56894757.lua index a83d2652ce..02862c2330 100644 --- a/official/c56894757.lua +++ b/official/c56894757.lua @@ -25,15 +25,15 @@ function s.initial_effect(c) e2:SetOperation(s.thop2) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(s.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) @@ -45,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()==tp + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -57,4 +57,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56897896.lua b/official/c56897896.lua index 2dbccc7d6e..9924d719c5 100644 --- a/official/c56897896.lua +++ b/official/c56897896.lua @@ -1,4 +1,5 @@ --モノ・シンクロン +--Mono Synchron local s,id=GetID() function s.initial_effect(c) --synchro custom @@ -16,8 +17,8 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.synfilter(e,c) - return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR+RACE_MACHINE) + return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR|RACE_MACHINE) end function s.synop(e,tg,ntg,sg,lv,sc,tp) return #sg-1+e:GetHandler():GetLevel()==lv,true -end +end \ No newline at end of file diff --git a/official/c56907389.lua b/official/c56907389.lua index dbcb6cf673..a504a87ff2 100644 --- a/official/c56907389.lua +++ b/official/c56907389.lua @@ -1,7 +1,8 @@ --音楽家の帝王 +--Musician King local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,78010363,17358176) -end +end \ No newline at end of file diff --git a/official/c56907986.lua b/official/c56907986.lua index cb2ceb8200..08e95246e0 100644 --- a/official/c56907986.lua +++ b/official/c56907986.lua @@ -1,4 +1,5 @@ --Kozmo-フォルミート +--Kozmo Strawman local s,id=GetID() function s.initial_effect(c) --spsummon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -21,18 +22,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.spcost2) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xd2} -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +s.listed_series={SET_KOZMO} function s.spfilter1(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -48,12 +45,8 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.spfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xd2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_KOZMO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -66,16 +59,16 @@ end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -87,7 +80,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e3:SetOperation(s.desop) e3:SetLabelObject(tc) Duel.RegisterEffect(e3,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end Duel.SpecialSummonComplete() end @@ -102,4 +95,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56910167.lua b/official/c56910167.lua index 488e742eae..711d63bd70 100644 --- a/official/c56910167.lua +++ b/official/c56910167.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56916805.lua b/official/c56916805.lua index c5426d927f..55a47f04ab 100644 --- a/official/c56916805.lua +++ b/official/c56916805.lua @@ -1,4 +1,5 @@ --エナジー・ドレイン +--Energy Drain local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -29,11 +27,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(val) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c56920308.lua b/official/c56920308.lua index 86bde9930f..e64bc2c29f 100644 --- a/official/c56920308.lua +++ b/official/c56920308.lua @@ -1,6 +1,5 @@ --強靭!無敵!最強! --The Ultimate Creature of Destruction - local s,id=GetID() function s.initial_effect(c) --Apply various lingering effects to your "Blue-Eyes White Dragon" @@ -29,11 +28,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} s.listed_names={CARD_BLUEEYES_W_DRAGON} - function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xdd) + return c:IsFaceup() and c:IsSetCard(SET_BLUE_EYES) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) @@ -61,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --Destroy any monster it battles at end of damage step local e3=Effect.CreateEffect(c) @@ -69,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetCondition(s.descon) e3:SetOperation(s.desop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -105,7 +103,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c56921677.lua b/official/c56921677.lua index 332449f684..5e3aef1500 100644 --- a/official/c56921677.lua +++ b/official/c56921677.lua @@ -1,4 +1,5 @@ --紋章獣バシリスク +--Heraldic Beast Basilisk local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56931015.lua b/official/c56931015.lua index 4c1062bf56..0608f1562c 100644 --- a/official/c56931015.lua +++ b/official/c56931015.lua @@ -1,6 +1,5 @@ --グラヴィティ・ベヒモス --Gravity Behemoth - local s,id=GetID() function s.initial_effect(c) --Normal summon it with no tributes @@ -36,7 +35,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c56948373.lua b/official/c56948373.lua index b021aa288b..3b3a063320 100644 --- a/official/c56948373.lua +++ b/official/c56948373.lua @@ -1,4 +1,5 @@ --呪魂の仮面 +--Mask of the Accursed local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -12,7 +13,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetCondition(s.damcon) @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetEquipTarget()~=nil + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetEquipTarget()~=nil end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -34,4 +35,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5697558.lua b/official/c5697558.lua index cc49094e0e..12e54acb6a 100644 --- a/official/c5697558.lua +++ b/official/c5697558.lua @@ -1,4 +1,5 @@ --The Hidden City +--The Hidden City local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,7 +33,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0xed) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_SUBTERROR) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -45,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0xed) and c:IsFacedown() and c:IsDefensePos() + return c:IsSetCard(SET_SUBTERROR) and c:IsFacedown() and c:IsDefensePos() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -62,7 +63,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -80,4 +81,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end end -end +end \ No newline at end of file diff --git a/official/c56980148.lua b/official/c56980148.lua index de5bd42c14..b72b473f68 100644 --- a/official/c56980148.lua +++ b/official/c56980148.lua @@ -35,10 +35,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} s.listed_names={90173539,id} function s.thfilter(c) - return ((c:IsSetCard(0x11a) and c:IsMonster()) or c:IsCode(90173539)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_DINOWRESTLER) and c:IsMonster()) or c:IsCode(90173539)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,13 +53,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11a) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOWRESTLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c56981417.lua b/official/c56981417.lua index 4c906ab160..d110545f2b 100644 --- a/official/c56981417.lua +++ b/official/c56981417.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) end function s.cffilter(c) - return c:IsSetCard(0x106e) and not c:IsPublic() + return c:IsSetCard(SET_SPELLBOOK) and not c:IsPublic() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.filter(c) - return c:IsSetCard(0x106e) and not c:IsCode(id) and c:GetType()==TYPE_SPELL and c:CheckActivateEffect(true,true,false)~=nil + return c:IsSetCard(SET_SPELLBOOK) and not c:IsCode(id) and c:IsNormalSpell() and c:CheckActivateEffect(true,true,false)~=nil end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -67,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) te:SetLabel(e:GetLabel()) te:SetLabelObject(e:GetLabelObject()) end -end +end \ No newline at end of file diff --git a/official/c56984514.lua b/official/c56984514.lua index 2662e2fb22..05b7e4e787 100644 --- a/official/c56984514.lua +++ b/official/c56984514.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x142} +s.listed_series={SET_ELDLICH} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x142),tp,LOCATION_MZONE,0,1,nil) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ELDLICH),tp,LOCATION_MZONE,0,1,nil) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,nil,nil,RACE_ZOMBIE) end @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c56993276.lua b/official/c56993276.lua index 8ce789360d..e337c6f77f 100644 --- a/official/c56993276.lua +++ b/official/c56993276.lua @@ -16,17 +16,17 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON) c:RegisterEffect(e2) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and eg:IsExists(Card.IsControler,1,nil,1-tp) end function s.cfilter(c) - return c:IsSetCard(0xe) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_WATT) and c:IsMonster() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(Card.IsControler,nil,1-tp) Duel.NegateSummon(g) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c56995655.lua b/official/c56995655.lua index 58ec4ee1d2..eca9941fe2 100644 --- a/official/c56995655.lua +++ b/official/c56995655.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.con) e2:SetOperation(s.op) c:RegisterEffect(e2) @@ -36,4 +36,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if (op==0 and tc:IsMonster()) or (op==1 and tc:IsSpell()) or (op==2 and tc:IsTrap()) then Duel.Damage(1-tp,700,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57006589.lua b/official/c57006589.lua index d6133fa0d5..96140599b8 100644 --- a/official/c57006589.lua +++ b/official/c57006589.lua @@ -1,4 +1,5 @@ --エネルギー吸収板 +--Energy-Absorbing Monolith local s,id=GetID() function s.initial_effect(c) --reflect @@ -29,4 +30,4 @@ function s.refcon(e,re,r,rp,rc) if cc==0 or (r&REASON_EFFECT)==0 then return end local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) return cid==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c57019473.lua b/official/c57019473.lua index c90b7869e1..1320a31d28 100644 --- a/official/c57019473.lua +++ b/official/c57019473.lua @@ -1,4 +1,5 @@ --ONeサンダー +--Sishunder local s,id=GetID() function s.initial_effect(c) --remove @@ -18,10 +19,10 @@ function s.filter(c) and not c:IsCode(id) and c:IsAttackBelow(1600) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,HINTMSG_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -33,11 +34,11 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c57036718.lua b/official/c57036718.lua index 0846e4a67c..a4234b3720 100644 --- a/official/c57036718.lua +++ b/official/c57036718.lua @@ -1,4 +1,5 @@ --ズバババスター +--Zubaba Buster local s,id=GetID() function s.initial_effect(c) --destroy @@ -18,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.damop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -49,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c5703682.lua b/official/c5703682.lua index 4045475114..8ce3beb6da 100644 --- a/official/c5703682.lua +++ b/official/c5703682.lua @@ -1,4 +1,5 @@ --サウザンドエナジー +--Thousand Energy local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,13 +26,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(tc:GetBaseAttack()+1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(tc:GetBaseDefense()+1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end local de=Effect.CreateEffect(e:GetHandler()) @@ -40,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) de:SetCountLimit(1) de:SetCondition(s.descon) de:SetOperation(s.desop) - de:SetReset(RESET_PHASE+PHASE_END) + de:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(de,tp) end function s.dfilter(c) @@ -52,4 +53,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,0,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57043117.lua b/official/c57043117.lua index 0212210293..735e1cd953 100644 --- a/official/c57043117.lua +++ b/official/c57043117.lua @@ -1,4 +1,5 @@ --鋼鉄の巨兵 +--Giant Soldier of Steel local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,16 +23,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1) e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) @@ -49,15 +46,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetValue(s.damval) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() e3:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c57043986.lua b/official/c57043986.lua index 22b147083c..7417b7c8ea 100644 --- a/official/c57043986.lua +++ b/official/c57043986.lua @@ -44,12 +44,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -68,7 +68,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)~=0 then + if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) diff --git a/official/c57046845.lua b/official/c57046845.lua index 32268181fa..176cc05f49 100644 --- a/official/c57046845.lua +++ b/official/c57046845.lua @@ -1,4 +1,5 @@ --剣聖-ネイキッド・ギア・フリード +--Gearfried the Swordmaster local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57047293.lua b/official/c57047293.lua index 0fdfce7f31..53761b3c4f 100644 --- a/official/c57047293.lua +++ b/official/c57047293.lua @@ -1,4 +1,5 @@ --蒼焔の煉獄 +--Eye of the Void local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xbb} +s.listed_series={SET_INFERNOID} function s.filter(c,e,tp) - return c:IsSetCard(0xbb) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_INFERNOID) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -28,13 +29,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c57062206.lua b/official/c57062206.lua index 177805ced7..3935ac68fa 100644 --- a/official/c57062206.lua +++ b/official/c57062206.lua @@ -1,4 +1,5 @@ --ドイツ +--Doitsu local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,60246171),true) @@ -10,4 +11,4 @@ function s.initial_effect(c) e1:SetCondition(aux.IsUnionState) c:RegisterEffect(e1) end -s.listed_names={60246171} +s.listed_names={60246171} \ No newline at end of file diff --git a/official/c57069605.lua b/official/c57069605.lua index 13cfd52b14..b042a80b34 100644 --- a/official/c57069605.lua +++ b/official/c57069605.lua @@ -1,4 +1,5 @@ --魂の氷結 +--Frozen Soul local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,15 +20,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SKIP_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) - if Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then + if Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|RESET_OPPO_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|RESET_OPPO_TURN,1) end Duel.RegisterEffect(e1,tp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c57093995.lua b/official/c57093995.lua index d9c32801e1..016ff0f9b8 100644 --- a/official/c57093995.lua +++ b/official/c57093995.lua @@ -1,7 +1,6 @@ --コンドーレンス・パペット --Condolence Puppet --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Send "Gimmick Puppet" monsters from deck to GY @@ -19,14 +18,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.indtg) e2:SetOperation(s.indop) c:RegisterEffect(e2) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.filter(c) - return c:IsSetCard(0x1083) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsMonster() and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -58,7 +57,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c57103969.lua b/official/c57103969.lua index 38b5f2e52a..0192774a1c 100644 --- a/official/c57103969.lua +++ b/official/c57103969.lua @@ -1,4 +1,5 @@ --炎舞-「天璣」 +--Fire Formation - Tenki local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c57108202.lua b/official/c57108202.lua index 1b292d6d12..d6f69cf805 100644 --- a/official/c57108202.lua +++ b/official/c57108202.lua @@ -1,4 +1,5 @@ --D・リモコン +--Morphtronic Remoten local s,id=GetID() function s.initial_effect(c) --search @@ -25,23 +26,23 @@ function s.initial_effect(c) e2:SetOperation(s.opd) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.filter(c,lv) - return c:IsSetCard(0x26) and c:GetLevel()==lv and c:IsAbleToHand() + return c:IsSetCard(SET_MORPHTRONIC) and c:GetLevel()==lv and c:IsAbleToHand() end function s.cona(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() end function s.filtera(c,tp) local lv=c:GetLevel() - return c:IsSetCard(0x26) and lv>0 and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_MORPHTRONIC) and lv>0 and c:IsAbleToRemove() and aux.SpElimFilter(c,true) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,lv) end function s.tga(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filtera(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filtera,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filtera(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filtera,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filtera,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.filtera,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -61,7 +62,7 @@ function s.cond(e,tp,eg,ep,ev,re,r,rp) end function s.filterd(c,tp) local lv=c:GetLevel() - return c:IsSetCard(0x26) and lv>0 and c:IsAbleToGrave() + return c:IsSetCard(SET_MORPHTRONIC) and lv>0 and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,lv) end function s.tgd(e,tp,eg,ep,ev,re,r,rp,chk) @@ -82,4 +83,4 @@ function s.opd(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c57111330.lua b/official/c57111330.lua index a38d9f5ed5..35650bec3e 100644 --- a/official/c57111330.lua +++ b/official/c57111330.lua @@ -1,9 +1,9 @@ --- セリオンズ“デューク”ユール --- Therions' "Duke" Jule --- Scripted by Hatter +--セリオンズ“デューク”ユール +--Therion "Duke" Yul +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) @@ -15,35 +15,35 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) - -- "Therions" monsters protection + --"Therions" monsters protection local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetRange(LOCATION_MZONE) - e2:SetTarget(function(_,c) return c:IsSetCard(0x17b) and c:IsFaceup() end) + e2:SetTarget(function(_,c) return c:IsSetCard(SET_THERION) and c:IsFaceup() end) e2:SetCondition(s.indcon) e2:SetValue(aux.indoval) c:RegisterEffect(e2) - -- Equipped monster gains ATK + --Equipped monster gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x17b) end) + e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_THERION) end) e3:SetValue(700) c:RegisterEffect(e3) - -- Equipped monster gains effect + --Equipped monster gains effect local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x17b) end) + e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(SET_THERION) end) e4:SetLabelObject(e2) c:RegisterEffect(e4) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.eqfilter(c) - return c:IsMonster() and (c:IsSetCard(0x17b) or c:IsRace(RACE_PSYCHIC)) + return c:IsMonster() and (c:IsSetCard(SET_THERION) or c:IsRace(RACE_PSYCHIC)) end function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) diff --git a/official/c57115864.lua b/official/c57115864.lua index dbfff35ffe..b0b19676b1 100644 --- a/official/c57115864.lua +++ b/official/c57115864.lua @@ -1,4 +1,5 @@ --光子化 +--Lumenize local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -36,8 +37,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) ac:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c57116033.lua b/official/c57116033.lua index 1418de3c24..ebe0319232 100644 --- a/official/c57116033.lua +++ b/official/c57116033.lua @@ -22,6 +22,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c57116034.lua b/official/c57116034.lua deleted file mode 100644 index 7f8aa74af4..0000000000 --- a/official/c57116034.lua +++ /dev/null @@ -1,25 +0,0 @@ ---ハネクリボー -local s,id=GetID() -function s.initial_effect(c) - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_TO_GRAVE) - e1:SetCondition(s.con) - e1:SetOperation(s.op) - c:RegisterEffect(e1) -end -function s.con(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) -end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(1,0) - e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(e1,tp) -end diff --git a/official/c57134592.lua b/official/c57134592.lua index eadac32923..f9cd5abf9a 100644 --- a/official/c57134592.lua +++ b/official/c57134592.lua @@ -91,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c57135971.lua b/official/c57135971.lua index 22def328b1..174051bd75 100644 --- a/official/c57135971.lua +++ b/official/c57135971.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.filter(c) - return c:IsSetCard(0x3b) and c:IsFaceup() + return c:IsSetCard(SET_RED_EYES) and c:IsFaceup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.filter(chkc) and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end @@ -47,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e3=Effect.CreateEffect(c) @@ -55,17 +55,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.eqlimit(e,c) - return c:IsSetCard(0x3b) + return c:IsSetCard(SET_RED_EYES) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return e:GetHandler():GetEquipTarget() and aux.StatChangeDamageStepCondition() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end @@ -86,7 +86,7 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetLabelObject() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then if ec and ec:IsLocation(LOCATION_MZONE) and ec:IsFaceup() then Duel.Equip(tp,tc,ec) --Atk @@ -94,7 +94,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Def if not tc:IsOriginalType(TYPE_LINK) then @@ -102,7 +102,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_DEFENSE) e2:SetValue(tc:GetDefense()) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end --Equip limit @@ -111,13 +111,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit2) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetLabelObject(ec) tc:RegisterEffect(e3) - else Duel.SendtoGrave(tc,REASON_RULE) + else + Duel.SendtoGrave(tc,REASON_RULE) end end end function s.eqlimit2(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c57139487.lua b/official/c57139487.lua index 57fd3ca8bc..b7402620b8 100644 --- a/official/c57139487.lua +++ b/official/c57139487.lua @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsLocation(LOCATION_REMOVED) then local tpe=tc:GetType() if (tpe&TYPE_TOKEN)==0 then - rg:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK+LOCATION_HAND,nil,tc:GetCode())) + rg:Merge(Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK|LOCATION_HAND,nil,tc:GetCode())) end end end diff --git a/official/c57143342.lua b/official/c57143342.lua index 0f7faa6941..583717e787 100644 --- a/official/c57143342.lua +++ b/official/c57143342.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 ガトルホッグ +--Cir, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -32,16 +33,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} s.listed_names={id} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -57,7 +58,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xb1) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BURNING_ABYSS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -72,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57157964.lua b/official/c57157964.lua index c1c860c40f..663925a2ab 100644 --- a/official/c57157964.lua +++ b/official/c57157964.lua @@ -1,7 +1,6 @@ --古生代化石マシン スカルコンボイ --Fossil Machine Skull Convoy --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -50,14 +49,13 @@ function s.initial_effect(c) end --Specifically lists "Fossil Fusion" s.listed_names={CARD_FOSSIL_FUSION} - --Check for a rock monster in your GY function s.ffilter(c,fc,sumtype,tp) return c:IsRace(RACE_ROCK) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) end --If fusion summoned function s.condition(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end --Get original DEF function s.atkval(e,c) diff --git a/official/c57160136.lua b/official/c57160136.lua index 67f44cffc7..e899d3a52b 100644 --- a/official/c57160136.lua +++ b/official/c57160136.lua @@ -35,5 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c57182235.lua b/official/c57182235.lua index 1f1f5aa145..6fd97c0979 100644 --- a/official/c57182235.lua +++ b/official/c57182235.lua @@ -1,4 +1,5 @@ --トークン収穫祭 +--Token Thanksgiving local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Recover(tp,ct*800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57201737.lua b/official/c57201737.lua index 632c1ecd55..cf53822d7a 100644 --- a/official/c57201737.lua +++ b/official/c57201737.lua @@ -1,4 +1,5 @@ --ガオドレイクのタテガミ +--Leodrake's Mane local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) + return c:IsFaceup() and c:IsSetCard(SET_NATURIA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,18 +30,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(3000) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c57232301.lua b/official/c57232301.lua index 149920d3aa..724dd8643a 100644 --- a/official/c57232301.lua +++ b/official/c57232301.lua @@ -1,4 +1,4 @@ ---Japanese name +--断影烈破 --Shadow Severing Strike --scripted by Naim local s,id=GetID() diff --git a/official/c57238939.lua b/official/c57238939.lua index 88c866e1b7..0d12209065 100644 --- a/official/c57238939.lua +++ b/official/c57238939.lua @@ -1,4 +1,5 @@ --A・ジェネクス・リモート +--Genex Ally Remote local s,id=GetID() function s.initial_effect(c) --cos @@ -29,7 +30,7 @@ function s.cosop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(68505803) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c57246528.lua b/official/c57246528.lua index 90a1aa15b3..d1865a6e81 100644 --- a/official/c57246528.lua +++ b/official/c57246528.lua @@ -1,7 +1,6 @@ --シンクロ・トランセンド --Synchro Transcend --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon 1 synchro monster from extra deck @@ -41,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sg:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c57261568.lua b/official/c57261568.lua index 72dd56a143..02bb55c49b 100644 --- a/official/c57261568.lua +++ b/official/c57261568.lua @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.synop) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c) - return c:IsSetCard(0xe6) and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -64,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)~=0 then local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then local ct=math.min(Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0),3) if ct==0 then return end Duel.BreakEffect() @@ -86,4 +86,4 @@ function s.synop(e,tg,ntg,sg,lv,sc,tp) local res=sg:CheckWithSumEqual(Card.GetSynchroLevel,lv,#sg,#sg,sc) or sg:CheckWithSumEqual(function() return 2 end,lv,#sg,#sg) return res,true -end +end \ No newline at end of file diff --git a/official/c57270476.lua b/official/c57270476.lua index 55813c2bb0..c599fb94ea 100644 --- a/official/c57270476.lua +++ b/official/c57270476.lua @@ -1,4 +1,5 @@ --墓場からの誘い +--Grave Lure local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) @@ -25,10 +26,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOHAND) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOHAND) tc:RegisterEffect(e1) end end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57272170.lua b/official/c57272170.lua index db08c6017f..0196e35f14 100644 --- a/official/c57272170.lua +++ b/official/c57272170.lua @@ -1,4 +1,5 @@ --イビリチュア・ソウルオーガ +--Evigishki Soul Ogre local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -15,13 +16,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.costfilter(c) - return c:IsSetCard(0x3a) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_GISHKI) and c:IsMonster() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsAbleToDeck() @@ -36,6 +37,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57274196.lua b/official/c57274196.lua index 53ff87b7b7..eb7a503a83 100644 --- a/official/c57274196.lua +++ b/official/c57274196.lua @@ -22,7 +22,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) Duel.RegisterEffect(e1,tp) @@ -36,4 +36,4 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c5728014.lua b/official/c5728014.lua index 0b60985da5..a007621db8 100644 --- a/official/c5728014.lua +++ b/official/c5728014.lua @@ -1,4 +1,5 @@ --ライバル登場! +--A Rival Appears! local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c57281778.lua b/official/c57281778.lua index a37b231a55..28392dc29d 100644 --- a/official/c57281778.lua +++ b/official/c57281778.lua @@ -1,4 +1,5 @@ --龍骨鬼 +--Ryu Kokki local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) local t=Duel.GetAttackTarget() if ev==1 then t=Duel.GetAttacker() end e:SetLabelObject(t) - return t and t:IsRace(RACE_SPELLCASTER+RACE_WARRIOR) + return t and t:IsRace(RACE_SPELLCASTER|RACE_WARRIOR) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetLabelObject():IsRelateToBattle() end @@ -27,4 +28,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57282724.lua b/official/c57282724.lua index ada09837da..537970f8d7 100644 --- a/official/c57282724.lua +++ b/official/c57282724.lua @@ -1,5 +1,5 @@ --星神器デミウルギア ---World Regalia Demiurgear +--World Gears of Theurlogical Demiurgy --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -50,18 +50,18 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.econ(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) and re:GetOwner()~=e:GetOwner() + return re:IsMonsterEffect() and re:GetOwner()~=e:GetOwner() end function s.matcheck(e,c) local g=c:GetMaterial() local tp=c:GetControler() if g:GetClassCount(Card.GetRace,c,SUMMON_TYPE_LINK,tp)==3 and g:GetClassCount(Card.GetAttribute,c,SUMMON_TYPE_LINK,tp)==3 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE-RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD-RESET_LEAVE-RESET_TEMP_REMOVE,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -85,7 +85,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -99,5 +99,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c572850.lua b/official/c572850.lua index 8f135128ef..c6794549be 100644 --- a/official/c572850.lua +++ b/official/c572850.lua @@ -1,9 +1,9 @@ --- ティアラメンツ・シェイレーン --- Tearalaments Scheiren --- Scripted by Hatter +--ティアラメンツ・シェイレーン +--Tearlaments Scheiren +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_DECKDES) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Fusion Summon + --Fusion Summon local fusparams = {matfilter=Card.IsAbleToDeck,extrafil=s.extramat,extraop=s.extraop,gc=Fusion.ForcedHandler,extratg=s.extratarget} local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) @@ -52,10 +52,10 @@ function s.extramat(e,tp,mg) end function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) end function s.extraop(e,tc,tp,sg) - local gg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_GRAVE) + local gg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_GRAVE) if #gg>0 then Duel.HintSelection(gg,true) end local rg=sg:Filter(Card.IsFacedown,nil) if #rg>0 then Duel.ConfirmCards(1-tp,rg) end @@ -69,4 +69,4 @@ function s.extraop(e,tc,tp,sg) Duel.SortDeckbottom(tp,1-tp,#dg-ct) end sg:Clear() -end +end \ No newline at end of file diff --git a/official/c57285770.lua b/official/c57285770.lua index 97d7bc79a6..8ae0a21021 100644 --- a/official/c57285770.lua +++ b/official/c57285770.lua @@ -1,5 +1,5 @@ --セリオンズ・チャージ ---Therions' Charge +--Therion Charge --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -16,15 +16,15 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_ARGYRO_SYSTEM,id} -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.cfilter(c) return ((c:IsFaceup() and c:GetSequence()<5) or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() - and ((c:IsSetCard(0x17b) and not c:IsCode(id)) or c:IsCode(CARD_ARGYRO_SYSTEM)) + and ((c:IsSetCard(SET_THERION) and not c:IsCode(id)) or c:IsCode(CARD_ARGYRO_SYSTEM)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_SZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_SZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c57288064.lua b/official/c57288064.lua index 6f2d0e0345..4c35aa5b33 100644 --- a/official/c57288064.lua +++ b/official/c57288064.lua @@ -1,4 +1,5 @@ --刀神-不知火 +--Shiranui Samuraisaga local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -44,7 +45,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.posop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end @@ -61,8 +62,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c57288708.lua b/official/c57288708.lua index 8adcfbb158..9183d2f93e 100644 --- a/official/c57288708.lua +++ b/official/c57288708.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.tgcon) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -35,12 +35,12 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(aux.exccon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xfd,0xfe} +s.listed_series={SET_WORLD_CHALICE,SET_WORLD_LEGACY} s.listed_names={id} function s.tgfilter(c) return (c:GetSummonLocation()&LOCATION_EXTRA)==LOCATION_EXTRA and c:IsLocation(LOCATION_MZONE) @@ -48,10 +48,6 @@ end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.tgfilter,1,nil) end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local g=eg:Filter(s.tgfilter,nil) @@ -65,10 +61,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and not c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and not c:IsSpecialSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfd) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_CHALICE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -85,7 +81,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xfe) and c:IsAbleToHand() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -98,4 +94,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c57296396.lua b/official/c57296396.lua index 1a72b933bc..0979e8bd57 100644 --- a/official/c57296396.lua +++ b/official/c57296396.lua @@ -24,8 +24,8 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) - e2:SetCost(aux.bfgcost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atkdeftg) e2:SetOperation(s.atkdefop) c:RegisterEffect(e2) diff --git a/official/c57312333.lua b/official/c57312333.lua index 7a0fe0f968..deeeb9d454 100644 --- a/official/c57312333.lua +++ b/official/c57312333.lua @@ -18,15 +18,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x4) and not c:IsCode(id) and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard(SET_AMAZONESS) and not c:IsCode(id) and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -36,12 +36,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() aux.ToHandOrElse(tc,tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4) + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -56,7 +52,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(e:GetHandler()) @@ -65,9 +61,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(tc:GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c57314798.lua b/official/c57314798.lua index 7f9a88f8e7..307c8a91d4 100644 --- a/official/c57314798.lua +++ b/official/c57314798.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,7 +40,7 @@ function s.initial_effect(c) end s.xyz_number=100 function s.xyzfilter(c,xyz,sumtype,tp) - return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsSetCard(0x48,xyz,sumtype,tp) + return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) @@ -63,7 +63,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk*1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -99,14 +99,12 @@ function s.spfilter(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil - and not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) + and not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - c:IsCanBeSpecialSummoned(e,0,tp,false,false) - end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -114,4 +112,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57319935.lua b/official/c57319935.lua index fd09905284..eaa8d3a97b 100644 --- a/official/c57319935.lua +++ b/official/c57319935.lua @@ -1,4 +1,5 @@ --エクシーズ熱戦!! +--Xyz Xtreme !! local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -28,10 +29,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end return false end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRankBelow,tp,LOCATION_EXTRA,0,1,nil,e:GetLabel()) end end @@ -57,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,tc2) Duel.Damage(tp,tc2:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57329501.lua b/official/c57329501.lua index b97d9fac26..ab4b6aac34 100644 --- a/official/c57329501.lua +++ b/official/c57329501.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={91027843} -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} --Special Summon from GY filter function s.spgfilter(c,e,tp) - return c:IsSetCard(0x12b) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MARINCESS) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Special Summon from Deck filter function s.spdfilter(c,e,tp) - return c:IsSetCard(0x12b) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MARINCESS) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spgfilter(chkc,e,tp) end @@ -65,11 +65,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c57346400.lua b/official/c57346400.lua index a8d041c0c9..14186ee73d 100644 --- a/official/c57346400.lua +++ b/official/c57346400.lua @@ -16,6 +16,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c57348141.lua b/official/c57348141.lua index 261330c448..145a8f3a12 100644 --- a/official/c57348141.lua +++ b/official/c57348141.lua @@ -1,4 +1,5 @@ --トワイライト・イレイザー +--Twilight Eraser local s,id=GetID() function s.initial_effect(c) --activate @@ -24,19 +25,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter1(c,tp) - return c:IsFaceup() and c:IsSetCard(0x38) + return c:IsFaceup() and c:IsSetCard(SET_LIGHTSWORN) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,c,c:GetRace(),c:GetCode()) end function s.filter2(c,race,code) - return c:IsFaceup() and c:IsSetCard(0x38) and c:IsRace(race) and not c:IsCode(code) + return c:IsFaceup() and c:IsSetCard(SET_LIGHTSWORN) and c:IsRace(race) and not c:IsCode(code) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x38) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsMonster() and c:IsSetCard(SET_LIGHTSWORN) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.rescon(sg,e,tp,mg) sg:AddCard(e:GetHandler()) @@ -46,7 +47,7 @@ function s.rescon(sg,e,tp,mg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) - local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(cg,e,tp,2,2,s.rescon,0) end local rg=aux.SelectUnselectGroup(cg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(rg,POS_FACEUP,REASON_COST) @@ -68,11 +69,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x38) + return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_LIGHTSWORN) and r&REASON_EFFECT~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x38) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LIGHTSWORN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -86,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57354389.lua b/official/c57354389.lua index defad1f539..f2bac831ff 100644 --- a/official/c57354389.lua +++ b/official/c57354389.lua @@ -1,4 +1,5 @@ --岩石の番兵 +--Sentry Soldier of Stone local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57355219.lua b/official/c57355219.lua index f769d28f08..3201bf45cc 100644 --- a/official/c57355219.lua +++ b/official/c57355219.lua @@ -48,7 +48,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -74,7 +74,7 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -83,7 +83,7 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterEffect(e1,tp) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetLabelObject() @@ -92,4 +92,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if ct==1 then Duel.ReturnToField(c,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c57357130.lua b/official/c57357130.lua index 7207404b21..bfcfb200c7 100644 --- a/official/c57357130.lua +++ b/official/c57357130.lua @@ -77,4 +77,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57384901.lua b/official/c57384901.lua index 2234eb003a..c6097327bf 100644 --- a/official/c57384901.lua +++ b/official/c57384901.lua @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then Duel.SwapControl(a,b) end -end +end \ No newline at end of file diff --git a/official/c57409948.lua b/official/c57409948.lua index b65f3ac44b..89a5300c49 100644 --- a/official/c57409948.lua +++ b/official/c57409948.lua @@ -1,4 +1,5 @@ --爆弾かめ虫 +--Bombardment Beetle local s,id=GetID() function s.initial_effect(c) --flip @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c57416183.lua b/official/c57416183.lua index 9bc888c7af..fe46f233cd 100644 --- a/official/c57416183.lua +++ b/official/c57416183.lua @@ -24,23 +24,23 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end + and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) + local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) g:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) end @@ -51,21 +51,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,tc:GetFieldID()) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,tc:GetFieldID()) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -87,4 +87,4 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57421866.lua b/official/c57421866.lua index 63aefeeeac..3fb0d0bbd3 100644 --- a/official/c57421866.lua +++ b/official/c57421866.lua @@ -1,4 +1,5 @@ --レベル・スティーラー +--Level Eater local s,id=GetID() function s.initial_effect(c) --spsummon @@ -39,10 +40,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57425061.lua b/official/c57425061.lua index b1a4b3938b..53c99ee5b8 100644 --- a/official/c57425061.lua +++ b/official/c57425061.lua @@ -2,35 +2,33 @@ --Vision Fusion local s,id=GetID() function s.initial_effect(c) - --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x8),nil,s.fextra,s.extraop) + --Fusion Summon 1 "HERO" Fusion Monster from your Extra Deck, using monsters from your hand or field as Fusion Material + local e1=Fusion.CreateSummonEff({handler=c,fusfilter=function(c) return c:IsSetCard(SET_HERO) end,extrafil=s.fextra,extraop=s.extraop,extratg=s.extratg}) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x8} -function s.exfilter0(c) - return c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER - and c:GetType()&(TYPE_TRAP+TYPE_CONTINUOUS)==TYPE_TRAP+TYPE_CONTINUOUS - and c:IsAbleToRemove() -end -function s.matlimit(c) - return c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER and c:IsLocation(LOCATION_SZONE) - and c:GetType()&(TYPE_TRAP+TYPE_CONTINUOUS)==TYPE_TRAP+TYPE_CONTINUOUS +s.listed_series={SET_HERO} +function s.fextrafilter(c) + return c:IsMonsterCard() and c:IsContinuousTrap() and c:IsAbleToRemove() and c:IsLocation(LOCATION_STZONE) end function s.fcheck(tp,sg,fc) - return sg:FilterCount(s.matlimit,nil)<=2 + return sg:FilterCount(s.fextrafilter,nil)<=2 end function s.fextra(e,tp,mg) - local sg=Duel.GetMatchingGroup(s.exfilter0,tp,LOCATION_SZONE,0,nil) + local sg=Duel.GetMatchingGroup(s.fextrafilter,tp,LOCATION_STZONE,0,nil) if #sg>0 then return sg,s.fcheck end return nil end function s.extraop(e,tc,tp,sg) - local rg=sg:Filter(Card.IsLocation,nil,LOCATION_SZONE) - if #rg>0 then - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) - sg:Sub(rg) - end + local rg=sg:Filter(s.fextrafilter,nil) + if #rg>0 then + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT|REASON_MATERIAL|REASON_FUSION) + sg:Sub(rg) + end +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_STZONE) end diff --git a/official/c57433966.lua b/official/c57433966.lua index 3c0111bdb7..6d3708475b 100644 --- a/official/c57433966.lua +++ b/official/c57433966.lua @@ -1,5 +1,5 @@ --魅惑の未界域 ---Danger! Suspense! Secrets! +--Danger! Excitement! Mystery! --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -15,16 +15,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} function s.disthfilter(c) - return c:IsSetCard(0x11e) and c:IsMonster() and c:IsLevelAbove(5) and c:IsDiscardable() + return c:IsSetCard(SET_DANGER) and c:IsMonster() and c:IsLevelAbove(5) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.disthfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.disthfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.disthfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.thfilter(c) - return c:IsSetCard(0x11e) and c:IsMonster() and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_DANGER) and c:IsMonster() and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -45,9 +45,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x11e) + return not c:IsSetCard(SET_DANGER) end \ No newline at end of file diff --git a/official/c57441100.lua b/official/c57441100.lua index dbeb3a92bd..91b8636b58 100644 --- a/official/c57441100.lua +++ b/official/c57441100.lua @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57458399.lua b/official/c57458399.lua index fb3dec0064..0eeea3253c 100644 --- a/official/c57458399.lua +++ b/official/c57458399.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x66,0xa3,0x1017} +s.listed_series={SET_WARRIOR,SET_STARDUST,SET_SYNCHRON} function s.gfilter(c,tp) return c:GetPreviousLocation()==LOCATION_GRAVE and c:GetPreviousControler()==tp end @@ -44,12 +44,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,e,tp,sc) - return c:IsFaceup() and (c:IsOriginalSetCard(0x66) or c:IsOriginalSetCard(0xa3) or c:IsOriginalSetCard(0x1017)) - and c:IsType(TYPE_SYNCHRO) + return c:IsFaceup() and (c:IsOriginalSetCard(SET_WARRIOR) or c:IsOriginalSetCard(SET_STARDUST) or c:IsOriginalSetCard(SET_SYNCHRON)) + and c:IsType(TYPE_SYNCHRO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetLevel()~=4 - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + return e:GetHandler():GetLevel()~=4 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,8 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c57470761.lua b/official/c57470761.lua index 0352bf40a2..b05e79df30 100644 --- a/official/c57470761.lua +++ b/official/c57470761.lua @@ -1,4 +1,5 @@ --タイラント・ウィング +--Tyrant Wing local s,id=GetID() function s.initial_effect(c) --activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) end @@ -31,20 +29,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(400) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) @@ -53,21 +51,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_EQUIP) e4:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e4:SetValue(1) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e4) local e7=Effect.CreateEffect(c) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e7:SetCode(EVENT_BATTLE_START) e7:SetRange(LOCATION_SZONE) e7:SetOperation(s.regop) - e7:SetReset(RESET_EVENT+RESETS_STANDARD) + e7:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e7) local e8=Effect.CreateEffect(c) e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e8:SetCode(EVENT_EQUIP) e8:SetRange(LOCATION_SZONE) e8:SetOperation(s.resetop) - e8:SetReset(RESET_EVENT+RESETS_STANDARD) + e8:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e8) local e9=Effect.CreateEffect(c) e9:SetCategory(CATEGORY_DESTROY) @@ -78,7 +76,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e9:SetCondition(s.descon) e9:SetTarget(s.destg) e9:SetOperation(s.desop) - e9:SetReset(RESET_EVENT+RESETS_STANDARD) + e9:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e9) else c:CancelToGrave(false) @@ -93,7 +91,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) if not ec:IsRelateToBattle() then return end local bc=ec:GetBattleTarget() if bc and bc:IsControler(1-tp) and Duel.GetAttacker()==ec then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.resetop(e,tp,eg,ep,ev,re,r,rp) @@ -113,4 +111,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57473560.lua b/official/c57473560.lua index f2232906ad..529654bd9f 100644 --- a/official/c57473560.lua +++ b/official/c57473560.lua @@ -1,6 +1,5 @@ --ワイトプリンス --Wightprince - local s,id=GetID() function s.initial_effect(c) --Name becomes "Skull Servant" while in GY @@ -33,18 +32,17 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_SKULL_SERVANT,36021814,40991587} - function s.tgfilter(c,code) return c:IsCode(code) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,CARD_SKULL_SERVANT) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,40991587) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,CARD_SKULL_SERVANT) + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,40991587) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local g1=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,CARD_SKULL_SERVANT) - local g2=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,40991587) + local g1=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,CARD_SKULL_SERVANT) + local g2=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,40991587) if #g1>0 and #g2>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local sg1=g1:Select(tp,1,1,nil) diff --git a/official/c57477163.lua b/official/c57477163.lua index dd235a2a15..fa2389aec8 100644 --- a/official/c57477163.lua +++ b/official/c57477163.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,61173621,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9)) + Fusion.AddProcMix(c,true,true,61173621,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL)) --actlimit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -27,8 +27,8 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xa9} -s.material_setcode={0xa9,0xc3} +s.listed_series={SET_FLUFFAL} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP} function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end @@ -49,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c57482479.lua b/official/c57482479.lua index a10ecc64bf..9942cd0fb6 100644 --- a/official/c57482479.lua +++ b/official/c57482479.lua @@ -1,4 +1,5 @@ --太陽の戦士 +--Luminous Soldier local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,4 +16,4 @@ function s.condtion(e) if not (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) or not e:GetHandler():IsRelateToBattle() then return false end local bc=e:GetHandler():GetBattleTarget() return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c57496978.lua b/official/c57496978.lua index 17e5315ee8..b9f190e886 100644 --- a/official/c57496978.lua +++ b/official/c57496978.lua @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tg:GetFirst():RegisterEffect(e1) else chk=false @@ -47,14 +47,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_BATTLED) e3:SetLabelObject(g) e3:SetOperation(s.tgop) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) end end @@ -72,4 +72,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.SendtoGrave(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57499304.lua b/official/c57499304.lua index 1a67c38706..0b1a239e37 100644 --- a/official/c57499304.lua +++ b/official/c57499304.lua @@ -1,5 +1,5 @@ --七皇転生 ---Reincarnation of the Seven Emperors +--Reincarnation of the Seventh Emperors --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -13,11 +13,11 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.cfilter(c) if not c:IsType(TYPE_XYZ) then return false end local no=c.xyz_number - return (c:IsSetCard(0x48) and no and no>=101 and no<=107) + return (c:IsSetCard(SET_NUMBER) and no and no>=101 and no<=107) or c:GetOverlayGroup():IsExists(s.cfilter,1,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -46,11 +46,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.op) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.spfilter(c,e,tp) - return c:IsRankBelow(3) and not c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsRankBelow(3) and not c:IsSetCard(SET_NUMBER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.op(e,tp,eg,ep,ev,re,r,rp) @@ -60,4 +60,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57511992.lua b/official/c57511992.lua index 263236c2ed..8cf03902a4 100644 --- a/official/c57511992.lua +++ b/official/c57511992.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -72,7 +72,7 @@ function s.lvnmop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local tc=Duel.GetFirstTarget() if not (tc and tc:IsRelateToEffect(e)) then return end @@ -89,7 +89,7 @@ function s.lvnmop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CHANGE_CODE) e2:SetRange(LOCATION_MZONE) e2:SetValue(tc:GetCode()) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_CHANGE_LEVEL) @@ -102,4 +102,4 @@ function s.lvnmop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c57523313.lua b/official/c57523313.lua index 8bbc601430..bce4ae8e14 100644 --- a/official/c57523313.lua +++ b/official/c57523313.lua @@ -80,5 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c57541158.lua b/official/c57541158.lua index 5133be38af..471b9db1de 100644 --- a/official/c57541158.lua +++ b/official/c57541158.lua @@ -22,14 +22,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x12b) + return c:IsFaceup() and c:IsSetCard(SET_MARINCESS) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -56,15 +56,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTarget(function(e,c) return c==e:GetHandler():GetFirstCardTarget() end) e1:SetValue(aux.indoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end function s.efilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsType(TYPE_LINK) + return c:IsFaceup() and c:IsSetCard(SET_MARINCESS) and c:IsType(TYPE_LINK) end function s.eqfilter(c) - return not c:IsForbidden() and c:IsLinkMonster() and c:IsSetCard(0x12b) + return not c:IsForbidden() and c:IsLinkMonster() and c:IsSetCard(SET_MARINCESS) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.efilter(chkc,tp) end @@ -87,7 +87,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) eq:RegisterEffect(e1) @@ -95,4 +95,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c57543573.lua b/official/c57543573.lua index 1e967b89b8..3f05fa27ef 100644 --- a/official/c57543573.lua +++ b/official/c57543573.lua @@ -69,4 +69,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57549932.lua b/official/c57549932.lua index cddd4f0b7a..4cf844067d 100644 --- a/official/c57549932.lua +++ b/official/c57549932.lua @@ -12,4 +12,4 @@ function s.initial_effect(c) e1:SetCondition(Gemini.EffectStatusCondition) e1:SetValue(2300) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c575512.lua b/official/c575512.lua index f49f5381f8..88e08d9ea1 100644 --- a/official/c575512.lua +++ b/official/c575512.lua @@ -32,9 +32,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xc1} +s.listed_series={SET_PSY_FRAME} function s.scfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xc1) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_PSY_FRAME) and c:IsControler(tp) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.scfilter,1,nil,tp) @@ -45,7 +45,7 @@ function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk) c:RegisterFlagEffect(id,RESET_CHAIN,0,1) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc1) + return c:IsFaceup() and c:IsSetCard(SET_PSY_FRAME) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -68,17 +68,17 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsControler(tp) and tc:IsSetCard(0xc1) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil + return tc and tc:IsControler(tp) and tc:IsSetCard(SET_PSY_FRAME) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil end function s.atkfilter(c) - return c:IsSetCard(0xc1) and c:GetAttack()>0 and c:IsDiscardable() + return c:IsSetCard(SET_PSY_FRAME) and c:GetAttack()>0 and c:IsDiscardable() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_HAND,0,1,1,nil) e:SetLabel(g:GetFirst():GetAttack()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -88,7 +88,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c57554544.lua b/official/c57554544.lua index 5db425ebf8..6e5a7158f7 100644 --- a/official/c57554544.lua +++ b/official/c57554544.lua @@ -1,4 +1,5 @@ --炎王の孤島 +--Fire King Island local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,21 +42,21 @@ function s.initial_effect(c) e5:SetCode(EVENT_REMOVE) c:RegisterEffect(e5) end -s.listed_series={0x81} +s.listed_series={SET_FIRE_KING} function s.filter2(c) - return c:IsSetCard(0x81) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FIRE_KING) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_DECK,0,1,1,nil) diff --git a/official/c57568840.lua b/official/c57568840.lua index 25e8864074..38bbe438cc 100644 --- a/official/c57568840.lua +++ b/official/c57568840.lua @@ -30,7 +30,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c57579381.lua b/official/c57579381.lua index 0588b43aa9..02150470c8 100644 --- a/official/c57579381.lua +++ b/official/c57579381.lua @@ -1,4 +1,5 @@ --堕天使マリー +--Darklord Marie local s,id=GetID() function s.initial_effect(c) --recover @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5758500.lua b/official/c5758500.lua index 7772cf1ee8..4f858adf8c 100644 --- a/official/c5758500.lua +++ b/official/c5758500.lua @@ -1,4 +1,5 @@ --魂の解放 +--Soul Release local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,14 +16,14 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,5,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,5,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57585212.lua b/official/c57585212.lua index f157161745..83340b8482 100644 --- a/official/c57585212.lua +++ b/official/c57585212.lua @@ -1,4 +1,5 @@ --自爆スイッチ +--Self-Destruct Button local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,4 +16,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,0) Duel.SetLP(1-tp,0) -end +end \ No newline at end of file diff --git a/official/c57594700.lua b/official/c57594700.lua index 8c56adb519..0c44693816 100644 --- a/official/c57594700.lua +++ b/official/c57594700.lua @@ -1,9 +1,10 @@ --幻奏の音姫マイスタリン・シューベルト +--Schuberta the Melodious Maestra local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9b),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELODIOUS),2) --remove local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) @@ -13,16 +14,13 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x9b} -s.material_setcode=0x9b -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_MELODIOUS} +s.material_setcode=SET_MELODIOUS function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end @@ -38,8 +36,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct*200) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c57605303.lua b/official/c57605303.lua index b153720ca7..f77cc907f2 100644 --- a/official/c57605303.lua +++ b/official/c57605303.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,20 +24,17 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x111} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_ARMED_DRAGON} function s.atkfilter(c,lv) - return c:IsSetCard(0x111) and c:IsLevelBelow(lv) + return c:IsSetCard(SET_ARMED_DRAGON) and c:IsLevelBelow(lv) end function s.tgfilter(c,tp) - return c:IsSetCard(0x111) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetLevel()) + return c:IsSetCard(SET_ARMED_DRAGON) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetLevel()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end @@ -54,18 +51,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(val) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.thfilter(c) - return c:IsSpell() and c:IsSetCard(0x111) and c:IsAbleToHand() + return c:IsSpell() and c:IsSetCard(SET_ARMED_DRAGON) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -76,7 +73,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57610714.lua b/official/c57610714.lua index fc095583e8..22336a3205 100644 --- a/official/c57610714.lua +++ b/official/c57610714.lua @@ -1,4 +1,5 @@ --雲魔物-アイ・オブ・ザ・タイフーン +--Cloudian - Eye of the Typhoon local s,id=GetID() function s.initial_effect(c) --battle indestructable @@ -24,14 +25,14 @@ function s.initial_effect(c) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0x18} +s.listed_series={SET_CLOUDIAN} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.filter(c) - return c:IsFaceup() and not c:IsSetCard(0x18) + return c:IsFaceup() and not c:IsSetCard(SET_CLOUDIAN) end function s.posop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) -end +end \ No newline at end of file diff --git a/official/c57617178.lua b/official/c57617178.lua index 382dd666ee..2d72818e38 100644 --- a/official/c57617178.lua +++ b/official/c57617178.lua @@ -1,4 +1,5 @@ --ソニックバード +--Sonic Bird local s,id=GetID() function s.initial_effect(c) --effect @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:GetType()==0x82 and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +29,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c57624336.lua b/official/c57624336.lua index 764806529c..a0fdfca95c 100644 --- a/official/c57624336.lua +++ b/official/c57624336.lua @@ -1,4 +1,5 @@ --エキセントリック・デーモン +--Archfiend Eccentrick local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -20,13 +21,13 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.descost2) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.destg2) e3:SetOperation(s.desop2) c:RegisterEffect(e3) end function s.filter1(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter1(chkc) and chkc~=e:GetHandler() end @@ -44,10 +45,6 @@ function s.desop1(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(Group.FromCards(tc,e:GetHandler()),REASON_EFFECT) end end -function s.descost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end @@ -60,4 +57,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsMonster() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57630503.lua b/official/c57630503.lua index a742d1ab59..7f984a174b 100644 --- a/official/c57630503.lua +++ b/official/c57630503.lua @@ -1,5 +1,5 @@ --魔轟神マルコシア ---Fabled Marchosia +--Fabled Marcosia --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -31,19 +31,19 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,e:GetHandler()):IsExists(Card.IsSetCard,1,nil,0x35) end + and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,e:GetHandler()):IsExists(Card.IsSetCard,1,nil,SET_FABLED) end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsSetCard,1,nil,0x35) + return sg:IsExists(Card.IsSetCard,1,nil,SET_FABLED) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,e:GetHandler()) local og=aux.SelectUnselectGroup(g,e,tp,1,2,s.rescon,1,tp,HINTMSG_DISCARD,s.rescon) if og and #og>0 then - local ct=Duel.SendtoGrave(og,REASON_EFFECT+REASON_DISCARD) + local ct=Duel.SendtoGrave(og,REASON_EFFECT|REASON_DISCARD) if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and ct>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -60,17 +60,17 @@ function s.thcond(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&REASON_DISCARD)~=0 end function s.thfilter(c) - return c:IsSetCard(0x35) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_FABLED) and c:IsSpellTrap() and c:IsAbleToHand() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if #g>0 then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end end \ No newline at end of file diff --git a/official/c57647597.lua b/official/c57647597.lua index 0a1f0793ef..39a8f9c298 100644 --- a/official/c57647597.lua +++ b/official/c57647597.lua @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then @@ -78,7 +78,7 @@ function s.zaop(c,hc) local e1=Effect.CreateEffect(hc) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c57662975.lua b/official/c57662975.lua index 17882eb0d1..964107b643 100644 --- a/official/c57662975.lua +++ b/official/c57662975.lua @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57666212.lua b/official/c57666212.lua index 120562d90b..68460426d7 100644 --- a/official/c57666212.lua +++ b/official/c57666212.lua @@ -1,4 +1,5 @@ --光帝クライス +--Kuraz the Light Monarch local s,id=GetID() function s.initial_effect(c) --destroy @@ -53,6 +54,6 @@ function s.disatt(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c57690191.lua b/official/c57690191.lua index c04050a379..faad4a2ae7 100644 --- a/official/c57690191.lua +++ b/official/c57690191.lua @@ -30,16 +30,16 @@ function s.initial_effect(c) e3:SetCountLimit(1) c:RegisterEffect(e3) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.atcon(e) local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) return #g~=3 or g:IsExists(s.atkfilter,1,nil) end function s.atkfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x107a) + return c:IsFacedown() or not c:IsSetCard(SET_NOBLE_KNIGHT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -60,17 +60,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x107a) + return not c:IsSetCard(SET_NOBLE_KNIGHT) end function s.drfilter(c) - return (c:IsSetCard(0x107a) or c:IsSetCard(0x207a)) and c:IsAbleToDeck() + return (c:IsSetCard(SET_NOBLE_KNIGHT) or c:IsSetCard(SET_NOBLE_ARMS)) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.drfilter(chkc) end @@ -83,12 +83,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57707471.lua b/official/c57707471.lua index 210f6cb438..2c362ebfce 100644 --- a/official/c57707471.lua +++ b/official/c57707471.lua @@ -1,4 +1,5 @@ --No.21 氷結のレディ・ジャスティス +--Number 21: Frozen Lady Justice local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,7 +18,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -34,10 +35,6 @@ end function s.atkval(e,c) return c:GetOverlayCount()*1000 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.desfilter(c) return c:IsDefensePos() end @@ -49,4 +46,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57722593.lua b/official/c57722593.lua index 49ca97a49c..92deff946f 100644 --- a/official/c57722593.lua +++ b/official/c57722593.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCode(EVENT_PHASE+PHASE_END) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.aclimtg) e3:SetOperation(s.aclimop) c:RegisterEffect(e3) diff --git a/official/c5772618.lua b/official/c5772618.lua index 3fd3236d6b..8ef73d281b 100644 --- a/official/c5772618.lua +++ b/official/c5772618.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.tfilter(c,scard,sumtype,tp) return c:IsRace(RACE_MACHINE,scard,sumtype,tp) and c:IsAttribute(ATTRIBUTE_WIND,scard,sumtype,tp) end @@ -48,7 +48,7 @@ function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function s.syncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -72,12 +72,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -85,7 +85,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end function s.thfilter(c) - return c:IsSetCard(0x2016) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -98,4 +98,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c57728570.lua b/official/c57728570.lua index d3a87b3eb9..74e3f96eaa 100644 --- a/official/c57728570.lua +++ b/official/c57728570.lua @@ -36,11 +36,11 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.hgfilter,tp,0,LOCATION_HAND,1,nil) or Duel.IsExistingMatchingCard(s.fgfilter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(s.tgfilter,tp,0,LOCATION_MZONE+LOCATION_HAND,nil) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,0,LOCATION_MZONE|LOCATION_HAND,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) + local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE|LOCATION_HAND) local ct=0 if #conf>0 then Duel.ConfirmCards(tp,conf) @@ -62,17 +62,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) e3:SetTargetRange(0,1) Duel.RegisterEffect(e3,tp) end -end +end \ No newline at end of file diff --git a/official/c57728571.lua b/official/c57728571.lua deleted file mode 100644 index 847c6d6668..0000000000 --- a/official/c57728571.lua +++ /dev/null @@ -1,71 +0,0 @@ ---死のデッキ破壊ウイルス -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.costfilter(c) - return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackBelow(1000) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil) end - local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil) - Duel.Release(g,REASON_COST) -end -function s.filter(c) - return c:IsAttackAbove(1500) -end -function s.hgfilter(c) - return not c:IsPublic() or s.filter(c) -end -function s.fgfilter(c) - return c:IsFacedown() or s.filter(c) -end -function s.tgfilter(c) - return ((c:IsLocation(LOCATION_HAND) and c:IsPublic()) or (c:IsLocation(LOCATION_MZONE) and c:IsFaceup())) and s.filter(c) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.hgfilter,tp,0,LOCATION_HAND,1,nil) - or Duel.IsExistingMatchingCard(s.fgfilter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(s.tgfilter,tp,0,LOCATION_MZONE+LOCATION_HAND,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND) - local ct=0 - if #conf>0 then - Duel.ConfirmCards(tp,conf) - local dg=conf:Filter(s.filter,nil) - ct=Duel.Destroy(dg,REASON_EFFECT) - Duel.ShuffleHand(1-tp) - end - local g=Duel.GetMatchingGroup(s.filter,1-tp,LOCATION_DECK,0,nil) - if ct>0 and #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,0)) then - Duel.BreakEffect() - Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) - local dg=g:Select(1-tp,1,3,nil) - Duel.Destroy(dg,REASON_EFFECT) - end - if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CHANGE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetTargetRange(0,1) - e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e1,tp) - local e2=e1:Clone() - e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) - Duel.RegisterEffect(e2,tp) - end -end diff --git a/official/c57731460.lua b/official/c57731460.lua index 6a6d6508fa..774d443d5c 100644 --- a/official/c57731460.lua +++ b/official/c57731460.lua @@ -1,7 +1,8 @@ --剣闘獣エクイテ +--Gladiator Beast Equeste local s,id=GetID() function s.initial_effect(c) - --tohand + --Add 1 "Gladiator Beast" card from your GY to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -9,62 +10,53 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(aux.gbspcon) - e1:SetTarget(s.rettg) - e1:SetOperation(s.retop) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) c:RegisterEffect(e1) - --special summon + --Special Summon 1 "Gladiator Beast" monster from your Deck, except "Gladiator Beast Equeste" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()>0 end) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_series={SET_GLADIATOR_BEAST} s.listed_names={id} -function s.retfilter(c) +function s.thfilter(c) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsAbleToHand() end -function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.retfilter(chkc) end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.retfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0) end -function s.retop(e,tp,eg,ep,ev,re,r,rp) +function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattledGroupCount()>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end -function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsCanBeSpecialSummoned(e,103,tp,false,false) +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_GLADIATOR_BEAST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,103,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if tc and Duel.SpecialSummon(tc,103,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,103,tp,tp,false,false,POS_FACEUP)>0 then + sc:RegisterFlagEffect(sc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end end diff --git a/official/c57734012.lua b/official/c57734012.lua index df2f200cf1..223c7e9be3 100644 --- a/official/c57734012.lua +++ b/official/c57734012.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) e2:SetOperation(s.activate) c:RegisterEffect(e2) end -s.listed_series={0x48,0x1048} +s.listed_series={SET_NUMBER,SET_NUMBER_C} function s.regcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return Duel.GetFlagEffect(tp,id)==0 and Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_RULE) + return Duel.GetFlagEffect(tp,id)==0 and Duel.IsPhase(PHASE_DRAW) and c:IsReason(REASON_RULE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -30,13 +30,13 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end @@ -49,19 +49,19 @@ function s.filter1(c,e,tp) end local no=m.xyz_number local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and no and no>=101 and no<=107 and c:IsSetCard(SET_NUMBER) and not c:IsSetCard(SET_NUMBER_C) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (aux.CheckSummonGate(tp,2) or c:IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,no,pg) end function s.filter2(c,e,tp,mc,no,pg) if c.rum_limit then return false end - return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c.xyz_number==no and c:IsSetCard(SET_NUMBER_C) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(s.filter1,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) @@ -70,7 +70,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end Duel.RegisterFlagEffect(tp,id,0,0,0) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if loc==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter1),tp,loc,0,1,1,nil,e,tp) @@ -90,4 +90,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) tc2:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c57753602.lua b/official/c57753602.lua index c7cd444c2a..7979a81797 100644 --- a/official/c57753602.lua +++ b/official/c57753602.lua @@ -1,4 +1,5 @@ --ジェムフラッシュエナジー +--Gem Flash Energy local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) @@ -25,7 +26,7 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() end function s.filter(c) - return c:IsFaceup() and (c:GetType()&0x20002)==0x20002 + return c:IsFaceup() and c:IsContinuousSpell() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,4 +38,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local d=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)*300 Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57761191.lua b/official/c57761191.lua index 11770bcf2b..3a7dee9320 100644 --- a/official/c57761191.lua +++ b/official/c57761191.lua @@ -1,4 +1,5 @@ --真竜機兵ダースメタトロン +--Metaltron XII, the True Dracombatant local s,id=GetID() function s.initial_effect(c) --summon with s/t @@ -43,14 +44,13 @@ end function s.valcheck(e,c) local g=c:GetMaterial() local typ=0 - local tc=g:GetFirst() for tc in aux.Next(g) do - typ=typ|tc:GetOriginalType()&0x7 + typ=typ|tc:GetOriginalType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP) end e:SetLabel(typ) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -60,19 +60,19 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.econ) e1:SetValue(s.efilter) e1:SetLabel(typ) c:RegisterEffect(e1) if typ&TYPE_MONSTER~=0 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end if typ&TYPE_SPELL~=0 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end if typ&TYPE_TRAP~=0 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) end end function s.econ(e) @@ -84,7 +84,7 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return ((rp==1-tp) or (r&REASON_BATTLE)>0) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSummonType(SUMMON_TYPE_TRIBUTE) + and c:IsTributeSummoned() end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_EARTH|ATTRIBUTE_WATER|ATTRIBUTE_FIRE|ATTRIBUTE_WIND) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 @@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c57769391.lua b/official/c57769391.lua index 9e45c7696e..1e30cb81d5 100644 --- a/official/c57769391.lua +++ b/official/c57769391.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c57774843.lua b/official/c57774843.lua index 7287f5bab1..d772f55802 100644 --- a/official/c57774843.lua +++ b/official/c57774843.lua @@ -1,4 +1,5 @@ --裁きの龍 +--Judgment Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetDescription(aux.Stringid(id,1)) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -40,9 +41,9 @@ function s.initial_effect(c) e4:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e4) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.spfilter(c) - return c:IsSetCard(0x38) and c:IsMonster() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.spcon(e,c) if c==nil then return true end @@ -51,10 +52,6 @@ function s.spcon(e,c) local ct=g:GetClassCount(Card.GetCode) return ct>3 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end @@ -74,4 +71,4 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,4,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57775790.lua b/official/c57775790.lua index e958ef8d0d..574006ad03 100644 --- a/official/c57775790.lua +++ b/official/c57775790.lua @@ -109,4 +109,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c57777714.lua b/official/c57777714.lua index bb1f372205..638cc34ded 100644 --- a/official/c57777714.lua +++ b/official/c57777714.lua @@ -1,4 +1,5 @@ --英霊獣使い-セフィラムピリカ +--Ritual Beast Tamer Zeframpilica local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -27,17 +28,17 @@ function s.initial_effect(c) e4:SetCondition(s.condition) c:RegisterEffect(e4) end -s.listed_series={0xb5,0xc4} +s.listed_series={SET_RITUAL_BEAST,SET_ZEFRA} s.listed_names={id} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb5) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard(SET_RITUAL_BEAST) or c:IsSetCard(SET_ZEFRA) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.filter(c,e,tp) - return (c:IsSetCard(0xb5) or c:IsSetCard(0xc4)) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_RITUAL_BEAST) or c:IsSetCard(SET_ZEFRA)) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -51,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -73,4 +74,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c57782164.lua b/official/c57782164.lua index 4ef169df64..a42fae3381 100644 --- a/official/c57782164.lua +++ b/official/c57782164.lua @@ -1,4 +1,5 @@ --ガガガウィンド +--Gagagawind local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.filter(c,e,tp) - return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,8 +30,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c57784563.lua b/official/c57784563.lua index 90c4cc5bf1..ff3cd4af21 100644 --- a/official/c57784563.lua +++ b/official/c57784563.lua @@ -24,9 +24,9 @@ function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -49,21 +49,21 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsMonster() then if not Duel.Equip(tp,tc,c,false) then return end --Add Equip limit - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) e:SetLabelObject(tc) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c57793869.lua b/official/c57793869.lua index 328cc9bf4e..06a7632cf3 100644 --- a/official/c57793869.lua +++ b/official/c57793869.lua @@ -1,4 +1,5 @@ --邪神イレイザー +--The Wicked Eraser local s,id=GetID() function s.initial_effect(c) --summon with 3 tribute diff --git a/official/c5779502.lua b/official/c5779502.lua index 0eb64a421f..37d0618fc1 100644 --- a/official/c5779502.lua +++ b/official/c5779502.lua @@ -1,5 +1,5 @@ --Underdog ---Scripted by The Razgriz +--Underdog local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +26,4 @@ function s.con1(e,tp,ep,eg,ev,re,r,rp) end function s.con2(e,tp,ep,eg,ev,re,r,rp) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c5780210.lua b/official/c5780210.lua index b0cb39a923..8e0c8d751c 100644 --- a/official/c5780210.lua +++ b/official/c5780210.lua @@ -1,4 +1,5 @@ --クリエイト・リゾネーター +--Creation Resonator local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,4 +18,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c57815601.lua b/official/c57815601.lua index 0bdaa9c5ac..20ad4dd03c 100644 --- a/official/c57815601.lua +++ b/official/c57815601.lua @@ -13,23 +13,23 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10b5,0x20b5,0xb5} +s.listed_series={SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST,SET_RITUAL_BEAST} function s.filter1(c,e,tp) - return c:IsSetCard(0x10b5) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and Duel.IsExistingTarget(s.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp) + return c:IsSetCard(SET_RITUAL_BEAST_TAMER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + and Duel.IsExistingTarget(s.filter2,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,c,e,tp) end function s.filter2(c,e,tp) - return c:IsSetCard(0x20b5) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_SPIRITUAL_BEAST) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp) + local g2=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0) end @@ -56,10 +56,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.splimit(e,c) - return not c:IsSetCard(0xb5) -end + return not c:IsSetCard(SET_RITUAL_BEAST) +end \ No newline at end of file diff --git a/official/c57823578.lua b/official/c57823578.lua index 7640f35837..6c8e599d21 100644 --- a/official/c57823578.lua +++ b/official/c57823578.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x12d} +s.listed_series={SET_SIMORGH} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if s.thcost(e,tp,eg,ep,ev,re,r,rp,0) and s.thtg(e,tp,eg,ep,ev,re,r,rp,0) @@ -61,7 +61,7 @@ function s.atlimit(e,c) return c:IsFaceup() and c:IsRace(RACE_WINGEDBEAST) and c:GetAttack()0 then Duel.BreakEffect() @@ -43,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c57835716.lua b/official/c57835716.lua index e0d2bc44b9..65a93ba114 100644 --- a/official/c57835716.lua +++ b/official/c57835716.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetCondition(s.spcon1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCondition(s.spcon2) c:RegisterEffect(e2) end -s.listed_series={0x11b} +s.listed_series={SET_ORCUST} s.listed_names={id} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) @@ -30,7 +30,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) end function s.filter(c,e,tp) - return c:IsSetCard(0x11b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_ORCUST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -50,10 +50,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c57836546.lua b/official/c57836546.lua index 60fef4d0ac..03a6825ba1 100644 --- a/official/c57836546.lua +++ b/official/c57836546.lua @@ -1,4 +1,5 @@ --エクシーズ・ダブル・バック +--Xyz Double Back local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() for tc in aux.Next(g) do if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end end Duel.SpecialSummonComplete() @@ -76,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57839750.lua b/official/c57839750.lua index 1bd4995796..3e4c28bab3 100644 --- a/official/c57839750.lua +++ b/official/c57839750.lua @@ -1,4 +1,5 @@ --グリズリーマザー +--Mother Grizzly local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c57844634.lua b/official/c57844634.lua index cff3ae868a..7fe349e425 100644 --- a/official/c57844634.lua +++ b/official/c57844634.lua @@ -1,4 +1,5 @@ --素早いムササビ +--Nimble Musasabi local s,id=GetID() function s.initial_effect(c) --battle destroyed @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c5786513.lua b/official/c5786513.lua index acf15cc8f2..e73c28a841 100644 --- a/official/c5786513.lua +++ b/official/c5786513.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) local tc=Duel.GetBattleMonster(tp) return tc and tc:ListsCode(CARD_SHINING_SARCOPHAGUS) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.skipop) c:RegisterEffect(e2) end diff --git a/official/c57869175.lua b/official/c57869175.lua index 1e6d5b5be4..6524195701 100644 --- a/official/c57869175.lua +++ b/official/c57869175.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) @@ -92,7 +92,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(ct) if tc==e:GetHandler() then - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) else e1:SetReset(RESETS_STANDARD_PHASE_END) end diff --git a/official/c57882509.lua b/official/c57882509.lua index 705574ac4e..472a76d303 100644 --- a/official/c57882509.lua +++ b/official/c57882509.lua @@ -1,4 +1,5 @@ --弱体化の仮面 +--Mask of Weakness local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tc=Duel.GetAttacker() if chkc then return chkc==tc end @@ -29,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c57900671.lua b/official/c57900671.lua index 984d0e560e..331b36ceb8 100644 --- a/official/c57900671.lua +++ b/official/c57900671.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp) return Duel.GetLP(tp)<=2000 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c57902193.lua b/official/c57902193.lua index ba4a26533a..4c29cbe21f 100644 --- a/official/c57902193.lua +++ b/official/c57902193.lua @@ -1,4 +1,5 @@ --苦渋の転生 +--Painful Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -37,4 +38,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)~=0 then Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c57902462.lua b/official/c57902462.lua index 1736330b73..5c9e3929cc 100644 --- a/official/c57902462.lua +++ b/official/c57902462.lua @@ -1,4 +1,5 @@ --聖導騎士イシュザーク +--Divine Knight Ishzark local s,id=GetID() function s.initial_effect(c) --remove @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57916305.lua b/official/c57916305.lua index 2def153528..325324af33 100644 --- a/official/c57916305.lua +++ b/official/c57916305.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop2) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.thfilter(c) - return c:IsSetCard(0x128) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -41,7 +41,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()==tp + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -53,4 +53,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57940938.lua b/official/c57940938.lua index 4931880413..c8a76b4f42 100644 --- a/official/c57940938.lua +++ b/official/c57940938.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.regtg) e2:SetOperation(s.regop) c:RegisterEffect(e2) @@ -47,7 +47,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) end end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c57946551.lua b/official/c57946551.lua index 0ead10a2c3..c05ccd6a0e 100644 --- a/official/c57946551.lua +++ b/official/c57946551.lua @@ -1,9 +1,9 @@ --- --- Rock Scales --- Scripted by Hatter +--ロック・スケイル +--Rock Scales +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Equip 1 other face-up monster + --Equip 1 other face-up monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.eqop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsFaceup() end,Card.EquipByEffectAndLimitRegister,e1) - -- Destroy + --Destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -41,7 +41,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsFaceup() and tc:IsMonster() then e:GetHandler():EquipByEffectAndLimitRegister(e,tp,tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.desfilter(c) diff --git a/official/c57953380.lua b/official/c57953380.lua index 239764f269..9e8cfc95a1 100644 --- a/official/c57953380.lua +++ b/official/c57953380.lua @@ -1,4 +1,5 @@ --生還の宝札 +--Card of Safe Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5795882.lua b/official/c5795882.lua index bcded4a3dc..4339f82388 100644 --- a/official/c5795882.lua +++ b/official/c5795882.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.sumcon) - e2:SetCost(s.sumcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.sumtg) e2:SetOperation(s.sumop) c:RegisterEffect(e2) @@ -31,14 +31,10 @@ function s.initial_effect(c) e3:SetOperation(s.recop) c:RegisterEffect(e3) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerCanAdditionalSummon(tp) end -function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end end @@ -48,13 +44,13 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,2)) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x8e)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VAMPIRE)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():IsControler(tp) and eg:GetFirst():IsSetCard(0x8e) + return ep~=tp and eg:GetFirst():IsControler(tp) and eg:GetFirst():IsSetCard(SET_VAMPIRE) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -66,5 +62,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c5795980.lua b/official/c5795980.lua index 153cc1f575..1aa35eba25 100644 --- a/official/c5795980.lua +++ b/official/c5795980.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.attg) e2:SetOperation(s.atop) c:RegisterEffect(e2) @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) return true end function s.cfilter(c,e,dg) - if c:IsFacedown() or not c:IsLevelAbove(5) or not c:IsSummonType(SUMMON_TYPE_NORMAL) then return false end + if c:IsFacedown() or not c:IsLevelAbove(5) or not c:IsNormalSummoned() then return false end local a=0 if dg:IsContains(c) then a=1 end if c:GetEquipCount()==0 then return #dg-a>=1 end @@ -76,20 +76,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3 if tc:IsType(TYPE_TRAPMONSTER) then e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end if tc:IsImmuneToEffect(e1) or tc:IsImmuneToEffect(e2) or (e3 and tc:IsImmuneToEffect(e3)) then return end @@ -111,7 +111,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(rc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c57962537.lua b/official/c57962537.lua index 0b5bd27580..9851c962e7 100644 --- a/official/c57962537.lua +++ b/official/c57962537.lua @@ -1,4 +1,5 @@ --ゼンマイネズミ +--Wind-Up Rat local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end function s.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_WIND_UP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEUP_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c57970721.lua b/official/c57970721.lua index 549c3d1453..7c62a3e427 100644 --- a/official/c57970721.lua +++ b/official/c57970721.lua @@ -1,5 +1,5 @@ --星彩の竜輝巧 ---Draitron Asterism +--Drytron Asterism --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -10,18 +10,18 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(s.descond) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.descond() return Duel.IsMainPhase() end function s.atkfilter(c) - return c:IsFaceup() and c:GetAttack()>=1000 and (c:IsSetCard(0x151) or c:IsRitualMonster()) + return c:IsFaceup() and c:GetAttack()>=1000 and (c:IsSetCard(SET_DRYTRON) or c:IsRitualMonster()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -41,7 +41,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) local dc=g:GetFirst() if dc==tc then dc=g:GetNext() end - if tc and tc:UpdateAttack(-1000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,c)==-1000 and dc and dc:IsControler(1-tp) and not dc:IsFacedown() then + if tc and tc:UpdateAttack(-1000,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,c)==-1000 and dc and dc:IsControler(1-tp) and not dc:IsFacedown() then Duel.Destroy(dc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57995165.lua b/official/c57995165.lua index de139cd7f0..8a51eaac38 100644 --- a/official/c57995165.lua +++ b/official/c57995165.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) end) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(rp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end @@ -30,7 +30,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SSET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) @@ -48,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c57996334.lua b/official/c57996334.lua index 3ec7006390..07e958cb42 100644 --- a/official/c57996334.lua +++ b/official/c57996334.lua @@ -1,4 +1,5 @@ --ドドドバスター +--Dododo Buster local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.sumop) c:RegisterEffect(e2) end -s.listed_series={0x82} +s.listed_series={SET_DODODO} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 @@ -34,16 +35,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) c:RegisterEffect(e1) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0x82) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DODODO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -58,4 +59,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c58004362.lua b/official/c58004362.lua index b8ed8991d4..8e71cb043e 100644 --- a/official/c58004362.lua +++ b/official/c58004362.lua @@ -1,5 +1,5 @@ --X・HERO クロスガイ ---Xtra HERO Crossguy +--Xtra HERO Cross Crusader local s,id=GetID() function s.initial_effect(c) --link summon @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- search + --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -31,9 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x8,0xc008} +s.listed_series={SET_HERO,SET_DESTINY_HERO} function s.counterfilter(c) - return c:IsSetCard(0x8) + return c:IsSetCard(SET_HERO) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -42,20 +42,20 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x8) + return not c:IsSetCard(SET_HERO) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -73,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsSetCard(0xc008) + return c:IsSetCard(SET_DESTINY_HERO) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -85,14 +85,14 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.thfilter(c,code) - return c:IsSetCard(0x8) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(code) + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(code) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e:GetLabel()) end @@ -105,5 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c58012107.lua b/official/c58012107.lua index d8b469059f..efcd83d005 100644 --- a/official/c58012107.lua +++ b/official/c58012107.lua @@ -1,4 +1,5 @@ --エーリアン・サイコ +--Alien Psychic local s,id=GetID() function s.initial_effect(c) --to defense @@ -35,4 +36,4 @@ function s.poop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return c:GetCounter(COUNTER_A)>0 -end +end \ No newline at end of file diff --git a/official/c58012707.lua b/official/c58012707.lua index f9eff1e333..8af0108922 100644 --- a/official/c58012707.lua +++ b/official/c58012707.lua @@ -43,7 +43,7 @@ end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_HAND) end function s.filter(c,e,tp,cd) return c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -54,14 +54,14 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) e1:SetTargetRange(1,1) Duel.RegisterEffect(e1,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_NORMAL) then - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp,tc:GetCode()) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_HAND,0,nil,e,tp,tc:GetCode()) local ct=Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and math.min(1,Duel.GetLocationCount(tp,LOCATION_MZONE),#g) or math.min(#g,Duel.GetLocationCount(tp,LOCATION_MZONE)) if ct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -91,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58015506.lua b/official/c58015506.lua index 7d4408f004..4371d234d6 100644 --- a/official/c58015506.lua +++ b/official/c58015506.lua @@ -1,4 +1,5 @@ --ピケルの読心術 +--Pikeru's Second Sight local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.cfop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) Duel.RegisterEffect(e1,tp) end function s.cfop(e,tp,eg,ep,ev,re,r,rp) if ep==e:GetOwnerPlayer() then return end Duel.ConfirmCards(1-ep,eg) -end +end \ No newline at end of file diff --git a/official/c58016954.lua b/official/c58016954.lua index 69ce1e1dbe..2e5b54c0e4 100644 --- a/official/c58016954.lua +++ b/official/c58016954.lua @@ -1,4 +1,5 @@ --イェシャドール-セフィラナーガ +--Shaddoll Zefranaga local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,16 +29,16 @@ function s.initial_effect(c) e4:SetCondition(aux.TRUE) c:RegisterEffect(e4) end -s.listed_series={0x9d,0xc4} +s.listed_series={SET_SHADDOLL,SET_ZEFRA} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9d) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard(SET_SHADDOLL) or c:IsSetCard(SET_ZEFRA) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.cfilter(c) - return c:IsSetCard(0xc4) + return c:IsSetCard(SET_ZEFRA) end function s.filter(c) return c:IsAbleToHand() @@ -56,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58019984.lua b/official/c58019984.lua index a2191e48c6..1d4aa6be5e 100644 --- a/official/c58019984.lua +++ b/official/c58019984.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c58054262.lua b/official/c58054262.lua index 1661073593..b6f8697d76 100644 --- a/official/c58054262.lua +++ b/official/c58054262.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -38,10 +38,6 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.AttackCostPaid() end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,code,e,tp) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c58058134.lua b/official/c58058134.lua index 5334d39768..4d19315e07 100644 --- a/official/c58058134.lua +++ b/official/c58058134.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.negcon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -50,4 +50,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58062306.lua b/official/c58062306.lua index 5431956028..6b23fa44f3 100644 --- a/official/c58062306.lua +++ b/official/c58062306.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -43,15 +43,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end --This card can be discarded as cost -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end --Check for "White Rose Cloister" function s.thfilter(c) return c:IsCode(84335863) and c:IsAbleToHand() diff --git a/official/c58066722.lua b/official/c58066722.lua index 73efa7cec0..99e34813ca 100644 --- a/official/c58066722.lua +++ b/official/c58066722.lua @@ -1,5 +1,5 @@ --エーリアン・バスター ---Alien Buster +--Alien Stealthbuster --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -57,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58069384.lua b/official/c58069384.lua index ec2759598e..1d8ceca00d 100644 --- a/official/c58069384.lua +++ b/official/c58069384.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.atkcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetCost(s.atkcost) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -57,20 +57,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atkfilter(c) return c:IsCode(CARD_CYBER_DRAGON) and c:IsAbleToRemoveAsCost() and (not c:IsOnField() or c:IsFaceup()) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -81,7 +78,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -101,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58071123.lua b/official/c58071123.lua index 6a2633e1ab..38e9b85678 100644 --- a/official/c58071123.lua +++ b/official/c58071123.lua @@ -1,4 +1,5 @@ --オキシゲドン +--Oxygeddon local s,id=GetID() function s.initial_effect(c) --damage @@ -23,4 +24,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,800,REASON_EFFECT,true) Duel.Damage(1-tp,800,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c58074177.lua b/official/c58074177.lua index a298f4d68e..377ab49642 100644 --- a/official/c58074177.lua +++ b/official/c58074177.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),1,1,Synchro.NonTunerEx(Card.IsSetCard,0xff),1,1) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_DARK),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_CLEAR_WING),1,1) --atk local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -50,7 +50,7 @@ function s.initial_effect(c) e4:SetOperation(s.penop) c:RegisterEffect(e4) end -s.listed_series={0xff} +s.listed_series={SET_CLEAR_WING} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=a:GetBattleTarget() @@ -67,7 +67,7 @@ function s.atkop(e,tp,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(d:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) a:RegisterEffect(e1) end end @@ -88,25 +88,25 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.IsBattlePhase() + return e:GetHandler():IsSynchroSummoned() and Duel.IsBattlePhase() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelAbove,5),tp,0,LOCATION_MZONE,nil) diff --git a/official/c58074572.lua b/official/c58074572.lua index 09f08e4de9..840c8e6da3 100644 --- a/official/c58074572.lua +++ b/official/c58074572.lua @@ -1,4 +1,5 @@ --モウヤンのカレー +--Mooyan Curry local s,id=GetID() function s.initial_effect(c) --recover @@ -22,4 +23,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58092907.lua b/official/c58092907.lua index a7df30c20a..7ec46c1fa4 100644 --- a/official/c58092907.lua +++ b/official/c58092907.lua @@ -1,7 +1,6 @@ --EM天空の魔術師 --Performapal Celestial Magician --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -49,7 +48,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return #eg==1 and eg:IsExists(s.spcfilter,1,nil,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) end @@ -75,7 +74,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end if g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) then @@ -86,7 +85,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(0,1) e2:SetValue(s.aclimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) Duel.RegisterEffect(e2,tp) end if g:IsExists(Card.IsType,1,nil,TYPE_XYZ) then @@ -95,7 +94,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(c:GetBaseAttack()*2) - e3:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e3) end if g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) then @@ -105,12 +104,12 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCountLimit(1) e4:SetOperation(s.thop) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.thfilter(c) return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() @@ -122,4 +121,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c58098303.lua b/official/c58098303.lua index 20c06565ef..2e162b192d 100644 --- a/official/c58098303.lua +++ b/official/c58098303.lua @@ -1,4 +1,5 @@ --フレイム・オーガ +--Flame Ogre local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c581014.lua b/official/c581014.lua index e9dc5f357b..10177b0ce3 100644 --- a/official/c581014.lua +++ b/official/c581014.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c58116537.lua b/official/c58116537.lua index 5980bcbcf4..112ff49d00 100644 --- a/official/c58116537.lua +++ b/official/c58116537.lua @@ -36,9 +36,9 @@ function s.initial_effect(c) e5:SetCondition(s.atkcon2) c:RegisterEffect(e5) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.nacon(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,nil) return #g>1 and g:GetClassCount(Card.GetAttribute)>1 end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -63,7 +63,7 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end end @@ -71,16 +71,16 @@ function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:GetHandler():IsSetCard(0x137) and re:GetHandler():IsMonster() + return rp==tp and re:GetHandler():IsSetCard(SET_ANCIENT_WARRIORS) and re:GetHandler():IsMonster() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,1,nil) end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,0,nil) for tc in aux.Next(g) do - tc:UpdateAttack(#g*300,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,c) + tc:UpdateAttack(#g*300,RESETS_STANDARD_PHASE_END,c) end -end +end \ No newline at end of file diff --git a/official/c58120309.lua b/official/c58120309.lua index f3e2b42bb2..9571173d37 100644 --- a/official/c58120309.lua +++ b/official/c58120309.lua @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58131925.lua b/official/c58131925.lua index 7559b10699..8cc11ce5f1 100644 --- a/official/c58131925.lua +++ b/official/c58131925.lua @@ -1,4 +1,5 @@ --BF-極夜のダマスカス +--Blackwing - Damascus the Polar Night local s,id=GetID() function s.initial_effect(c) --atkup @@ -10,23 +11,15 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x33} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - return phase~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -41,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c58132856.lua b/official/c58132856.lua index 6ce4e5b168..c84ee23c2a 100644 --- a/official/c58132856.lua +++ b/official/c58132856.lua @@ -1,4 +1,5 @@ --トイ・マジシャン +--Toy Magician local s,id=GetID() function s.initial_effect(c) --Set @@ -39,7 +40,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and rp~=tp then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -55,7 +56,7 @@ function s.cfilter(c) return c:IsFaceup() and c:IsCode(id) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -71,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58139128.lua b/official/c58139128.lua index bb5da08f10..73568bf370 100644 --- a/official/c58139128.lua +++ b/official/c58139128.lua @@ -1,4 +1,5 @@ --墓守の祈祷師 +--Gravekeeper's Shaman local s,id=GetID() function s.initial_effect(c) --def up @@ -37,17 +38,17 @@ function s.initial_effect(c) e4:SetValue(s.efilter2) c:RegisterEffect(e4) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} s.listed_names={CARD_NECROVALLEY} function s.filter(c) - return c:IsSetCard(0x2e) and c:IsMonster() + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsMonster() end function s.defval(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*200 end function s.disop(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x2e) and loc==LOCATION_GRAVE then + if re:IsMonsterEffect() and not re:GetHandler():IsSetCard(SET_GRAVEKEEPERS) and loc==LOCATION_GRAVE then Duel.NegateEffect(ev) end end @@ -62,4 +63,4 @@ function s.etarget(e,c) end function s.efilter2(e,re,tp) return e:GetOwnerPlayer()~=re:GetOwnerPlayer() -end +end \ No newline at end of file diff --git a/official/c58139997.lua b/official/c58139997.lua index 73f9676e71..19db63005c 100644 --- a/official/c58139997.lua +++ b/official/c58139997.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e1:SetCost(aux.WitchcrafterDiscardCost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -24,15 +24,15 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost2) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x128) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,11 +47,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter2(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c58147549.lua b/official/c58147549.lua index 53ca266f2c..3f9aa5e310 100644 --- a/official/c58147549.lua +++ b/official/c58147549.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetValue(s.atkup) c:RegisterEffect(e2) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x8)*100 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_HERO)*100 +end \ No newline at end of file diff --git a/official/c58165765.lua b/official/c58165765.lua index 9c3f28ff5b..56ab830e38 100644 --- a/official/c58165765.lua +++ b/official/c58165765.lua @@ -1,4 +1,5 @@ --赤竜の忍者 +--Red Dragon Ninja local s,id=GetID() function s.initial_effect(c) --todeck @@ -20,14 +21,14 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x2b,0x61} +s.listed_series={SET_NINJA,SET_NINJITSU_ART} function s.cfilter(c) - return (c:IsSetCard(0x2b) or c:IsSetCard(0x61)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard({SET_NINJA,SET_NINJITSU_ART}) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -48,16 +49,16 @@ function s.limit(c) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then + if tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) Duel.BreakEffect() if tc:IsAbleToDeck() then local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) if opt==0 then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end end -end +end \ No newline at end of file diff --git a/official/c58169731.lua b/official/c58169731.lua index 9ca1871837..72aea5ff45 100644 --- a/official/c58169731.lua +++ b/official/c58169731.lua @@ -1,4 +1,5 @@ --分断の壁 +--Wall of Disruption local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c5817857.lua b/official/c5817857.lua index b599827a43..488266c052 100644 --- a/official/c5817857.lua +++ b/official/c5817857.lua @@ -1,4 +1,5 @@ --コアキメイル・グールズスレイブ +--Koa'ki Meiru Ghoulungulate local s,id=GetID() function s.initial_effect(c) --cost @@ -23,7 +24,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -62,20 +63,20 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.rfilter(c) - return c:IsMonster() and c:IsSetCard(0x1d) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsMonster() and c:IsSetCard(SET_KOAKI_MEIRU) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if #eg~=1 then return false end local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x1d) - and not tc:IsReason(REASON_REPLACE) and tc:IsReason(REASON_BATTLE+REASON_EFFECT) - and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + return tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(SET_KOAKI_MEIRU) + and not tc:IsReason(REASON_REPLACE) and tc:IsReason(REASON_BATTLE|REASON_EFFECT) + and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5818294.lua b/official/c5818294.lua index e9d3c0d3ea..47635c7dec 100644 --- a/official/c5818294.lua +++ b/official/c5818294.lua @@ -1,4 +1,5 @@ --武神器-ヘツカ +--Bujingi Turtle local s,id=GetID() function s.initial_effect(c) --negate @@ -9,13 +10,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.negcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) end function s.tfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x88) + return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(SET_BUJIN) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -28,4 +29,4 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c58185394.lua b/official/c58185394.lua index d73df84bc5..8f4ba4103d 100644 --- a/official/c58185394.lua +++ b/official/c58185394.lua @@ -1,4 +1,5 @@ --G・コザッキー +--Giant Kozaky local s,id=GetID() function s.initial_effect(c) --self destroy @@ -42,4 +43,4 @@ end function s.dmop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58199906.lua b/official/c58199906.lua index f146d49cb6..62129756ee 100644 --- a/official/c58199906.lua +++ b/official/c58199906.lua @@ -23,7 +23,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHAIN_MATERIAL) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.chain_target) e1:SetOperation(s.chain_operation) e1:SetValue(aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE)) @@ -34,10 +34,10 @@ function s.filter(c,e) end function s.chain_target(e,te,tp,value) if value and value&SUMMON_TYPE_FUSION==0 then return Group.CreateGroup() end - if Duel.IsPlayerAffectedByEffect(tp,69832741) then - return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,te) + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then + return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_HAND,0,nil,te) else - return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_HAND,0,nil,te) + return Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_HAND,0,nil,te) end end function s.chain_operation(e,te,tp,tc,mat,sumtype,sg,sumpos) @@ -51,4 +51,4 @@ function s.chain_operation(e,te,tp,tc,mat,sumtype,sg,sumpos) Duel.SpecialSummonStep(tc,sumtype,tp,tp,false,false,sumpos) end e:Reset() -end +end \ No newline at end of file diff --git a/official/c58203736.lua b/official/c58203736.lua index 78f0f84518..cf6273a97c 100644 --- a/official/c58203736.lua +++ b/official/c58203736.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) e3:SetTarget(s.sptg) diff --git a/official/c58206034.lua b/official/c58206034.lua index af35327724..fb578e3b30 100644 --- a/official/c58206034.lua +++ b/official/c58206034.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) end s.listed_names={12817939} s.LVnum=8 -s.LVset=0x4f +s.LVset=SET_DARK_LUCIUS function s.discon(e) return e:GetHandler():GetFlagEffect(12817939)~=0 end @@ -32,7 +32,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) d:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c5821478.lua b/official/c5821478.lua index 0e4ba2aeb2..fe65a0b34d 100644 --- a/official/c5821478.lua +++ b/official/c5821478.lua @@ -58,7 +58,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(e:GetHandler():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -77,4 +77,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() and bc:IsFaceup() then Duel.Damage(1-tp,bc:GetBaseAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58242947.lua b/official/c58242947.lua index d8997baf58..b56a9c9995 100644 --- a/official/c58242947.lua +++ b/official/c58242947.lua @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not te then return end local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c58257569.lua b/official/c58257569.lua index 83b2e5c8f3..9cd6d0f363 100644 --- a/official/c58257569.lua +++ b/official/c58257569.lua @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -51,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -60,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(300) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end end @@ -76,15 +76,15 @@ function s.thfilter(c) return c:IsRace(RACE_DRAGON) and c:GetLevel()==1 and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) Duel.ShuffleDeck(tp) end -end +end \ No newline at end of file diff --git a/official/c58258899.lua b/official/c58258899.lua index f95ec55aeb..4a9cf7b9a4 100644 --- a/official/c58258899.lua +++ b/official/c58258899.lua @@ -1,4 +1,5 @@ --TGX300 +--TGX300 local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,10 +16,10 @@ function s.initial_effect(c) e2:SetValue(s.val) c:RegisterEffect(e2) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x27) + return c:IsFaceup() and c:IsSetCard(SET_TG) end function s.val(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_MZONE,0,nil)*300 -end +end \ No newline at end of file diff --git a/official/c58268433.lua b/official/c58268433.lua index a1cc9e2856..c81d8eb99b 100644 --- a/official/c58268433.lua +++ b/official/c58268433.lua @@ -1,4 +1,5 @@ --ブレードラビット +--Blade Rabbit local s,id=GetID() function s.initial_effect(c) --flip @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58270977.lua b/official/c58270977.lua index bd237ee1d9..235f4ba923 100644 --- a/official/c58270977.lua +++ b/official/c58270977.lua @@ -71,4 +71,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c58272005.lua b/official/c58272005.lua index 744633e471..acda0d53f1 100644 --- a/official/c58272005.lua +++ b/official/c58272005.lua @@ -1,4 +1,5 @@ --生存競争 +--Survival of the Fittest local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) end @@ -31,14 +29,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -46,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --chain attack local e3=Effect.CreateEffect(c) @@ -56,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_BATTLE_DESTROYING) e3:SetCondition(s.atcon) e3:SetOperation(s.atop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) @@ -80,6 +78,6 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) ec:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c58293343.lua b/official/c58293343.lua index 7807aa3bea..72fc02f10c 100644 --- a/official/c58293343.lua +++ b/official/c58293343.lua @@ -1,4 +1,5 @@ --タイラント・バースト・ドラゴン +--Tyrant Burst Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -45,7 +46,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabelObject(tc) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) @@ -53,7 +54,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(400) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) @@ -62,9 +63,9 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_EQUIP) e4:SetCode(EFFECT_EXTRA_ATTACK) e4:SetValue(2) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e4) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c58297729.lua b/official/c58297729.lua index 245f280086..875265ec2b 100644 --- a/official/c58297729.lua +++ b/official/c58297729.lua @@ -1,4 +1,5 @@ --変則ギア +--Transmission Gear local s,id=GetID() function s.initial_effect(c) --activate @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else Duel.Remove(a,POS_FACEDOWN,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c58308221.lua b/official/c58308221.lua index 3b6267c703..9090a9eaba 100644 --- a/official/c58308221.lua +++ b/official/c58308221.lua @@ -20,10 +20,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetCode(EVENT_ADJUST) e1:SetOperation(s.checkop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) s.checkop(e,tp) - Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,0)) end function s.checkop(e,tp) @@ -38,9 +38,9 @@ function s.checkop(e,tp) e1:SetCondition(s.pencon1) e1:SetOperation(s.penop1) e1:SetValue(SUMMON_TYPE_PENDULUM) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) lpz:RegisterEffect(e1) - lpz:RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1) + lpz:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) end local olpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,0) local orpz=Duel.GetFieldCard(1-tp,LOCATION_PZONE,1) @@ -56,9 +56,9 @@ function s.checkop(e,tp) e2:SetCondition(s.pencon2) e2:SetOperation(s.penop2) e2:SetValue(SUMMON_TYPE_PENDULUM) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) olpz:RegisterEffect(e2) - olpz:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + olpz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.pencon1(e,c,og) @@ -100,7 +100,7 @@ function s.penop1(e,tp,eg,ep,ev,re,r,rp,c,sg,og) end if #sg>0 then Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) Duel.HintSelection(c,true) Duel.HintSelection(rpz,true) end @@ -146,7 +146,7 @@ function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,og) if #sg>0 then Duel.Hint(HINT_CARD,0,31531170) Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,1) + Duel.RegisterFlagEffect(tp,29432356,RESET_PHASE|PHASE_END|RESET_SELF_TURN,0,1) Duel.HintSelection(c,true) Duel.HintSelection(rpz,true) end diff --git a/official/c58324930.lua b/official/c58324930.lua index 4ed0d356c8..a84735e1d2 100644 --- a/official/c58324930.lua +++ b/official/c58324930.lua @@ -1,4 +1,5 @@ --破戒僧 ランシン +--Anarchist Monk Ranshin local s,id=GetID() function s.initial_effect(c) --search @@ -20,10 +21,10 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5832914.lua b/official/c5832914.lua index 0619585530..3e74b40db3 100644 --- a/official/c5832914.lua +++ b/official/c5832914.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58330108.lua b/official/c58330108.lua index 3fc9e577e5..19f50cdcbe 100644 --- a/official/c58330108.lua +++ b/official/c58330108.lua @@ -33,18 +33,18 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xf5} +s.listed_series={SET_GANDORA} function s.cfilter(c,tp) return c:IsMonster() and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,c) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,c) return #g>=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and aux.SelectUnselectGroup(g,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,c) + local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,c) local g=aux.SelectUnselectGroup(sg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_TOGRAVE) if #g>0 then g:KeepAlive() @@ -67,7 +67,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) end function s.filter(c) - return c:IsMonster() and c:IsSetCard(0xf5) + return c:IsMonster() and c:IsSetCard(SET_GANDORA) end function s.rmfilter(c) return c:IsAbleToRemove() and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,false,true)) @@ -78,11 +78,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) - local b3=Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c) + local b3=Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,c) return (gc==1 and b1) or (gc==2 and b2) or (gc>2 and b3) end Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_ONFIELD|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -92,7 +92,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) else local loc=LOCATION_ONFIELD - if gc>2 then loc=LOCATION_ONFIELD+LOCATION_GRAVE end + if gc>2 then loc=LOCATION_ONFIELD|LOCATION_GRAVE end local g=Duel.GetMatchingGroup(s.rmfilter,tp,loc,loc,c) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end diff --git a/official/c58332301.lua b/official/c58332301.lua index e91bb33f1f..a7fa37fdcb 100644 --- a/official/c58332301.lua +++ b/official/c58332301.lua @@ -56,7 +56,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -67,4 +67,4 @@ end function s.posop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil) Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) -end +end \ No newline at end of file diff --git a/official/c5833312.lua b/official/c5833312.lua index 3a979e06d7..83b456ee6a 100644 --- a/official/c5833312.lua +++ b/official/c5833312.lua @@ -52,7 +52,7 @@ function s.typecheck(types) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,types),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return s.typecheck(RACE_WARRIOR|RACE_BEAST|RACE_PYRO) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and rp==tp + return s.typecheck(RACE_WARRIOR|RACE_BEAST|RACE_PYRO) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and rp==tp and not e:GetHandler():IsDisabled() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -71,7 +71,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return s.typecheck(RACE_DINOSAUR|RACE_SEASERPENT|RACE_THUNDER) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and rp==tp + return s.typecheck(RACE_DINOSAUR|RACE_SEASERPENT|RACE_THUNDER) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and rp==tp and re:GetHandler()~=c and not c:IsDisabled() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -83,7 +83,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return s.typecheck(RACE_MACHINE|RACE_FAIRY|RACE_FIEND) and re:IsActiveType(TYPE_MONSTER) and rp==tp + return s.typecheck(RACE_MACHINE|RACE_FAIRY|RACE_FIEND) and re:IsMonsterEffect() and rp==tp and not e:GetHandler():IsDisabled() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -103,7 +103,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c58354899.lua b/official/c58354899.lua index 45e8520b7a..8a708476cc 100644 --- a/official/c58354899.lua +++ b/official/c58354899.lua @@ -1,4 +1,4 @@ ---Japanese name +--腐死鳥ヴァルコプス --Vulcarrion the Rotting Phoenix --scripted by Naim local s,id=GetID() diff --git a/official/c58369990.lua b/official/c58369990.lua index 52af3b08c9..f7b890d606 100644 --- a/official/c58369990.lua +++ b/official/c58369990.lua @@ -1,4 +1,5 @@ --凶星の魔術師 +--Doomstar Magician local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58371671.lua b/official/c58371671.lua index 207720d5f3..766a4d488b 100644 --- a/official/c58371671.lua +++ b/official/c58371671.lua @@ -1,9 +1,9 @@ --- 宝玉の加護 --- Crystal Protection --- Scripted by Hatter +--宝玉の加護 +--Crystal Aegis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Destroy 1 "Crystal Beast" Monster Card + --Destroy 1 "Crystal Beast" Monster Card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - -- Special Summon 1 "Crystal Beast" monster + --Special Summon 1 "Crystal Beast" monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -23,20 +23,20 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={id+1} -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.getprops(c) return math.max(0,c:GetTextAttack()),math.max(0,c:GetTextDefense()), c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute() end function s.desfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsOriginalType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x1034,TYPES_TOKEN,s.getprops(c)) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsOriginalType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_CRYSTAL_BEAST,TYPES_TOKEN,s.getprops(c)) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD) and s.desfilter(chkc,e,tp) end @@ -49,9 +49,9 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x1034,TYPES_TOKEN,s.getprops(tc)) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_CRYSTAL_BEAST,TYPES_TOKEN,s.getprops(tc)) then local token=Duel.CreateToken(tp,id+1) - -- Change Type, Attribute, Level, and ATK/DEF + --Change Type, Attribute, Level, and ATK/DEF token:Race(tc:GetOriginalRace()) token:Attribute(tc:GetOriginalAttribute()) token:Level(tc:GetOriginalLevel()) @@ -62,14 +62,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.spconfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsLocation(LOCATION_SZONE) and not c:IsPreviousLocation(LOCATION_SZONE) and c:IsControler(tp) and c:GetSequence()<5 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.spconfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsOriginalType(TYPE_MONSTER) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsOriginalType(TYPE_MONSTER) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c58374502.lua b/official/c58374502.lua index 9af9b1a69f..2fe6b160ff 100644 --- a/official/c58374502.lua +++ b/official/c58374502.lua @@ -1,7 +1,6 @@ --聖なる煌炎 ---Holy Night Blast +--Starry Knight Blast --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Negate by returning to hand @@ -22,8 +21,8 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.IsChainDisablable(ev) end function s.negfilter(c) - return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and - c:IsLevel(7) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) + and c:IsLevel(7) and c:IsAbleToHandAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.negfilter,tp,LOCATION_MZONE,0,1,nil) end diff --git a/official/c58374719.lua b/official/c58374719.lua index 8b00067d58..90922e8e9c 100644 --- a/official/c58374719.lua +++ b/official/c58374719.lua @@ -19,13 +19,13 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) end + and Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) + local sg=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,LOCATION_ONFIELD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58383100.lua b/official/c58383100.lua index 035b665b2c..cd91eb5948 100644 --- a/official/c58383100.lua +++ b/official/c58383100.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_TO_GRAVE) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -34,24 +34,20 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xe5} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_CIPHER} function s.cfilter(c,e,tp) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0xe5) + and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(SET_CIPHER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and eg:IsExists(s.cfilter,1,nil,e,tp) and #eg==1 - and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end + and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler()) end local g=eg:Filter(s.cfilter,nil,e,tp) Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -60,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil) else - tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) end local tc=tg:GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then @@ -72,13 +68,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.thfilter(c) - return c:IsSetCard(0xe5) and c:IsAbleToHand() + return c:IsSetCard(SET_CIPHER) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -91,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c58392024.lua b/official/c58392024.lua index 97bc3e675b..1062e49fbb 100644 --- a/official/c58392024.lua +++ b/official/c58392024.lua @@ -1,4 +1,5 @@ --融合失敗 +--Mispolymerization local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,5 +25,5 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c58406094.lua b/official/c58406094.lua index 1625900386..4e0f4be4a7 100644 --- a/official/c58406094.lua +++ b/official/c58406094.lua @@ -1,7 +1,6 @@ --煌めく聖夜 ---Holy Night Sky +--Starry Knight Sky --Scripted by The Razgriz - local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetRange(LOCATION_FZONE) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e2:SetTarget(s.extg) c:RegisterEffect(e2) --Draw if a Level 7 Dragon monster(s) returns to hand @@ -31,19 +30,18 @@ function s.initial_effect(c) e3:SetOperation(s.dop) c:RegisterEffect(e3) end -s.listed_series={0x15b} - +s.listed_series={SET_STARRY_KNIGHT} function s.ldlv7filter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsLevel(7) end function s.extg(e,c) - return (c:IsSetCard(0x15b) and c:IsMonster()) or s.ldlv7filter(c) + return (c:IsSetCard(SET_STARRY_KNIGHT) and c:IsMonster()) or s.ldlv7filter(c) end function s.filter(c,tp) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and s.ldlv7filter(c) end function s.dcon(e,tp,eg,ev,ep,re,r,rp) - return Duel.GetTurnPlayer()==tp and eg:IsExists(s.filter,1,nil,tp) + return Duel.IsTurnPlayer(tp) and eg:IsExists(s.filter,1,nil,tp) end function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end diff --git a/official/c58419204.lua b/official/c58419204.lua index 92450f8905..dc3afd4810 100644 --- a/official/c58419204.lua +++ b/official/c58419204.lua @@ -1,4 +1,5 @@ --生存本能 +--Survival Instinct local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,9 +18,9 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,63,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,63,nil) e:SetLabel(#g*400) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -37,4 +38,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58441120.lua b/official/c58441120.lua index 428b21e327..051d450c49 100644 --- a/official/c58441120.lua +++ b/official/c58441120.lua @@ -1,4 +1,5 @@ --波動共鳴 +--Harmonic Waves local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c58446973.lua b/official/c58446973.lua index c246d30a34..24e813d2a6 100644 --- a/official/c58446973.lua +++ b/official/c58446973.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0xbb} +s.listed_series={SET_INFERNOID} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xbb) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_INFERNOID) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -36,14 +36,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_CODE) e2:SetValue(code) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1) + c:CopyEffect(code,RESET_EVENT|RESETS_STANDARD,1) end -end +end \ No newline at end of file diff --git a/official/c58453942.lua b/official/c58453942.lua index 5f13299ce0..6c594edc64 100644 --- a/official/c58453942.lua +++ b/official/c58453942.lua @@ -1,6 +1,5 @@ --サイコ・ウォールド --Psychic Snail - local s,id=GetID() function s.initial_effect(c) --Targeted psychic monster can make a second attack @@ -27,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c) @@ -49,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c5846183.lua b/official/c5846183.lua index f4473fa340..f5a63bac9e 100644 --- a/official/c5846183.lua +++ b/official/c5846183.lua @@ -10,14 +10,14 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.indcon) - e1:SetCost(s.indcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.indop) c:RegisterEffect(e1) --Destruction replacement for "Appliancer" monsters local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE+LOCATION_MZONE) + e2:SetRange(LOCATION_GRAVE|LOCATION_MZONE) e2:SetTarget(s.reptg) e2:SetValue(s.repval) e2:SetOperation(s.repop) @@ -36,10 +36,6 @@ function s.indcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(tc) return true end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) -end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -73,5 +69,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c58464739.lua b/official/c58464739.lua index 9f651e25fb..f0b3673be5 100644 --- a/official/c58464739.lua +++ b/official/c58464739.lua @@ -1,4 +1,5 @@ --パルス・ボム +--Pulse Mines local s,id=GetID() function s.initial_effect(c) --activate @@ -31,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetOperation(s.posop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -45,4 +46,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c58468105.lua b/official/c58468105.lua index a9e0d0dba7..7eff3baeeb 100644 --- a/official/c58468105.lua +++ b/official/c58468105.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc3),1,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_EDGE_IMP),1,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL),2) --atk up local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -36,19 +36,19 @@ function s.initial_effect(c) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.listed_series={0xc3,0xa9,0xad} +s.listed_series={SET_EDGE_IMP,SET_FLUFFAL,SET_FRIGHTFUR} function s.atkcon(e) return Duel.GetTurnPlayer()==e:GetHandlerPlayer() end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,RACE_FAIRY+RACE_FIEND)*300 + return Duel.GetMatchingGroupCount(Card.IsRace,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,RACE_FAIRY|RACE_FIEND)*300 end function s.gycon(e,tp,eg,ep,ev,re,r,rp) - return aux.bdcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return aux.bdcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsFusionSummoned() end function s.gyfilter(c) return c:IsAbleToGrave() and c:IsMonster() - and (c:IsSetCard(0xc3) or c:IsSetCard(0xa9) or c:IsSetCard(0xad)) + and (c:IsSetCard(SET_EDGE_IMP) or c:IsSetCard(SET_FLUFFAL) or c:IsSetCard(SET_FRIGHTFUR)) end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) local lv=e:GetHandler():GetBattleTarget():GetLevel() @@ -74,7 +74,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return gp and gp:IsContains(c) and Duel.IsChainDisablable(ev) end function s.disfilter(c) - return c:IsSetCard(0xad) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_FRIGHTFUR) and c:IsAbleToRemoveAsCost() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -88,4 +88,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c58471134.lua b/official/c58471134.lua index d71a61c86e..49b85723fd 100644 --- a/official/c58471134.lua +++ b/official/c58471134.lua @@ -1,4 +1,5 @@ --水精鱗-アビスパイク +--Mermail Abysspike local s,id=GetID() function s.initial_effect(c) --search @@ -22,7 +23,7 @@ function s.cfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() @@ -38,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c58475908.lua b/official/c58475908.lua index 5252683389..566252376f 100644 --- a/official/c58475908.lua +++ b/official/c58475908.lua @@ -1,4 +1,5 @@ --ゼンマイマイ +--Wind-Up Snail local s,id=GetID() function s.initial_effect(c) --to hand @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58477767.lua b/official/c58477767.lua index b7b7257c8c..a4b4b72751 100644 --- a/official/c58477767.lua +++ b/official/c58477767.lua @@ -1,4 +1,5 @@ --女王の選択 +--Queen's Pawn local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.check(c1,c2,tp) - return c1:IsLocation(LOCATION_GRAVE) and c1:IsReason(REASON_BATTLE) and c1:GetPreviousControler()~=tp and c2:IsSetCard(0x4) + return c1:IsLocation(LOCATION_GRAVE) and c1:IsReason(REASON_BATTLE) and c1:GetPreviousControler()~=tp and c2:IsSetCard(SET_AMAZONESS) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local dc=eg:GetFirst() @@ -21,7 +22,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return s.check(dc,bc,tp) or s.check(bc,dc,tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_AMAZONESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58481572.lua b/official/c58481572.lua index 5533bc8651..78e13004ce 100644 --- a/official/c58481572.lua +++ b/official/c58481572.lua @@ -1,4 +1,5 @@ --M・HERO ダーク・ロウ +--Masked HERO Dark Law local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -52,4 +53,4 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local sg=g:RandomSelect(tp,1) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58494728.lua b/official/c58494728.lua index 8a4b9ddddf..2f953d3d9b 100644 --- a/official/c58494728.lua +++ b/official/c58494728.lua @@ -23,20 +23,20 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.otfilter(c,tp) - return c:IsSetCard(0x100a) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_STEELSWARM) and (c:IsControler(tp) or c:IsFaceup()) end function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then + if g:IsExists(Card.IsSetCard,1,nil,SET_STEELSWARM) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(tc,REASON_EFFECT) if tc:IsLocation(LOCATION_GRAVE) then Duel.Recover(tp,1000,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c58504745.lua b/official/c58504745.lua index 0c807321c0..a44681b601 100644 --- a/official/c58504745.lua +++ b/official/c58504745.lua @@ -1,8 +1,9 @@ --間炎星-コウカンショウ +--Brotherhood of the Fire Fist - Cardinal local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x79),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FIRE_FIST),4,2) c:EnableReviveLimit() --todeck local e1=Effect.CreateEffect(c) @@ -12,34 +13,30 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x79,0x7c} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.filter1(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) and c:IsAbleToDeck() + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsSetCard(SET_FIRE_FIST) or c:IsSetCard(SET_FIRE_FORMATION)) and c:IsAbleToDeck() end function s.filter2(c) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,2,nil) - and Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,2,nil) end + if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,2,nil) + and Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,2,2,nil) + local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE|LOCATION_ONFIELD,0,2,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,2,2,nil) + local g2=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_GRAVE|LOCATION_ONFIELD,2,2,nil) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,4,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5851097.lua b/official/c5851097.lua index 08edac5112..258897c835 100644 --- a/official/c5851097.lua +++ b/official/c5851097.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.filter(c,tp) - return c:IsPreviousLocation(LOCATION_DECK+LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) + return c:IsPreviousLocation(LOCATION_DECK|LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,tp) @@ -43,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58518520.lua b/official/c58518520.lua index 26f6d356f9..3d03323b06 100644 --- a/official/c58518520.lua +++ b/official/c58518520.lua @@ -1,6 +1,5 @@ --クリア・エフェクター --Clear Effector - local s,id=GetID() function s.initial_effect(c) --If sent to GY as synchro material, draw 1 @@ -49,6 +48,6 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c58528964.lua b/official/c58528964.lua index 66ac855e8b..ef6ad0c408 100644 --- a/official/c58528964.lua +++ b/official/c58528964.lua @@ -1,6 +1,5 @@ --フレイム・ゴースト --Flame Ghost - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving diff --git a/official/c58531587.lua b/official/c58531587.lua index 46f1d74c9a..f1af74f612 100644 --- a/official/c58531587.lua +++ b/official/c58531587.lua @@ -33,7 +33,7 @@ function s.atktarget(e,c) return c:GetLevel()>=4 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -74,12 +74,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() diff --git a/official/c58543073.lua b/official/c58543073.lua index 109d9167bd..11c1480d95 100644 --- a/official/c58543073.lua +++ b/official/c58543073.lua @@ -55,13 +55,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) and Duel.IsMainPhase() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2016) and c:IsLevelAbove(2) + return c:IsFaceup() and c:IsSetCard(SET_SPEEDROID) and c:IsLevelAbove(2) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x2016,0x1011,0,0,1,RACE_MACHINE,ATTRIBUTE_WIND) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_SPEEDROID,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_MACHINE,ATTRIBUTE_WIND) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,0,0) @@ -74,15 +74,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1) tc:RegisterEffect(e1) if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x2016,0x1011,0,0,1,RACE_MACHINE,ATTRIBUTE_WIND) then + if Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_SPEEDROID,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_MACHINE,ATTRIBUTE_WIND) then c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER) c:AssumeProperty(ASSUME_RACE,RACE_MACHINE) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c58549532.lua b/official/c58549532.lua index 0a94d6afb5..b748fa27a3 100644 --- a/official/c58549532.lua +++ b/official/c58549532.lua @@ -1,18 +1,17 @@ --混錬装融合 --Parametalfoes Fusion --Scripted by edo9300 - local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0xe1),extrafil=s.extrafil}) + local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_METALFOES),extrafil=s.extrafil}) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.check(tp,sg,fc) return sg:GetClassCount(function(c) return c:GetLocation()&~(LOCATION_ONFIELD) end)==#sg end function s.extrafil(e,tp,mg) return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_EXTRA,0,nil),s.check -end +end \ No newline at end of file diff --git a/official/c58551308.lua b/official/c58551308.lua index 9c1530f3bd..50615bc180 100644 --- a/official/c58551308.lua +++ b/official/c58551308.lua @@ -1,4 +1,5 @@ --ダークファミリア +--Spear Cretin local s,id=GetID() function s.initial_effect(c) --flip effect @@ -21,7 +22,7 @@ function s.initial_effect(c) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) then + if c:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) then c:RegisterFlagEffect(id,RESET_EVENT|(RESETS_STANDARD|RESET_OVERLAY)&~(RESET_LEAVE|RESET_TOGRAVE),0,1) end end @@ -54,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c58554959.lua b/official/c58554959.lua index cf9a132d0f..984e8e26e5 100644 --- a/official/c58554959.lua +++ b/official/c58554959.lua @@ -1,4 +1,5 @@ --E-HERO マリシャス・エッジ +--Evil HERO Malicious Edge local s,id=GetID() function s.initial_effect(c) --summon with 1 tribute @@ -25,5 +26,5 @@ end function s.otop(e,tp,eg,ep,ev,re,r,rp,c) local sg=Duel.SelectTribute(tp,c,1,1) c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) -end + Duel.Release(sg,REASON_SUMMON|REASON_MATERIAL) +end \ No newline at end of file diff --git a/official/c58569561.lua b/official/c58569561.lua index 65531d8f36..e965ed0fb8 100644 --- a/official/c58569561.lua +++ b/official/c58569561.lua @@ -37,7 +37,7 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.accon) e1:SetValue(s.actlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end function s.accon(e) @@ -45,7 +45,7 @@ function s.accon(e) return Duel.GetLP(tp)>Duel.GetLP(1-tp) end function s.actlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return ep==tp diff --git a/official/c58582979.lua b/official/c58582979.lua index c4c47084c8..1e1e98c542 100644 --- a/official/c58582979.lua +++ b/official/c58582979.lua @@ -62,7 +62,7 @@ function s.rescon(sg,e,tp,mg) end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local g=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,c) + local g=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,c) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,0) end local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(sg,POS_FACEUP,REASON_COST) @@ -76,4 +76,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58600555.lua b/official/c58600555.lua index 235471d9ef..e055a734b3 100644 --- a/official/c58600555.lua +++ b/official/c58600555.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(s.tdcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,10 +40,6 @@ function s.xyzop(e,tp,chk,mc) mc:RemoveOverlayCard(tp,2,2,REASON_COST) return true end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tdfilter(c) return c:IsPosition(POS_DEFENSE) and c:IsAbleToDeck() end @@ -57,7 +53,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.cfilter(c) @@ -80,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(c,g) end -end +end \ No newline at end of file diff --git a/official/c58601383.lua b/official/c58601383.lua index a704986f76..e0a790486c 100644 --- a/official/c58601383.lua +++ b/official/c58601383.lua @@ -1,4 +1,5 @@ --地天の騎士ガイアドレイク +--Gaia Drake, the Universal Force local s,id=GetID() function s.initial_effect(c) --fusion material @@ -30,4 +31,4 @@ function s.efilter1(e,re,rp) end function s.efilter2(e,re) return re:IsActiveType(TYPE_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58604027.lua b/official/c58604027.lua index 47099d0d0d..c457a546bb 100644 --- a/official/c58604027.lua +++ b/official/c58604027.lua @@ -92,7 +92,7 @@ function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thfilter(c) return c:IsMonster() and c:IsSetCard(SET_FORBIDDEN_ONE) and c:IsAbleToHand() @@ -129,4 +129,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(tp) local ct=#cg Duel.Draw(tp,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58607704.lua b/official/c58607704.lua index 12e2d38bb1..93757d0a61 100644 --- a/official/c58607704.lua +++ b/official/c58607704.lua @@ -13,13 +13,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) + if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsSpellEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return false end local tc=g:GetFirst() e:SetLabelObject(tc) - return tc:IsOnField() and tc:IsType(TYPE_SPELL+TYPE_TRAP) + return tc:IsOnField() and tc:IsSpellTrap() end function s.filter(c,ct) return c:IsSpellTrap() and Duel.CheckChainTarget(ct,c) @@ -35,4 +35,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if g and g:GetFirst():IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,g) end -end +end \ No newline at end of file diff --git a/official/c58616392.lua b/official/c58616392.lua index 94e5f1ca13..72f390dbde 100644 --- a/official/c58616392.lua +++ b/official/c58616392.lua @@ -1,4 +1,5 @@ --魔犬オクトロス +--Doomdog Octhros local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c58621589.lua b/official/c58621589.lua index e781f1b663..3fef8de3e5 100644 --- a/official/c58621589.lua +++ b/official/c58621589.lua @@ -1,4 +1,5 @@ --誘惑のシャドウ +--Shadow of Eyes local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,5 +40,5 @@ function s.filter3(c,e) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter3,nil,e,tp) - Duel.ChangePosition(g,0x1,0x1,0x1,0x1,true) -end + Duel.ChangePosition(g,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) +end \ No newline at end of file diff --git a/official/c58628539.lua b/official/c58628539.lua index 454f4d801f..86227fe03d 100644 --- a/official/c58628539.lua +++ b/official/c58628539.lua @@ -1,4 +1,5 @@ --エクシーズエフェクト +--Xyz Effect local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return #eg==1 and eg:GetFirst():IsSummonType(SUMMON_TYPE_XYZ) and eg:GetFirst():IsControler(tp) + return #eg==1 and eg:GetFirst():IsXyzSummoned() and eg:GetFirst():IsControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58641905.lua b/official/c58641905.lua index 81b223ad94..b5319dee89 100644 --- a/official/c58641905.lua +++ b/official/c58641905.lua @@ -1,4 +1,5 @@ --防御輪 +--Ring of Defense local s,id=GetID() function s.initial_effect(c) --reflect @@ -10,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_TRAP) then return false end + if not re:IsTrapEffect() then return false end return aux.damcon1(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -31,4 +32,4 @@ function s.refcon(e,re,val,r,rp,rc) local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) if cid==e:GetLabel() then return 0 end return val -end +end \ No newline at end of file diff --git a/official/c58655504.lua b/official/c58655504.lua index fe0c7d0ef8..786bf30dc3 100644 --- a/official/c58655504.lua +++ b/official/c58655504.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -20,10 +20,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) and (Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -37,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -48,8 +44,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,1)) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c58657303.lua b/official/c58657303.lua index 074cca3763..9f1502ca84 100644 --- a/official/c58657303.lua +++ b/official/c58657303.lua @@ -17,4 +17,4 @@ end s.listed_names={CARD_NECROVALLEY} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(CARD_NECROVALLEY) -end +end \ No newline at end of file diff --git a/official/c58672736.lua b/official/c58672736.lua index d1de8ee568..ae1218813f 100644 --- a/official/c58672736.lua +++ b/official/c58672736.lua @@ -15,7 +15,6 @@ function s.initial_effect(c) e1:SetValue(s.aclimit) e1:SetCondition(s.actcon) c:RegisterEffect(e1) - --atk limit (opponent) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -35,7 +34,6 @@ function s.initial_effect(c) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) - --destroy replace local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) @@ -43,7 +41,6 @@ function s.initial_effect(c) e4:SetTarget(s.reptg) e4:SetOperation(s.repop) c:RegisterEffect(e4) - end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) @@ -54,7 +51,6 @@ end function s.atlimit(e,c) return c~=e:GetHandler() end - function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -68,7 +64,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end - function s.repfilter(c,e) return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end @@ -87,6 +82,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) -end - + Duel.Destroy(g,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c58685438.lua b/official/c58685438.lua index 8a22a74d17..9b75b9bcef 100644 --- a/official/c58685438.lua +++ b/official/c58685438.lua @@ -1,4 +1,5 @@ --二角獣レーム +--Bicorn Re'em local s,id=GetID() function s.initial_effect(c) --deckdes @@ -24,4 +25,4 @@ end function s.ddop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.DiscardDeck(p,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c58695102.lua b/official/c58695102.lua index 3504094ec7..2c48c0309f 100644 --- a/official/c58695102.lua +++ b/official/c58695102.lua @@ -1,6 +1,5 @@ --リ・バイブル --Re-Cover - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,10 +18,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)<=Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)-5 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c58699500.lua b/official/c58699500.lua index baee71bf7b..e55f604820 100644 --- a/official/c58699500.lua +++ b/official/c58699500.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.indtg(e,c) return e:GetHandler():GetLinkedGroup():IsContains(c) end @@ -49,12 +49,12 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,e) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_REPLACE) return true else return false end end function s.desfilter(c,e) - return not c:IsImmuneToEffect(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) + return not c:IsImmuneToEffect(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -64,7 +64,7 @@ function s.cfilter(c) return c:IsLevel(3) and (c:GetBaseAttack()>0 or c:GetBaseDefense()>0) and c:IsAbleToGraveAsCost() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb1) + return c:IsFaceup() and c:IsSetCard(SET_BURNING_ABYSS) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -90,12 +90,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(sc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(sc:GetDefense()) tc:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c58712976.lua b/official/c58712976.lua index 702ac3a27e..a37e71b6bc 100644 --- a/official/c58712976.lua +++ b/official/c58712976.lua @@ -1,4 +1,5 @@ --ヘルフレイムゴースト +--Infernal Flame Vixen local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --destroy @@ -25,10 +26,6 @@ function s.initial_effect(c) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -37,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end end @@ -48,11 +45,11 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return true end - if Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,3,nil) then + if Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,3,nil) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,3,3,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,3,3,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,3,0,0) end end @@ -63,4 +60,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #rg>0 then Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58720904.lua b/official/c58720904.lua index 14177266e0..85476f5f4d 100644 --- a/official/c58720904.lua +++ b/official/c58720904.lua @@ -1,4 +1,4 @@ --- +--ペンドラザクション --Pendransaction --Scripted by Eerie Code local s,id=GetID() @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end end @@ -32,7 +28,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) e1:SetValue(1000) c:RegisterEffect(e1) end @@ -44,9 +40,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) e2:SetValue(1) - c:RegisterEffect(e2) + c:RegisterEffect(e2) end --Banish 1 card the opponent controls if val>=10 then @@ -60,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SetLP(1-tp,3000) end -end +end \ No newline at end of file diff --git a/official/c58753372.lua b/official/c58753372.lua index 474eba80db..9ac84f0342 100644 --- a/official/c58753372.lua +++ b/official/c58753372.lua @@ -19,17 +19,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xdc} +s.listed_series={SET_SUPER_QUANT} function s.filter1(c) return c:IsFaceup() and c:HasLevel() end function s.filter2(c,tp) - return s.filter1(c) and c:IsSetCard(0xdc) + return s.filter1(c) and c:IsSetCard(SET_SUPER_QUANT) and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -51,20 +51,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) lc:RegisterEffect(e1) end end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xdc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spfilter2(c) - return c:IsSetCard(0xdc) and c:IsMonster() + return c:IsSetCard(SET_SUPER_QUANT) and c:IsMonster() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -96,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoGrave(cg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58760121.lua b/official/c58760121.lua index 42867c9185..4f18afe13f 100644 --- a/official/c58760121.lua +++ b/official/c58760121.lua @@ -1,4 +1,5 @@ --ワーム・ファルコ +--Worm Falco local s,id=GetID() function s.initial_effect(c) --flip @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.posop) c:RegisterEffect(e1) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) + return c:IsFaceup() and c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -21,4 +22,4 @@ end function s.posop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,e:GetHandler()) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE,0,POS_FACEDOWN_DEFENSE,0) -end +end \ No newline at end of file diff --git a/official/c58775978.lua b/official/c58775978.lua index 571a71403d..10cbb9693b 100644 --- a/official/c58775978.lua +++ b/official/c58775978.lua @@ -1,4 +1,5 @@ --悪夢の鉄檻 +--Nightmare's Steelcage local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,2) c:RegisterEffect(e1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -43,14 +44,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetLabelObject(e1) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e3:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,2) c:RegisterEffect(e3) end function s.reset(e,tp,eg,ep,ev,re,r,rp) s.desop(e:GetLabelObject(),tp,eg,ep,ev,e,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -61,4 +62,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_RULE) if re then re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c58786132.lua b/official/c58786132.lua index 6578270550..fe66ad3fba 100644 --- a/official/c58786132.lua +++ b/official/c58786132.lua @@ -29,9 +29,9 @@ function s.cfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -71,4 +71,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil) Duel.ConfirmCards(tp,g) -end +end \ No newline at end of file diff --git a/official/c58787301.lua b/official/c58787301.lua index 9992136ae9..20539beb02 100644 --- a/official/c58787301.lua +++ b/official/c58787301.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) @@ -22,7 +22,7 @@ function s.cfilter(c,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()) end function s.spfilter(c,e,tp,lv) - return c:IsSetCard(0xef) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DARKLORD) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp,lv) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c58793369.lua b/official/c58793369.lua index 3b377f086b..c886fd487b 100644 --- a/official/c58793369.lua +++ b/official/c58793369.lua @@ -1,5 +1,5 @@ --竜輝巧-ファフニール ---Draitron Fafnir +--Drytron Fafnir --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -41,9 +41,9 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x151) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSpellTrap() and c:IsSetCard(SET_DRYTRON) and c:IsAbleToHand() and not c:IsCode(id) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -60,7 +60,7 @@ function s.effectfilter(e,ct) return te:GetHandler():IsRitualSpell() end function s.lvcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x151),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DRYTRON),tp,LOCATION_MZONE,0,1,nil) end function s.lvfilter(c) return c:IsFaceup() and c:HasLevel() and c:IsLevelAbove(2) and c:IsAttackAbove(1000) @@ -79,8 +79,8 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c58807980.lua b/official/c58807980.lua index 265883c2aa..7a690f58ac 100644 --- a/official/c58807980.lua +++ b/official/c58807980.lua @@ -73,4 +73,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58811192.lua b/official/c58811192.lua index 812406430e..4e4d7bfef8 100644 --- a/official/c58811192.lua +++ b/official/c58811192.lua @@ -49,9 +49,9 @@ function s.cfilter(c) return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -73,7 +73,7 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.spfilter1(c,e,tp,setcode) return c:IsSetCard(setcode) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) diff --git a/official/c58820853.lua b/official/c58820853.lua index 7f51d11a4f..efdb66e8f2 100644 --- a/official/c58820853.lua +++ b/official/c58820853.lua @@ -1,4 +1,5 @@ --BF-蒼炎のシュラ +--Blackwing - Shura the Blue Flame local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsAttackBelow(1500) and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,12 +32,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c58820923.lua b/official/c58820923.lua index b8a8198b8a..7ac8a098a9 100644 --- a/official/c58820923.lua +++ b/official/c58820923.lua @@ -1,4 +1,5 @@ --No.95 ギャラクシーアイズ・ダークマター・ドラゴン +--Number 95: Galaxy-Eyes Dark Matter Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -25,17 +26,17 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=95 function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x107b,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.cfilter(c) return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() @@ -71,10 +72,6 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 and e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK_MONSTER)==0 end @@ -87,7 +84,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c58827995.lua b/official/c58827995.lua index 319ef99aaa..619e705542 100644 --- a/official/c58827995.lua +++ b/official/c58827995.lua @@ -1,7 +1,6 @@ --鎧竜降臨 ---Armored Dragon Ritual +--Armor Dragon Ritual --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -21,7 +20,6 @@ function s.initial_effect(c) end --Specifically lists "Paladin of Armored Dragon" s.listed_names={75901113} - function s.rescon(sg,e,tp,mg) return sg:GetSum(Card.GetLevel)>=4 end @@ -30,7 +28,7 @@ function s.costfilter(c) end --Banish monsters whose total levels equal 4 as cost function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local rg=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if chk==0 then return aux.SelectUnselectGroup(rg,e,tp,1,99,s.rescon,0) end local sg=aux.SelectUnselectGroup(rg,e,tp,1,99,s.rescon,1,tp,HINTMSG_REMOVE,nil,s.rescon) Duel.Remove(sg,POS_FACEUP,REASON_COST) diff --git a/official/c58843503.lua b/official/c58843503.lua index b24ec9d2a8..f5e7f25a81 100644 --- a/official/c58843503.lua +++ b/official/c58843503.lua @@ -1,4 +1,5 @@ --ミッド・ピース・ゴーレム +--Medium Piece Golem local s,id=GetID() function s.initial_effect(c) --spsummon @@ -42,13 +43,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c58851034.lua b/official/c58851034.lua index fd27b2bb63..8085b09706 100644 --- a/official/c58851034.lua +++ b/official/c58851034.lua @@ -1,4 +1,5 @@ --封魔の呪印 +--Cursed Seal of the Forbidden Spell local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsSpell() and c:IsDiscardable() @@ -21,7 +22,7 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c58859575.lua b/official/c58859575.lua index 99177bf298..41f2f82c8a 100644 --- a/official/c58859575.lua +++ b/official/c58859575.lua @@ -1,4 +1,5 @@ --VW-タイガー・カタパルト +--VW-Tiger Catapult local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,14 +22,14 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) end function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsCanChangePosition() @@ -45,4 +46,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) end -end +end \ No newline at end of file diff --git a/official/c58861941.lua b/official/c58861941.lua index 27ac533b8a..3082447435 100644 --- a/official/c58861941.lua +++ b/official/c58861941.lua @@ -1,4 +1,5 @@ --ラージマウス +--Ooguchi local s,id=GetID() function s.initial_effect(c) --direct attack @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c58873391.lua b/official/c58873391.lua index 25964b0e73..11799e44e7 100644 --- a/official/c58873391.lua +++ b/official/c58873391.lua @@ -1,4 +1,5 @@ --フィッシャーチャージ +--Fish Depth Charge local s,id=GetID() function s.initial_effect(c) --Activate @@ -57,4 +58,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58882608.lua b/official/c58882608.lua index 77c8a015d4..ba12e5490a 100644 --- a/official/c58882608.lua +++ b/official/c58882608.lua @@ -1,4 +1,4 @@ --- +--ティスティナの息吹 --Breath of the Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c58901502.lua b/official/c58901502.lua index 2190e8ea28..0a187961d5 100644 --- a/official/c58901502.lua +++ b/official/c58901502.lua @@ -1,4 +1,5 @@ --ゴヨウ・ディフェンダー +--Goyo Defender local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -51,7 +52,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end @@ -60,4 +61,4 @@ function s.filter(c) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*1000 -end +end \ No newline at end of file diff --git a/official/c58911105.lua b/official/c58911105.lua index 3977b644c7..f8b12e9ba2 100644 --- a/official/c58911105.lua +++ b/official/c58911105.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.costfilter(c) return c:IsTrap() and c:IsAbleToGraveAsCost() end @@ -25,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(cg,REASON_COST) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x2b) and + return c:IsLevelBelow(4) and c:IsSetCard(SET_NINJA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c58921041.lua b/official/c58921041.lua index fb97165e1f..39d2320560 100644 --- a/official/c58921041.lua +++ b/official/c58921041.lua @@ -1,4 +1,5 @@ --魔封じの芳香 +--Anti-Spell Fragrance local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,13 +24,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.aclimit(e,re,tp) - if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return false end + if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsSpellEffect() then return false end local c=re:GetHandler() return not c:IsLocation(LOCATION_SZONE) or c:GetFlagEffect(id)>0 end function s.aclimset(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,0,1) end -end +end \ No newline at end of file diff --git a/official/c58924378.lua b/official/c58924378.lua index c86ef2bfac..2b8a662592 100644 --- a/official/c58924378.lua +++ b/official/c58924378.lua @@ -1,4 +1,5 @@ --エレキャッスル +--Wattcastle local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,16 +15,16 @@ function s.initial_effect(c) e2:SetOperation(s.atkdn) c:RegisterEffect(e2) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.atkdn(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - if d and d:IsSetCard(0xe) then + if d and d:IsSetCard(SET_WATT) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1000) a:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c58931850.lua b/official/c58931850.lua index 9874e6f547..e2e4f2da4d 100644 --- a/official/c58931850.lua +++ b/official/c58931850.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>=25 end) - e4:SetCost(aux.dxmcostgen(1,1)) + e4:SetCost(Cost.Detach(1,1)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) diff --git a/official/c58938528.lua b/official/c58938528.lua index 2b99b21d36..949a0ba2c0 100644 --- a/official/c58938528.lua +++ b/official/c58938528.lua @@ -1,10 +1,10 @@ --- EMレディアンジュ --- Performapal Lady Ange --- Scripted by Hatter +--EMレディアンジュ +--Performapal Ladyange +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Reduce ATK + --Reduce ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Draw + --Draw local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DRAW) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) - -- Place in Pendulum Zone + --Place in Pendulum Zone local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetType(EFFECT_TYPE_IGNITION) @@ -40,13 +40,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id,21949879} -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.atkcostfilter(c) return c:IsDiscardable() and c:IsType(TYPE_PENDULUM) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkcostfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.atkcostfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.atkcostfilter,1,1,REASON_COST|REASON_DISCARD) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local bc0,bc1=Duel.GetBattleMonster(tp) @@ -58,24 +58,24 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local tc=e:GetLabelObject() if tc and tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(1-tp) then - -- Update ATK + --Update ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.drcostfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and not c:IsCode(id) and c:IsDiscardable() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and not c:IsCode(id) and c:IsDiscardable() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() and Duel.IsExistingMatchingCard(s.drcostfilter,tp,LOCATION_HAND,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.drcostfilter,tp,LOCATION_HAND,0,1,1,c) - Duel.SendtoGrave(g+c,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g+c,REASON_DISCARD|REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -88,7 +88,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.penconfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x99) or c:IsCode(21949879)) + return c:IsFaceup() and (c:IsSetCard(SET_ODD_EYES) or c:IsCode(21949879)) end function s.pencon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.penconfilter,tp,LOCATION_ONFIELD,0,1,nil) diff --git a/official/c58947797.lua b/official/c58947797.lua index 9d717594b9..0c66220878 100644 --- a/official/c58947797.lua +++ b/official/c58947797.lua @@ -31,11 +31,10 @@ function s.initial_effect(c) e3:SetValue(s.xyzlimit) c:RegisterEffect(e3) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} s.listed_names={id} - function s.filter(c,e,tp) - return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_VAMPIRE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -71,4 +70,4 @@ end function s.xyzlimit(e,c) if not c then return false end return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c58981727.lua b/official/c58981727.lua index b245f6e267..a2f32aae46 100644 --- a/official/c58981727.lua +++ b/official/c58981727.lua @@ -1,5 +1,5 @@ --妖仙獣 侍郎風 ---Yosenju Saburokaze +--Yosenju Sabu --scripted by AlphaKreitn local s,id=GetID() function s.initial_effect(c) @@ -33,13 +33,13 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.listed_names={62681049,79861914} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xb3),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_YOSENJU),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end function s.thfilter(c) - return c:IsSetCard(0xb3) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsSetCard(SET_YOSENJU) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,7 +54,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb3) and c:IsAbleToDeck() + return c:IsFaceup() and c:IsSetCard(SET_YOSENJU) and c:IsAbleToDeck() end function s.acfilter(c,tp) return c:IsCode(62681049,79861914) and not c:IsForbidden() --and c:GetActivateEffect():IsActivatable(tp) @@ -82,7 +82,7 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) --]] local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end end diff --git a/official/c58984738.lua b/official/c58984738.lua index c4e86281e0..1bdafd7a10 100644 --- a/official/c58984738.lua +++ b/official/c58984738.lua @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and rp~=tp + return e:GetHandler():IsTributeSummoned() and rp~=tp end function s.thfilter(c,tp) - return c:IsSetCard(0xf9) and c:GetType()==0x20004 + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsContinuousTrap() and (c:IsAbleToHand() or (c:GetActivateEffect():IsActivatable(tp,true,true) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end, aux.Stringid(id,2)) -end +end \ No newline at end of file diff --git a/official/c58988903.lua b/official/c58988903.lua index 6d8e820ed8..8d36e74700 100644 --- a/official/c58988903.lua +++ b/official/c58988903.lua @@ -25,16 +25,16 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0xba) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2,pg) end function s.filter2(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(0xba) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(SET_RAIDRAPTOR) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -59,18 +59,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end function s.spfilter(c,e,tp) if c.rum_limit and not c.rum_limit(c,e) then return false end - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) g:AddCard(e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -86,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c58990362.lua b/official/c58990362.lua index 27c8b7a5cd..3d4fa5b5a1 100644 --- a/official/c58990362.lua +++ b/official/c58990362.lua @@ -1,4 +1,5 @@ --秘竜星-セフィラシウゴ +--Zefraniu, Secret of the Yang Zing local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,20 +29,20 @@ function s.initial_effect(c) e4:SetCondition(s.condition2) c:RegisterEffect(e4) end -s.listed_series={0x9e,0xc4} +s.listed_series={SET_YANG_ZING,SET_ZEFRA} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9e) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard(SET_YANG_ZING) or c:IsSetCard(SET_ZEFRA) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.condition2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.thfilter(c) - return (c:IsSetCard(0x9e) or c:IsSetCard(0xc4)) and c:IsSpellTrap() and c:IsAbleToHand() + return (c:IsSetCard(SET_YANG_ZING) or c:IsSetCard(SET_ZEFRA)) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c58990631.lua b/official/c58990631.lua index b2f37400ae..5f45bd4989 100644 --- a/official/c58990631.lua +++ b/official/c58990631.lua @@ -1,4 +1,5 @@ --オートマチック・レーザー +--Automatic Laser local s,id=GetID() function s.initial_effect(c) --Activate(summon) @@ -64,4 +65,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c58996430.lua b/official/c58996430.lua index 59c95f671f..c10cf7acea 100644 --- a/official/c58996430.lua +++ b/official/c58996430.lua @@ -1,4 +1,5 @@ --ライトロード・ビースト ウォルフ +--Wulf, Lightsworn Beast local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c5901497.lua b/official/c5901497.lua index 9f48c028a6..4e8eb471f8 100644 --- a/official/c5901497.lua +++ b/official/c5901497.lua @@ -1,4 +1,5 @@ --女王の影武者 +--Queen's Double local s,id=GetID() function s.initial_effect(c) --direct attack @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c59019082.lua b/official/c59019082.lua index eada9d99b8..66ff7e7f58 100644 --- a/official/c59019082.lua +++ b/official/c59019082.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} s.listed_names={id} function s.cfilter(c) return c:IsPreviousLocation(LOCATION_DECK) @@ -22,7 +22,7 @@ end function s.condtion(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - return rp==tp and (r&REASON_EFFECT)~=0 and not rc:IsCode(id) and rc:IsSetCard(0x38) and rc:IsMonster() + return rp==tp and (r&REASON_EFFECT)~=0 and not rc:IsCode(id) and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsMonster() and re:GetActivateLocation()==LOCATION_MZONE and eg:IsExists(s.cfilter,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -30,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) end function s.filter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x38) and c:IsMonster() + return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59023523.lua b/official/c59023523.lua index e3c5904d22..3f6b4f255f 100644 --- a/official/c59023523.lua +++ b/official/c59023523.lua @@ -1,4 +1,5 @@ --サイバネティック・マジシャン +--Cybernetic Magician local s,id=GetID() function s.initial_effect(c) --atk change @@ -15,7 +16,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end @@ -29,8 +30,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(2000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c59036972.lua b/official/c59036972.lua index 18f297bc2b..ef4cd4bff6 100644 --- a/official/c59036972.lua +++ b/official/c59036972.lua @@ -1,7 +1,8 @@ --マブラス +--Mavelus local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,72842870,92944626) -end +end \ No newline at end of file diff --git a/official/c59042331.lua b/official/c59042331.lua index 0d1e6ab45c..3e49ca9939 100644 --- a/official/c59042331.lua +++ b/official/c59042331.lua @@ -1,4 +1,5 @@ --ガード・ヘッジ +--Hedge Guard local s,id=GetID() function s.initial_effect(c) --atkdown @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end @@ -19,10 +20,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(tc) return tc and tc:IsControler(tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if tc:IsRelateToBattle() then @@ -30,13 +27,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(tc:GetAttack()/2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c59048135.lua b/official/c59048135.lua index 2c06cca4ca..cfebad2b09 100644 --- a/official/c59048135.lua +++ b/official/c59048135.lua @@ -32,29 +32,29 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end s.listed_names={id} -s.listed_series={0x76,0x92} +s.listed_series={SET_HERALDIC_BEAST,SET_HERALDRY} function s.counterfilter(c) - return c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_XYZ) or c:IsSetCard(0x76) + return c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_XYZ) or c:IsSetCard(SET_HERALDIC_BEAST) end function s.etarget(e,c) return c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_XYZ) end function s.evalue(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.cfilter(c) - return c:IsSetCard(0x76) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsMonster() and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SUMMON)==0 and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -64,10 +64,10 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c) - return not (c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_XYZ)) and not c:IsSetCard(0x76) + return not (c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_XYZ)) and not c:IsSetCard(SET_HERALDIC_BEAST) end function s.filter(c) - return c:IsSetCard(0x92) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_HERALDRY) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c59054773.lua b/official/c59054773.lua index 7284335dc2..2787a5a6dc 100644 --- a/official/c59054773.lua +++ b/official/c59054773.lua @@ -1,5 +1,5 @@ --イグニスターAiランド ---Ignister A.I.land +--Ignister A.I.Land --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -39,7 +39,7 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.cfilter(c) return c:GetSequence()<5 end @@ -47,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x135) and c:IsLevelBelow(4) and s.attr_list[tp]&c:GetAttribute()==0 + return c:IsSetCard(SET_IGNISTER) and c:IsLevelBelow(4) and s.attr_list[tp]&c:GetAttribute()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -77,19 +77,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end if not attr then return end for _,str in aux.GetAttributeStrings(attr) do - e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,str) + e:GetHandler():RegisterFlagEffect(0,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,str) end end function s.splimit(e,c) return not c:IsRace(RACE_CYBERSE) end function s.rmfilter(c,tp) - return c:IsSetCard(0x135) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_IGNISTER) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -101,4 +101,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end +end \ No newline at end of file diff --git a/official/c59057152.lua b/official/c59057152.lua index 7e79670015..b20de0df07 100644 --- a/official/c59057152.lua +++ b/official/c59057152.lua @@ -1,4 +1,5 @@ --聖騎士モルドレッド +--Noble Knight Medraut local s,id=GetID() function s.initial_effect(c) --normal monster @@ -39,20 +40,20 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.eqcon1(e) local eg=e:GetHandler():GetEquipGroup() - return not eg or not eg:IsExists(Card.IsSetCard,1,nil,0x207a) + return not eg or not eg:IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.eqcon2(e) local eg=e:GetHandler():GetEquipGroup() - return eg and eg:IsExists(Card.IsSetCard,1,nil,0x207a) + return eg and eg:IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return s.eqcon2(e) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -71,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_SZONE,0,1,1,nil) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59057953.lua b/official/c59057953.lua index c411d2d23a..a15989f0e4 100644 --- a/official/c59057953.lua +++ b/official/c59057953.lua @@ -1,4 +1,5 @@ --魔界劇団の楽屋入り +--Abyss Actors Back Stage local s,id=GetID() function s.initial_effect(c) --activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,0x10ec) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,SET_ABYSS_ACTOR) end function s.filter(c) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x10ec) and not c:IsForbidden() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_ABYSS_ACTOR) and not c:IsForbidden() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #tg1==2 then Duel.SendtoExtraP(tg1,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59069885.lua b/official/c59069885.lua index 24e2c1d0b4..e77e4d98d7 100644 --- a/official/c59069885.lua +++ b/official/c59069885.lua @@ -1,4 +1,4 @@ --- +--ティスティナの抱擁 --Embrace of the Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c59070329.lua b/official/c59070329.lua index a28d1968bb..d30cd9767b 100644 --- a/official/c59070329.lua +++ b/official/c59070329.lua @@ -1,6 +1,5 @@ --皇の波動 --Utopian Aura - local s,id=GetID() function s.initial_effect(c) --Your Xyz monsters cannot be destroyed by card effects @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -34,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c59071624.lua b/official/c59071624.lua index 18d5581ea4..4f1156859a 100644 --- a/official/c59071624.lua +++ b/official/c59071624.lua @@ -1,7 +1,6 @@ --アロメルスの蟲惑魔 --Traptrix Allomerus --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -24,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -37,7 +36,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_TO_GRAVE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.sscost) + e3:SetCost(Cost.Detach(1)) e3:SetCondition(s.sscon) e3:SetTarget(s.sstg) e3:SetOperation(s.ssop) @@ -47,24 +46,19 @@ function s.initial_effect(c) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) end --Part of "Traptrix" archetype -s.listed_series={0x108a} - +s.listed_series={SET_TRAPTRIX} --Has material(s) attached function s.imcon(e) return e:GetHandler():GetOverlayCount()>0 end --Trap effects function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) + return te:IsTrapEffect() end --Detach 2 materials as cost -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end --Check for level 4 plant/insect monster function s.spfilter(c,e,tp) - return c:IsLevel(4) and c:IsRace(RACE_PLANT+RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevel(4) and c:IsRace(RACE_PLANT|RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,10 +80,6 @@ function s.sscon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end --Detach 1 material as cost -function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end --Check for opponent's monster that sent there by your effect function s.cfilter(c,tp) return c:IsMonster() and c:GetPreviousControler()==1-tp and c:IsPreviousLocation(LOCATION_MZONE) @@ -98,7 +88,7 @@ end --Check for opponent's sent monster in GY/banished function s.ssfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and s.cfilter(c,tp) - and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) + and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) end --Activation legality function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c59094601.lua b/official/c59094601.lua index 1778f1cc58..959261c30a 100644 --- a/official/c59094601.lua +++ b/official/c59094601.lua @@ -26,14 +26,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_names={CARD_MONSTER_REBORN,10000020} +s.listed_names={CARD_MONSTER_REBORN,CARD_SLIFER} function s.spfilter(c,e,tp) - return c:IsCode(10000020) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsCode(CARD_SLIFER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) @@ -74,14 +74,14 @@ function s.tdfilter(c,deck_count) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,deck_count) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,deck_count) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local deck_count=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,deck_count):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,deck_count):GetFirst() if not tc then return end if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) @@ -96,4 +96,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59120809.lua b/official/c59120809.lua index 56ba01d700..5f586dbdca 100644 --- a/official/c59120809.lua +++ b/official/c59120809.lua @@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(e,c) return not c:IsSetCard(SET_SCARECLAW) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c59123194.lua b/official/c59123194.lua index 891a0d7067..dc91f1272d 100644 --- a/official/c59123194.lua +++ b/official/c59123194.lua @@ -1,4 +1,5 @@ --覚醒の魔導剣士 +--Enlightenment Paladin local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,16 +27,16 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetMaterial():IsExists(s.pmfilter,1,nil,c) + return c:IsSynchroSummoned() and c:GetMaterial():IsExists(s.pmfilter,1,nil,c) end function s.thfilter(c) return c:IsSpell() and c:IsAbleToHand() end function s.pmfilter(c,sc) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM,sc,SUMMON_TYPE_SYNCHRO) + return c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM,sc,SUMMON_TYPE_SYNCHRO) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c59123937.lua b/official/c59123937.lua index 75bcb8b0bc..6d5e8d5372 100644 --- a/official/c59123937.lua +++ b/official/c59123937.lua @@ -21,14 +21,14 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0xaf) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0xaf) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_DD) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_DD) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:GetLevel()==7 and c:IsSetCard(0x10af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==7 and c:IsSetCard(SET_DDD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.fmfilter(c,e,tp,m,f,gc,chkf) - return c:IsSetCard(0x10af) and c:IsLevelAbove(8) + return c:IsSetCard(SET_DDD) and c:IsLevelAbove(8) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local params = {fusfilter=s.fmfilter,matfilter=aux.FALSE,extrafil=s.fextra,extraop=Fusion.BanishMaterial,gc=Fusion.ForcedHandler,extratg=s.extratarget} @@ -57,11 +57,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,{id,1}) e1:SetTarget(Fusion.SummonEffTG(params)) e1:SetOperation(Fusion.SummonEffOP(params)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil diff --git a/official/c59131526.lua b/official/c59131526.lua index 0d1d868e17..e05b4b2b95 100644 --- a/official/c59131526.lua +++ b/official/c59131526.lua @@ -26,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) --Add up to 2 cards during the Standby Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount(),tc:GetCode()) e1:SetCondition(s.thcond) diff --git a/official/c5914184.lua b/official/c5914184.lua index ab5788cccd..925b82cb76 100644 --- a/official/c5914184.lua +++ b/official/c5914184.lua @@ -32,18 +32,18 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) else e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) end c:RegisterEffect(e1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(1-tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -59,4 +59,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5915629.lua b/official/c5915629.lua index 1575236dbd..e3a09b845f 100644 --- a/official/c5915629.lua +++ b/official/c5915629.lua @@ -1,4 +1,5 @@ --強欲な贈り物 +--The Gift of Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59156966.lua b/official/c59156966.lua index 171f6fa5ae..81b3c2d60a 100644 --- a/official/c59156966.lua +++ b/official/c59156966.lua @@ -1,4 +1,5 @@ --黄金の歯車装置箱 +--Golden Gearbox local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,17 +9,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_KARAKURI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) + return c:IsFaceup() and c:IsSetCard(SET_KARAKURI) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -32,14 +30,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_DEFENSE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1500) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c59160188.lua b/official/c59160188.lua index 8d3608052c..afc54ed1cd 100644 --- a/official/c59160188.lua +++ b/official/c59160188.lua @@ -45,7 +45,7 @@ function s.initial_effect(c) e6:SetOperation(s.regop) c:RegisterEffect(e6) local e7=e6:Clone() - e7:SetCode(EVENT_PHASE_START+PHASE_DRAW) + e7:SetCode(EVENT_PHASE_START|PHASE_DRAW) e7:SetOperation(s.clearop) c:RegisterEffect(e7) local e8=e6:Clone() @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,p,false,false,POS_FACEUP_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c5916510.lua b/official/c5916510.lua index 4aa41f1dbb..699d1530f2 100644 --- a/official/c5916510.lua +++ b/official/c5916510.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -67,4 +67,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) and tc:IsRelateToEffect(e) and s.matfilter(tc) and not tc:IsImmuneToEffect(e) then Duel.Overlay(c,tc,true) end -end +end \ No newline at end of file diff --git a/official/c59170782.lua b/official/c59170782.lua index a2fafdaba9..a27a3a7e5e 100644 --- a/official/c59170782.lua +++ b/official/c59170782.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.tgcon1) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.tgop1) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --Change battle target @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.tgcon2) - e2:SetCost(s.tgcost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.tgop2) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) --Special Summon @@ -37,18 +37,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x74} -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_MERMAIL} function s.tgcon1(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end + if rp==tp or not re:IsSpellTrapEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return false end local tc=g:GetFirst() local c=e:GetHandler() - if tc==c or tc:GetControler()==1-tp or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x74) then return false end + if tc==c or tc:IsControler(1-tp) or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(SET_MERMAIL) then return false end return Duel.CheckChainTarget(ev,c) end function s.tgop1(e,tp,eg,ep,ev,re,r,rp) @@ -64,7 +60,7 @@ end function s.tgcon2(e,tp,eg,ep,ev,re,r,rp) if tp==Duel.GetTurnPlayer() then return false end local at=Duel.GetAttackTarget() - if at and at:IsFaceup() and at:IsSetCard(0x74) then + if at and at:IsFaceup() and at:IsSetCard(SET_MERMAIL) then local ag=eg:GetFirst():GetAttackableTarget() return ag:IsContains(e:GetHandler()) end @@ -80,7 +76,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MERMAIL) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -95,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59185998.lua b/official/c59185998.lua index fbd64f4662..98d52bf539 100644 --- a/official/c59185998.lua +++ b/official/c59185998.lua @@ -32,12 +32,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.extrafilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end function s.extracon(c,e,tp,sg,mg,lc,og,chk) - return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsSetCard,1,og,0x103) and + return (sg+mg):Filter(s.extrafilter,nil,e:GetHandlerPlayer()):IsExists(Card.IsSetCard,1,og,SET_ALTERGEIST) and sg:FilterCount(s.flagcheck,nil)<2 end function s.flagcheck(c) @@ -47,7 +47,7 @@ function s.extraval(chk,summon_type,e,...) local c=e:GetHandler() if chk==0 then local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(0x103) or Duel.GetFlagEffect(tp,id)>0 then + if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_ALTERGEIST) or Duel.GetFlagEffect(tp,id)>0 then return Group.CreateGroup() else table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) @@ -57,7 +57,7 @@ function s.extraval(chk,summon_type,e,...) local sg,sc,tp=... if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end elseif chk==2 then for _,eff in ipairs(s.flagmap[c]) do @@ -67,7 +67,7 @@ function s.extraval(chk,summon_type,e,...) end end function s.cfilter(c,tp) - return c:IsSetCard(0x103) and c:IsType(TYPE_LINK) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsSetCard(SET_ALTERGEIST) and c:IsType(TYPE_LINK) and c:IsControler(tp) and c:IsLinkSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) diff --git a/official/c59197169.lua b/official/c59197169.lua index d0be704369..6b15b48ec2 100644 --- a/official/c59197169.lua +++ b/official/c59197169.lua @@ -1,4 +1,5 @@ --闇 +--Yami local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) end function s.val(e,c) local r=c:GetRace() - if (r&RACE_FIEND+RACE_SPELLCASTER)>0 then return 200 + if (r&RACE_FIEND|RACE_SPELLCASTER)>0 then return 200 elseif (r&RACE_FAIRY)>0 then return -200 else return 0 end -end +end \ No newline at end of file diff --git a/official/c59208943.lua b/official/c59208943.lua index 86313842d1..c09dfa1604 100644 --- a/official/c59208943.lua +++ b/official/c59208943.lua @@ -10,11 +10,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,13 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x126} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_TIME_THIEF} function s.spfilter(c,e,tp) - return c:IsSetCard(0x126) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TIME_THIEF) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -60,7 +56,7 @@ function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) and chkc~=c end if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,c) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x126) end + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,SET_TIME_THIEF) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,c) end @@ -68,10 +64,9 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x126) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,SET_TIME_THIEF) if #g>0 then Duel.Overlay(tc,g) end end -end - +end \ No newline at end of file diff --git a/official/c59228631.lua b/official/c59228631.lua index 31bf54158f..c9b4cec59b 100644 --- a/official/c59228631.lua +++ b/official/c59228631.lua @@ -1,7 +1,6 @@ --ホーリーナイツ・アステル ---Holy Knight Astel +--Starry Knight Astel --LUA by Kohana Sonogami - local s,id=GetID() function s.initial_effect(c) --Tribute 1 LIGHT monster; Special Summon from hand @@ -24,12 +23,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x15b} +s.listed_series={SET_STARRY_KNIGHT} function s.ldlv7filter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsLevel(7) end @@ -72,7 +71,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c59235795.lua b/official/c59235795.lua index 22adc9e844..7084d2a96c 100644 --- a/official/c59235795.lua +++ b/official/c59235795.lua @@ -1,4 +1,5 @@ --デスサイクロン +--Destruction Cyclone local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59237154.lua b/official/c59237154.lua index 267afc3779..0838367b90 100644 --- a/official/c59237154.lua +++ b/official/c59237154.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(300)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MMZONE,0,2,nil) end end diff --git a/official/c59242457.lua b/official/c59242457.lua index bc52fba224..404c9516ff 100644 --- a/official/c59242457.lua +++ b/official/c59242457.lua @@ -1,25 +1,25 @@ --- エクソシスターズ・マニフィカ --- Exosisters Magnifica --- Scripted by Hatter +--エクソシスターズ・マニフィカ +--Exosisters Magnifica +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Rank 4 "Exorsister" Xyz Monsters + --2 Rank 4 "Exorsister" Xyz Monsters Xyz.AddProcedure(c,s.xyzfilter,nil,2,nil,nil,nil,nil,false) - -- Must be Xyz Summoned using the correct materials + --Must be Xyz Summoned using the correct materials local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(s.splimit) c:RegisterEffect(e0) - -- Can make a second attack + --Can make a second attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) c:RegisterEffect(e1) - -- Banish 1 opponent card + --Banish 1 opponent card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_REMOVE) @@ -28,11 +28,11 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) - -- Return material to Extra Deck + --Return material to Extra Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) @@ -44,9 +44,9 @@ function s.initial_effect(c) e3:SetOperation(s.teop) c:RegisterEffect(e3) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.xyzfilter(c,xyz,sumtype,tp) - return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsRank(4) and c:IsSetCard(0x174,xyz,sumtype,tp) + return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and c:IsRank(4) and c:IsSetCard(SET_EXOSISTER,xyz,sumtype,tp) end function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ and not se @@ -82,7 +82,7 @@ function s.teop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local tc=c:GetOverlayGroup():FilterSelect(tp,s.tefilter,1,1,nil,tp):GetFirst() - if not tc or Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)<1 or not tc:IsLocation(LOCATION_EXTRA) then return end + if not tc or Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)<1 or not tc:IsLocation(LOCATION_EXTRA) then return end if c:IsFacedown() or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) if #pg>1 or (#pg==1 and not pg:IsContains(c)) then return end diff --git a/official/c59251766.lua b/official/c59251766.lua index f633963ece..5ac43cc18e 100644 --- a/official/c59251766.lua +++ b/official/c59251766.lua @@ -1,4 +1,5 @@ --武神器-サグサ +--Bujingi Hare local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,14 +10,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -33,10 +34,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 -end +end \ No newline at end of file diff --git a/official/c59255742.lua b/official/c59255742.lua index 2f6806ecf1..79ecc09aab 100644 --- a/official/c59255742.lua +++ b/official/c59255742.lua @@ -123,8 +123,8 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tc:GetOwner()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TEMP_REMOVE+RESET_TURN_SET)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_TURN_SET)) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c59258334.lua b/official/c59258334.lua index 21dceb244d..2f499e52af 100644 --- a/official/c59258334.lua +++ b/official/c59258334.lua @@ -88,10 +88,10 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.rccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFirstCardTarget() + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetFirstCardTarget() end function s.rcop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() tc:RemoveCounter(tp,COUNTER_A,1,REASON_EFFECT) Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+COUNTER_A,e,REASON_EFFECT,tp,tp,1) -end +end \ No newline at end of file diff --git a/official/c59281822.lua b/official/c59281822.lua index ec5883bc01..8016945595 100644 --- a/official/c59281822.lua +++ b/official/c59281822.lua @@ -1,5 +1,5 @@ --闇霊神オブルミラージュ ---Oblemirage the Elemental Lord +--Umbramirage the Elemental Lord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -66,13 +66,12 @@ function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()==effp then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,effp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end - +end \ No newline at end of file diff --git a/official/c59281922.lua b/official/c59281922.lua index 85fd2d6d7e..a6160149d4 100644 --- a/official/c59281922.lua +++ b/official/c59281922.lua @@ -1,6 +1,5 @@ --サイバー・ドラゴン・ドライ --Cyber Dragon Drei - local s,id=GetID() function s.initial_effect(c) --When normal summoned, make all your "Cyber Dragons" become level 5 @@ -26,13 +25,12 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetValue(CARD_CYBER_DRAGON) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end s.listed_names={CARD_CYBER_DRAGON} - function s.counterfilter(c) return c:IsRace(RACE_MACHINE) end @@ -42,14 +40,14 @@ function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -71,7 +69,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(5) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -91,7 +89,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c59290628.lua b/official/c59290628.lua index 25a8084870..4b55a0fa8e 100644 --- a/official/c59290628.lua +++ b/official/c59290628.lua @@ -1,4 +1,5 @@ --ナイトメア・ホース +--Nightmare Horse local s,id=GetID() function s.initial_effect(c) --direct attack @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c59293853.lua b/official/c59293853.lua index f59f78c9f0..58879fc8d4 100644 --- a/official/c59293853.lua +++ b/official/c59293853.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c59297550.lua b/official/c59297550.lua index e15a581058..83467433e7 100644 --- a/official/c59297550.lua +++ b/official/c59297550.lua @@ -16,13 +16,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsSetCard(0x58) and re:GetHandler():GetCode()~=id + return re:IsMonsterEffect() + and re:GetHandler():IsSetCard(SET_WIND_UP) and re:GetHandler():GetCode()~=id end function s.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_WIND_UP) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c5929801.lua b/official/c5929801.lua index d9b76fd1aa..2da671bbfa 100644 --- a/official/c5929801.lua +++ b/official/c5929801.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.counterfilter(c) - return c:IsSetCard(0xba) + return c:IsSetCard(SET_RAIDRAPTOR) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -37,20 +37,20 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xba) + return not c:IsSetCard(SET_RAIDRAPTOR) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c59305593.lua b/official/c59305593.lua index 7d46042138..9a2091fea3 100644 --- a/official/c59305593.lua +++ b/official/c59305593.lua @@ -14,4 +14,4 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_DECK,LOCATION_DECK) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c59312550.lua b/official/c59312550.lua index 6d927d7555..bfbf4595fa 100644 --- a/official/c59312550.lua +++ b/official/c59312550.lua @@ -1,4 +1,5 @@ --ジュラック・ヴェロー +--Jurrac Velo local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x22} +s.listed_series={SET_JURRAC} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x22) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_JURRAC) and c:IsAttackBelow(1700) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59323650.lua b/official/c59323650.lua index 1dada3c7b7..884aa6bde6 100644 --- a/official/c59323650.lua +++ b/official/c59323650.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/official/c59332125.lua b/official/c59332125.lua index 9701065eb2..8e33387bf0 100644 --- a/official/c59332125.lua +++ b/official/c59332125.lua @@ -7,9 +7,9 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.chkfilter(c,tp,fc) - return c:IsSetCard(0x135,fc,SUMMON_TYPE_FUSION,tp) and c:IsControler(tp) + return c:IsSetCard(SET_IGNISTER,fc,SUMMON_TYPE_FUSION,tp) and c:IsControler(tp) end function s.fcheck(tp,sg,fc,mg) if sg:IsExists(Card.IsControler,1,nil,1-tp) then @@ -17,7 +17,7 @@ function s.fcheck(tp,sg,fc,mg) return true end function s.fextra(e,tp,mg) - if mg:IsExists(Card.IsSetCard,1,nil,0x135,nil,SUMMON_TYPE_FUSION,tp) then + if mg:IsExists(Card.IsSetCard,1,nil,SET_IGNISTER,nil,SUMMON_TYPE_FUSION,tp) then local g=Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsLinkMonster,Card.IsAbleToGrave),tp,0,LOCATION_MZONE,nil) if g and #g>0 then return g,s.fcheck diff --git a/official/c59344077.lua b/official/c59344077.lua index 40a2249f8d..c74a723f53 100644 --- a/official/c59344077.lua +++ b/official/c59344077.lua @@ -1,4 +1,5 @@ --マジック・ドレイン +--Magic Drain local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return rp~=tp and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsChainDisablable(0) then @@ -26,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if sel==0 then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.NegateEffect(0) return end @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59353647.lua b/official/c59353647.lua index bd5b24053d..82631eafb0 100644 --- a/official/c59353647.lua +++ b/official/c59353647.lua @@ -1,10 +1,10 @@ --アマゾネスペット虎獅王 ---Amazoness King Liger +--Amazoness Pet Liger King --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,s.mfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0x4)) + Fusion.AddProcMix(c,true,true,s.mfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_AMAZONESS)) --Cannot attack monsters, except this one local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.mfilter(c,sc,st,tp) - return c:IsSetCard(0x4,sc,st,tp) and c:IsLevelAbove(5) + return c:IsSetCard(SET_AMAZONESS,sc,st,tp) and c:IsLevelAbove(5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -38,14 +38,14 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) end function s.desfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x4) and Duel.GetMZoneCount(tp,c)>0 + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and Duel.GetMZoneCount(tp,c)>0 end function s.spfilter(c,e,tp) - return c:IsRace(RACE_WARRIOR) and c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsRace(RACE_WARRIOR) and c:IsSetCard(SET_AMAZONESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c59364406.lua b/official/c59364406.lua index 98f079d795..24e172a28b 100644 --- a/official/c59364406.lua +++ b/official/c59364406.lua @@ -1,4 +1,5 @@ --灼岩魔獣 +--Burning Beast local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,85359414),true) @@ -34,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59368956.lua b/official/c59368956.lua index 3a4e87d43b..dc55c7c603 100644 --- a/official/c59368956.lua +++ b/official/c59368956.lua @@ -1,4 +1,5 @@ --ブンボーグ002 +--Deskbot 002 local s,id=GetID() function s.initial_effect(c) --search @@ -24,9 +25,9 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.filter(c) - return c:IsSetCard(0xab) and c:IsAbleToHand() + return c:IsSetCard(SET_DESKBOT) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return c:IsRace(RACE_MACHINE) and c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c59371387.lua b/official/c59371387.lua index e69fb36404..13f5931ca1 100644 --- a/official/c59371387.lua +++ b/official/c59371387.lua @@ -1,4 +1,5 @@ --鉄壁の機皇兵 +--The Resolute Meklord Army local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0x6013} +s.listed_series={SET_MEKLORD_ARMY} function s.target(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x6013) -end + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(SET_MEKLORD_ARMY) +end \ No newline at end of file diff --git a/official/c59380081.lua b/official/c59380081.lua index 40d8a746c1..ccbb43e3f5 100644 --- a/official/c59380081.lua +++ b/official/c59380081.lua @@ -1,4 +1,5 @@ --ビッグホーン・マンモス +--Big-Tusked Mammoth local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) -end +end \ No newline at end of file diff --git a/official/c59385322.lua b/official/c59385322.lua index add21d33f4..66baca1328 100644 --- a/official/c59385322.lua +++ b/official/c59385322.lua @@ -1,7 +1,8 @@ --コアバスター +--Core Blaster local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x1d)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_KOAKI_MEIRU)) --destroy local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) @@ -25,7 +26,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} function s.descon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() if ec~=Duel.GetAttacker() and ec~=Duel.GetAttackTarget() then return false end @@ -57,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c59388357.lua b/official/c59388357.lua index 895aef25e6..45451f76df 100644 --- a/official/c59388357.lua +++ b/official/c59388357.lua @@ -1,4 +1,5 @@ --炎王炎環 +--Circle of the Fire Kings local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc1:IsControler(tp) and tc1:IsRelateToEffect(e) and Duel.Destroy(tc1,REASON_EFFECT)>0 and tc2:IsRelateToEffect(e) then Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59419719.lua b/official/c59419719.lua index 7c79319d87..e8f97aef18 100644 --- a/official/c59419719.lua +++ b/official/c59419719.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion summon 1 "Fossil" fusion monster --By banishing appropriate monsters from either GY as material - local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0x14c),matfilter=aux.FALSE,extrafil=s.fextra, + local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_FOSSIL),matfilter=aux.FALSE,extrafil=s.fextra, stage2=s.stage2,extraop=Fusion.BanishMaterial,extratg=s.extratarget}) c:RegisterEffect(e1) --Add this card from GY to hand @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x14c} +s.listed_series={SET_FOSSIL} function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) else return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_ONFIELD,0,nil) @@ -42,7 +42,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.tgval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end @@ -53,10 +53,10 @@ function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tgval(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.thcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x14c) and c:IsType(TYPE_FUSION) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsSetCard(SET_FOSSIL) and c:IsType(TYPE_FUSION) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c5941982.lua b/official/c5941982.lua index 65b0d6aacc..b14d86d4c2 100644 --- a/official/c5941982.lua +++ b/official/c5941982.lua @@ -21,22 +21,22 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x17c} +s.listed_series={SET_SCARECLAW} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,3,false,nil,nil,0x17c) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,3,3,false,nil,nil,0x17c) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,3,false,nil,nil,SET_SCARECLAW) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,3,3,false,nil,nil,SET_SCARECLAW) Duel.Release(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) --Can only Special Summon in Defense Position local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(0,1) e1:SetValue(POS_DEFENSE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c59438930.lua b/official/c59438930.lua index 725541335d..6e2ece295a 100644 --- a/official/c59438930.lua +++ b/official/c59438930.lua @@ -1,4 +1,5 @@ --幽鬼うさぎ +--Ghost Ogre & Snow Rabbit local s,id=GetID() function s.initial_effect(c) --double @@ -6,21 +7,17 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsOnField() and (re:IsActiveType(TYPE_MONSTER) - or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE))) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return re:GetHandler():IsOnField() and (re:IsMonsterEffect() + or (re:IsSpellTrapEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return re:GetHandler():IsDestructable() end @@ -30,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59463312.lua b/official/c59463312.lua index 3d4369d2ff..e47fdb266b 100644 --- a/official/c59463312.lua +++ b/official/c59463312.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) @@ -34,12 +34,12 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_HAND,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_EXTRA_SET_COUNT) Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.filter(c,e,tp) return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -64,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,3)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -73,4 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c59464593.lua b/official/c59464593.lua index e6c9701f82..7bef91b2b0 100644 --- a/official/c59464593.lua +++ b/official/c59464593.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) end s.listed_names={73879377} s.LVnum=10 -s.LVset=0x111 +s.LVset=SET_ARMED_DRAGON function s.spcon(e,c) if c==nil then return true end return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,false,1,true,c,c:GetControler(),nil,false,nil,73879377) @@ -67,4 +67,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59479050.lua b/official/c59479050.lua index 0d738f73e3..8fc1cd4eaf 100644 --- a/official/c59479050.lua +++ b/official/c59479050.lua @@ -1,4 +1,5 @@ --No.71 リバリアン・シャーク +--Number 71: Rebarian Shark local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -25,14 +26,14 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x48,0x95} +s.listed_series={SET_NUMBER,SET_RANK_UP_MAGIC} s.listed_names={id} s.xyz_number=71 function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayCount()>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -55,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSpell() and c:IsSetCard(0x95) + return c:IsSpell() and c:IsSetCard(SET_RANK_UP_MAGIC) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK,0,1,nil) @@ -70,4 +71,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c59482302.lua b/official/c59482302.lua index 90de8e0199..4f114154e8 100644 --- a/official/c59482302.lua +++ b/official/c59482302.lua @@ -1,4 +1,5 @@ --A・ボム +--Ally Salvo local s,id=GetID() function s.initial_effect(c) --special summon @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not g then return end local dg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59490397.lua b/official/c59490397.lua index 40394c38a2..1140e83a15 100644 --- a/official/c59490397.lua +++ b/official/c59490397.lua @@ -1,6 +1,5 @@ --ジェルゴンヌの終焉 --Gergonne's End - local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,8 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x10b} - +s.listed_series={SET_TINDANGLE} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() @@ -53,7 +51,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e:GetOwner():CancelToGrave(false) end function s.filter(c) - return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(0x10b) + return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_TINDANGLE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -64,7 +62,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end function s.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() and c:IsLinkMonster() and c:IsSetCard(0x10b) + return c:GetControler()==e:GetHandlerPlayer() and c:IsLinkMonster() and c:IsSetCard(SET_TINDANGLE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -78,13 +76,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -124,4 +122,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c59494222.lua b/official/c59494222.lua index 3dcbed3a23..12b46b689c 100644 --- a/official/c59494222.lua +++ b/official/c59494222.lua @@ -1,5 +1,5 @@ --墓守の刻印 ---Gravekeeper's Engraving +--Gravekeeper's Inscription --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(function() return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() end) + e1:SetCondition(function() return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) else e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_GRAVE) end) end - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id+op,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id+op,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c59496924.lua b/official/c59496924.lua index a1f2f274ae..57b154f649 100644 --- a/official/c59496924.lua +++ b/official/c59496924.lua @@ -1,4 +1,5 @@ --Kozmo-ランドウォーカー +--Kozmo Landwalker local s,id=GetID() function s.initial_effect(c) --destroy replace @@ -23,13 +24,13 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd2) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_KOZMO) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd2) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_KOZMO) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -51,18 +52,18 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -76,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59504256.lua b/official/c59504256.lua index b5129075d3..f212f54367 100644 --- a/official/c59504256.lua +++ b/official/c59504256.lua @@ -1,4 +1,4 @@ --- +--ティスティナの半神 --Demigod of the Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c59509952.lua b/official/c59509952.lua index ce66be0508..013d10c9b2 100644 --- a/official/c59509952.lua +++ b/official/c59509952.lua @@ -1,4 +1,5 @@ --大天使クリスティア +--Archlord Kristya local s,id=GetID() function s.initial_effect(c) --special summon @@ -68,4 +69,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c59514116.lua b/official/c59514116.lua index 71bce18988..049bca0782 100644 --- a/official/c59514116.lua +++ b/official/c59514116.lua @@ -1,5 +1,5 @@ --黒魔術の秘儀 ---Dark Magic Secrets +--Secrets of Dark Magic --Scripted by edo9300 local s,id=GetID() function s.initial_effect(c) @@ -24,4 +24,4 @@ function s.matcheck(tp,sg,fc) end function s.forcedselection(e,tp,sg,sc) return sg:IsExists(Card.IsCode,1,nil,CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) -end +end \ No newline at end of file diff --git a/official/c59531356.lua b/official/c59531356.lua index a690053e01..6ef62f5ba6 100644 --- a/official/c59531356.lua +++ b/official/c59531356.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59537380.lua b/official/c59537380.lua index b77abe59dd..bf6fb96100 100644 --- a/official/c59537380.lua +++ b/official/c59537380.lua @@ -1,5 +1,5 @@ --守護竜アガーペイン ---Agarpain the Guardragon +--Guardragon Agarpain --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) end -end +end \ No newline at end of file diff --git a/official/c59546528.lua b/official/c59546528.lua index eff0f57432..dd2fd40c6a 100644 --- a/official/c59546528.lua +++ b/official/c59546528.lua @@ -1,4 +1,5 @@ --氷結界の舞姫 +--Dance Princess of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --to hand @@ -15,15 +16,15 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) + return c:IsFaceup() and c:IsSetCard(SET_ICE_BARRIER) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.cfilter2(c) - return c:IsSetCard(0x2f) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() and not c:IsPublic() end function s.filter(c) return c:IsFacedown() and c:IsAbleToHand() @@ -49,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59546797.lua b/official/c59546797.lua index c443405b33..b120589aa7 100644 --- a/official/c59546797.lua +++ b/official/c59546797.lua @@ -1,4 +1,5 @@ --ジュラゲド +--Juragedo local s,id=GetID() function s.initial_effect(c) --spsummon @@ -23,14 +24,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE_STEP + return Duel.IsPhase(PHASE_BATTLE_STEP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,13 +46,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,1000,REASON_EFFECT) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -65,6 +59,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c59560625.lua b/official/c59560625.lua index e20ee32e57..0db2dab951 100644 --- a/official/c59560625.lua +++ b/official/c59560625.lua @@ -65,4 +65,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,Group.FromCards(tc)) end -end +end \ No newline at end of file diff --git a/official/c595626.lua b/official/c595626.lua index a37ba83a24..61fce68528 100644 --- a/official/c595626.lua +++ b/official/c595626.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(function(_,tp) return Duel.GetAttacker():IsControler(1-tp) end) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -31,11 +31,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_MONSTER_REBORN} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -52,8 +47,8 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) - -- Send to GY in the End Phase + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + --Send to GY in the End Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -62,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.descon) e1:SetOperation(s.desop) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -77,29 +72,29 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - -- Add "Monster Reborn" to hand in the End Phase + --Add "Monster Reborn" to hand in the End Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) return c:IsCode(CARD_MONSTER_REBORN) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) diff --git a/official/c59563768.lua b/official/c59563768.lua index ef87515501..176b6be6ee 100644 --- a/official/c59563768.lua +++ b/official/c59563768.lua @@ -1,4 +1,5 @@ --転身テンシーン +--Tenshin local s,id=GetID() function s.initial_effect(c) --atk @@ -15,4 +16,4 @@ function s.filter(c) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*400 -end +end \ No newline at end of file diff --git a/official/c59575539.lua b/official/c59575539.lua index e492d285e0..dc76f80ce8 100644 --- a/official/c59575539.lua +++ b/official/c59575539.lua @@ -1,4 +1,5 @@ --クレボンス +--Krebons local s,id=GetID() function s.initial_effect(c) --be target @@ -6,14 +7,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c59576447.lua b/official/c59576447.lua index 4e1aabaa60..b06a82ba72 100644 --- a/official/c59576447.lua +++ b/official/c59576447.lua @@ -1,4 +1,4 @@ ---Japanese name +--アヌビスの審判 --Verdict of Anubis --Scripted by The Razgriz local s,id=GetID() @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c59577547.lua b/official/c59577547.lua index 9f2980782a..e59de7a854 100644 --- a/official/c59577547.lua +++ b/official/c59577547.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c,atk) - return c:IsMonster() and c:IsSetCard(0x119) and c:GetAttack()~=atk + return c:IsMonster() and c:IsSetCard(SET_SALAMANGREAT) and c:GetAttack()~=atk end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -69,14 +69,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end + function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) @@ -86,5 +83,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c59593925.lua b/official/c59593925.lua index 42bf1e1a91..9a81534728 100644 --- a/official/c59593925.lua +++ b/official/c59593925.lua @@ -1,4 +1,5 @@ --共鳴破 +--Resonant Destruction local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.sdesop) c:RegisterEffect(e3) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end e:GetHandler():SetTurnCounter(0) end function s.cfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x57) + return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(SET_RESONATOR) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO and eg:IsExists(s.cfilter,1,nil) @@ -55,7 +56,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sdescon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sdesop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -65,4 +66,4 @@ function s.sdesop(e,tp,eg,ep,ev,re,r,rp) if ct==2 then Duel.Destroy(c,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c59604521.lua b/official/c59604521.lua index b1683086d3..8072208a1e 100644 --- a/official/c59604521.lua +++ b/official/c59604521.lua @@ -1,5 +1,5 @@ --トリックスター・シャクナージュ ---Trickstar Shakhnaj +--Trickstar Rhodode local s,id=GetID() function s.initial_effect(c) --special summon @@ -24,16 +24,16 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.cfilter(c) - return c:IsSetCard(0xfb) and c:IsDiscardable() + return c:IsSetCard(SET_TRICKSTAR) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0xfb) and c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRICKSTAR) and c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -59,5 +59,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) local ct=eg:FilterCount(s.damfilter,nil,tp) Duel.Damage(1-tp,ct*200,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c596051.lua b/official/c596051.lua index 39644668a8..e79f188dc5 100644 --- a/official/c596051.lua +++ b/official/c596051.lua @@ -9,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -29,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c59616123.lua b/official/c59616123.lua index 7939826e35..509af9f205 100644 --- a/official/c59616123.lua +++ b/official/c59616123.lua @@ -1,4 +1,5 @@ --トラップ・スタン +--Trap Stun local s,id=GetID() function s.initial_effect(c) --activate @@ -16,14 +17,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --disable effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetOperation(s.disoperation) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --disable trap monster local e3=Effect.CreateEffect(c) @@ -31,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTarget(s.distarget) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.distarget(e,c) @@ -39,7 +40,7 @@ function s.distarget(e,c) end function s.disoperation(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then + if tl==LOCATION_SZONE and re:IsTrapEffect() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c59627393.lua b/official/c59627393.lua index c21bf82133..088f8dc455 100644 --- a/official/c59627393.lua +++ b/official/c59627393.lua @@ -1,6 +1,5 @@ --No.105 BK 流星のセスタス --Number 105: Battlin' Boxer Star Cestus - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -20,19 +19,18 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} s.xyz_number=105 - function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(0x84)) - or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(0x84))) + return Duel.IsBattlePhase() and at and ((a:IsControler(tp) and a:IsOnField() and a:IsSetCard(SET_BATTLIN_BOXER)) + or (at:IsControler(tp) and at:IsOnField() and at:IsFaceup() and at:IsSetCard(SET_BATTLIN_BOXER))) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_DAMAGE,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_DAMAGE,0,1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -51,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1,true) --Opponent takes the battle damage instead local e2=Effect.CreateEffect(e:GetHandler()) @@ -60,19 +58,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e2,true) --Negate opponent's battling monster if at:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) at:RegisterEffect(e3) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE_EFFECT) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) at:RegisterEffect(e4) end end \ No newline at end of file diff --git a/official/c59640711.lua b/official/c59640711.lua index 21acb2f690..ca4e3783d1 100644 --- a/official/c59640711.lua +++ b/official/c59640711.lua @@ -1,4 +1,5 @@ --SR電々大公 +--Speedroid Den-Den Daiko Duke local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,26 +8,26 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59642500.lua b/official/c59642500.lua index a75d4bc9b1..9e4cbb290f 100644 --- a/official/c59642500.lua +++ b/official/c59642500.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xa5} +s.listed_series={SET_CHANGE} function s.rdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tp=e:GetHandlerPlayer() @@ -44,7 +44,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() and bc:IsPreviousControler(1-tp) end function s.filter(c) - return c:IsSetCard(0xa5) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() + return c:IsSetCard(SET_CHANGE) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -57,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c59644128.lua b/official/c59644128.lua index 070af04c67..d06ad86f9f 100644 --- a/official/c59644128.lua +++ b/official/c59644128.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2,2) --position local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -29,9 +29,9 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.desfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xfc) + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.posfilter(c) @@ -56,7 +56,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xfc) + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -69,8 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c59644958.lua b/official/c59644958.lua index 0d8aa3e638..93eb734539 100644 --- a/official/c59644958.lua +++ b/official/c59644958.lua @@ -1,4 +1,5 @@ --オーバーレイ・オウル +--Overlay Owl local s,id=GetID() function s.initial_effect(c) --detach @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end end @@ -25,4 +22,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #sg==0 then return end Duel.HintSelection(sg) sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59650656.lua b/official/c59650656.lua index f87ad8b593..4226dd08b4 100644 --- a/official/c59650656.lua +++ b/official/c59650656.lua @@ -1,4 +1,5 @@ --時空混沌渦 +--Tachyon Chaos Hole local s,id=GetID() function s.initial_effect(c) --destroy @@ -21,16 +22,16 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x7b} +s.listed_series={SET_GALAXY} function s.cfilter(c,tp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and (c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE) and Duel.GetTurnPlayer()==1-tp) - and c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) + and (c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE) and Duel.IsTurnPlayer(1-tp)) + and c:IsSetCard(SET_GALAXY) and c:IsType(TYPE_XYZ) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and eg:IsExists(s.cfilter,1,nil,tp) @@ -55,7 +56,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetDrawCount(tp)>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x7b) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GALAXY) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -70,7 +71,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -84,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if _replace_count<=_replace_max and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59687381.lua b/official/c59687381.lua index 130d753169..0568b4d38c 100644 --- a/official/c59687381.lua +++ b/official/c59687381.lua @@ -35,4 +35,4 @@ function s.tgfilter(c,tp) end function s.tgtg(e,c) return c:GetSequence()<5 and c:GetColumnGroup():FilterCount(s.tgfilter,nil,c:GetControler())>0 -end +end \ No newline at end of file diff --git a/official/c59695933.lua b/official/c59695933.lua index a6fa808020..c43b2283c1 100644 --- a/official/c59695933.lua +++ b/official/c59695933.lua @@ -1,4 +1,5 @@ --インターセプト +--Intercept local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.valcheck(e,c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - local res=tc:IsSummonType(SUMMON_TYPE_TRIBUTE) and tc:GetFlagEffect(id)~=0 + local res=tc:IsTributeSummoned() and tc:GetFlagEffect(id)~=0 tc:ResetFlagEffect(id) return res end @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c59699355.lua b/official/c59699355.lua index 8c5187a061..8845020793 100644 --- a/official/c59699355.lua +++ b/official/c59699355.lua @@ -1,4 +1,5 @@ --スクラップ・カウンター +--Scrap Rage local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,10 +11,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d and d:IsDefensePos() and d:IsSetCard(0x24) + return d and d:IsDefensePos() and d:IsSetCard(SET_SCRAP) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() @@ -22,18 +23,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) d:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1) e2:SetOperation(s.desop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) d:RegisterEffect(e2) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c5969957.lua b/official/c5969957.lua index d4a00e02c4..2832f12631 100644 --- a/official/c5969957.lua +++ b/official/c5969957.lua @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -29,7 +29,7 @@ function s.initial_effect(c) end function s.cfilter(c,tp) return c:IsPreviousControler(tp) and c:GetPreviousAttributeOnField()&ATTRIBUTE_DARK == ATTRIBUTE_DARK and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSummonLocation(LOCATION_EXTRA) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + and c:IsSummonLocation(LOCATION_EXTRA) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.cfilter,nil,tp) @@ -41,11 +41,6 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return false end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,oc,e,tp) return not c:IsOriginalCodeRule(oc:GetOriginalCodeRule()) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -54,11 +49,11 @@ function s.tgfilter(c,eg,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=e:GetLabelObject() - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.tgfilter(chkc,g,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.tgfilter(chkc,g,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,g,e,tp) end + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,1,nil,g,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local tg=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,g,e,tp) + local tg=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,1,1,nil,g,e,tp) g:DeleteGroup() Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end @@ -77,4 +72,4 @@ function s.imfilter(c) end function s.imcon(e) return Duel.IsExistingMatchingCard(s.imfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c59707204.lua b/official/c59707204.lua index 039f716bc5..371d0d63b9 100644 --- a/official/c59707204.lua +++ b/official/c59707204.lua @@ -1,7 +1,6 @@ --護神鳥シムルグ --Simorgh, Bird of Protection --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --When normal summoned, return 1 card from opponent's S/T zones to hand @@ -63,7 +62,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -74,7 +73,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.sslimit) Duel.RegisterEffect(e1,tp) end diff --git a/official/c59708927.lua b/official/c59708927.lua index 4f45361874..db7061cd8e 100644 --- a/official/c59708927.lua +++ b/official/c59708927.lua @@ -23,7 +23,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -49,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g:AddCard(e:GetHandler()) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59712426.lua b/official/c59712426.lua index 821c4b3428..7af1a3dea4 100644 --- a/official/c59712426.lua +++ b/official/c59712426.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -31,11 +31,6 @@ function s.initial_effect(c) end s.listed_names={CARD_LIGHT_BARRIER} s.toss_coin=true -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsCode(CARD_LIGHT_BARRIER) and c:IsAbleToHand() end diff --git a/official/c59718521.lua b/official/c59718521.lua index ddbe8704da..d523042c7d 100644 --- a/official/c59718521.lua +++ b/official/c59718521.lua @@ -60,4 +60,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c5972394.lua b/official/c5972394.lua index cc90911ba9..70476fa77b 100644 --- a/official/c5972394.lua +++ b/official/c5972394.lua @@ -1,6 +1,5 @@ --モノマネンド --Mimiclay - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 2 or lower monster from your deck @@ -46,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) g:GetFirst():RegisterEffect(e1,true) end diff --git a/official/c5973663.lua b/official/c5973663.lua index 7df72e5135..27a27351f8 100644 --- a/official/c5973663.lua +++ b/official/c5973663.lua @@ -82,7 +82,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(400) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -132,4 +132,4 @@ function s.op3(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59741415.lua b/official/c59741415.lua index 757e810572..08209d2023 100644 --- a/official/c59741415.lua +++ b/official/c59741415.lua @@ -23,18 +23,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.filter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_MACHINE) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x36) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_MACHINA) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -43,14 +43,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) or not tc:IsFaceup() then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.Destroy(tc,REASON_EFFECT) end @@ -61,21 +61,21 @@ end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return (chkc:IsLocation(LOCATION_REMOVED) or chkc:IsLocation(LOCATION_GRAVE)) and chkc:IsControler(tp) and s.tdfilter(chkc) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) - and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,nil) end + and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,3,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,3,3,nil) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,3,3,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59744639.lua b/official/c59744639.lua index 501d01e79a..0e6e076f8a 100644 --- a/official/c59744639.lua +++ b/official/c59744639.lua @@ -1,4 +1,5 @@ --イタクァの暴風 +--Windstorm of Etaqua local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_POSITION) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -22,4 +23,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) -end +end \ No newline at end of file diff --git a/official/c5975022.lua b/official/c5975022.lua index f3b0f7c24f..91ed68ccea 100644 --- a/official/c5975022.lua +++ b/official/c5975022.lua @@ -1,4 +1,5 @@ --剣闘獣ムルミロ +--Gladiator Beast Murmillo local s,id=GetID() function s.initial_effect(c) --destroy @@ -17,16 +18,16 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsFaceup() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -41,26 +42,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,105,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,105,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,105,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c59762399.lua b/official/c59762399.lua index 444fcff67c..3f0ca80fea 100644 --- a/official/c59762399.lua +++ b/official/c59762399.lua @@ -1,4 +1,5 @@ --EMオッドアイズ・ライトフェニックス +--Performapal Odd-Eyes Light Phoenix local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -23,13 +24,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) - e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() return at:GetControler()~=tp and Duel.GetAttackTarget()==nil @@ -50,15 +51,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -75,6 +69,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c59765225.lua b/official/c59765225.lua index f872b42994..a0491acd4c 100644 --- a/official/c59765225.lua +++ b/official/c59765225.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro Summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO),1,1,Synchro.NonTunerEx(Card.IsSetCard,0xff),1,1) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_CLEAR_WING),1,1) c:EnableReviveLimit() --Increase ATK local e1=Effect.CreateEffect(c) @@ -42,15 +42,15 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.synchro_tuner_required=1 -s.listed_series={0xff} +s.listed_series={SET_CLEAR_WING} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) + return re:IsMonsterEffect() and rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and rc:IsControler(1-tp) - and c:UpdateAttack(rc:GetBaseAttack(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)==rc:GetBaseAttack() then + and c:UpdateAttack(rc:GetBaseAttack(),RESETS_STANDARD_PHASE_END)==rc:GetBaseAttack() then --Unaffected local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,3)) @@ -58,19 +58,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.immval) c:RegisterEffect(e1) end end function s.immval(e,te) - return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() + return te:GetOwner()~=e:GetHandler() and te:IsMonsterEffect() and te:IsActivated() and te:GetOwner():GetControler()==1-e:GetHandler():GetControler() end --Negate Spell/Trap or effect function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + return re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -87,7 +87,7 @@ end --Search function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.thfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsMonster() and c:IsAbleToHand() @@ -103,4 +103,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c59771339.lua b/official/c59771339.lua index 7f296f41e4..d6409a3dff 100644 --- a/official/c59771339.lua +++ b/official/c59771339.lua @@ -29,18 +29,18 @@ function s.initial_effect(c) end s.material={63977008} s.listed_names={63977008} -s.listed_series={0x43} -s.material_setcode=0x1017 +s.listed_series={SET_JUNK} +s.material_setcode=SET_SYNCHRON function s.tfilter(c,lc,stype,tp) return c:IsSummonCode(lc,stype,tp,63977008) or c:IsHasEffect(20932152) end function s.cfilter(c) - return c:IsSetCard(0x43) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_JUNK) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) e:SetLabel(g:GetFirst():GetAttack()) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -57,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -74,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d and d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59778096.lua b/official/c59778096.lua index 9aaff6d167..13f63c1ad1 100644 --- a/official/c59778096.lua +++ b/official/c59778096.lua @@ -1,5 +1,5 @@ --星遺物の選託 ---World Legacy Choice +--World Legacy Bestowal --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetTarget(s.target) c:RegisterEffect(e1) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.cfilter(c) - return c:IsSetCard(0xfe) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsAbleToRemoveAsCost() end function s.thfilter(c) return c:IsRace(RACE_CYBERSE) and c:IsAbleToHand() @@ -57,4 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c59784896.lua b/official/c59784896.lua index 369e280f14..b532d3c47d 100644 --- a/official/c59784896.lua +++ b/official/c59784896.lua @@ -1,4 +1,5 @@ --ダークゼブラ +--Dark Zebra local s,id=GetID() function s.initial_effect(c) --to defense @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_POSITION) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c59785059.lua b/official/c59785059.lua index 120a5476b1..b54e000238 100644 --- a/official/c59785059.lua +++ b/official/c59785059.lua @@ -1,4 +1,5 @@ --イグナイト・スティンガー +--Igknight Champion local s,id=GetID() function s.initial_effect(c) --spsummon @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) end function s.desfilter2(c,e) return s.desfilter(c) and c:IsCanBeEffectTarget(e) @@ -48,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) and c:IsAbleToHand() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) and chkc~=e:GetHandler() end @@ -64,6 +65,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59789370.lua b/official/c59789370.lua index 9e557c4992..17ae385c2d 100644 --- a/official/c59789370.lua +++ b/official/c59789370.lua @@ -1,5 +1,5 @@ --機巧蛙-伊服岐雹荒神 ---Gizmek Ibuki +--Gizmek Arakami, the Hailbringer Hog --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -72,7 +72,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tg:GetLevel()*100) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -80,4 +80,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c59793705.lua b/official/c59793705.lua index b30b4a7490..c8d0c93fe3 100644 --- a/official/c59793705.lua +++ b/official/c59793705.lua @@ -1,8 +1,9 @@ --E・HERO エッジマン +--Elemental HERO Bladedge local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c59797187.lua b/official/c59797187.lua index f61618bff6..8d7144f80a 100644 --- a/official/c59797187.lua +++ b/official/c59797187.lua @@ -1,4 +1,5 @@ --ゴロゴル +--Gonogo local s,id=GetID() function s.initial_effect(c) --pos @@ -21,4 +22,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() and bc:IsFaceup() then Duel.ChangePosition(bc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c59808784.lua b/official/c59808784.lua index e2451ca1f2..d03b402415 100644 --- a/official/c59808784.lua +++ b/official/c59808784.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -40,7 +40,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -78,9 +78,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -94,4 +94,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoHand(tc,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59811955.lua b/official/c59811955.lua index a05783f517..f2c531348b 100644 --- a/official/c59811955.lua +++ b/official/c59811955.lua @@ -1,4 +1,5 @@ --古代の整備場 +--Ancient Gear Workshop local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.filter(c) - return c:IsSetCard(0x7) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ANCIENT_GEAR) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c59820352.lua b/official/c59820352.lua index b566128dd3..b1c595d423 100644 --- a/official/c59820352.lua +++ b/official/c59820352.lua @@ -1,5 +1,6 @@ --大地讃頌 +--Earth Chant local s,id=GetID() function s.initial_effect(c) Ritual.AddProcEqual(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH)) -end +end \ No newline at end of file diff --git a/official/c59822133.lua b/official/c59822133.lua index a4872c8281..343cc6e3de 100644 --- a/official/c59822133.lua +++ b/official/c59822133.lua @@ -1,8 +1,9 @@ --青眼の精霊龍 +--Blue-Eyes Spirit Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0xdd),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_BLUE_EYES),1,99) c:EnableReviveLimit() --special summon limit local e1=Effect.CreateEffect(c) @@ -34,12 +35,12 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} s.listed_names={id} function s.negcon(e,tp,eg,ep,ev,re,r,rp) return re:GetActivateLocation()==LOCATION_GRAVE and Duel.IsChainNegatable(ev) @@ -52,11 +53,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 @@ -72,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -80,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetLabel(fid) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCondition(s.descon) e1:SetOperation(s.desop) Duel.RegisterEffect(e1,tp) @@ -93,4 +90,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c59843383.lua b/official/c59843383.lua index 0ada6b3c74..338ee82767 100644 --- a/official/c59843383.lua +++ b/official/c59843383.lua @@ -1,4 +1,5 @@ --炎神-不知火 +--Shiranui Sunsaga local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -24,20 +25,20 @@ function s.initial_effect(c) e2:SetValue(s.repval) c:RegisterEffect(e2) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} function s.tdfilter(c) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) if #g==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,1,#g,nil) - local ct=Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + local ct=Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) if ct>0 and #dg>=ct and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() @@ -48,22 +49,22 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_ZOMBIE) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.rmfilter(c) - return c:IsSetCard(0xd9) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SHIRANUI) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT|REASON_REPLACE) return true end return false end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c59851535.lua b/official/c59851535.lua index e197c80a70..3b785fc9b5 100644 --- a/official/c59851535.lua +++ b/official/c59851535.lua @@ -26,15 +26,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0x128) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 @@ -53,7 +53,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end function s.thfilter(c) - return c:IsSetCard(0x128) and c:IsAbleToHand() + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end diff --git a/official/c59859086.lua b/official/c59859086.lua index e09c905cd9..ffdb4dc356 100644 --- a/official/c59859086.lua +++ b/official/c59859086.lua @@ -36,12 +36,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() end @@ -52,10 +52,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_CYBERSE) -end - +end \ No newline at end of file diff --git a/official/c598988.lua b/official/c598988.lua index 60ef3ec506..f5c426b80d 100644 --- a/official/c598988.lua +++ b/official/c598988.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() c:SetUniqueOnField(1,1,aux.MaleficUniqueFilter(c),LOCATION_MZONE) - aux.AddMaleficSummonProcedure(c,79856792,LOCATION_HAND+LOCATION_DECK) + aux.AddMaleficSummonProcedure(c,79856792,LOCATION_HAND|LOCATION_DECK) --selfdes local e7=Effect.CreateEffect(c) e7:SetType(EFFECT_TYPE_SINGLE) @@ -35,4 +35,4 @@ function s.descon(e) end function s.antarget(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c5990062.lua b/official/c5990062.lua index 9ac9950cac..49c29e540a 100644 --- a/official/c5990062.lua +++ b/official/c5990062.lua @@ -1,4 +1,5 @@ --大逆転クイズ +--Reversal Quiz local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.cfilter(c) return not c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_ONFIELD,0) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,0) g:RemoveCard(e:GetHandler()) if chk==0 then return #g>0 and not g:IsExists(s.cfilter,1,nil) end Duel.SendtoGrave(g,REASON_COST) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,lp1) end Duel.ShuffleDeck(tp) -end +end \ No newline at end of file diff --git a/official/c59900655.lua b/official/c59900655.lua index 6792a3872c..86b07911f2 100644 --- a/official/c59900655.lua +++ b/official/c59900655.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function (_,tp) return Duel.IsTurnPlayer(1-tp) end) diff --git a/official/c59901153.lua b/official/c59901153.lua index 0524851de0..9fd58d40d8 100644 --- a/official/c59901153.lua +++ b/official/c59901153.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.thcon) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c59905358.lua b/official/c59905358.lua index 920f831d1e..ba9fd7310e 100644 --- a/official/c59905358.lua +++ b/official/c59905358.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local ex=Duel.GetOperationInfo(ev,CATEGORY_DICE) return ex end @@ -29,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59907935.lua b/official/c59907935.lua index 1d72872869..7a77deab47 100644 --- a/official/c59907935.lua +++ b/official/c59907935.lua @@ -1,4 +1,5 @@ --サイバーデーモン +--Cyber Archfiend local s,id=GetID() function s.initial_effect(c) --draw @@ -39,7 +40,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Draw(p,d,REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -50,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59911557.lua b/official/c59911557.lua index fabfe4827f..0ba06de148 100644 --- a/official/c59911557.lua +++ b/official/c59911557.lua @@ -1,4 +1,5 @@ --ゴゴゴゴラム +--Gogogo Goram local s,id=GetID() function s.initial_effect(c) --pos change @@ -26,7 +27,7 @@ function s.initial_effect(c) e4:SetOperation(s.tgop) c:RegisterEffect(e4) end -s.listed_series={0x59} +s.listed_series={SET_GOGOGO} function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -38,7 +39,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.tgfilter(c) - return c:IsSetCard(0x59) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_GOGOGO) and c:IsMonster() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -50,4 +51,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59913418.lua b/official/c59913418.lua index 3f29efaa7e..3bbb041df4 100644 --- a/official/c59913418.lua +++ b/official/c59913418.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetValue(72426662) c:RegisterEffect(e1) --Prevent battle destruction @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.descost) + e3:SetCost(Cost.PayLP(2000)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -45,7 +45,7 @@ end s.listed_names={32828635,72426662} function s.indcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsRitualSummoned() end function s.indtg(e,c) return c:IsType(TYPE_RITUAL) @@ -53,10 +53,6 @@ end function s.mfilter1(c) return not c:IsType(TYPE_RITUAL) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) @@ -83,4 +79,4 @@ function s.costchange(e,re,rp,val) else return val end -end +end \ No newline at end of file diff --git a/official/c59919307.lua b/official/c59919307.lua index 5670ff6421..71851446ea 100644 --- a/official/c59919307.lua +++ b/official/c59919307.lua @@ -1,4 +1,5 @@ --戦線復帰 +--Back to the Front local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c59934749.lua b/official/c59934749.lua index cbfbd5f2c0..55b76b500f 100644 --- a/official/c59934749.lua +++ b/official/c59934749.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() @@ -53,7 +53,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -71,7 +71,7 @@ function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) end function s.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) + return re:GetHandler():IsCode(e:GetLabel()) and re:IsMonsterEffect() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) diff --git a/official/c59951714.lua b/official/c59951714.lua index 48b0be1523..e2b0816873 100644 --- a/official/c59951714.lua +++ b/official/c59951714.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetCost(s.spcost) e3:SetTarget(s.sptg) @@ -33,7 +33,7 @@ end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if r==REASON_SUMMON then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -48,7 +48,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) --lizard check @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c59957503.lua b/official/c59957503.lua index 99ec401adc..08c207ef26 100644 --- a/official/c59957503.lua +++ b/official/c59957503.lua @@ -1,4 +1,5 @@ --キャッシュバック +--Cash Back local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==s[0] - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,6 +41,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ec=re:GetHandler() if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then ec:CancelToGrave() - Duel.SendtoDeck(ec,nil,2,REASON_EFFECT) + Duel.SendtoDeck(ec,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c59965151.lua b/official/c59965151.lua index 7a9fb76213..0420b41dc2 100644 --- a/official/c59965151.lua +++ b/official/c59965151.lua @@ -1,4 +1,5 @@ --デッド・ガードナー +--Ghost Gardna local s,id=GetID() function s.initial_effect(c) --change battle target @@ -52,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c59969392.lua b/official/c59969392.lua index c853f6b2a4..0b59da8339 100644 --- a/official/c59969392.lua +++ b/official/c59969392.lua @@ -16,4 +16,4 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.material={33420078} -s.listed_names={33420078} +s.listed_names={33420078} \ No newline at end of file diff --git a/official/c5997110.lua b/official/c5997110.lua index b847938e40..6e913fa041 100644 --- a/official/c5997110.lua +++ b/official/c5997110.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(aux.DiscardCost(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,true)) + e2:SetCost(Cost.Discard(function(c) return c:IsSetCard(SET_DD) and c:IsMonster() end,true)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c59975920.lua b/official/c59975920.lua index 33744312c8..cf5e114284 100644 --- a/official/c59975920.lua +++ b/official/c59975920.lua @@ -1,6 +1,5 @@ --超量士レッドレイヤー --Super Quantum Red Layer - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -38,16 +37,15 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xdc} +s.listed_series={SET_SUPER_QUANT} s.listed_names={id} - function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.thfilter(c) - return c:IsSetCard(0xdc) and c:IsAbleToHand() + return c:IsSetCard(SET_SUPER_QUANT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -63,7 +61,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c,e,tp) - return c:IsSetCard(0xdc) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPER_QUANT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -82,7 +80,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c5998840.lua b/official/c5998840.lua index d7568d830e..54ff924957 100644 --- a/official/c5998840.lua +++ b/official/c5998840.lua @@ -1,4 +1,5 @@ --XX-セイバー ボガーナイト +--XX-Saber Boggart Knight local s,id=GetID() function s.initial_effect(c) --summon success @@ -20,10 +21,10 @@ function s.initial_effect(c) end function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x100d) + return not c:IsSetCard(SET_X_SABER) end function s.filter(c,e,tp) - return c:GetLevel()<=4 and c:IsSetCard(0x100d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()<=4 and c:IsSetCard(SET_X_SABER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -37,4 +38,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60004971.lua b/official/c60004971.lua index 5c313930a1..5039bc7e8f 100644 --- a/official/c60004971.lua +++ b/official/c60004971.lua @@ -1,7 +1,8 @@ --ドラグニティの神槍 +--Dragunity Divine Lance local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x29)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGUNITY)) --atk local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) @@ -24,15 +25,15 @@ function s.initial_effect(c) e5:SetOperation(s.eqop) c:RegisterEffect(e5) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.atkval(e,c) return c:GetLevel()*100 end function s.efilter(e,re) - return re:IsActiveType(TYPE_TRAP) + return re:IsTrapEffect() end function s.eqfilter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_TUNER) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_TUNER) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -51,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit2) e1:SetLabelObject(ec) tc:RegisterEffect(e1) @@ -59,4 +60,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit2(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c60018643.lua b/official/c60018643.lua index 225e017816..e92ae944e0 100644 --- a/official/c60018643.lua +++ b/official/c60018643.lua @@ -43,10 +43,10 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.thcfilter(c,e,tp) local attr=c:GetAttribute() - return c:IsSetCard(0x101) and c:IsControler(tp) + return c:IsSetCard(SET_CODE_TALKER) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_EXTRA) and s.attr_list[tp]&attr==0 and c:IsCanBeEffectTarget(e) @@ -97,7 +97,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) s.attr_list[tp]=s.attr_list[tp]|att end for _,str in aux.GetAttributeStrings(att) do - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,str) + c:RegisterFlagEffect(0,RESETS_STANDARD_PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,str) end end local e1=Effect.CreateEffect(e:GetHandler()) @@ -106,7 +106,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) --lizard check diff --git a/official/c60033398.lua b/official/c60033398.lua index 005a732d96..5e746a4cf5 100644 --- a/official/c60033398.lua +++ b/official/c60033398.lua @@ -38,14 +38,14 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local bc=Duel.GetAttackTarget() if not bc then return false end if tc:IsControler(1-tp) then bc,tc=tc,bc end e:SetLabelObject(bc) - return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x137) + return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(SET_ANCIENT_WARRIORS) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,16 +62,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) end end end function s.tg(e,c) - return c:IsSetCard(0x137) and c~=e:GetHandler() + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c~=e:GetHandler() end function s.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -88,4 +88,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60037599.lua b/official/c60037599.lua index 40a20f659b..0ec7b43949 100644 --- a/official/c60037599.lua +++ b/official/c60037599.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(Drytron.TributeCost) e2:SetTarget(s.sptg) @@ -25,10 +25,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} s.listed_names={id} function s.spconlimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(0x151) + return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(SET_DRYTRON) end function s.sumfilter(c) return not c:IsSummonableCard() @@ -40,7 +40,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x151) and c:IsMonster() and c:IsAttack(2000) + return c:IsSetCard(SET_DRYTRON) and c:IsMonster() and c:IsAttack(2000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -54,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c60071928.lua b/official/c60071928.lua index beeeb167c5..327854ccea 100644 --- a/official/c60071928.lua +++ b/official/c60071928.lua @@ -25,15 +25,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c6007213.lua b/official/c6007213.lua index ee3d876186..fa7b3e7b49 100644 --- a/official/c6007213.lua +++ b/official/c6007213.lua @@ -83,7 +83,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.atkfilter(c) - return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS + return c:IsContinuousTrap() end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*1000 @@ -104,4 +104,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60080151.lua b/official/c60080151.lua index f2931bf8cb..27e0f6b799 100644 --- a/official/c60080151.lua +++ b/official/c60080151.lua @@ -1,4 +1,5 @@ --好敵手の記憶 +--Memory of an Adversary local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local tc=Duel.GetAttacker() @@ -33,9 +34,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.spop) e1:SetLabelObject(tc) e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end end @@ -47,4 +48,4 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.SpecialSummon(e:GetLabelObject(),0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c60082869.lua b/official/c60082869.lua index 9fc53460d1..81d6c494f2 100644 --- a/official/c60082869.lua +++ b/official/c60082869.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,sg:GetFirst(),tp,false) end end -end +end \ No newline at end of file diff --git a/official/c60095092.lua b/official/c60095092.lua index ffaaeda89c..ada89870d8 100644 --- a/official/c60095092.lua +++ b/official/c60095092.lua @@ -1,5 +1,5 @@ --VV-ソロアクティベート ---Vaylantz Vakening - Solo Activation +--Vaylantz Wakening - Solo Activation --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -20,14 +20,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function() return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mmvtg) e2:SetOperation(s.mmvop) c:RegisterEffect(e2) end -s.listed_series={0x17e} +s.listed_series={SET_VAYLANTZ} function s.pzfilter(c) - return c:IsSetCard(0x17e) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return c:IsSetCard(SET_VAYLANTZ) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.pztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.pzfilter,tp,LOCATION_DECK,0,1,nil) @@ -42,7 +42,7 @@ function s.pzop(e,tp,eg,ep,ev,re,r,rp) end end function s.mmvfilter(c) - return c:IsFaceup() and c:IsSetCard(0x17e) and c:CheckAdjacent() + return c:IsFaceup() and c:IsSetCard(SET_VAYLANTZ) and c:CheckAdjacent() end function s.mmvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.mmvfilter(chkc) end diff --git a/official/c60102563.lua b/official/c60102563.lua index bc39a6136c..6618a5e7fa 100644 --- a/official/c60102563.lua +++ b/official/c60102563.lua @@ -1,4 +1,5 @@ --本気ギレパンダ +--Maji-Gire Panda local s,id=GetID() function s.initial_effect(c) --atkup @@ -29,8 +30,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c60110982.lua b/official/c60110982.lua index b0ce1dcbdc..f43e32b158 100644 --- a/official/c60110982.lua +++ b/official/c60110982.lua @@ -54,7 +54,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,4 +76,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sg,0,p,p,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c601193.lua b/official/c601193.lua index 274e061248..8dd1d23c2f 100644 --- a/official/c601193.lua +++ b/official/c601193.lua @@ -31,30 +31,30 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.filter(c) - return c:IsSetCard(0xb1) and c:IsDiscardable() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsDiscardable() end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end - if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -65,4 +65,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60158866.lua b/official/c60158866.lua index 1b7e437e1a..0336940924 100644 --- a/official/c60158866.lua +++ b/official/c60158866.lua @@ -1,5 +1,5 @@ --不朽の七皇 ---Eternity of the Seven Emperors +--Seventh Eternity --Scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.tgfilter(c,tp) local ovct=c:GetOverlayCount() return c:IsFaceup() and c:IsType(TYPE_XYZ) and (s.nmbrfilter(c) or c:GetOverlayGroup():IsExists(s.nmbrfilter,1,nil)) @@ -28,7 +28,7 @@ function s.tgfilter(c,tp) end function s.nmbrfilter(c) local no=c.xyz_number - return c:IsSetCard(0x48) and no and no>=101 and no<=107 + return c:IsSetCard(SET_NUMBER) and no and no>=101 and no<=107 end function s.disfilter(c,atk) return c:IsNegatableMonster() and c:IsAttackBelow(atk) @@ -61,7 +61,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -79,13 +79,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) ngc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) ngc:RegisterEffect(e2) elseif op==2 then --Detach all materials from the target @@ -101,4 +101,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c60161788.lua b/official/c60161788.lua index e14e28102f..3280a566a6 100644 --- a/official/c60161788.lua +++ b/official/c60161788.lua @@ -1,4 +1,5 @@ --氷結界の番人ブリズド +--Blizzed, Defender of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --draw @@ -25,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60162470.lua b/official/c60162470.lua index 2b5cf54b50..027de7a1a2 100644 --- a/official/c60162470.lua +++ b/official/c60162470.lua @@ -60,7 +60,7 @@ function s.atkval(e,c) return val end function s.atkfilter(c,tc) - return c:IsLinkMonster() and c:IsSummonType(SUMMON_TYPE_LINK) and c:HasFlagEffect(id) + return c:IsLinkMonster() and c:IsLinkSummoned() and c:HasFlagEffect(id) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.atkfilter,1,nil) diff --git a/official/c60168186.lua b/official/c60168186.lua index 750eabcd65..f088673558 100644 --- a/official/c60168186.lua +++ b/official/c60168186.lua @@ -62,7 +62,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,4)) e6:SetCategory(CATEGORY_DAMAGE) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_STANDBY) + e6:SetCode(EVENT_PHASE|PHASE_STANDBY) e6:SetRange(LOCATION_SZONE) e6:SetCountLimit(1) e6:SetCondition(s.damcon) @@ -70,9 +70,9 @@ function s.initial_effect(c) e6:SetOperation(s.damop) c:RegisterEffect(e6) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} function s.cfilter(c,tp,typ) - return c:IsFaceup() and c:IsType(typ) and c:IsSetCard(0x10af) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) + return c:IsFaceup() and c:IsType(typ) and c:IsSetCard(SET_DDD) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp,e:GetLabel()) @@ -89,7 +89,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end function s.filter(c,tp,typ) - return c:IsType(typ) and c:IsSetCard(0x10af) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) + return c:IsType(typ) and c:IsSetCard(SET_DDD) and c:IsControler(tp) and c:IsSummonLocation(LOCATION_EXTRA) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -100,7 +100,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -108,14 +108,14 @@ function s.rmfilter(c) return c:IsAbleToRemove() and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,false,true)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end @@ -129,11 +129,11 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.Draw(tp,1,REASON_EFFECT)~=0 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -145,4 +145,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60176682.lua b/official/c60176682.lua index e2db0e5d02..3385e74198 100644 --- a/official/c60176682.lua +++ b/official/c60176682.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c60181553.lua b/official/c60181553.lua index 09c3bd666f..968952263c 100644 --- a/official/c60181553.lua +++ b/official/c60181553.lua @@ -1,4 +1,5 @@ --巨星のミラ +--Mira the Star-Bearer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -33,4 +34,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60187739.lua b/official/c60187739.lua index 63e4b4106a..10c215eb84 100644 --- a/official/c60187739.lua +++ b/official/c60187739.lua @@ -1,4 +1,5 @@ --ワンショット・ブースター +--Turbo Booster local s,id=GetID() function s.initial_effect(c) --special summon @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -44,10 +45,6 @@ end function s.filter(c) return c:IsFaceup() and c:GetBattledGroupCount()~=0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end @@ -60,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60195675.lua b/official/c60195675.lua index 640ac30140..fee1aa0390 100644 --- a/official/c60195675.lua +++ b/official/c60195675.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.atkop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) --Special Summon this card from the GY in Defense Position diff --git a/official/c60202749.lua b/official/c60202749.lua index bc6eb62899..92c4fa2daf 100644 --- a/official/c60202749.lua +++ b/official/c60202749.lua @@ -1,4 +1,5 @@ --アビスフィアー +--Abyss-sphere local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_MAIN_END) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -26,9 +27,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.filter(c,e,tp) - return c:IsSetCard(0x74) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MERMAIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -41,12 +42,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCountLimit(1) e1:SetCondition(s.sdescon) e1:SetOperation(s.sdesop) - if Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()~=tp then + if Duel.IsPhase(PHASE_END) and Duel.IsTurnPlayer(1-tp) then e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,2) else e1:SetLabel(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) end e:GetHandler():RegisterEffect(e1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) @@ -65,7 +66,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1,true) end @@ -74,17 +75,17 @@ function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end function s.sdescon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(1-tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.sdesop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6021033.lua b/official/c6021033.lua index c437f9a3f9..de05537dd4 100644 --- a/official/c6021033.lua +++ b/official/c6021033.lua @@ -44,8 +44,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsFacedown() or not c:IsRelateToEffect(e) then return end c:SetCardTarget(tc) e:SetLabelObject(tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) - c:RegisterFlagEffect(id,RESET_EVENT+0x1020000,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESET_TURN_SET|RESET_TOFIELD,0,0) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -53,4 +53,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:GetFlagEffect(id)~=0 and e:GetHandler():GetFlagEffect(id)~=0 then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60222213.lua b/official/c60222213.lua index fb0cefde63..724c8dcf50 100644 --- a/official/c60222213.lua +++ b/official/c60222213.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e6:SetCategory(CATEGORY_DAMAGE) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.damcon) @@ -51,7 +51,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetProperty(EFFECT_FLAG_REPEAT) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) @@ -86,7 +86,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -95,6 +95,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAbleToDeck() then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60222582.lua b/official/c60222582.lua index 20f4ca21d7..b5acda6302 100644 --- a/official/c60222582.lua +++ b/official/c60222582.lua @@ -1,4 +1,5 @@ --銀河遠征 +--Galaxy Expedition local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} function s.cfilter(c) - return c:IsFaceup() and c:IsLevelAbove(5) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) + return c:IsFaceup() and c:IsLevelAbove(5) and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsLevelAbove(5) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelAbove(5) and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c6022371.lua b/official/c6022371.lua index 6667e7ed1c..198c2b5bf0 100644 --- a/official/c6022371.lua +++ b/official/c6022371.lua @@ -1,6 +1,5 @@ --ウォーター・ドラゴン-クラスター --Water Dragon Cluster - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -29,16 +28,15 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_names={85066822} - function s.splimit(e,se,sp,st) local sc=se:GetHandler() - return sc and sc:IsType(TYPE_SPELL+TYPE_TRAP) and sc:IsSetCard(0x100) + return sc and sc:IsSpellTrap() and sc:IsSetCard(SET_BONDING) end function s.atkfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) @@ -55,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot activate their effects local e2=Effect.CreateEffect(e:GetHandler()) @@ -64,28 +62,24 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_TRIGGER) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(85066822) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,nil,e,tp) + if chk==0 then return ft>1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,2,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,2,2,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,2,2,nil,e,tp) if #g==2 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP_DEFENSE) end diff --git a/official/c60226558.lua b/official/c60226558.lua index d77ae8b3b3..9fd005a543 100644 --- a/official/c60226558.lua +++ b/official/c60226558.lua @@ -2,9 +2,9 @@ --Nephe Shaddoll Fusion local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x9d),nil,nil,s.target,s.operation) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL),nil,nil,s.target,s.operation) --spsummon - local params = {aux.FilterBoolFunction(Card.IsSetCard,0x9d),nil,nil,nil,s.forcedmat} + local params = {aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL),nil,nil,nil,s.forcedmat} local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) @@ -15,7 +15,7 @@ function s.initial_effect(c) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.target(e,tp,eg,ep,ev,re,r,rp,tc,chk) if chk==0 then return true end local att=tc:AnnounceAnotherAttribute(tp) @@ -30,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) c:SetHint(CHINT_ATTRIBUTE,att) end @@ -40,4 +40,4 @@ function s.fcond(e,tp,eg,ep,ev,re,r,rp) end function s.forcedmat(e,tp,eg,ep,ev,re,r,rp,chk) return e:GetHandler():GetEquipTarget() -end +end \ No newline at end of file diff --git a/official/c60228941.lua b/official/c60228941.lua index efe78d1c1b..dbe960b08e 100644 --- a/official/c60228941.lua +++ b/official/c60228941.lua @@ -1,4 +1,5 @@ --暗黒界の術師 スノウ +--Snoww, Unlight of Dark World local s,id=GetID() function s.initial_effect(c) --search @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} function s.condition(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter2(chkc,e,tp) end @@ -33,7 +34,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end function s.filter1(c) - return c:IsSetCard(0x6) and c:IsAbleToHand() + return c:IsSetCard(SET_DARK_WORLD) and c:IsAbleToHand() end function s.filter2(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c60229110.lua b/official/c60229110.lua index fb3b5f27a0..76bdf4b23c 100644 --- a/official/c60229110.lua +++ b/official/c60229110.lua @@ -1,4 +1,5 @@ --地帝グランマーグ +--Granmarg the Rock Monarch local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFacedown() end @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60234913.lua b/official/c60234913.lua index 64424f2b9f..902636842e 100644 --- a/official/c60234913.lua +++ b/official/c60234913.lua @@ -1,4 +1,5 @@ --救世の儀式 +--Ritual of Grace local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,61757117) @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(s.utcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.uttg) e1:SetOperation(s.utop) c:RegisterEffect(e1) end -function s.utcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_RITUAL) end @@ -33,7 +30,7 @@ function s.utop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c60237530.lua b/official/c60237530.lua index f92409b6a8..69ae1e656b 100644 --- a/official/c60237530.lua +++ b/official/c60237530.lua @@ -1,13 +1,12 @@ --双天拳 鎧阿 --Dual Avatar Fists - Armored Ah-Gyo --Scripted by edo9300 - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcFunRep(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14e),2,true) + Fusion.AddProcFunRep(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DUAL_AVATAR),2,true) --Destroy 1 of opponent's attack position monsters local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,9 +32,8 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.material_setcode={0x14e} -s.listed_series={0x14e} - +s.material_setcode={SET_DUAL_AVATAR} +s.listed_series={SET_DUAL_AVATAR} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsDirectAttacked() end local e1=Effect.CreateEffect(e:GetHandler()) @@ -44,7 +42,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -61,11 +59,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.atktg(e,c) - return c:IsSetCard(0x14e) and c:IsType(TYPE_FUSION) + return c:IsSetCard(SET_DUAL_AVATAR) and c:IsType(TYPE_FUSION) end function s.atkfil(c) - return c:IsFaceup() and c:IsSetCard(0x14e) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_EFFECT) + return c:IsFaceup() and c:IsSetCard(SET_DUAL_AVATAR) and c:IsFusionSummoned() and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_EFFECT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.atkfil,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c60258960.lua b/official/c60258960.lua index 62104a732e..740ce3aef7 100644 --- a/official/c60258960.lua +++ b/official/c60258960.lua @@ -32,7 +32,7 @@ end s.counter_place_list={COUNTER_SPELL} s.listed_names={33031674} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -49,4 +49,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60279710.lua b/official/c60279710.lua index a30aa39ed9..b3cd48efd5 100644 --- a/official/c60279710.lua +++ b/official/c60279710.lua @@ -52,13 +52,13 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE_EFFECT) e1:SetValue(RESET_TURN_SET) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -72,14 +72,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60283232.lua b/official/c60283232.lua index 9095f017fa..9ec7995841 100644 --- a/official/c60283232.lua +++ b/official/c60283232.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.lvltg) e3:SetOperation(s.lvlop) c:RegisterEffect(e3) diff --git a/official/c60292055.lua b/official/c60292055.lua index c32a84ba71..f4a9b4caff 100644 --- a/official/c60292055.lua +++ b/official/c60292055.lua @@ -1,7 +1,6 @@ --エルフェーズ --Elphase --Original script by Larry126/OCG changes by Naim - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -36,7 +35,7 @@ function s.atkval(e,c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLinkSummoned() end function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -60,18 +59,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Negate its effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end \ No newline at end of file diff --git a/official/c60303245.lua b/official/c60303245.lua index 86b77cb129..5f74cb015c 100644 --- a/official/c60303245.lua +++ b/official/c60303245.lua @@ -1,7 +1,6 @@ --転生炎獣ベイルリンクス --Salamangreat Almiraj --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.immcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.immtg) e1:SetOperation(s.immop) e1:SetHintTiming(0,TIMING_END_PHASE) @@ -33,12 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.matfilter(c) - return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsAttackBelow(1000) -end -function s.immcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) + return c:IsNormalSummoned() and c:IsAttackBelow(1000) end function s.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end @@ -56,12 +50,12 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(aux.indoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.spcfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsPreviousControler(tp) + return c:IsNormalSummoned() and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp) diff --git a/official/c60303688.lua b/official/c60303688.lua index e12dd06c51..946e8e65e1 100644 --- a/official/c60303688.lua +++ b/official/c60303688.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSummonLocation,LOCATION_EXTRA),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) @@ -55,7 +55,7 @@ function s.indes(e,c) return c:IsSummonLocation(LOCATION_EXTRA) end function s.thfilter(c) - return not c:IsCode(id) and c:IsSetCard(0x146) and c:IsAbleToHand() + return not c:IsCode(id) and c:IsSetCard(SET_DOGMATIKA) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -74,7 +74,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,2),nil) --lizard check diff --git a/official/c60306104.lua b/official/c60306104.lua index 2d26f31264..3dea5f0049 100644 --- a/official/c60306104.lua +++ b/official/c60306104.lua @@ -1,4 +1,5 @@ --進入禁止!No Entry!! +--No Entry!! local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c60312997.lua b/official/c60312997.lua index 88853e5e7e..ed2bd4d2fd 100644 --- a/official/c60312997.lua +++ b/official/c60312997.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.GetAttackTarget()==nil and eg:GetFirst():IsLocation(LOCATION_MZONE) + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil and eg:GetFirst():IsLocation(LOCATION_MZONE) end function s.filter(c,lv) return c:IsLevelBelow(lv) and c:IsType(TYPE_SYNCHRO) and c:IsStatus(STATUS_PROC_COMPLETE) @@ -28,7 +28,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) e1:SetTargetRange(1,0) e1:SetValue(HALF_DAMAGE) Duel.RegisterEffect(e1,tp) @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetOperation(s.spop) e2:SetLabelObject(tc) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end end @@ -49,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsLocation(LOCATION_GRAVE) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60316373.lua b/official/c60316373.lua index 70164611b6..1c369c405b 100644 --- a/official/c60316373.lua +++ b/official/c60316373.lua @@ -1,4 +1,5 @@ --紋章獣アバコーンウェイ +--Heraldic Beast Aberconway local s,id=GetID() function s.initial_effect(c) --salvage @@ -14,19 +15,19 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} s.listed_names={id} function s.rfilter(c) return c:IsCode(id) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x76) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c60329973.lua b/official/c60329973.lua index 299182e63d..807eeeb3d8 100644 --- a/official/c60329973.lua +++ b/official/c60329973.lua @@ -43,7 +43,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) - if #tg==2 and Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN)==2 then + if #tg==2 and Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN)==2 then local og=Duel.GetOperatedGroup() if og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)~=2 then return end local lvl=tg:GetSum(Card.GetLevel) diff --git a/official/c60349525.lua b/official/c60349525.lua index 27b4482a25..307b8333dd 100644 --- a/official/c60349525.lua +++ b/official/c60349525.lua @@ -43,11 +43,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-tc:GetLevel()*200) tc:RegisterEffect(e1) if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then Duel.Damage(1-tp,nv,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c60362066.lua b/official/c60362066.lua index bdaa30b551..e4e7b8898d 100644 --- a/official/c60362066.lua +++ b/official/c60362066.lua @@ -1,9 +1,9 @@ --- 壱世壊を劈く弦声 --- Tearalaments Heartbeats --- Scripted by Hatter +--壱世壊を劈く弦声 +--Tearlaments Heartbeat +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Shuffle 1 Spell/Trap to the Deck + --Shuffle 1 Spell/Trap to the Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_HANDES) @@ -11,11 +11,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1) - -- Add 1 "Tearalaments" Trap to the hand + --Add 1 "Tearalaments" Trap to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.tdfilter(c) return c:IsSpellTrap() and c:IsAbleToDeck() end @@ -56,7 +56,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x182) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_TEARLAMENTS) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c60365591.lua b/official/c60365591.lua index ed9f2950cb..253b0aba55 100644 --- a/official/c60365591.lua +++ b/official/c60365591.lua @@ -1,5 +1,6 @@ --奇跡の方舟 +--Shinato's Ark local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,86327225) -end +end \ No newline at end of file diff --git a/official/c60369732.lua b/official/c60369732.lua index 17bf2e5b96..b8a4128489 100644 --- a/official/c60369732.lua +++ b/official/c60369732.lua @@ -1,5 +1,6 @@ --大邪神の儀式 +--Final Ritual of the Ancients local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,62420419) -end +end \ No newline at end of file diff --git a/official/c60375194.lua b/official/c60375194.lua index b4edd86fb9..0d65bf50d2 100644 --- a/official/c60375194.lua +++ b/official/c60375194.lua @@ -1,7 +1,6 @@ --ヴェンデット・デイブレイク --Vendread Daybreak --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Destroy all cards on the field, except the targeted "Vendread" ritual monster @@ -13,16 +12,15 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x106} - +s.listed_series={SET_VENDREAD} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x106) and c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsFaceup() and c:IsSetCard(SET_VENDREAD) and c:IsRitualSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -40,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - g:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + g:GetFirst():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) g:GetFirst():RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c60391791.lua b/official/c60391791.lua index a7c8a52502..1b7dac0f28 100644 --- a/official/c60391791.lua +++ b/official/c60391791.lua @@ -1,4 +1,5 @@ --千里眼 +--Senri Eye local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,20 +11,16 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.cfcon) - e2:SetCost(s.cfcost) + e2:SetCost(Cost.PayLP(100)) e2:SetOperation(s.cfop) c:RegisterEffect(e2) end function s.cfcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 -end -function s.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,100) end - Duel.PayLPCost(tp,100) + return Duel.IsTurnPlayer(tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 end function s.cfop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -31,4 +28,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.ConfirmCards(tp,g) end -end +end \ No newline at end of file diff --git a/official/c60398723.lua b/official/c60398723.lua index 0161dfba75..592aebd2a0 100644 --- a/official/c60398723.lua +++ b/official/c60398723.lua @@ -1,4 +1,5 @@ --森のざわめき +--Murmur of the Forest local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(rg,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c6039967.lua b/official/c6039967.lua index a0ebc1e48e..b98e36dd1d 100644 --- a/official/c6039967.lua +++ b/official/c6039967.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.spcon2) diff --git a/official/c60399954.lua b/official/c60399954.lua index 91b104e0c0..fc62da4481 100644 --- a/official/c60399954.lua +++ b/official/c60399954.lua @@ -1,4 +1,5 @@ --ユニオン・アタック +--Union Attack local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end @@ -26,7 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -34,16 +35,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -62,6 +63,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c60406591.lua b/official/c60406591.lua index 17e00a2d7a..e3f6fafbd6 100644 --- a/official/c60406591.lua +++ b/official/c60406591.lua @@ -34,7 +34,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) s[2]=eg:GetFirst():GetBattleTarget() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return s[0]==tp and #eg==1 and eg:GetFirst()==s[2] and eg:GetFirst():GetBattlePosition()==POS_FACEUP_ATTACK + return s[0]==tp and #eg==1 and eg:GetFirst()==s[2] and eg:GetFirst():GetBattlePosition()==POS_FACEUP_ATTACK end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct=s[1] @@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c60410769.lua b/official/c60410769.lua index e9070be8f1..fcbb3256fc 100644 --- a/official/c60410769.lua +++ b/official/c60410769.lua @@ -1,4 +1,5 @@ --ジュッテ・ナイト +--Jutte Fighter local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c60411677.lua b/official/c60411677.lua index 284468dc09..4665fcd3c8 100644 --- a/official/c60411677.lua +++ b/official/c60411677.lua @@ -1,4 +1,4 @@ ---Japanese name +--ジャッジメント・オブ・アヌビス --Anubis the Last Judge --scripted by pyrQ local s,id=GetID() @@ -104,4 +104,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60417395.lua b/official/c60417395.lua index 2aa77e3192..49624b9b1e 100644 --- a/official/c60417395.lua +++ b/official/c60417395.lua @@ -1,4 +1,5 @@ --ダークネス・ネオスフィア +--Darkness Neosphere local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -82,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60431417.lua b/official/c60431417.lua index e9bc2aa72d..cc1baa586d 100644 --- a/official/c60431417.lua +++ b/official/c60431417.lua @@ -1,4 +1,5 @@ --黄昏の双龍 +--Twilight Twin Dragons local s,id=GetID() function s.initial_effect(c) --activate @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} s.listed_names={19959563,57774843} function s.cfilter(c) return c:IsFaceup() and c:IsCode(19959563) @@ -49,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x38) + return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_LIGHTSWORN) and (r&REASON_EFFECT)~=0 end function s.thfilter(c) @@ -72,4 +73,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local rg=Duel.GetDecktopGroup(tp,4) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60433216.lua b/official/c60433216.lua index c05864477d..0f089bb307 100644 --- a/official/c60433216.lua +++ b/official/c60433216.lua @@ -1,4 +1,5 @@ --キング・スカーレット +--King Scarlet local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,16 +12,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1045} +s.listed_series={SET_RED_DRAGON_ARCHFIEND} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end - return tc and tc:IsSetCard(0x1045) and tc:IsRelateToBattle() + return tc and tc:IsSetCard(SET_RED_DRAGON_ARCHFIEND) and tc:IsRelateToBattle() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x1011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() @@ -31,13 +32,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x1011,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL|TYPE_TUNER,0,0,1,RACE_FIEND,ATTRIBUTE_FIRE) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c60434101.lua b/official/c60434101.lua index 9ee5a83e1f..2206f4ad2c 100644 --- a/official/c60434101.lua +++ b/official/c60434101.lua @@ -1,4 +1,5 @@ --魔轟神ガルバス +--Fabled Gallabas local s,id=GetID() function s.initial_effect(c) --destroy @@ -18,7 +19,7 @@ function s.costfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.filter(c,atk) return c:IsFaceup() and c:IsDefenseBelow(atk) @@ -37,4 +38,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsDefenseBelow(c:GetAttack()) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60434189.lua b/official/c60434189.lua index 9d7517869d..9317c23f9d 100644 --- a/official/c60434189.lua +++ b/official/c60434189.lua @@ -1,4 +1,5 @@ --ペンデュラム・モラトリアム +--Pendulum Impenetrable local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,14 +16,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetTargetRange(LOCATION_PZONE,LOCATION_PZONE) e1:SetValue(s.indval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCondition(s.discon) e2:SetOperation(s.disop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.indval(e,re,tp) @@ -38,4 +39,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c60448701.lua b/official/c60448701.lua index 77fb512f05..83b2475f02 100644 --- a/official/c60448701.lua +++ b/official/c60448701.lua @@ -1,5 +1,5 @@ --溟界の淵源 ---Depths of the Abhyss +--Ogdoadic Origin --scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -68,4 +68,4 @@ function s.mlop(e,tp,eg,ep,ev,re,r,rp) if ct>0 and Duel.IsPlayerCanDiscardDeck(1-tp,ct) then Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60461077.lua b/official/c60461077.lua index 42f5a17675..63be8ba458 100644 --- a/official/c60461077.lua +++ b/official/c60461077.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xfc) + return c:IsFacedown() or not c:IsSetCard(SET_GOUKI) end function s.ntcon(e,c,minc,zone) if c==nil then return true end @@ -39,7 +39,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c60461804.lua b/official/c60461804.lua index e163d27221..e0d37b3656 100644 --- a/official/c60461804.lua +++ b/official/c60461804.lua @@ -1,9 +1,9 @@ --- D-HERO デストロイフェニックスガイ --- Destiny HERO - Destroy Phoenix Enforcer +--D-HERO デストロイフェニックスガイ +--Destiny HERO - Destroyer Phoenix Enforcer local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcFun2(c,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc008),true) + Fusion.AddProcFun2(c,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESTINY_HERO),true) --Decrease the ATK of monster your opponent controls local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e2:SetCountLimit(1,id) e2:SetTarget(s.destg) e2:SetOperation(s.desop) @@ -37,18 +37,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x8,0xc008} -s.material_setcode={0x8,0xc008} - +s.listed_series={SET_HERO,SET_DESTINY_HERO} +s.material_setcode={SET_HERO,SET_DESTINY_HERO} function s.matfilter(c,fc,sumtype,tp) - return c:IsSetCard(0x8,fc,sumtype,tp) and c:IsLevelAbove(6) + return c:IsSetCard(SET_HERO,fc,sumtype,tp) and c:IsLevelAbove(6) end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,0x8)*-200 + return Duel.GetMatchingGroupCount(Card.IsSetCard,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil,SET_HERO)*-200 end ---destroy function s.rescon(sg,e,tp,mg) - return sg:IsExists(Card.IsControler,1,nil,tp) + return sg:IsExists(Card.IsControler,1,nil,tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) @@ -74,24 +72,23 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.spcon1) e1:SetOperation(s.spop1) if Duel.IsTurnPlayer(tp) then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,tp) end - function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnCount()~=e:GetLabel() end function s.filter(c,e,tp) - return c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop1(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) diff --git a/official/c60465049.lua b/official/c60465049.lua index 08470e17a7..2ce10365e2 100644 --- a/official/c60465049.lua +++ b/official/c60465049.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.rmcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.atkcon) @@ -42,21 +42,17 @@ end --Immune function s.immcon(e) local tp=e:GetHandlerPlayer() - return Duel.GetLP(tp)<=Duel.GetLP(1-tp) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return Duel.GetLP(tp)<=Duel.GetLP(1-tp) and e:GetHandler():IsSynchroSummoned() end function s.immval(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end --Banish -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.rmfilter(c,e) return c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -84,7 +80,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(atk) c:RegisterEffect(e1) end diff --git a/official/c60470713.lua b/official/c60470713.lua index 9d7c220eb6..c95f328081 100644 --- a/official/c60470713.lua +++ b/official/c60470713.lua @@ -1,4 +1,5 @@ --マドルチェ・チケット +--Madolche Ticket local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,11 +23,11 @@ function s.initial_effect(c) e3:SetCode(EVENT_TO_HAND) c:RegisterEffect(e3) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.cfilter(c,tp) return c:IsControler(tp) and c:IsPreviousControler(tp) and (c:IsPreviousLocation(LOCATION_GRAVE) or (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP))) - and c:IsSetCard(0x71) and not c:IsLocation(LOCATION_EXTRA) + and c:IsSetCard(SET_MADOLCHE) and not c:IsLocation(LOCATION_EXTRA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 and eg:IsExists(s.cfilter,1,nil,tp) @@ -37,13 +38,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK) end function s.mfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsRace(RACE_FAIRY) + return c:IsFaceup() and c:IsSetCard(SET_MADOLCHE) and c:IsRace(RACE_FAIRY) end function s.filter1(c) - return c:IsSetCard(0x71) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MADOLCHE) and c:IsMonster() and c:IsAbleToHand() end function s.filter2(c,e,tp) - return c:IsSetCard(0x71) and c:IsMonster() + return c:IsSetCard(SET_MADOLCHE) and c:IsMonster() and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -70,4 +71,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c60473572.lua b/official/c60473572.lua index e498ad7021..cc6cdd85bf 100644 --- a/official/c60473572.lua +++ b/official/c60473572.lua @@ -1,4 +1,5 @@ --メタルフォーゼ・スティエレン +--Metalfoes Steelen local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -14,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.desfilter(c,tp) if c:IsFacedown() then return false end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -25,7 +26,7 @@ function s.desfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g:GetFirst()) end end -end +end \ No newline at end of file diff --git a/official/c60482781.lua b/official/c60482781.lua index 74e14f27e0..5dc3f4e73b 100644 --- a/official/c60482781.lua +++ b/official/c60482781.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.LVnum=6 -s.LVset=0x5f +s.LVset=SET_MYSTIC_SWORDSMAN function s.descon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return e:GetHandler()==Duel.GetAttacker() and d and d:IsFacedown() and d:IsDefensePos() @@ -42,4 +42,4 @@ end function s.sumcon(e,c,minc) if not c then return true end return false -end +end \ No newline at end of file diff --git a/official/c60493189.lua b/official/c60493189.lua index 4821737f6c..f6474d8a67 100644 --- a/official/c60493189.lua +++ b/official/c60493189.lua @@ -1,4 +1,5 @@ --E・HERO プラズマヴァイスマン +--Elemental HERO Plasma Vice local s,id=GetID() function s.initial_effect(c) --fusion material @@ -28,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsAttackPos() @@ -48,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsAttackPos() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60508057.lua b/official/c60508057.lua index 366ca5eab1..e16957d4b7 100644 --- a/official/c60508057.lua +++ b/official/c60508057.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -39,18 +39,18 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actlimit(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0xba) + return re:IsMonsterEffect() and not rc:IsSetCard(SET_RAIDRAPTOR) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -66,12 +66,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() diff --git a/official/c60514625.lua b/official/c60514625.lua index c8db180ed4..274abf9529 100644 --- a/official/c60514625.lua +++ b/official/c60514625.lua @@ -62,7 +62,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) @@ -74,7 +74,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e3) end Duel.SpecialSummonComplete() @@ -90,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60519422.lua b/official/c60519422.lua index d852809054..1d9356436e 100644 --- a/official/c60519422.lua +++ b/official/c60519422.lua @@ -1,4 +1,5 @@ --騎士道精神 +--Kishido Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ function s.indtg(e,c) end function s.indval(e,c) return c:GetAttack()==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c60534585.lua b/official/c60534585.lua index d94443701c..41b50acd8a 100644 --- a/official/c60534585.lua +++ b/official/c60534585.lua @@ -1,4 +1,5 @@ --闘争本能 +--Battle Instinct local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.spfilter(c,e,tp) @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c60549248.lua b/official/c60549248.lua index 1307891d33..5c9c549efe 100644 --- a/official/c60549248.lua +++ b/official/c60549248.lua @@ -1,4 +1,5 @@ --電池メン-角型 +--Batteryman 9-Volt local s,id=GetID() function s.initial_effect(c) --tohand @@ -31,9 +32,9 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.filter(c) - return c:IsSetCard(0x28) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BATTERYMAN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -51,7 +52,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -61,7 +62,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -71,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60551528.lua b/official/c60551528.lua index d91cc2fc29..03abc6a281 100644 --- a/official/c60551528.lua +++ b/official/c60551528.lua @@ -44,7 +44,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.rmfilter(c,e) diff --git a/official/c60577362.lua b/official/c60577362.lua index ecfc14f9c9..fe6fee5607 100644 --- a/official/c60577362.lua +++ b/official/c60577362.lua @@ -1,6 +1,5 @@ --威圧する魔眼 --Overpowering Eye - local s,id=GetID() function s.initial_effect(c) --1 of your zombie monsters with 2000 or less ATK can attack directly @@ -33,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c6061630.lua b/official/c6061630.lua index 064cb41790..a0d9058042 100644 --- a/official/c6061630.lua +++ b/official/c6061630.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,2) end end @@ -40,8 +40,8 @@ function s.filter(c,cc,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e:GetHandler(),e,tp) end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e:GetHandler(),e,tp) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e:GetHandler(),e,tp) end + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e:GetHandler(),e,tp) local lvt={} local tc=g:GetFirst() for tc in aux.Next(g) do @@ -57,7 +57,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local lv=Duel.AnnounceNumber(tp,table.unpack(lvt)) e:GetHandler():RemoveCounter(tp,COUNTER_SPELL,lv,REASON_COST) e:SetLabel(lv) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.sfilter(c,lv,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -67,8 +67,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local lv=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.sfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,lv,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.sfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,lv,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60621361.lua b/official/c60621361.lua index 94718df188..43ef75e158 100644 --- a/official/c60621361.lua +++ b/official/c60621361.lua @@ -1,4 +1,5 @@ --横取りボーン +--Monster Rebone local s,id=GetID() function s.initial_effect(c) --Activate @@ -48,8 +49,8 @@ function s.spcheckop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(eg) do if tc:GetSummonPlayer()==0 then p1=true else p2=true end end - if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,0,1) end + if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end + if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(1-tp,id)~=0 @@ -92,4 +93,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60623203.lua b/official/c60623203.lua index e9bad6f5bc..5b99f7efd9 100644 --- a/official/c60623203.lua +++ b/official/c60623203.lua @@ -74,4 +74,4 @@ function s.get_declarable_levels(g1,g2) end end return table.unpack(opts) -end +end \ No newline at end of file diff --git a/official/c60627999.lua b/official/c60627999.lua index fc93eb900b..756c886cde 100644 --- a/official/c60627999.lua +++ b/official/c60627999.lua @@ -1,4 +1,5 @@ --血の沼地 +--Sanguine Swamp local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,12 +35,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -55,8 +56,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sdescon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) + return Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler()) end function s.acttg(e,c) return c:IsFacedown() and c:GetSequence()~=5 -end +end \ No newline at end of file diff --git a/official/c60634565.lua b/official/c60634565.lua index 0c7edf2896..4563e88425 100644 --- a/official/c60634565.lua +++ b/official/c60634565.lua @@ -1,8 +1,9 @@ --レプティレス・ラミア +--Reptilianne Hydra local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3c),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_REPTILIANNE),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --destroy local e1=Effect.CreateEffect(c) @@ -15,9 +16,9 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x3c} +s.listed_series={SET_REPTILIANNE} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.desfilter(c) return c:IsFaceup() and c:GetAttack()==0 @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Draw(tp,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60643553.lua b/official/c60643553.lua index 480cd9296a..4ec13f6480 100644 --- a/official/c60643553.lua +++ b/official/c60643553.lua @@ -13,17 +13,13 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase() < PHASE_END end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e0=Effect.CreateEffect(c) @@ -34,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e0:SetCountLimit(1,{id,1}) e0:SetCondition(s.damcon) e0:SetOperation(s.damop) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) e0:SetLabelObject(e0) Duel.RegisterEffect(e0,tp) local e1=Effect.CreateEffect(c) @@ -43,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.reccon1) e1:SetOperation(s.recop1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --sp_summon effect local e2=Effect.CreateEffect(c) @@ -51,14 +47,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(s.regcon) e2:SetOperation(s.regop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetCode(EVENT_CHAIN_SOLVED) e3:SetCondition(s.reccon2) e3:SetOperation(s.recop2) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) e2:SetLabelObject(e3) end @@ -88,7 +84,7 @@ function s.recop1(e,tp,eg,ep,ev,re,r,rp) local sum=g:GetSum(s.sum) Duel.Hint(HINT_CARD,0,id) if Duel.Recover(tp,sum,REASON_EFFECT)~=0 then - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end end end @@ -112,7 +108,7 @@ function s.recop2(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(0) Duel.Hint(HINT_CARD,0,id) if Duel.Recover(tp,rec,REASON_EFFECT)~=0 then - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -122,4 +118,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) local lp=Duel.GetLP(tp) Duel.SetLP(tp,lp/2) -end +end \ No newline at end of file diff --git a/official/c60645181.lua b/official/c60645181.lua index 7ef9b72aa1..230a0a382e 100644 --- a/official/c60645181.lua +++ b/official/c60645181.lua @@ -1,4 +1,5 @@ --H-C エクスカリバー +--Heroic Champion - Excalibur local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,14 +12,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -26,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c60666820.lua b/official/c60666820.lua index edebafb95d..dc8375bc29 100644 --- a/official/c60666820.lua +++ b/official/c60666820.lua @@ -1,4 +1,5 @@ --デーモン・イーター +--Nefarious Archfiend Eater of Nefariousness local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -33,7 +34,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,ft) return c:IsFaceup() and (ft>0 or c:GetSequence()<5) @@ -54,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60675348.lua b/official/c60675348.lua index 48a8ba31ef..a63953b497 100644 --- a/official/c60675348.lua +++ b/official/c60675348.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.filter(c) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xd8) and not c:IsForbidden() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_DINOMIST) and not c:IsForbidden() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -49,15 +49,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xd8) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DINOMIST) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.thcfilter(c) - return c:IsSetCard(0xd8) + return c:IsSetCard(SET_DINOMIST) end function s.thfilter(c,e) return c:IsAbleToHand() and (not e or c:IsCanBeEffectTarget(e)) diff --git a/official/c60681103.lua b/official/c60681103.lua index 6084d3bef0..c466d50471 100644 --- a/official/c60681103.lua +++ b/official/c60681103.lua @@ -1,4 +1,5 @@ --巨神竜フェルグラント +--Divine Dragon Lord Felgrand local s,id=GetID() function s.initial_effect(c) --remove @@ -30,10 +31,10 @@ function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,false,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -47,7 +48,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -72,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60682203.lua b/official/c60682203.lua index 733c26ad9c..fa00b163a1 100644 --- a/official/c60682203.lua +++ b/official/c60682203.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -20,7 +20,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) --cannot set local e2=Effect.CreateEffect(e:GetHandler()) @@ -29,15 +29,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) e2:SetTarget(aux.TRUE) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) e3:SetTargetRange(1,1) Duel.RegisterEffect(e3,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end + return re:IsSpellTrapEffect() +end \ No newline at end of file diff --git a/official/c60694662.lua b/official/c60694662.lua index a6062b0468..45816aeee9 100644 --- a/official/c60694662.lua +++ b/official/c60694662.lua @@ -1,4 +1,5 @@ --スケルエンジェル +--Skelengel local s,id=GetID() function s.initial_effect(c) --flip @@ -20,4 +21,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60709218.lua b/official/c60709218.lua index f5deae8db0..000a6b3366 100644 --- a/official/c60709218.lua +++ b/official/c60709218.lua @@ -23,8 +23,8 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.setfilter(c) return c:IsCode(2314238,75190122,49702428,70168345) and c:IsSSetable() @@ -32,7 +32,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) if #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c60718396.lua b/official/c60718396.lua index 33a3d6b128..10f9743850 100644 --- a/official/c60718396.lua +++ b/official/c60718396.lua @@ -1,4 +1,5 @@ --フレムベルカウンター +--Flamvell Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,9 +20,9 @@ function s.cfilter(c) return c:GetDefense()==200 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60728397.lua b/official/c60728397.lua index f5f470f433..dc168a58a7 100644 --- a/official/c60728397.lua +++ b/official/c60728397.lua @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x50} -s.counter_place_list={0x1009} +s.listed_series={SET_VENOM} +s.counter_place_list={COUNTER_VENOM} function s.cfilter(c) - return c:IsFaceup() and (c:IsCode(72677437,8062132) or c:IsSetCard(0x50)) + return c:IsFaceup() and (c:IsCode(72677437,8062132) or c:IsSetCard(SET_VENOM)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -25,11 +25,11 @@ function s.tgfilter(c) return c:IsRace(RACE_REPTILE) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1009,2) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1009,2) + if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(COUNTER_VENOM,2) end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_VENOM,2) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1009,2) + local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_VENOM,2) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -38,12 +38,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,2) and g:GetFirst():IsLocation(LOCATION_GRAVE) then + if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(COUNTER_VENOM,2) and g:GetFirst():IsLocation(LOCATION_GRAVE) then local atk=tc:GetAttack() - tc:AddCounter(0x1009,2) + tc:AddCounter(COUNTER_VENOM,2) if atk>0 and tc:GetAttack()==0 then Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0) end end end -end +end \ No newline at end of file diff --git a/official/c60741115.lua b/official/c60741115.lua index 6277668852..214c82f1e1 100644 --- a/official/c60741115.lua +++ b/official/c60741115.lua @@ -1,4 +1,5 @@ --ダメージ・イーター +--Damage Eater local s,id=GetID() function s.initial_effect(c) -- @@ -8,12 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or Duel.GetTurnPlayer()==tp then return false end + if rp==tp or Duel.IsTurnPlayer(tp) then return false end local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) if ex then return true end ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) @@ -41,4 +42,4 @@ function s.rev(e,re,r,rp,rc) if cc==0 or (r&REASON_EFFECT)==0 then return false end local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) return cid==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c60743819.lua b/official/c60743819.lua index 68b020c431..a2f076c6f4 100644 --- a/official/c60743819.lua +++ b/official/c60743819.lua @@ -28,7 +28,7 @@ function s.tgfilter(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c6075533.lua b/official/c6075533.lua index c7b02f039a..ce2804ffae 100644 --- a/official/c6075533.lua +++ b/official/c6075533.lua @@ -1,7 +1,6 @@ --トリシューラの鼓動 --Terror of Trishula --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Banish based on numbers of "Ice Barrier" Synchro Monster(s) @@ -22,15 +21,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.discon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.distg) e2:SetOperation(function(_,_,_,_,ev) Duel.NegateEffect(ev) end) c:RegisterEffect(e2) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.smfilter(c,tp) return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and c:IsSetCard(0x2f) and c:IsType(TYPE_SYNCHRO) + and c:IsSetCard(SET_ICE_BARRIER) and c:IsType(TYPE_SYNCHRO) end function s.bancheck(tp,loc) return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,loc,1,nil) @@ -45,7 +44,7 @@ function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) local b3=dnc>2 and s.bancheck(tp,LOCATION_HAND) return b1 or b2 or b3 end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_HAND) end function s.banlocop(tp,loc,gf) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,loc,nil) diff --git a/official/c6075801.lua b/official/c6075801.lua index 948cf39610..8cf6e3f74f 100644 --- a/official/c6075801.lua +++ b/official/c6075801.lua @@ -44,8 +44,8 @@ function s.filter(c) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.equipop(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) @@ -54,7 +54,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,c) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,c) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) @@ -65,7 +65,7 @@ function s.eqcon(e) return #eg>0 end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetOwner() end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and (c:IsLevel(7) or c:IsLevel(8)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60759087.lua b/official/c60759087.lua index 82184fafd5..eabd17146a 100644 --- a/official/c60759087.lua +++ b/official/c60759087.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.condition) e1:SetTarget(s.conttg) @@ -24,13 +24,13 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x153,0x154} +s.listed_series={SET_KI_SIKIL,SET_LIL_LA} function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):Filter(Card.IsFaceup,nil) - return g:IsExists(Card.IsSetCard,1,nil,0x153) and g:IsExists(Card.IsSetCard,1,nil,0x154) + return g:IsExists(Card.IsSetCard,1,nil,SET_KI_SIKIL) and g:IsExists(Card.IsSetCard,1,nil,SET_LIL_LA) end function s.filter1(c) - return c:IsFaceup() and (c:IsSetCard(0x153) or c:IsSetCard(0x154)) and c:IsAbleToChangeControler() + return c:IsFaceup() and (c:IsSetCard(SET_KI_SIKIL) or c:IsSetCard(SET_LIL_LA)) and c:IsAbleToChangeControler() end function s.filter2(c) return c:IsFaceup() and c:IsAbleToChangeControler() @@ -70,6 +70,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60764581.lua b/official/c60764581.lua index fdd35ed7d8..4a561182d2 100644 --- a/official/c60764581.lua +++ b/official/c60764581.lua @@ -20,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.sumlimit) @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() @@ -55,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c60764609.lua b/official/c60764609.lua index d4bd8c7fa6..c69b732eba 100644 --- a/official/c60764609.lua +++ b/official/c60764609.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -38,11 +38,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_FIENDSMITH} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsSetCard(SET_FIENDSMITH) and c:IsSpellTrap() and c:IsAbleToHand() end diff --git a/official/c6077601.lua b/official/c6077601.lua index fdbca9b157..e39b47dd4c 100644 --- a/official/c6077601.lua +++ b/official/c6077601.lua @@ -3,17 +3,17 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0xad),Fusion.OnFieldMat(Card.IsAbleToRemove),s.fextra,Fusion.BanishMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_FRIGHTFUR),Fusion.OnFieldMat(Card.IsAbleToRemove),s.fextra,Fusion.BanishMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE) end \ No newline at end of file diff --git a/official/c60800381.lua b/official/c60800381.lua index 2e081989e4..36ea3c80b9 100644 --- a/official/c60800381.lua +++ b/official/c60800381.lua @@ -17,12 +17,12 @@ function s.initial_effect(c) end s.material={63977008} s.listed_names={63977008} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,lc,stype,tp) return c:IsSummonCode(lc,stype,tp,63977008) or c:IsHasEffect(20932152) end function s.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,7 +33,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c60806437.lua b/official/c60806437.lua index e556eadad8..d97298f186 100644 --- a/official/c60806437.lua +++ b/official/c60806437.lua @@ -1,4 +1,5 @@ --UFOタートル +--UFO Turtle local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c60822251.lua b/official/c60822251.lua index 4864dee72e..6a6477a681 100644 --- a/official/c60822251.lua +++ b/official/c60822251.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCost(s.fuscost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e1:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e1) @@ -28,10 +28,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.fuscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.cfilter(c) return c:IsFaceup() and c:IsRace(RACE_WARRIOR)and c:IsLevelAbove(5) and c:GetAttack()~=c:GetBaseAttack() end @@ -50,5 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c60823690.lua b/official/c60823690.lua index 94723d0e24..c27aab5ed6 100644 --- a/official/c60823690.lua +++ b/official/c60823690.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCountLimit(1) e3:SetCondition(function(e) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end) diff --git a/official/c60830240.lua b/official/c60830240.lua index 08aafb306a..645acfa199 100644 --- a/official/c60830240.lua +++ b/official/c60830240.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e2:SetCondition(s.tgcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -77,4 +77,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c60832978.lua b/official/c60832978.lua index e48eba6561..d7e5032b4e 100644 --- a/official/c60832978.lua +++ b/official/c60832978.lua @@ -1,4 +1,5 @@ --ダブル・リゾネーター +--Double Resonator local s,id=GetID() function s.initial_effect(c) --tuner (summon) @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.target2) e3:SetOperation(s.operation2) c:RegisterEffect(e3) @@ -39,7 +40,7 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end @@ -60,8 +61,8 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c60866277.lua b/official/c60866277.lua index bfbc81b02f..d9e1974be9 100644 --- a/official/c60866277.lua +++ b/official/c60866277.lua @@ -1,4 +1,5 @@ --地殻変動 +--Earthshaker local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local att2=Duel.AnnounceAttribute(1-tp,1,att1) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,att2) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c60876124.lua b/official/c60876124.lua index d5e3698ab2..fbed803416 100644 --- a/official/c60876124.lua +++ b/official/c60876124.lua @@ -1,4 +1,5 @@ --レア・ヴァリュー +--Rare Value local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_SZONE,0,2,nil) @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c60879050.lua b/official/c60879050.lua index 4668b19ce8..b70bf97060 100644 --- a/official/c60879050.lua +++ b/official/c60879050.lua @@ -36,7 +36,7 @@ function s.rescon(sg,e,tp,mg) return Duel.IsExistingTarget(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,sg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end local rg=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE) Duel.Remove(rg,POS_FACEUP,REASON_COST) @@ -46,4 +46,4 @@ function s.value(e,c) end function s.ftarget(e,c) return e:GetHandler():GetEquipTarget()~=c -end +end \ No newline at end of file diff --git a/official/c60880471.lua b/official/c60880471.lua index ce7811c202..52e10ce74a 100644 --- a/official/c60880471.lua +++ b/official/c60880471.lua @@ -1,7 +1,6 @@ --六花精ヘレボラス --Hellebore the Rikka Fairy --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Negate opponent's activated monster effect @@ -10,10 +9,10 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -29,19 +28,15 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} function s.cfilter(c,tp) return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsExists(s.cfilter,1,nil,tp) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x141),tp,LOCATION_MZONE,0,1,nil) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return g and g:IsExists(s.cfilter,1,nil,tp) and Duel.IsChainDisablable(ev) and re:IsMonsterEffect() + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_RIKKA),tp,LOCATION_MZONE,0,1,nil) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end @@ -73,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c60884672.lua b/official/c60884672.lua index 1de49b8289..d67b6f1a66 100644 --- a/official/c60884672.lua +++ b/official/c60884672.lua @@ -1,7 +1,6 @@ --大砂海ゴールド・ゴルゴンダ ---Vast Desert Gold Golgonda +--Great Sand Sea - Gold Golgonda --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,26 +42,25 @@ function s.initial_effect(c) e4:SetOperation(s.caop) c:RegisterEffect(e4) end -s.listed_series={0x158} - +s.listed_series={SET_SPRINGANS} function s.attg(e,c) - return c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) + return c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) end function s.isfilter(c) - return c:IsFaceup() and c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.isfilter,tp,LOCATION_MZONE,0,1,nil) end function s.cfilter(c) - return c:IsSetCard(0x158) and c:IsDiscardable() + return c:IsSetCard(SET_SPRINGANS) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -98,7 +96,7 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c60912752.lua b/official/c60912752.lua index 4b4855b6e4..5858bc675c 100644 --- a/official/c60912752.lua +++ b/official/c60912752.lua @@ -1,4 +1,5 @@ --異次元の境界線 +--D.D. Borderline local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c60921537.lua b/official/c60921537.lua index bbec229185..7cfb699f94 100644 --- a/official/c60921537.lua +++ b/official/c60921537.lua @@ -1,12 +1,12 @@ --- 凶導の葬列 --- Dogmatikamacabre --- Scripted by Hatter +--凶導の葬列 +--Dogmatikamacabre +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Ritual Summon + --Ritual Summon local e1=Ritual.AddProcGreater({ handler=c, - filter=aux.FilterBoolFunction(Card.IsSetCard,0x146), + filter=aux.FilterBoolFunction(Card.IsSetCard,SET_DOGMATIKA), location=LOCATION_HAND|LOCATION_GRAVE, extrafil=s.extramat, extratg=s.extratg, @@ -17,12 +17,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={40352445,48654323} -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} function s.matfilter(c) return c:HasLevel() and c:IsType(TYPE_FUSION|TYPE_SYNCHRO) and c:IsAbleToRemove() end function s.extramat(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.IsPlayerAffectedByEffect(tp,69832741) + return Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Group.NewGroup() or Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c60930169.lua b/official/c60930169.lua index ddf20118e1..ace5bb0232 100644 --- a/official/c60930169.lua +++ b/official/c60930169.lua @@ -1,4 +1,5 @@ --ブロークン・ブロッカー +--Broken Blocker local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,10 +23,10 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local t=Duel.GetAttackTarget() if a and a:IsDefensePos() and a:GetDefense()>a:GetAttack() and a:IsStatus(STATUS_BATTLE_DESTROYED) then - a:RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + a:RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end if t and t:IsDefensePos() and t:GetDefense()>t:GetAttack() and t:IsStatus(STATUS_BATTLE_DESTROYED) then - t:RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + t:RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end end function s.filter(c,e,tp) @@ -54,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c60942444.lua b/official/c60942444.lua index 37e826d5d7..26d73027cb 100644 --- a/official/c60942444.lua +++ b/official/c60942444.lua @@ -20,10 +20,10 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -61,4 +61,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c60944809.lua b/official/c60944809.lua index c0909ddb59..1c6bdd2c96 100644 --- a/official/c60944809.lua +++ b/official/c60944809.lua @@ -21,17 +21,17 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.filter(c,e,tp) - return c:IsSetCard(0x48) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NUMBER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.matfilter(chkc) end @@ -69,5 +69,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,g) end end -end - +end \ No newline at end of file diff --git a/official/c60946968.lua b/official/c60946968.lua index be624fc9ce..7840a8afd2 100644 --- a/official/c60946968.lua +++ b/official/c60946968.lua @@ -1,4 +1,5 @@ --異界空間-Aゾーン +--Otherworld - The "A" Zone local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,15 +21,15 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} function s.adcon(e) if Duel.GetCurrentPhase()~=PHASE_DAMAGE_CAL then return false end local d=Duel.GetAttackTarget() if not d then return false end local tp=e:GetHandlerPlayer() if d:IsControler(1-tp) then d=Duel.GetAttacker() end - return d:IsSetCard(0xc) + return d:IsSetCard(SET_ALIEN) end function s.adtg(e,c) return c==Duel.GetAttacker() or c==Duel.GetAttackTarget() -end +end \ No newline at end of file diff --git a/official/c60948488.lua b/official/c60948488.lua index ce32fa6a94..769ea4b2c2 100644 --- a/official/c60948488.lua +++ b/official/c60948488.lua @@ -66,7 +66,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(2500) tc:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c60950180.lua b/official/c60950180.lua index 0ed56363bd..5c30eae426 100644 --- a/official/c60950180.lua +++ b/official/c60950180.lua @@ -1,4 +1,5 @@ --RR-インペイル・レイニアス +--Raidraptor - Sharp Lanius local s,id=GetID() function s.initial_effect(c) --pos @@ -39,7 +40,7 @@ function s.initial_effect(c) Duel.RegisterEffect(ge2,0) end) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end @@ -60,10 +61,10 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetAttackedCount()>0 and Duel.GetCurrentPhase()==PHASE_MAIN2 + return e:GetHandler():GetAttackedCount()>0 and Duel.IsPhase(PHASE_MAIN2) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -78,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c60953118.lua b/official/c60953118.lua index 3c0c5d99a1..5fdef4b827 100644 --- a/official/c60953118.lua +++ b/official/c60953118.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCondition(s.damcon) - e1:SetCost(s.damcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.damop) c:RegisterEffect(e1) --Toss a coin and apply the appropriate effect @@ -32,10 +32,6 @@ s.toss_coin=true function s.damcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetBattleDamage(tp)>0 end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.damop(e,tp,eg,ep,ev,re,r,rp) --Prevent Battle Damage local e1=Effect.CreateEffect(e:GetHandler()) diff --git a/official/c60953949.lua b/official/c60953949.lua index 0391122ed3..be72a66d55 100644 --- a/official/c60953949.lua +++ b/official/c60953949.lua @@ -1,4 +1,5 @@ --古代の機械箱 +--Ancient Gear Box local s,id=GetID() function s.initial_effect(c) --tohand @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsReason(REASON_DRAW) - and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) + and e:GetHandler():IsPreviousLocation(LOCATION_DECK|LOCATION_GRAVE) end function s.filter(c) return (c:GetAttack()==500 or c:GetDefense()==500) and c:GetCode()~=id @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c60954556.lua b/official/c60954556.lua index 63ae6f0d49..d898f9f168 100644 --- a/official/c60954556.lua +++ b/official/c60954556.lua @@ -75,7 +75,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) end end function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.xyzfilter(c) return c:IsSetCard(SET_LYRILUSC) and c:IsMonster() diff --git a/official/c60990740.lua b/official/c60990740.lua index 477e2cd4ee..7aad19ac86 100644 --- a/official/c60990740.lua +++ b/official/c60990740.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetCountLimit(1,id) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c60992105.lua b/official/c60992105.lua index 5bdcbee9ea..d69f4c410c 100644 --- a/official/c60992105.lua +++ b/official/c60992105.lua @@ -1,4 +1,5 @@ --玄翼竜 ブラック・フェザー +--Blackfeather Darkrage Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c60992364.lua b/official/c60992364.lua index c358bbddbf..53a492d947 100644 --- a/official/c60992364.lua +++ b/official/c60992364.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -45,13 +45,9 @@ function s.initial_effect(c) e4:SetOperation(s.atop) c:RegisterEffect(e4) end -s.listed_series={0x107e,0x107f} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_ZW,SET_UTOPIA} function s.thfilter(c) - return c:IsSetCard(0x107e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ZW) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -66,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -92,11 +88,11 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and Duel.GetCurrentChain()==0 + return Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() and Duel.GetCurrentChain()==0 end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end @@ -119,12 +115,12 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c60999392.lua b/official/c60999392.lua index d6685a1ba0..673c9bf10f 100644 --- a/official/c60999392.lua +++ b/official/c60999392.lua @@ -1,4 +1,5 @@ --マシンナーズ・ソルジャー +--Machina Soldier local s,id=GetID() function s.initial_effect(c) --summon success @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 end function s.filter(c,e,tp) - return c:IsSetCard(0x36) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MACHINA) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61011311.lua b/official/c61011311.lua index fa0b623638..ab2a9e6818 100644 --- a/official/c61011311.lua +++ b/official/c61011311.lua @@ -1,6 +1,5 @@ --巻きすぎた発条 --Zenmailfunction - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Wind-Up" monster from GY @@ -13,10 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x58} - +s.listed_series={SET_WIND_UP} function s.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_WIND_UP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -34,12 +32,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Cannot be tributed local e3=Effect.CreateEffect(c) @@ -49,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_UNRELEASABLE_SUM) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) local e4=e3:Clone() e4:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -61,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e5:SetValue(1) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e5,true) end Duel.SpecialSummonComplete() diff --git a/official/c61011438.lua b/official/c61011438.lua index ef9ce4f219..4f771be663 100644 --- a/official/c61011438.lua +++ b/official/c61011438.lua @@ -1,9 +1,9 @@ --- ブリリアント・ローズ --- Brilliant Rose --- Scripted by Hatter +--ブリリアント・ローズ +--Brilliant Rose +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Copy name, type, and attribute + --Copy name, type, and attribute local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) @@ -22,14 +22,14 @@ function s.initial_effect(c) e2:SetOperation(s.cpop) c:RegisterEffect(e2) end -s.listed_series={0x1047,0x9b} +s.listed_series={SET_GEM_KNIGHT,SET_MELODIOUS} function s.spcostfilter(c) - return (c:IsSetCard(0x1047) or c:IsSetCard(0x9b)) and c:IsDiscardable() + return (c:IsSetCard(SET_GEM_KNIGHT) or c:IsSetCard(SET_MELODIOUS)) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -43,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP) end function s.cpcostfilter(c) - return (c:IsSetCard(0x1047) or c:IsSetCard(0x9b)) and c:IsAbleToGraveAsCost() + return (c:IsSetCard(SET_GEM_KNIGHT) or c:IsSetCard(SET_MELODIOUS)) and c:IsAbleToGraveAsCost() end function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cpcostfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -56,12 +56,12 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=e:GetLabelObject() if not (tc and c:IsRelateToEffect(e) and c:IsFaceup()) then return end - -- Change properties + --Change properties local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(tc:GetOriginalCode()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) diff --git a/official/c61019812.lua b/official/c61019812.lua index f10869831a..162c5a18fb 100644 --- a/official/c61019812.lua +++ b/official/c61019812.lua @@ -45,4 +45,4 @@ end function s.dmop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61027400.lua b/official/c61027400.lua index fce1d3d443..c54b70dd27 100644 --- a/official/c61027400.lua +++ b/official/c61027400.lua @@ -1,7 +1,6 @@ --いくらの軍貫 --Gunkan Suship Ikura --Coded by V.J.Wilson - local s,id=GetID() function s.initial_effect(c) --Special Summon procedure (from hand) @@ -26,7 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_SUSHIP_SHARI} - function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 diff --git a/official/c61032879.lua b/official/c61032879.lua index 592d3f66f4..74d5a3696a 100644 --- a/official/c61032879.lua +++ b/official/c61032879.lua @@ -1,4 +1,5 @@ --コモンメンタルワールド +--Synch Realm local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsSummonType(SUMMON_TYPE_SYNCHRO) and eg:GetFirst():IsControler(tp) + return eg:GetFirst():IsSynchroSummoned() and eg:GetFirst():IsControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6103294.lua b/official/c6103294.lua index ae9361be02..c419be5710 100644 --- a/official/c6103294.lua +++ b/official/c6103294.lua @@ -1,4 +1,5 @@ --オアシスの使者 +--Emissary of the Oasis local s,id=GetID() function s.initial_effect(c) --atk target @@ -35,4 +36,4 @@ function s.cfilter2(e,c) end function s.atkcon(e) return Duel.IsExistingMatchingCard(s.cfilter1,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c61044390.lua b/official/c61044390.lua index 64370dc764..dab2e078f6 100644 --- a/official/c61044390.lua +++ b/official/c61044390.lua @@ -1,4 +1,5 @@ --カオス・エンド +--Chaos End local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61049315.lua b/official/c61049315.lua index f1bbe53d19..5c13720917 100644 --- a/official/c61049315.lua +++ b/official/c61049315.lua @@ -1,4 +1,5 @@ --ナチュル・ローズウィップ +--Naturia Rosewhip local s,id=GetID() function s.initial_effect(c) --activate limit @@ -26,7 +27,7 @@ function s.initial_effect(c) end function s.aclimit1(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_CONTROL+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) end function s.aclimit2(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end @@ -37,4 +38,4 @@ function s.econ(e) end function s.elimit(e,te,tp) return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c6104968.lua b/official/c6104968.lua index fb89f5a7e0..a7fb8d5f35 100644 --- a/official/c6104968.lua +++ b/official/c6104968.lua @@ -1,4 +1,5 @@ --デスハムスター +--Bubonic Vermin local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c61052897.lua b/official/c61052897.lua index e410796be0..49e3fa68a0 100644 --- a/official/c61052897.lua +++ b/official/c61052897.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) diff --git a/official/c61068510.lua b/official/c61068510.lua index 9692d0ee6b..e449429406 100644 --- a/official/c61068510.lua +++ b/official/c61068510.lua @@ -1,4 +1,5 @@ --トルネード +--Tornado local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61089209.lua b/official/c61089209.lua index 4b7eabff67..49685428d8 100644 --- a/official/c61089209.lua +++ b/official/c61089209.lua @@ -1,7 +1,6 @@ ---JP name +--ミュートリアル・ミスト --Myutant Mist --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -47,26 +46,24 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end - --Lists "Myutant" archetype -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} --Must special summoned by a "Myutant" effect function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x159) + return se:GetHandler():IsSetCard(SET_MYUTANT) end --Cannot be targeted by opponent's trap effects function s.tgval(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_SPELL) + return aux.tgoval(e,re,rp) and re:IsSpellEffect() end --Opponent activates a trap effect function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_TRAP) + return ep==1-tp and re:IsTrapEffect() end --Banish 1 card from your hand or field as cost function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end --Activation legality @@ -89,7 +86,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end --Check for 1 of your face-up banished "Myutant" monsters function s.thfilter(c) - return c:IsSetCard(0x159) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_MYUTANT) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c61103515.lua b/official/c61103515.lua index aec68ca9ed..7613c1eb95 100644 --- a/official/c61103515.lua +++ b/official/c61103515.lua @@ -1,5 +1,5 @@ --劫火の翼竜 ゴースト・ワイバーン ---Hellfire Dragon, Ghost Wyvern +--Ghost Wyvern, the Underworld Dragon local s,id=GetID() function s.initial_effect(c) --Search 1 "Ghost Fusion" @@ -54,7 +54,7 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() then return end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -69,4 +69,4 @@ function s.thgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local tc=Duel.SelectMatchingCard(tp,s.thgfilter,tp,LOCATION_DECK,0,1,1,nil) aux.ToHandOrElse(tc,tp) -end +end \ No newline at end of file diff --git a/official/c6112401.lua b/official/c6112401.lua index 9328a50c73..13bfdee67e 100644 --- a/official/c6112401.lua +++ b/official/c6112401.lua @@ -1,4 +1,5 @@ --身剣一体 +--At One With the Sword local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end + if Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated() then return false end local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local tc=g:GetFirst() e:SetLabelObject(tc) - return #g==1 and tc:IsFaceup() and tc:IsSetCard(0x100d) + return #g==1 and tc:IsFaceup() and tc:IsSetCard(SET_X_SABER) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -45,13 +46,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.drcon) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Atkup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(800) c:RegisterEffect(e2) --Equip limit @@ -60,14 +61,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.eqlimit(e,c) - return c:IsSetCard(0x100d) + return c:IsSetCard(SET_X_SABER) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsContains(e:GetHandler():GetEquipTarget()) @@ -81,4 +82,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61127349.lua b/official/c61127349.lua index 4319277fc9..75f4bc6344 100644 --- a/official/c61127349.lua +++ b/official/c61127349.lua @@ -1,4 +1,5 @@ --ビッグバン・シュート +--Big Bang Shot local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -27,4 +28,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61132951.lua b/official/c61132951.lua index a8911d31a9..3a4fdd2139 100644 --- a/official/c61132951.lua +++ b/official/c61132951.lua @@ -1,4 +1,5 @@ --H・C 夜襲のカンテラ +--Heroic Challenger - Night Watchman local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,4 +23,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d~=nil and d:IsRelateToBattle() and d:IsDefensePos() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61156777.lua b/official/c61156777.lua index a703ee72a1..7eb397dcb3 100644 --- a/official/c61156777.lua +++ b/official/c61156777.lua @@ -1,4 +1,5 @@ --BOXサー +--BOXer local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x34) @@ -64,4 +65,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveCounter(tp,0x34,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61159609.lua b/official/c61159609.lua index 06a0a6c2cf..2993907a99 100644 --- a/official/c61159609.lua +++ b/official/c61159609.lua @@ -1,5 +1,5 @@ --三賢者の書 ---Tris Magistus +--Trismagistus --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -35,17 +35,17 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetCountLimit(1,id) e4:SetRange(LOCATION_SZONE) - e4:SetCost(s.cost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) c:RegisterEffect(e4) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.indvalue(e,re,r,rp) return r&REASON_BATTLE==REASON_BATTLE end function s.indfilter(e,c) - return c:IsSetCard(0x152) and c:GetEquipCount()>0 + return c:IsSetCard(SET_MAGISTUS) and c:GetEquipCount()>0 end function s.spfilter1(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -64,12 +64,8 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x152) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGISTUS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -86,4 +82,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61166988.lua b/official/c61166988.lua index 9eb8f1f707..12635995fd 100644 --- a/official/c61166988.lua +++ b/official/c61166988.lua @@ -1,4 +1,5 @@ --野性解放 +--Wild Nature's Release local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:HasNonZeroDefense() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) + return c:HasNonZeroDefense() and c:IsRace(RACE_BEAST|RACE_BEASTWARRIOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -26,14 +27,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetDefense()) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetCountLimit(1) e2:SetOperation(s.desop) tc:RegisterEffect(e2) diff --git a/official/c61173621.lua b/official/c61173621.lua index bf2c9053ef..601c08bfc5 100644 --- a/official/c61173621.lua +++ b/official/c61173621.lua @@ -1,4 +1,5 @@ --エッジインプ・チェーン +--Edge Imp Chain local s,id=GetID() function s.initial_effect(c) --search @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} s.listed_names={id} function s.filter(c) return c:IsCode(id) and c:IsAbleToHand() @@ -42,10 +43,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xad) and c:IsAbleToHand() + return c:IsSetCard(SET_FRIGHTFUR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -58,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c61181383.lua b/official/c61181383.lua index 8a9d53ceae..a094bb8732 100644 --- a/official/c61181383.lua +++ b/official/c61181383.lua @@ -1,4 +1,5 @@ --充電器 +--Battery Charger local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,18 +8,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x28} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end +s.listed_series={SET_BATTERYMAN} function s.filter(c,e,tp) - return c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BATTERYMAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -33,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61190918.lua b/official/c61190918.lua index afc5a8f3f4..eee9e91fe4 100644 --- a/official/c61190918.lua +++ b/official/c61190918.lua @@ -35,7 +35,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.dirfilter1(c) @@ -49,8 +49,8 @@ function s.dircon(e) and not Duel.IsExistingMatchingCard(s.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) end function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE+LOCATION_MZONE,nil)*500 + return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE|LOCATION_MZONE,nil)*500 end function s.filter(c) return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end +end \ No newline at end of file diff --git a/official/c61204971.lua b/official/c61204971.lua index 14da9df467..bed6bfe57c 100644 --- a/official/c61204971.lua +++ b/official/c61204971.lua @@ -1,4 +1,5 @@ --E・HERO サンダー・ジャイアント +--Elemental HERO Thunder Giant local s,id=GetID() function s.initial_effect(c) --fusion material @@ -24,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,atk) return c:IsFaceup() and c:GetBaseAttack()0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,109,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,109,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,109,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c61231400.lua b/official/c61231400.lua index 6f6b3934e1..044abcf6d5 100644 --- a/official/c61231400.lua +++ b/official/c61231400.lua @@ -1,4 +1,5 @@ --炎神機-紫龍 +--Pyrotech Mech - Shiryu local s,id=GetID() function s.initial_effect(c) --summon with 1 tribute @@ -51,4 +52,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61245672.lua b/official/c61245672.lua index 546bb497f5..5fa2843dde 100644 --- a/official/c61245672.lua +++ b/official/c61245672.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMING_END_PHASE) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -34,10 +34,6 @@ end function s.atkval(e,c) return c:GetLinkedGroup():FilterCount(Card.IsMonster,nil)*500 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -61,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c61248471.lua b/official/c61248471.lua index 4f7a898e88..76b48ae000 100644 --- a/official/c61248471.lua +++ b/official/c61248471.lua @@ -36,7 +36,7 @@ end s.listed_names={CARD_SUMMONED_SKULL} function s.repfilter(c,tp) return c:IsFaceup() and c:IsCode(CARD_SUMMONED_SKULL) - and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -51,21 +51,21 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and rp==1-tp and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) return c:IsCode(CARD_SUMMONED_SKULL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61254509.lua b/official/c61254509.lua index 236b44b7c1..c0c28d4d33 100644 --- a/official/c61254509.lua +++ b/official/c61254509.lua @@ -1,4 +1,5 @@ --トライポッド・フィッシュ +--Tripod Fish local s,id=GetID() function s.initial_effect(c) --lv up @@ -16,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsLevelAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c61257789.lua b/official/c61257789.lua index 690501e137..ea9a0d3c66 100644 --- a/official/c61257789.lua +++ b/official/c61257789.lua @@ -62,7 +62,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)then Duel.Destroy(eg,REASON_EFFECT) end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -94,4 +94,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61258740.lua b/official/c61258740.lua index 05b08f00cf..f40e4d18bb 100644 --- a/official/c61258740.lua +++ b/official/c61258740.lua @@ -1,4 +1,5 @@ --水神の護符 +--Sea Lord's Amulet local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,11 +32,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,3) e:GetHandler():RegisterEffect(e1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -45,4 +46,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if ct==3 then Duel.SendtoGrave(c,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c61269611.lua b/official/c61269611.lua index f5043d94d2..e5eef1ee2c 100644 --- a/official/c61269611.lua +++ b/official/c61269611.lua @@ -1,5 +1,5 @@ --ダイナレスラー・イグアノドラッカ ---Dinowrestler Iguanadracker +--Dinowrestler Iguanodraka --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -28,13 +28,13 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.cfilter(c) return c:IsRace(RACE_DINOSAUR) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -52,7 +52,7 @@ function s.ctfilter(c,e,tp,ft) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalCode()) end function s.spfilter(c,e,tp,code) - return c:GetOriginalCode()~=code and c:IsSetCard(0x11a) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:GetOriginalCode()~=code and c:IsSetCard(SET_DINOWRESTLER) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -73,5 +73,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c61272280.lua b/official/c61272280.lua index 2c52dc6c71..bb55c9e6f8 100644 --- a/official/c61272280.lua +++ b/official/c61272280.lua @@ -1,5 +1,5 @@ --絶火の竜神ヴァフラム ---Magistus Dragon Vafram +--Vahram, the Magistus Divinity Dragon --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -37,13 +37,13 @@ function s.initial_effect(c) e3:SetOperation(s.desop2) c:RegisterEffect(e3) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.indesvalue(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==1-e:GetHandlerPlayer() + return re:IsSpellTrapEffect() and rp==1-e:GetHandlerPlayer() end function s.descon1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.destg1(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil) @@ -71,4 +71,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if ec and bc and bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61283655.lua b/official/c61283655.lua index 9a62222294..35a1233e2b 100644 --- a/official/c61283655.lua +++ b/official/c61283655.lua @@ -1,4 +1,5 @@ --トリックスター・キャンディナ +--Trickstar Candina local s,id=GetID() function s.initial_effect(c) --search @@ -26,9 +27,9 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.filter(c) - return c:IsSetCard(0xfb) and c:IsAbleToHand() + return c:IsSetCard(SET_TRICKSTAR) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -44,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -53,4 +54,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Damage(1-tp,200,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6128460.lua b/official/c6128460.lua index b7b9a4231b..578aec1633 100644 --- a/official/c6128460.lua +++ b/official/c6128460.lua @@ -1,7 +1,6 @@ --ワイトベイキング --Wightbaking --Logical Nonsense - local s,id=GetID() function s.initial_effect(c) --Name becomes "Skull Servant" while in GY @@ -35,11 +34,10 @@ function s.initial_effect(c) end --Specifically lists "Skull Servant" and itself s.listed_names={CARD_SKULL_SERVANT,id} - --Check for level 3 or lower zombie monsters function s.repfilter(c,tp) return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsLevelBelow(3) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end --Activation legality function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -74,7 +72,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end end -end +end \ No newline at end of file diff --git a/official/c61292243.lua b/official/c61292243.lua index 175b54f0ac..4139770102 100644 --- a/official/c61292243.lua +++ b/official/c61292243.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c613013.lua b/official/c613013.lua index 53ca1f8d61..2b2c1882d7 100644 --- a/official/c613013.lua +++ b/official/c613013.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end) - e3:SetCost(aux.dxmcostgen(2,2,nil)) + e3:SetCost(Cost.Detach(2,2,nil)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) diff --git a/official/c61307542.lua b/official/c61307542.lua index f5ab88eb60..223efe0303 100644 --- a/official/c61307542.lua +++ b/official/c61307542.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(s.descon) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c61314842.lua b/official/c61314842.lua index c281113694..c0da093417 100644 --- a/official/c61314842.lua +++ b/official/c61314842.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.filter(c,e,tp) - return c:IsSetCard(0x76) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.xyzfilter(c,mg,tp,chk) return c:IsXyzSummonable(nil,mg,2,2) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) @@ -62,4 +62,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() Duel.XyzSummon(tp,xyz,nil,g) end -end +end \ No newline at end of file diff --git a/official/c61318483.lua b/official/c61318483.lua index c026188c82..819e5d4c58 100644 --- a/official/c61318483.lua +++ b/official/c61318483.lua @@ -1,4 +1,5 @@ --ゴーストリック・フロスト +--Ghostrick Jackfrost local s,id=GetID() function s.initial_effect(c) --summon limit @@ -28,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -38,7 +39,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -67,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,c) end end -end +end \ No newline at end of file diff --git a/official/c61322713.lua b/official/c61322713.lua index ff2ce56c71..9c9f2fa12f 100644 --- a/official/c61322713.lua +++ b/official/c61322713.lua @@ -85,4 +85,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) -end +end \ No newline at end of file diff --git a/official/c6133894.lua b/official/c6133894.lua index 82fc0f9c3e..6619ca39b4 100644 --- a/official/c6133894.lua +++ b/official/c6133894.lua @@ -56,6 +56,6 @@ end function s.hdop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsEnvironment(94585852) then local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,3) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c61344030.lua b/official/c61344030.lua index ca8c924765..25d752a5ae 100644 --- a/official/c61344030.lua +++ b/official/c61344030.lua @@ -1,4 +1,5 @@ --輝光子パラディオス +--Starliege Paladynamo local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,10 +28,6 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end @@ -49,18 +46,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -78,4 +75,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61370518.lua b/official/c61370518.lua index 9e3309b372..94d92f9ab5 100644 --- a/official/c61370518.lua +++ b/official/c61370518.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c6137095.lua b/official/c6137095.lua index beb1f6a13e..9a103867f9 100644 --- a/official/c6137095.lua +++ b/official/c6137095.lua @@ -1,4 +1,5 @@ --誤作動 +--Malfunction local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,17 +8,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -46,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c61374414.lua b/official/c61374414.lua index e33ef4e0fc..60ba00dbc2 100644 --- a/official/c61374414.lua +++ b/official/c61374414.lua @@ -1,5 +1,5 @@ --CX-N・As・Ch Knight ---CXyz - Naphil Asylum Chaos Knight +--CXyz N.As.Ch. Knight --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -21,19 +21,19 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.listed_names={34876719} function s.ovfilter(c,tp,lc) return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,34876719) end function s.spfilter(c,e,tp,mc,pg) local no=c.xyz_number - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) and no and no>=101 and no<=107 and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and (#pg<=0 or pg:IsContains(mc)) @@ -70,8 +70,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(sc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) + sc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) Duel.RegisterEffect(e1,tp) end end @@ -83,4 +83,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sc=e:GetLabelObject() Duel.Destroy(sc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61380658.lua b/official/c61380658.lua index 42ce7443b1..e6d0be5966 100644 --- a/official/c61380658.lua +++ b/official/c61380658.lua @@ -1,4 +1,5 @@ --エレキリギリス +--Watthopper local s,id=GetID() function s.initial_effect(c) --untargetable @@ -19,10 +20,10 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0xe) and c~=e:GetHandler() + return c:IsFaceup() and c:IsSetCard(SET_WATT) and c~=e:GetHandler() end function s.tglimit(e,c) - return c:IsSetCard(0xe) and c~=e:GetHandler() -end + return c:IsSetCard(SET_WATT) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c61391302.lua b/official/c61391302.lua index e9e374ccae..b6b1c9bc72 100644 --- a/official/c61391302.lua +++ b/official/c61391302.lua @@ -31,7 +31,7 @@ function s.otfilter(c,tp) return c:IsLevelAbove(5) and (c:IsControler(tp) or c:IsFaceup()) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE) @@ -53,14 +53,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c61397885.lua b/official/c61397885.lua index 4fc3d73179..9c9b03318b 100644 --- a/official/c61397885.lua +++ b/official/c61397885.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.eqtg) e3:SetOperation(s.eqop) c:RegisterEffect(e3) @@ -41,7 +41,7 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + and aux.StatChangeDamageStepCondition() end function s.mfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) diff --git a/official/c61398234.lua b/official/c61398234.lua index 6ff8c341b3..7e238f81a9 100644 --- a/official/c61398234.lua +++ b/official/c61398234.lua @@ -38,7 +38,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c61399402.lua b/official/c61399402.lua index e762186724..a802a8b79d 100644 --- a/official/c61399402.lua +++ b/official/c61399402.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetValue(s.repval) c:RegisterEffect(e3) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end @@ -45,11 +45,11 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - if chk==0 then return #g>0 and Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x135),tp,LOCATION_MZONE,0,nil)>0 end + if chk==0 then return #g>0 and Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,nil)>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x135),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,nil) if ct<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil) @@ -91,4 +91,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) -end +end \ No newline at end of file diff --git a/official/c61405855.lua b/official/c61405855.lua index 00b175df45..33f2c5830d 100644 --- a/official/c61405855.lua +++ b/official/c61405855.lua @@ -1,4 +1,5 @@ --竜殺しの剣 +--Sword of Dragon's Soul local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)) @@ -36,4 +37,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToEffect(e) then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61411502.lua b/official/c61411502.lua index 14ec872988..fa48f4c766 100644 --- a/official/c61411502.lua +++ b/official/c61411502.lua @@ -30,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61420130.lua b/official/c61420130.lua index 72a7099d4b..2e3cc1987b 100644 --- a/official/c61420130.lua +++ b/official/c61420130.lua @@ -1,6 +1,5 @@ --バージェストマ・ハルキゲニア --Paleozoic Hallucigenia - local s,id=GetID() function s.initial_effect(c) --Targeted monster has its ATK/DEF halved @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -25,9 +24,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -40,31 +36,31 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(tc:GetDefense()/2) tc:RegisterEffect(e2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -77,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -85,12 +81,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c6142213.lua b/official/c6142213.lua index 696397e46f..dbfd6340b0 100644 --- a/official/c6142213.lua +++ b/official/c6142213.lua @@ -1,4 +1,5 @@ --ワンショット・ロケット +--Turbo Rocket local s,id=GetID() function s.initial_effect(c) --damage @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler()==Duel.GetAttacker() -end +end \ No newline at end of file diff --git a/official/c6142488.lua b/official/c6142488.lua index b5edd50757..d10a666c9b 100644 --- a/official/c6142488.lua +++ b/official/c6142488.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} function s.counterfilter(c) - return c:IsSetCard(0xad) or not c:IsSummonLocation(LOCATION_EXTRA) + return c:IsSetCard(SET_FRIGHTFUR) or not c:IsSummonLocation(LOCATION_EXTRA) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -27,17 +27,17 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xad) and c:IsLocation(LOCATION_EXTRA) + return not c:IsSetCard(SET_FRIGHTFUR) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xad) + return not c:IsOriginalSetCard(SET_FRIGHTFUR) end function s.filter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61441708.lua b/official/c61441708.lua index 30227a177f..7e19993e1a 100644 --- a/official/c61441708.lua +++ b/official/c61441708.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -34,12 +34,12 @@ end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if (r&(REASON_DESTROY|REASON_EFFECT))~=(REASON_DESTROY|REASON_EFFECT) then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -62,7 +62,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -72,4 +72,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61459246.lua b/official/c61459246.lua index 323f26a7ad..1e6adfb814 100644 --- a/official/c61459246.lua +++ b/official/c61459246.lua @@ -1,7 +1,6 @@ --夢魔鏡の夢占い --Dream Mirror Oneiromancy --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --While "Dream Mirror of Joy" is on the field, negate the activation of opponent's spell/trap card @@ -26,7 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_DREAM_MIRROR_JOY,CARD_DREAM_MIRROR_TERROR} - function s.condition1(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_DREAM_MIRROR_JOY),tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) diff --git a/official/c61465001.lua b/official/c61465001.lua index f17ee412a3..4b72b842ae 100644 --- a/official/c61465001.lua +++ b/official/c61465001.lua @@ -48,8 +48,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -58,7 +58,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE+ATTRIBUTE_WIND) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE+ATTRIBUTE_WIND) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -97,7 +97,7 @@ function s.desop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(tc:GetBaseAttack()) c:RegisterEffect(e1) end @@ -126,4 +126,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61466310.lua b/official/c61466310.lua index 25191a62be..e1c8271c54 100644 --- a/official/c61466310.lua +++ b/official/c61466310.lua @@ -1,5 +1,5 @@ --帝王の開岩 ---Return of the Monarch +--Return of the Monarchs local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,7 +35,7 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and eg:GetFirst():IsSummonType(SUMMON_TYPE_TRIBUTE) + return ep==tp and eg:GetFirst():IsTributeSummoned() end function s.filter(c,code) return (c:GetAttack()==2400 or c:GetAttack()==2800) and c:GetDefense()==1000 and c:GetCode()~=code and c:IsAbleToHand() @@ -65,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c61468779.lua b/official/c61468779.lua index 3d41284d40..3885e585e4 100644 --- a/official/c61468779.lua +++ b/official/c61468779.lua @@ -1,4 +1,5 @@ --地霊神グランソイル +--Grandsoil the Elemental Lord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -68,12 +69,12 @@ function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()==effp then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,effp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c61472381.lua b/official/c61472381.lua index 50cb9f7f8c..b22cd8f685 100644 --- a/official/c61472381.lua +++ b/official/c61472381.lua @@ -1,7 +1,6 @@ --巧炎星-エランセイ --Brotherhood of the Fire Fist - Eland --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -31,34 +30,33 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={93754402,id} -s.listed_series={0x7c,0x79} - +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.setcfilter(c) return c:IsMonster() and c:IsDiscardable() end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.setcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.setcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.setfilter(c) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end end function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SSet(tp,g:GetFirst()) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + and ep~=tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) and not c:IsCode(id) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and (c:IsSetCard(SET_FIRE_FIST) or c:IsSetCard(SET_FIRE_FORMATION)) and not c:IsCode(id) and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) local nc=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) diff --git a/official/c6148016.lua b/official/c6148016.lua index 175d700e5f..a2f59fe90b 100644 --- a/official/c6148016.lua +++ b/official/c6148016.lua @@ -1,4 +1,5 @@ --ギアギアギア +--Geargiagear local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - return c:IsSetCard(0x1072) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GEARGIANO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -33,7 +34,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) tc=sg:GetNext() @@ -42,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c61480937.lua b/official/c61480937.lua index 7f803a887f..26b4049b05 100644 --- a/official/c61480937.lua +++ b/official/c61480937.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,2}) - e4:SetCost(aux.SelfBanishCost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.tdtg) e4:SetOperation(s.tdop) c:RegisterEffect(e4) diff --git a/official/c61488417.lua b/official/c61488417.lua index ff573a4ec6..adab3dd237 100644 --- a/official/c61488417.lua +++ b/official/c61488417.lua @@ -1,6 +1,5 @@ --光竜星-リフン --Chiwen, Light of the Yang Zing - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Yang Zing" monster from deck @@ -29,16 +28,15 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} s.listed_names={id} - function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -52,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end function s.cfilter(c,tp) - return c:IsSetCard(0x9e) and c:IsReason(REASON_DESTROY) + return c:IsSetCard(SET_YANG_ZING) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -73,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c6150044.lua b/official/c6150044.lua index 4f625601e8..6f9969b4a2 100644 --- a/official/c6150044.lua +++ b/official/c6150044.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion Material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,25652259,90876561,64788463) + Fusion.AddProcMix(c,false,false,CARD_QUEEN_KNIGHT,CARD_JACK_KNIGHT,CARD_KING_KNIGHT) --Negate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -24,15 +24,15 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsStatus(STATUS_BATTLE_DESTROYED) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and tg and tg:IsContains(c) and Duel.IsChainDisablable(ev) end function s.filter(c,tpe) return c:IsType(tpe) and c:IsDiscardable() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local rtype=(re:GetActiveType()&0x7) + local rtype=(re:GetActiveType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,rtype) end - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD,nil,rtype) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD,nil,rtype) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -40,4 +40,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c61505339.lua b/official/c61505339.lua index a27db9ddc2..38d544e975 100644 --- a/official/c61505339.lua +++ b/official/c61505339.lua @@ -1,4 +1,5 @@ --創世神 +--The Creator local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -42,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61525276.lua b/official/c61525276.lua index 1d95d19d74..4a639a013f 100644 --- a/official/c61525276.lua +++ b/official/c61525276.lua @@ -65,19 +65,19 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) hc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) hc:RegisterEffect(e2) if hc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) hc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c61528025.lua b/official/c61528025.lua index 0a134a96b7..5cccce0c64 100644 --- a/official/c61528025.lua +++ b/official/c61528025.lua @@ -1,4 +1,5 @@ --光の追放者 +--Banisher of the Light local s,id=GetID() function s.initial_effect(c) --remove diff --git a/official/c61529473.lua b/official/c61529473.lua index 42b11e82f8..3a6b397be6 100644 --- a/official/c61529473.lua +++ b/official/c61529473.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_SZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.opccost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) diff --git a/official/c61538782.lua b/official/c61538782.lua index 6e54eafd85..479af48689 100644 --- a/official/c61538782.lua +++ b/official/c61538782.lua @@ -35,7 +35,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -46,4 +46,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then s.equipop(c,e,tp,tc) end -end +end \ No newline at end of file diff --git a/official/c61557074.lua b/official/c61557074.lua index 5b2f7553bc..5cee492e47 100644 --- a/official/c61557074.lua +++ b/official/c61557074.lua @@ -1,5 +1,5 @@ --霊神の聖殿 ---Temple of the Elemental Lords +--Palace of the Elemental Lords --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -44,13 +44,13 @@ function s.initial_effect(c) e6:SetProperty(EFFECT_FLAG_CLIENT_HINT) c:RegisterEffect(e6) end -s.listed_series={0x400d} +s.listed_series={SET_ELEMENTSABER} function s.atkval(e,c) local g=Duel.GetMatchingGroup(Card.IsMonster,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil) return g:GetClassCount(Card.GetAttribute)*200 end function s.thfilter(c) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -68,12 +68,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SKIP_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,tp) end @@ -83,5 +83,4 @@ function s.skipcon(e) end function s.condition(e) return e:GetHandler():GetFlagEffect(id)==0 -end - +end \ No newline at end of file diff --git a/official/c61583217.lua b/official/c61583217.lua index 377308e085..fffb03595e 100644 --- a/official/c61583217.lua +++ b/official/c61583217.lua @@ -1,5 +1,5 @@ --サイバネット・ユニバース ---Cybenet Universe +--Cynet Universe local s,id=GetID() function s.initial_effect(c) --Activate @@ -53,7 +53,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) @@ -71,4 +71,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61592395.lua b/official/c61592395.lua index 345f7bc3e1..8ac821eae1 100644 --- a/official/c61592395.lua +++ b/official/c61592395.lua @@ -1,4 +1,5 @@ --アルマの魔導書 +--Spellbook of Eternity local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsSpell() and c:GetCode()~=id and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:GetCode()~=id and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c61606250.lua b/official/c61606250.lua index 8c51db01c2..2e004a61a9 100644 --- a/official/c61606250.lua +++ b/official/c61606250.lua @@ -30,15 +30,15 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_DRAGON) end function s.filter(c,ft,e,tp) - return c:IsFaceup() and c:IsSetCard(0x111) - and Duel.IsExistingMatchingCard(s.opfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode(),ft,e,tp) + return c:IsFaceup() and c:IsSetCard(SET_ARMED_DRAGON) + and Duel.IsExistingMatchingCard(s.opfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetCode(),ft,e,tp) end function s.opfilter(c,code,ft,e,tp) return c:IsMonster() and c:IsCode(code) @@ -52,15 +52,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,ft,e,tp) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.opfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tc:GetCode(),ft,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.opfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tc:GetCode(),ft,e,tp):GetFirst() if not sc then return end aux.ToHandOrElse(sc,tp, function(c) @@ -74,7 +74,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c61613388.lua b/official/c61613388.lua index e041cec051..ea8cdf93ee 100644 --- a/official/c61613388.lua +++ b/official/c61613388.lua @@ -12,20 +12,19 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0xb2} - +s.listed_series={SET_UA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) + return c:IsFaceup() and c:IsSetCard(SET_UA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) return g:GetClassCount(Card.GetCode)>=2 end function s.filter(c,e,tp) - return c:IsSetCard(0xb2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.mzfilter(c,tp) return c:GetSequence()<5 and c:IsControler(tp) @@ -74,7 +73,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) end end diff --git a/official/c61622107.lua b/official/c61622107.lua index 865b7c8eb8..cc050b97d7 100644 --- a/official/c61622107.lua +++ b/official/c61622107.lua @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.SendtoGrave(g1,REASON_RULE,PLAYER_NONE,1-tp) Duel.SendtoGrave(g2,REASON_RULE,PLAYER_NONE,1-tp) -end +end \ No newline at end of file diff --git a/official/c61623148.lua b/official/c61623148.lua index 814be85221..e9ad3f348f 100644 --- a/official/c61623148.lua +++ b/official/c61623148.lua @@ -1,4 +1,5 @@ --暗黒界の書物 +--Dark World Grimoire local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (r&REASON_ADJUST)~=0 + return Duel.IsTurnPlayer(tp) and (r&REASON_ADJUST)~=0 end function s.filter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -39,4 +40,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c61632317.lua b/official/c61632317.lua index 600a810040..5c4498f25a 100644 --- a/official/c61632317.lua +++ b/official/c61632317.lua @@ -1,4 +1,5 @@ --ダーク・スプロケッター +--Sinister Sprocket local s,id=GetID() function s.initial_effect(c) --destroy @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61639289.lua b/official/c61639289.lua index 61f74ff44b..a7dd2cd5fd 100644 --- a/official/c61639289.lua +++ b/official/c61639289.lua @@ -1,4 +1,5 @@ --イグナイト・イーグル +--Igknight Crusader local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c61641818.lua b/official/c61641818.lua index c4f4faf1b2..704f551b45 100644 --- a/official/c61641818.lua +++ b/official/c61641818.lua @@ -1,5 +1,5 @@ --電脳堺龍-龍々 ---Datascape Dragon - Longlong +--Virtual World Dragon - Longlong --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -37,21 +37,16 @@ function s.ntcon(e) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - or not re:IsActiveType(TYPE_MONSTER) or not Duel.IsChainNegatable(ev) then return false end + or not re:IsMonsterEffect() or not Duel.IsChainNegatable(ev) then return false end local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) if #g==0 then return false end local rc=re:GetHandler() return not g:IsExists(Card.IsAttribute,1,nil,rc:GetAttribute()) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) end - c:RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) -end +end \ No newline at end of file diff --git a/official/c61654098.lua b/official/c61654098.lua index a021a44fda..c3e05ffabe 100644 --- a/official/c61654098.lua +++ b/official/c61654098.lua @@ -1,4 +1,5 @@ --星遺物との邂逅 +--World Legacy Discovery local s,id=GetID() function s.initial_effect(c) --activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xfd)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_WORLD_CHALICE)) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetValue(300) c:RegisterEffect(e2) @@ -31,16 +32,16 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xfd} +s.listed_series={SET_WORLD_CHALICE} function s.spcfilter(c,tp,rp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousSetCard(0xfd) + return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousSetCard(SET_WORLD_CHALICE) and (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT))) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp,rp) end function s.filter(c,e,tp) - return c:IsSetCard(0xfd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_WORLD_CHALICE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c6165656.lua b/official/c6165656.lua index dcad570b57..af808fc0da 100644 --- a/official/c6165656.lua +++ b/official/c6165656.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetOperation(s.winop) c:RegisterEffect(e4) end -s.listed_series={0x95} +s.listed_series={SET_RANK_UP_MAGIC} s.listed_names={48995978} s.xyz_number=88 s.rum_limit=function(c,e) @@ -65,11 +65,7 @@ s.rum_xyzsummon=function(c) end --target check is in RUM magic cards function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x95) and se:GetHandler():IsSpell() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return se:GetHandler():IsSetCard(SET_RANK_UP_MAGIC) and se:GetHandler():IsSpell() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -82,8 +78,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.wincon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetLP(1-tp)<=2000 and e:GetHandler():GetOverlayCount()==0 + return Duel.IsTurnPlayer(tp) and Duel.GetLP(1-tp)<=2000 and e:GetHandler():GetOverlayCount()==0 end function s.winop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(tp,WIN_REASON_DISASTER_LEO) -end +end \ No newline at end of file diff --git a/official/c61656650.lua b/official/c61656650.lua index d0211dd4f8..c1206abf3f 100644 --- a/official/c61656650.lua +++ b/official/c61656650.lua @@ -36,4 +36,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(tc) Duel.ChangeTargetCard(ev,g) end -end +end \ No newline at end of file diff --git a/official/c61668670.lua b/official/c61668670.lua index 409cb1edf3..f3aad83f85 100644 --- a/official/c61668670.lua +++ b/official/c61668670.lua @@ -50,7 +50,7 @@ function s.spfilter(c,e,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -60,7 +60,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and zone~=0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)>0 then c:AddCounter(0x20c,1) diff --git a/official/c61677004.lua b/official/c61677004.lua index 15ffb23f6d..03fa4af3ee 100644 --- a/official/c61677004.lua +++ b/official/c61677004.lua @@ -1,4 +1,5 @@ --捕食植物ダーリング・コブラ +--Predaplant Darlingtonia Cobra local s,id=GetID() function s.initial_effect(c) --search @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x10f3,0x46} +s.listed_series={SET_PREDAPLANT,SET_FUSION} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x10f3) + return re and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_PREDAPLANT) end function s.thfilter(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -32,4 +33,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c61679541.lua b/official/c61679541.lua index 1ac9bfd6f2..678004fd6b 100644 --- a/official/c61679541.lua +++ b/official/c61679541.lua @@ -1,4 +1,5 @@ --BK ラビット・パンチャー +--Battlin' Boxer Rabbit Puncher local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,4 +23,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if d~=nil and d:IsRelateToBattle() and d:IsDefensePos() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c61681816.lua b/official/c61681816.lua index 244d2a4d26..8703f8eedf 100644 --- a/official/c61681816.lua +++ b/official/c61681816.lua @@ -1,9 +1,9 @@ --- プロパ・ガンダケ --- Propa Gandake --- Scripted by Hatter +--プロパ・ガンダケ +--Propa Gandake +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Change race + --Change race local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -29,23 +29,23 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local race=e:GetLabel() if race<=0 or not c:IsRelateToEffect(e) then return end - -- Change this card's race + --Change this card's race local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetRange(LOCATION_MZONE) e1:SetValue(race) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) if not c:IsImmuneToEffect(e) and c:IsRace(race) then - -- Change other monsters' race + --Change other monsters' race local e2=e1:Clone() e2:SetType(EFFECT_TYPE_FIELD) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTarget(function(e,c) return c~=e:GetHandler() end) e2:SetValue(function(e) return e:GetHandler():GetRace() end) c:RegisterEffect(e2) - -- Cannot target monsters with the same race as this card + --Cannot target monsters with the same race as this card local e3=e2:Clone() e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -57,6 +57,6 @@ end function s.value(e,re,rp) local rc=e:GetHandler():GetRace() local trig_rc,eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_RACE,CHAININFO_TRIGGERING_EFFECT) - return re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE + return re:IsMonsterEffect() and re:GetActivateLocation()==LOCATION_MZONE and (re:GetHandler():IsRace(rc) or (eff==re and trig_rc==rc)) and aux.tgoval(e,re,rp) end \ No newline at end of file diff --git a/official/c61692648.lua b/official/c61692648.lua index 10b8a1d8f1..4fc9cfbe5f 100644 --- a/official/c61692648.lua +++ b/official/c61692648.lua @@ -1,4 +1,5 @@ --勇気機関車ブレイブポッポ +--Lionhearted Locomotive local s,id=GetID() function s.initial_effect(c) --atkup @@ -15,7 +16,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(math.ceil(c:GetBaseAttack()/2)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c61705417.lua b/official/c61705417.lua index 1a0e6b11e5..78c94020a8 100644 --- a/official/c61705417.lua +++ b/official/c61705417.lua @@ -1,4 +1,5 @@ --墓荒らし +--Graverobber local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) - tc:RegisterFlagEffect(id,RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TODECK|RESET_PHASE|PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -35,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TODECK|RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCondition(s.actcon) e3:SetOperation(s.actop) e3:SetLabelObject(tc) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -51,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetCondition(s.damcon) e4:SetOperation(s.damop) e4:SetLabelObject(tc) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end end @@ -77,4 +78,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) re:GetHandler():ResetFlagEffect(id+1) Duel.Damage(tp,2000,REASON_EFFECT) e:Reset() -end +end \ No newline at end of file diff --git a/official/c6172122.lua b/official/c6172122.lua index 0d689d4216..5cc6b2ada2 100644 --- a/official/c6172122.lua +++ b/official/c6172122.lua @@ -18,7 +18,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetDescription(aux.Stringid(id,1)) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -43,7 +43,7 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(CARD_REDEYES_B_DRAGON) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -52,4 +52,4 @@ function s.fcheck(tp,sg,fc,sumtype,tp) end function s.ffilter(c,fc,sumtype,tp) return c:IsSetCard(SET_RED_EYES,fc,sumtype,tp) and (not fc.material or c:IsSummonCode(fc,sumtype,tp,fc.material)) -end +end \ No newline at end of file diff --git a/official/c61728808.lua b/official/c61728808.lua index 61b314e698..a17a27c8e4 100644 --- a/official/c61728808.lua +++ b/official/c61728808.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe1),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_METALFOES),2,2) --equip or special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -18,17 +18,17 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) and e:GetHandler():IsReason(REASON_EFFECT) end function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xe1) and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_METALFOES) and (ft>0 or c:GetSequence()<5) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local b1=Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xe1) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + local b1=Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,SET_METALFOES) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local b2=Duel.IsExistingTarget(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,ft) if chk==0 then return b1 or b2 end local op=0 @@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e:SetLabel(op) if op==0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,0xe1) + local g=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_MZONE,0,1,1,nil,SET_METALFOES) e:SetCategory(CATEGORY_EQUIP) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) else @@ -62,13 +62,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) elseif e:GetLabel()==1 and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c61737116.lua b/official/c61737116.lua index c8012e697e..52b2387de3 100644 --- a/official/c61737116.lua +++ b/official/c61737116.lua @@ -1,4 +1,5 @@ --六武衆のご隠居 +--Elder of the Six Samurai local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,4 +16,4 @@ function s.spcon(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c61740673.lua b/official/c61740673.lua index 8f5ce31a95..57955db450 100644 --- a/official/c61740673.lua +++ b/official/c61740673.lua @@ -1,4 +1,5 @@ --王宮の勅命 +--Imperial Order local s,id=GetID() function s.initial_effect(c) --activate @@ -25,7 +26,7 @@ function s.initial_effect(c) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetOperation(s.mtop) @@ -36,7 +37,7 @@ function s.distarget(e,c) end function s.disoperation(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if (tl&LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then + if (tl&LOCATION_SZONE)~=0 and re:IsSpellEffect() then Duel.NegateEffect(ev) end end @@ -46,4 +47,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c61757117.lua b/official/c61757117.lua index 31d271701e..fb0324c0a8 100644 --- a/official/c61757117.lua +++ b/official/c61757117.lua @@ -1,4 +1,5 @@ --救世の美神ノースウェムコ +--Divine Grace - Northwemko local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -24,7 +25,7 @@ function s.initial_effect(c) end s.listed_names={60234913} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsFaceup() and chkc~=e:GetHandler() end @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():GetCardTargetCount()>0 -end +end \ No newline at end of file diff --git a/official/c61764082.lua b/official/c61764082.lua index 2d1b77a23d..c67edcfd74 100644 --- a/official/c61764082.lua +++ b/official/c61764082.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(0x11a) + return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(SET_DINOWRESTLER) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,5 +43,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,c) - return c:IsSetCard(0x11a) and c~=e:GetHandler() + return c:IsSetCard(SET_DINOWRESTLER) and c~=e:GetHandler() end \ No newline at end of file diff --git a/official/c61777313.lua b/official/c61777313.lua index 4276fff601..bbf9dd00e5 100644 --- a/official/c61777313.lua +++ b/official/c61777313.lua @@ -1,4 +1,5 @@ --極星天ヴァナディース +--Vanadis of the Nordic Ascendant local s,id=GetID() function s.initial_effect(c) --synchro substitute @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SYNCHRO_MAT_RESTRICTION) - e2:SetValue(aux.TargetBoolFunction(Card.IsSetCard,0x42)) + e2:SetValue(aux.TargetBoolFunction(Card.IsSetCard,SET_NORDIC)) c:RegisterEffect(e2) --level change local e3=Effect.CreateEffect(c) @@ -24,10 +25,10 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.cfilter(c,lv) local clv=c:GetLevel() - return c:IsSetCard(0x42) and clv>0 and clv~=lv and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_NORDIC) and clv>0 and clv~=lv and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) end diff --git a/official/c6178850.lua b/official/c6178850.lua index 787e696e7c..b7012ec71c 100644 --- a/official/c6178850.lua +++ b/official/c6178850.lua @@ -1,4 +1,5 @@ --ファイティング・スピリッツ +--Fighting Spirit local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -27,5 +28,5 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,c,96) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c61791132.lua b/official/c61791132.lua index f772a84700..12ff97b24d 100644 --- a/official/c61791132.lua +++ b/official/c61791132.lua @@ -1,4 +1,5 @@ --マリスボラス・フォーク +--Malicevorous Fork local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c61802346.lua b/official/c61802346.lua index 7a4e06ec80..4b654609e8 100644 --- a/official/c61802346.lua +++ b/official/c61802346.lua @@ -1,6 +1,5 @@ --ブリザード・ドラゴン --Blizzard Dragon - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot attack or change its battle position @@ -22,14 +21,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then --Cannot attack local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) --Cannot change its battle position local e2=Effect.CreateEffect(e:GetHandler()) @@ -37,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c61807040.lua b/official/c61807040.lua index 7b51c6dc59..92014ed4ca 100644 --- a/official/c61807040.lua +++ b/official/c61807040.lua @@ -1,4 +1,5 @@ --フルエルフ +--Flelf local s,id=GetID() function s.initial_effect(c) --lvup @@ -29,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c6180710.lua b/official/c6180710.lua index 3e46671c9c..71cc4ca435 100644 --- a/official/c6180710.lua +++ b/official/c6180710.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 end @@ -72,7 +72,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1000) c:RegisterEffect(e1,true) --Banish it if it leaves the field @@ -82,7 +82,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetValue(LOCATION_REMOVED) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e2,true) --Take no damage from the activated effect local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID) diff --git a/official/c61818176.lua b/official/c61818176.lua index aef725ec47..03f186917e 100644 --- a/official/c61818176.lua +++ b/official/c61818176.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c6182103.lua b/official/c6182103.lua index 6b29cf82b6..354df79034 100644 --- a/official/c6182103.lua +++ b/official/c6182103.lua @@ -1,13 +1,10 @@ --究極体ミュートリアス --Myutant Ultimus ---Logical Nonsense - ---Substitute ID +--scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving c:EnableReviveLimit() - --Fusion Summon procedure + --Fusion Materials: 3 Level 8 or higher "Myutant" monsters Fusion.AddProcMixN(c,true,true,s.ffilter,3) --Negate the activation of card/effect local e1=Effect.CreateEffect(c) @@ -37,34 +34,27 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end - --Lists "Myutant" archetype -s.listed_series={0x159} - - --3 level 8+ "Myutant" monsters +s.listed_series={SET_MYUTANT} function s.ffilter(c,fc,sumtype,tp) - return c:IsLevelAbove(8) and c:IsSetCard(0x159,fc,sumtype,tp) + return c:IsLevelAbove(8) and c:IsSetCard(SET_MYUTANT,fc,sumtype,tp) end - --Card/effect activated function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end - --Check for "Myutant" card function s.cfilter(c,rtype) - return c:IsSetCard(0x159) and (not c:IsOnField() or c:IsFaceup()) and c:IsType(rtype) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MYUTANT) and (not c:IsOnField() or c:IsFaceup()) and c:IsType(rtype) and c:IsAbleToRemoveAsCost() end - --Banish 1 "Myutant" card from hand/face-up field/GY with same card type as activated card/effect as cost function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rtype=(re:GetActiveType()&0x7) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,rtype) end - local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,rtype) + local rtype=(re:GetActiveType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil,rtype) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil,rtype) Duel.Remove(rg,POS_FACEUP,REASON_COST) end - --Activation legality function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() local relation=rc:IsRelateToEffect(re) - if chk==0 then return rc:IsAbleToRemove(tp) - or (not relation and Duel.IsPlayerCanRemove(tp)) end + if chk==0 then return rc:IsAbleToRemove(tp) or (not relation and Duel.IsPlayerCanRemove(tp)) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if relation then Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,rc:GetControler(),rc:GetLocation()) @@ -72,36 +62,28 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,rc:GetPreviousLocation()) end end - --Negate the activation of card/effect, and if you do, banish it function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) end end - --If this fusion summoned card was destroyed by opponent's card function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousControler(tp) + return rp==1-tp and c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end - --Check for a face-up banished "Myutant" card function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x159) and c:IsAbleToHand() -end -function s.classf(c) - return c:GetType()&0x7 + return c:IsFaceup() and c:IsSetCard(SET_MYUTANT) and c:IsAbleToHand() end function s.ctcheck(sg,e,tp) - return sg:GetClassCount(s.classf)==#sg + return sg:GetClassCount(Card.GetMainCardType)==#sg end - --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) end - --Add up to 3 of your banished "Myutant" cards to hand function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil) + if #g==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,1,3,s.ctcheck,1,tp,HINTMSG_ATOHAND) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) diff --git a/official/c61831093.lua b/official/c61831093.lua index db1f5cb39f..4ebba0881c 100644 --- a/official/c61831093.lua +++ b/official/c61831093.lua @@ -1,4 +1,5 @@ --ドッペルゲンガー +--Greenkappa local s,id=GetID() function s.initial_effect(c) --flip @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not tg then return end local dg=tg:Filter(s.dfilter,nil,e) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61840587.lua b/official/c61840587.lua index a201404783..01e41ef3ad 100644 --- a/official/c61840587.lua +++ b/official/c61840587.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetLabelObject(e1) c:RegisterEffect(e3) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.filter(c,e,tp) - return c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BATTERYMAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -63,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=sg:GetFirst() while tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) do c:SetCardTarget(tc) - tc:CreateRelation(c,RESET_EVENT+0x1020000) + tc:CreateRelation(c,RESET_EVENT|RESET_TURN_SET|RESET_TOFIELD) tc=sg:GetNext() end e:SetLabelObject(sg) @@ -92,4 +92,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61844784.lua b/official/c61844784.lua index d4ef79d9d7..d13ce9f6a9 100644 --- a/official/c61844784.lua +++ b/official/c61844784.lua @@ -1,4 +1,5 @@ --マジック・ガードナー +--Magic Reflector local s,id=GetID() function s.initial_effect(c) --destroy rep @@ -29,7 +30,7 @@ function s.addc(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetTarget(s.reptg) e1:SetOperation(s.repop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -40,4 +41,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,0x102a,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61850482.lua b/official/c61850482.lua index 56807d1d43..bd60a04a44 100644 --- a/official/c61850482.lua +++ b/official/c61850482.lua @@ -1,6 +1,5 @@ --レベル調整 --Level Modulation - local s,id=GetID() function s.initial_effect(c) --Opponent draws 2, then you special summon 1 "LV" monster from GY @@ -13,10 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x41} - +s.listed_series={SET_LV} function s.filter(c,e,tp) - return c:IsSetCard(0x41) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_LV) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -40,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) --Cannot apply its effects local e2=Effect.CreateEffect(c) @@ -48,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2,true) --Cannot activate its effects local e3=Effect.CreateEffect(c) @@ -56,6 +54,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3,true) end \ No newline at end of file diff --git a/official/c61854111.lua b/official/c61854111.lua index f3d47f5fe9..a07622c18e 100644 --- a/official/c61854111.lua +++ b/official/c61854111.lua @@ -1,4 +1,5 @@ --伝説の剣 +--Legendary Sword local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c6186304.lua b/official/c6186304.lua index 8bfd7e1391..8da5cf532a 100644 --- a/official/c6186304.lua +++ b/official/c6186304.lua @@ -61,14 +61,14 @@ end s.listed_names={83965310} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thfilter(c) return c:IsCode(83965310) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) @@ -80,7 +80,7 @@ function s.plasmacon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,83965310),e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) end function s.drawcon(e) - return Duel.GetCurrentPhase()==PHASE_DRAW + return Duel.IsPhase(PHASE_DRAW) end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsMonster,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*100 diff --git a/official/c61884774.lua b/official/c61884774.lua index 9d5231ae27..0406a48ebf 100644 --- a/official/c61884774.lua +++ b/official/c61884774.lua @@ -1,5 +1,5 @@ --妖仙獣の神颪 ---Yosenju's Divine Mountain Winds +--Yosenju Oroshi Channeling local s,id=GetID() function s.initial_effect(c) --activate @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetValue(s.zones) c:RegisterEffect(e1) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.zones(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and 0xff or 0xe end @@ -21,7 +21,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.thfilter(c) - return c:IsSetCard(0xb3) and c:IsLevelAbove(5) and c:IsAbleToHand() + return c:IsSetCard(SET_YOSENJU) and c:IsLevelAbove(5) and c:IsAbleToHand() end function s.pzfilter(c,cd) return c:IsCode(cd) and not c:IsForbidden() @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end local op=e:GetLabel() @@ -77,8 +77,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(tc2,tp,tp,LOCATION_PZONE,POS_FACEUP,true) local fid=c:GetFieldID() - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1,fid) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,1,fid) + tc1:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,0,1,fid) + tc2:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,0,1,fid) local sg=Group.FromCards(tc1,tc2) sg:KeepAlive() local e1=Effect.CreateEffect(c) @@ -90,19 +90,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(sg) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end end function s.splimit(e,c) - return not c:IsSetCard(0xb3) + return not c:IsSetCard(SET_YOSENJU) end function s.desfilter(c,fid) return c:GetFlagEffectLabel(id)==fid end function s.descon(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() - if Duel.GetTurnPlayer()==tp then return false end + if Duel.IsTurnPlayer(tp) then return false end if not g:IsExists(s.desfilter,1,nil,e:GetLabel()) then g:DeleteGroup() e:Reset() diff --git a/official/c61888819.lua b/official/c61888819.lua index f738b7cd06..8ebcb87b5e 100644 --- a/official/c61888819.lua +++ b/official/c61888819.lua @@ -1,6 +1,7 @@ --インヴェルズ・オリジン --Steelswarm Origin --force effect scripted by edo9300 +local ALL_EMZ=0x600060 --0x60 for your EMZs, 0x60<<16 for your opponent's EMZs local s,id=GetID() function s.initial_effect(c) --link summon @@ -45,13 +46,13 @@ function s.initial_effect(c) end s.listed_series={SET_LSWARM} function s.fmval(e,c,fp,rp,r) - return e:GetHandler():GetLinkedZone(rp)|0x600060 + return e:GetHandler():GetLinkedZone(rp)|ALL_EMZ end function s.indcon(e) return #(e:GetHandler():GetLinkedGroup():Filter(Card.IsMonster,nil))>0 end function s.cfilter(c) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -73,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,ft,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c61901281.lua b/official/c61901281.lua index 9081784377..91f0d0069e 100644 --- a/official/c61901281.lua +++ b/official/c61901281.lua @@ -40,14 +40,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -79,4 +79,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c61912252.lua b/official/c61912252.lua index 6082ae7189..2a2e1ab897 100644 --- a/official/c61912252.lua +++ b/official/c61912252.lua @@ -1,5 +1,5 @@ --無限起動トレンチャー ---Infinite Ignition Trencher +--Infinitrack Trencher --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -22,13 +22,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x127} +s.listed_series={SET_INFINITRACK} function s.cfilter(c,tp) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) and (Duel.GetMZoneCount(tp,c,tp)>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x127) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_INFINITRACK) and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -65,4 +65,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c61936647.lua b/official/c61936647.lua index d0ee1ee739..ab554e8616 100644 --- a/official/c61936647.lua +++ b/official/c61936647.lua @@ -1,9 +1,8 @@ --幻影剣 --Phantom Knights' Sword - local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,nil,aux.FilterBoolFunction(Card.IsFaceup),CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,s.condition) + aux.AddPersistentProcedure(c,nil,aux.FilterBoolFunction(Card.IsFaceup),CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,aux.StatChangeDamageStepCondition) --Targeted monster gains 800 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -40,18 +39,14 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,id) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10db} - -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.repfilter(c,e) - return aux.PersistentTargetFilter(e,c) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return aux.PersistentTargetFilter(e,c) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDestructable(e) and eg:IsExists(s.repfilter,1,nil,e) @@ -62,7 +57,7 @@ function s.repval(e,c) return s.repfilter(c,e) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -74,7 +69,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -87,13 +82,13 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then + if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c61950680.lua b/official/c61950680.lua index 01412a68fa..b1d6b6dad9 100644 --- a/official/c61950680.lua +++ b/official/c61950680.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCost(s.rmcost) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) diff --git a/official/c61962135.lua b/official/c61962135.lua index ce8fb0fa4e..fc2af212fb 100644 --- a/official/c61962135.lua +++ b/official/c61962135.lua @@ -1,4 +1,5 @@ --閃光のイリュージョン +--Glorious Illusion local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,9 +39,9 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.filter(c,e,tp) - return c:IsSetCard(0x38) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LIGHTSWORN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -83,4 +84,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c61965407.lua b/official/c61965407.lua index a467f460bb..d47ce9801f 100644 --- a/official/c61965407.lua +++ b/official/c61965407.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_SZONE) e2:SetHintTiming(TIMING_STANDBY_PHASE,TIMING_STANDBY_PHASE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.thcon) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.tgcon) e3:SetTarget(s.tgtg) e3:SetOperation(s.tgop) @@ -43,12 +43,12 @@ function s.initial_effect(c) e4:SetCondition(s.sdcon) c:RegisterEffect(e4) end -s.listed_series={0xbb} +s.listed_series={SET_INFERNOID} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.thfilter(c) - return c:IsSetCard(0xbb) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_INFERNOID) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -66,10 +66,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xbb) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_INFERNOID) and c:IsMonster() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.tgfilter(chkc) end @@ -82,12 +82,12 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end end function s.sdfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xbb) + return c:IsFacedown() or not c:IsSetCard(SET_INFERNOID) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c61968753.lua b/official/c61968753.lua index 0ec3daccf8..b61783b48e 100644 --- a/official/c61968753.lua +++ b/official/c61968753.lua @@ -1,6 +1,5 @@ --バブル・シャッフル --Bubble Shuffle - local s,id=GetID() function s.initial_effect(c) --Tribute "Elemental HERO Bubbleman", then special summon 1 "Elemental HERO" monster from hand @@ -14,9 +13,8 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} s.listed_names={79979666} - function s.filter1(c,ft) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() and c:IsCode(79979666) and (ft>0 or c:GetSequence()<5) @@ -25,7 +23,7 @@ function s.filter2(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -59,4 +57,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c61976639.lua b/official/c61976639.lua index e60653cb18..f9f3e0b48a 100644 --- a/official/c61976639.lua +++ b/official/c61976639.lua @@ -1,7 +1,6 @@ --シークレット・パスフレーズ --Secret Password --Scripted by AlphaKretin and Naim - local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,28 +13,27 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x153,0x154,0x155,0x156} - +s.listed_series={SET_KI_SIKIL,SET_LIL_LA,SET_EVIL_TWIN,SET_LIVE_TWIN} function s.thfilter(c,add) - local c1=(c:IsSetCard(0x155) or c:IsSetCard(0x156)) and c:IsSpellTrap() - local c2=c:IsSetCard(0x155) and c:IsMonster() + local c1=(c:IsSetCard(SET_EVIL_TWIN) or c:IsSetCard(SET_LIVE_TWIN)) and c:IsSpellTrap() + local c2=c:IsSetCard(SET_EVIL_TWIN) and c:IsMonster() return (c1 or (add and c2)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local add=g:IsExists(Card.IsSetCard,1,nil,0x153) and g:IsExists(Card.IsSetCard,1,nil,0x154) + local add=g:IsExists(Card.IsSetCard,1,nil,SET_KI_SIKIL) and g:IsExists(Card.IsSetCard,1,nil,SET_LIL_LA) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,add) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local add=g:IsExists(Card.IsSetCard,1,nil,0x153) and g:IsExists(Card.IsSetCard,1,nil,0x154) + local add=g:IsExists(Card.IsSetCard,1,nil,SET_KI_SIKIL) and g:IsExists(Card.IsSetCard,1,nil,SET_LIL_LA) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,add) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c62000467.lua b/official/c62000467.lua index 8d9da0241c..02427946b7 100644 --- a/official/c62000467.lua +++ b/official/c62000467.lua @@ -1,11 +1,11 @@ --剣闘獣ドラガシス ---Gladiator Beast Dragacius +--Gladiator Beast Dragases --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x19),2,2) + Link.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GLADIATOR),2,2) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -30,7 +30,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,0)) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetRange(LOCATION_MZONE) e6:SetCountLimit(1,id) e6:SetCondition(s.spcon) @@ -39,14 +39,14 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.indtg(e,c) - return c:IsSetCard(0x19) and Duel.GetAttacker()==c + return c:IsSetCard(SET_GLADIATOR) and Duel.GetAttacker()==c end function s.actcon(e) local tc=Duel.GetAttacker() local tp=e:GetHandlerPlayer() - return tc and tc:IsControler(tp) and tc:IsSetCard(0x19) + return tc and tc:IsControler(tp) and tc:IsSetCard(SET_GLADIATOR) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 @@ -54,10 +54,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,125,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,125,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -84,8 +84,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sg1:Merge(sg2) Duel.SpecialSummonStep(tc1,125,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc2,125,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(tc1:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) - tc2:RegisterFlagEffect(tc2:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc1:RegisterFlagEffect(tc1:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) + tc2:RegisterFlagEffect(tc2:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) Duel.SpecialSummonComplete() end end \ No newline at end of file diff --git a/official/c62007535.lua b/official/c62007535.lua index c61c2e6e31..77201514a1 100644 --- a/official/c62007535.lua +++ b/official/c62007535.lua @@ -1,4 +1,5 @@ --インヴェルズ・ホーン +--Steelswarm Longhorn local s,id=GetID() function s.initial_effect(c) --summon success @@ -16,17 +17,17 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then + if g:IsExists(Card.IsSetCard,1,nil,SET_STEELSWARM) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -40,7 +41,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -59,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62015408.lua b/official/c62015408.lua index 7f15e9b7a1..639fa5781e 100644 --- a/official/c62015408.lua +++ b/official/c62015408.lua @@ -1,4 +1,5 @@ --浮幽さくら +--Ghost Reaper & Winter Cherries local s,id=GetID() function s.initial_effect(c) --remove @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,10 +20,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 @@ -43,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleExtra(1-tp) end -end +end \ No newline at end of file diff --git a/official/c62017867.lua b/official/c62017867.lua index c71f6c23f9..25e448a1c2 100644 --- a/official/c62017867.lua +++ b/official/c62017867.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c62023839.lua b/official/c62023839.lua index d6ad5e38c8..f7864fa7f1 100644 --- a/official/c62023839.lua +++ b/official/c62023839.lua @@ -1,4 +1,5 @@ --フィッシュボーグ-アーチャー +--Fishborg Archer local s,id=GetID() function s.initial_effect(c) --spsummon @@ -22,7 +23,7 @@ function s.cfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,10 +35,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetCountLimit(1) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -50,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6203182.lua b/official/c6203182.lua index dee30fa3a5..9b37acf47a 100644 --- a/official/c6203182.lua +++ b/official/c6203182.lua @@ -1,5 +1,5 @@ --一惜二跳 ---Two Toads with One Hop +--Two Toads with One Sting --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -69,13 +69,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_EQUIP_LIMIT) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD) + e0:SetReset(RESET_EVENT|RESETS_STANDARD) e0:SetValue(s.eqlimit) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -119,4 +119,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c62034800.lua b/official/c62034800.lua index 49e5bf757e..2a6e44010c 100644 --- a/official/c62034800.lua +++ b/official/c62034800.lua @@ -1,5 +1,5 @@ --無限起動ロックアンカー ---Infinite Ignition Rockanchor +--Infinitrack Anchor Drill --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -68,7 +68,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(lv) oc:RegisterEffect(e1) end diff --git a/official/c62038047.lua b/official/c62038047.lua index 122855a429..26bd43062c 100644 --- a/official/c62038047.lua +++ b/official/c62038047.lua @@ -1,4 +1,5 @@ --不知火の鍛師 +--Shiranui Smith local s,id=GetID() function s.initial_effect(c) --to hand @@ -22,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xd9) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SHIRANUI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -50,10 +51,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.target) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) end function s.target(e,c) return c:IsRace(RACE_ZOMBIE) -end +end \ No newline at end of file diff --git a/official/c62054060.lua b/official/c62054060.lua index edd0b1273c..5105ddf660 100644 --- a/official/c62054060.lua +++ b/official/c62054060.lua @@ -1,4 +1,5 @@ --平穏の賢者 +--Sage of Stillness local s,id=GetID() function s.initial_effect(c) --destroy @@ -23,12 +24,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.accon) e1:SetValue(s.aclimit) e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.accon(e) return e:GetLabel()~=Duel.GetTurnCount() end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() +end \ No newline at end of file diff --git a/official/c6205579.lua b/official/c6205579.lua index 35cba85558..ce343ee6c0 100644 --- a/official/c6205579.lua +++ b/official/c6205579.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) + return e:GetHandler():IsLocation(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL -end +end \ No newline at end of file diff --git a/official/c62070231.lua b/official/c62070231.lua index 6f089a7d2a..8add1a1627 100644 --- a/official/c62070231.lua +++ b/official/c62070231.lua @@ -1,4 +1,5 @@ --No.94 極氷姫クリスタル・ゼロ +--Number 94: Crystalzero local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,20 +14,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=94 -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -40,11 +34,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - if Duel.GetTurnPlayer()~=tp then - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + if Duel.IsTurnPlayer(1-tp) then + e1:SetReset(RESETS_STANDARD_PHASE_END,2) else - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) end tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c62089826.lua b/official/c62089826.lua index da24e9ed7b..0b4e9da4c3 100644 --- a/official/c62089826.lua +++ b/official/c62089826.lua @@ -1,15 +1,15 @@ --- 真の光 --- True Light --- Scripted by Hatter +--真の光 +--True Light +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) - -- Targeting immunity + --Targeting immunity local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_BLUEEYES_W_DRAGON)) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) - -- Destroy + --Destroy local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) - -- Special Summon + --Special Summon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -40,7 +40,7 @@ function s.initial_effect(c) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) - -- Set Spell/Trap + --Set Spell/Trap local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,2)) e5:SetType(EFFECT_TYPE_QUICK_O) @@ -72,22 +72,22 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.setfilter(c,tp) return c:IsSpellTrap() and c:IsSSetable() and c:ListsCode(CARD_BLUEEYES_W_DRAGON) - and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,tp) end @@ -99,4 +99,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp) if #sg==0 then return end Duel.SSet(tp,sg) -end +end \ No newline at end of file diff --git a/official/c62091148.lua b/official/c62091148.lua index 6b12eff3ed..5c9bf39692 100644 --- a/official/c62091148.lua +++ b/official/c62091148.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(Fusion.SummonEffTG(params)) e2:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e2) diff --git a/official/c62107612.lua b/official/c62107612.lua index e80351b603..8aa15fc27d 100644 --- a/official/c62107612.lua +++ b/official/c62107612.lua @@ -1,4 +1,5 @@ --ディメンション・ワンダラー +--Dimension Wanderer local s,id=GetID() function s.initial_effect(c) --damage @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,10 +20,6 @@ s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.condition(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 and re and re:GetHandler():IsCode(CARD_GALAXYEYES_P_DRAGON) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -32,4 +29,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c62107981.lua b/official/c62107981.lua index 5f8ffa0590..964456b883 100644 --- a/official/c62107981.lua +++ b/official/c62107981.lua @@ -1,4 +1,5 @@ --E・HERO クノスペ +--Elemental HERO Knospe local s,id=GetID() function s.initial_effect(c) --direct attack @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetValue(aux.imval1) c:RegisterEffect(e3) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.adcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end @@ -37,7 +38,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -46,8 +47,8 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.atcon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c62111090.lua b/official/c62111090.lua index 5a007a39ed..88f586a6f2 100644 --- a/official/c62111090.lua +++ b/official/c62111090.lua @@ -35,23 +35,23 @@ end s.listed_names={id} function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsSummonType(SUMMON_TYPE_FUSION) then return end + if not c:IsFusionSummoned() then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end diff --git a/official/c62121.lua b/official/c62121.lua index 8539780598..74c01662f2 100644 --- a/official/c62121.lua +++ b/official/c62121.lua @@ -26,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.atktg) e1:SetValue(200) e1:SetLabel(fid) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -35,19 +35,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.atkcon) e3:SetOperation(s.atkop) e3:SetLabelObject(e2) e3:SetLabel(2) - e3:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,4) + e3:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,4) c:RegisterEffect(e3) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -55,4 +55,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetValue(ct*200) e:GetLabelObject():GetLabelObject():SetValue(ct*200) e:SetLabel(ct+1) -end +end \ No newline at end of file diff --git a/official/c62125438.lua b/official/c62125438.lua index 6f8e8b2cb3..0c86a3f8fc 100644 --- a/official/c62125438.lua +++ b/official/c62125438.lua @@ -8,8 +8,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1017)) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYNCHRON)) c:RegisterEffect(e1) --search local e2=Effect.CreateEffect(c) @@ -25,23 +25,23 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={62125439} -s.listed_series={0x1017} +s.listed_series={SET_SYNCHRON} function s.filter(c,tp) - return c:IsSetCard(0x1017) and c:IsMonster() and c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) + return c:IsSetCard(SET_SYNCHRON) and c:IsMonster() and c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.filter,1,nil,tp) and r==REASON_SYNCHRO and re:GetHandler():IsRace(RACE_WARRIOR+RACE_MACHINE) + return eg:IsExists(s.filter,1,nil,tp) and r==REASON_SYNCHRO and re:GetHandler():IsRace(RACE_WARRIOR|RACE_MACHINE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x1017,TYPES_TOKEN,1000,0,2,RACE_MACHINE,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SYNCHRON,TYPES_TOKEN,1000,0,2,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x1017,TYPES_TOKEN,1000,0,2,RACE_MACHINE,ATTRIBUTE_EARTH) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SYNCHRON,TYPES_TOKEN,1000,0,2,RACE_MACHINE,ATTRIBUTE_EARTH) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c62133026.lua b/official/c62133026.lua index 0a9324577d..7dec266d6f 100644 --- a/official/c62133026.lua +++ b/official/c62133026.lua @@ -1,23 +1,23 @@ --- 花と野原の春化精 --- Vernalizer Fairy of Flowers and Fields --- Scripted by Hatter +--花と野原の春化精 +--Vernusylph of the Flowering Fields +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Effect targetting protection + --Effect targetting protection local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x183)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VERNUSYLPH)) e1:SetValue(aux.tgoval) c:RegisterEffect(e1) - -- Add 1 "Vernalizer Fairy" card from the GY to the hand + --Add 1 "Vernalizer Fairy" card from the GY to the hand c:RegisterEffect(Effect.CreateVernalizerSPEffect(c,id,0,CATEGORY_TOHAND,s.thtg,s.thop)) end s.listed_names={id} -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.thfilter(c) return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c6214163.lua b/official/c6214163.lua index 67de4a17f6..2f534f615e 100644 --- a/official/c6214163.lua +++ b/official/c6214163.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c6214884.lua b/official/c6214884.lua index 61148ca5b4..f911898c8f 100644 --- a/official/c6214884.lua +++ b/official/c6214884.lua @@ -1,4 +1,5 @@ --暗黒界の狂王 ブロン +--Brron, Mad King of Dark World local s,id=GetID() function s.initial_effect(c) --discard @@ -20,5 +21,5 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) -end + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c62154416.lua b/official/c62154416.lua index 174a5ff882..1b4302536d 100644 --- a/official/c62154416.lua +++ b/official/c62154416.lua @@ -53,8 +53,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c62156277.lua b/official/c62156277.lua index 490619d924..deca25aa90 100644 --- a/official/c62156277.lua +++ b/official/c62156277.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackAbove,2800),tp,0,LOCATION_MZONE,1,nil) end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c62161698.lua b/official/c62161698.lua index 653d7af9a1..a153b4b480 100644 --- a/official/c62161698.lua +++ b/official/c62161698.lua @@ -1,5 +1,5 @@ --イリュージョン・バルーン ---Illusion Ballons +--Illusion Balloons local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +20,7 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local p1=false @@ -30,8 +30,8 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if tc:IsPreviousControler(0) then p1=true else p2=true end end end - if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) end - if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,0,1) end + if p1 then Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end + if p2 then Duel.RegisterFlagEffect(1,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)~=0 @@ -41,7 +41,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end @@ -54,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end Duel.ShuffleDeck(tp) -end +end \ No newline at end of file diff --git a/official/c62171834.lua b/official/c62171834.lua index c056c6384c..4e356c4e49 100644 --- a/official/c62171834.lua +++ b/official/c62171834.lua @@ -1,7 +1,6 @@ --夢幻の夢魔鏡 --Dream Mirror Phantasms --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --When activated, add 1 "Dream Mirror" monster from deck @@ -37,11 +36,10 @@ function s.initial_effect(c) e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e5) end -s.listed_series={0x131} +s.listed_series={SET_DREAM_MIRROR} s.listed_names={CARD_DREAM_MIRROR_JOY,CARD_DREAM_MIRROR_TERROR} - function s.filter(c) - return c:IsSetCard(0x131) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DREAM_MIRROR) and c:IsMonster() and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -57,4 +55,4 @@ function s.condition(cid) return function(e,c) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,cid),0,LOCATION_FZONE,LOCATION_FZONE,1,nil) end -end +end \ No newline at end of file diff --git a/official/c62180201.lua b/official/c62180201.lua index 5ed2c7968d..0f742bac48 100644 --- a/official/c62180201.lua +++ b/official/c62180201.lua @@ -1,4 +1,5 @@ --邪神ドレッド・ルート +--The Wicked Dreadroot local s,id=GetID() function s.initial_effect(c) --summon with 3 tribute @@ -33,4 +34,4 @@ function s.atkval(e,c) end function s.defval(e,c) return math.ceil(c:GetDefense()/2) -end +end \ No newline at end of file diff --git a/official/c6218704.lua b/official/c6218704.lua index 54a7fb3153..c542a981a7 100644 --- a/official/c6218704.lua +++ b/official/c6218704.lua @@ -108,7 +108,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sc=g:Select(tp,1,1,nil):GetFirst() if not sc then return end Duel.BreakEffect() - if Duel.SendtoDeck(sc,nil,1,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) + if Duel.SendtoDeck(sc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) and sc:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,sc)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then @@ -143,4 +143,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c62188962.lua b/official/c62188962.lua index 84852ecb30..468178840c 100644 --- a/official/c62188962.lua +++ b/official/c62188962.lua @@ -32,9 +32,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return Duel.IsPhase(PHASE_DAMAGE_CAL) end function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_DECK) and c:IsPreviousControler(tp) @@ -43,20 +43,20 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,1-tp) end function s.tgfilter(c) - return c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() + return c:IsSetCard(SET_VAMPIRE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) @@ -67,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c62201847.lua b/official/c62201847.lua index 4cc0183e56..12dd909e3c 100644 --- a/official/c62201847.lua +++ b/official/c62201847.lua @@ -1,9 +1,9 @@ --- 被検体ミュートリアM-05 --- Myutant M-05 --- Scripted by Hatter +--被検体ミュートリアM-05 +--Myutant M-05 +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- If Normal or Special Summoned, add 1 "Myutant" monster from Deck + --If Normal or Special Summoned, add 1 "Myutant" monster from Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon 1 "Myutant" monster from hand or Deck + --Special Summon 1 "Myutant" monster from hand or Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x159} +s.listed_series={SET_MYUTANT} s.listed_names={CARD_MYUTANT_BEAST,CARD_MYUTANT_MIST,CARD_MYUTANT_ARSENAL} function s.thfilter(c) - return c:IsSetCard(0x159) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_MYUTANT) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -57,16 +57,16 @@ function s.getspcode(c) end function s.spcostfilter(c,e,tp,ft) return (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToRemoveAsCost() and (ft>0 or Duel.GetMZoneCount(tp,c)>0) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,c,e,tp,s.getspcode(c)) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,c,e,tp,s.getspcode(c)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local ft=Duel.GetMZoneCount(tp,c) if chk==0 then return c:IsReleasable() - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e,tp,ft) end + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,e,tp,ft) end Duel.Release(c,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,e,tp,ft) + local rg=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,e,tp,ft) e:SetLabel(s.getspcode(rg:GetFirst())) Duel.Remove(rg,POS_FACEUP,REASON_COST) end @@ -78,7 +78,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not code then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,code) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,code) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c62219643.lua b/official/c62219643.lua index 04edb4530f..136973c1ee 100644 --- a/official/c62219643.lua +++ b/official/c62219643.lua @@ -1,9 +1,9 @@ --- 逢華妖麗譚-魔妖不知火語 --- Ghost Meets Girl - A Mayakashi and Shiranui's Tale --- Scripted by Nellag +--逢華妖麗譚-魔妖不知火語 +--Ghost Meets Girl - A Masterful Mayakashi Shiranui Saga +--Scripted by Nellag local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCost(s.cost) e1:SetOperation(s.activate) c:RegisterEffect(e1) - -- Return 1 of your banished Zombies to the GY + --Return 1 of your banished Zombies to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE) @@ -23,15 +23,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end --- "Shiranui" + "Mayakashi" -s.listed_series={0xd9,0x121} +--"Shiranui" + "Mayakashi" +s.listed_series={SET_SHIRANUI,SET_MAYAKASHI} function s.cfilter(c) - return (c:IsSetCard(0xd9) or c:IsSetCard(0x121)) and (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_LINK)) + return c:IsSetCard({SET_SHIRANUI,SET_MAYAKASHI}) and (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_LINK)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil) end @@ -40,7 +40,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - -- Cannot Special Summon from the hand, Deck, or Extra Deck + --Cannot Special Summon from the hand, Deck, or Extra Deck local e0=Effect.CreateEffect(e:GetHandler()) e0:SetDescription(aux.Stringid(id,2)) e0:SetType(EFFECT_TYPE_FIELD) @@ -48,11 +48,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetTargetRange(1,1) e0:SetTarget(s.splimit) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e0,tp) end function s.splimit(e,c,tp) - return c:IsLocation(LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA) + return c:IsLocation(LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsRace(RACE_ZOMBIE) end @@ -63,7 +63,7 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + if tc:IsRelateToEffect(e) then + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end end \ No newline at end of file diff --git a/official/c62256492.lua b/official/c62256492.lua index 010f2092c8..945bb8aa58 100644 --- a/official/c62256492.lua +++ b/official/c62256492.lua @@ -1,7 +1,6 @@ --憑依覚醒 ---Awakening of the Posssessed +--Awakening of the Possessed --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --Your monsters gain 300 ATK per different attribute you control + --Monsters you control gain 300 ATK for each different Attribute you control local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) @@ -17,7 +16,7 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(s.atkval) c:RegisterEffect(e2) - --Your "Charmer" and "Familiar-Possessed" monsters cannot be destroyed by card effects + --"Charmer" and "Familiar-Possessed" monsters you control cannot be destroyed by card effects local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -42,24 +41,13 @@ function s.initial_effect(c) e5:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e5) end -s.listed_series={0xbf,0x10c0} - +s.listed_series={SET_CHARMER,SET_FAMILIAR_POSSESSED} function s.atkval(e,c) - local tp=e:GetHandlerPlayer() - local att=0 - local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - for tc in aux.Next(g) do - att=(att|tc:GetAttribute()) - end - local ct=0 - while att~=0 do - if (att&0x1)~=0 then ct=ct+1 end - att=(att>>1) - end - return ct*300 + local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) + return 300*g:GetBinClassCount(Card.GetAttribute) end function s.indtg(e,c) - return c:IsFaceup() and (c:IsSetCard(0xbf) or c:IsSetCard(0x10c0)) + return c:IsFaceup() and c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) end function s.cfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:GetBaseAttack()==1850 and c:IsRace(RACE_SPELLCASTER) @@ -74,7 +62,6 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c62271284.lua b/official/c62271284.lua index 6f26c4b499..d05f3c1e9f 100644 --- a/official/c62271284.lua +++ b/official/c62271284.lua @@ -1,4 +1,5 @@ --ジャスティブレイク +--Justi-Break local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return tp~=Duel.GetTurnPlayer() and at and at:IsFaceup() and at:IsType(TYPE_NORMAL) + return Duel.IsTurnPlayer(1-tp) and at and at:IsFaceup() and at:IsType(TYPE_NORMAL) end function s.filter(c) return not (c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAttackPos()) @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62279055.lua b/official/c62279055.lua index e3585eead5..b27fc463a5 100644 --- a/official/c62279055.lua +++ b/official/c62279055.lua @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c62279666.lua b/official/c62279666.lua index b9836e1b06..b66eae0e51 100644 --- a/official/c62279666.lua +++ b/official/c62279666.lua @@ -1,5 +1,5 @@ --星遺物が導く果て ---World Legacy End +--World Legacy's Corruption -- local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.cfilter(c,tp,rp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and (c:GetPreviousTypeOnField()&TYPE_LINK)~=0 and (c:IsReason(REASON_BATTLE) or (rp~=tp and c:IsReason(REASON_EFFECT))) @@ -31,20 +31,19 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp,rp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c62306203.lua b/official/c62306203.lua index 11badcbe5b..7417f2cb9a 100644 --- a/official/c62306203.lua +++ b/official/c62306203.lua @@ -1,6 +1,5 @@ --サルベージェント・ドライバー --Salvagent Driver - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon1) e1:SetTarget(s.sptg1) @@ -52,7 +51,7 @@ function s.costfilter(c) end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -74,7 +73,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c62315111.lua b/official/c62315111.lua index b22a79df25..b78c02cadd 100644 --- a/official/c62315111.lua +++ b/official/c62315111.lua @@ -21,7 +21,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() if bc and bc:GetCounter(COUNTER_A)>0 then - c:RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + c:RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end end function s.atcon(e,tp,eg,ep,ev,re,r,rp) @@ -30,4 +30,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c62318994.lua b/official/c62318994.lua index e420712892..95995101c1 100644 --- a/official/c62318994.lua +++ b/official/c62318994.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.chcon) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.chtg) e2:SetOperation(s.chop) c:RegisterEffect(e2) diff --git a/official/c62320425.lua b/official/c62320425.lua index 85197d3247..8383298d95 100644 --- a/official/c62320425.lua +++ b/official/c62320425.lua @@ -1,9 +1,9 @@ --- 古衛兵アギド --- Agido the Ancient Sentry --- Scripted by Hatter +--古衛兵アギド +--Agido the Ancient Sentinel +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Mill 5 cards from each Deck + --Mill 5 cards from each Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DECKDES) @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_TO_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) end) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end) e2:SetTarget(s.mltg) e2:SetOperation(s.mlop) c:RegisterEffect(e2) end s.listed_names={id,CARD_EXCHANGE_SPIRIT} function s.spconfilter(c,tp) - return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) + return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spconfilter,1,nil,tp) diff --git a/official/c62325062.lua b/official/c62325062.lua index 981d6249c5..75e902938b 100644 --- a/official/c62325062.lua +++ b/official/c62325062.lua @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(tc:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c62337487.lua b/official/c62337487.lua index cb732e5c72..937f115aec 100644 --- a/official/c62337487.lua +++ b/official/c62337487.lua @@ -1,4 +1,5 @@ --要塞クジラ +--Fortress Whale local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c62340868.lua b/official/c62340868.lua index 96f17e21de..95ae0a524d 100644 --- a/official/c62340868.lua +++ b/official/c62340868.lua @@ -1,4 +1,5 @@ --風魔神-ヒューガ +--Kazejin local s,id=GetID() function s.initial_effect(c) --atkdown @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler() + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==e:GetHandler() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end @@ -28,8 +29,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c62370023.lua b/official/c62370023.lua index b0c1e2a2be..129a31dbe0 100644 --- a/official/c62370023.lua +++ b/official/c62370023.lua @@ -1,7 +1,6 @@ --スノーマン・エフェクト --Snowman Effect --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -27,12 +26,9 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 and Duel.GetAttackTarget()==nil then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c,tp) return c:IsFaceup() and c:GetFlagEffect(id)==0 and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,c) end @@ -60,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) --Cannot attack directly @@ -69,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c62376646.lua b/official/c62376646.lua index 01626266dc..813fc95050 100644 --- a/official/c62376646.lua +++ b/official/c62376646.lua @@ -1,5 +1,5 @@ --剛鬼再戦 ---Gouki Rematch +--Gouki Re-Match local s,id=GetID() function s.initial_effect(c) --activate @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.spfilter(c,e,tp) - return c:IsSetCard(0xfc) and c:HasLevel() + return c:IsSetCard(SET_GOUKI) and c:HasLevel() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsCanBeEffectTarget(e) end function s.rfilter(c,lv) @@ -42,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) sg=sg:Select(tp,ft,ft,nil) end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c62379337.lua b/official/c62379337.lua index a8b1ed03f7..bb8c1c50c5 100644 --- a/official/c62379337.lua +++ b/official/c62379337.lua @@ -1,4 +1,5 @@ --バイオレット・ウィッチ +--Violet Witch local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c62383431.lua b/official/c62383431.lua index 8af23ae73f..7dc628c1cc 100644 --- a/official/c62383431.lua +++ b/official/c62383431.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x163} +s.listed_series={SET_OGDOADIC} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,nil,1,false,aux.ReleaseCheckMMZ,nil) end local g=Duel.SelectReleaseGroupCost(tp,nil,1,1,false,aux.ReleaseCheckMMZ,nil) @@ -55,19 +55,19 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x163) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_OGDOADIC) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter2(chkc,e,tp) end @@ -85,8 +85,8 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c62393472.lua b/official/c62393472.lua index 3d16b70d7f..5a7b1802b8 100644 --- a/official/c62393472.lua +++ b/official/c62393472.lua @@ -1,7 +1,6 @@ --夢魔鏡の聖獣-パンタス --Phantasos, the Dream Mirror Friend --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 8 or lower "Dream Mirror" monster from GY @@ -20,25 +19,24 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={CARD_DREAM_MIRROR_TERROR,99792080} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x131) and c:IsLevelBelow(8) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DREAM_MIRROR) and c:IsLevelBelow(8) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter1(chkc,e,tp) end @@ -58,13 +56,8 @@ function s.sscond(c) return c:IsFaceup() and c:IsCode(CARD_DREAM_MIRROR_TERROR) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(s.sscond,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil,tp) - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.spfilter(c,e,tp) return c:IsCode(99792080) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c62405028.lua b/official/c62405028.lua index f16673105c..b5f9f91e56 100644 --- a/official/c62405028.lua +++ b/official/c62405028.lua @@ -1,5 +1,5 @@ --冥界の淳一ナイア ---Nihil, Dreg of the Abhyss +--Nauya, the Ogdoadic Remnant --scripted by Xylen5967 local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -29,12 +29,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x163} -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end +s.listed_series={SET_OGDOADIC} function s.tgfilter(c) return c:IsRace(RACE_REPTILE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGrave() end @@ -50,7 +45,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x163) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_OGDOADIC) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c62411042.lua b/official/c62411042.lua index 495156c634..b5ba7e0f42 100644 --- a/official/c62411042.lua +++ b/official/c62411042.lua @@ -1,5 +1,5 @@ --イビルセラ・ルテア ---Evilcella Lutea +--Ibicella Lutea local s,id=GetID() function s.initial_effect(c) --indes @@ -22,5 +22,4 @@ function s.initial_effect(c) end function s.indcon(e) return Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end - +end \ No newline at end of file diff --git a/official/c62411811.lua b/official/c62411811.lua index 8c6f1609a8..19c3c84c61 100644 --- a/official/c62411811.lua +++ b/official/c62411811.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.descon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c62420419.lua b/official/c62420419.lua index f2693a78fc..82f086efc7 100644 --- a/official/c62420419.lua +++ b/official/c62420419.lua @@ -1,4 +1,5 @@ --大邪神レシェフ +--Reshef the Dark Being local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -21,7 +22,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c62437430.lua b/official/c62437430.lua index cf79a61c8d..33f9e45887 100644 --- a/official/c62437430.lua +++ b/official/c62437430.lua @@ -1,4 +1,5 @@ --異次元海溝 +--Different Dimension Deepsea Trench local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,16 +27,16 @@ function s.filter(c) and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true,true)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0x16,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,0x16) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x16,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil):GetFirst() if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) e:GetLabelObject():SetLabelObject(tc) end end @@ -55,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c62437709.lua b/official/c62437709.lua index 56e87537ed..8e135e4522 100644 --- a/official/c62437709.lua +++ b/official/c62437709.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e5:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e5) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -57,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.flop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE,0,0) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) @@ -74,12 +74,12 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c62472614.lua b/official/c62472614.lua index f33934b12f..acf9a06f7e 100644 --- a/official/c62472614.lua +++ b/official/c62472614.lua @@ -1,7 +1,8 @@ --疫病 +--Pestilence local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR+RACE_SPELLCASTER+RACE_BEASTWARRIOR)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR|RACE_SPELLCASTER|RACE_BEASTWARRIOR)) --Atk,def local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -13,7 +14,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,0)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetCondition(s.damcon) @@ -22,7 +23,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +37,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local damp=e:GetHandler():GetEquipTarget():GetControler() local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) Duel.Damage(damp,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c62473983.lua b/official/c62473983.lua index 49b6ee7b7f..ee97920d7a 100644 --- a/official/c62473983.lua +++ b/official/c62473983.lua @@ -1,4 +1,5 @@ --墓守の長 +--Gravekeeper's Chief local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -21,12 +22,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0x2e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -41,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c6247535.lua b/official/c6247535.lua index abe1cd5501..0185c158f5 100644 --- a/official/c6247535.lua +++ b/official/c6247535.lua @@ -22,25 +22,21 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x10f} +s.listed_series={SET_BORREL} function s.mfilter(c,lc,sumtype,tp) return c:IsRace(RACE_DRAGON,lc,sumtype,tp) and c:IsAttribute(ATTRIBUTE_DARK,lc,sumtype,tp) end function s.tgcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.tgval(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and e:GetHandler()~=rc -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return re:IsMonsterEffect() and e:GetHandler()~=rc end function s.atkfilter(c) return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0) @@ -53,7 +49,7 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BORREL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -63,7 +59,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -74,7 +70,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sc=g:Select(tp,1,1,nil):GetFirst() if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END) @@ -92,14 +88,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) ge1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_PLAYER_TARGET) ge1:SetTargetRange(1,0) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) local ge2=Effect.CreateEffect(c) ge2:SetType(EFFECT_TYPE_FIELD) ge2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) ge2:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) ge2:SetTargetRange(LOCATION_MZONE,0) - ge2:SetReset(RESET_PHASE+PHASE_END) + ge2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -115,4 +111,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c62476197.lua b/official/c62476197.lua index 5d4190dbee..a887e22277 100644 --- a/official/c62476197.lua +++ b/official/c62476197.lua @@ -1,4 +1,5 @@ --アチャチャチャンバラー +--Achacha Chanbara local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Damage(1-tp,400,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62476815.lua b/official/c62476815.lua index 083af8a65c..12d69399b7 100644 --- a/official/c62476815.lua +++ b/official/c62476815.lua @@ -1,4 +1,5 @@ --ゴゴゴゴーレム +--Gogogo Golem local s,id=GetID() function s.initial_effect(c) --battle indes @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 and e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c62480168.lua b/official/c62480168.lua index 825fb01a3e..4c06f330f8 100644 --- a/official/c62480168.lua +++ b/official/c62480168.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.lpop) c:RegisterEffect(e2) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) @@ -34,7 +34,7 @@ function s.pendfilter(c,tp) return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and Duel.CheckPendulumZones(tp) end function s.cfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0x4) and (c:IsAbleToHand() or s.pendfilter(c,tp)) + return c:IsMonster() and c:IsSetCard(SET_AMAZONESS) and (c:IsAbleToHand() or s.pendfilter(c,tp)) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.amzfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4) and c:IsOriginalType(TYPE_MONSTER) + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and c:IsOriginalType(TYPE_MONSTER) end function s.lpcond(e,tp,eg,ep,ev,re,r,rp) return ep==tp and Duel.IsExistingMatchingCard(s.amzfilter,tp,LOCATION_ONFIELD,0,1,nil) diff --git a/official/c62481203.lua b/official/c62481203.lua index 7d92b1ef46..85393bb553 100644 --- a/official/c62481203.lua +++ b/official/c62481203.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end s.listed_names={TOKEN_TRICKSTAR} -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.counterfilter(c) - return c:IsSetCard(0xfb) + return c:IsSetCard(SET_TRICKSTAR) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SUMMON)==0 @@ -37,7 +37,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -47,17 +47,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c) - return not c:IsSetCard(0xfb) + return not c:IsSetCard(SET_TRICKSTAR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,0xfb,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,SET_TRICKSTAR,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,0xfb,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_TRICKSTAR,SET_TRICKSTAR,TYPES_TOKEN,0,0,1,RACE_FAIRY,ATTRIBUTE_LIGHT) then for i=1,2 do local token=Duel.CreateToken(tp,TOKEN_TRICKSTAR) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) @@ -66,8 +66,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xfb) and c:IsLocation(LOCATION_MZONE) and c:IsSummonLocation(LOCATION_EXTRA) - and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) + return c:IsFaceup() and c:IsSetCard(SET_TRICKSTAR) and c:IsLocation(LOCATION_MZONE) and c:IsSummonLocation(LOCATION_EXTRA) + and c:IsControler(tp) and c:IsReason(REASON_EFFECT|REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -78,5 +78,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c62487836.lua b/official/c62487836.lua index d3cb83d257..11aca2ab9f 100644 --- a/official/c62487836.lua +++ b/official/c62487836.lua @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DISABLE) e2:SetTargetRange(0,LOCATION_SZONE) e2:SetTarget(s.distg) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --disable effect local e3=Effect.CreateEffect(c) @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetRange(LOCATION_MZONE) e3:SetOperation(s.disop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end @@ -58,7 +58,7 @@ function s.distg(e,c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl,p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_PLAYER) - if tl==LOCATION_SZONE and p~=tp and re:IsActiveType(TYPE_SPELL) then + if tl==LOCATION_SZONE and p~=tp and re:IsSpellEffect() then Duel.NegateEffect(ev) end end \ No newline at end of file diff --git a/official/c62499965.lua b/official/c62499965.lua index 170de6e1ce..8d2dc2a67b 100644 --- a/official/c62499965.lua +++ b/official/c62499965.lua @@ -1,4 +1,5 @@ --Z-ONE +--Z-ONE local s,id=GetID() function s.initial_effect(c) --salvage @@ -34,4 +35,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c62503746.lua b/official/c62503746.lua index 25e40cddea..01c7a60ef4 100644 --- a/official/c62503746.lua +++ b/official/c62503746.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) @@ -74,7 +74,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc1=g:GetFirst() local tc2=g:GetNext() if tc2==e:GetLabelObject() then tc1,tc2=tc2,tc1 end - if tc1:IsControler(tp) and tc1:UpdateAttack(-1500,RESET_EVENT+RESETS_STANDARD,e:GetHandler())==-1500 + if tc1:IsControler(tp) and tc1:UpdateAttack(-1500,RESET_EVENT|RESETS_STANDARD,e:GetHandler())==-1500 and tc2 and tc2:IsControler(1-tp) then Duel.Destroy(tc2,REASON_EFFECT) end diff --git a/official/c62517849.lua b/official/c62517849.lua index 39d1bd59be..64b0a69600 100644 --- a/official/c62517849.lua +++ b/official/c62517849.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end --Lists "Utopia" archetype -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} --Specifically lists "Double or Nothing!" s.listed_names={94770493} --Number 39 @@ -32,7 +32,7 @@ function s.thfilter(c) end --Check for "Utopia" Xyz monster, excluding "Number 39: Utopia Double" function s.spfilter(c,e,tp,mc,pg) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x107f) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_UTOPIA) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c,tp) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end --Activation legality @@ -72,13 +72,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) --Double its ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK) e2:SetValue(sc:GetTextAttack()*2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c62528292.lua b/official/c62528292.lua index 6651fc447e..84d46d135c 100644 --- a/official/c62528292.lua +++ b/official/c62528292.lua @@ -37,7 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) @@ -110,4 +110,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62530723.lua b/official/c62530723.lua index 67a4d1de5f..f8c9f58e73 100644 --- a/official/c62530723.lua +++ b/official/c62530723.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) c:RegisterEffect(e1) --Negate Spell effects @@ -20,22 +20,19 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x10c} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_MEKK_KNIGHT} function s.atkfilter(c) return c:IsFaceup() and c:IsLevelAbove(5) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end if chk==0 then - if Duel.GetCurrentPhase()==PHASE_DAMAGE then + if Duel.IsPhase(PHASE_DAMAGE) then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end return true end - if Duel.GetCurrentPhase()==PHASE_DAMAGE + if Duel.IsPhase(PHASE_DAMAGE) or (Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0))) then e:SetCategory(CATEGORY_ATKCHANGE) @@ -57,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -65,10 +62,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,seq,p) - return c:IsFaceup() and c:IsSetCard(0x10c) and c:IsColumn(seq,p,LOCATION_SZONE) + return c:IsFaceup() and c:IsSetCard(SET_MEKK_KNIGHT) and c:IsColumn(seq,p,LOCATION_SZONE) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_SPELL) then return false end + if rp==tp or not re:IsSpellEffect() then return false end local rc=re:GetHandler() local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) if re:IsHasType(EFFECT_TYPE_ACTIVATE) and (loc&LOCATION_SZONE==0 or rc:IsControler(1-p)) then @@ -84,4 +81,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c62541668.lua b/official/c62541668.lua index 2d57386f07..aa87020809 100644 --- a/official/c62541668.lua +++ b/official/c62541668.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,15 +29,15 @@ s.xyz_number=77 function s.ovfilter(c,tp,xyzc) local rk=c:GetRank() return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK,xyzc,SUMMON_TYPE_XYZ,tp) - and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and (rk==10 or rk==11) + and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and (rk==10 or rk==11) end function s.xyzop(e,tp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) return true end function s.rmfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove() and c:IsMonster() + return c:IsSpecialSummoned() and c:IsAbleToRemove() and c:IsMonster() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 @@ -60,10 +60,10 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end if Duel.SelectEffectYesNo(tp,c,96) then c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c62543393.lua b/official/c62543393.lua index 46823f0144..ec5edb12fc 100644 --- a/official/c62543393.lua +++ b/official/c62543393.lua @@ -18,7 +18,7 @@ function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c62560742.lua b/official/c62560742.lua index 242a1738dd..bd78d06d4e 100644 --- a/official/c62560742.lua +++ b/official/c62560742.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO) + return c:IsFaceup() and c:IsSetCard(SET_TG) and c:IsType(TYPE_SYNCHRO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -48,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c6256844.lua b/official/c6256844.lua index f8910ab494..1c6bfc301c 100644 --- a/official/c6256844.lua +++ b/official/c6256844.lua @@ -1,4 +1,5 @@ --レアル・ジェネクス・ターボ +--R-Genex Turbo local s,id=GetID() function s.initial_effect(c) --search @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:GetLevel()==1 and c:IsSetCard(0x2) and c:IsAbleToHand() + return c:GetLevel()==1 and c:IsSetCard(SET_GENEX) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c62587693.lua b/official/c62587693.lua index ede7e5fd57..848afe6946 100644 --- a/official/c62587693.lua +++ b/official/c62587693.lua @@ -67,10 +67,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.discon2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and rp==1-tp and e:GetHandler():GetFlagEffect(id)~=0 and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE + return re:IsMonsterEffect() and rp==1-tp and e:GetHandler():GetFlagEffect(id)~=0 and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE end function s.disop2(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) @@ -94,5 +94,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c6260554.lua b/official/c6260554.lua index bb5b63dab1..af3a93f622 100644 --- a/official/c6260554.lua +++ b/official/c6260554.lua @@ -1,4 +1,5 @@ --弾幕回避 +--Do a Barrel Roll local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end s.listed_names={TOKEN_MECHA_PHANTOM_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.filter(c) return c:IsReleasable() and not c:IsStatus(STATUS_BATTLE_DESTROYED) @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62623659.lua b/official/c62623659.lua index a6d66fda63..8ad024c97f 100644 --- a/official/c62623659.lua +++ b/official/c62623659.lua @@ -1,7 +1,6 @@ --ゼアル・コンストラクション ---ZEXAL Construction +--Zexal Construction --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,13 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x7e,0x107e,0x207e,0x95,0x15d} - +s.listed_series={SET_ZEXAL,SET_ZW,SET_ZS,SET_RANK_UP_MAGIC,SET_RANK_DOWN_MAGIC} function s.filter(c) return c:IsAbleToDeck() and not c:IsPublic() end function s.thfilter(c) - return c:IsAbleToHand() and ((c:IsMonster() and (c:IsSetCard(0x107e) or c:IsSetCard(0x207e))) or (c:IsSpell() and (c:IsSetCard(0x7e) or c:IsSetCard(0x95) or c:IsSetCard(0x15d))) or c:IsTrap() and c:IsSetCard(0x7e)) + return c:IsAbleToHand() and ((c:IsMonster() and (c:IsSetCard(SET_ZW) or c:IsSetCard(SET_ZS))) or (c:IsSpell() and (c:IsSetCard(SET_ZEXAL) or c:IsSetCard(SET_RANK_UP_MAGIC) or c:IsSetCard(SET_RANK_DOWN_MAGIC))) or c:IsTrap() and c:IsSetCard(SET_ZEXAL)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) @@ -42,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c62624486.lua b/official/c62624486.lua index e7cc00fcf0..ee8b18c1e6 100644 --- a/official/c62624486.lua +++ b/official/c62624486.lua @@ -22,14 +22,14 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() return #eg==1 and tc:GetReasonCard()==e:GetHandler() and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c62632427.lua b/official/c62632427.lua index 609e2861df..c4b5890ed5 100644 --- a/official/c62632427.lua +++ b/official/c62632427.lua @@ -29,7 +29,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) return end end @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,hg1) Duel.SendtoHand(hg2,nil,REASON_EFFECT) Duel.ConfirmCards(tp,hg2) -end +end \ No newline at end of file diff --git a/official/c62633180.lua b/official/c62633180.lua index 7217ee90e3..a070376dcb 100644 --- a/official/c62633180.lua +++ b/official/c62633180.lua @@ -1,4 +1,5 @@ --本陣強襲 +--Assault on GHQ local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardDeck(1-tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62645025.lua b/official/c62645025.lua index b4edec238f..fc98b89c62 100644 --- a/official/c62645025.lua +++ b/official/c62645025.lua @@ -1,4 +1,5 @@ --幻影騎士団ウロング・マグネリング +--The Phantom Knights of Wrong Magnetring local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,13 +24,13 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x10db,0xdb} +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_PHANTOM_KNIGHTS} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x21,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_EFFECT,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -38,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() if not c:IsRelateToEffect(e) - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x21,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_EFFECT,0,0,2,RACE_WARRIOR,ATTRIBUTE_DARK) then return end c:AddMonsterAttribute(TYPE_EFFECT) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP_ATTACK) c:AddMonsterAttributeComplete() @@ -49,8 +50,8 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) end function s.cfilter(c) if c:IsFacedown() or not c:IsAbleToGraveAsCost() then return false end - return (c:IsSetCard(0x10db) and c:IsMonster()) - or (c:IsSetCard(0xdb) and c:IsSpellTrap() and c:IsType(TYPE_CONTINUOUS)) + return (c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster()) + or (c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap() and c:IsType(TYPE_CONTINUOUS)) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -70,4 +71,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c62681049.lua b/official/c62681049.lua index 1f92fb7b06..7ff485bd1c 100644 --- a/official/c62681049.lua +++ b/official/c62681049.lua @@ -1,4 +1,5 @@ --妖仙郷の眩暈風 +--Dizzying Winds of Yosen Village local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,16 +20,16 @@ function s.initial_effect(c) e2:SetValue(LOCATION_DECKSHF) c:RegisterEffect(e2) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.filter(c) - return c:IsFaceup() and c:IsLevelAbove(6) and c:IsSetCard(0xb3) + return c:IsFaceup() and c:IsLevelAbove(6) and c:IsSetCard(SET_YOSENJU) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end function s.tdtg(e,c) - return (c:IsFacedown() or not c:IsSetCard(0xb3)) and c:IsReason(REASON_EFFECT) + return (c:IsFacedown() or not c:IsSetCard(SET_YOSENJU)) and c:IsReason(REASON_EFFECT) end function s.tdcon(e) - return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil,0xb3) -end + return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil,SET_YOSENJU) +end \ No newline at end of file diff --git a/official/c62694833.lua b/official/c62694833.lua index 9d867f3524..069f305069 100644 --- a/official/c62694833.lua +++ b/official/c62694833.lua @@ -1,7 +1,6 @@ --魁炎星-シーブ --Brotherhood of the Fire Fist - Ram --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --When normal summoned, set 1 "Fire Formation" spell/trap from deck @@ -27,18 +26,17 @@ function s.initial_effect(c) e2:SetOperation(s.setop2) c:RegisterEffect(e2) end -s.listed_series={0x7c,0x79} - +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.setfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and Duel.IsExistingMatchingCard(s.setfilter2,tp,LOCATION_DECK,0,1,nil,c) end function s.setfilter2(c,tc) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and not c:IsCode(tc:GetCode()) and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and not c:IsCode(tc:GetCode()) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and s.setfilter(chkc,tp) end @@ -56,10 +54,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.setcon2(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x79) + return re and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_FIRE_FIST) end function s.setfilter3(c,tp) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsSSetable() and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.settg2(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c62701967.lua b/official/c62701967.lua index 2d1b6467ad..0b784832d5 100644 --- a/official/c62701967.lua +++ b/official/c62701967.lua @@ -1,4 +1,5 @@ --ジュラック・ティラヌス +--Jurrac Tyrannus local s,id=GetID() function s.initial_effect(c) --atkup @@ -33,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -42,4 +43,4 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return c:IsFaceup() and c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:IsMonster() -end +end \ No newline at end of file diff --git a/official/c62706865.lua b/official/c62706865.lua index 5fd0b28c27..3f065cc0ec 100644 --- a/official/c62706865.lua +++ b/official/c62706865.lua @@ -1,4 +1,5 @@ --ドラコネット +--Draconnet local s,id=GetID() function s.initial_effect(c) --spsummon @@ -16,14 +17,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c62709239.lua b/official/c62709239.lua index e88bf7558c..25b822dfe9 100644 --- a/official/c62709239.lua +++ b/official/c62709239.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,11 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10db} -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) @@ -54,14 +50,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() end function s.spfilter1(c,e,tp) - return c:HasLevel() and c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:HasLevel() and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.spfilter2,tp,LOCATION_GRAVE,0,1,c,c:GetLevel(),e,tp) end function s.spfilter2(c,lv,e,tp) - return c:GetLevel()==lv and c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==lv and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -88,7 +84,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end @@ -101,9 +97,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,2)) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c62729173.lua b/official/c62729173.lua index bb3d9dda33..a8ec74cb0b 100644 --- a/official/c62729173.lua +++ b/official/c62729173.lua @@ -1,4 +1,5 @@ --インヴェルズ万能態 +--Steelswarm Genome local s,id=GetID() function s.initial_effect(c) --double tribute @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetValue(s.condition) c:RegisterEffect(e1) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.condition(e,c) - return c:IsSetCard(0x100a) -end + return c:IsSetCard(SET_STEELSWARM) +end \ No newline at end of file diff --git a/official/c62742651.lua b/official/c62742651.lua index 332c3e4dae..b237f906e1 100644 --- a/official/c62742651.lua +++ b/official/c62742651.lua @@ -52,4 +52,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c62753201.lua b/official/c62753201.lua index fb25c45c38..0d0e1939f0 100644 --- a/official/c62753201.lua +++ b/official/c62753201.lua @@ -13,10 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x102,0x10f} - +s.listed_series={SET_ROKKET,SET_BORREL} function s.cfilter(c,tp) - return c:IsSetCard(0x102) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,c) + return c:IsSetCard(SET_ROKKET) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,tp) end @@ -25,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RemainFieldCost(e,tp,eg,ep,ev,re,r,rp,1) end function s.tgfilter(c) - return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(0x10f) + return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_BORREL) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc) end @@ -35,7 +34,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end function s.eqlimit(e,c) - return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_LINK) and c:IsSetCard(0x10f) + return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_LINK) and c:IsSetCard(SET_BORREL) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,14 +43,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then local fid=c:GetFieldID() Duel.Equip(tp,c,tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) --Equip limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Granted effect local e2=Effect.CreateEffect(c) @@ -60,7 +59,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetCountLimit(1) e2:SetTarget(s.indtg) e2:SetOperation(s.indop) @@ -94,7 +93,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c6276588.lua b/official/c6276588.lua index b6d21f7dc8..bc884d632f 100644 --- a/official/c6276588.lua +++ b/official/c6276588.lua @@ -1,4 +1,5 @@ --カラクリ忍者 九壱九 +--Karakuri Ninja mdl 919 "Kuick" local s,id=GetID() function s.initial_effect(c) --must attack @@ -39,7 +40,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelBelow(4) and c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c62777823.lua b/official/c62777823.lua index 13cf832227..386a7c8d89 100644 --- a/official/c62777823.lua +++ b/official/c62777823.lua @@ -16,10 +16,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={CARD_R_ACE_HYDRANT} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x18c),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_RESCUE_ACE),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsType(TYPE_EFFECT) end @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_R_ACE_HYDRANT),tp,LOCATION_ONFIELD,0,1,nil) then return end --Cannot be used as material for a Fusion/Synchro/Xyz/Link Summon @@ -60,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) e4:SetCode(EFFECT_CANNOT_BE_MATERIAL) e4:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ,SUMMON_TYPE_LINK)) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) end end \ No newline at end of file diff --git a/official/c62782218.lua b/official/c62782218.lua index aaf52b48f6..ebf65ec7c2 100644 --- a/official/c62782218.lua +++ b/official/c62782218.lua @@ -1,4 +1,5 @@ --スカル・コンダクター +--Skull Conductor local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -33,10 +34,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp,satk) local atk=c:GetAttack() return atk>=0 and (not satk or atk==satk) and c:IsRace(RACE_ZOMBIE) @@ -72,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c62784717.lua b/official/c62784717.lua index 842543ad1d..aa8cff7ec9 100644 --- a/official/c62784717.lua +++ b/official/c62784717.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_COIN) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) diff --git a/official/c62803464.lua b/official/c62803464.lua index f01321a7ef..43bde48b04 100644 --- a/official/c62803464.lua +++ b/official/c62803464.lua @@ -43,7 +43,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,LOCATION_HAND,0,1,1,c,tp,c) e:SetLabel(c:GetOriginalRace(),g:GetFirst():GetOriginalRace()) g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c62829077.lua b/official/c62829077.lua index b152e5e9e2..ccc72bbdc9 100644 --- a/official/c62829077.lua +++ b/official/c62829077.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x7f} +s.listed_series={SET_UTOPIC} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) @@ -23,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetLabelObject(e) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -34,7 +34,7 @@ function s.filter(c,e,tp) return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.xyzfilter(c,mg,tp,chk) - return c:IsSetCard(0x7f) and c:IsXyzSummonable(nil,mg,3,3) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) + return c:IsSetCard(SET_UTOPIC) and c:IsXyzSummonable(nil,mg,3,3) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) end function s.mfilter1(c,mg,exg,tp) return mg:IsExists(s.mfilter2,1,c,c,mg,exg,tp) @@ -82,7 +82,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -94,7 +94,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #xyzg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() - xyz:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + xyz:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.XyzSummon(tp,xyz,nil,g) end -end +end \ No newline at end of file diff --git a/official/c62834295.lua b/official/c62834295.lua index c4a7664424..645e46daaf 100644 --- a/official/c62834295.lua +++ b/official/c62834295.lua @@ -25,21 +25,21 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xfe,0x11b} +s.listed_series={SET_WORLD_LEGACY,SET_ORCUST} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end function s.tgfilter(c) - return (c:IsSetCard(0xfe) or c:IsSetCard(0x11b)) and c:IsMonster() and (c:IsAbleToGrave() or c:IsAbleToRemove()) + return c:IsSetCard({SET_WORLD_LEGACY,SET_ORCUST}) and c:IsMonster() and (c:IsAbleToGrave() or c:IsAbleToRemove()) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil) if #g>0 then local tc=g:GetFirst() if tc and tc:IsAbleToGrave() and (not tc:IsAbleToRemove() or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then diff --git a/official/c6283472.lua b/official/c6283472.lua index fd6a692ede..3e910a1cac 100644 --- a/official/c6283472.lua +++ b/official/c6283472.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.descon) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -46,12 +46,12 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -62,16 +62,16 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(c,REASON_COST) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) - and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id)~=0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) + and (e:GetHandler():IsPendulumSummoned() or e:GetHandler():GetFlagEffect(id)~=0) end function s.damcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 end return val end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) + return not c:IsOriginalSetCard(SET_AMORPHAGE) end \ No newline at end of file diff --git a/official/c62835876.lua b/official/c62835876.lua index 8e5b4770ef..68f0218a1d 100644 --- a/official/c62835876.lua +++ b/official/c62835876.lua @@ -1,4 +1,5 @@ --善悪の彼岸 +--Good & Evil in the Burning Abyss local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,35330871) @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.cfilter(c) - return c:IsSetCard(0xb1) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() @@ -25,7 +26,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST,nil) end function s.filter(c) - return c:IsSetCard(0xb1) and c:IsAbleToHand() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -38,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c6284176.lua b/official/c6284176.lua index 6b98bff5e8..ae7d99fc73 100644 --- a/official/c6284176.lua +++ b/official/c6284176.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -36,10 +36,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spconfilter,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -57,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -79,13 +75,13 @@ function s.cfilter(c,e,tp) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=eg:FilterCount(s.repfilter,nil,tp) - if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) + if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,id)==0 end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp) + local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil,e,tp) Duel.SetTargetCard(tg) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true else return false end end @@ -95,5 +91,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=Duel.GetFirstTarget() - Duel.Release(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Release(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c62849088.lua b/official/c62849088.lua index ed9940ea2d..3fee1c422e 100644 --- a/official/c62849088.lua +++ b/official/c62849088.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_SUMMON+TIMING_SPSUMMON) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_SUMMON|TIMING_SPSUMMON) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -126,7 +126,7 @@ function s.hdextg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetTargetCard(g) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.hdexop(e,tp,eg,ep,ev,re,r,rp) local label=e:GetLabel() diff --git a/official/c62850093.lua b/official/c62850093.lua index c23eef1d58..8de2dbccc7 100644 --- a/official/c62850093.lua +++ b/official/c62850093.lua @@ -1,5 +1,5 @@ --氷天禍チルブレイン ---Cataclysmic Crisp Chillbrain +--Cataclysmic Circumpolar Chilblainia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -41,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c6285791.lua b/official/c6285791.lua index c8cacf028d..9e6d4962b2 100644 --- a/official/c6285791.lua +++ b/official/c6285791.lua @@ -1,4 +1,5 @@ --邪悪なるワーム・ビースト +--The Wicked Worm Beast local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -25,4 +26,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62867251.lua b/official/c62867251.lua index ca1091fb33..838e707722 100644 --- a/official/c62867251.lua +++ b/official/c62867251.lua @@ -30,4 +30,4 @@ function s.initial_effect(c) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) c:RegisterEffect(e4) -end +end \ No newline at end of file diff --git a/official/c62868900.lua b/official/c62868900.lua index 6d059aed34..469da41cc7 100644 --- a/official/c62868900.lua +++ b/official/c62868900.lua @@ -1,4 +1,5 @@ --D-シールド +--D - Shield local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsCanChangePosition() and tc:IsSetCard(0xc008) + return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsCanChangePosition() and tc:IsSetCard(SET_DESTINY_HERO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc==eg:GetFirst() end @@ -36,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -45,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) e2:SetLabelObject(tc) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -53,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c62873545.lua b/official/c62873545.lua index b57cc6a718..e98160cda7 100644 --- a/official/c62873545.lua +++ b/official/c62873545.lua @@ -1,4 +1,5 @@ --究極竜騎士 +--Dragon Master Knight local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={23995346} -s.material_setcode={0x10cf,0xcf,0xdd} +s.material_setcode={SET_BLACK_LUSTER_SOLDIER,SET_CHAOS,SET_BLUE_EYES} function s.atkval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),c:GetControler(),LOCATION_MZONE,0,c)*500 -end +end \ No newline at end of file diff --git a/official/c62878208.lua b/official/c62878208.lua index ed2f084380..d7e871e9d8 100644 --- a/official/c62878208.lua +++ b/official/c62878208.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.filter1(c,e,tp) local ec=c:GetEquipTarget() @@ -45,7 +45,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() local a=eqc local d=tc - if Duel.GetTurnPlayer()~=tp then + if Duel.IsTurnPlayer(1-tp) then a=tc d=eqc end @@ -53,4 +53,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(a,d,true) end end -end +end \ No newline at end of file diff --git a/official/c62886670.lua b/official/c62886670.lua index 5d410d7f18..a08d32d75a 100644 --- a/official/c62886670.lua +++ b/official/c62886670.lua @@ -1,5 +1,5 @@ --海晶乙女 シースター ---Marincess Seastar +--Marincess Sea Star --scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -10,18 +10,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(2,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x12b} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_MARINCESS} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x12b) + return c:IsFaceup() and c:IsSetCard(SET_MARINCESS) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -36,8 +32,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c62893810.lua b/official/c62893810.lua index 7b5d726a66..ba7dbcc9d6 100644 --- a/official/c62893810.lua +++ b/official/c62893810.lua @@ -27,18 +27,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,g) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(1-tp) elseif d==6 then local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) if #g==0 then return end - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) else local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) if #g==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local sg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c62896588.lua b/official/c62896588.lua index 87b383d196..02bfba6422 100644 --- a/official/c62896588.lua +++ b/official/c62896588.lua @@ -1,4 +1,5 @@ --ナチュラル・チューン +--Natural Tune local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c62899696.lua b/official/c62899696.lua index d78ebcc602..c98be2d71b 100644 --- a/official/c62899696.lua +++ b/official/c62899696.lua @@ -30,8 +30,7 @@ function s.smcon(e) return e:GetHandler():GetFlagEffect(id)==0 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp - and (Duel.GetCurrentPhase()&PHASE_MAIN1+PHASE_MAIN2)>0 + return Duel.IsTurnPlayer(tp) and Duel.IsMainPhase() end function s.filter(tc,c,tp) if not tc:IsFaceup() or not tc:IsCanBeSynchroMaterial() then return false end @@ -73,7 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_SPSUMMON_SUCCESS) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) e3:SetOperation(s.regop) e3:SetLabelObject(e1) sc:RegisterEffect(e3,true) @@ -93,4 +92,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) rc:ResetFlagEffect(id) e:GetLabelObject():Reset() e:Reset() -end +end \ No newline at end of file diff --git a/official/c62941499.lua b/official/c62941499.lua index 853f5e1da8..59c26a5b35 100644 --- a/official/c62941499.lua +++ b/official/c62941499.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.bancon) e2:SetTarget(s.bantg) @@ -36,7 +36,7 @@ local function adjzone(loc,seq) if loc==LOCATION_MZONE then if seq<5 then --Own zone and horizontally adjancent | Vertical adjancent zone - return ((7<<(seq-1))&0x1F)|(1<<(seq+8)) + return ((7<<(seq-1))&ZONES_MMZ)|(1<<(seq+8)) else --Own zone | vertical adjancent main monster zone return (1<0 @@ -70,14 +71,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c62962630.lua b/official/c62962630.lua index b4def5d3df..bd904349a2 100644 --- a/official/c62962630.lua +++ b/official/c62962630.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x160} +s.listed_series={SET_BRANDED} function s.thfilter(c) - return c:IsSetCard(0x160) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_BRANDED) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -78,14 +78,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c62966332.lua b/official/c62966332.lua index 9f98d11b90..024be858d2 100644 --- a/official/c62966332.lua +++ b/official/c62966332.lua @@ -1,4 +1,5 @@ --天変地異 +--Convulsion of Nature local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK) @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(1,1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c62967433.lua b/official/c62967433.lua index aab26957e4..80aa9a5263 100644 --- a/official/c62967433.lua +++ b/official/c62967433.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c62968263.lua b/official/c62968263.lua index 3787247d88..53349a70f6 100644 --- a/official/c62968263.lua +++ b/official/c62968263.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_REMOVE) c:RegisterEffect(e3) end -s.listed_series={0x107b,0x48} +s.listed_series={SET_GALAXY_EYES,SET_NUMBER} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x107b),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GALAXY_EYES),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -59,17 +59,17 @@ function s.attfilter(c,e) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.IsExistingMatchingCard(s.gepdfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,ft) end + if chk==0 then return Duel.IsExistingMatchingCard(s.gepdfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp,ft) end e:SetLabel(Duel.IsBattlePhase() and 1 or 0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.numbfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) end function s.atop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) - local tc=Duel.SelectMatchingCard(tp,s.gepdfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,ft):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.gepdfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,ft):GetFirst() if not tc then return end local spchk=ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) local attchk=Duel.IsExistingMatchingCard(s.attfilter,tp,LOCATION_MZONE,0,1,nil,e) @@ -98,7 +98,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(sc:GetAttack()*2) sc:RegisterEffect(e1) end diff --git a/official/c62980542.lua b/official/c62980542.lua index 364c146903..3fb527b479 100644 --- a/official/c62980542.lua +++ b/official/c62980542.lua @@ -1,4 +1,5 @@ --デステニー・デストロイ +--Destruction of Destiny local s,id=GetID() function s.initial_effect(c) --discard deck @@ -28,4 +29,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(tp,ct*1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c62991792.lua b/official/c62991792.lua index 6b95a4f59f..45d581cbea 100644 --- a/official/c62991792.lua +++ b/official/c62991792.lua @@ -83,4 +83,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) -end +end \ No newline at end of file diff --git a/official/c62991886.lua b/official/c62991886.lua index 1d072c4699..2ed393b8cb 100644 --- a/official/c62991886.lua +++ b/official/c62991886.lua @@ -1,4 +1,5 @@ --進化する人類 +--Unstable Evolution local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -20,4 +21,4 @@ function s.value(e,c) elseif Duel.GetLP(p)>Duel.GetLP(1-p) then return 1000 end -end +end \ No newline at end of file diff --git a/official/c63009228.lua b/official/c63009228.lua index 43e0683194..cfe8c0afb0 100644 --- a/official/c63009228.lua +++ b/official/c63009228.lua @@ -34,8 +34,8 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,7 +44,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -57,4 +57,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63012333.lua b/official/c63012333.lua index 9c25213992..5ee5779159 100644 --- a/official/c63012333.lua +++ b/official/c63012333.lua @@ -1,4 +1,5 @@ --精気を吸う骨の塔 +--Soul-Absorbing Bone Tower local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -35,4 +36,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63013339.lua b/official/c63013339.lua index b03cb7215d..6fabc9ea84 100644 --- a/official/c63013339.lua +++ b/official/c63013339.lua @@ -87,4 +87,4 @@ function s.retop(ag,e,tp,eg,ep,ev,re,r,rp) e1:SetValue(c:GetOwner()) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_TURN_SET)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c63014935.lua b/official/c63014935.lua index c29b10d27f..4f8e641142 100644 --- a/official/c63014935.lua +++ b/official/c63014935.lua @@ -1,4 +1,5 @@ --ヴォルカニック・クイーン +--Volcanic Queen local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -53,7 +54,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.phcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.phop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckReleaseGroup(tp,aux.TRUE,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -69,7 +70,7 @@ function s.spcop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() diff --git a/official/c63018036.lua b/official/c63018036.lua index eaf08264fa..5853efbe29 100644 --- a/official/c63018036.lua +++ b/official/c63018036.lua @@ -1,4 +1,5 @@ --緊急鋼核処分 +--Iron Core Immediate Disposal local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63018132.lua b/official/c63018132.lua index 34f0e2bd2a..ae171476ed 100644 --- a/official/c63018132.lua +++ b/official/c63018132.lua @@ -1,4 +1,5 @@ --ドラゴン・ライダー +--Dragon Manipulator local s,id=GetID() function s.initial_effect(c) --flip @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c63031396.lua b/official/c63031396.lua index b7139a4582..84d46a19c4 100644 --- a/official/c63031396.lua +++ b/official/c63031396.lua @@ -15,22 +15,22 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x93} +s.listed_series={SET_CYBER} function s.counterfilter(c) return c:IsRace(RACE_MACHINE) or c:GetSummonLocation()~=LOCATION_EXTRA end function s.cfilter(c) - return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93) and c:IsAbleToGraveAsCost() + return c:IsRace(RACE_DRAGON|RACE_MACHINE) and c:IsSetCard(SET_CYBER) and c:IsAbleToGraveAsCost() end function s.thfilter(c) - return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93) and c:IsAbleToHand() + return c:IsRace(RACE_DRAGON|RACE_MACHINE) and c:IsSetCard(SET_CYBER) and c:IsAbleToHand() end function s.check(sg,e,tp,mg) return sg:GetClassCount(Card.GetAttribute)==2 and sg:GetClassCount(Card.GetLocation)==2 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,sg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and aux.SelectUnselectGroup(rg,e,tp,2,2,s.check,0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.check,1,tp,HINTMSG_TOGRAVE) @@ -41,7 +41,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -55,7 +55,7 @@ function s.lizfilter(e,c) return not c:IsOriginalRace(RACE_MACHINE) end function s.gyfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsSetCard(0x93) and c:IsType(TYPE_FUSION) and c:IsAbleToGrave() + return c:IsRace(RACE_MACHINE) and c:IsSetCard(SET_CYBER) and c:IsType(TYPE_FUSION) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -71,4 +71,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c63035430.lua b/official/c63035430.lua index 5f1cc47991..f03e787df8 100644 --- a/official/c63035430.lua +++ b/official/c63035430.lua @@ -1,4 +1,5 @@ --摩天楼 -スカイスクレイパー- +--Skyscraper local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,13 +18,13 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.atkcon(e) s[0]=false - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.atktg(e,c) - return c==Duel.GetAttacker() and c:IsSetCard(0x3008) + return c==Duel.GetAttacker() and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.atkval(e,c) local d=Duel.GetAttackTarget() @@ -31,4 +32,4 @@ function s.atkval(e,c) s[0]=true return 1000 else return 0 end -end +end \ No newline at end of file diff --git a/official/c63049052.lua b/official/c63049052.lua index 9838e3e8e1..313eb95456 100644 --- a/official/c63049052.lua +++ b/official/c63049052.lua @@ -1,4 +1,5 @@ --璽律する武神 +--Bujin Regalia - The Jewel local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,16 +9,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_BUJIN} function s.filter(c) return c:IsFaceup() and c:IsRank(4) end @@ -39,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --material local e2=Effect.CreateEffect(c) @@ -50,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -58,7 +56,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) @@ -71,7 +69,7 @@ function s.eqlimit(e,c) return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_XYZ) end function s.mfilter(c) - return c:IsSetCard(0x88) and c:IsMonster() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_HAND,0,1,nil) end @@ -85,4 +83,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Overlay(ec,g) end -end +end \ No newline at end of file diff --git a/official/c63053267.lua b/official/c63053267.lua index 9732915f5b..615f0ad660 100644 --- a/official/c63053267.lua +++ b/official/c63053267.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e4:SetTargetRange(LOCATION_MZONE,0) e4:SetCondition(s.damcon) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x10b)) + e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TINDANGLE)) e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) c:RegisterEffect(e4) --Add a copy of itself to the hand @@ -50,31 +50,31 @@ function s.initial_effect(c) e6:SetOperation(s.regop) c:RegisterEffect(e6) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} s.listed_names={id} function s.indtg(e,c) - return c:IsSetCard(0x10b) and c:GetSequence()<5 + return c:IsSetCard(SET_TINDANGLE) and c:GetSequence()<5 end function s.indval(e,re,rp) return rp==1-e:GetHandlerPlayer() end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and eg:GetFirst():IsSetCard(0x10b) + return ep==1-tp and eg:GetFirst():IsSetCard(SET_TINDANGLE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.damcon(e) return e:GetHandler():GetFlagEffect(id)==0 end function s.cfilter(c) - return c:IsSetCard(0x10b) and c:IsDiscardable() + return c:IsSetCard(SET_TINDANGLE) and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsCode(id) and c:IsAbleToHand() @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63060238.lua b/official/c63060238.lua index fdb33ee50d..38351ed50d 100644 --- a/official/c63060238.lua +++ b/official/c63060238.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} s.listed_names={CARD_POLYMERIZATION} function s.thfilter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() @@ -45,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsSetCard(0x3008) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_ELEMENTAL_HERO) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,7 +63,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(tc:GetAttribute()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_ATTACK_FINAL) @@ -82,7 +82,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e4:SetTargetRange(1,0) e4:SetTarget(s.splimit) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) --Cannot Special Summon from the Main Deck check local e5=Effect.CreateEffect(c) @@ -90,7 +90,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetCode(CARD_EHERO_BLAZEMAN) e5:SetTargetRange(1,0) - e5:SetReset(RESET_PHASE+PHASE_END) + e5:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e5,tp) end function s.splimit(e,c,tp,sumtp,sumpos) diff --git a/official/c63086455.lua b/official/c63086455.lua index 6b8b884757..d7048b3034 100644 --- a/official/c63086455.lua +++ b/official/c63086455.lua @@ -1,9 +1,9 @@ --- 現世離レ --- Sundered from Overroot --- Scripted by Hatter +--現世離レ +--Terrors of the Overroot +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Send 1 card to the GY and Set 1 card from the GY + --Send 1 card to the GY and Set 1 card from the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_LEAVE_GRAVE) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -60,7 +60,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if sc:IsMonster() and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.SpecialSummon(sc,0,tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)>0 then Duel.ConfirmCards(1-tp,sc) - elseif sc:IsType(TYPE_SPELL+TYPE_TRAP) and sc:IsSSetable() then + elseif sc:IsSpellTrap() and sc:IsSSetable() then Duel.SSet(tp,sc,1-tp) end end diff --git a/official/c63092423.lua b/official/c63092423.lua index 3b50f37eca..6a095e906c 100644 --- a/official/c63092423.lua +++ b/official/c63092423.lua @@ -1,5 +1,5 @@ --弾帯城壁龍 ---Beltlink Wall Dragon +--Linkbelt Wall Dragon -- local s,id=GetID() function s.initial_effect(c) @@ -53,14 +53,14 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,2)) e6:SetCategory(CATEGORY_COUNTER) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_STANDBY) + e6:SetCode(EVENT_PHASE|PHASE_STANDBY) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetOperation(s.ctop2) c:RegisterEffect(e6) end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsLinkSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -99,5 +99,4 @@ function s.ctop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then c:AddCounter(0x44,1) end -end - +end \ No newline at end of file diff --git a/official/c6309986.lua b/official/c6309986.lua index a2590c9415..4e1dd5c235 100644 --- a/official/c6309986.lua +++ b/official/c6309986.lua @@ -34,7 +34,7 @@ function s.filter(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local locs=LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE + local locs=LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<5 then return false end e:SetLabel(0) @@ -48,7 +48,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,5,tp,locs) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local locs=LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE + local locs=LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE if Duel.GetLocationCount(tp,LOCATION_MZONE)<5 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,locs,0,nil,e,tp,44632120) local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,locs,0,nil,e,tp,71036835) @@ -75,10 +75,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c63101468.lua b/official/c63101468.lua index 70d893400a..c4a53b74f5 100644 --- a/official/c63101468.lua +++ b/official/c63101468.lua @@ -1,5 +1,5 @@ --マスターフレア・ヒュペリオン ---Master Flare Hyperion +--Masterflare Hyperion --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -30,14 +30,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_SANCTUARY_SKY} -s.listed_series={0x44} +s.listed_series={SET_THE_AGENT} function s.cpfilter(c) - return c:IsMonster() and (c:IsSetCard(0x44) or c:ListsCode(CARD_SANCTUARY_SKY)) and c:IsAbleToGraveAsCost() + return c:IsMonster() and (c:IsSetCard(SET_THE_AGENT) or c:ListsCode(CARD_SANCTUARY_SKY)) and c:IsAbleToGraveAsCost() end function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.cpfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cpfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cpfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cpfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA,0,1,1,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) e:SetLabel(g:GetFirst():GetOriginalCode()) end @@ -49,11 +49,11 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) @@ -65,9 +65,9 @@ function s.cfilter(c,tp) and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -82,4 +82,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63101919.lua b/official/c63101919.lua index 0712dba58c..9d5aed024c 100644 --- a/official/c63101919.lua +++ b/official/c63101919.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.addcc1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.addct1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -97,4 +97,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63102017.lua b/official/c63102017.lua index 48dd8a9746..de1239fb37 100644 --- a/official/c63102017.lua +++ b/official/c63102017.lua @@ -1,4 +1,5 @@ --『守備』封じ +--Stop Defense local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and not tc:IsAttackPos() then Duel.ChangePosition(tc,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c63120904.lua b/official/c63120904.lua index e88e1790bb..c2870b40ed 100644 --- a/official/c63120904.lua +++ b/official/c63120904.lua @@ -1,4 +1,5 @@ --暗黒大要塞鯱 +--Orca Mega-Fortress of Darkness local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.rfilter(c) return c:IsCode(90337190,95614612) end function s.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -56,4 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63142001.lua b/official/c63142001.lua index aabe1cd8ef..1beab06ede 100644 --- a/official/c63142001.lua +++ b/official/c63142001.lua @@ -1,4 +1,5 @@ --電池メン-単三型 +--Batteryman AA local s,id=GetID() function s.initial_effect(c) --atk,def @@ -27,4 +28,4 @@ function s.defval(e,c) local g=Duel.GetMatchingGroup(s.filter,c:GetControler(),LOCATION_MZONE,0,nil) if g:IsExists(Card.IsAttackPos,1,nil) then return 0 end return #g*1000 -end +end \ No newline at end of file diff --git a/official/c63144961.lua b/official/c63144961.lua index 9a943db111..0eb329badb 100644 --- a/official/c63144961.lua +++ b/official/c63144961.lua @@ -82,4 +82,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c63162310.lua b/official/c63162310.lua index 80178598fe..d8af598115 100644 --- a/official/c63162310.lua +++ b/official/c63162310.lua @@ -1,5 +1,6 @@ --ウォール・シャドウ +--Wall Shadow local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c63166095.lua b/official/c63166095.lua index cc2fef25fa..2f688d8183 100644 --- a/official/c63166095.lua +++ b/official/c63166095.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x115} +s.listed_series={SET_SKY_STRIKER} function s.cfilter(c) return c:GetSequence()<5 end @@ -22,7 +22,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsSetCard(0x115) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_SKY_STRIKER) and c:IsAbleToHand() and not c:IsCode(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c63175639.lua b/official/c63175639.lua index 7d99abaaf1..17afcddf74 100644 --- a/official/c63175639.lua +++ b/official/c63175639.lua @@ -1,4 +1,5 @@ --魔導化士 マット +--Fool of Prophecy local s,id=GetID() function s.initial_effect(c) --to grave @@ -19,19 +20,19 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.filter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToGrave() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToGrave() end function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.sgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -41,17 +42,13 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id)==0 then return false end local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) return g:GetClassCount(Card.GetCode)>=5 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -69,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63176202.lua b/official/c63176202.lua index 6c3ffc2715..9da2e8ead6 100644 --- a/official/c63176202.lua +++ b/official/c63176202.lua @@ -1,4 +1,5 @@ --大将軍 紫炎 +--Great Shogun Shien local s,id=GetID() function s.initial_effect(c) --special summon @@ -41,9 +42,9 @@ function s.initial_effect(c) e5:SetValue(s.elimit) c:RegisterEffect(e5) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.spcon(e,c) if c==nil then return true end @@ -52,7 +53,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,2,nil) end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -70,7 +71,7 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) end function s.aclimit1(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end @@ -85,4 +86,4 @@ function s.econ(e) end function s.elimit(e,te,tp) return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c63180841.lua b/official/c63180841.lua index 707143eaaa..527b7236fe 100644 --- a/official/c63180841.lua +++ b/official/c63180841.lua @@ -1,5 +1,5 @@ --シューティング・スター・ドラゴン・TG-EX ---Shooting Star Dragon T.G. - Expansion +--Shooting Star Dragon T.G. EX --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -53,7 +53,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g then return false end local c=e:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and g:IsExists(s.disfilter,1,nil,tp) + return re:IsMonsterEffect() and g:IsExists(s.disfilter,1,nil,tp) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.discfilter(c) @@ -84,7 +84,7 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsType,2,false,aux.ReleaseCheckMMZ,nil,TYPE_SYNCHRO) end @@ -100,4 +100,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63181559.lua b/official/c63181559.lua index 543f80f6f0..ae3525dd1a 100644 --- a/official/c63181559.lua +++ b/official/c63181559.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_BATTLE_START) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.GetCurrentPhase()<=PHASE_BATTLE end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atklimtg) e2:SetOperation(s.atklimop) c:RegisterEffect(e2) diff --git a/official/c63184227.lua b/official/c63184227.lua index 43a77b7a94..42de9e5282 100644 --- a/official/c63184227.lua +++ b/official/c63184227.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_RELEASE) e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={63184228} -s.listed_series={0x66,0x1017,0xa3} +s.listed_series={SET_WARRIOR,SET_SYNCHRON,SET_STARDUST} function s.spcfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -60,19 +60,19 @@ end function s.stcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - return (rc:IsSetCard(0x66) or rc:IsSetCard(0x1017) or rc:IsSetCard(0xa3)) and r & REASON_SYNCHRO == REASON_SYNCHRO + return (rc:IsSetCard(SET_WARRIOR) or rc:IsSetCard(SET_SYNCHRON) or rc:IsSetCard(SET_STARDUST)) and r & REASON_SYNCHRO == REASON_SYNCHRO end function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0xa3,TYPES_TOKEN,0,0,1,RACE_DRAGON,ATTRIBUTE_LIGHT) + Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_STARDUST,TYPES_TOKEN,0,0,1,RACE_DRAGON,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.stop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0xa3,TYPES_TOKEN,0,0,1,RACE_DRAGON,ATTRIBUTE_LIGHT) then + Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_STARDUST,TYPES_TOKEN,0,0,1,RACE_DRAGON,ATTRIBUTE_LIGHT) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63193536.lua b/official/c63193536.lua index 8696016082..18681d7d77 100644 --- a/official/c63193536.lua +++ b/official/c63193536.lua @@ -1,4 +1,5 @@ --重量オーバー +--Over Capacity local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63198739.lua b/official/c63198739.lua index e1ee72d5ba..2b1f5bfd5d 100644 --- a/official/c63198739.lua +++ b/official/c63198739.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,2}) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_NORMAL),tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end) diff --git a/official/c6320631.lua b/official/c6320631.lua index 4375a51326..810c8bcb40 100644 --- a/official/c6320631.lua +++ b/official/c6320631.lua @@ -1,4 +1,5 @@ --コアキメイル・ロック +--Koa'ki Meiru Boulder local s,id=GetID() function s.initial_effect(c) --search @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c) - return (c:IsCode(36623431) or (c:IsLevelBelow(4) and c:IsSetCard(0x1d))) and c:IsAbleToHand() + return (c:IsCode(36623431) or (c:IsLevelBelow(4) and c:IsSetCard(SET_KOAKI_MEIRU))) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c63211608.lua b/official/c63211608.lua index 4a689e8869..fe61bc7885 100644 --- a/official/c63211608.lua +++ b/official/c63211608.lua @@ -1,4 +1,5 @@ --A・ジェネクス・リバイバー +--Genex Ally Reliever local s,id=GetID() function s.initial_effect(c) --counter @@ -33,7 +34,7 @@ function s.chop1(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(0) end function s.chop2(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or (not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return end + if rp==tp or (not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return end local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER) if dp==tp then e:SetLabel(1) @@ -51,4 +52,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c63223260.lua b/official/c63223260.lua index ce1546a761..13761f0807 100644 --- a/official/c63223260.lua +++ b/official/c63223260.lua @@ -1,4 +1,5 @@ --フォトン・サテライト +--Photon Satellite local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x55} +s.listed_series={SET_PHOTON} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x55) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_PHOTON) and c:IsLevelAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -32,9 +33,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c63223467.lua b/official/c63223467.lua index b31db7e5f7..3b37c3ec4c 100644 --- a/official/c63223467.lua +++ b/official/c63223467.lua @@ -1,4 +1,5 @@ --RAI-MEI +--Rai-Mei local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c63224564.lua b/official/c63224564.lua index ee532e156f..93f6e67c26 100644 --- a/official/c63224564.lua +++ b/official/c63224564.lua @@ -1,4 +1,5 @@ --サイバー・ボンテージ +--Cyber Shield local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS)) @@ -9,4 +10,4 @@ function s.initial_effect(c) e2:SetValue(500) c:RegisterEffect(e2) end -s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} +s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} \ No newline at end of file diff --git a/official/c63227401.lua b/official/c63227401.lua index b533794509..f115e92c1e 100644 --- a/official/c63227401.lua +++ b/official/c63227401.lua @@ -1,4 +1,5 @@ --スキル・プリズナー +--Skill Prisoner local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.activate) c:RegisterEffect(e2) @@ -35,14 +36,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) - tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) + tc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCondition(s.discon) e1:SetOperation(s.disop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) end @@ -51,8 +52,8 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if tc:GetFlagEffect(id)==0 or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return g and g:IsContains(tc) and re:IsActiveType(TYPE_MONSTER) + return g and g:IsContains(tc) and re:IsMonsterEffect() end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c63233638.lua b/official/c63233638.lua index 19909d8ee8..4bebf7e3ca 100644 --- a/official/c63233638.lua +++ b/official/c63233638.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(Ritual.Target(ritual_target_params)) e1:SetOperation(Ritual.Operation(ritual_operation_params)) c:RegisterEffect(e1) diff --git a/official/c63253763.lua b/official/c63253763.lua index 1c38951362..44693b999b 100644 --- a/official/c63253763.lua +++ b/official/c63253763.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e4) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.spcon(e,c) if c==nil then return true end @@ -57,12 +57,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c63259351.lua b/official/c63259351.lua index 4c077b9653..a5ac756899 100644 --- a/official/c63259351.lua +++ b/official/c63259351.lua @@ -1,4 +1,5 @@ --奇跡のジュラシック・エッグ +--Miracle Jurassic Egg local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x14) @@ -65,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63261835.lua b/official/c63261835.lua index 2b1c7e1a9e..662c71fa53 100644 --- a/official/c63261835.lua +++ b/official/c63261835.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e1) --Return opponent's monster or your "Harpie" monster to hand diff --git a/official/c63265554.lua b/official/c63265554.lua index 8c18f3bb0a..3049756396 100644 --- a/official/c63265554.lua +++ b/official/c63265554.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function() return Duel.IsMainPhase() end) e2:SetCost(s.discost) @@ -38,13 +38,13 @@ function s.eqsfilter(c,tp,ec) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_DECK|LOCATION_GRAVE) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFacedown() or not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqsfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tp,c) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqsfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,tp,c) if #g==0 then return end local ft=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),3) local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dncheck,1,tp,HINTMSG_EQUIP) @@ -93,14 +93,14 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c63274863.lua b/official/c63274863.lua index db98fd8d3f..c9a1ad46fa 100644 --- a/official/c63274863.lua +++ b/official/c63274863.lua @@ -36,7 +36,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) diff --git a/official/c63300440.lua b/official/c63300440.lua index 8c0c768a3e..0645e9d5c9 100644 --- a/official/c63300440.lua +++ b/official/c63300440.lua @@ -1,4 +1,5 @@ --ドラゴン・シールド +--Dragon Shield local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON)) @@ -17,4 +18,4 @@ function s.initial_effect(c) local e6=e3:Clone() e6:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) c:RegisterEffect(e6) -end +end \ No newline at end of file diff --git a/official/c6330307.lua b/official/c6330307.lua index ffc55a09ed..315888b560 100644 --- a/official/c6330307.lua +++ b/official/c6330307.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -30,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x5048} +s.listed_series={SET_NUMBER_C39} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x5048) + return c:IsFaceup() and c:IsSetCard(SET_NUMBER_C39) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -66,8 +66,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) at:RegisterEffect(e1) Duel.ChainAttack(at) end -end +end \ No newline at end of file diff --git a/official/c63323539.lua b/official/c63323539.lua index 6fa92dda1f..8075f3eb8b 100644 --- a/official/c63323539.lua +++ b/official/c63323539.lua @@ -1,4 +1,5 @@ --トロイボム +--Trojan Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63356631.lua b/official/c63356631.lua index de46a1cfdf..584b85aede 100644 --- a/official/c63356631.lua +++ b/official/c63356631.lua @@ -1,4 +1,5 @@ --鳳翼の爆風 +--Phoenix Wing Wind Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -28,6 +29,6 @@ end function s.activate(e) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63362460.lua b/official/c63362460.lua index 9240bf3f68..c3ceb8eb56 100644 --- a/official/c63362460.lua +++ b/official/c63362460.lua @@ -1,4 +1,5 @@ --D-HERO ディバインガイ +--Destiny HERO - Celestial local s,id=GetID() function s.initial_effect(c) --destroy @@ -25,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.desfilter(c) return c:IsFaceup() and c:IsSpell() end @@ -47,7 +48,7 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and aux.exccon(e) end function s.cfilter(c) - return c:IsSetCard(0xc008) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -67,4 +68,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63364266.lua b/official/c63364266.lua index d5712a570e..4058547f95 100644 --- a/official/c63364266.lua +++ b/official/c63364266.lua @@ -1,4 +1,5 @@ --ゴヨウ・チェイサー +--Goyo Chaser local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -46,9 +47,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c6337436.lua b/official/c6337436.lua index 9000c59794..b34c3f2d7e 100644 --- a/official/c6337436.lua +++ b/official/c6337436.lua @@ -1,4 +1,5 @@ --連弾の魔術師 +--Rapid-Fire Magician local s,id=GetID() function s.initial_effect(c) --damage @@ -13,4 +14,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if re:GetActiveType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp then Duel.Damage(1-tp,400,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63391643.lua b/official/c63391643.lua index 13f5430d8c..fad2f3ec49 100644 --- a/official/c63391643.lua +++ b/official/c63391643.lua @@ -1,4 +1,5 @@ --千本ナイフ +--Thousand Knives local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63394872.lua b/official/c63394872.lua index 1a8889e991..27db7e1fb0 100644 --- a/official/c63394872.lua +++ b/official/c63394872.lua @@ -31,4 +31,4 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp) local seq=e:GetLabel() if tc:IsImmuneToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or not Duel.CheckLocation(tp,LOCATION_MZONE,seq) then return end Duel.MoveSequence(tc,seq) -end +end \ No newline at end of file diff --git a/official/c63410069.lua b/official/c63410069.lua index c345170d8e..78bbca9681 100644 --- a/official/c63410069.lua +++ b/official/c63410069.lua @@ -1,11 +1,10 @@ --砂漠の飛蝗賊 --Desert Locusts --Scripted by Cybercatman - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving - c:EnableReviveLimit() + c:EnableReviveLimit() --Synchro summon procedure Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) --If synchro summoned, the turn player discards 1 @@ -25,7 +24,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.sccon) e2:SetTarget(s.sctarg) @@ -33,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -46,10 +45,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_DISCARD) local sg=g:Select(cp,1,1,nil) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c63413494.lua b/official/c63413494.lua index c0491f3a99..12d0ebad4f 100644 --- a/official/c63413494.lua +++ b/official/c63413494.lua @@ -30,5 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c63422098.lua b/official/c63422098.lua index 8d451e4a39..946bbbefff 100644 --- a/official/c63422098.lua +++ b/official/c63422098.lua @@ -31,7 +31,7 @@ function s.val(e,c) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsSummonType(SUMMON_TYPE_SYNCHRO) then + if c:IsSynchroSummoned() then local ct=c:GetMaterialCount()-1 c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,0,ct*200) end diff --git a/official/c6343408.lua b/official/c6343408.lua index b13b6edcb3..304c09519a 100644 --- a/official/c6343408.lua +++ b/official/c6343408.lua @@ -1,4 +1,5 @@ --奇跡の発掘 +--Miracle Dig local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,6 +30,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c63436931.lua b/official/c63436931.lua index 19226f7533..38a3316912 100644 --- a/official/c63436931.lua +++ b/official/c63436931.lua @@ -76,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c63442604.lua b/official/c63442604.lua index 74ba55343f..a2a6e84694 100644 --- a/official/c63442604.lua +++ b/official/c63442604.lua @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -67,9 +67,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) de:SetCode(EVENT_PHASE+PHASE_END) de:SetCountLimit(1) de:SetOperation(s.desop) - de:SetReset(RESET_EVENT+RESETS_STANDARD) + de:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(de) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63465535.lua b/official/c63465535.lua index 19007734b3..04101f6787 100644 --- a/official/c63465535.lua +++ b/official/c63465535.lua @@ -82,5 +82,5 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipGroup():Filter(s.eqfilter,nil):GetFirst() - Duel.Destroy(ec,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(ec,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c63468625.lua b/official/c63468625.lua index 55d719e36b..9d0bb8ee32 100644 --- a/official/c63468625.lua +++ b/official/c63468625.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_DAMAGE) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.damcon) @@ -47,12 +47,12 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.eqval(ec,c,tp) return ec:IsType(TYPE_SYNCHRO) and ec:IsControler(1-tp) end function s.spfilter(c) - return c:IsMonster() and c:IsSetCard(0x13) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_MEKLORD) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -96,7 +96,7 @@ function s.equipop(c,e,tp,tc) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -108,7 +108,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.dcfilter(c) return c:GetFlagEffect(id)~=0 and c:IsAbleToGraveAsCost() @@ -123,7 +123,7 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local atk=g:GetFirst():GetTextAttack() if atk<0 then atk=0 end @@ -138,4 +138,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63477921.lua b/official/c63477921.lua index 9df7c938ab..d9ce1bead4 100644 --- a/official/c63477921.lua +++ b/official/c63477921.lua @@ -1,4 +1,5 @@ --サイバー・サモン・ブラスター +--Cyber Summon Blaster local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63485233.lua b/official/c63485233.lua index 3f2105941c..2bc702388f 100644 --- a/official/c63485233.lua +++ b/official/c63485233.lua @@ -1,4 +1,5 @@ --スター・チェンジャー +--Star Changer local s,id=GetID() function s.initial_effect(c) --lv change @@ -31,10 +32,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) if e:GetLabel()==0 then e1:SetValue(1) else e1:SetValue(-1) end tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c63487632.lua b/official/c63487632.lua index 43ea93b85e..284e039a9c 100644 --- a/official/c63487632.lua +++ b/official/c63487632.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -46,13 +46,13 @@ function s.initial_effect(c) e5:SetLabelObject(e4) c:RegisterEffect(e5) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} s.listed_names={id} function s.eqval(ec,c,tp) return ec:IsControler(tp) and not ec:IsCode(id) and ec:IsRace(RACE_DRAGON) end function s.spfilter(c,tp) - return c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x29) and c:IsAbleToRemoveAsCost() + return c:GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_DRAGUNITY) and c:IsAbleToRemoveAsCost() and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -132,4 +132,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63492244.lua b/official/c63492244.lua index 1214531156..fca05c84d1 100644 --- a/official/c63492244.lua +++ b/official/c63492244.lua @@ -31,13 +31,13 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() - return ec:IsSetCard(0xfb) and ec:IsSummonType(SUMMON_TYPE_LINK) and ec:IsSummonPlayer(tp) + return ec:IsSetCard(SET_TRICKSTAR) and ec:IsLinkSummoned() and ec:IsSummonPlayer(tp) end function s.spfilter(c,e,tp) - return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsSetCard(0xfb) + return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsSetCard(SET_TRICKSTAR) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -57,12 +57,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -85,13 +85,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:ResetFlagEffect(id) tc:ResetFlagEffect(id) local fid=c:GetFieldID() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetLabelObject(tc) e1:SetCondition(s.rcon) e1:SetValue(1) @@ -101,7 +101,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabel(fid) e2:SetLabelObject(e1) e2:SetCondition(s.rstcon) @@ -113,7 +113,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCountLimit(1) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetLabel(fid) e3:SetLabelObject(tc) e3:SetCondition(s.agcon) @@ -124,7 +124,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetCode(EVENT_CHAINING) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetLabel(fid) e4:SetLabelObject(e3) e4:SetOperation(s.rstop2) @@ -173,4 +173,4 @@ function s.rstop2(e,tp,eg,ep,ev,re,r,rp) local te=e:GetLabelObject() tc:ResetFlagEffect(id) if te then te:Reset() end -end +end \ No newline at end of file diff --git a/official/c63503850.lua b/official/c63503850.lua index cb7ec4a443..26de2fe3d0 100644 --- a/official/c63503850.lua +++ b/official/c63503850.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFaceup() end @@ -36,14 +36,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end if Duel.IsChainDisablable(0) then - local g=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_HAND,nil,tc:GetOriginalType()&0x7) + local g=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_HAND,nil,tc:GetOriginalType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) if #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local sg=g:Select(1-tp,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) return end end Duel.Destroy(tc,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c63504681.lua b/official/c63504681.lua index 0390d70123..809f607e1b 100644 --- a/official/c63504681.lua +++ b/official/c63504681.lua @@ -74,7 +74,7 @@ function s.initial_effect(c) end s.xyz_number=86 function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -96,4 +96,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63509474.lua b/official/c63509474.lua index 1a79540543..ef44f9f09a 100644 --- a/official/c63509474.lua +++ b/official/c63509474.lua @@ -71,5 +71,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,2)) end - -end +end \ No newline at end of file diff --git a/official/c6351548.lua b/official/c6351548.lua index 54de1b609f..0036b5f762 100644 --- a/official/c6351548.lua +++ b/official/c6351548.lua @@ -1,4 +1,5 @@ --曙光の騎士 +--Dawn Knight local s,id=GetID() function s.initial_effect(c) --to grave @@ -59,6 +60,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63516460.lua b/official/c63516460.lua index df2b2a84be..2eb135134a 100644 --- a/official/c63516460.lua +++ b/official/c63516460.lua @@ -1,4 +1,5 @@ --一陣の風 +--Mystical Wind Typhoon local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)>1 and Duel.CheckChainUniqueness() end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63519819.lua b/official/c63519819.lua index 0e09e3bb69..ada553758f 100644 --- a/official/c63519819.lua +++ b/official/c63519819.lua @@ -70,14 +70,14 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_DESTROY_SUBSTITUTE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(s.repval) tc:RegisterEffect(e2) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsMonster() and tc:IsControler(1-tp) and s.eqcon(e,tp,eg,ep,ev,re,r,rp) then + if tc and tc:IsRelateToEffect(e) and tc:IsMonster() and tc:IsControler(1-tp) and s.eqcon(e,tp,eg,ep,ev,re,r,rp) then s.equipop(c,e,tp,tc) end end @@ -111,4 +111,4 @@ function s.defval(e,c) else return def end -end +end \ No newline at end of file diff --git a/official/c63528891.lua b/official/c63528891.lua index 386dce0cd5..a22c8f266c 100644 --- a/official/c63528891.lua +++ b/official/c63528891.lua @@ -17,4 +17,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_CYBERSE),c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c63533837.lua b/official/c63533837.lua index e87c26b9b7..fef333f9e0 100644 --- a/official/c63533837.lua +++ b/official/c63533837.lua @@ -62,7 +62,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetOperation(s.caop) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end end @@ -71,4 +71,4 @@ function s.caop(e,tp) if c:CanChainAttack() then Duel.ChainAttack() end -end +end \ No newline at end of file diff --git a/official/c6353603.lua b/official/c6353603.lua index 006131c52c..31c4155229 100644 --- a/official/c6353603.lua +++ b/official/c6353603.lua @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.setcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -42,7 +42,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c63542003.lua b/official/c63542003.lua index 39988d2576..bd9ee8f0af 100644 --- a/official/c63542003.lua +++ b/official/c63542003.lua @@ -1,9 +1,9 @@ --- 宿神像ケルドウ --- Keldo the Possessed Statue --- Scripted by Hatter +--宿神像ケルドウ +--Keldo the Sacred Protector +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -14,17 +14,17 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Return cards from the GY to the Deck + --Return cards from the GY to the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) - e2:SetCost(aux.bfgcost) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) @@ -36,7 +36,7 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,c) end function s.thfilter(c) return (c:IsCode(CARD_EXCHANGE_SPIRIT) or c:ListsCode(CARD_EXCHANGE_SPIRIT)) and c:IsAbleToHand() @@ -64,7 +64,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return c~=chkc and chkc:IsLocation(LOCATION_GRAVE) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,c) end - local max=(Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_EXCHANGE_SPIRIT),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) and 5 or 3) + local max=(Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_EXCHANGE_SPIRIT),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) and 5 or 3) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,max,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) @@ -74,4 +74,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63545861.lua b/official/c63545861.lua index 729f61026a..8fffee1197 100644 --- a/official/c63545861.lua +++ b/official/c63545861.lua @@ -1,4 +1,5 @@ --セイクリッドの流星 +--Constellar Meteor local s,id=GetID() function s.initial_effect(c) -- @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetOperation(s.regop) c:RegisterEffect(e1) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) end end @@ -18,14 +19,14 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() local g=Group.CreateGroup() - if a:IsSetCard(0x53) and d and d:IsControler(1-tp) and d:IsRelateToBattle() then g:AddCard(d) end - if d and d:IsSetCard(0x53) and a:IsControler(1-tp) and a:IsRelateToBattle() then g:AddCard(a) end + if a:IsSetCard(SET_CONSTELLAR) and d and d:IsControler(1-tp) and d:IsRelateToBattle() then g:AddCard(d) end + if d and d:IsSetCard(SET_CONSTELLAR) and a:IsControler(1-tp) and a:IsRelateToBattle() then g:AddCard(a) end Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6355563.lua b/official/c6355563.lua index a9147c5078..5a34e25202 100644 --- a/official/c6355563.lua +++ b/official/c6355563.lua @@ -1,5 +1,5 @@ --Y-ドラゴン・イアヘッド ---Y-Dragon Yearhead +--Y-Yare Head --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) diff --git a/official/c63571750.lua b/official/c63571750.lua index 08e9c5914a..1da1931b30 100644 --- a/official/c63571750.lua +++ b/official/c63571750.lua @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and chkc:IsAbleToHand() end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil) @@ -50,4 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,tc) end end -end +end \ No newline at end of file diff --git a/official/c63583431.lua b/official/c63583431.lua index d21d76f93c..5133fd8b16 100644 --- a/official/c63583431.lua +++ b/official/c63583431.lua @@ -1,4 +1,5 @@ --ゴゴゴ護符 +--Gogogo Talisman local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,9 +33,9 @@ function s.initial_effect(c) e4:SetOperation(s.indop) c:RegisterEffect(e4) end -s.listed_series={0x59} +s.listed_series={SET_GOGOGO} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x59) + return c:IsFaceup() and c:IsSetCard(SET_GOGOGO) end function s.damcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) @@ -47,7 +48,7 @@ function s.indcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(0x59) + return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(SET_GOGOGO) end function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -61,7 +62,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c63595262.lua b/official/c63595262.lua index e3d006a182..06fe8ad473 100644 --- a/official/c63595262.lua +++ b/official/c63595262.lua @@ -1,4 +1,5 @@ --ユニコーンの導き +--Unicorn Beacon local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsLevelBelow(5) and c:IsRace(RACE_BEAST+RACE_WINGEDBEAST) + return c:IsFaceup() and c:IsLevelBelow(5) and c:IsRace(RACE_BEAST|RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c63612442.lua b/official/c63612442.lua index a462135311..40a2300f08 100644 --- a/official/c63612442.lua +++ b/official/c63612442.lua @@ -1,12 +1,11 @@ --X-セイバー ソウザ --X-Saber Souza - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Synchro summon procedure - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x100d),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_X_SABER),1,99) --Gain 1 of 2 effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -17,11 +16,10 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x100d} - +s.listed_series={SET_X_SABER} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),0x100d) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),0x100d) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),SET_X_SABER) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),SET_X_SABER) Duel.Release(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,8 +34,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) elseif t1==0 then op=Duel.SelectOption(tp,aux.Stringid(id,1)) else Duel.SelectOption(tp,aux.Stringid(id,2)) op=1 end e:SetLabel(op) - if op==0 then c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) - else c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) end + if op==0 then c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) + else c:RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -48,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_BATTLE_START) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetCondition(s.descon) e1:SetTarget(s.destg) e1:SetOperation(s.desop) @@ -60,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) c:RegisterEffect(e1) diff --git a/official/c63626024.lua b/official/c63626024.lua index 9caa500cfd..6dafd728e4 100644 --- a/official/c63626024.lua +++ b/official/c63626024.lua @@ -59,4 +59,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63630268.lua b/official/c63630268.lua index 087646ba3e..1c74b3913b 100644 --- a/official/c63630268.lua +++ b/official/c63630268.lua @@ -33,10 +33,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.val) - e1:SetReset(RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e1,tp) end end function s.val(e,re,val,r,rp,rc) return math.floor(val/2) -end +end \ No newline at end of file diff --git a/official/c63644830.lua b/official/c63644830.lua index fb95ce8638..82f808c8bf 100644 --- a/official/c63644830.lua +++ b/official/c63644830.lua @@ -57,9 +57,9 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63665606.lua b/official/c63665606.lua index 9d452bd502..e3de71c199 100644 --- a/official/c63665606.lua +++ b/official/c63665606.lua @@ -1,4 +1,5 @@ --虚無の波動 +--Wave-Motion Inferno local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCondition(s.atcon) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_INFERNITY)) e2:SetValue(400) c:RegisterEffect(e2) local e3=e2:Clone() @@ -25,19 +26,15 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_TOGRAVE) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_SZONE) - e4:SetCost(s.discost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.distg) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.atcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_HAND) @@ -45,4 +42,4 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63665875.lua b/official/c63665875.lua index fd9e0701e7..d8f568b406 100644 --- a/official/c63665875.lua +++ b/official/c63665875.lua @@ -1,4 +1,5 @@ --ゴブリンゾンビ +--Goblin Zombie local s,id=GetID() function s.initial_effect(c) --handes @@ -49,4 +50,4 @@ function s.srop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c63676256.lua b/official/c63676256.lua index a74700c770..e16bec6276 100644 --- a/official/c63676256.lua +++ b/official/c63676256.lua @@ -1,4 +1,5 @@ --バスター・ショットマン +--Buster Blaster local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,nil,true,false) @@ -41,4 +42,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst():GetBattleTarget() local desg=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tc:GetRace()) Duel.Destroy(desg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63689843.lua b/official/c63689843.lua index 476239baf2..2c20482803 100644 --- a/official/c63689843.lua +++ b/official/c63689843.lua @@ -1,4 +1,5 @@ --白兵戦 +--Attack and Receive local s,id=GetID() function s.initial_effect(c) --Damage @@ -24,4 +25,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if gc>0 then Duel.Damage(p,300*gc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63695531.lua b/official/c63695531.lua index 7831c89a3c..ef01a3c83b 100644 --- a/official/c63695531.lua +++ b/official/c63695531.lua @@ -1,4 +1,5 @@ --墓守の長槍兵 +--Gravekeeper's Spear Soldier local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c63703130.lua b/official/c63703130.lua index e5bc5c6249..77e773c04e 100644 --- a/official/c63703130.lua +++ b/official/c63703130.lua @@ -1,4 +1,5 @@ --O-オーバーソウル +--O - Oversoul local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63708033.lua b/official/c63708033.lua index d80e272acf..24eba73d8b 100644 --- a/official/c63708033.lua +++ b/official/c63708033.lua @@ -1,9 +1,9 @@ --- 春化精と花蕾 --- Vernalizer Fairy and Flower Buds --- Scripted by Hatter +--春化精と花蕾 +--Vernusylph and the Flower Buds +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Return cards to hand + --Return cards to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) @@ -11,15 +11,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x27e} function s.ctfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) - and c:IsSummonLocation(LOCATION_GRAVE) and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and c:IsSummonLocation(LOCATION_GRAVE) and c:IsSpecialSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsAbleToHand() end diff --git a/official/c63717421.lua b/official/c63717421.lua index 609ffb971f..06941c951b 100644 --- a/official/c63717421.lua +++ b/official/c63717421.lua @@ -1,7 +1,6 @@ --起動指令 ギア・チャージ --Boot-Up Order - Gear Charge --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --When activated, special summon any number of your "Gadget" monsters from S/T zones @@ -24,10 +23,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={36322312} -s.listed_series={0x51} - +s.listed_series={SET_GADGET} function s.spfilter(c,e,tp) - return c:IsSetCard(0x51) and c:IsOriginalType(TYPE_MONSTER) and c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GADGET) and c:IsOriginalType(TYPE_MONSTER) and c:IsType(TYPE_EQUIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -64,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsCode(36322312) and c:IsAbleToHand() diff --git a/official/c637216.lua b/official/c637216.lua index 55dabf3496..1367f3cafb 100644 --- a/official/c637216.lua +++ b/official/c637216.lua @@ -1,7 +1,6 @@ --モンスターエクスプレス --Monster Express --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Send 1 monster from extra deck to GY @@ -43,7 +42,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit(g:GetFirst())) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c63730624.lua b/official/c63730624.lua index 0ce8f480ed..533adca697 100644 --- a/official/c63730624.lua +++ b/official/c63730624.lua @@ -1,4 +1,5 @@ --ダブルツールD&C +--Double Tool C&D local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,0,s.filter,s.eqlimit) @@ -38,20 +39,20 @@ function s.initial_effect(c) e6:SetOperation(s.oop2) c:RegisterEffect(e6) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} s.listed_names={2403771} function s.eqlimit(e,c) return c:GetControler()==e:GetHandler():GetControler() - and (c:IsCode(2403771) or (c:IsSetCard(0x26) and c:GetLevel()>=4 and c:IsRace(RACE_MACHINE))) + and (c:IsCode(2403771) or (c:IsSetCard(SET_MORPHTRONIC) and c:GetLevel()>=4 and c:IsRace(RACE_MACHINE))) end function s.filter(c) - return c:IsCode(2403771) or (c:IsSetCard(0x26) and c:GetLevel()>=4 and c:IsRace(RACE_MACHINE)) + return c:IsCode(2403771) or (c:IsSetCard(SET_MORPHTRONIC) and c:GetLevel()>=4 and c:IsRace(RACE_MACHINE)) end function s.scon1(e) return e:GetHandler():GetEquipTarget() and Duel.GetTurnPlayer()==e:GetHandler():GetControler() end function s.scon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetAttacker()==e:GetHandler():GetEquipTarget() + return Duel.IsTurnPlayer(tp) and Duel.GetAttacker()==e:GetHandler():GetEquipTarget() end function s.sop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,12 +60,12 @@ function s.sop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) d:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) d:RegisterEffect(e2) end function s.ocon1(e) @@ -76,7 +77,7 @@ end function s.ocon2(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return Duel.GetTurnPlayer()~=tp and d==e:GetHandler():GetEquipTarget() and a:IsRelateToBattle() + return Duel.IsTurnPlayer(1-tp) and d==e:GetHandler():GetEquipTarget() and a:IsRelateToBattle() end function s.otg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -87,4 +88,4 @@ function s.oop2(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToBattle() then Duel.Destroy(a,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63731062.lua b/official/c63731062.lua index f4fc6d1608..be1ff0f43d 100644 --- a/official/c63731062.lua +++ b/official/c63731062.lua @@ -1,7 +1,6 @@ --白闘気一角 ---White Aura Monokeros +--White Aura Monoceros --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -34,7 +33,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -56,23 +55,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.cfilter(c,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,7 +85,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c63737050.lua b/official/c63737050.lua index ca62f42862..74c12538c2 100644 --- a/official/c63737050.lua +++ b/official/c63737050.lua @@ -1,4 +1,5 @@ --龍大神 +--Ryu Okami local s,id=GetID() function s.initial_effect(c) --tograve @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63741331.lua b/official/c63741331.lua index 3f3d02bdd5..275ee5fdb9 100644 --- a/official/c63741331.lua +++ b/official/c63741331.lua @@ -1,5 +1,5 @@ --フォッグ・コントロール ---Fog COntrol +--Fog Control local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.counter_place_list={0x1019} -s.listed_series={0x18} +s.counter_place_list={COUNTER_FOG} +s.listed_series={SET_CLOUDIAN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) + return c:IsFaceup() and c:IsSetCard(SET_CLOUDIAN) end function s.filter(c,e) return c:IsFaceup() and c:IsCanBeEffectTarget(e) @@ -35,6 +35,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x1019,3) + tc:AddCounter(COUNTER_FOG,3) end -end +end \ No newline at end of file diff --git a/official/c6374519.lua b/official/c6374519.lua index 33acfeb3d8..1ba298843b 100644 --- a/official/c6374519.lua +++ b/official/c6374519.lua @@ -1,7 +1,6 @@ --アメイズメント・スペシャルショー --Amazement Special Show --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Return 1 of your targeted "Amazement" monsters to hand @@ -15,10 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x15e} - +s.listed_series={SET_AMAZEMENT} function s.thfilter(c,tp,e) - return c:IsFaceup() and c:IsSetCard(0x15e) and c:IsLocation(LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_AMAZEMENT) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and (not e or c:IsCanBeEffectTarget(e)) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -36,7 +34,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x15e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AMAZEMENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() diff --git a/official/c63746411.lua b/official/c63746411.lua index 0d53dd5dff..022568f146 100644 --- a/official/c63746411.lua +++ b/official/c63746411.lua @@ -1,4 +1,5 @@ --No.106 巨岩掌ジャイアント・ハンド +--Number 106: Giant Hand local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,20 +13,16 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=106 function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) + return rp~=tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) end @@ -44,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1,true) local e2=e1:Clone() @@ -54,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c63748694.lua b/official/c63748694.lua index 7bc897e302..63ae87bc39 100644 --- a/official/c63748694.lua +++ b/official/c63748694.lua @@ -1,5 +1,5 @@ --赤しゃりの軍貫 ---Gunkan Suship Aka-Shari +--Gunkan Suship Shari Red --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) e1:SetValue(CARD_SUSHIP_SHARI) c:RegisterEffect(e1) --Special Summon itself from the hand @@ -24,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_SUSHIP_SHARI} -s.listed_series={0x168} +s.listed_series={SET_GUNKAN} function s.cfilter(c) return c:IsCode(CARD_SUSHIP_SHARI) and not c:IsPublic() end @@ -41,10 +41,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.spfilter(c,e,tp,mc) - return c:IsSetCard(0x168) and not c:IsCode(CARD_SUSHIP_SHARI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUNKAN) and not c:IsCode(CARD_SUSHIP_SHARI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mc,c) end function s.xyzfilter(c,e,tp,mc1,mc2) @@ -67,13 +67,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) end if Duel.SpecialSummonComplete()==0 then return end diff --git a/official/c63749102.lua b/official/c63749102.lua index 8d14c5246c..afbac82c3a 100644 --- a/official/c63749102.lua +++ b/official/c63749102.lua @@ -1,6 +1,5 @@ --イグザリオン・ユニバース --Exarion Universe - local s,id=GetID() function s.initial_effect(c) --Loses 400 ATK, and if it does, inflict piercing damage @@ -26,7 +25,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetDescription(3208) diff --git a/official/c63767246.lua b/official/c63767246.lua index e5c0f16484..614ea1ecd2 100644 --- a/official/c63767246.lua +++ b/official/c63767246.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()~=e:GetHandler() end) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.chngtgop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) --Make 1 of your Xyz monsters gain ATK diff --git a/official/c63789924.lua b/official/c63789924.lua index 7b7116acb7..2f320da18c 100644 --- a/official/c63789924.lua +++ b/official/c63789924.lua @@ -1,4 +1,5 @@ --盗人の煙玉 +--Smoke Grenade of the Thief local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 and e:GetHandler():GetEquipTarget()~=nil and e:GetHandler():IsLocation(LOCATION_GRAVE) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and e:GetHandler():GetEquipTarget()~=nil and e:GetHandler():IsLocation(LOCATION_GRAVE) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,7 +30,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(p,g) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD) local sg=g:Select(p,1,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c63804637.lua b/official/c63804637.lua index 1995e74bcb..faa0a6cb8c 100644 --- a/official/c63804637.lua +++ b/official/c63804637.lua @@ -1,6 +1,5 @@ --幻奏のイリュージョン --Melodious Illusion - local s,id=GetID() function s.initial_effect(c) --Targeted "Melodious" monster becomes unaffected by opponent's card effects, also can attack twice @@ -10,12 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) + return c:IsFaceup() and c:IsSetCard(SET_MELODIOUS) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.efilter) e1:SetOwnerPlayer(tp) tc:RegisterEffect(e1) @@ -44,11 +43,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) tc:RegisterEffect(e2) end end function s.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsSpellTrapEffect() end \ No newline at end of file diff --git a/official/c63804806.lua b/official/c63804806.lua index 55b6796335..cf7c794e67 100644 --- a/official/c63804806.lua +++ b/official/c63804806.lua @@ -44,14 +44,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -97,4 +97,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63806265.lua b/official/c63806265.lua index 85691bcb9a..bc5c101605 100644 --- a/official/c63806265.lua +++ b/official/c63806265.lua @@ -13,28 +13,28 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1034,0x2034} +s.listed_series={SET_CRYSTAL_BEAST,SET_ULTIMATE_CRYSTAL} function s.cfilter(c) - return c:IsSetCard(0x1034) and (not c:IsOnField() or c:IsFaceup()) + return c:IsSetCard(SET_CRYSTAL_BEAST) and (not c:IsOnField() or c:IsFaceup()) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) local ct=g:GetClassCount(Card.GetCode) return ct>6 end function s.filter(c,e,tp) - return c:IsSetCard(0x2034) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_ULTIMATE_CRYSTAL) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c63813056.lua b/official/c63813056.lua index f9eadd1c8b..68ebbb1d0d 100644 --- a/official/c63813056.lua +++ b/official/c63813056.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x8),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_HERO),2) c:EnableReviveLimit() --atk local e1=Effect.CreateEffect(c) @@ -20,12 +20,12 @@ function s.initial_effect(c) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.atktg(e,c) - return (e:GetHandler():GetLinkedGroup():IsContains(c) or c==e:GetHandler()) and c:IsSetCard(0x8) and c:IsFaceup() + return (e:GetHandler():GetLinkedGroup():IsContains(c) or c==e:GetHandler()) and c:IsSetCard(SET_HERO) and c:IsFaceup() end function s.atkfilter(c) - return c:IsSetCard(0x8) and c:IsMonster() + return c:IsSetCard(SET_HERO) and c:IsMonster() end function s.atkval(e,c) return Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)*100 diff --git a/official/c63821877.lua b/official/c63821877.lua index dd8672df4b..770cf12beb 100644 --- a/official/c63821877.lua +++ b/official/c63821877.lua @@ -65,4 +65,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63851864.lua b/official/c63851864.lua index 0ba62fbfc1..dfc08d0449 100644 --- a/official/c63851864.lua +++ b/official/c63851864.lua @@ -1,4 +1,5 @@ --ブレイク・ドロー +--Break! Draw! local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),nil,nil,s.target) @@ -26,12 +27,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) c:SetTurnCounter(0) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -58,4 +59,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c63854005.lua b/official/c63854005.lua index edb314dce4..e2a5fe4f34 100644 --- a/official/c63854005.lua +++ b/official/c63854005.lua @@ -1,5 +1,5 @@ --簡素融合 ---Retort Fusion +--Ready Fusion local s,id=GetID() function s.initial_effect(c) --Special summon @@ -8,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c,e,tp) return c:IsType(TYPE_FUSION) and c:IsLevelBelow(6) and not c:IsType(TYPE_EFFECT) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() @@ -38,9 +34,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) tc:CompleteProcedure() --Destroy it during end phase local e2=Effect.CreateEffect(e:GetHandler()) @@ -66,4 +62,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6387204.lua b/official/c6387204.lua index 4e7b3b1290..1711f1b2e2 100644 --- a/official/c6387204.lua +++ b/official/c6387204.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.lpop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=6 s.listed_names={9161357} function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -43,7 +43,7 @@ function s.equipop(c,e,tp,tc) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1000) tc:RegisterEffect(e2) end @@ -59,18 +59,18 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(0,1) e3:SetValue(0) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=e3:Clone() e4:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end function s.lpcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(1-tp)~=100 and e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,9161357) end function s.filter(c) - return c:GetFlagEffect(id)~=0 and c:IsSetCard(0x48) and c:IsFaceup() and c:IsAbleToGraveAsCost() + return c:GetFlagEffect(id)~=0 and c:IsSetCard(SET_NUMBER) and c:IsFaceup() and c:IsAbleToGraveAsCost() end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) @@ -87,6 +87,6 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c63875853.lua b/official/c63875853.lua index 1807d18ce9..4ede5a0b97 100644 --- a/official/c63875853.lua +++ b/official/c63875853.lua @@ -1,5 +1,5 @@ --身分転換 ---Role Reversal +--Trading Places -- local s,id=GetID() function s.initial_effect(c) @@ -21,5 +21,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,lp2) Duel.SetLP(1-tp,lp1) end -end - +end \ No newline at end of file diff --git a/official/c63881033.lua b/official/c63881033.lua index 90d635ffa2..cf81b0dc46 100644 --- a/official/c63881033.lua +++ b/official/c63881033.lua @@ -70,7 +70,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -95,14 +95,14 @@ function s.thfilter(c) return c:IsCode(94220427) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c63883999.lua b/official/c63883999.lua index 697302e289..71cd0825e0 100644 --- a/official/c63883999.lua +++ b/official/c63883999.lua @@ -1,4 +1,5 @@ --伏魔殿-悪魔の迷宮- +--Archfiend Palabyrinth local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,18 +28,18 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.filter(c,e,tp,ft) local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and c:IsSetCard(0x45) + return lv>0 and c:IsFaceup() and c:IsSetCard(SET_ARCHFIEND) and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE,0,1,c,ft) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,lv,e,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,nil,lv,e,tp) end function s.rfilter(c,ft) return c:IsFaceup() and c:IsRace(RACE_FIEND) and c:IsAbleToRemove() and (ft>0 or c:GetSequence()<5) end function s.spfilter(c,lv,e,tp) - return c:IsSetCard(0x45) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ARCHFIEND) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -46,7 +47,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return ft>-1 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,ft) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) @@ -57,8 +58,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE,0,1,1,tc,Duel.GetLocationCount(tp,LOCATION_MZONE)) if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tc:GetLevel(),e,tp) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil,tc:GetLevel(),e,tp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c63899465.lua b/official/c63899465.lua index 88dab99737..a12db22a6c 100644 --- a/official/c63899465.lua +++ b/official/c63899465.lua @@ -1,5 +1,5 @@ --R-ACEヘッドクオーター ---Rescue-ACE Headquarters +--Rescue-ACE HQ --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCondition(s.atkcond) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x18c)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_RESCUE_ACE)) e2:SetValue(500) c:RegisterEffect(e2) local e3=e2:Clone() @@ -27,8 +27,8 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e4:SetRange(LOCATION_FZONE) - e4:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x18c)) + e4:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_RESCUE_ACE)) c:RegisterEffect(e4) --Shuffle 4 "Rescue-ACE" cards and draw 1 local e5=Effect.CreateEffect(c) @@ -42,18 +42,18 @@ function s.initial_effect(c) e5:SetOperation(s.tdop) c:RegisterEffect(e5) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} function s.atkcond(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0 end function s.cfilter(c) - return c:IsSetCard(0x18c) and c:IsAbleToDeck() and c:IsFaceup() + return c:IsSetCard(SET_RESCUE_ACE) and c:IsAbleToDeck() and c:IsFaceup() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,nil) end + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,4,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,4,nil) + local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,4,4,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end @@ -61,7 +61,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 or Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end local g=Duel.GetOperatedGroup() - if not g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then return end + if not g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) then return end if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) diff --git a/official/c6390406.lua b/official/c6390406.lua index 55d3b1c448..982f83dbb0 100644 --- a/official/c6390406.lua +++ b/official/c6390406.lua @@ -1,4 +1,5 @@ --竜破壊の証 +--Emblem of Dragon Destroyer local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,19 +11,19 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={78193831} +s.listed_names={CARD_BUSTER_BLADER} function s.filter(c) - return c:IsCode(78193831) and c:IsAbleToHand() + return c:IsCode(CARD_BUSTER_BLADER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c63941169.lua b/official/c63941169.lua index 842a5e9b4e..f99c580e64 100644 --- a/official/c63941169.lua +++ b/official/c63941169.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c63941210.lua b/official/c63941210.lua index a69b034e28..c19ae1acf5 100644 --- a/official/c63941210.lua +++ b/official/c63941210.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.counter_list={0x37} +s.counter_list={COUNTER_KAIJU} function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -24,8 +24,8 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return tg and #tg==1 and Duel.IsChainDisablable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,3,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,3,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -39,4 +39,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(tg) Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c63945693.lua b/official/c63945693.lua index 2f47d854c5..63d662c1b3 100644 --- a/official/c63945693.lua +++ b/official/c63945693.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x34} +s.listed_series={SET_CRYSTAL} function s.filter(c) - return c:IsSetCard(0x34) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_CRYSTAL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -27,5 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c63948258.lua b/official/c63948258.lua index e9e6408296..948651fab2 100644 --- a/official/c63948258.lua +++ b/official/c63948258.lua @@ -1,4 +1,5 @@ --未知ガエル +--Submarine Frog local s,id=GetID() function s.initial_effect(c) --Pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c63972571.lua b/official/c63972571.lua index 8dc45802d7..e359695e4b 100644 --- a/official/c63972571.lua +++ b/official/c63972571.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0x13e} +s.listed_series={SET_BARBAROS} function s.rescon(sg,tp) if not aux.ChkfMMZ(1)(sg,nil,tp) then return false end Duel.SetSelectedCard(sg) @@ -60,12 +60,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter(c,tp) - return c:IsSetCard(0x13e) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,true) + return c:IsSetCard(SET_BARBAROS) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,true) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -80,5 +80,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c63977008.lua b/official/c63977008.lua index 7aebef2e3c..ff83e61d7c 100644 --- a/official/c63977008.lua +++ b/official/c63977008.lua @@ -1,4 +1,5 @@ --ジャンク・シンクロン +--Junk Synchron local s,id=GetID() function s.initial_effect(c) --summon success @@ -30,13 +31,13 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c63992027.lua b/official/c63992027.lua index 30d53754b8..6b5acd8532 100644 --- a/official/c63992027.lua +++ b/official/c63992027.lua @@ -1,8 +1,10 @@ --二重光波 +--Double Cipher local s,id=GetID() function s.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) @@ -12,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x107b,0xe5} +s.listed_series={SET_GALAXY_EYES,SET_CIPHER} function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if #g==0 then return false end @@ -20,7 +22,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return tg:IsExists(Card.IsControler,1,nil,1-tp) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and (c:IsSetCard(0x107b) or c:IsSetCard(0xe5)) and c:GetOverlayCount()>0 + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard({SET_GALAXY_EYES,SET_CIPHER}) and c:GetOverlayCount()>0 and (not e or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)) end function s.spfilter(c,e,tp,ec) @@ -45,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c63995093.lua b/official/c63995093.lua index 4520d5a5a1..51d4271a55 100644 --- a/official/c63995093.lua +++ b/official/c63995093.lua @@ -1,4 +1,5 @@ --機械複製術 +--Machine Duplication local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c64002884.lua b/official/c64002884.lua index bd44068281..5cae2e0dc1 100644 --- a/official/c64002884.lua +++ b/official/c64002884.lua @@ -1,5 +1,5 @@ --- ---Simorgh Rejection +--神鳥の排撃 +--Simorgh Repulsion --scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) @@ -29,7 +29,7 @@ function s.costfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.filter(c) return c:GetSequence()<5 and c:IsAbleToHand() @@ -57,5 +57,5 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) - local hg=Duel.GetMatchingGroup(s.afilter,tp,LOCATION_HAND,0,nil,g:GetFirst():GetCode()):ForEach(function(tc) tc:UpdateLevel(-1,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,e:GetHandler()) end) -end + local hg=Duel.GetMatchingGroup(s.afilter,tp,LOCATION_HAND,0,nil,g:GetFirst():GetCode()):ForEach(function(tc) tc:UpdateLevel(-1,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END,e:GetHandler()) end) +end \ No newline at end of file diff --git a/official/c64014615.lua b/official/c64014615.lua index 2990055210..634199284d 100644 --- a/official/c64014615.lua +++ b/official/c64014615.lua @@ -1,4 +1,5 @@ --大欲な壺 +--Pot of Acquisitiveness local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,13 +31,13 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(s.sfilter,1,nil,tp) then Duel.ShuffleDeck(tp) end if g:IsExists(s.sfilter,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64025981.lua b/official/c64025981.lua index edc37b8f53..7a3612722d 100644 --- a/official/c64025981.lua +++ b/official/c64025981.lua @@ -1,7 +1,6 @@ --始原竜プライマル・ドラゴン ---Primal Dragon the Primordial Dragon +--Primal Dragon, the Primordial --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -38,9 +37,9 @@ function s.cfilter(c) end --Banish 1 dragon from GY function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) e:SetLabel(g:GetFirst():GetBaseAttack()) end @@ -53,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -80,8 +79,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c64034255.lua b/official/c64034255.lua index f9bea43e14..da8a2414ba 100644 --- a/official/c64034255.lua +++ b/official/c64034255.lua @@ -1,6 +1,5 @@ --A・ジェネクス・バードマン --Genex Ally Birdman - local s,id=GetID() function s.initial_effect(c) --Special summon this card from hand @@ -38,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end --Banish it if it leaves the field @@ -47,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) end diff --git a/official/c64038662.lua b/official/c64038662.lua index f2c6080da5..752e23971b 100644 --- a/official/c64038662.lua +++ b/official/c64038662.lua @@ -20,12 +20,12 @@ function s.initial_effect(c) e2:SetOperation(s.efop) c:RegisterEffect(e2) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.select(e,tp,b1,b2) local op=0 @@ -72,7 +72,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc2) tc1:RegisterEffect(e1) @@ -86,4 +86,4 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c64043465.lua b/official/c64043465.lua index 380d258d51..e85624d3ce 100644 --- a/official/c64043465.lua +++ b/official/c64043465.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -33,23 +33,23 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x40,0xde} +s.listed_series={SET_FORBIDDEN_ONE,SET_EXODIA} function s.tgfilter(c) - return ((c:IsSetCard(0x40) and c:IsMonster()) or c:IsSetCard(0xde)) and c:IsAbleToGrave() + return ((c:IsSetCard(SET_FORBIDDEN_ONE) and c:IsMonster()) or c:IsSetCard(SET_EXODIA)) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then @@ -61,7 +61,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) end function s.thfilter(c) - return ((c:IsSetCard(0x40) and c:IsMonster()) or c:IsSetCard(0xde)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_FORBIDDEN_ONE) and c:IsMonster()) or c:IsSetCard(SET_EXODIA)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64047146.lua b/official/c64047146.lua index dcedc53651..25ed9fcaf2 100644 --- a/official/c64047146.lua +++ b/official/c64047146.lua @@ -1,4 +1,5 @@ --一角獣のホーン +--Horn of the Unicorn local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -33,6 +34,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64061284.lua b/official/c64061284.lua index 8f0c76983f..b97d80f421 100644 --- a/official/c64061284.lua +++ b/official/c64061284.lua @@ -2,13 +2,13 @@ --Ancient Gear Fusion local s,id=GetID() function s.initial_effect(c) - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x7),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) c:RegisterEffect(e1) end -s.listed_series={0x7} -s.listed_names={83104731,95735217} +s.listed_series={SET_ANCIENT_GEAR} +s.listed_names={CARD_ANCIENT_GEAR_GOLEM,95735217} function s.filterchk(c) - return c:IsFaceup() and c:IsCode(83104731,95735217) and c:IsOnField() + return c:IsFaceup() and c:IsCode(CARD_ANCIENT_GEAR_GOLEM,95735217) and c:IsOnField() end function s.fcheck(tp,sg,fc) if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then diff --git a/official/c64063868.lua b/official/c64063868.lua index 21a3affc35..fcea2a13f5 100644 --- a/official/c64063868.lua +++ b/official/c64063868.lua @@ -1,5 +1,5 @@ --Kozmo-ダークエクリプサー ---Kozmo Dark Eclipse +--Kozmo Dark Eclipser local s,id=GetID() function s.initial_effect(c) --cannot be targeted @@ -37,18 +37,18 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0xd2) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_KOZMO) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,14 +65,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xd2) and c:IsLevelBelow(8) and c:IsAbleToHand() + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(8) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c64104037.lua b/official/c64104037.lua index 5fe07e2274..a30ce728cf 100644 --- a/official/c64104037.lua +++ b/official/c64104037.lua @@ -1,9 +1,9 @@ --- 劫火の槍術士 ゴースト・ランサー --- Hellfire Spearman Ghost Lancer --- Scripted by Hatter +--劫火の槍術士 ゴースト・ランサー +--Ghost Lancer, the Underworld Spearman +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) @@ -11,13 +11,13 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Cannot be destroyed by battle + --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(function(_,c) return not c:IsSummonLocation(LOCATION_EXTRA) end) c:RegisterEffect(e2) - -- Piercing Damage + --Piercing Damage local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_PIERCE) @@ -27,4 +27,4 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 -end +end \ No newline at end of file diff --git a/official/c64107820.lua b/official/c64107820.lua index 8cf5313d1f..c85d6af1e3 100644 --- a/official/c64107820.lua +++ b/official/c64107820.lua @@ -1,4 +1,5 @@ --フューチャー・グロウ +--Future Glow local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,9 +24,9 @@ function s.cfilter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) e:SetLabel(g:GetFirst():GetLevel()*200) e:GetLabelObject():SetLabel(0) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.val(e,c) return e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c64116319.lua b/official/c64116319.lua index 3d7cbcc4fa..990c003156 100644 --- a/official/c64116319.lua +++ b/official/c64116319.lua @@ -1,7 +1,6 @@ --トゥーン・ハーピィ・レディ --Toon Harpie Lady --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Cannot attack the turn it was summoned @@ -36,12 +35,11 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={15259703} - function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.dircon(e) @@ -59,7 +57,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and #g>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_TOON),tp,LOCATION_MZONE,0,1,c) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then diff --git a/official/c64145892.lua b/official/c64145892.lua index f1e03b9ee8..25ee9ac672 100644 --- a/official/c64145892.lua +++ b/official/c64145892.lua @@ -8,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e1:SetValue(aux.ChangeBattleDamage(0,HALF_DAMAGE)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c64160836.lua b/official/c64160836.lua index 870054b75a..f20d5412a8 100644 --- a/official/c64160836.lua +++ b/official/c64160836.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() @@ -34,12 +34,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c64161630.lua b/official/c64161630.lua index 7e96a87c51..6cc09fdb20 100644 --- a/official/c64161630.lua +++ b/official/c64161630.lua @@ -12,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.cfilter(c,e,tp) local rk=c:GetRank() return rk>1 and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,rk-1,c:GetRace(),e,tp,c) end function s.filter(c,rk,rc,e,tp,mc) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:GetRank()==rk and c:IsRace(rc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,e,tp) e:SetLabel(g:GetFirst():GetRank()) local e1=Effect.CreateEffect(e:GetHandler()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabel(g:GetFirst():GetRace()) Duel.RegisterEffect(e1,tp) e:SetLabelObject(e1) @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.spop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabel(e:GetLabel()) e1:SetLabelObject(e:GetLabelObject()) Duel.RegisterEffect(e1,tp) @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_EXTRA,0,1,1,nil,rk-1,rc,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c64163367.lua b/official/c64163367.lua index 65e3a0bae2..5ee10cd0bf 100644 --- a/official/c64163367.lua +++ b/official/c64163367.lua @@ -53,4 +53,4 @@ function s.ctop2(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) sg:GetFirst():AddCounter(COUNTER_A,1) end -end +end \ No newline at end of file diff --git a/official/c6417578.lua b/official/c6417578.lua index 6a77c916d3..411bbde1b7 100644 --- a/official/c6417578.lua +++ b/official/c6417578.lua @@ -3,9 +3,9 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x9d)) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL)) e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} \ No newline at end of file diff --git a/official/c64178424.lua b/official/c64178424.lua index ded20a9116..d7228eed91 100644 --- a/official/c64178424.lua +++ b/official/c64178424.lua @@ -22,44 +22,40 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetDescription(aux.Stringid(id,1)) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.spfilter(c,e,tp,pos) - return c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) + return c:IsSetCard(SET_SALAMANGREAT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,POS_FACEUP) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,POS_FACEUP) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop1(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp,POS_FACEUP) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp,POS_FACEUP) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.filter(c) - return c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsReincarnationSummoned() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsReincarnationSummoned() end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,POS_FACEUP_DEFENSE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,POS_FACEUP_DEFENSE) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -68,8 +64,8 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if ft<1 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,ft,nil,e,tp,POS_FACEUP_DEFENSE) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,ft,nil,e,tp,POS_FACEUP_DEFENSE) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c64178868.lua b/official/c64178868.lua index 453cfb8502..620570f244 100644 --- a/official/c64178868.lua +++ b/official/c64178868.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetTarget(s.thtg) @@ -44,7 +44,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.chkcond(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -54,7 +54,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(id) e1:SetValue(fid) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,1) tc:RegisterEffect(e1) end) -end +end \ No newline at end of file diff --git a/official/c64182380.lua b/official/c64182380.lua index d993baf7e8..1b497b1040 100644 --- a/official/c64182380.lua +++ b/official/c64182380.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.stdestg) e2:SetOperation(s.stdesop) c:RegisterEffect(e2) @@ -101,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64184058.lua b/official/c64184058.lua index 1cdc36bf66..5b6c01b86a 100644 --- a/official/c64184058.lua +++ b/official/c64184058.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.atlimit(e,c) local tp=e:GetHandlerPlayer() return c:IsControler(1-tp) and c:IsLevelAbove(6) and not c:IsImmuneToEffect(e) @@ -52,11 +52,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsSetCard(0x8) and c:IsAbleToHand() + return c:IsSetCard(SET_HERO) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) diff --git a/official/c64202399.lua b/official/c64202399.lua index 5d5b98367c..ff12d860b8 100644 --- a/official/c64202399.lua +++ b/official/c64202399.lua @@ -1,5 +1,5 @@ --深淵の青眼龍 ---Deep of Blue-Eyes +--Blue-Eyes Abyss Dragon --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,2}) e3:SetCondition(s.condition) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) @@ -45,7 +45,7 @@ function s.cfilter(c) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsOnField() and c:IsFaceup()) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end function s.thfilter1(c) return (c:IsCode(CARD_POLYMERIZATION) or c:IsRitualSpell()) and c:IsAbleToHand() @@ -63,7 +63,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and s.condition(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsTurnPlayer(tp) and s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.thfilter2(c) return c:IsLevelAbove(8) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() @@ -94,7 +94,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c64203620.lua b/official/c64203620.lua index f6b610344f..c06076776e 100644 --- a/official/c64203620.lua +++ b/official/c64203620.lua @@ -1,4 +1,5 @@ --極星邪竜ヨルムンガンド +--Jormungardr the Nordic Serpent local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -33,7 +34,7 @@ function s.initial_effect(c) e5:SetOperation(s.damop) c:RegisterEffect(e5) end -s.listed_series={0x4b} +s.listed_series={SET_AESIR} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -41,7 +42,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) + return c:IsFaceup() and c:IsSetCard(SET_AESIR) end function s.descon(e) return not Duel.IsExistingMatchingCard(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) @@ -58,4 +59,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c64207696.lua b/official/c64207696.lua index fd5f3f90f7..5cfdb83037 100644 --- a/official/c64207696.lua +++ b/official/c64207696.lua @@ -1,4 +1,5 @@ --EMゴールド・ファング +--Performapal Gold Fang local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,12 +29,12 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=eg:GetFirst() return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE) - and rc:IsFaceup() and rc:IsSetCard(0x9f) and rc:IsControler(tp) + and rc:IsFaceup() and rc:IsSetCard(SET_PERFORMAPAL) and rc:IsControler(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -47,7 +48,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil) @@ -58,7 +59,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c64211118.lua b/official/c64211118.lua index 971c9fe58f..e98a3a66d7 100644 --- a/official/c64211118.lua +++ b/official/c64211118.lua @@ -4,17 +4,17 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --Link Summon procedure + --Link Summon procedure: 3+ Cyberse monsters Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_CYBERSE),3) - --Negate opponent's monster effects activated in the Battle Phase + --Negate any monster effects activated by your opponent during the Battle Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.negcon) - e1:SetOperation(s.negop) + e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsBattlePhase() and rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end) + e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) end) c:RegisterEffect(e1) - --Gain Attribute and ATK + --Send 1 Cyberse monster from your Deck or Extra Deck to the GY, and if you do, this card gains the Attribute of that monster sent to the GY, also it gains 2500 ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE) @@ -24,66 +24,43 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1,id) - e2:SetCondition(s.gycon) - e2:SetTarget(s.gytg) - e2:SetOperation(s.gyop) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetTarget(s.tgtg) + e2:SetOperation(s.tgop) c:RegisterEffect(e2) - --Multiple attacks + --This card can attack monsters a number of times each Battle Phase, up to the number of different Attributes it has. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e3:SetValue(s.raval) + e3:SetValue(function(e,c) return Group.FromCards(e:GetHandler()):GetBinClassCount(Card.GetAttribute)-1 end) c:RegisterEffect(e3) end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) - and Duel.IsChainDisablable(ev) and Duel.IsBattlePhase() -end -function s.negop(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_CARD,0,id) - Duel.NegateEffect(ev) -end -function s.gycon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.gyfilter(c) +function s.tgfilter(c) return c:IsRace(RACE_CYBERSE) and c:IsAbleToGrave() end -function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,tp,2500) end -function s.gyop(e,tp,eg,ep,ev,re,r,rp) +function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local tc=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil):GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) and c:IsFaceup() then - --Gain Attribute + --This card gains the Attribute of that monster sent to the GY, also it gains 2500 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_ADD_ATTRIBUTE) - e1:SetValue(tc:GetAttribute()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetRange(LOCATION_MZONE) + e1:SetValue(sc:GetAttribute()) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) - --Increase ATK - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) + local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetRange(LOCATION_MZONE) e2:SetValue(2500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) - end -end -function s.raval(e,c) - local att=e:GetHandler():GetAttribute() - local ct=0 - while att~=0 do - if (att&0x1)~=0 then ct=ct+1 end - att=(att>>1) end - return ct-1 -end \ No newline at end of file +end diff --git a/official/c64213017.lua b/official/c64213017.lua index a596972ba8..7078bac8ec 100644 --- a/official/c64213017.lua +++ b/official/c64213017.lua @@ -1,5 +1,5 @@ --Beetrooper Formation ---Scripted by Zefile +--Beetrooper Formation local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,9 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={64213018} -s.listed_series={0x172} +s.listed_series={SET_BEETROOPER} function s.spfilter(c,e,tp) - return c:IsSetCard(0x172) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BEETROOPER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local atk=tc:GetTextAttack() @@ -65,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tkfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:GetPreviousRaceOnField()&RACE_INSECT)>0 + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and (c:GetPreviousRaceOnField()&RACE_INSECT)>0 and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.tkcon(e,tp,eg,ep,ev,re,r,rp) @@ -73,14 +73,14 @@ function s.tkcon(e,tp,eg,ep,ev,re,r,rp) end function s.tktarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x172,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_BEETROOPER,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x172,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_BEETROOPER,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64238008.lua b/official/c64238008.lua index e0f9e86d40..eccddfdda6 100644 --- a/official/c64238008.lua +++ b/official/c64238008.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end function s.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)) + return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect()) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -31,11 +31,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then diff --git a/official/c64245689.lua b/official/c64245689.lua index 97d3b4a385..415019373a 100644 --- a/official/c64245689.lua +++ b/official/c64245689.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c64262809.lua b/official/c64262809.lua index 1555c42ac3..494b773694 100644 --- a/official/c64262809.lua +++ b/official/c64262809.lua @@ -1,4 +1,5 @@ --ドラゴン・アイス +--Dragon Ice local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,1,id) @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.spcon) e1:SetCost(s.spcost) @@ -24,7 +25,7 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local exc=(e:GetHandler():IsLocation(LOCATION_HAND) and not e:GetHandler():IsAbleToGraveAsCost()) and e:GetHandler() or nil if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,exc) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,exc) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,exc) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c64268668.lua b/official/c64268668.lua index 6bf400656b..a571a8a2e3 100644 --- a/official/c64268668.lua +++ b/official/c64268668.lua @@ -1,4 +1,5 @@ --サイバー・オーガ +--Cyber Ogre local s,id=GetID() function s.initial_effect(c) --atkup @@ -20,13 +21,13 @@ s.listed_names={id} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() and ((a and a:IsControler(tp) and a:IsFaceup() and a:IsCode(id)) or (d and d:IsControler(tp) and d:IsFaceup() and d:IsCode(id))) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -46,13 +47,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(2000) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_DAMAGE_STEP_END) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetOperation(s.resetop) e2:SetLabelObject(e1) tc:RegisterEffect(e2) @@ -61,4 +62,4 @@ end function s.resetop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():Reset() e:Reset() -end +end \ No newline at end of file diff --git a/official/c64274292.lua b/official/c64274292.lua index 16f45c2178..c1f9cf50d7 100644 --- a/official/c64274292.lua +++ b/official/c64274292.lua @@ -1,4 +1,5 @@ --メテオ・レイン +--Meteorain local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,13 +11,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_PIERCE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c64276752.lua b/official/c64276752.lua index 6da8d773ce..efdaaf53c8 100644 --- a/official/c64276752.lua +++ b/official/c64276752.lua @@ -22,17 +22,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1,id) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.indescon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return e:GetHandler():IsXyzSummoned() end function s.atkfilter(c) return c:IsFaceup() and c:GetBaseAttack()>0 @@ -52,7 +48,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e0:SetTargetRange(LOCATION_MZONE,0) e0:SetTarget(s.ftarget) e0:SetLabel(c:GetFieldID()) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e0,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end @@ -68,18 +64,18 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) nc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) nc:RegisterEffect(e2) if nc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) nc:RegisterEffect(e3) end end @@ -87,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c64280356.lua b/official/c64280356.lua index 03984d8ca2..acc4e63ef4 100644 --- a/official/c64280356.lua +++ b/official/c64280356.lua @@ -1,44 +1,40 @@ ---Kozmo-フェルブラン +--Kozmo-フェルブラン +--Kozmo Tincan local s,id=GetID() function s.initial_effect(c) - --spsummon + --Special Summon 1 Level 2 or higher "Kozmo" monster from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --to hand + --Reveal 3 "Kozmo" cards with different names from your Deck, your opponent randomly picks 1 for you to add to your hand, and you send the rest to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES) - e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e2:SetRange(LOCATION_MZONE) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_PHASE+PHASE_END) + e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.thcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xd2} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -50,39 +46,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xd2) and c:IsAbleToHand() -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return c:IsSetCard(SET_KOZMO) and c:IsAbleToHand() and c:IsAbleToGrave() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - return dg:GetClassCount(Card.GetCode)>=3 - end + if chk==0 then return Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil):GetClassCount(Card.GetCode)>=3 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) if g:GetClassCount(Card.GetCode)>=3 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg1=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg2=g:Select(tp,1,1,nil) - g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode()) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) - local sg3=g:Select(tp,1,1,nil) - sg1:Merge(sg2) - sg1:Merge(sg3) - Duel.ConfirmCards(1-tp,sg1) + local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_CONFIRM) + Duel.ConfirmCards(1-tp,sg) Duel.ShuffleDeck(tp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) - local cg=sg1:Select(1-tp,1,1,nil) - local tc=cg:GetFirst() + local tc=sg:Select(1-tp,1,1,nil):GetFirst() Duel.SendtoHand(tc,nil,REASON_EFFECT) - sg1:RemoveCard(tc) - Duel.SendtoGrave(sg1,REASON_EFFECT) + sg:RemoveCard(tc) + Duel.SendtoGrave(sg,REASON_EFFECT) end end diff --git a/official/c64283880.lua b/official/c64283880.lua index 183f5959a4..25afb265d3 100644 --- a/official/c64283880.lua +++ b/official/c64283880.lua @@ -1,4 +1,5 @@ --ガードゴー! +--Guard Go! local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,11 +12,11 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x54,0x82,0x59} +s.listed_series={SET_GAGAGA,SET_DODODO,SET_GOGOGO} function s.filter(c,e,tp) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and (c:IsSetCard(0x54) or c:IsSetCard(0x82) or c:IsSetCard(0x59)) + and c:IsPreviousControler(tp) and (c:IsSetCard(SET_GAGAGA) or c:IsSetCard(SET_DODODO) or c:IsSetCard(SET_GOGOGO)) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -28,7 +29,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x54) or c:IsSetCard(0x82) or c:IsSetCard(0x59)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return (c:IsSetCard(SET_GAGAGA) or c:IsSetCard(SET_DODODO) or c:IsSetCard(SET_GOGOGO)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -44,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c64306248.lua b/official/c64306248.lua index 47035d4845..8d11968820 100644 --- a/official/c64306248.lua +++ b/official/c64306248.lua @@ -1,4 +1,5 @@ --髑髏顔・天道虫 +--Skull-Mark Ladybug local s,id=GetID() function s.initial_effect(c) --recover @@ -21,4 +22,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6430659.lua b/official/c6430659.lua index 23e8e57571..2172bf41d0 100644 --- a/official/c6430659.lua +++ b/official/c6430659.lua @@ -1,4 +1,5 @@ --ウィルスメール +--Infected Mail local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,12 +39,12 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCountLimit(1) e2:SetLabelObject(tc) @@ -64,4 +65,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoGrave(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c64325438.lua b/official/c64325438.lua index fc16676b41..dee9a3cd7e 100644 --- a/official/c64325438.lua +++ b/official/c64325438.lua @@ -25,15 +25,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) c:RegisterEffect(e3) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ch=Duel.GetCurrentChain(true)-1 return ep==1-tp and ch>0 and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_CONTROLER)==tp - and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_EFFECT):GetHandler():IsSetCard(0x134) + and Duel.GetChainInfo(ch,CHAININFO_TRIGGERING_EFFECT):GetHandler():IsSetCard(SET_GENERAIDER) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end @@ -47,7 +47,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) - if e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then + if e:IsSpellTrapEffect() and e:IsHasType(EFFECT_TYPE_ACTIVATE) then c:CancelToGrave(false) end -end +end \ No newline at end of file diff --git a/official/c64332231.lua b/official/c64332231.lua index a4b6f60df7..303c858133 100644 --- a/official/c64332231.lua +++ b/official/c64332231.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsReleasableByEffect,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -39,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64342551.lua b/official/c64342551.lua index c893d02d13..cbeca16567 100644 --- a/official/c64342551.lua +++ b/official/c64342551.lua @@ -1,4 +1,5 @@ --水陸両用バグロス MK-3 +--Amphibious Bugroth MK-3 local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -10,4 +11,4 @@ end s.listed_names={CARD_UMI} function s.dircon(e) return Duel.IsEnvironment(CARD_UMI) -end +end \ No newline at end of file diff --git a/official/c64373401.lua b/official/c64373401.lua index 3584e937ea..1739edeff8 100644 --- a/official/c64373401.lua +++ b/official/c64373401.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.hspcon(e,c) if c==nil then return true end @@ -51,15 +51,15 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x9a) + return not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(0x9a) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(SET_SUPERHEAVY_SAMURAI) and not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64379261.lua b/official/c64379261.lua index b6f04efbcf..ebb83d8a63 100644 --- a/official/c64379261.lua +++ b/official/c64379261.lua @@ -1,4 +1,5 @@ --ゴルゴニック・ガーゴイル +--Gorgonic Gargoyle local s,id=GetID() function s.initial_effect(c) --summon success @@ -25,4 +26,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c64379430.lua b/official/c64379430.lua index 543eb43f64..a231f81c74 100644 --- a/official/c64379430.lua +++ b/official/c64379430.lua @@ -1,4 +1,5 @@ --終焉の精霊 +--Doomsday Horror local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -42,5 +43,5 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,0,LOCATION_REMOVED,LOCATION_REMOVED,nil) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) -end + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) +end \ No newline at end of file diff --git a/official/c6438003.lua b/official/c6438003.lua index 3bd44d7711..45007f9909 100644 --- a/official/c6438003.lua +++ b/official/c6438003.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.tgfilter(c) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsSpellTrap() and c:IsAbleToGrave() end @@ -57,20 +57,20 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(card:GetAttack()//2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) card:RegisterEffect(e1) end end end end function s.cfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.thcond(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0x137) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64389297.lua b/official/c64389297.lua index e04110d381..c4056506ef 100644 --- a/official/c64389297.lua +++ b/official/c64389297.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) end s.listed_names={63162310,67284908} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget():GetControler()==tp + return e:GetHandler():GetEquipTarget():IsControler(tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c64398890.lua b/official/c64398890.lua index a32cfb9bc9..445f2eee42 100644 --- a/official/c64398890.lua +++ b/official/c64398890.lua @@ -1,4 +1,5 @@ --六武衆-ヤイチ +--The Six Samurai - Yaichi local s,id=GetID() function s.initial_effect(c) --destroy @@ -24,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -36,7 +37,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetProperty(EFFECT_FLAG_OATH) e:GetHandler():RegisterEffect(e1) end @@ -58,7 +59,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,5 +77,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c64400161.lua b/official/c64400161.lua index b5c9d49257..9dc07b78d8 100644 --- a/official/c64400161.lua +++ b/official/c64400161.lua @@ -25,18 +25,18 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_FZONE) e3:SetCondition(s.descon) - e3:SetCost(s.descost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 end function s.thfilter(c) - return c:IsSetCard(0x114) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FUR_HIRE) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end @@ -64,16 +64,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x114) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) return g:GetClassCount(Card.GetCode)>=5 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) @@ -88,11 +84,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) -end +end \ No newline at end of file diff --git a/official/c64414267.lua b/official/c64414267.lua index 309c80592e..ce6eac3c27 100644 --- a/official/c64414267.lua +++ b/official/c64414267.lua @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(e,c,sump,sumtype) return (sumtype&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c6442944.lua b/official/c6442944.lua index 746cc0f94f..f46bb5181d 100644 --- a/official/c6442944.lua +++ b/official/c6442944.lua @@ -43,20 +43,20 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -72,7 +72,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -80,6 +80,6 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c64437633.lua b/official/c64437633.lua index 14e8a759dd..043d17ed0e 100644 --- a/official/c64437633.lua +++ b/official/c64437633.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.spfilter(c,e,tp) - return c:IsSetCard(0x3a) and c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) + return c:IsSetCard(SET_GISHKI) and c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) --Return it to hand during end phase local e2=Effect.CreateEffect(c) @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetOperation(function(e) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) end end \ No newline at end of file diff --git a/official/c64442155.lua b/official/c64442155.lua index f3e023fd99..1b79008970 100644 --- a/official/c64442155.lua +++ b/official/c64442155.lua @@ -17,10 +17,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2093} +s.listed_series={SET_CYBER_ANGEL} --Check for "Cyber Angel" ritual monster function s.costfilter(c) - return c:IsSetCard(0x2093) and c:IsRitualMonster() + return c:IsSetCard(SET_CYBER_ANGEL) and c:IsRitualMonster() end --Defining cost function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Cannot Special Summon from the Main Deck check local e2=Effect.CreateEffect(c) @@ -66,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(CARD_EHERO_BLAZEMAN) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end --Restricted to ritual monsters for rest of the turn diff --git a/official/c64450427.lua b/official/c64450427.lua index 4e099ca884..ffa9d031a5 100644 --- a/official/c64450427.lua +++ b/official/c64450427.lua @@ -1,4 +1,5 @@ --EMウィム・ウィッチ +--Performapal Whim Witch local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -37,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.dtcon(e,c) return c:IsType(TYPE_PENDULUM) -end +end \ No newline at end of file diff --git a/official/c64454614.lua b/official/c64454614.lua index d27fd2fdd0..c8ba9172e5 100644 --- a/official/c64454614.lua +++ b/official/c64454614.lua @@ -50,9 +50,9 @@ function s.costfilter(c,tpe) return c:IsType(tpe) and c:IsDiscardable() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rtype=(re:GetActiveType()&0x7) + local rtype=(re:GetActiveType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,rtype) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil,rtype) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD,nil,rtype) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -65,7 +65,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsLinkSummoned() end function s.spfilter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsLevel(4) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -91,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g2,tp,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c64463828.lua b/official/c64463828.lua index 4ce587a657..f592defd0b 100644 --- a/official/c64463828.lua +++ b/official/c64463828.lua @@ -1,4 +1,5 @@ --超合魔獣ラプテノス +--Superalloy Beast Raptinus local s,id=GetID() function s.initial_effect(c) --fusion material @@ -12,4 +13,4 @@ function s.initial_effect(c) e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_GEMINI)) e1:SetCode(EFFECT_GEMINI_STATUS) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c64487132.lua b/official/c64487132.lua index 3fae351205..56c495f62e 100644 --- a/official/c64487132.lua +++ b/official/c64487132.lua @@ -20,13 +20,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listes_names={28002611} -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.thfilter(c) return c:IsRace(RACE_MACHINE) and c:IsLevel(1) and c:IsAbleToHand() end @@ -42,18 +42,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spfilter2(c,e,tp) return c:IsCode(28002611) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -63,9 +58,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then + and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #sg>0 then Duel.BreakEffect() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) diff --git a/official/c64496451.lua b/official/c64496451.lua index 76b42ec847..1bfceb6faf 100644 --- a/official/c64496451.lua +++ b/official/c64496451.lua @@ -1,4 +1,5 @@ --クリフォート・ディスク +--Qliphort Disk local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_PZONE) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_QLI)) e3:SetValue(300) c:RegisterEffect(e3) --summon with no tribute @@ -66,9 +67,9 @@ function s.initial_effect(c) e9:SetLabelObject(e8) c:RegisterEffect(e9) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -86,7 +87,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.lvcon) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -95,7 +96,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.lvcon) e2:SetValue(1800) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) c:RegisterEffect(e2) end function s.lvop2(e,tp,eg,ep,ev,re,r,rp) @@ -106,7 +107,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -114,17 +115,17 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e2) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.spfilter(c,e,tp) - return c:IsSetCard(0xaa) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_QLI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -142,8 +143,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) - sg:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0,fid) - sg:GetNext():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0,fid) + sg:GetFirst():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0,fid) + sg:GetNext():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0,fid) sg:KeepAlive() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -175,9 +176,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then + if g:IsExists(Card.IsSetCard,1,nil,SET_QLI) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c64500000.lua b/official/c64500000.lua index 6187978b63..8658eccd62 100644 --- a/official/c64500000.lua +++ b/official/c64500000.lua @@ -1,4 +1,5 @@ --Z-メタル・キャタピラー +--Z-Metal Tank local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,62651957,65622692)) @@ -13,4 +14,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -s.listed_names={62651957,65622692} +s.listed_names={62651957,65622692} \ No newline at end of file diff --git a/official/c645087.lua b/official/c645087.lua index 1129bb55ed..313dd026d1 100644 --- a/official/c645087.lua +++ b/official/c645087.lua @@ -44,12 +44,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -59,14 +59,14 @@ function s.tkcon(e,tp,eg,ep,ev,re,r,rp) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x51,TYPES_TOKEN,0,0,2,RACE_CYBERSE,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_GADGET,TYPES_TOKEN,0,0,2,RACE_CYBERSE,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x51,TYPES_TOKEN,0,0,2,RACE_CYBERSE,ATTRIBUTE_LIGHT) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_GADGET,TYPES_TOKEN,0,0,2,RACE_CYBERSE,ATTRIBUTE_LIGHT) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64514622.lua b/official/c64514622.lua index 6c1de9eca7..80bac081bb 100644 --- a/official/c64514622.lua +++ b/official/c64514622.lua @@ -10,20 +10,15 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(Gemini.EffectStatusCondition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} s.listed_names={id} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x69) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_HIERATIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 @@ -37,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c64514892.lua b/official/c64514892.lua index 7462e70c74..3b8dc80474 100644 --- a/official/c64514892.lua +++ b/official/c64514892.lua @@ -44,12 +44,12 @@ function s.atkval(e,c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) - and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) + and Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,0,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g1=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g2=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) end @@ -64,10 +64,10 @@ function s.thfilter(c) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -75,5 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c64554883.lua b/official/c64554883.lua index 3731c18d7a..ba7b71d877 100644 --- a/official/c64554883.lua +++ b/official/c64554883.lua @@ -1,4 +1,5 @@ --No.25 重装光学撮影機フォーカス・フォース +--Number 25: Force Focus local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -14,16 +15,12 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=25 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsLevelAbove(5) and not c:IsDisabled() and c:IsType(TYPE_EFFECT) end @@ -41,12 +38,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c64576557.lua b/official/c64576557.lua index c8500be79a..c96deb8ee4 100644 --- a/official/c64576557.lua +++ b/official/c64576557.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xe2} +s.listed_series={SET_TRIAMID} s.listed_names={id} function s.thconfilter(c) return c:IsFaceup() and c:IsLocation(LOCATION_FZONE) and c:IsSpell() and c:IsType(TYPE_FIELD) @@ -51,7 +51,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xe2) and c:IsSpellTrap() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_TRIAMID) and c:IsSpellTrap() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -73,7 +73,7 @@ function s.spconfilter(c,e,tp,eg) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,eg) end function s.spfilter(c,e,tp,eg) - return c:IsSetCard(0xe2) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRIAMID) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not eg:IsExists(Card.IsCode,1,nil,c:GetCode()) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c645794.lua b/official/c645794.lua index e809e3ff8e..889cd502e8 100644 --- a/official/c645794.lua +++ b/official/c645794.lua @@ -32,9 +32,9 @@ function s.initial_effect(c) e5:SetValue(s.indval) c:RegisterEffect(e5) end -s.listed_series={0xd0} +s.listed_series={SET_MAJESPECTER} function s.filter(c) - return c:IsSetCard(0xd0) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_MAJESPECTER) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -50,10 +50,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c64583600.lua b/official/c64583600.lua index 0dcfd9b2a2..c82dfb02d6 100644 --- a/official/c64583600.lua +++ b/official/c64583600.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c64591429.lua b/official/c64591429.lua index d369b15f55..06e07680a0 100644 --- a/official/c64591429.lua +++ b/official/c64591429.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.effop) c:RegisterEffect(e2) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.spfilter(c) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) --Cannot Special Summon from the Extra Deck, except "Number" Xyz Monsters local e2=Effect.CreateEffect(c) @@ -58,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetAbsoluteRange(tp,1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(CARD_CLOCK_LIZARD) @@ -69,13 +69,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c) - return not (c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)) and c:IsLocation(LOCATION_EXTRA) + return not (c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ)) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not (c:IsOriginalSetCard(0x48) and c:IsOriginalType(TYPE_XYZ)) + return not (c:IsOriginalSetCard(SET_NUMBER) and c:IsOriginalType(TYPE_XYZ)) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_XYZ)==REASON_XYZ and e:GetHandler():GetReasonCard():IsSetCard(0x48) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) + return (r&REASON_XYZ)==REASON_XYZ and e:GetHandler():GetReasonCard():IsSetCard(SET_NUMBER) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.effop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -87,7 +87,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) --Cannot be destroyed by opponent's effects local e2=e1:Clone() @@ -101,7 +101,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end -end +end \ No newline at end of file diff --git a/official/c6459419.lua b/official/c6459419.lua index e5a8ffd625..40ef593e75 100644 --- a/official/c6459419.lua +++ b/official/c6459419.lua @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c64599569.lua b/official/c64599569.lua index dbba15625e..e85b341e23 100644 --- a/official/c64599569.lua +++ b/official/c64599569.lua @@ -1,4 +1,5 @@ --キメラテック・オーバー・ドラゴン +--Chimeratech Overdragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -20,18 +21,18 @@ function s.initial_effect(c) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) + e4:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) e4:SetOperation(s.tgop) c:RegisterEffect(e4) end -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.sucop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(c:GetMaterialCount()*800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -44,4 +45,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler()) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c64605089.lua b/official/c64605089.lua index c5fc1095d1..4b8e5e8e35 100644 --- a/official/c64605089.lua +++ b/official/c64605089.lua @@ -1,4 +1,5 @@ --護封剣の剣士 +--Swordsman of Revealing Light local s,id=GetID() function s.initial_effect(c) --special summon @@ -55,17 +56,17 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c64612053.lua b/official/c64612053.lua index 4473eb08c6..4c4899f2bc 100644 --- a/official/c64612053.lua +++ b/official/c64612053.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={id} function s.spcfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x18c) and not c:IsCode(id) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_RESCUE_ACE) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp) @@ -70,6 +70,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,2,REASON_EFFECT)==2 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c64627453.lua b/official/c64627453.lua index 7dc827dbe0..8cc101169a 100644 --- a/official/c64627453.lua +++ b/official/c64627453.lua @@ -1,4 +1,5 @@ --おジャマ・ブルー +--Ojama Blue local s,id=GetID() function s.initial_effect(c) --search @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xf} +s.listed_series={SET_OJAMA} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c) - return c:IsSetCard(0xf) and c:IsAbleToHand() + return c:IsSetCard(SET_OJAMA) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,2,nil) end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c64631466.lua b/official/c64631466.lua index a48e5d3de5..433345d2b9 100644 --- a/official/c64631466.lua +++ b/official/c64631466.lua @@ -65,7 +65,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_DESTROY_SUBSTITUTE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.repval) tc:RegisterEffect(e1) end @@ -112,4 +112,4 @@ function s.defval(e,c) else return def end -end +end \ No newline at end of file diff --git a/official/c64635042.lua b/official/c64635042.lua index c13e264771..c34c63d5cf 100644 --- a/official/c64635042.lua +++ b/official/c64635042.lua @@ -37,7 +37,7 @@ end s.listed_names={CARD_SUMMONED_SKULL} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and rp==1-tp and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) return c:IsCode(CARD_SUMMONED_SKULL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -45,15 +45,15 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64655485.lua b/official/c64655485.lua index 4e7aea32d2..d907744401 100644 --- a/official/c64655485.lua +++ b/official/c64655485.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) --search local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,1)) + e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_DESTROYING) @@ -31,14 +31,14 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x1f,0x8} -s.material_setcode={0x8,0x3008,0x9} +s.listed_series={SET_NEO_SPACIAN,SET_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS} s.listed_names={CARD_NEOS } function s.ffilter(c,fc,sumtype,tp) return c:IsType(TYPE_EFFECT,fc,sumtype,tp) and c:IsLevelBelow(4) end function s.atkfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x1f) or c:IsSetCard(0x8)) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard({SET_NEO_SPACIAN,SET_HERO}) and c:IsMonster() end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100 @@ -57,5 +57,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c64659851.lua b/official/c64659851.lua index c2fc317624..3853276bf7 100644 --- a/official/c64659851.lua +++ b/official/c64659851.lua @@ -34,7 +34,7 @@ function s.setfilter(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local summon=false - local g=Duel.GetMatchingGroup(s.setfilter,tp,0,LOCATION_HAND+LOCATION_DECK,nil) + local g=Duel.GetMatchingGroup(s.setfilter,tp,0,LOCATION_HAND|LOCATION_DECK,nil) if Duel.GetLocationCount(1-tp,LOCATION_SZONE,1-tp,LOCATION_REASON_TOFIELD)>0 and #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET) local sg=g:Select(1-tp,1,1,nil) diff --git a/official/c64662453.lua b/official/c64662453.lua index 9eeacf82d6..2a62cec641 100644 --- a/official/c64662453.lua +++ b/official/c64662453.lua @@ -1,4 +1,5 @@ --アイアンコール +--Iron Call local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.SpecialSummonComplete() local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -49,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCountLimit(1) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetLabelObject(tc) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetCondition(s.descon) e3:SetOperation(s.desop) Duel.RegisterEffect(e3,tp) diff --git a/official/c64681263.lua b/official/c64681263.lua index 7326b4ccda..5cdbf30c11 100644 --- a/official/c64681263.lua +++ b/official/c64681263.lua @@ -1,4 +1,5 @@ --局地的大ハリケーン +--Localized Tornado local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,11 +12,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_GRAVE,0)>0 end - local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_GRAVE,0) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND|LOCATION_GRAVE,0)>0 end + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_GRAVE,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_GRAVE,0) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_GRAVE,0) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c64681432.lua b/official/c64681432.lua index 015c28489b..8b4a034450 100644 --- a/official/c64681432.lua +++ b/official/c64681432.lua @@ -1,4 +1,5 @@ --破壊竜ガンドラ +--Gandora the Dragon of Destruction local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -61,15 +62,15 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.tgreg1(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET-RESET_TEMP_REMOVE-RESET_LEAVE+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET-RESET_TEMP_REMOVE-RESET_LEAVE|RESET_PHASE|PHASE_END,0,1) end function s.tgreg2(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -83,4 +84,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoGrave(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64689404.lua b/official/c64689404.lua index 4faf808289..982210b2ff 100644 --- a/official/c64689404.lua +++ b/official/c64689404.lua @@ -1,4 +1,5 @@ --ソードブレイカー +--Sword Breaker local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.raccost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.ractg) e1:SetOperation(s.racop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,14 +28,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) e1:SetLabelObject(e2) end -function s.raccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.ractg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetLabelObject():GetLabel()~=RACE_ALL end if e:GetHandler():GetFlagEffect(id)==0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) e:GetLabelObject():SetLabel(0) end local prc=e:GetLabelObject():GetLabel() @@ -64,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64697231.lua b/official/c64697231.lua index aa0c146821..7adc283b46 100644 --- a/official/c64697231.lua +++ b/official/c64697231.lua @@ -1,4 +1,5 @@ --ダスト・シュート +--Trap Dustshoot local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,8 +30,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=tg:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c64697431.lua b/official/c64697431.lua index e705ee6143..2f537818db 100644 --- a/official/c64697431.lua +++ b/official/c64697431.lua @@ -1,5 +1,5 @@ --局所的ハリケーン ---Localized Trunade +--Hey, Trunade! -- local s,id=GetID() function s.initial_effect(c) @@ -24,5 +24,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c6471156.lua b/official/c6471156.lua index 66b2022842..9fc1d1bc61 100644 --- a/official/c6471156.lua +++ b/official/c6471156.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.rfilter(c,tp) local lv=c:GetLevel() - return lv>0 and c:IsAbleToRemoveAsCost() and c:IsSetCard(0x1083) and aux.SpElimFilter(c,true) + return lv>0 and c:IsAbleToRemoveAsCost() and c:IsSetCard(SET_GIMMICK_PUPPET) and aux.SpElimFilter(c,true) and Duel.IsExistingMatchingCard(s.tfilter,tp,LOCATION_MZONE,0,1,c,lv) end function s.tfilter(c,clv) @@ -59,20 +59,20 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.cfilter(c,tp) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) and (c:IsReason(REASON_BATTLE) or c:GetReasonPlayer()==1-tp and c:IsReason(REASON_DESTROY)) - and c:IsSetCard(0x1083) and c:IsPreviousPosition(POS_FACEUP) + and c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsSetCard(0x1083) + return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and c:IsSetCard(SET_GIMMICK_PUPPET) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end diff --git a/official/c64726269.lua b/official/c64726269.lua index 8876499bb0..8a1fca3707 100644 --- a/official/c64726269.lua +++ b/official/c64726269.lua @@ -19,9 +19,9 @@ function s.initial_effect(c) e2:SetOperation(s.effop) c:RegisterEffect(e2) end -s.listed_series={0x86} +s.listed_series={SET_STAR_SERAPH} function s.spfilter(c,e,tp) - return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STAR_SERAPH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -63,14 +63,14 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.drcon) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end diff --git a/official/c64730881.lua b/official/c64730881.lua index 0acf23c64d..28150bfc99 100644 --- a/official/c64730881.lua +++ b/official/c64730881.lua @@ -1,7 +1,6 @@ --クロノダイバー・アジャスター --Time Thief Adjuster --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -36,13 +35,12 @@ function s.initial_effect(c) c:RegisterEffect(e4) end --Lists "Time Thief" archetype -s.listed_series={0x126} +s.listed_series={SET_TIME_THIEF} --Specifically lists itself s.listed_names={id} - --If you normal/special summoned a "Time Thief" monster function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x126) and not c:IsCode(id) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(SET_TIME_THIEF) and not c:IsCode(id) end --If it ever happened function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -62,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Time Thief" card, except "Time Thief Adjuster" function s.tgfilter(c) - return c:IsSetCard(0x126) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_TIME_THIEF) and not c:IsCode(id) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c64734090.lua b/official/c64734090.lua index a471d81cbe..5e1ef04ae7 100644 --- a/official/c64734090.lua +++ b/official/c64734090.lua @@ -1,4 +1,5 @@ --ジェムタートル +--Gem-Turtle local s,id=GetID() function s.initial_effect(c) --search @@ -27,4 +28,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c64734921.lua b/official/c64734921.lua index 81723ecba1..76bce992dc 100644 --- a/official/c64734921.lua +++ b/official/c64734921.lua @@ -1,4 +1,5 @@ --創造の代行者 ヴィーナス +--The Agent of Creation - Venus local s,id=GetID() function s.initial_effect(c) --spsummon @@ -7,29 +8,25 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={39552864} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.filter(c,e,tp) return c:IsCode(39552864) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64749612.lua b/official/c64749612.lua index 0a539e2ad3..d8dea47767 100644 --- a/official/c64749612.lua +++ b/official/c64749612.lua @@ -18,9 +18,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_FLIP) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.spfilter(c,e,tp) - return c:IsSetCard(0x2b) and c:IsLevelBelow(4) + return c:IsSetCard(SET_NINJA) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -52,8 +52,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x2b) and c:IsLocation(LOCATION_EXTRA) + return not c:IsSetCard(SET_NINJA) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x2b) + return not c:IsOriginalSetCard(SET_NINJA) end \ No newline at end of file diff --git a/official/c64751286.lua b/official/c64751286.lua index 3fa9e06abe..b2dcd5c0c2 100644 --- a/official/c64751286.lua +++ b/official/c64751286.lua @@ -1,4 +1,5 @@ --月の女戦士 +--Penumbral Soldier Lady local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -16,4 +17,4 @@ function s.condtion(e) local bc=c:GetBattleTarget() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_LIGHT) -end +end \ No newline at end of file diff --git a/official/c64752646.lua b/official/c64752646.lua index cb56de0265..8dd1d4752e 100644 --- a/official/c64752646.lua +++ b/official/c64752646.lua @@ -1,4 +1,5 @@ --ビッグバンガール +--Fire Princess local s,id=GetID() function s.initial_effect(c) --damage @@ -16,4 +17,4 @@ function s.cd(e,tp,eg,ep,ev,re,r,rp) end function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c64753157.lua b/official/c64753157.lua index baac17d70b..ef38f7ca58 100644 --- a/official/c64753157.lua +++ b/official/c64753157.lua @@ -1,4 +1,5 @@ --Charming Resort Staff +--Charming Resort Staff local s,id=GetID() function s.initial_effect(c) --atkdown @@ -32,7 +33,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_BATTLE_DESTROYED) e3:SetRange(LOCATION_GRAVE) e3:SetCondition(s.thcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -62,7 +63,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -104,4 +105,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c64753988.lua b/official/c64753988.lua index 2b79a0570c..ccd1d549f9 100644 --- a/official/c64753988.lua +++ b/official/c64753988.lua @@ -1,5 +1,5 @@ --サイバーダーク・ワールド ---Cyberdark World +--Cyberdark Realm --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -30,9 +30,9 @@ function s.initial_effect(c) e3:SetTargetRange(1,0) c:RegisterEffect(e3) end -s.listed_series={0x4093} +s.listed_series={SET_CYBERDARK} function s.thfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0x4093) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_CYBERDARK) and c:IsAbleToHand() and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.nsfilter(c) - return c:IsSetCard(0x4093) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_CYBERDARK) and c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -61,4 +61,4 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Summon(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c64756282.lua b/official/c64756282.lua index 3aa5e2ffe9..8d1ef2d2c3 100644 --- a/official/c64756282.lua +++ b/official/c64756282.lua @@ -73,4 +73,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) if op then op(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c64765016.lua b/official/c64765016.lua index 5436dcec59..2bd3a72d6e 100644 --- a/official/c64765016.lua +++ b/official/c64765016.lua @@ -38,19 +38,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -63,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -71,12 +71,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) -end + return re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c64788463.lua b/official/c64788463.lua index 7f43f35ba3..a7e4a2aac6 100644 --- a/official/c64788463.lua +++ b/official/c64788463.lua @@ -1,4 +1,5 @@ --キングス・ナイト +--King's Knight local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_names={25652259,90876561} +s.listed_names={CARD_QUEEN_KNIGHT,CARD_JACK_KNIGHT} function s.cfilter(c) - return c:IsFaceup() and c:IsCode(25652259) + return c:IsFaceup() and c:IsCode(CARD_QUEEN_KNIGHT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end function s.filter(c,e,tp) - return c:IsCode(90876561) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsCode(CARD_JACK_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,4 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64797746.lua b/official/c64797746.lua index f81c42f1e1..3e06d231e0 100644 --- a/official/c64797746.lua +++ b/official/c64797746.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetCondition(s.discon) e2:SetTarget(s.distg) e2:SetOperation(s.disop) - c:RegisterEffect(e2) + c:RegisterEffect(e2) --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -35,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x42,0x4b} +s.listed_series={SET_NORDIC,SET_AESIR} function s.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x4b),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AESIR),tp,LOCATION_MZONE,0,1,nil) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end @@ -51,18 +51,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.cfilter(c) - return c:IsSetCard(0x42) + return c:IsSetCard(SET_NORDIC) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -71,7 +71,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(rg,REASON_COST) end function s.spfilter(c,e,sp) - return c:IsSetCard(0x4b) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsSetCard(SET_AESIR) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64801562.lua b/official/c64801562.lua index b431e293a3..ee6678f3f4 100644 --- a/official/c64801562.lua +++ b/official/c64801562.lua @@ -1,4 +1,5 @@ --明鏡止水の心 +--Heart of Clear Water local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -31,4 +32,4 @@ end function s.descon(e) local tc=e:GetHandler():GetEquipTarget() return tc and tc:GetAttack()>=1300 -end +end \ No newline at end of file diff --git a/official/c6480253.lua b/official/c6480253.lua index 19423507c9..05c5aa6bfb 100644 --- a/official/c6480253.lua +++ b/official/c6480253.lua @@ -38,4 +38,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c64804137.lua b/official/c64804137.lua index 55338e1c49..aa4c8f7f32 100644 --- a/official/c64804137.lua +++ b/official/c64804137.lua @@ -1,5 +1,5 @@ --トリックスターバンド・ドラマチス ---Trickstar Band Drummatis +--Trickstar Band Drumatis --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) diff --git a/official/c64804316.lua b/official/c64804316.lua index 4e6c5d9edb..be591ad7b1 100644 --- a/official/c64804316.lua +++ b/official/c64804316.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) e4:SetCode(EVENT_FLIP) c:RegisterEffect(e4) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -41,7 +41,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -58,14 +58,14 @@ function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE) end function s.thfilter(c) - return c:IsSetCard(0x8d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_GHOSTRICK) and c:IsSpellTrap() and c:IsAbleToHand() end function s.posfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsCanTurnSet() end function s.gyop(e,tp,eg,ep,ev,re,r,rp) if Duel.DiscardDeck(tp,2,REASON_EFFECT)~=2 then return end - local og=Duel.GetOperatedGroup():Match(Card.IsSetCard,nil,0x8d):Match(Card.IsLocation,nil,LOCATION_GRAVE) + local og=Duel.GetOperatedGroup():Match(Card.IsSetCard,nil,SET_GHOSTRICK):Match(Card.IsLocation,nil,LOCATION_GRAVE) if #og==0 then return end local g1=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) local g2=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,0,nil) @@ -89,4 +89,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg,true) Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c64806765.lua b/official/c64806765.lua index 97d403d994..ff2c3efcf4 100644 --- a/official/c64806765.lua +++ b/official/c64806765.lua @@ -40,4 +40,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64815084.lua b/official/c64815084.lua index 4e9fbb9c12..7b7c70decd 100644 --- a/official/c64815084.lua +++ b/official/c64815084.lua @@ -1,4 +1,5 @@ --進化の分岐点 +--Evo-Branch local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x304e} +s.listed_series={SET_EVOLTILE} function s.filter(c,ft) return c:IsFaceup() and c:IsRace(RACE_REPTILE) and (ft>0 or c:GetSequence()<5) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_EVOLTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c6483224.lua b/official/c6483224.lua index 38c0cf943b..faf5248fa0 100644 --- a/official/c6483224.lua +++ b/official/c6483224.lua @@ -1,4 +1,5 @@ --半月竜ラディウス +--Radius, the Half-Moon Dragon local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,6 +28,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c64867422.lua b/official/c64867422.lua index af0049eca6..3f0f47df72 100644 --- a/official/c64867422.lua +++ b/official/c64867422.lua @@ -54,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetLabelObject(tc) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Can make a second attack local e2=Effect.CreateEffect(c) @@ -63,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_EXTRA_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) tc:RegisterEffect(e2) --Register a hint to the player @@ -92,4 +92,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64880894.lua b/official/c64880894.lua index 7c41939ff4..4aacfb1eae 100644 --- a/official/c64880894.lua +++ b/official/c64880894.lua @@ -1,4 +1,5 @@ --スターダスト・チャージ・ウォリアー +--Stardust Charge Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -24,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -37,5 +38,5 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.atkfilter(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) -end + return c:IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c64892035.lua b/official/c64892035.lua index cbc7b91ab3..830fcdaca0 100644 --- a/official/c64892035.lua +++ b/official/c64892035.lua @@ -1,4 +1,5 @@ --遅すぎたオーク +--Tardy Orc local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -12,6 +13,6 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c64898834.lua b/official/c64898834.lua index 5eaf77b9e1..cd80886cf6 100644 --- a/official/c64898834.lua +++ b/official/c64898834.lua @@ -1,4 +1,5 @@ --TG カタパルト・ドラゴン +--T.G. Catapult Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.filter(c,e,tp) - return c:IsSetCard(0x27) and c:IsLevelBelow(3) and c:IsType(TYPE_TUNER) + return c:IsSetCard(SET_TG) and c:IsLevelBelow(3) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -29,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64910482.lua b/official/c64910482.lua index 2345129e7f..21bebad885 100644 --- a/official/c64910482.lua +++ b/official/c64910482.lua @@ -1,4 +1,5 @@ --TG サイバー・マジシャン +--T.G. Cyber Magician local s,id=GetID() function s.initial_effect(c) --to grave @@ -17,10 +18,10 @@ function s.initial_effect(c) e3:SetValue(s.synval) c:RegisterEffect(e3) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.synval(e,c,sc) - if sc:IsSetCard(0x27) and --c:IsNotTuner() - (not c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_NONTUNER)) and c:IsSetCard(0x27) and c:IsLocation(LOCATION_HAND) then + if sc:IsSetCard(SET_TG) and --c:IsNotTuner() + (not c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_NONTUNER)) and c:IsSetCard(SET_TG) and c:IsLocation(LOCATION_HAND) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_HAND_SYNCHRO+EFFECT_SYNCHRO_CHECK) @@ -59,12 +60,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x27) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TG) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -77,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c64926005.lua b/official/c64926005.lua index fd84ca9672..9199a5fda4 100644 --- a/official/c64926005.lua +++ b/official/c64926005.lua @@ -1,4 +1,5 @@ --氷結界の武士 +--Samurai of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64927055.lua b/official/c64927055.lua index 9592fb2376..7415c86999 100644 --- a/official/c64927055.lua +++ b/official/c64927055.lua @@ -1,5 +1,5 @@ --天空の歌声 ---Chorus in the Sky +--The Chorus in the Sky --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -11,16 +11,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end s.listed_names={CARD_SANCTUARY_SKY} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.thfilter1(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToHand() end @@ -38,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and (Duel.IsEnvironment(CARD_SANCTUARY_SKY) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),0,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),0,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil)) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) diff --git a/official/c6494106.lua b/official/c6494106.lua index 41e9428c38..cb20f5fb5e 100644 --- a/official/c6494106.lua +++ b/official/c6494106.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={CARD_EVIL_EYE_SELENE} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x129),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_EVIL_EYE),tp,LOCATION_MZONE,0,1,nil) end function s.evilcond(c) return c:IsFaceup() and c:IsCode(CARD_EVIL_EYE_SELENE) @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c64952266.lua b/official/c64952266.lua index 31972bf7be..612cbfcfe4 100644 --- a/official/c64952266.lua +++ b/official/c64952266.lua @@ -1,4 +1,5 @@ --アゲインスト・ウィンド +--Against the Wind local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsSetCard(0x33) and c:IsMonster() and c:GetAttack()>0 and c:IsAbleToHand() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() and c:GetAttack()>0 and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c64961254.lua b/official/c64961254.lua index 453a50dfcc..cdcce62805 100644 --- a/official/c64961254.lua +++ b/official/c64961254.lua @@ -21,10 +21,10 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} s.listed_names={91969909} function s.thcfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x122) + return c:IsFacedown() or not c:IsSetCard(SET_VALKYRIE) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 @@ -69,5 +69,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,1-tp,REASON_EFFECT) Duel.ShuffleHand(1-tp) end -end - +end \ No newline at end of file diff --git a/official/c64966519.lua b/official/c64966519.lua index 8f64d1a59e..9bdb561a09 100644 --- a/official/c64966519.lua +++ b/official/c64966519.lua @@ -1,5 +1,5 @@ --激撮ディスパラッチ ---Paparazzi Disparazzi +--Dispatchparazzi --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c64973287.lua b/official/c64973287.lua index 4eb55bc3c5..14d820382c 100644 --- a/official/c64973287.lua +++ b/official/c64973287.lua @@ -1,4 +1,5 @@ --ダイナミスト・プテラン +--Dinomist Pteran local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -23,9 +24,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0xd8) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_DINOMIST) and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp)) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -38,10 +39,10 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.filter(c) - return c:IsSetCard(0xd8) and c:IsAbleToHand() + return c:IsSetCard(SET_DINOMIST) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +55,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c64973456.lua b/official/c64973456.lua index 718b6c1328..53d19aa2c7 100644 --- a/official/c64973456.lua +++ b/official/c64973456.lua @@ -1,4 +1,5 @@ --ヴァイパー・リボーン +--Viper's Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,11 +39,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c64977888.lua b/official/c64977888.lua index 742790465e..d06cc0bbe0 100644 --- a/official/c64977888.lua +++ b/official/c64977888.lua @@ -1,4 +1,5 @@ --見習い魔笛使い +--Apprentice Piper local s,id=GetID() function s.initial_effect(c) --flip @@ -40,5 +41,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c6498706.lua b/official/c6498706.lua index 75a917d2d7..acabdb2bb9 100644 --- a/official/c6498706.lua +++ b/official/c6498706.lua @@ -16,8 +16,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end --Part of "Fusion" archetype -s.listed_series={0x46} - +s.listed_series={SET_FUSION} --Haven't summoned any non-fusions function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_FUSION) @@ -32,7 +31,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -46,7 +45,7 @@ function s.lizfilter(e,c) end --Check for fusion monster with listed material function s.exfilter(c,e,tp) - return c.material and c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c) + return c.material and c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,c) end --Check if listed material can be special summoned function s.spfilter(c,e,tp,fc) @@ -56,7 +55,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end --Special summon listed material from hand or deck function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -66,8 +65,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #cg==0 then return end Duel.ConfirmCards(1-tp,cg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,cg:GetFirst()) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,cg:GetFirst()) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c64990807.lua b/official/c64990807.lua index 000a7c36f6..40aa56d70a 100644 --- a/official/c64990807.lua +++ b/official/c64990807.lua @@ -1,4 +1,5 @@ --氷結界の三方陣 +--Magic Triangle of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.cfilter(c) - return c:IsSetCard(0x2f) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() and not c:IsPublic() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil) @@ -24,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICE_BARRIER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end @@ -44,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65017789.lua b/official/c65017789.lua index 21d0f8bf44..4fab6a3fd3 100644 --- a/official/c65017789.lua +++ b/official/c65017789.lua @@ -24,16 +24,16 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.tffilter(c,tp) - return c:IsSpellTrap() and c:IsSetCard(0x109) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + return c:IsSpellTrap() and c:IsSetCard(SET_THE_WEATHER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsType(TYPE_FIELD) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,9 +52,9 @@ function s.spreg(e,tp,eg,ep,ev,re,r,rp) if not re then return end local c=e:GetHandler() local rc=re:GetHandler() - if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) then + if c:IsReason(REASON_COST) and rc:IsSetCard(SET_THE_WEATHER) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c65025250.lua b/official/c65025250.lua index 448dea2656..c3f1fa163f 100644 --- a/official/c65025250.lua +++ b/official/c65025250.lua @@ -1,4 +1,5 @@ --妖仙獣 左鎌神柱 +--Yosenju Shinchu L local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -32,10 +33,10 @@ function s.initial_effect(c) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.filter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsSetCard(0xb3) and not c:IsReason(REASON_REPLACE) + and c:IsSetCard(SET_YOSENJU) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -47,7 +48,7 @@ function s.repval(e,c) return s.filter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAttackPos() end @@ -60,5 +61,5 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,c) - return c~=e:GetHandler() and c:IsSetCard(0xb3) -end + return c~=e:GetHandler() and c:IsSetCard(SET_YOSENJU) +end \ No newline at end of file diff --git a/official/c65026212.lua b/official/c65026212.lua index b7d4a37a55..fa5409960b 100644 --- a/official/c65026212.lua +++ b/official/c65026212.lua @@ -35,16 +35,16 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() end function s.cfilter2(c) - return c:IsMonster() and c:IsSetCard(0x1d) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_KOAKI_MEIRU) and c:IsAbleToGraveAsCost() end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -114,4 +114,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65029288.lua b/official/c65029288.lua index 0f4a2146b1..f7fcc5030c 100644 --- a/official/c65029288.lua +++ b/official/c65029288.lua @@ -1,9 +1,10 @@ --EMオッドアイズ・メタル・クロウ +--Performapal Odd-Eyes Metal Claw local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x99),aux.FilterBoolFunctionEx(Card.IsSetCard,0x9f)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ODD_EYES),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PERFORMAPAL)) --cannot fusion material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -28,11 +29,11 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x99,0x9f} +s.listed_series={SET_ODD_EYES,SET_PERFORMAPAL} s.listed_names={CARD_POLYMERIZATION} -s.material_setcode={0x99,0x9f} +s.material_setcode={SET_ODD_EYES,SET_PERFORMAPAL} function s.immcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsCode(CARD_POLYMERIZATION) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return re and re:GetHandler():IsCode(CARD_POLYMERIZATION) and e:GetHandler():IsFusionSummoned() end function s.immop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,7 +44,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.efilter(e,te) @@ -58,7 +59,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c65046521.lua b/official/c65046521.lua index c979aad215..99b84cede6 100644 --- a/official/c65046521.lua +++ b/official/c65046521.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tftg) e2:SetOperation(s.tfop) c:RegisterEffect(e2) diff --git a/official/c65064143.lua b/official/c65064143.lua index 848cdc61ee..cbb921887b 100644 --- a/official/c65064143.lua +++ b/official/c65064143.lua @@ -1,4 +1,5 @@ --対空放花 +--Anti-Aircraft Flower local s,id=GetID() function s.initial_effect(c) --damage @@ -27,4 +28,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65079854.lua b/official/c65079854.lua index e8c10125d1..1d6256f1c5 100644 --- a/official/c65079854.lua +++ b/official/c65079854.lua @@ -1,4 +1,5 @@ --憎悪の棘 +--Thorn of Malice local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -49,9 +50,9 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) bc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c6511113.lua b/official/c6511113.lua index 4e03ead159..cddd13d667 100644 --- a/official/c6511113.lua +++ b/official/c6511113.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetRange(LOCATION_MZONE) e5:SetCode(EVENT_FREE_CHAIN) - e5:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START+TIMING_MAIN_END) + e5:SetHintTiming(TIMINGS_CHECK_MONSTER|TIMING_BATTLE_START|TIMING_MAIN_END) e5:SetCountLimit(1) e5:SetCost(s.cost) e5:SetTarget(s.target) @@ -46,22 +46,22 @@ function s.initial_effect(c) c:RegisterEffect(e5,false,REGISTER_FLAG_DETACH_XMAT) end s.listed_names={id} -s.listed_series={0x108a,0x4c,0x89} +s.listed_series={SET_TRAPTRIX,SET_TRAP_HOLE,SET_HOLE} function s.imcon(e) return e:GetHandler():GetOverlayCount()>0 end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) + return te:IsTrapEffect() end function s.imtg(e,c) - return c:IsSetCard(0x108a) and not c:IsCode(id) + return c:IsSetCard(SET_TRAPTRIX) and not c:IsCode(id) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.filter(c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToGraveAsCost() + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,true)~=nil end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -90,4 +90,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(te:GetLabelObject()) local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c65124425.lua b/official/c65124425.lua index c4b2e9dfa8..e333abeb1f 100644 --- a/official/c65124425.lua +++ b/official/c65124425.lua @@ -1,5 +1,5 @@ --虚ろなる龍輪 ---The Hollow Cycle of Dragons +--Vessel for the Dragon Cycle --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -12,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x12c} +s.listed_series={SET_TENYI} function s.gyfilter(c) return c:IsRace(RACE_WYRM) and c:IsAbleToGrave() end function s.thfilter(c,cd) - return c:IsSetCard(0x12c) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToHand() + return c:IsSetCard(SET_TENYI) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK,0,1,nil) end @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c65149697.lua b/official/c65149697.lua index d408ab4f1d..25a3481ad7 100644 --- a/official/c65149697.lua +++ b/official/c65149697.lua @@ -1,4 +1,5 @@ --レアル・ジェネクス・クラッシャー +--R-Genex Crusher local s,id=GetID() function s.initial_effect(c) --search @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1002} +s.listed_series={SET_R_GENEX} function s.filter(c) - return c:GetLevel()==4 and c:IsSetCard(0x1002) and c:IsAbleToHand() + return c:GetLevel()==4 and c:IsSetCard(SET_R_GENEX) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c65150219.lua b/official/c65150219.lua index e9091cad3a..9af8dab6e2 100644 --- a/official/c65150219.lua +++ b/official/c65150219.lua @@ -19,17 +19,17 @@ function s.initial_effect(c) e2:SetCondition(s.poscon) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) + return c:IsFaceup() and c:IsSetCard(SET_NINJA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end function s.poscon(e) diff --git a/official/c65156847.lua b/official/c65156847.lua index c4f34508a5..8926f5309f 100644 --- a/official/c65156847.lua +++ b/official/c65156847.lua @@ -1,4 +1,5 @@ --ネオフレムベル・ガルーダ +--Neo Flamvell Garuda local s,id=GetID() function s.initial_effect(c) --remove @@ -15,22 +16,22 @@ function s.initial_effect(c) e1:SetOperation(s.rmop) c:RegisterEffect(e1) end -s.listed_series={0x2c} +s.listed_series={SET_FLAMVELL} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2c) + return c:IsFaceup() and c:IsSetCard(SET_FLAMVELL) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -38,4 +39,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65169794.lua b/official/c65169794.lua index a38e012a19..9ea8061549 100644 --- a/official/c65169794.lua +++ b/official/c65169794.lua @@ -1,4 +1,5 @@ --黒いペンダント +--Black Pendant local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -32,4 +33,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65170459.lua b/official/c65170459.lua index 6091b36f48..01ec0ea365 100644 --- a/official/c65170459.lua +++ b/official/c65170459.lua @@ -1,5 +1,5 @@ --マスター・ボーイ ---Mastar Boy +--Mistar Boy --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65172015.lua b/official/c65172015.lua index 4b8745f270..f429a7ee2d 100644 --- a/official/c65172015.lua +++ b/official/c65172015.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop2) c:RegisterEffect(e3) @@ -61,7 +61,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) @@ -69,7 +69,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c65187687.lua b/official/c65187687.lua index 80ee3b034d..a8535cdba2 100644 --- a/official/c65187687.lua +++ b/official/c65187687.lua @@ -1,12 +1,12 @@ --- 巨骸竜フェルグラント --- Corpse Dragon Lord Felgrand --- Scripted by Hatter +--巨骸竜フェルグラント +--Skeletal Dragon Felgrand +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 1 Zombie Tuner + 1+ non-Tuner monsters + --1 Zombie Tuner + 1+ non-Tuner monsters Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_ZOMBIE),1,1,Synchro.NonTuner(nil),1,99) - -- Banish a monster from opponent's field or GY + --Banish a monster from opponent's field or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - -- Negate another face-up monster's effects + --Negate another face-up monster's effects local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DISABLE) @@ -35,10 +35,10 @@ function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,false,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -67,7 +67,7 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) diff --git a/official/c65192027.lua b/official/c65192027.lua index 4996ee3b1d..a9af18b09e 100644 --- a/official/c65192027.lua +++ b/official/c65192027.lua @@ -1,4 +1,5 @@ --ダーク・アームド・ドラゴン +--Dark Armed Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -39,9 +40,9 @@ function s.costfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65193366.lua b/official/c65193366.lua index c70f6fc263..1205a1b7c5 100644 --- a/official/c65193366.lua +++ b/official/c65193366.lua @@ -1,4 +1,5 @@ --精霊獣使い ウィンダ +--Spiritual Beast Tamer Winda local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -14,27 +15,27 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end function s.spfilter(c,e,tp) if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)==0 then return false end - return c:IsSetCard(0xb5) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end if loc==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65195959.lua b/official/c65195959.lua index ee42526c85..85fd2e5425 100644 --- a/official/c65195959.lua +++ b/official/c65195959.lua @@ -1,5 +1,5 @@ --EMプラスタートル ---Performarmapal Stamp Turtle +--Performapal Stamp Turtle local s,id=GetID() function s.initial_effect(c) --lv @@ -31,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c65196094.lua b/official/c65196094.lua index 814912c4cb..77ab1f613b 100644 --- a/official/c65196094.lua +++ b/official/c65196094.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.counterfilter(c) - return not c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return not c:IsSynchroSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -60,7 +60,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,spg,maxc) local lv=cg:GetFirst():GetLevel() - Duel.SendtoDeck(cg,nil,0,REASON_COST) + Duel.SendtoDeck(cg,nil,SEQ_DECKTOP,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=spg:SelectWithSumEqual(tp,Card.GetLevel,lv,1,maxc) Duel.SetTargetCard(sg) @@ -72,4 +72,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if ct==0 or (ct>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)) or ct>Duel.GetLocationCount(tp,LOCATION_MZONE) then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c652362.lua b/official/c652362.lua index 2dd5129eec..d1bbf96a1f 100644 --- a/official/c652362.lua +++ b/official/c652362.lua @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} function s.filter(c,e,tp) local lv=c:GetLevel() - return lv>0 and lv<=4 and c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return lv>0 and lv<=4 and c:IsSetCard(SET_ALIEN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -30,7 +30,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -52,4 +52,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65236257.lua b/official/c65236257.lua index 50b8f997b0..f3772160d4 100644 --- a/official/c65236257.lua +++ b/official/c65236257.lua @@ -1,4 +1,5 @@ --創星の因子 +--Tellarknight Genesis local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,17 +7,17 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.cfilter(c) - return c:IsSetCard(0x9c) and c:IsFaceup() + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsFaceup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,c) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65240384.lua b/official/c65240384.lua index 14333aef78..4993dc37b9 100644 --- a/official/c65240384.lua +++ b/official/c65240384.lua @@ -1,4 +1,5 @@ --ビッグ・シールド・ガードナー +--Big Shield Gardna local s,id=GetID() function s.initial_effect(c) --to attack @@ -23,7 +24,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then + if re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return #tg==1 and tg:GetFirst()==e:GetHandler() and e:GetHandler():IsFacedown() else @@ -36,4 +37,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(eg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c65240394.lua b/official/c65240394.lua index 3b4112f99f..b610b97c61 100644 --- a/official/c65240394.lua +++ b/official/c65240394.lua @@ -34,4 +34,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) end end -end +end \ No newline at end of file diff --git a/official/c65247798.lua b/official/c65247798.lua index aa07696ded..e6bc49c8f8 100644 --- a/official/c65247798.lua +++ b/official/c65247798.lua @@ -1,4 +1,5 @@ --妖仙獣 鎌壱太刀 +--Yosenju Kama 1 local s,id=GetID() function s.initial_effect(c) --summon @@ -31,10 +32,10 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xb3) and not c:IsCode(id) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_YOSENJU) and not c:IsCode(id) and c:IsSummonable(true,nil) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -48,7 +49,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xb3) + return c:IsFaceup() and c:IsSetCard(SET_YOSENJU) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) @@ -92,4 +93,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65260293.lua b/official/c65260293.lua index b014829c53..64ffdc87c5 100644 --- a/official/c65260293.lua +++ b/official/c65260293.lua @@ -1,4 +1,5 @@ --エレメント・マジシャン +--Element Magician local s,id=GetID() function s.initial_effect(c) --control @@ -30,4 +31,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c65268179.lua b/official/c65268179.lua index a48fe0e824..f4a4b075c1 100644 --- a/official/c65268179.lua +++ b/official/c65268179.lua @@ -1,5 +1,5 @@ --憑依覚醒-デーモン・リーパー ---Awakening of the Possessed - Archfiend Reaper of Nefariousness +--Awakening of the Possessed - Nefariouser Archfiend --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetValue(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x314d,0xc0} +s.listed_series={SET_SPIRITUAL_EARTH_ART,SET_POSSESSED} function s.spfilter1(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() end @@ -101,12 +101,12 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -114,7 +114,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsAbleToHand() and (c:IsSetCard(0x314d) or (c:IsSetCard(0xc0) and c:IsSpellTrap())) + return c:IsAbleToHand() and (c:IsSetCard(SET_SPIRITUAL_EARTH_ART) or (c:IsSetCard(SET_POSSESSED) and c:IsSpellTrap())) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -127,4 +127,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c65277087.lua b/official/c65277087.lua index b9ba6422c3..aff0ce19d6 100644 --- a/official/c65277087.lua +++ b/official/c65277087.lua @@ -1,4 +1,5 @@ --ガスタ・ガルド +--Gusto Gulldo local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsLevelBelow(2) and c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(2) and c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65282484.lua b/official/c65282484.lua index e3e7ed3c41..eb60496a73 100644 --- a/official/c65282484.lua +++ b/official/c65282484.lua @@ -1,4 +1,5 @@ --ダーク・ボルテニス +--Dark Voltanis local s,id=GetID() function s.initial_effect(c) --counter @@ -86,4 +87,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65285459.lua b/official/c65285459.lua index 046f0fd337..f974b00e13 100644 --- a/official/c65285459.lua +++ b/official/c65285459.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - --negate attack + --Negate an attack and move that monster you control to another of your Main Monster Zones local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BE_BATTLE_TARGET) @@ -36,12 +36,12 @@ function s.initial_effect(c) e3:SetOperation(s.mvop) c:RegisterEffect(e3) end -s.listed_series={0x2157} +s.listed_series={SET_SUNVINE} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_BATTLE+REASON_EFFECT)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUNVINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 diff --git a/official/c65287621.lua b/official/c65287621.lua index 4ee3797109..23828bb4af 100644 --- a/official/c65287621.lua +++ b/official/c65287621.lua @@ -1,4 +1,5 @@ --暗黒ドリケラトプス +--Dark Driceratops local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c65301952.lua b/official/c65301952.lua index 47a99b18d1..c0d2f408a4 100644 --- a/official/c65301952.lua +++ b/official/c65301952.lua @@ -1,4 +1,5 @@ --アルケミック・マジシャン +--Alchemic Magician local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -29,7 +30,7 @@ function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsSpell,c:GetControler(),LOCATION_GRAVE,0,nil)*200 end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) @@ -53,4 +54,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c65303664.lua b/official/c65303664.lua index 9dc58f9eaf..2bf66e5988 100644 --- a/official/c65303664.lua +++ b/official/c65303664.lua @@ -1,4 +1,5 @@ --森の狩人イエロー・バブーン +--Yellow Baboon, Archer of the Forest local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,7 +27,7 @@ function s.rfiletr(c) return c:IsRace(RACE_BEAST) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.rfiletr,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.rfiletr,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65305468.lua b/official/c65305468.lua index a0756cee65..2628f8340b 100644 --- a/official/c65305468.lua +++ b/official/c65305468.lua @@ -1,4 +1,5 @@ --FNo.0 未来皇ホープ +--Number F0: Utopic Future local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -40,7 +41,7 @@ function s.initial_effect(c) end s.xyz_number=0 function s.xyzfilter(c,xyz,sumtype,tp) - return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and not c:IsSetCard(0x48,xyz,sumtype,tp) + return c:IsType(TYPE_XYZ,xyz,sumtype,tp) and not c:IsSetCard(SET_NUMBER,xyz,sumtype,tp) end function s.xyzcheck(g,tp,xyz) local mg=g:Filter(function(c) return not c:IsHasEffect(511001175) end,nil) @@ -65,4 +66,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c65314286.lua b/official/c65314286.lua index 1298828969..5ce1f02ee9 100644 --- a/official/c65314286.lua +++ b/official/c65314286.lua @@ -1,4 +1,5 @@ --時械神サディオン +--Sadion, the Timelord local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -34,7 +35,7 @@ function s.initial_effect(c) local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.lpcon) @@ -45,7 +46,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,2)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.rtdcon) @@ -66,7 +67,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,4000) end function s.rtdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -75,6 +76,6 @@ end function s.rtdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65330383.lua b/official/c65330383.lua index 1352db305c..e5d3bad133 100644 --- a/official/c65330383.lua +++ b/official/c65330383.lua @@ -32,11 +32,11 @@ function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.setfilter(c) return c:IsSpellTrap() and c:IsSSetable() @@ -64,7 +64,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_CANNOT_ACT+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_CANNOT_ACT|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) if e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -75,6 +75,6 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end function s.aclimit(e,re,tp) local tc=re:GetHandler() - return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsSummonType(SUMMON_TYPE_SPECIAL) - and not tc:IsLinked() and re:IsActiveType(TYPE_MONSTER) -end + return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsSpecialSummoned() + and not tc:IsLinked() and re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c65331686.lua b/official/c65331686.lua index 2603d2d47a..91e628bbae 100644 --- a/official/c65331686.lua +++ b/official/c65331686.lua @@ -18,19 +18,19 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --spsummon - local params={aux.FilterBoolFunction(Card.IsSetCard,0xad)} + local params={aux.FilterBoolFunction(Card.IsSetCard,SET_FRIGHTFUR)} local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.cost) + e3:SetCost(Cost.PayLP(500)) e3:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} s.listed_names={CARD_POLYMERIZATION} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) @@ -50,7 +50,3 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ConfirmCards(1-tp,g) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end diff --git a/official/c65338781.lua b/official/c65338781.lua index 603f09b971..a2fb9105ce 100644 --- a/official/c65338781.lua +++ b/official/c65338781.lua @@ -34,15 +34,15 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.cttg) e4:SetOperation(s.ctop) c:RegisterEffect(e4) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -51,18 +51,18 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(e:GetHandler(),REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x45) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -82,4 +82,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then tc:AddCounter(COUNTER_SPELL,1) end -end +end \ No newline at end of file diff --git a/official/c65342096.lua b/official/c65342096.lua index adfb3efc01..227b7919c1 100644 --- a/official/c65342096.lua +++ b/official/c65342096.lua @@ -45,7 +45,7 @@ s.counter_place_list={COUNTER_SPELL} s.listed_names={39910367} function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler()~=c then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:GetHandler()~=c then c:AddCounter(COUNTER_SPELL,1) end end @@ -64,15 +64,15 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) - and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65351555.lua b/official/c65351555.lua index 52ea44b12b..c630ed28e5 100644 --- a/official/c65351555.lua +++ b/official/c65351555.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) diff --git a/official/c65357623.lua b/official/c65357623.lua index f042eca7d1..b72960bfe8 100644 --- a/official/c65357623.lua +++ b/official/c65357623.lua @@ -1,7 +1,6 @@ --アンデット・ストラグル --Zombie Power Struggle --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -13,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -28,31 +27,24 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end - --If damage isn't being calculated -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end - --Check for a zombie monster function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) end - --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc,race) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end - --Targeted zombie monster either gains or loses 1000 ATK function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local atk=1000 if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then atk=atk*-1 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) end @@ -81,7 +73,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c65367484.lua b/official/c65367484.lua index acfbf3ad93..2cd4eecb21 100644 --- a/official/c65367484.lua +++ b/official/c65367484.lua @@ -1,4 +1,5 @@ --フォトン・スラッシャー +--Photon Thrasher local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -24,4 +25,4 @@ function s.spcon(e,c) end function s.atcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>1 -end +end \ No newline at end of file diff --git a/official/c653675.lua b/official/c653675.lua index 8bc874dc38..590a1735c7 100644 --- a/official/c653675.lua +++ b/official/c653675.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c65384019.lua b/official/c65384019.lua index b6c2fb2200..41aeff30d6 100644 --- a/official/c65384019.lua +++ b/official/c65384019.lua @@ -1,4 +1,5 @@ --アルケミー・サイクル +--Alchemy Cycle local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:GetBaseAttack()~=0 end @@ -26,16 +24,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) local c=e:GetHandler() local fid=c:GetFieldID() - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do if not tc:IsImmuneToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END,0,1,fid) end end local e2=Effect.CreateEffect(c) @@ -47,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.drcon) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabel(fid) Duel.RegisterEffect(e2,tp) end @@ -66,4 +63,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65384188.lua b/official/c65384188.lua index 552ca29325..cee1a132e3 100644 --- a/official/c65384188.lua +++ b/official/c65384188.lua @@ -1,6 +1,5 @@ --実力伯仲 --Stand-Off - local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,11 +31,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) if not tc1:IsDisabled() then tc1:RegisterEffect(e1) tc1:RegisterEffect(e2) @@ -56,13 +55,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.reg(c,tc1,tc2) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc1:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHANGE_POS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetOperation(s.posop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) --Cannot be destroyed by battle local e2=Effect.CreateEffect(c) @@ -72,7 +71,7 @@ function s.reg(c,tc1,tc2) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCondition(s.effcon) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetLabelObject(tc2) tc1:RegisterEffect(e2) --Cannot change their battle positions diff --git a/official/c65393205.lua b/official/c65393205.lua index 082956265a..01e27a4ec3 100644 --- a/official/c65393205.lua +++ b/official/c65393205.lua @@ -1,4 +1,5 @@ --チャクラ +--Chakra local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c65398390.lua b/official/c65398390.lua index 632341102c..2077cae049 100644 --- a/official/c65398390.lua +++ b/official/c65398390.lua @@ -1,5 +1,5 @@ --焔聖騎士将-オリヴィエ ---Infernoble Knight General Oliver +--Infernoble Knight Captain Oliver local s,id=GetID() function s.initial_effect(c) --Synchro Summon procedure @@ -67,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) if tc and tc:IsRelateToEffect(e) and tc:IsControler(tp) then s.equipop(c,e,tp,tc) @@ -81,7 +81,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) --Equip limit @@ -90,9 +90,9 @@ function s.equipop(c,e,tp,tc) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end function s.eqlimit(e,c) return c:GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c65403020.lua b/official/c65403020.lua index cbca3b8db5..ba64932fc7 100644 --- a/official/c65403020.lua +++ b/official/c65403020.lua @@ -24,4 +24,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c6540606.lua b/official/c6540606.lua index b2b94c4852..b9012c3c70 100644 --- a/official/c6540606.lua +++ b/official/c6540606.lua @@ -1,4 +1,5 @@ --水霊術-「葵」 +--Spiritual Water Art - Aoi local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c65422840.lua b/official/c65422840.lua index 33acbef5c4..bcf43a9975 100644 --- a/official/c65422840.lua +++ b/official/c65422840.lua @@ -1,4 +1,5 @@ --酒呑童子 +--Shutendoji local s,id=GetID() function s.initial_effect(c) --Draw @@ -29,10 +30,10 @@ function s.cfilter(c) return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -59,6 +60,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65430555.lua b/official/c65430555.lua index aa8104a3b3..7cef0f7899 100644 --- a/official/c65430555.lua +++ b/official/c65430555.lua @@ -1,5 +1,5 @@ --Beetrooper Sting Lancer ---Scripted by fiftyfour +--Beetrooper Sting Lancer local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x172} +s.listed_series={SET_BEETROOPER} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end @@ -68,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x172) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_BEETROOPER) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c65430834.lua b/official/c65430834.lua index e51b89960a..d1c194ca76 100644 --- a/official/c65430834.lua +++ b/official/c65430834.lua @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,1) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -46,8 +46,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) e3:SetTargetRange(1,1) Duel.RegisterEffect(e3,tp) end -end +end \ No newline at end of file diff --git a/official/c65433790.lua b/official/c65433790.lua index aae26e8591..a9e5e6fcdd 100644 --- a/official/c65433790.lua +++ b/official/c65433790.lua @@ -1,11 +1,11 @@ --- Battle Royal Mode-Joining --- Battle Royal Mode - Joining --- Scripted by Hatter +--Battle Royal Mode-Joining +--Battle Royal Mode - Joining +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate by targeting 1 monster + --Activate by targeting 1 monster aux.AddPersistentProcedure(c,PLAYER_ALL,aux.FaceupFilter(Card.IsType,TYPE_EFFECT)) - -- Cannot be destroyed by battle the first two times + --Cannot be destroyed by battle the first two times local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) @@ -15,14 +15,14 @@ function s.initial_effect(c) e1:SetTarget(aux.PersistentTargetFilter) e1:SetValue(function(_,_,r) return r&REASON_BATTLE==REASON_BATTLE end) c:RegisterEffect(e1) - -- Destroying player gains 2000 LP + --Destroying player gains 2000 LP local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetOperation(s.lpop) c:RegisterEffect(e2) - -- Special Summon 1 Level 4 or lower monster + --Special Summon 1 Level 4 or lower monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -45,10 +45,10 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) - or not Duel.IsExistingMatchingCard(s.spfilter,ep,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,ep) + or not Duel.IsExistingMatchingCard(s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,ep) or not Duel.SelectYesNo(ep,aux.Stringid(id,1)) then return end Duel.Hint(HINT_SELECTMSG,ep,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(ep,s.spfilter,ep,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,ep) + local sg=Duel.SelectMatchingCard(ep,s.spfilter,ep,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,ep) if #sg>0 and Duel.SpecialSummon(sg,0,ep,ep,false,false,POS_FACEUP)>0 then Duel.SetLP(ep,Duel.GetLP(ep)-2000) end diff --git a/official/c65446452.lua b/official/c65446452.lua index 9d19bfaefc..41183f3447 100644 --- a/official/c65446452.lua +++ b/official/c65446452.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) local e4=e2:Clone() - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x10cd)) + e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_AQUAACTRESS)) c:RegisterEffect(e4) local e5=e4:Clone() e5:SetCode(EFFECT_UPDATE_DEFENSE) @@ -36,7 +36,7 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x10cd} +s.listed_series={SET_AQUAACTRESS} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end @@ -63,9 +63,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:GetRace()~=RACE_AQUA -end +end \ No newline at end of file diff --git a/official/c65450690.lua b/official/c65450690.lua index 0943218355..f2173733ec 100644 --- a/official/c65450690.lua +++ b/official/c65450690.lua @@ -1,6 +1,5 @@ --限定解除 --Ritual Foregone - local s,id=GetID() function s.initial_effect(c) --Special summon 1 ritual monster from hand @@ -9,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c,e,tp) return c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) end @@ -39,9 +34,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Destroy it during end phase local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) diff --git a/official/c65458948.lua b/official/c65458948.lua index 7dedf73aca..27987c5b3e 100644 --- a/official/c65458948.lua +++ b/official/c65458948.lua @@ -1,4 +1,5 @@ --トゥーン・マーメイド +--Toon Mermaid local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -84,7 +85,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atcost(e,c,tp) @@ -95,4 +96,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,500) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c65471349.lua b/official/c65471349.lua index 1820158dcb..39c03e06eb 100644 --- a/official/c65471349.lua +++ b/official/c65471349.lua @@ -57,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c65472618.lua b/official/c65472618.lua index 3b7fd20694..c2717fbfe6 100644 --- a/official/c65472618.lua +++ b/official/c65472618.lua @@ -46,7 +46,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(bc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -70,11 +70,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsAttackBelow(2000) and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsAttackBelow(2000) and c:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) and not c:IsCode(id) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) diff --git a/official/c65475294.lua b/official/c65475294.lua index 57947d3ea6..837615906c 100644 --- a/official/c65475294.lua +++ b/official/c65475294.lua @@ -1,11 +1,12 @@ --味方殺しの女騎士 +--The Unfriendly Amazon local s,id=GetID() function s.initial_effect(c) --cost local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.costcon) @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.costcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.costop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -23,4 +24,4 @@ function s.costop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(c,REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c65477143.lua b/official/c65477143.lua index fed21bc533..a67a326ede 100644 --- a/official/c65477143.lua +++ b/official/c65477143.lua @@ -40,7 +40,7 @@ end s.listed_series={SET_ABYSS_SCRIPT} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c65496056.lua b/official/c65496056.lua index 67a464fc14..f3e1172cf1 100644 --- a/official/c65496056.lua +++ b/official/c65496056.lua @@ -1,4 +1,5 @@ --コダロス +--Codarus local s,id=GetID() function s.initial_effect(c) --send to grave @@ -33,4 +34,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65496951.lua b/official/c65496951.lua index 892b27b2e4..17905d8d3a 100644 --- a/official/c65496951.lua +++ b/official/c65496951.lua @@ -62,4 +62,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp,angello_or_dimonno) --Additional param Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c65500515.lua b/official/c65500515.lua index 2451e2a194..1b7fe7efd8 100644 --- a/official/c65500515.lua +++ b/official/c65500515.lua @@ -47,7 +47,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(at:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1) Duel.SpecialSummonComplete() end @@ -58,4 +58,4 @@ end function s.tgcon(e) local seq=e:GetHandler():GetSequence() return seq==0 or seq==4 -end +end \ No newline at end of file diff --git a/official/c65503206.lua b/official/c65503206.lua index b04affd5b4..fea9583835 100644 --- a/official/c65503206.lua +++ b/official/c65503206.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.destg) @@ -80,4 +80,4 @@ end function s.synlimit(e,c) if not c then return false end return not c:IsSetCard(SET_SCRAP) -end +end \ No newline at end of file diff --git a/official/c65515667.lua b/official/c65515667.lua index d193055f3b..ba4ed49a8e 100644 --- a/official/c65515667.lua +++ b/official/c65515667.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfRevealCost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.sumtg) e1:SetOperation(s.sumop) c:RegisterEffect(e1) diff --git a/official/c65518099.lua b/official/c65518099.lua index c18a303d8f..c819e5431b 100644 --- a/official/c65518099.lua +++ b/official/c65518099.lua @@ -1,4 +1,5 @@ --クリフォート・ツール +--Qliphort Scout local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -19,22 +20,18 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_PZONE) e3:SetCountLimit(1) - e3:SetCost(s.cost) + e3:SetCost(Cost.PayLP(800)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} s.listed_names={id} function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xaa) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) + return not c:IsSetCard(SET_QLI) end function s.filter(c) - return c:IsSetCard(0xaa) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_QLI) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -48,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c6552938.lua b/official/c6552938.lua index c7bafff42f..ddee7fb021 100644 --- a/official/c6552938.lua +++ b/official/c6552938.lua @@ -1,6 +1,5 @@ --RR-ラダー・ストリクス --Raidraptor - Rudder Strix - local s,id=GetID() function s.initial_effect(c) --If normal summoned, inflict 600 damage @@ -31,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0xba) and e:GetHandler():IsPreviousLocation(LOCATION_HAND) + return re and re:GetHandler():IsSetCard(SET_RAIDRAPTOR) and e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,7 +43,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -68,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e1:SetValue(aux.imval1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c6552971.lua b/official/c6552971.lua index 95563bcc00..fa3b992ffb 100644 --- a/official/c6552971.lua +++ b/official/c6552971.lua @@ -1,5 +1,5 @@ --めぐり-Ai- ---A.I Meet You +--A.I. Meet You --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c65536818.lua b/official/c65536818.lua index 395aedc03f..0276265cfb 100644 --- a/official/c65536818.lua +++ b/official/c65536818.lua @@ -37,9 +37,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.thfilter(c) - return c:IsSetCard(0x9e) and c:IsAbleToHand() + return c:IsSetCard(SET_YANG_ZING) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -73,7 +73,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -82,7 +82,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_YANG_ZING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -97,4 +97,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65549080.lua b/official/c65549080.lua index 8fd67d1ac2..8a608afcc4 100644 --- a/official/c65549080.lua +++ b/official/c65549080.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x37} +s.listed_series={SET_MIST_VALLEY} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x37) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_MIST_VALLEY) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) if c==nil then return true end @@ -45,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(1700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c65563871.lua b/official/c65563871.lua index 7a58483c9c..b6863073b3 100644 --- a/official/c65563871.lua +++ b/official/c65563871.lua @@ -39,12 +39,12 @@ function s.initial_effect(c) e3:SetOperation(s.recop2) c:RegisterEffect(e3) end -s.listed_series={0x1157} +s.listed_series={SET_SUNAVALON} function s.matfilter(c,lc,st,tp) return c:IsRace(RACE_PLANT,lc,st,tp) and c:IsType(TYPE_NORMAL,lc,st,tp) end function s.cfilter(c,tp,rp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) + return c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp,rp) @@ -59,7 +59,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.recfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) + return c:IsFaceup() and c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.recfilter(chkc) end diff --git a/official/c6556909.lua b/official/c6556909.lua index 0f2c307470..579e0d3b27 100644 --- a/official/c6556909.lua +++ b/official/c6556909.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(CARD_REDEYES_B_DRAGON) c:RegisterEffect(e1) --Special Summon @@ -18,10 +18,10 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) e2:SetCountLimit(1,{id,0}) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -39,27 +39,22 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_REDEYES_B_DRAGON,id} -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c65569724.lua b/official/c65569724.lua index 9d431cf904..3352626704 100644 --- a/official/c65569724.lua +++ b/official/c65569724.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c65589010.lua b/official/c65589010.lua index 70c9a0a15c..8085d4a6ca 100644 --- a/official/c65589010.lua +++ b/official/c65589010.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x146)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DOGMATIKA)) e2:SetValue(s.tgval) c:RegisterEffect(e2) --destroy @@ -42,12 +42,12 @@ function s.initial_effect(c) e4:SetOperation(s.gyop) c:RegisterEffect(e4) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} function s.tgval(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and re:GetHandler():IsSummonLocation(LOCATION_EXTRA) + return re:IsMonsterEffect() and re:GetHandler():IsSpecialSummoned() and re:GetHandler():IsSummonLocation(LOCATION_EXTRA) end function s.check(c,tp) - return c and c:IsControler(tp) and c:IsSetCard(0x146) + return c and c:IsControler(tp) and c:IsSetCard(SET_DOGMATIKA) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttackTarget()~=nil @@ -85,4 +85,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65591858.lua b/official/c65591858.lua index f4f407800b..31e29da7b8 100644 --- a/official/c65591858.lua +++ b/official/c65591858.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.counterfilter(c) - return c:IsSetCard(0x70) + return c:IsSetCard(SET_CHRONOMALY) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -25,17 +25,17 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x70) + return not c:IsSetCard(SET_CHRONOMALY) end function s.filter(c,e,tp) - return c:GetLevel()==5 and c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==5 and c:IsSetCard(SET_CHRONOMALY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65612386.lua b/official/c65612386.lua index 8375c50a54..0f92751528 100644 --- a/official/c65612386.lua +++ b/official/c65612386.lua @@ -1,4 +1,5 @@ --魔帝アングマール +--Angmarl the Fiendish Monarch local s,id=GetID() function s.initial_effect(c) --search @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.cfilter(c,tp) return c:IsSpell() and c:IsAbleToRemoveAsCost() @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c65612454.lua b/official/c65612454.lua index 305a513325..ccd5645220 100644 --- a/official/c65612454.lua +++ b/official/c65612454.lua @@ -1,4 +1,5 @@ --エレキューブ +--Wattcube local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_THUNDER)) @@ -15,7 +16,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_SZONE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(s.atkcost) + e4:SetCost(Cost.SelfToGrave) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) c:RegisterEffect(e4) @@ -23,10 +24,6 @@ end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_THUNDER) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_THUNDER)*100 end @@ -42,8 +39,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c65622692.lua b/official/c65622692.lua index 461104d681..58c9b90b7a 100644 --- a/official/c65622692.lua +++ b/official/c65622692.lua @@ -1,4 +1,5 @@ --Y-ドラゴン・ヘッド +--Y-Dragon Head local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,62651957)) @@ -13,4 +14,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -s.listed_names={62651957} +s.listed_names={62651957} \ No newline at end of file diff --git a/official/c65626958.lua b/official/c65626958.lua index df3df4c2df..e9c639983a 100644 --- a/official/c65626958.lua +++ b/official/c65626958.lua @@ -1,5 +1,5 @@ --極星獣グリンブルスティ ---Gullinbursti of the Nordic Beasts +--Nordic Beast Gullinbursti --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -36,9 +36,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.spfilter(c,e,tp) - return c:IsSetCard(0x42) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NORDIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x42) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_NORDIC) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65646587.lua b/official/c65646587.lua index 611ce8618f..b2d881a437 100644 --- a/official/c65646587.lua +++ b/official/c65646587.lua @@ -11,4 +11,4 @@ function s.fextra(e,tp,mg) if Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)==2 then return Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_PZONE,0,nil) end -end +end \ No newline at end of file diff --git a/official/c65664792.lua b/official/c65664792.lua index 04b419b671..1876072d72 100644 --- a/official/c65664792.lua +++ b/official/c65664792.lua @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local dg=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g) - if #dg>0 and Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)>0 then + if #dg>0 and Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then Duel.BreakEffect() local sg=aux.SelectUnselectGroup(g,e,tp,3,3,s.spcheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) diff --git a/official/c65676461.lua b/official/c65676461.lua index eadcfec0d0..abb212b6e8 100644 --- a/official/c65676461.lua +++ b/official/c65676461.lua @@ -1,6 +1,5 @@ --No.32 海咬龍シャーク・ドレイク --Number 32: Shark Drake - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,23 +14,18 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.atcon) - e1:SetCost(s.atcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=32 - function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return c==Duel.GetAttacker() and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetAttackTarget():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) end @@ -48,7 +42,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) Duel.SpecialSummonComplete() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -60,7 +54,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c65681983.lua b/official/c65681983.lua index 35aebfd856..f1014fd5e4 100644 --- a/official/c65681983.lua +++ b/official/c65681983.lua @@ -53,7 +53,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetLabel(code) e1:SetTarget(s.distg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -61,7 +61,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e2:SetLabel(code) e2:SetCondition(s.discon) e2:SetOperation(s.disop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=e1:Clone() e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) @@ -77,4 +77,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c65685470.lua b/official/c65685470.lua index e1a78beed3..1f960db0dc 100644 --- a/official/c65685470.lua +++ b/official/c65685470.lua @@ -1,7 +1,8 @@ --六武衆の御霊代 +--Spirit of the Six Samurai local s,id=GetID() function s.initial_effect(c) - aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3d),true,false) + aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_SIX_SAMURAI),true,false) --Atk up local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -26,7 +27,7 @@ function s.initial_effect(c) e1:SetOperation(s.drop) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.drcon(e,tp,eg,ep,ev,re,r,rp) return aux.IsUnionState(e) and e:GetHandler():GetEquipTarget()==eg:GetFirst() end @@ -40,4 +41,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6568731.lua b/official/c6568731.lua index 30376c2acb..7d7c7442b2 100644 --- a/official/c6568731.lua +++ b/official/c6568731.lua @@ -64,4 +64,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65687442.lua b/official/c65687442.lua index 0d73b23edb..5420b8817f 100644 --- a/official/c65687442.lua +++ b/official/c65687442.lua @@ -17,15 +17,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} s.listed_names={92182447} function s.filter(c,e,tp) - return c:IsSetCard(0x122) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VALKYRIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(function(e,re,dam,r,rp,rc) if r&REASON_BATTLE>0 then return 0 else return dam end end) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end end @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetOperation(s.tdop) Duel.RegisterEffect(e2,tp) end @@ -83,4 +83,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c65703851.lua b/official/c65703851.lua index 4124914976..b3ca7ca7ab 100644 --- a/official/c65703851.lua +++ b/official/c65703851.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return (loc==LOCATION_HAND or loc==LOCATION_GRAVE) and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() diff --git a/official/c65711558.lua b/official/c65711558.lua index 0d93c1e115..a5d70c8a19 100644 --- a/official/c65711558.lua +++ b/official/c65711558.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x137)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ANCIENT_WARRIORS)) e2:SetValue(500) c:RegisterEffect(e2) local e3=e2:Clone() @@ -45,18 +45,18 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.lfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x137,lc,sumtype,tp) and c:IsAttribute(ATTRIBUTE_WIND,lc,sumtype,tp) + return c:IsSetCard(SET_ANCIENT_WARRIORS,lc,sumtype,tp) and c:IsAttribute(ATTRIBUTE_WIND,lc,sumtype,tp) end function s.lcheck(g,lc,sumtype,tp) return g:IsExists(s.lfilter,1,nil,lc,sumtype,tp) end function s.thfilter(c) - return c:IsSetCard(0x137) and c:IsAbleToHand() + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -71,9 +71,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) @@ -91,4 +91,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65734501.lua b/official/c65734501.lua index 2fecd45103..ddb0da8ba5 100644 --- a/official/c65734501.lua +++ b/official/c65734501.lua @@ -1,5 +1,5 @@ --R-ACEエアホイスター ---Rescue-ACE Air Hoister +--Rescue-ACE Air Lifter --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -23,18 +23,18 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcond) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0x18c) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_RESCUE_ACE) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -49,15 +49,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcond(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) + return rp==1-tp and re:IsMonsterEffect() and re:GetActivateLocation()==LOCATION_MZONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x18c) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESCUE_ACE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c65737274.lua b/official/c65737274.lua index e6e9ac5060..17349a2db8 100644 --- a/official/c65737274.lua +++ b/official/c65737274.lua @@ -1,4 +1,5 @@ --ドラゴラド +--Dragard local s,id=GetID() function s.initial_effect(c) --spsummon @@ -67,11 +68,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(800) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c65741786.lua b/official/c65741786.lua index d4ac7492e3..d044646644 100644 --- a/official/c65741786.lua +++ b/official/c65741786.lua @@ -1,7 +1,6 @@ --I:Pマスカレーナ --I:P Masquerena --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -14,7 +13,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) @@ -34,7 +33,7 @@ function s.matfilter(c,lc,st,tp) return not c:IsType(TYPE_LINK,lc,st,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end @@ -64,7 +63,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(s.indval) e1:SetOwnerPlayer(ep) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) end function s.indval(e,re,rp) diff --git a/official/c65743242.lua b/official/c65743242.lua index 84f922faae..bf7738edbe 100644 --- a/official/c65743242.lua +++ b/official/c65743242.lua @@ -1,4 +1,5 @@ --地縛霊の誘い +--Call of the Earthbound local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.ChangeAttackTarget(tc) end -end +end \ No newline at end of file diff --git a/official/c65749035.lua b/official/c65749035.lua index c50d2e95ca..1195ebc3a8 100644 --- a/official/c65749035.lua +++ b/official/c65749035.lua @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if #rg>0 then Duel.Destroy(rg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65758454.lua b/official/c65758454.lua index 62453dbffe..9fcd3b10b9 100644 --- a/official/c65758454.lua +++ b/official/c65758454.lua @@ -1,4 +1,5 @@ --ガンバランサー +--Ganbara Lancer local s,id=GetID() function s.initial_effect(c) --spsummon @@ -17,14 +18,14 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c6579928.lua b/official/c6579928.lua index 2cb23af11d..5946920e26 100644 --- a/official/c6579928.lua +++ b/official/c6579928.lua @@ -54,5 +54,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c65810489.lua b/official/c65810489.lua index 6dd7e3214c..efae9f2bf7 100644 --- a/official/c65810489.lua +++ b/official/c65810489.lua @@ -29,4 +29,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c65815684.lua b/official/c65815684.lua index bba478336d..18ec944361 100644 --- a/official/c65815684.lua +++ b/official/c65815684.lua @@ -34,7 +34,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -52,4 +52,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if val>0 and c:IsRelateToEffect(e) and c:IsFaceup() then c:UpdateAttack(val,RESET_EVENT|RESETS_STANDARD_DISABLE) end -end +end \ No newline at end of file diff --git a/official/c65824822.lua b/official/c65824822.lua index 7c9567a994..23d72d047a 100644 --- a/official/c65824822.lua +++ b/official/c65824822.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -16,10 +16,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and rc:IsNormalSpell() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() Duel.ChangeTargetCard(ev,g) @@ -30,6 +26,6 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then local sg=g:RandomSelect(1-tp,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c65830223.lua b/official/c65830223.lua index f300afd6f5..4ebb86901e 100644 --- a/official/c65830223.lua +++ b/official/c65830223.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c,tp) - return c:IsMonster() and c:GetControler()==1-tp + return c:IsMonster() and c:IsControler(1-tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,tp) @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65844845.lua b/official/c65844845.lua index e5016fa383..5caa989793 100644 --- a/official/c65844845.lua +++ b/official/c65844845.lua @@ -1,4 +1,5 @@ --甲虫装機 ギガグリオル +--Inzektor Giga-Cricket local s,id=GetID() function s.initial_effect(c) --equip @@ -24,19 +25,19 @@ function s.initial_effect(c) e3:SetCode(EFFECT_PIERCE) c:RegisterEffect(e3) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.cfilter(c,tp) return c:IsRace(RACE_INSECT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c) end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -58,11 +59,11 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c65848811.lua b/official/c65848811.lua index 9d00a831b4..c9c59ee9d4 100644 --- a/official/c65848811.lua +++ b/official/c65848811.lua @@ -1,4 +1,5 @@ --H・C 強襲のハルベルト +--Heroic Challenger - Assault Halberd local s,id=GetID() function s.initial_effect(c) --special summon @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x6f} +s.listed_series={SET_HEROIC} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 @@ -36,7 +37,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c) - return c:IsSetCard(0x6f) and c:IsAbleToHand() + return c:IsSetCard(SET_HEROIC) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -49,4 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c65853758.lua b/official/c65853758.lua index 271228684e..a9771a2a8a 100644 --- a/official/c65853758.lua +++ b/official/c65853758.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.ctrltg) e3:SetOperation(s.ctrlop) c:RegisterEffect(e3) diff --git a/official/c65872270.lua b/official/c65872270.lua index 4664a4a41d..fc5183cf37 100644 --- a/official/c65872270.lua +++ b/official/c65872270.lua @@ -1,4 +1,5 @@ --イグナイト・バースト +--Igknight Burst local s,id=GetID() function s.initial_effect(c) --activate @@ -28,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end if s.descon(e,tp,eg,ep,ev,re,r,rp) and s.destg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -41,17 +42,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(tp) + and (Duel.IsMainPhase()) end function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -72,7 +73,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA,0,1,nil) end @@ -85,4 +86,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c65877963.lua b/official/c65877963.lua index de49a06df3..bbce9527d6 100644 --- a/official/c65877963.lua +++ b/official/c65877963.lua @@ -27,13 +27,13 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} s.listed_names={86758915} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x117) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -41,7 +41,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetOperation(s.regop) e1:SetLabel(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Lose 2500 LP in the End Phase local e2=Effect.CreateEffect(c) @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.damcon) e2:SetOperation(s.damop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(e1) Duel.RegisterEffect(e2,tp) end @@ -86,12 +86,12 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,lp-2500) end function s.costfilter(c) - return c:IsSetCard(0x117) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_IMPCANTATION) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c65878864.lua b/official/c65878864.lua index 964eea9eb3..5b02975bba 100644 --- a/official/c65878864.lua +++ b/official/c65878864.lua @@ -1,4 +1,5 @@ --使徒喰い虫 +--Nobleman-Eater Bug local s,id=GetID() function s.initial_effect(c) --flip @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg~=2 then return end Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65884091.lua b/official/c65884091.lua index 224116eb4e..5e39011cf1 100644 --- a/official/c65884091.lua +++ b/official/c65884091.lua @@ -1,6 +1,5 @@ --ヴェルズ・タナトス --Evilswarm Thanatos - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -14,15 +13,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -33,7 +28,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.efilter) c:RegisterEffect(e1) end diff --git a/official/c6588580.lua b/official/c6588580.lua index c5e88ee92b..f29195763a 100644 --- a/official/c6588580.lua +++ b/official/c6588580.lua @@ -41,6 +41,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local d=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x2)*200 + local d=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_GENEX)*200 Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c65892585.lua b/official/c65892585.lua index f480ce593d..5847cc57ad 100644 --- a/official/c65892585.lua +++ b/official/c65892585.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c6589707.lua b/official/c6589707.lua index efe2c0a77c..2abbc9f4bd 100644 --- a/official/c6589707.lua +++ b/official/c6589707.lua @@ -1,5 +1,5 @@ --地中界の厄災 ---Calamity Upon the Hidden City +--Terrors in the Hidden City --Scripted by DyXel local s,id=GetID() function s.initial_effect(c) @@ -53,7 +53,7 @@ end function s.flipop(e,tp,eg,ep,ev,re,r,rp) local fid=e:GetHandler():GetFieldID() --in case we have multiples, the id will not be enough for tc in eg:Iter() do - tc:RegisterFlagEffect(fid,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(fid,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c65898344.lua b/official/c65898344.lua index a8458c8991..670dedac8a 100644 --- a/official/c65898344.lua +++ b/official/c65898344.lua @@ -91,4 +91,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c65914127.lua b/official/c65914127.lua index ba398a1815..0ac692c401 100644 --- a/official/c65914127.lua +++ b/official/c65914127.lua @@ -21,19 +21,19 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.scltg) e2:SetOperation(s.sclop) c:RegisterEffect(e2) end function s.zones(e,tp,eg,ep,ev,re,r,rp) - local zone=0xff + local zone=0xff --all Spell/Trap zones if Duel.IsDuelType(DUEL_SEPARATE_PZONE) then return zone end local p0=Duel.CheckLocation(tp,LOCATION_PZONE,0) local p1=Duel.CheckLocation(tp,LOCATION_PZONE,1) if p0==p1 then return zone end - if p0 then zone=zone-0x1 end - if p1 then zone=zone-0x10 end + if p0 then zone=zone-0x1 end --remove the left most S/T zone + if p1 then zone=zone-0x10 end --remove the right most S/T zone return zone end function s.costfilter(c) diff --git a/official/c65952776.lua b/official/c65952776.lua index 991afc9f39..cdc1c3e61d 100644 --- a/official/c65952776.lua +++ b/official/c65952776.lua @@ -1,5 +1,5 @@ --光の聖剣ダンネル ---Dunnel, the Noble Arms of Light +--Dunnell, the Noble Arms of Light --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c65953423.lua b/official/c65953423.lua index 841a90037d..37cd4c51e6 100644 --- a/official/c65953423.lua +++ b/official/c65953423.lua @@ -1,7 +1,6 @@ --妖精伝姫-ラチカ --Fairy Tail - Rochka --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Opponent looks at top 3 cards of your deck, choose 1 to add to your hand diff --git a/official/c6595475.lua b/official/c6595475.lua index ba0c004bf8..d1a0f25e0e 100644 --- a/official/c6595475.lua +++ b/official/c6595475.lua @@ -13,20 +13,20 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54,0x59,0x82,0x8f} +s.listed_series={SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ZUBABA} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) end function s.filter(c) - return c:IsMonster() and (c:IsSetCard(0x54) or c:IsSetCard(0x59) or c:IsSetCard(0x82) or c:IsSetCard(0x8f)) and c:IsAbleToHand() + return c:IsMonster() and (c:IsSetCard(SET_GAGAGA) or c:IsSetCard(SET_GOGOGO) or c:IsSetCard(SET_DODODO) or c:IsSetCard(SET_ZUBABA)) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.rescon(sg,e,tp,mg) - local t={0x54,0x59,0x82,0x8f} + local t={SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ZUBABA} local count = 0 for i, set in ipairs(t) do if sg:IsExists(Card.IsSetCard,1,nil,set) then count = count + 1 end @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg==0 then return end Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) -end +end \ No newline at end of file diff --git a/official/c65956182.lua b/official/c65956182.lua index 231714a569..953e89f64f 100644 --- a/official/c65956182.lua +++ b/official/c65956182.lua @@ -1,16 +1,16 @@ --- 暗黒界の登極 --- Dark World Accession --- Scripted by Hatter +--暗黒界の登極 +--Dark World Accession +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Fusion Summon + --Fusion Summon local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),matfilter=s.matfilter,extrafil=s.fextra,extraop=s.extraop,extratg=s.extratg}) e1:SetDescription(aux.Stringid(id,0)) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) c:RegisterEffect(e1) - -- Add this card to the hand + --Add this card to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES) @@ -21,13 +21,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} function s.matfilter(c) return (c:IsLocation(LOCATION_HAND) and c:IsDiscardable(REASON_EFFECT+REASON_FUSION+REASON_MATERIAL)) or (c:IsOnField() and c:IsAbleToRemove()) end function s.checkmat(tp,sg,fc) - return fc:IsSetCard(0x6) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) + return fc:IsSetCard(SET_DARK_WORLD) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) end function s.fextra(e,tp,mg) if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return nil,s.checkmat end @@ -43,11 +43,11 @@ function s.extraop(e,tc,tp,sg) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE) Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.tgfilter(c) - return c:IsSetCard(0x6) and c:IsMonster() and c:IsDiscardable(REASON_EFFECT) + return c:IsSetCard(SET_DARK_WORLD) and c:IsMonster() and c:IsDiscardable(REASON_EFFECT) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -63,6 +63,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.BreakEffect() - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end end \ No newline at end of file diff --git a/official/c65959844.lua b/official/c65959844.lua index 12dc216f2c..73a004d705 100644 --- a/official/c65959844.lua +++ b/official/c65959844.lua @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.retcon(ag,e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) -end +end \ No newline at end of file diff --git a/official/c65961085.lua b/official/c65961085.lua index 6df1584d1a..f7b872522a 100644 --- a/official/c65961085.lua +++ b/official/c65961085.lua @@ -1,4 +1,5 @@ --魔導獣士 ルード +--Wheel of Prophecy local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.retop) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsRace(RACE_SPELLCASTER) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToDeck() + return c:IsFaceup() and c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToDeck() end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,7 +30,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x106e) and c:IsSpell() + return c:IsFaceup() and c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() end function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) @@ -38,6 +39,6 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end local g2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_REMOVED,0,nil) if #g2>0 then - Duel.SendtoGrave(g2,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g2,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c65961683.lua b/official/c65961683.lua index 0bdb77df7e..c480f9efcf 100644 --- a/official/c65961683.lua +++ b/official/c65961683.lua @@ -1,4 +1,5 @@ --ジュラック・ヴェルヒプト +--Jurrac Velphito local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +24,7 @@ function s.initial_effect(c) end function s.valop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsSummonType(SUMMON_TYPE_SYNCHRO) then return end + if not c:IsSynchroSummoned() then return end local g=c:GetMaterial() local tc=g:GetFirst() local atk=0 @@ -36,7 +37,7 @@ function s.valop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) @@ -55,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c65976795.lua b/official/c65976795.lua index 5a7de9e3dc..61151bf168 100644 --- a/official/c65976795.lua +++ b/official/c65976795.lua @@ -1,4 +1,5 @@ --Subterror Behemoth Stygokraken +--Subterror Behemoth Stygokraken local s,id=GetID() function s.initial_effect(c) --flip @@ -32,9 +33,9 @@ function s.initial_effect(c) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0x10ed} +s.listed_series={SET_SUBTERROR_BEHEMOTH} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x10ed) + return c:IsFaceup() and c:IsSetCard(SET_SUBTERROR_BEHEMOTH) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil) @@ -71,7 +72,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -79,4 +80,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c65984457.lua b/official/c65984457.lua index d179109b6f..2b216b985c 100644 --- a/official/c65984457.lua +++ b/official/c65984457.lua @@ -1,34 +1,31 @@ --剣闘獣トラケス +--Gladiator Beast Torax local s,id=GetID() function s.initial_effect(c) - --draw + --Draw 1 card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_PHASE+PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) + e1:SetCondition(s.drcon) + e1:SetCost(Cost.SelfToDeck) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) c:RegisterEffect(e1) end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)>0 and e:GetHandler():GetBattledGroupCount()>0 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) +function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) + return c:HasFlagEffect(id) and c:GetBattledGroupCount()>0 end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.spop(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end diff --git a/official/c65993085.lua b/official/c65993085.lua index eb8fc6519e..f903599161 100644 --- a/official/c65993085.lua +++ b/official/c65993085.lua @@ -1,4 +1,5 @@ --やりすぎた埋葬 +--Overdone Burial local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,7 +41,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SendtoGrave(cg,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(cg,REASON_DISCARD|REASON_COST) local lv=cg:GetFirst():GetLevel() e:SetLabel(lv) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -59,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -67,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return e:GetLabelObject()==c -end +end \ No newline at end of file diff --git a/official/c66002986.lua b/official/c66002986.lua index 0ae7bcb924..6823ff9ab8 100644 --- a/official/c66002986.lua +++ b/official/c66002986.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rmvrettg) e2:SetOperation(s.rmvretop) c:RegisterEffect(e2) diff --git a/official/c66011101.lua b/official/c66011101.lua index 523ddb230c..ea034abe43 100644 --- a/official/c66011101.lua +++ b/official/c66011101.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c66015185.lua b/official/c66015185.lua index a4f33e4ec3..e5b7de0644 100644 --- a/official/c66015185.lua +++ b/official/c66015185.lua @@ -1,6 +1,5 @@ --ツイン・トライアングル・ドラゴン --Twin Triangle Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -24,11 +23,7 @@ function s.mfilter(c,lc,sumtype,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON,lc,sumtype,tp) and not c:IsType(TYPE_TOKEN,lc,sumtype,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return e:GetHandler():IsLinkSummoned() end function s.filter(c,e,tp,zone) return c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) @@ -51,12 +46,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Cannot attack this turn local e3=Effect.CreateEffect(c) @@ -64,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() diff --git a/official/c66022706.lua b/official/c66022706.lua index 65fe1b35c1..a30d722af5 100644 --- a/official/c66022706.lua +++ b/official/c66022706.lua @@ -1,7 +1,6 @@ --翠嵐の機界騎士 --Mekk-Knight Green Horizon --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -26,8 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10c} - +s.listed_series={SET_MEKK_KNIGHT} function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -46,7 +44,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsRelateToBattle() and tc and tc:IsControler(1-tp) and c:GetColumnGroup():IsContains(tc) end function s.thfilter(c) - return c:IsSetCard(0x10c) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -60,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6602300.lua b/official/c6602300.lua index 508e0edff0..eea040427e 100644 --- a/official/c6602300.lua +++ b/official/c6602300.lua @@ -1,6 +1,5 @@ --重爆撃禽 ボム・フェネクス --Blaze Fenix, the Burning Bombardment Bird - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -28,17 +27,17 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local ct=Duel.GetFieldGroupCount(tp,0xc,0xc) + local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetFieldGroupCount(tp,0xc,0xc) + local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) Duel.Damage(p,ct*300,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c66023650.lua b/official/c66023650.lua index ed21c3e923..f7adce3dd2 100644 --- a/official/c66023650.lua +++ b/official/c66023650.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) end @@ -57,10 +57,10 @@ function s.valcheck(e,c) e:GetLabelObject():SetLabel(val) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and #(e:GetHandler():GetMaterial())==3 + return e:GetHandler():IsLinkSummoned() and #(e:GetHandler():GetMaterial())==3 end function s.spfilter(c,e,tp,rc) - return c:IsSetCard(0x114) and not c:IsRace(rc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsRace(rc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end @@ -75,13 +75,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.drcfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.drcfilter,1,nil,tp) end function s.drfilter(c) - return c:IsFaceup() and c:IsSetCard(0x114) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.drfilter,tp,LOCATION_MZONE,0,nil) @@ -98,5 +98,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(p,2,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c66059345.lua b/official/c66059345.lua index c7dcb14a8f..c44d41ff9c 100644 --- a/official/c66059345.lua +++ b/official/c66059345.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) - e2:SetCost(aux.PayLPCost(1500)) + e2:SetCost(Cost.PayLP(1500)) e2:SetTarget(s.xyztg) e2:SetOperation(s.xyzop) c:RegisterEffect(e2) diff --git a/official/c66066482.lua b/official/c66066482.lua index f82da02987..dc2a7ea87d 100644 --- a/official/c66066482.lua +++ b/official/c66066482.lua @@ -41,17 +41,17 @@ function s.initial_effect(c) e3:SetOperation(s.cfop) c:RegisterEffect(e3) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x56) + return ec:IsControler(tp) and ec:IsSetCard(SET_INZEKTOR) end function s.filter(c) - return c:IsSetCard(0x56) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_INZEKTOR) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.equipop(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) @@ -61,14 +61,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) end end function s.eqfilter(c,ec) - return c:IsFaceup() and c:GetEquipTarget()==ec and c:IsSetCard(0x56) + return c:IsFaceup() and c:GetEquipTarget()==ec and c:IsSetCard(SET_INZEKTOR) end function s.cfcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.eqfilter,1,nil,e:GetHandler()) @@ -81,4 +81,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ConfirmCards(tp,g) end -end +end \ No newline at end of file diff --git a/official/c66069967.lua b/official/c66069967.lua index 4b2cd5c816..6c4bba2804 100644 --- a/official/c66069967.lua +++ b/official/c66069967.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetValue(aux.indoval) c:RegisterEffect(e4) end -s.listed_series={0xcc} +s.listed_series={SET_PREDICTION_PRINCESS} s.listed_names={id} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -58,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter1(c) - return c:IsSetCard(0xcc) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PREDICTION_PRINCESS) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thfilter2(c) return c:IsRitualSpell() and c:IsAbleToHand() diff --git a/official/c66078354.lua b/official/c66078354.lua index 93a945a94e..b2b5be6db3 100644 --- a/official/c66078354.lua +++ b/official/c66078354.lua @@ -1,15 +1,15 @@ --- 遺跡の魔鉱戦士 --- Magicore Warrior of the Relics --- Scripted by Hatter +--遺跡の魔鉱戦士 +--Magicore Warrior of the Relics +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Cannot attack unless you control an "Adventurer Token" + --Cannot attack unless you control an "Adventurer Token" local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCondition(aux.NOT(s.bravecon)) c:RegisterEffect(e1) - -- Special Summon itself from the hand + --Special Summon itself from the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -20,11 +20,11 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Set Trap that lists "Adventurer Token" from the Deck + --Set Trap that lists "Adventurer Token" from the Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetCountLimit(1,{id,1}) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.setcon) diff --git a/official/c66084673.lua b/official/c66084673.lua index aa165b2088..4abb3ddd0b 100644 --- a/official/c66084673.lua +++ b/official/c66084673.lua @@ -1,4 +1,5 @@ --空炎星-サイチョウ +--Brotherhood of the Fire Fist - Rhino local s,id=GetID() function s.initial_effect(c) --attack up @@ -13,16 +14,16 @@ function s.initial_effect(c) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0x79,0x7c} +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetAttacker():IsControler(tp) and Duel.GetAttacker():IsSetCard(0x79)) - or (Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp) and Duel.GetAttackTarget():IsSetCard(0x79)) + return (Duel.GetAttacker():IsControler(tp) and Duel.GetAttacker():IsSetCard(SET_FIRE_FIST)) + or (Duel.GetAttackTarget() and Duel.GetAttackTarget():IsControler(tp) and Duel.GetAttackTarget():IsSetCard(SET_FIRE_FIST)) end function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsAbleToGraveAsCost() end function s.filter2(c) - return c:IsSetCard(0x79) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_FIRE_FIST) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 @@ -35,7 +36,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(g2:GetFirst():GetBaseAttack()) g1:Merge(g2) Duel.SendtoGrave(g1,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=Duel.GetAttacker() @@ -43,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c66094973.lua b/official/c66094973.lua index 17fe3f38ba..6c274e798c 100644 --- a/official/c66094973.lua +++ b/official/c66094973.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -68,7 +68,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_SET_AVAILABLE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -76,7 +76,7 @@ end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetFieldGroup(tp,LOCATION_HAND,0)==0 then return end - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then s.equipop(c,e,tp,tc) @@ -108,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c6609736.lua b/official/c6609736.lua index efbfc5a35d..00e6332f64 100644 --- a/official/c6609736.lua +++ b/official/c6609736.lua @@ -1,5 +1,5 @@ --No-P.U.N.K.ディア・ノート ---Noh-P.U.N.K. Dia Note +--Noh-P.U.N.K. Deer Note --Scripted by Yuno local s,id=GetID() function s.initial_effect(c) @@ -28,13 +28,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x173} +s.listed_series={SET_PUNK} --Special Summon (from hand) function s.tgyspcheck(c,rc,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rc:IsAbleToGrave() end function s.cfilter(c,e,tp,rc) - return c:IsSetCard(0x173) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_PUNK) and c:IsMonster() and not c:IsPublic() and (s.tgyspcheck(c,rc,e,tp) or s.tgyspcheck(rc,c,e,tp)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,7 +66,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x173) and not c:IsLevel(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PUNK) and not c:IsLevel(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -89,6 +89,6 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,id)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c66100045.lua b/official/c66100045.lua index 29a75b6b4b..81a0f0844e 100644 --- a/official/c66100045.lua +++ b/official/c66100045.lua @@ -1,4 +1,5 @@ --転生断絶 +--Transmigration Break local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,4 +15,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_TO_DECK_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c66102515.lua b/official/c66102515.lua index 41321ba568..a58037240a 100644 --- a/official/c66102515.lua +++ b/official/c66102515.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.discon) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.distg) e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) c:RegisterEffect(e2) diff --git a/official/c66104644.lua b/official/c66104644.lua index 1afd7eba4d..61a5c82482 100644 --- a/official/c66104644.lua +++ b/official/c66104644.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) - c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE+LOCATION_MZONE) + c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE|LOCATION_MZONE) Pendulum.AddProcedure(c) --Add counter to itself local e1=Effect.CreateEffect(c) @@ -68,7 +68,7 @@ end s.counter_place_list={COUNTER_SPELL} function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler()~=c then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:GetHandler()~=c then c:AddCounter(COUNTER_SPELL,1) end end @@ -117,7 +117,7 @@ function s.ctop2(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_SPELL,3,REASON_COST) end @@ -156,4 +156,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() c:AddCounter(COUNTER_SPELL,ct) end -end +end \ No newline at end of file diff --git a/official/c66127916.lua b/official/c66127916.lua index 2bffb6e72d..0ad34b0476 100644 --- a/official/c66127916.lua +++ b/official/c66127916.lua @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c66141736.lua b/official/c66141736.lua index e481cb5870..352cfbaa2b 100644 --- a/official/c66141736.lua +++ b/official/c66141736.lua @@ -25,18 +25,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) or (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_DRAGON)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -46,7 +46,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) --lizard check @@ -59,7 +59,7 @@ function s.lizfilter(e,c) return not (c:IsOriginalType(TYPE_SYNCHRO) and c:IsOriginalAttribute(ATTRIBUTE_DARK) and c:IsOriginalRace(RACE_DRAGON)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x57) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESONATOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -76,7 +76,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x57) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESONATOR) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -92,4 +92,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) if ft<2 or #g~=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c6614221.lua b/official/c6614221.lua index 0295c0699a..d1b2ed7413 100644 --- a/official/c6614221.lua +++ b/official/c6614221.lua @@ -1,4 +1,5 @@ --霧の王 +--Fog King local s,id=GetID() function s.initial_effect(c) --summon with 1 tribute @@ -67,10 +68,10 @@ function s.valcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE) c:RegisterEffect(e1) end end function s.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) -end +end \ No newline at end of file diff --git a/official/c66149377.lua b/official/c66149377.lua index 6639433fef..5f72b7a10e 100644 --- a/official/c66149377.lua +++ b/official/c66149377.lua @@ -1,5 +1,5 @@ --魔弾-ダンシング・ニードル ---Magibullet - Dancing Needle +--Magical Musket - Dancing Needle --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x108} +s.listed_series={SET_MAGICAL_MUSKET} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x108) + return c:IsFaceup() and c:IsSetCard(SET_MAGICAL_MUSKET) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) diff --git a/official/c66156348.lua b/official/c66156348.lua index dda1046d3e..006b75f0dc 100644 --- a/official/c66156348.lua +++ b/official/c66156348.lua @@ -1,9 +1,9 @@ --- 竜皇神話 --- Dragon King's Myth --- Scripted by Hatter +--竜皇神話 +--Saga of the Dragon Emperor +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Double ATK + --Double ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -12,11 +12,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -24,14 +24,11 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsRace(RACE_DRAGON) end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),tp,LOCATION_MZONE,0,1,nil) end @@ -42,15 +39,15 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end local c=e:GetHandler() - -- Double ATK + --Double ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),tp,0,LOCATION_MZONE,1,nil) then - -- Cannot negate activation of effects + --Cannot negate activation of effects local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetType(EFFECT_TYPE_FIELD) @@ -58,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_INACTIVATE) e2:SetRange(LOCATION_MZONE) e2:SetValue(function(e,ct) return e:GetHandler()==Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT):GetHandler() end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -67,13 +64,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end diff --git a/official/c66165755.lua b/official/c66165755.lua index 11c9b9d89b..2af66df1eb 100644 --- a/official/c66165755.lua +++ b/official/c66165755.lua @@ -1,12 +1,11 @@ --A・ジェネクス・アクセル --Genex Ally Axel - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Synchro summon procedure - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GENEX),1,1,Synchro.NonTuner(nil),1,99) --Special summon 1 level 4 or lower machine monster from GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -20,11 +19,10 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2} - +s.listed_series={SET_GENEX} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -46,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(tc:GetTextAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) --Cannot attack directly local e2=Effect.CreateEffect(e:GetHandler()) @@ -54,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e2) --Destroy it during end phase local e3=Effect.CreateEffect(e:GetHandler()) @@ -63,13 +61,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCondition(s.rmcon) e3:SetOperation(s.rmop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) e3:SetCountLimit(1) tc:RegisterEffect(e3) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) diff --git a/official/c6616912.lua b/official/c6616912.lua index aa6b384355..f36465d692 100644 --- a/official/c6616912.lua +++ b/official/c6616912.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_TODECK) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.tdcon) @@ -51,7 +51,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetProperty(EFFECT_FLAG_REPEAT) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) @@ -89,7 +89,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.rtdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -98,7 +98,6 @@ end function s.rtdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAbleToDeck() then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c66171432.lua b/official/c66171432.lua index 7a633c3efd..fe82fb1067 100644 --- a/official/c66171432.lua +++ b/official/c66171432.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c,e,tp) - return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) @@ -57,18 +57,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -103,4 +103,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66192538.lua b/official/c66192538.lua index 6ebb18069d..89efcd2d5f 100644 --- a/official/c66192538.lua +++ b/official/c66192538.lua @@ -26,16 +26,16 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg2) e2:SetOperation(s.negop2) c:RegisterEffect(e2) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.negcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return a:IsControler(tp) and a:IsSetCard(0x135) or at and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x135) + return a:IsControler(tp) and a:IsSetCard(SET_IGNISTER) or at and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(SET_IGNISTER) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -65,7 +65,7 @@ function s.negop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -77,4 +77,4 @@ function s.negop2(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c66194206.lua b/official/c66194206.lua index 0d3816d57d..bc2de3e498 100644 --- a/official/c66194206.lua +++ b/official/c66194206.lua @@ -1,4 +1,5 @@ --ライトロードの裁き +--Lightsworn Judgment local s,id=GetID() function s.initial_effect(c) --activate @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} s.listed_names={57774843} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToDeck() end @@ -30,11 +31,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then c:CancelToGrave() - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x38) + return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_LIGHTSWORN) and (r&REASON_EFFECT)~=0 end function s.thfilter(c) @@ -50,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c66214679.lua b/official/c66214679.lua index d263047ae3..f237461938 100644 --- a/official/c66214679.lua +++ b/official/c66214679.lua @@ -17,8 +17,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.IsMainPhase() - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.filter(c,e,tp) return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -36,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66226132.lua b/official/c66226132.lua index d3f785e7c9..9bbd4d0fbd 100644 --- a/official/c66226132.lua +++ b/official/c66226132.lua @@ -32,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCondition(aux.bdocon) e1:SetOperation(s.drop) tc:RegisterEffect(e1) @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c6622715.lua b/official/c6622715.lua index 153282aae1..ee80305ae2 100644 --- a/official/c6622715.lua +++ b/official/c6622715.lua @@ -36,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) a:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -53,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(b) e3:SetRange(LOCATION_MZONE) e3:SetOperation(s.atkop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e3) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -74,6 +74,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(b:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c66235877.lua b/official/c66235877.lua index 8d5535d447..75241eed27 100644 --- a/official/c66235877.lua +++ b/official/c66235877.lua @@ -28,13 +28,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.material_setcode=0x45 +s.material_setcode=SET_ARCHFIEND function s.disop(e,tp,eg,ep,ev,re,r,rp) if re:IsActiveType(TYPE_FLIP) then Duel.NegateEffect(ev) end - if re:IsActiveType(TYPE_TRAP) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then + if re:IsTrapEffect() and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if g and g:IsContains(e:GetHandler()) then Duel.NegateEffect(ev) end end -end +end \ No newline at end of file diff --git a/official/c66236707.lua b/official/c66236707.lua index d882c2e186..742cfe9bd6 100644 --- a/official/c66236707.lua +++ b/official/c66236707.lua @@ -54,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6625096.lua b/official/c6625096.lua index 76585bfff5..efa1ff4a34 100644 --- a/official/c6625096.lua +++ b/official/c6625096.lua @@ -1,4 +1,5 @@ --鰤っ子姫 +--Beautunaful Princess local s,id=GetID() function s.initial_effect(c) --spsummon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,10 +18,6 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_FISH) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66262416.lua b/official/c66262416.lua index 040eff25d9..4a01d594fc 100644 --- a/official/c66262416.lua +++ b/official/c66262416.lua @@ -1,6 +1,5 @@ --D-HERO ドリームガイ --Destiny HERO - Dreamer - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -16,13 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xc008} - +s.listed_series={SET_DESTINY_HERO} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsControler(tp) and tc:IsSetCard(0xc008) + return tc and tc:IsControler(tp) and tc:IsSetCard(SET_DESTINY_HERO) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -39,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end --Banish it if it leaves the field @@ -48,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) --Take no battle damage from this battle @@ -57,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,0) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) end end \ No newline at end of file diff --git a/official/c6628343.lua b/official/c6628343.lua index ecec7cab76..bf616eaf02 100644 --- a/official/c6628343.lua +++ b/official/c6628343.lua @@ -1,4 +1,5 @@ --開闢の騎士 +--Beginning Knight local s,id=GetID() function s.initial_effect(c) --gain @@ -22,13 +23,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10cf} +s.listed_series={SET_BLACK_LUSTER_SOLDIER} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x10cf) + return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,SET_BLACK_LUSTER_SOLDIER) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x10cf) + local g=eg:Filter(Card.IsSetCard,nil,SET_BLACK_LUSTER_SOLDIER) local rc=g:GetFirst() if not rc then return end local e1=Effect.CreateEffect(rc) @@ -40,7 +41,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(rc) e2:SetDescription(aux.Stringid(id,1)) @@ -48,17 +49,17 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCondition(s.atcon) e2:SetOperation(s.atop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) if not rc:IsType(TYPE_EFFECT) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e3,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end @@ -83,7 +84,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) end function s.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand() + return c:IsRitualSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -96,4 +97,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c66288028.lua b/official/c66288028.lua index 0191a5f13e..f7e5331bc7 100644 --- a/official/c66288028.lua +++ b/official/c66288028.lua @@ -1,4 +1,5 @@ --マッシブ・ウォリアー +--Fortress Warrior local s,id=GetID() function s.initial_effect(c) --battle indes @@ -19,4 +20,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c66290900.lua b/official/c66290900.lua index 775ce308fc..5ee02b127a 100644 --- a/official/c66290900.lua +++ b/official/c66290900.lua @@ -4,19 +4,19 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x19),Card.IsAbleToDeck,s.fextra,Fusion.ShuffleMaterial,nil,nil,nil,0,nil,FUSPROC_NOTFUSION|FUSPROC_LISTEDMATS) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GLADIATOR),Card.IsAbleToDeck,s.fextra,Fusion.ShuffleMaterial,nil,nil,nil,0,nil,FUSPROC_NOTFUSION|FUSPROC_LISTEDMATS) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.condition) e1:SetCost(s.cost) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_ATTACK,s.counterfilter) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.counterfilter(c) - return c:IsSetCard(0x19) + return c:IsSetCard(SET_GLADIATOR) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_ATTACK)==0 end @@ -26,7 +26,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -35,4 +35,4 @@ function s.atktg(e,c) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,nil) -end +end \ No newline at end of file diff --git a/official/c66309175.lua b/official/c66309175.lua index 53d3114756..378089b1bc 100644 --- a/official/c66309175.lua +++ b/official/c66309175.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,{id,0}) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) diff --git a/official/c66322203.lua b/official/c66322203.lua index 304c258845..335be7f9eb 100644 --- a/official/c66322203.lua +++ b/official/c66322203.lua @@ -19,14 +19,14 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_FA) and c:IsLevelAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -42,8 +42,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c66331855.lua b/official/c66331855.lua index 9e842cb930..0f2b61257e 100644 --- a/official/c66331855.lua +++ b/official/c66331855.lua @@ -1,4 +1,5 @@ --D・チャッカン +--Morphtronic Datatron local s,id=GetID() function s.initial_effect(c) --damagea @@ -53,4 +54,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66337215.lua b/official/c66337215.lua index cd2c926e3a..ff87d88fb6 100644 --- a/official/c66337215.lua +++ b/official/c66337215.lua @@ -1,4 +1,5 @@ --創世の預言者 +--Herald of Creation local s,id=GetID() function s.initial_effect(c) --salvage @@ -16,13 +17,13 @@ function s.initial_effect(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsLevelAbove(7) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66362965.lua b/official/c66362965.lua index 61af141293..a50986f341 100644 --- a/official/c66362965.lua +++ b/official/c66362965.lua @@ -1,4 +1,5 @@ --魔導ギガサイバー +--The Fiend Megacyber local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,4 +15,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)-Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)>=2 -end +end \ No newline at end of file diff --git a/official/c66367984.lua b/official/c66367984.lua index ddabe7eabd..2bbb7e4ebd 100644 --- a/official/c66367984.lua +++ b/official/c66367984.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c6637331.lua b/official/c6637331.lua index 3eb6a296cc..0f65375cdd 100644 --- a/official/c6637331.lua +++ b/official/c6637331.lua @@ -1,5 +1,5 @@ --深淵の獣ドルイドヴルム ---Byssted Druidwurm +--Bystial Druiswurm --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -40,12 +40,12 @@ function s.spfilter(c,tp) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.spfilter(chkc,tp) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.spfilter(chkc,tp) end local c=e:GetHandler() - if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) + if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) end @@ -60,7 +60,7 @@ function s.spquickcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end function s.tgfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToGrave() + return c:IsSpecialSummoned() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.tgfilter(chkc) end @@ -74,4 +74,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66378485.lua b/official/c66378485.lua index fba8db7758..baa01228f1 100644 --- a/official/c66378485.lua +++ b/official/c66378485.lua @@ -1,4 +1,5 @@ --ネオフレムベル・オリジン +--Neo Flamvell Origin local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,13 +11,13 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x2c} +s.listed_series={SET_FLAMVELL} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2c) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_FLAMVELL) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_GRAVE)<=3 -end +end \ No newline at end of file diff --git a/official/c66380357.lua b/official/c66380357.lua index d905b41e0d..9ca4863f95 100644 --- a/official/c66380357.lua +++ b/official/c66380357.lua @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} function s.filter(c,e,tp) - return c:IsSetCard(0x14a) and c:IsLinkMonster() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) + return c:IsSetCard(SET_APPLIANCER) and c:IsLinkMonster() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,fc) - local zone=fc:GetFreeLinkedZone()&0x1f - return c:IsSetCard(0x14a) and c:IsLinkMonster() and c:IsLink(1) + local zone=fc:GetFreeLinkedZone()&ZONES_MMZ + return c:IsSetCard(SET_APPLIANCER) and c:IsLinkMonster() and c:IsLink(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -35,7 +35,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local fid=e:GetHandler():GetFieldID() local c=Duel.GetFirstTarget() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ local count=s.zone_count(zone) local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,c) if #sg0 and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end end end @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetLabel(fid) e1:SetOperation(s.rmop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) Duel.RegisterEffect(e1,tp) end @@ -77,4 +77,4 @@ function s.zone_count(z) z=z&(z-1) end return c -end +end \ No newline at end of file diff --git a/official/c66386380.lua b/official/c66386380.lua index 05deb70be9..a153c32234 100644 --- a/official/c66386380.lua +++ b/official/c66386380.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e3) --Special Summon @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetOperation(s.ssop) c:RegisterEffect(e4) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -49,7 +49,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) @@ -68,7 +68,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:IsLevelAbove(5) + return c:IsFaceup() and c:IsSetCard(SET_HARPIE) and c:IsLevelAbove(5) end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) diff --git a/official/c66393507.lua b/official/c66393507.lua index 86e5798f12..742f122d90 100644 --- a/official/c66393507.lua +++ b/official/c66393507.lua @@ -45,14 +45,14 @@ function s.initial_effect(c) e5:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) c:RegisterEffect(e5) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_KRAWLER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -79,8 +79,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.indtg(e,c) - return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x104) + return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(SET_KRAWLER) end function s.damtg(e,c) - return c:IsSetCard(0x104) and c:GetBattleTarget()~=nil and e:GetHandler():GetLinkedGroup():IsContains(c) + return c:IsSetCard(SET_KRAWLER) and c:GetBattleTarget()~=nil and e:GetHandler():GetLinkedGroup():IsContains(c) end \ No newline at end of file diff --git a/official/c66395299.lua b/official/c66395299.lua index 02ae6eccb1..0f2b0e9fb0 100644 --- a/official/c66395299.lua +++ b/official/c66395299.lua @@ -1,4 +1,5 @@ --ドッペル・ゲイナー +--Doppelganger local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66401502.lua b/official/c66401502.lua index 02eddaf0a3..bc2fd0f7f0 100644 --- a/official/c66401502.lua +++ b/official/c66401502.lua @@ -95,4 +95,4 @@ function s.vsop(e,tp,eg,ep,ev,re,r,rp) if #cg==0 then return end Duel.Destroy(cg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66403530.lua b/official/c66403530.lua index 001311b923..c5df379b56 100644 --- a/official/c66403530.lua +++ b/official/c66403530.lua @@ -46,7 +46,7 @@ function s.initial_effect(c) e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e5:SetRange(LOCATION_REMOVED) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetCondition(s.spcon) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) @@ -54,7 +54,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) end function s.znval(e) - return ~(e:GetHandler():GetLinkedZone()&0x60) + return ~(e:GetHandler():GetLinkedZone()&ZONES_EMZ) end function s.atkval(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED)*200 @@ -79,7 +79,7 @@ end function s.spreg(e,tp,eg,ep,ev,re,r,rp) if re and re:GetHandler()==e:GetHandler() then e:SetLabel(Duel.GetTurnCount()) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -96,4 +96,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c66407907.lua b/official/c66407907.lua index fff140c7b6..ae19b2e92b 100644 --- a/official/c66407907.lua +++ b/official/c66407907.lua @@ -71,7 +71,7 @@ function s.linkspfilter(c,e,tp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,c,c:GetCode()) end function s.linksptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.linkspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.linkspfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.linkspop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c66413481.lua b/official/c66413481.lua index 481df9585e..bb9ca6c1e3 100644 --- a/official/c66413481.lua +++ b/official/c66413481.lua @@ -1,4 +1,5 @@ --炎王獣 ヤクシャ +--Fire King Avatar Yaksha local s,id=GetID() function s.initial_effect(c) --spsummon @@ -26,10 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x81} +s.listed_series={SET_FIRE_KING} function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) + and c:IsReason(REASON_EFFECT) and c:IsSetCard(SET_FIRE_KING) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -49,14 +50,14 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil) end + local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD|LOCATION_HAND,0,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66425726.lua b/official/c66425726.lua index 6e8b210338..3facb0ba1c 100644 --- a/official/c66425726.lua +++ b/official/c66425726.lua @@ -94,7 +94,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsType(TYPE_PENDULUM) and Duel.CheckPendulumZones(tp) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - if c:IsSummonType(SUMMON_TYPE_RITUAL) then + if c:IsRitualSummoned() then Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end end @@ -109,7 +109,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(c,REASON_RULE,nil,PLAYER_NONE) else local sg=Group.CreateGroup() - if c:IsSummonType(SUMMON_TYPE_RITUAL) then sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c) end + if c:IsRitualSummoned() then sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c) end if Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) and Duel.NegateEffect(ev) and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c66431519.lua b/official/c66431519.lua index 0f04befffd..c71d97cfb6 100644 --- a/official/c66431519.lua +++ b/official/c66431519.lua @@ -68,7 +68,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local atk=tc:GetAttack()//2 local c=e:GetHandler() if Duel.Destroy(tc,REASON_EFFECT)>0 and c:IsFaceup() and c:IsRelateToEffect(e) then - c:UpdateAttack(atk,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + c:UpdateAttack(atk,RESETS_STANDARD_DISABLE_PHASE_END) end end end \ No newline at end of file diff --git a/official/c66436257.lua b/official/c66436257.lua index a2b73fa6e7..d744ff2fce 100644 --- a/official/c66436257.lua +++ b/official/c66436257.lua @@ -1,4 +1,5 @@ --ヴォルカニック・カウンター +--Volcanic Counter local s,id=GetID() function s.initial_effect(c) --remove @@ -24,8 +25,8 @@ function s.filter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:GetCode()~=id end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 + if not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) then Duel.Damage(1-tp,ev,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66451379.lua b/official/c66451379.lua index 9799aae6b0..45c2d1b05d 100644 --- a/official/c66451379.lua +++ b/official/c66451379.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re and re:IsActiveType(TYPE_SPELL))) + return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re and re:IsSpellEffect())) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -38,7 +38,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -47,7 +47,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Destroy local e3=Effect.CreateEffect(c) @@ -55,13 +55,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EVENT_LEAVE_FIELD_P) e3:SetOperation(s.checkop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e4:SetCode(EVENT_LEAVE_FIELD) e4:SetOperation(s.desop) - e4:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD) + e4:SetReset(RESET_EVENT|RESET_OVERLAY|RESET_TOFIELD) e4:SetLabelObject(e3) c:RegisterEffect(e4) end diff --git a/official/c66457138.lua b/official/c66457138.lua index b0ec788080..9dd1072d66 100644 --- a/official/c66457138.lua +++ b/official/c66457138.lua @@ -1,4 +1,5 @@ --ファーニマル・ライオ +--Fluffal Leo local s,id=GetID() function s.initial_effect(c) --atk @@ -15,7 +16,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c66457407.lua b/official/c66457407.lua index 2478e81544..6767a6230b 100644 --- a/official/c66457407.lua +++ b/official/c66457407.lua @@ -35,7 +35,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c66472129.lua b/official/c66472129.lua index 7acee72c0a..ea5108b155 100644 --- a/official/c66472129.lua +++ b/official/c66472129.lua @@ -1,4 +1,4 @@ ---Japanese name +--ディプシーデビル --Dipsea Fiend --Scripted by Hatter local s,id=GetID() @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(attr) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil,e,tp,attr) if c:IsAttribute(attr) and target_player==1-tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c66499018.lua b/official/c66499018.lua index a1e2233d78..3dc1ede079 100644 --- a/official/c66499018.lua +++ b/official/c66499018.lua @@ -1,6 +1,5 @@ --焔虎 --Flame Tiger - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -31,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -47,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c66500065.lua b/official/c66500065.lua index 80edf58ec0..6f66470228 100644 --- a/official/c66500065.lua +++ b/official/c66500065.lua @@ -1,4 +1,5 @@ --地竜星-ヘイカン +--Bi'an, Earth of the Yang Zing local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1) e2:SetCondition(s.sccon) e2:SetTarget(s.sctg) @@ -35,14 +36,14 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -56,12 +57,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.mfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9e) + return c:IsFaceup() and c:IsSetCard(SET_YANG_ZING) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -91,6 +90,6 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c66506689.lua b/official/c66506689.lua index 807cc26ddd..97042c10ff 100644 --- a/official/c66506689.lua +++ b/official/c66506689.lua @@ -1,4 +1,5 @@ --ブリキの大公 +--Tin Archduke local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -14,15 +15,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsCanChangePosition() end @@ -38,4 +35,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) end -end +end \ No newline at end of file diff --git a/official/c66518509.lua b/official/c66518509.lua index 09e56554ac..77896af378 100644 --- a/official/c66518509.lua +++ b/official/c66518509.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c66518841.lua b/official/c66518841.lua index e5083b8707..faabec6c4f 100644 --- a/official/c66518841.lua +++ b/official/c66518841.lua @@ -1,4 +1,5 @@ --プライドの咆哮 +--Prideful Roar local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,8 +36,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(dif+300) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c66523544.lua b/official/c66523544.lua index 47761e4a85..1f094bfe46 100644 --- a/official/c66523544.lua +++ b/official/c66523544.lua @@ -1,4 +1,5 @@ --超次元ロボ ギャラクシー・デストロイヤー +--Superdimensional Robot Galaxy Destroyer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,17 +12,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end @@ -35,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.climit(e,lp,tp) return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c66526672.lua b/official/c66526672.lua index cecde1c020..dcf927f026 100644 --- a/official/c66526672.lua +++ b/official/c66526672.lua @@ -1,4 +1,5 @@ --悪夢の迷宮 +--Labyrinth of Nightmare local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ end function s.posop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,Duel.GetTurnPlayer(),LOCATION_MZONE,0,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) -end +end \ No newline at end of file diff --git a/official/c66532962.lua b/official/c66532962.lua index 37799c9283..6ac3a54f62 100644 --- a/official/c66532962.lua +++ b/official/c66532962.lua @@ -41,7 +41,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) Duel.AdjustInstantly(c) if prev_atk>=c:GetAttack() then return end @@ -50,4 +50,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c66540884.lua b/official/c66540884.lua index cddb015a8c..606efa4054 100644 --- a/official/c66540884.lua +++ b/official/c66540884.lua @@ -1,4 +1,5 @@ --トリック・デーモン +--Archfiend Heiress local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE) end function s.thfilter(c) - return c:IsSetCard(0x45) and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_ARCHFIEND) and c:GetCode()~=id and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c66547759.lua b/official/c66547759.lua index 16eebefc17..cfc1179963 100644 --- a/official/c66547759.lua +++ b/official/c66547759.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.discon) - e3:SetCost(s.discost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -57,13 +57,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) + return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect()) and re:GetHandler()~=e:GetHandler() end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -72,4 +68,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66569334.lua b/official/c66569334.lua index ca8b514d1c..680a0bf232 100644 --- a/official/c66569334.lua +++ b/official/c66569334.lua @@ -1,9 +1,9 @@ --- 悪醒師ナイトメルト --- Nightmell the Dark Bonder --- Scripted by Hatter +--悪醒師ナイトメルト +--Nightmell the Dark Bonder +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -46,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66570171.lua b/official/c66570171.lua index 45b0e0f747..ad1086bd06 100644 --- a/official/c66570171.lua +++ b/official/c66570171.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.actg) e3:SetOperation(s.acop) c:RegisterEffect(e3) @@ -32,11 +32,10 @@ function s.filter(c,tp) return c:IsCode(4064256) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) end function s.actg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst() Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) -end - +end \ No newline at end of file diff --git a/official/c66574418.lua b/official/c66574418.lua index f037a304eb..240081bce7 100644 --- a/official/c66574418.lua +++ b/official/c66574418.lua @@ -1,4 +1,5 @@ --伝説の黒石 +--The Black Stone of Legend local s,id=GetID() function s.initial_effect(c) --spsummon @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -22,13 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x3b} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_RED_EYES} function s.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -45,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsAbleToDeck() + return c:IsSetCard(SET_RED_EYES) and c:IsLevelBelow(7) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -59,8 +56,8 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 + and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6659193.lua b/official/c6659193.lua index c7bc1b0573..b361dfdb9d 100644 --- a/official/c6659193.lua +++ b/official/c6659193.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.atkcon) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetOperation(s.atkop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) end @@ -65,7 +65,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c66594927.lua b/official/c66594927.lua index 4e686879e9..3ccdc0c002 100644 --- a/official/c66594927.lua +++ b/official/c66594927.lua @@ -1,5 +1,5 @@ --機皇統制 ---Meklord Control +--Meklord Deflection --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -25,13 +25,13 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.atkfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x13) and (c:GetAttack()~=c:GetBaseAttack() - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x13),tp,LOCATION_MZONE,0,1,c)) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) and (c:GetAttack()~=c:GetBaseAttack() + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MEKLORD),tp,LOCATION_MZONE,0,1,c)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsSetCard(0x13) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsSetCard(SET_MEKLORD) end if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local tc=Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then local atk=0 - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x13),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_MEKLORD),tp,LOCATION_MZONE,0,nil) for bc in aux.Next(g) do atk=atk+bc:GetBaseAttack() end @@ -49,18 +49,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x13) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -71,4 +71,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66604523.lua b/official/c66604523.lua index af65979008..2169d7c577 100644 --- a/official/c66604523.lua +++ b/official/c66604523.lua @@ -1,4 +1,5 @@ --エクシーズ・リバーサル +--Xyz Reversal local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then Duel.SwapControl(a,b) end -end +end \ No newline at end of file diff --git a/official/c66625883.lua b/official/c66625883.lua index deb8259289..5646884cfc 100644 --- a/official/c66625883.lua +++ b/official/c66625883.lua @@ -54,4 +54,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c66661678.lua b/official/c66661678.lua index 0bf546760d..c61a053274 100644 --- a/official/c66661678.lua +++ b/official/c66661678.lua @@ -1,6 +1,5 @@ --氷結界のロイヤル・ナイト --Royal Knight of the Ice Barrier - local s,id=GetID() function s.initial_effect(c) --Special summon 1 token to opponent's field @@ -16,7 +15,7 @@ function s.initial_effect(c) end s.listed_names={66661679} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -35,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end diff --git a/official/c66668900.lua b/official/c66668900.lua index 55d41100fe..8b6102290e 100644 --- a/official/c66668900.lua +++ b/official/c66668900.lua @@ -1,4 +1,5 @@ --アクアアクトレス・グッピー +--Aquaactress Guppy local s,id=GetID() function s.initial_effect(c) --spsummon @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x10cd} +s.listed_series={SET_AQUAACTRESS} function s.filter(c,e,tp) - return c:IsSetCard(0x10cd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AQUAACTRESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66675911.lua b/official/c66675911.lua index 9ede259e40..606f6737e0 100644 --- a/official/c66675911.lua +++ b/official/c66675911.lua @@ -1,7 +1,6 @@ --星なる影 ゲニウス --Nehshaddoll Genius --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -27,11 +26,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Shaddoll" archetype -s.listed_series={0x9d} - +s.listed_series={SET_SHADDOLL} --Check for "Shaddoll" monster function s.immfilter(c) - return c:IsSetCard(0x9d) and c:IsFaceup() + return c:IsSetCard(SET_SHADDOLL) and c:IsFaceup() end --Activation legality function s.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -52,13 +50,13 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end --Unaffected by other monster effects function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetHandler() + return te:IsMonsterEffect() and te:GetOwner()~=e:GetHandler() end --If sent to GY by card effect function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -81,7 +79,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c66690411.lua b/official/c66690411.lua index 633962b820..9a62ca06d4 100644 --- a/official/c66690411.lua +++ b/official/c66690411.lua @@ -1,4 +1,5 @@ --マインド・オン・エア +--Mind on Air local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_HAND) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c66698383.lua b/official/c66698383.lua index 151a5c080d..97c742f246 100644 --- a/official/c66698383.lua +++ b/official/c66698383.lua @@ -1,4 +1,5 @@ --Vermillion Dragon Mech +--Vermillion Dragon Mech local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -29,15 +30,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c,tp) - return (c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) or c:IsFaceup()) + return (c:IsLocation(LOCATION_HAND|LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true,true)) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,7 +57,7 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.thfilter(c) return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:IsAbleToHand() @@ -73,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66707058.lua b/official/c66707058.lua index 5a9a58593b..63739275e1 100644 --- a/official/c66707058.lua +++ b/official/c66707058.lua @@ -1,10 +1,11 @@ --ゴブリン暗殺部隊 +--Goblin Black Ops local s,id=GetID() function s.initial_effect(c) --to defense local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.poscon) @@ -28,6 +29,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c66712593.lua b/official/c66712593.lua index 47314f9cc7..929f02f885 100644 --- a/official/c66712593.lua +++ b/official/c66712593.lua @@ -1,4 +1,5 @@ --エレメント・ソルジャー +--Element Soldier local s,id=GetID() function s.initial_effect(c) --control @@ -35,11 +36,11 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c66712905.lua b/official/c66712905.lua index 7003dc32df..6cb45bbad1 100644 --- a/official/c66712905.lua +++ b/official/c66712905.lua @@ -1,15 +1,15 @@ --- 解呪の神碑 --- Mysterune of Dispel --- Scripted by Hatter +--解呪の神碑 +--Runick Dispelling +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1,e2=Effect.CreateMysteruneQPEffect(c,id,CATEGORY_TOGRAVE+CATEGORY_HANDES,s.tgtg,s.tgop,2,EFFECT_FLAG_DELAY,EVENT_TO_HAND) e1:SetCondition(s.tgcon) c:RegisterEffect(e1) c:RegisterEffect(e2) end -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.tgconfilter(c,tp) return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_DECK) end @@ -25,6 +25,6 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then local sg=g:RandomSelect(1-tp,1) - return #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)>0 + return #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD)>0 end end \ No newline at end of file diff --git a/official/c66719324.lua b/official/c66719324.lua index 23dc75e17c..d7c33cecdb 100644 --- a/official/c66719324.lua +++ b/official/c66719324.lua @@ -1,4 +1,5 @@ --恵みの雨 +--Rain of Mercy local s,id=GetID() function s.initial_effect(c) --recover @@ -17,4 +18,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(1-tp,1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66719533.lua b/official/c66719533.lua index eed434b26d..38ed33d31a 100644 --- a/official/c66719533.lua +++ b/official/c66719533.lua @@ -1,4 +1,5 @@ --アシンメタファイズ +--Asymmetaphys local s,id=GetID() function s.initial_effect(c) --activate @@ -37,9 +38,9 @@ function s.initial_effect(c) e4:SetOperation(s.posop) c:RegisterEffect(e4) end -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.drfilter(c) - return c:IsSetCard(0x105) and c:IsAbleToRemove() + return c:IsSetCard(SET_METAPHYS) and c:IsAbleToRemove() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -59,19 +60,19 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end end function s.effilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x105) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_METAPHYS) and c:IsControler(tp) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.effilter,1,nil,tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return s.effcon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetTurnPlayer()==tp + return s.effcon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsTurnPlayer(tp) end function s.atkfilter(c) - return c:IsFaceup() and not c:IsSetCard(0x105) + return c:IsFaceup() and not c:IsSetCard(SET_METAPHYS) end function s.posfilter(c) - return c:IsCanChangePosition() and not (c:IsFaceup() and c:IsSetCard(0x105)) + return c:IsCanChangePosition() and not (c:IsFaceup() and c:IsSetCard(SET_METAPHYS)) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -84,7 +85,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -105,4 +106,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c66722103.lua b/official/c66722103.lua index 39e9af5757..c8b69952f8 100644 --- a/official/c66722103.lua +++ b/official/c66722103.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,11 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return rp==1-tp and re:IsMonsterEffect() and e:GetHandler():IsSpecialSummoned() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -66,5 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c66727115.lua b/official/c66727115.lua index b4074e68f4..4acf23d756 100644 --- a/official/c66727115.lua +++ b/official/c66727115.lua @@ -1,4 +1,5 @@ --武神逐 +--Bujinfidel local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.rfilter(c,e,tp,ft) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) and (c:IsFaceup() or c:IsControler(tp)) + return c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) and (c:IsFaceup() or c:IsControler(tp)) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode(),e,tp) end function s.spfilter(c,code,e,tp) - return c:IsSetCard(0x88) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BUJIN) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -46,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66729231.lua b/official/c66729231.lua index 46d04fa53d..40fd5d36bb 100644 --- a/official/c66729231.lua +++ b/official/c66729231.lua @@ -1,4 +1,5 @@ --イビリチュア・ジールギガス +--Gishki Zielgigas local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -9,16 +10,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end +s.listed_series={SET_GISHKI} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) @@ -27,10 +24,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0x3a) and tc:IsMonster() then + if tc:IsSetCard(SET_GISHKI) and tc:IsMonster() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c66733743.lua b/official/c66733743.lua index 008e283db1..a14adb8ee6 100644 --- a/official/c66733743.lua +++ b/official/c66733743.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE+LOCATION_MZONE) + e2:SetRange(LOCATION_GRAVE|LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.reptg) e2:SetValue(s.repval) diff --git a/official/c66736715.lua b/official/c66736715.lua index b290f828d5..3cbe58823b 100644 --- a/official/c66736715.lua +++ b/official/c66736715.lua @@ -159,4 +159,4 @@ function s.penop2(e,tp,eg,ep,ev,re,r,rp,c,sg,og) Duel.HintSelection(c,true) Duel.HintSelection(rpz,true) end -end +end \ No newline at end of file diff --git a/official/c66740005.lua b/official/c66740005.lua index 9746a664f2..1be1a171ee 100644 --- a/official/c66740005.lua +++ b/official/c66740005.lua @@ -1,5 +1,5 @@ --空牙団の闘士 ブラーヴォ ---Blavo, Fighter of the Skyfang Brigade +--Bravo, Fighter Fur Hire local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,13 +45,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x114) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -64,7 +64,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) sc:RegisterEffect(e1) local e2=e1:Clone() @@ -72,5 +72,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) sc:RegisterEffect(e2) end end -end - +end \ No newline at end of file diff --git a/official/c66742250.lua b/official/c66742250.lua index 02385964fb..4da845d708 100644 --- a/official/c66742250.lua +++ b/official/c66742250.lua @@ -1,4 +1,5 @@ --アヌビスの呪い +--Curse of Anubis local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,12 +29,12 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_DEFENSE) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c66749546.lua b/official/c66749546.lua index 44f028c2e8..ccc28f3104 100644 --- a/official/c66749546.lua +++ b/official/c66749546.lua @@ -1,26 +1,26 @@ --- 氷水艇キングフィッシャー --- Icejade Creation Kingfisher --- Scripted by Hatter +--氷水艇キングフィッシャー +--Icejade Creation Kingfisher +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Equip + --Equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) - -- Attack while in defense position + --Attack while in defense position local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_DEFENSE_ATTACK) e2:SetCondition(s.atkcon) e2:SetValue(1) c:RegisterEffect(e2) - -- Return to hand + --Return to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) @@ -52,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Equip(tp,c,tc,true) - -- Equip limit + --Equip limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) diff --git a/official/c66750703.lua b/official/c66750703.lua index 6cd6e14a65..2dd8d2d113 100644 --- a/official/c66750703.lua +++ b/official/c66750703.lua @@ -1,7 +1,6 @@ --炎傑の梁山閣 --Fire Fortress atop Liang Peak --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Can hold Fire Fist Counters @@ -55,10 +54,9 @@ function s.initial_effect(c) c:RegisterEffect(e6) end s.counter_list={0x201} -s.listed_series={0x79} - +s.listed_series={SET_FIRE_FIST} function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x79) + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FIST) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.ctfilter,1,nil) then @@ -81,7 +79,7 @@ function s.op1(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetValue(1) e1:SetCondition(s.actcon) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actcon(e) @@ -121,14 +119,14 @@ function s.spfilter(c,e,tp) end function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.op3(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp) if #g>0 then diff --git a/official/c66752837.lua b/official/c66752837.lua index 8ae0fec570..291e706fcb 100644 --- a/official/c66752837.lua +++ b/official/c66752837.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_TO_GRAVE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) @@ -25,7 +25,7 @@ s.listed_names={id} function s.cfilter(c) return c:IsRace(RACE_DRAGON) and c:GetPreviousRaceOnField()==RACE_DRAGON and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsCode(id) + and c:IsReason(REASON_EFFECT|REASON_BATTLE) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) if eg:IsContains(e:GetHandler()) then return false end @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c66762372.lua b/official/c66762372.lua index a81efaa8a3..f4c9df5532 100644 --- a/official/c66762372.lua +++ b/official/c66762372.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) e3:SetValue(s.synlimit) c:RegisterEffect(e3) end -s.listed_series={0x79,0x7c} +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_FIST) and c:GetLevel()==4 and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -52,13 +52,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x79) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FIST) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsPreviousControler(tp) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c66765023.lua b/official/c66765023.lua index 48b2058901..b07684504b 100644 --- a/official/c66765023.lua +++ b/official/c66765023.lua @@ -24,8 +24,8 @@ end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp - and Duel.GetTurnPlayer()~=tp and e:GetHandler():GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + and Duel.IsTurnPlayer(1-tp) and e:GetHandler():GetFlagEffect(id)==0 end + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) return true end function s.effcon(e,tp,eg,ep,ev,re,r,rp) @@ -38,7 +38,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLE_DAMAGE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN) e1:SetCondition(s.wincon) e1:SetOperation(s.winop) c:RegisterEffect(e1) @@ -48,4 +48,4 @@ function s.wincon(e,tp,eg,ep,ev,re,r,rp) end function s.winop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(tp,WIN_REASON_FLYING_ELEPHANT) -end +end \ No newline at end of file diff --git a/official/c66768175.lua b/official/c66768175.lua index bd196abc6f..e0f2959cab 100644 --- a/official/c66768175.lua +++ b/official/c66768175.lua @@ -1,4 +1,5 @@ --EMバラード +--Performapal Ballad local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -25,14 +26,14 @@ function s.initial_effect(c) e2:SetOperation(s.atkop2) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local bc=Duel.GetAttackTarget() if not bc then return false end if tc:IsControler(1-tp) then bc,tc=tc,bc end e:SetLabelObject(bc) - return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x9f) + return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(SET_PERFORMAPAL) end function s.atkop1(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -42,17 +43,18 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) end end function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() - return a:IsControler(tp) and a:IsSetCard(0x9f) + return a:IsControler(tp) and a:IsSetCard(SET_PERFORMAPAL) end function s.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end function s.atkop2(e,tp,eg,ep,ev,re,r,rp) @@ -64,7 +66,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c66788016.lua b/official/c66788016.lua index 64151e97a6..7ea6c89b65 100644 --- a/official/c66788016.lua +++ b/official/c66788016.lua @@ -1,4 +1,5 @@ --地割れ +--Fissure local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) else Duel.Destroy(tg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c66789970.lua b/official/c66789970.lua index ae4d978f84..051c077ec8 100644 --- a/official/c66789970.lua +++ b/official/c66789970.lua @@ -32,11 +32,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -56,9 +56,9 @@ function s.cfilter(c) and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -73,4 +73,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66809920.lua b/official/c66809920.lua index 59d2ba2916..f495d77620 100644 --- a/official/c66809920.lua +++ b/official/c66809920.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) c:RegisterEffect(e2) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} s.listed_names={92182447} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return re and re:GetHandler():IsSpell() and e:GetHandler():IsPreviousLocation(LOCATION_HAND) @@ -50,7 +50,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x122) and not c:IsCode(id) + return c:IsSetCard(SET_VALKYRIE) and not c:IsCode(id) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -71,11 +71,10 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(rc:GetBaseAttack()) c:RegisterEffect(e1) end end -end - +end \ No newline at end of file diff --git a/official/c66816282.lua b/official/c66816282.lua index ab113ef6ef..8144dc3eee 100644 --- a/official/c66816282.lua +++ b/official/c66816282.lua @@ -1,4 +1,5 @@ --コアキメイル・ウォール +--Koa'ki Meiru Wall local s,id=GetID() function s.initial_effect(c) --cost @@ -20,14 +21,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -68,11 +69,7 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -85,4 +82,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66818682.lua b/official/c66818682.lua index 102a087bb3..a622d9f41e 100644 --- a/official/c66818682.lua +++ b/official/c66818682.lua @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66835946.lua b/official/c66835946.lua index 649db0195a..1467a770c7 100644 --- a/official/c66835946.lua +++ b/official/c66835946.lua @@ -1,4 +1,5 @@ --奇跡のピラミッド +--Pyramid of Wonders local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,4 +40,4 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66853752.lua b/official/c66853752.lua index 22b314c865..e1fe895438 100644 --- a/official/c66853752.lua +++ b/official/c66853752.lua @@ -1,6 +1,5 @@ --フィッシュボーグ-ランチャー --Fishborg Launcher - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -46,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c66863374.lua b/official/c66863374.lua index a2a880e166..a41616b464 100644 --- a/official/c66863374.lua +++ b/official/c66863374.lua @@ -36,7 +36,7 @@ function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsSetCard,1,nil,SET_GLADIATOR_BEAST,lc,sumtype,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) return c:IsSetCard(SET_GLADIATOR_BEAST) and c:IsAbleToHand() @@ -72,11 +72,11 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local rc=Duel.GetFirstTarget() if not rc or not rc:IsFaceup() or not rc:IsRelateToEffect(e) then return end - Duel.SendtoDeck(rc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if not rc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,rc:GetOriginalCodeRule()):GetFirst() if tc and Duel.SpecialSummon(tc,130,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c66865880.lua b/official/c66865880.lua index 7613d43d67..e15dc35f34 100644 --- a/official/c66865880.lua +++ b/official/c66865880.lua @@ -1,4 +1,5 @@ --マシュマロンのメガネ +--Marshmallon Glasses local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.con(e) end function s.atlimit(e,c) return c:IsFacedown() or c:GetCode()~=31305911 -end +end \ No newline at end of file diff --git a/official/c66870733.lua b/official/c66870733.lua index 4b9fb84abf..e81f70a92f 100644 --- a/official/c66870733.lua +++ b/official/c66870733.lua @@ -1,11 +1,11 @@ --氷の魔妖-雪女 リンク ---Icicle Mayakashi - Yukionna +--Yuki-Onna, the Ice Mayakashi local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) - -- link summon + --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x121),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MAYAKASHI),2,2) --untargetable local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.imfilter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) end @@ -55,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -63,5 +63,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(tc:GetDefense()/2) tc:RegisterEffect(e2) end -end - +end \ No newline at end of file diff --git a/official/c66889139.lua b/official/c66889139.lua index 7a2d833158..364f237da7 100644 --- a/official/c66889139.lua +++ b/official/c66889139.lua @@ -1,8 +1,9 @@ --竜騎士ガイア +--Gaia the Dragon Champion local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,6368038,28279543) end -s.material_setcode=0xbd +s.material_setcode=SET_GAIA_THE_FIERCE_KNIGHT \ No newline at end of file diff --git a/official/c6691855.lua b/official/c6691855.lua index 3c0d67510a..ce2ab4b104 100644 --- a/official/c6691855.lua +++ b/official/c6691855.lua @@ -1,4 +1,5 @@ --鎖付き尖盾 +--Spikeshield with Chain local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) @@ -29,14 +27,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --def local e2=Effect.CreateEffect(c) @@ -44,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCondition(s.defcon) e2:SetValue(s.defval) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Equip limit local e3=Effect.CreateEffect(c) @@ -52,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) @@ -65,4 +63,4 @@ function s.defcon(e) end function s.defval(e,c) return c:GetAttack() -end +end \ No newline at end of file diff --git a/official/c66926224.lua b/official/c66926224.lua index 2d5c0d8b3f..b300cc9c6b 100644 --- a/official/c66926224.lua +++ b/official/c66926224.lua @@ -1,4 +1,5 @@ --弱肉一色 +--The Law of the Normal local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g1,REASON_EFFECT|REASON_DISCARD) local g2=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66938505.lua b/official/c66938505.lua index daa587f884..86b4b80381 100644 --- a/official/c66938505.lua +++ b/official/c66938505.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.sccon) @@ -18,9 +18,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) + return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsTurnPlayer(1-tp) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.scfilter1(c,e,tp,mc) local mg=Group.FromCards(c,mc) @@ -46,7 +45,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -63,10 +62,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_DECKSHF) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) local e2=e1:Clone() tc:RegisterEffect(e2,true) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) end -end +end \ No newline at end of file diff --git a/official/c66947414.lua b/official/c66947414.lua index f8cbe67634..38427e864e 100644 --- a/official/c66947414.lua +++ b/official/c66947414.lua @@ -1,4 +1,5 @@ --ボスラッシュ +--Boss Rush local s,id=GetID() function s.initial_effect(c) --activate @@ -37,23 +38,23 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x15} +s.listed_series={SET_BES} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end function s.chkfilter(c,tp) - return c:IsSetCard(0x15) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsSetCard(SET_BES) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.chkfilter,1,nil,tp) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.filter(c,e,tp) - return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -67,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c66947913.lua b/official/c66947913.lua index b39427b219..4151a7de13 100644 --- a/official/c66947913.lua +++ b/official/c66947913.lua @@ -71,7 +71,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) Duel.SpecialSummonComplete() @@ -108,4 +108,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c66957584.lua b/official/c66957584.lua index 1a65dee012..8e6c60ee02 100644 --- a/official/c66957584.lua +++ b/official/c66957584.lua @@ -1,4 +1,5 @@ --インフェルニティガン +--Infernity Launcher local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.disfilter(c) - return c:IsSetCard(0xb) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_INFERNITY) and c:IsMonster() and c:IsAbleToGrave() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.disfilter,tp,LOCATION_HAND,0,1,nil) end @@ -53,7 +54,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INFERNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -73,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg==0 or ft<#sg or (#sg>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)) then return end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c66961194.lua b/official/c66961194.lua index c0ff106713..3742380c0c 100644 --- a/official/c66961194.lua +++ b/official/c66961194.lua @@ -1,5 +1,5 @@ --ロード・オブ・ドラゴン-ドラゴンの独裁者 ---The Tyrant of D. +--Dictator of D. local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -35,15 +35,15 @@ function s.initial_effect(c) e3:SetCondition(s.condition) c:RegisterEffect(e3) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} s.listed_names={CARD_BLUEEYES_W_DRAGON} function s.tgfilter(c) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsAbleToGraveAsCost() end function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -63,10 +63,10 @@ function s.cfilter(c) end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLUE_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -85,5 +85,5 @@ end --battle target selection function s.condition(e) local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xdd),tp,LOCATION_MZONE,0,1,nil) -end + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_BLUE_EYES),tp,LOCATION_MZONE,0,1,nil) +end \ No newline at end of file diff --git a/official/c66970002.lua b/official/c66970002.lua index e4c4bb1297..0243afffa6 100644 --- a/official/c66970002.lua +++ b/official/c66970002.lua @@ -1,4 +1,5 @@ --CNo.39 希望皇ホープレイV +--Number C39: Utopia Ray V local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -24,12 +25,12 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.descon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} s.xyz_number=39 function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp @@ -47,15 +48,11 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x107f) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_UTOPIA) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -74,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c66970385.lua b/official/c66970385.lua index 2cd7130e22..83f0dcc3f8 100644 --- a/official/c66970385.lua +++ b/official/c66970385.lua @@ -14,16 +14,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107a,0x207a} +s.listed_series={SET_NOBLE_KNIGHT,SET_NOBLE_ARMS} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end function s.filter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c) end function s.eqfilter(c,tp,ec) - return c:IsSetCard(0x207a) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) + return c:IsSetCard(SET_NOBLE_ARMS) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.Equip(tp,ec,tc) end -end +end \ No newline at end of file diff --git a/official/c66973070.lua b/official/c66973070.lua index 17544c2994..2af58f0ed2 100644 --- a/official/c66973070.lua +++ b/official/c66973070.lua @@ -1,4 +1,5 @@ --デスサイズ・キラー +--Dreadscythe Harvester local s,id=GetID() function s.initial_effect(c) --atkup @@ -23,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c66976526.lua b/official/c66976526.lua index 9a19e23b37..3c9c5bcefa 100644 --- a/official/c66976526.lua +++ b/official/c66976526.lua @@ -1,4 +1,5 @@ --カラクリ大将軍 無零怒 +--Karakuri Steel Shogun mdl 00X "Bureido" local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -28,12 +29,12 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KARAKURI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -51,7 +52,7 @@ end function s.cfilter(c,tp) local np=c:GetPosition() local pp=c:GetPreviousPosition() - return c:IsSetCard(0x11) and c:IsControler(tp) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1)) + return c:IsSetCard(SET_KARAKURI) and c:IsControler(tp) and ((pp==SET_ALLY_OF_JUSTICE and np==SET_AMAZONESS) or (pp==SET_AMAZONESS and np==SET_ALLY_OF_JUSTICE)) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -65,4 +66,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c66984907.lua b/official/c66984907.lua index 20a3cdc84f..08fa991b9d 100644 --- a/official/c66984907.lua +++ b/official/c66984907.lua @@ -1,7 +1,6 @@ --A・Ɐ・CC ---Amaze Ɐttraction Cyclone Coaster +--Amaze Attraction Cyclo-Coaster --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --From cards_specific_functions.lua @@ -28,7 +27,7 @@ function s.initial_effect(c) e2:SetCondition(aux.AttractionEquipCon(false)) c:RegisterEffect(e2) end -s.listed_series={0x15e} +s.listed_series={SET_AMAZEMENT} function s.gyfilter(c) return c:IsSpellTrap() and c:IsAbleToGrave() end @@ -49,7 +48,7 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x15e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_AMAZEMENT) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsAbleToGrave() end @@ -66,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(c,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c66994718.lua b/official/c66994718.lua index ee03c054d2..f3b3edfc03 100644 --- a/official/c66994718.lua +++ b/official/c66994718.lua @@ -1,4 +1,5 @@ --ラプターズ・ガスト +--Raptor's Gust local s,id=GetID() function s.initial_effect(c) --activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xba) + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(re:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67007102.lua b/official/c67007102.lua index 320271f99d..3d2f88820f 100644 --- a/official/c67007102.lua +++ b/official/c67007102.lua @@ -23,23 +23,23 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) e2:SetHintTiming(TIMING_END_PHASE) e2:SetCondition(s.setcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x143} +s.listed_series={SET_ELDLIXIR} s.listed_names={CARD_GOLDEN_LORD} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x143,0x11,800,2500,8,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_NORMAL,800,2500,8,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x143,0x11,800,2500,8,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_NORMAL,800,2500,8,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -55,15 +55,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.setcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.setfilter(c) - return c:IsSetCard(0x143) and c:IsSSetable() and not c:IsForbidden() + return c:IsSetCard(SET_ELDLIXIR) and c:IsSSetable() and not c:IsForbidden() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 diff --git a/official/c67030233.lua b/official/c67030233.lua index 4fd57bfe28..9626a19d95 100644 --- a/official/c67030233.lua +++ b/official/c67030233.lua @@ -99,7 +99,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetValue(atk) - e3:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e3:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e3) end end @@ -117,7 +117,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsAbleToExtra() and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 + if c:IsRelateToEffect(e) and c:IsAbleToExtra() and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c67037924.lua b/official/c67037924.lua index 49c8dfff80..ac17c920ee 100644 --- a/official/c67037924.lua +++ b/official/c67037924.lua @@ -10,9 +10,9 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -30,9 +30,6 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:GetSummonLocation()==LOCATION_EXTRA and c:GetAttack()~=0 end @@ -46,25 +43,25 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:GetAttack()~=0 and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:GetAttack()~=0 and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if tc:GetAttack()==0 then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -85,4 +82,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,c) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c67038874.lua b/official/c67038874.lua index fcea38a026..e0fc389623 100644 --- a/official/c67038874.lua +++ b/official/c67038874.lua @@ -1,4 +1,5 @@ --スクラップ・マインドリーダー +--Scrap Mind Reader local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,15 +18,15 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_SYNCHRO_MAT_RESTRICTION) - e4:SetValue(aux.TargetBoolFunction(Card.IsSetCard,0x24)) + e4:SetValue(aux.TargetBoolFunction(Card.IsSetCard,SET_SCRAP)) c:RegisterEffect(e4) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsPhase(PHASE_MAIN2) end function s.filter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x24) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SCRAP) and c:GetCode()~=id and (ft>0 or c:GetSequence()<5) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -46,8 +47,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c67045174.lua b/official/c67045174.lua index 3f5ad6e57f..44e90c8567 100644 --- a/official/c67045174.lua +++ b/official/c67045174.lua @@ -22,7 +22,7 @@ end s.listed_card_types={TYPE_GEMINI} function s.gmreg(c) if c and c:IsGeminiStatus() and c:IsStatus(STATUS_BATTLE_DESTROYED) then - c:RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + c:RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end end function s.checkop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c67045745.lua b/official/c67045745.lua index aaf3f7ac55..69c2280891 100644 --- a/official/c67045745.lua +++ b/official/c67045745.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e5:SetValue(1) c:RegisterEffect(e5) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkval(e,c) return c:GetLevel()*300 end @@ -50,7 +50,7 @@ function s.indval(e,c) else return false end end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -61,10 +61,10 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.excon(e) return e:GetHandler():IsLevelAbove(7) -end +end \ No newline at end of file diff --git a/official/c67048711.lua b/official/c67048711.lua index 6c634521f8..3a8b0b8cb6 100644 --- a/official/c67048711.lua +++ b/official/c67048711.lua @@ -1,4 +1,5 @@ --7 +--7 local s,id=GetID() function s.initial_effect(c) --Activate @@ -65,4 +66,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67050396.lua b/official/c67050396.lua index 8e5f32fddf..05c5ebb6f3 100644 --- a/official/c67050396.lua +++ b/official/c67050396.lua @@ -1,4 +1,5 @@ --Kozmo-グリンドル +--Kozmo Goodwitch local s,id=GetID() function s.initial_effect(c) --spsummon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -21,18 +22,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.poscost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0xd2} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -48,10 +45,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.posfilter(c) return c:IsFaceup() and c:IsCanTurnSet() end @@ -67,4 +60,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c67073561.lua b/official/c67073561.lua index 94d1c46a38..f0c41e8d3f 100644 --- a/official/c67073561.lua +++ b/official/c67073561.lua @@ -1,5 +1,5 @@ --ミス・ケープ・バーバ ---Miss Cape Barber +--Baba Barber --scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetCountLimit(1,id) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) @@ -30,12 +30,12 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -48,4 +48,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c67095270.lua b/official/c67095270.lua index 3437cc9a68..5d784151fe 100644 --- a/official/c67095270.lua +++ b/official/c67095270.lua @@ -1,4 +1,5 @@ --ディメンション・ウォール +--Dimension Wall local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -18,6 +19,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c67098114.lua b/official/c67098114.lua index 2af8ce1cf9..5a938fda9f 100644 --- a/official/c67098114.lua +++ b/official/c67098114.lua @@ -51,13 +51,13 @@ function s.initial_effect(c) c:RegisterEffect(e4) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xa042} +s.listed_series={SET_NORDIC_ALFAR} function s.tfilter(c,scard,sumtype,tp) - return c:IsSetCard(0xa042,scard,sumtype,tp) or c:IsHasEffect(EFFECT_SYNSUB_NORDIC) + return c:IsSetCard(SET_NORDIC_ALFAR,scard,sumtype,tp) or c:IsHasEffect(EFFECT_SYNSUB_NORDIC) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.GetTurnPlayer()==tp - and ep~=tp and (Duel.GetCurrentPhase()&0x38)~=0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsTurnPlayer(tp) + and ep~=tp and Duel.IsBattlePhase() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -77,14 +77,14 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end if rp~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and (pos&POS_FACEUP)~=0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.cfilter(c) - return c:IsSetCard(0xa042) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_NORDIC_ALFAR) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -121,4 +121,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c67098897.lua b/official/c67098897.lua index 6b0d9e32d3..69aa56cf4d 100644 --- a/official/c67098897.lua +++ b/official/c67098897.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfToExtraCost) + e2:SetCost(Cost.SelfToExtra) e2:SetTarget(s.gysptg) e2:SetOperation(s.gyspop) c:RegisterEffect(e2) diff --git a/official/c67100549.lua b/official/c67100549.lua index 96b2ab214f..6058c250da 100644 --- a/official/c67100549.lua +++ b/official/c67100549.lua @@ -32,7 +32,7 @@ s.listed_names={CARD_ALBAZ} function s.checkop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(eg) do if tc:IsType(TYPE_FUSION) then - Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end end @@ -44,20 +44,20 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_COST) and re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) + if c:IsReason(REASON_COST) and re and re:IsActivated() and re:IsMonsterEffect() and re:GetHandler():IsCode(CARD_ALBAZ) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) @@ -69,12 +69,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.setcon) e1:SetTarget(s.settg) e1:SetOperation(s.setop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsSSetable() end @@ -85,4 +85,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end +end \ No newline at end of file diff --git a/official/c67111213.lua b/official/c67111213.lua index 1e84f5af01..385e4b164b 100644 --- a/official/c67111213.lua +++ b/official/c67111213.lua @@ -1,4 +1,5 @@ --リチュア・アビス +--Gishki Abyss local s,id=GetID() function s.initial_effect(c) --search @@ -18,9 +19,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.filter(c) - return c:IsDefenseBelow(1000) and c:IsSetCard(0x3a) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToHand() + return c:IsDefenseBelow(1000) and c:IsSetCard(SET_GISHKI) and c:IsMonster() and c:GetCode()~=id and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -33,4 +34,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67113830.lua b/official/c67113830.lua index 0a0593d2ad..ea668ce2e1 100644 --- a/official/c67113830.lua +++ b/official/c67113830.lua @@ -1,4 +1,5 @@ --墓地墓地の恨み +--Ghost of a Grudge local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,8 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) - and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>7 + return aux.StatChangeDamageStepCondition() and Duel.GetFieldGroupCount(tp,0,LOCATION_GRAVE)>7 end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 @@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c67120578.lua b/official/c67120578.lua index bff8a30764..5a491c288e 100644 --- a/official/c67120578.lua +++ b/official/c67120578.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.efop) c:RegisterEffect(e3) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} s.listed_names={id} function s.ntcon(e,c,minc) if c==nil then return true end @@ -44,13 +44,13 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE&~RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x54) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAGAGA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -75,7 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.splimtg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) @@ -84,7 +84,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTarget(s.splimit) Duel.RegisterEffect(e2,tp) --cant spsummon from main deck check @@ -93,11 +93,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(CARD_EHERO_BLAZEMAN) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetTargetRange(1,0) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.splimtg(e,c) - return not c:IsSetCard(0x54) + return not c:IsSetCard(SET_GAGAGA) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return sumtype~=SUMMON_TYPE_XYZ @@ -117,19 +117,19 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.drcon) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -140,4 +140,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67127799.lua b/official/c67127799.lua index 6f8acfdd80..1c2b865e45 100644 --- a/official/c67127799.lua +++ b/official/c67127799.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -28,11 +28,6 @@ s.listed_names={id} function s.spval(e,c) return 0,aux.GetMMZonesPointedTo(c:GetControler(),Card.IsAttribute,nil,nil,nil,ATTRIBUTE_DARK) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE|RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c6713443.lua b/official/c6713443.lua index 04ad17f2e8..4a699078de 100644 --- a/official/c6713443.lua +++ b/official/c6713443.lua @@ -1,4 +1,5 @@ --極炎舞-「星斗」 +--Ultimate Fire Formation - Seito local s,id=GetID() function s.initial_effect(c) --activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,7,nil) end @@ -21,7 +22,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x79) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_FIST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,7 +30,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.sfilter(c) - return c:IsSetCard(0x7c) and c:GetCode()~=id and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:GetCode()~=id and c:IsSpellTrap() and c:IsSSetable() end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -51,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,setg) end end -end +end \ No newline at end of file diff --git a/official/c67136033.lua b/official/c67136033.lua index f16c2647fb..a340b3d9ee 100644 --- a/official/c67136033.lua +++ b/official/c67136033.lua @@ -1,4 +1,5 @@ --熱血獣王ベアーマン +--Coach Captain Bearman local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -37,7 +38,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1300) c:RegisterEffect(e1) @@ -58,11 +59,11 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.xyzlimit(e,c) if not c then return false end return not c:IsAttribute(ATTRIBUTE_FIRE) or not c:IsRace(RACE_WARRIOR) -end +end \ No newline at end of file diff --git a/official/c67159705.lua b/official/c67159705.lua index 00764a3b74..f4728f9fbc 100644 --- a/official/c67159705.lua +++ b/official/c67159705.lua @@ -36,4 +36,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ec:UpdateAttack(-1000,nil,c)==-1000 and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67169062.lua b/official/c67169062.lua index 37de5d5152..73063fd76a 100644 --- a/official/c67169062.lua +++ b/official/c67169062.lua @@ -27,12 +27,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67171933.lua b/official/c67171933.lua index 1b79b0c537..01b6722975 100644 --- a/official/c67171933.lua +++ b/official/c67171933.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c67173574.lua b/official/c67173574.lua index 5dfa7c6a73..042a0fb0da 100644 --- a/official/c67173574.lua +++ b/official/c67173574.lua @@ -1,4 +1,5 @@ --CNo.102 光堕天使ノーブル・デーモン +--Number C102: Archfiend Seraph local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT) @@ -31,7 +32,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(s.condition) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -62,10 +63,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,49678559) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end @@ -83,17 +80,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c67196946.lua b/official/c67196946.lua index 611d1296f4..3882ba4e15 100644 --- a/official/c67196946.lua +++ b/official/c67196946.lua @@ -1,4 +1,5 @@ --スター・ブラスト +--Star Blast local s,id=GetID() function s.initial_effect(c) --activate @@ -29,10 +30,10 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()~=1 then return false end e:SetLabel(0) - return Duel.CheckLPCost(tp,500) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,1) + return Duel.CheckLPCost(tp,500) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,1) end local lp=Duel.GetLP(tp) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,1) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,1) local tg=g:GetMaxGroup(Card.GetLevel) local maxlv=tg:GetFirst():GetLevel() local t={} @@ -48,7 +49,7 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.op(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,ct) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,ct) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) local sg=g:Select(tp,1,1,nil) @@ -61,8 +62,8 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) e1:SetValue(-ct) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c67211766.lua b/official/c67211766.lua index f38941b5cb..47ae9a69b2 100644 --- a/official/c67211766.lua +++ b/official/c67211766.lua @@ -1,4 +1,5 @@ --マジオシャレオン +--Majioshaleon local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -17,5 +18,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.ccon(e) - return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) -end + return Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil) +end \ No newline at end of file diff --git a/official/c67223587.lua b/official/c67223587.lua index 44b8746cb9..90adf3baca 100644 --- a/official/c67223587.lua +++ b/official/c67223587.lua @@ -1,4 +1,5 @@ --ハンディキャップマッチ! +--Double Tag Team local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,26 +12,26 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x19) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(SET_GLADIATOR) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c67225377.lua b/official/c67225377.lua index fa24227df5..a0066c07ce 100644 --- a/official/c67225377.lua +++ b/official/c67225377.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsReason(REASON_RULE) end @@ -47,11 +47,11 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end end function s.spcfilter(c) - return c:IsSetCard(0x119) and c:IsDiscardable() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsDiscardable() end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -64,4 +64,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c67227834.lua b/official/c67227834.lua index f9336486a8..4bc6e4d897 100644 --- a/official/c67227834.lua +++ b/official/c67227834.lua @@ -1,4 +1,5 @@ --魔術の呪文書 +--Magic Formula local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL)) @@ -33,4 +34,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67231737.lua b/official/c67231737.lua index 4b8f6b6576..48e47ec5d0 100644 --- a/official/c67231737.lua +++ b/official/c67231737.lua @@ -35,7 +35,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 then s[ep]=s[ep]+1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -56,7 +56,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(a:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -78,17 +78,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e0:SetValue(gc) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e0:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) a:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_MUST_ATTACK_MONSTER) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(s.attg) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) end end function s.attg(e,c) return c:IsFaceup() and c:IsLinkMonster() -end +end \ No newline at end of file diff --git a/official/c67232306.lua b/official/c67232306.lua index 9d60db3446..4d4cbf28a4 100644 --- a/official/c67232306.lua +++ b/official/c67232306.lua @@ -1,4 +1,5 @@ --聖なる鎧 -ミラーメール- +--Mirror Mail local s,id=GetID() function s.initial_effect(c) --atk @@ -25,6 +26,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) at:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c67234805.lua b/official/c67234805.lua index 86327a0c3a..6d5c4de4fa 100644 --- a/official/c67234805.lua +++ b/official/c67234805.lua @@ -53,10 +53,10 @@ function s.initial_effect(c) end s.counter_place_list={0x16} function s.ctop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsMonsterEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(0x16,1) end end function s.rmop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveCounter(tp,0x16,e:GetHandler():GetCounter(0x16),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67237709.lua b/official/c67237709.lua index 852bcc78c8..ec2c5ecbe0 100644 --- a/official/c67237709.lua +++ b/official/c67237709.lua @@ -1,4 +1,5 @@ --Kozmo-エメラルドポリス +--Kozmotown local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,9 +40,9 @@ function s.initial_effect(c) e4:SetOperation(s.thop2) c:RegisterEffect(e4) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd2) and c:IsMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_KOZMO) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end @@ -62,7 +63,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.drfilter(c) - return c:IsSetCard(0xd2) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_KOZMO) and c:IsMonster() and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) @@ -88,7 +89,7 @@ function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_FZONE) end function s.thfilter2(c) - return c:IsSetCard(0xd2) and c:IsAbleToHand() + return c:IsSetCard(SET_KOZMO) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end @@ -101,4 +102,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67248304.lua b/official/c67248304.lua index 9ddb6b756e..f5a4f6c8c9 100644 --- a/official/c67248304.lua +++ b/official/c67248304.lua @@ -1,7 +1,6 @@ --リバースポッド ---Flip Jar +--Reverse Jar --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) diff --git a/official/c67249508.lua b/official/c67249508.lua index 027b73c830..2b1dad115a 100644 --- a/official/c67249508.lua +++ b/official/c67249508.lua @@ -1,4 +1,5 @@ --竜星の凶暴化 +--Yang Zing Brutality local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,14 +10,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local at=Duel.GetAttackTarget() if not at or tc:IsFacedown() or at:IsFacedown() then return false end if tc:IsControler(1-tp) then tc=at end e:SetLabelObject(tc) - return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(0x9e) + return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsSetCard(SET_YANG_ZING) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -26,16 +27,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(tc:GetBaseDefense()*2) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tc:RegisterEffect(e2) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -45,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetLabelObject(tc) e3:SetCondition(s.descon) e3:SetOperation(s.desop) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) end end @@ -61,4 +62,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67267333.lua b/official/c67267333.lua index 2d57b84f62..b43b7d8e61 100644 --- a/official/c67267333.lua +++ b/official/c67267333.lua @@ -1,6 +1,5 @@ --ヴェンデット・ヘルハウンド --Vendread Houndhorde - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -24,14 +23,13 @@ function s.initial_effect(c) e2:SetOperation(s.mtop) c:RegisterEffect(e2) end -s.listed_series={0x106} - +s.listed_series={SET_VENDREAD} function s.cfilter(c) - return c:IsSetCard(0x106) and c:IsDiscardable() + return c:IsSetCard(SET_VENDREAD) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,18 +45,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x106) + return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,SET_VENDREAD) and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x106) + local g=eg:Filter(Card.IsSetCard,nil,SET_VENDREAD) local rc=g:GetFirst() if not rc then return end local e1=Effect.CreateEffect(rc) @@ -69,20 +67,20 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end function s.rmfilter(c) return c:IsSpellTrap() and c:IsAbleToRemove() diff --git a/official/c67273917.lua b/official/c67273917.lua index d6636fd131..b8e2533f23 100644 --- a/official/c67273917.lua +++ b/official/c67273917.lua @@ -1,4 +1,5 @@ --イグナイト・デリンジャー +--Igknight Cavalier local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67282505.lua b/official/c67282505.lua index 982eded2b7..fc401c27fd 100644 --- a/official/c67282505.lua +++ b/official/c67282505.lua @@ -1,5 +1,5 @@ --蟲の忍者-蜜 ---Insect Ninja Mitsu +--Mitsu the Insect Ninja --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -28,10 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} s.listed_names={id} function s.cfilter(c) - return (c:IsFaceup() and c:IsSetCard(0x2b)) or (c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsLocation(LOCATION_MZONE)) + return (c:IsFaceup() and c:IsSetCard(SET_NINJA)) or (c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsLocation(LOCATION_MZONE)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + return ep==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEDOWN_DEFENSE) end @@ -57,7 +57,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local tc=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEDOWN_DEFENSE):GetFirst() Duel.SetOperationInfo(0,CATEGORY_POSITION,Group.FromCards(c,tc),1,tp,0) - if tc:IsSetCard(0x2b) and not tc:IsCode(id) then + if tc:IsSetCard(SET_NINJA) and not tc:IsCode(id) then Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end end @@ -66,7 +66,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFacedown() and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)>0 and c:IsRelateToEffect(e) and c:IsFaceup() and Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)>0 - and tc:IsSetCard(0x2b) and not tc:IsCode(id) then + and tc:IsSetCard(SET_NINJA) and not tc:IsCode(id) then Duel.BreakEffect() Duel.NegateEffect(ev) end diff --git a/official/c67284107.lua b/official/c67284107.lua index 175ff803b5..803d0f0da0 100644 --- a/official/c67284107.lua +++ b/official/c67284107.lua @@ -32,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) i=(i+1)%4 until ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(id,1)) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c6728559.lua b/official/c6728559.lua index f5096aeed4..3064e1ed9d 100644 --- a/official/c6728559.lua +++ b/official/c6728559.lua @@ -42,12 +42,12 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg>2 and aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -91,12 +91,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetTarget(s.sumlimit(arc)) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.sumlimit(arc) return function(e,c,sump,sumtype,sumpos,targetp) return c:IsAttribute(arc) end -end - +end \ No newline at end of file diff --git a/official/c67287533.lua b/official/c67287533.lua index 94765ae64a..fcb3b4267e 100644 --- a/official/c67287533.lua +++ b/official/c67287533.lua @@ -1,4 +1,5 @@ --死のメッセージ「A」 +--Spirit Message "N" local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) diff --git a/official/c67288539.lua b/official/c67288539.lua index d9a7e7d1c7..fa4bb438bd 100644 --- a/official/c67288539.lua +++ b/official/c67288539.lua @@ -1,5 +1,5 @@ --- ヴァレルコード・ドラゴン --- Borrelcode Dragon +--ヴァレルコード・ドラゴン +--Borrelcode Dragon local s,id=GetID() function s.initial_effect(c) --Link Summon @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) @@ -54,7 +54,7 @@ end --destroy all function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:HasFlagEffect(id) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetBattleTarget() + return c:HasFlagEffect(id) and c:IsLinkSummoned() and c:GetBattleTarget() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end diff --git a/official/c67300516.lua b/official/c67300516.lua index 14ca939f4a..10cf8a15d2 100644 --- a/official/c67300516.lua +++ b/official/c67300516.lua @@ -1,4 +1,5 @@ --真紅眼の飛竜 +--Red-Eyes Wyvern local s,id=GetID() function s.initial_effect(c) --spsummon @@ -10,17 +11,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.spcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 + return Duel.IsTurnPlayer(tp) and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end function s.filter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c67310848.lua b/official/c67310848.lua index 0519226fa1..ef0ecdb80c 100644 --- a/official/c67310848.lua +++ b/official/c67310848.lua @@ -41,4 +41,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67314110.lua b/official/c67314110.lua index b31cbfa2ba..431643e773 100644 --- a/official/c67314110.lua +++ b/official/c67314110.lua @@ -1,7 +1,6 @@ --驚楽園の案内人 ---Amazement Attendant +--Amazement Attendant Comica --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --set @@ -15,9 +14,9 @@ function s.initial_effect(c) --From cards_specific_functions.lua aux.AddAmazementQuickEquipEffect(c,id) end -s.listed_series={0x15f,0x15e} +s.listed_series={SET_ATTRACTION,SET_AMAZEMENT} function s.setfilter(c) - return c:IsSetCard(0x15f) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_ATTRACTION) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +27,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c67316075.lua b/official/c67316075.lua index 9a6df2221e..172bf89a74 100644 --- a/official/c67316075.lua +++ b/official/c67316075.lua @@ -1,4 +1,5 @@ --堕天使ナース-レフィキュル +--Darklord Nurse Reficule local s,id=GetID() function s.initial_effect(c) --recover conversion @@ -10,4 +11,4 @@ function s.initial_effect(c) e1:SetTargetRange(0,1) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c67328336.lua b/official/c67328336.lua index f8d623ae4e..9d7af804a3 100644 --- a/official/c67328336.lua +++ b/official/c67328336.lua @@ -1,4 +1,5 @@ --機皇城 +--Meklord Fortress local s,id=GetID() function s.initial_effect(c) --activate @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3013)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MEKLORD_EMPEROR)) e2:SetValue(s.effval) c:RegisterEffect(e2) --search @@ -28,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x3013} +s.listed_series={SET_MEKLORD_EMPEROR} function s.effval(e,re,rp) return re:GetHandler():IsType(TYPE_SYNCHRO) end @@ -37,7 +38,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and (c:GetPreviousLocation()&LOCATION_ONFIELD)~=0 end function s.filter(c) - return c:IsSetCard(0x3013) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MEKLORD_EMPEROR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -50,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c6733059.lua b/official/c6733059.lua index 1468e01446..b2ab7efd26 100644 --- a/official/c6733059.lua +++ b/official/c6733059.lua @@ -33,7 +33,7 @@ function s.rescon(fg) end end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local fg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsLevelBelow,#cg),tp,LOCATION_MZONE,LOCATION_MZONE,nil) if chk==0 then return aux.SelectUnselectGroup(cg,e,tp,nil,nil,s.rescon(fg),0) end local rg=aux.SelectUnselectGroup(cg,e,tp,nil,nil,s.rescon(fg),1,tp,HINTMSG_REMOVE,s.rescon(fg)) @@ -48,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsLevel,lv),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67331360.lua b/official/c67331360.lua index 01c6955f3f..85468d688f 100644 --- a/official/c67331360.lua +++ b/official/c67331360.lua @@ -1,14 +1,14 @@ --- 人形の家 --- Doll House --- Scripted by Hatter +--人形の家 +--Doll House +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Special Summon 1 monster from your Deck as a Level 6 DARK monster + --Special Summon 1 monster from your Deck as a Level 6 DARK monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Attach material and end battle phase + --Attach material and end battle phase local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -35,9 +35,9 @@ function s.tgfilter(c,e) return c:IsType(TYPE_NORMAL) and (c:IsAttack(0) or c:IsDefense(0)) and c:IsCanBeEffectTarget(e) end function s.resconfunc(cg) - -- Creates a rescon function to be used with Auxiliary.SelectUnselectGroup - -- that will ensure cards in sg will have at least one card in cg with the same name. - -- It also ensures that each card has one exclusive pair. + --Creates a rescon function to be used with Auxiliary.SelectUnselectGroup + --that will ensure cards in sg will have at least one card in cg with the same name. + --It also ensures that each card has one exclusive pair. return function (sg,e,tp,mg) local code1=sg:GetFirst():GetCode() local f1=cg:Filter(Card.IsCode,nil,code1) @@ -123,4 +123,4 @@ function s.bpop(e,tp,eg,ep,ev,re,r,rp) Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end -end +end \ No newline at end of file diff --git a/official/c67378104.lua b/official/c67378104.lua index 84d8b9f2b7..a49d8e7b29 100644 --- a/official/c67378104.lua +++ b/official/c67378104.lua @@ -1,5 +1,5 @@ --星呼びの天儀台 ---Celestial Sextant +--Celestial Observatory --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -19,11 +19,11 @@ function s.filter(c) return c:GetLevel()==6 and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,1,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -34,5 +34,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c67378935.lua b/official/c67378935.lua index 12bd430cff..a6f4e9b64b 100644 --- a/official/c67378935.lua +++ b/official/c67378935.lua @@ -47,7 +47,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp,s.lizfilter) @@ -59,7 +59,7 @@ function s.lizfilter(e,c) return c:GetOriginalType() & TYPE_XYZ == 0 end function s.tgfilter(c,e,tp) - return c:IsFaceup() and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()) + return c:IsFaceup() and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()) end function s.spfilter(c,e,tp,lv) return c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -70,26 +70,26 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetLevel()):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetLevel()):GetFirst() if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then --Negate its effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) Duel.SpecialSummonComplete() end diff --git a/official/c67381587.lua b/official/c67381587.lua index aa3126679b..e3c976f077 100644 --- a/official/c67381587.lua +++ b/official/c67381587.lua @@ -16,21 +16,21 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0xcc} +s.listed_series={SET_PREDICTION_PRINCESS} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,114,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,114,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -100,6 +95,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,114,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c67436768.lua b/official/c67436768.lua index 21ec3e4b9c..e00def522c 100644 --- a/official/c67436768.lua +++ b/official/c67436768.lua @@ -1,7 +1,6 @@ --スプリガンズ・ブラザーズ ---Sprigguns Brothers +--Springans Brothers --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Sprigguns" monster from GY @@ -21,20 +20,19 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) end -s.listed_series={0x158} - +s.listed_series={SET_SPRINGANS} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local loc=e:GetHandler():GetPreviousLocation() return (loc==LOCATION_HAND or loc==LOCATION_DECK) end function s.filter(c,e,tp) - return c:IsSetCard(0x158) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_SPRINGANS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -51,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0x158) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SPRINGANS) and c:IsType(TYPE_XYZ) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.matfilter(chkc) and chkc~=e:GetHandler() end @@ -68,4 +66,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c,true) end -end +end \ No newline at end of file diff --git a/official/c67441435.lua b/official/c67441435.lua index bb3b1185fe..8419cacf85 100644 --- a/official/c67441435.lua +++ b/official/c67441435.lua @@ -1,4 +1,5 @@ --グローアップ・バルブ +--Glow-Up Bulb local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c67441879.lua b/official/c67441879.lua index 88b405c7dd..1c5bcd3594 100644 --- a/official/c67441879.lua +++ b/official/c67441879.lua @@ -121,4 +121,4 @@ function s.tunerop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c67443336.lua b/official/c67443336.lua index 98f134822b..905c498a84 100644 --- a/official/c67443336.lua +++ b/official/c67443336.lua @@ -1,4 +1,5 @@ --裁きの天秤 +--Balance of Judgment local s,id=GetID() function s.initial_effect(c) --activate @@ -15,12 +16,12 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local t=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0) + local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND|LOCATION_ONFIELD,0) return t>s end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local t=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) - local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_ONFIELD,0) + local s=Duel.GetFieldGroupCount(tp,LOCATION_HAND|LOCATION_ONFIELD,0) if chk==0 then return Duel.IsPlayerCanDraw(tp,t-s) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(t-s) @@ -29,8 +30,8 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local t=Duel.GetFieldGroupCount(p,0,LOCATION_ONFIELD) - local s=Duel.GetFieldGroupCount(p,LOCATION_HAND+LOCATION_ONFIELD,0) + local s=Duel.GetFieldGroupCount(p,LOCATION_HAND|LOCATION_ONFIELD,0) if t>s then Duel.Draw(p,t-s,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67445676.lua b/official/c67445676.lua index ee92622b1c..736eeccf24 100644 --- a/official/c67445676.lua +++ b/official/c67445676.lua @@ -1,4 +1,5 @@ --マツボックル +--Pinecono local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,4 +26,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c674561.lua b/official/c674561.lua index f45672de2a..5b69b68da6 100644 --- a/official/c674561.lua +++ b/official/c674561.lua @@ -27,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67457739.lua b/official/c67457739.lua index 375b103a91..d301edf54a 100644 --- a/official/c67457739.lua +++ b/official/c67457739.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.destg) e1:SetOperation(s.desop) diff --git a/official/c67464807.lua b/official/c67464807.lua index d2cb318567..b46fbea537 100644 --- a/official/c67464807.lua +++ b/official/c67464807.lua @@ -1,4 +1,5 @@ --運命のドラ +--Dora of Fate local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,14 +7,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,0x1e0) + e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsFaceup() and c:GetLevel()>1 @@ -36,14 +37,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon) e1:SetOperation(s.damop) e1:SetLabel(lv) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and ep==tp and eg:GetFirst():GetLevel()==e:GetLabel()-1 + return Duel.IsTurnPlayer(tp) and ep==tp and eg:GetFirst():GetLevel()==e:GetLabel()-1 end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,e:GetLabel()*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67466547.lua b/official/c67466547.lua index ed4a794f25..0725d3c86f 100644 --- a/official/c67466547.lua +++ b/official/c67466547.lua @@ -1,5 +1,5 @@ --空牙団の舵手 ヘルマー ---Helmer, Helmsman of the Skyfang Brigade +--Helmer, Helmsman Fur Hire --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -47,17 +47,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.drcfilter(c) - return c:IsSetCard(0x114) and c:IsDiscardable() + return c:IsSetCard(SET_FUR_HIRE) and c:IsDiscardable() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.drcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.drcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.drcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -68,5 +68,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c67468948.lua b/official/c67468948.lua index 1e7fa2a5bd..36cd2d5594 100644 --- a/official/c67468948.lua +++ b/official/c67468948.lua @@ -1,4 +1,5 @@ --救済のレイヤード +--Layard the Liberator local s,id=GetID() function s.initial_effect(c) --tohand @@ -21,4 +22,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) -end +end \ No newline at end of file diff --git a/official/c67483216.lua b/official/c67483216.lua index 9af10d5f67..8889fd056d 100644 --- a/official/c67483216.lua +++ b/official/c67483216.lua @@ -1,4 +1,5 @@ --ジェネクス・サーチャー +--Genex Searcher local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsAttackBelow(1500) and c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsAttackBelow(1500) and c:IsSetCard(SET_GENEX) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c67489919.lua b/official/c67489919.lua index 4e2ea23a5d..efc7045217 100644 --- a/official/c67489919.lua +++ b/official/c67489919.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCondition(s.spcon) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c67503139.lua b/official/c67503139.lua index dcc0b7ff72..c45ff922aa 100644 --- a/official/c67503139.lua +++ b/official/c67503139.lua @@ -1,4 +1,5 @@ --占術姫クリスタルウンディーネ +--Prediction Princess Crystaldine local s,id=GetID() function s.initial_effect(c) --to hand @@ -14,14 +15,14 @@ function s.thfilter(c) return c:IsRitualMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67511500.lua b/official/c67511500.lua index 1d805b248a..e2f3462852 100644 --- a/official/c67511500.lua +++ b/official/c67511500.lua @@ -1,4 +1,5 @@ --ドラゴン・ウィッチ-ドラゴンの守護者- +--Lady of D. local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -28,7 +29,7 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_DRAGON) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_REPLACE) return true else return false end -end +end \ No newline at end of file diff --git a/official/c67517351.lua b/official/c67517351.lua index 3a4f2fa105..51b00e311d 100644 --- a/official/c67517351.lua +++ b/official/c67517351.lua @@ -1,5 +1,5 @@ --HRUM-ユートピア・フォース ---Hyper-Rank-Up-Magic Hope Force +--Hyper Rank-Up-Magic Utopiforce --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -39,15 +39,15 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0x7f,0x107f} +s.listed_series={SET_UTOPIC,SET_UTOPIA} function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0x107f) and c:IsRankBelow(9) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and c:IsRankBelow(9) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,pg) end function s.filter2(c,e,tp,mc,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x7f) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_UTOPIC) and c:IsRankAbove(10) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end @@ -74,7 +74,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if not (re:IsActivated() and rc and rc:IsType(TYPE_XYZ) and rc:IsSetCard(0x7f) and rc:IsRankAbove(10)) then return end + if not (re:IsActivated() and rc and rc:IsType(TYPE_XYZ) and rc:IsSetCard(SET_UTOPIC) and rc:IsRankAbove(10)) then return end local tg=eg:Filter(aux.FaceupFilter(Card.IsType,TYPE_XYZ),nil,e,tp) if #tg>0 then for tc in aux.Next(tg) do @@ -112,4 +112,4 @@ function s.mop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c67523044.lua b/official/c67523044.lua index d5086ca554..2303203171 100644 --- a/official/c67523044.lua +++ b/official/c67523044.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e2:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e2) diff --git a/official/c67526112.lua b/official/c67526112.lua index 236c129ac1..8abd24f4c0 100644 --- a/official/c67526112.lua +++ b/official/c67526112.lua @@ -50,10 +50,10 @@ function s.stage2(e,tc,tp,sg,chk) end end function s.atlimit(e,c) - return not (c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_EXTRA)) + return not (c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_EXTRA)) end function s.efilter(e,te) local tc=te:GetOwner() - return tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:IsSummonLocation(LOCATION_EXTRA) and tc~=e:GetHandler() + return tc:IsSpecialSummoned() and tc:IsSummonLocation(LOCATION_EXTRA) and tc~=e:GetHandler() and te:IsMonsterEffect() and te:IsActivated() and te:GetActivateLocation()==LOCATION_MZONE end \ No newline at end of file diff --git a/official/c675319.lua b/official/c675319.lua index a17cf971e8..126772952e 100644 --- a/official/c675319.lua +++ b/official/c675319.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xf1)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ZOODIAC)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -38,7 +38,7 @@ function s.initial_effect(c) e5:SetOperation(s.repop) c:RegisterEffect(e5) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.atfilter(c,atk) return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) and c:GetAttack()>atk end @@ -46,15 +46,15 @@ function s.atlimit(e,c) return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) and Duel.IsExistingMatchingCard(s.atfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetAttack()) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xf1) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_ZOODIAC) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) and c:GetFlagEffect(id)==0 end function s.desfilter(c,e,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE+LOCATION_HAND) and c:IsMonster() + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE|LOCATION_HAND) and c:IsMonster() and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil,e,tp) and eg:IsExists(s.repfilter,1,nil,tp) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then local g=eg:Filter(s.repfilter,nil,tp) @@ -66,9 +66,9 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabelObject(cg:GetFirst()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local tg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp) + local tg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil,e,tp) Duel.SetTargetCard(tg) - tg:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + tg:GetFirst():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) tg:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) return true else return false end @@ -80,5 +80,5 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=Duel.GetFirstTarget() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c67547370.lua b/official/c67547370.lua index 062bb4dba0..6c6b41bd50 100644 --- a/official/c67547370.lua +++ b/official/c67547370.lua @@ -77,7 +77,7 @@ function s.countcost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c) @@ -109,11 +109,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(val) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c67556500.lua b/official/c67556500.lua index 3113cb72c9..8c47643566 100644 --- a/official/c67556500.lua +++ b/official/c67556500.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -34,7 +34,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) fid=c:GetRealFieldID() end @@ -44,7 +44,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTarget(s.splimit) e2:SetLabel(fid) Duel.RegisterEffect(e2,tp) @@ -54,10 +54,10 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_MUST_BE_MATERIAL) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e3:SetTargetRange(1,0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END) e3:SetValue(REASON_SYNCHRO) c:RegisterEffect(e3) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return sumtype~=SUMMON_TYPE_SYNCHRO or e:GetOwner():GetRealFieldID()~=e:GetLabel() or e:GetOwner():IsFacedown() -end +end \ No newline at end of file diff --git a/official/c67557908.lua b/official/c67557908.lua index 14890740db..b4a3199ac9 100644 --- a/official/c67557908.lua +++ b/official/c67557908.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetTarget(s.destg) @@ -47,7 +47,7 @@ function s.initial_effect(c) e4:SetLabelObject(e3) c:RegisterEffect(e4) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.listed_names={94942656} s.xyz_number=4 function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -78,7 +78,7 @@ function s.recordop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsXyzSummoned() end function s.spfilter(c,e,tp,rp) return c:IsCode(94942656) and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -111,4 +111,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c67559101.lua b/official/c67559101.lua index 2e2b9fb824..ece2273785 100644 --- a/official/c67559101.lua +++ b/official/c67559101.lua @@ -1,4 +1,5 @@ --先史遺産マッドゴーレム・シャコウキ +--Chronomaly Mud Golem local s,id=GetID() function s.initial_effect(c) --pierce @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) c:RegisterEffect(e1) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.target(e,c) - return c:IsSetCard(0x70) -end + return c:IsSetCard(SET_CHRONOMALY) +end \ No newline at end of file diff --git a/official/c67586735.lua b/official/c67586735.lua index cffa942a2b..720b362527 100644 --- a/official/c67586735.lua +++ b/official/c67586735.lua @@ -1,5 +1,5 @@ --剛鬼ツープラトン ---Gouki Doubleteam +--Gouki Tagpartner local s,id=GetID() function s.initial_effect(c) --atk up @@ -19,17 +19,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() return c:IsLocation(LOCATION_GRAVE) and r & REASON_LINK == REASON_LINK - and rc:IsSetCard(0xfc) and rc:IsType(TYPE_LINK) + and rc:IsSetCard(SET_GOUKI) and rc:IsType(TYPE_LINK) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,17 +38,17 @@ end function s.ddop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local sync=c:GetReasonCard() - if sync:IsRelateToEffect(e) and sync:IsFaceup() and sync:IsSetCard(0xfc) and sync:IsLinkMonster() then + if sync:IsRelateToEffect(e) and sync:IsFaceup() and sync:IsSetCard(SET_GOUKI) and sync:IsLinkMonster() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0xfc) and c:IsSpell() and c:IsAbleToDeck() + return c:IsSetCard(SET_GOUKI) and c:IsSpell() and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -60,6 +60,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67598234.lua b/official/c67598234.lua index 7cfc0c8435..d54e63305b 100644 --- a/official/c67598234.lua +++ b/official/c67598234.lua @@ -1,8 +1,8 @@ --電影の騎士ガイアセイバー ---Gaiasaber, the Video Knight +--Gaia Saber, the Lightning Shadow local s,id=GetID() function s.initial_effect(c) --link summon Link.AddProcedure(c,nil,2) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c67616300.lua b/official/c67616300.lua index b9826d359b..474b4542b4 100644 --- a/official/c67616300.lua +++ b/official/c67616300.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e6:SetProperty(EFFECT_FLAG_BOTH_SIDE) e6:SetRange(LOCATION_FZONE) e6:SetCountLimit(1) - e6:SetCost(s.effcost) + e6:SetCost(Cost.PayLP(1000)) e6:SetTarget(s.efftg) e6:SetOperation(s.effop) c:RegisterEffect(e6) @@ -47,10 +47,6 @@ function s.damcon2(e) local tp=e:GetHandlerPlayer() return Duel.GetLP(1-tp)0 -end +end \ No newline at end of file diff --git a/official/c6764709.lua b/official/c6764709.lua index 5d8a693251..bdd752ee15 100644 --- a/official/c6764709.lua +++ b/official/c6764709.lua @@ -42,9 +42,9 @@ function s.initial_effect(c) e5:SetOperation(s.rdop) c:RegisterEffect(e5) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.spfilter(c) - return c:IsSetCard(0x107) and c:IsLevelAbove(7) + return c:IsSetCard(SET_FA) and c:IsLevelAbove(7) end function s.spcon(e,c) if c==nil then return true end @@ -56,7 +56,7 @@ function s.atkval(e,c) return c:GetLevel()*300 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -67,7 +67,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -84,4 +84,4 @@ function s.rdop(e,tp,eg,ep,ev,re,r,rp) if not c:IsFacedown() and c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and c:UpdateLevel(-3)~=0 and tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67647362.lua b/official/c67647362.lua index d1e29901ab..a7f516c9e4 100644 --- a/official/c67647362.lua +++ b/official/c67647362.lua @@ -1,7 +1,6 @@ --海造賊-キャプテン黒髭 --Blackbeard, the Plunder Patroll Captain --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -22,13 +21,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x13f,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_PLUNDER_PATROLL,lc,sumtype,tp) end function s.filter(c,e,tp,att) - return c:IsSetCard(0x13f) and c:IsAttribute(att) + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end @@ -37,7 +35,7 @@ function s.cfilter(c) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if chk==0 then return att>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -50,7 +48,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if att==0 then return end @@ -63,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(sc) tc:RegisterEffect(e1) @@ -73,4 +71,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c6766208.lua b/official/c6766208.lua index 005d248551..dffd793c6f 100644 --- a/official/c6766208.lua +++ b/official/c6766208.lua @@ -1,4 +1,5 @@ --DDD疾風大王エグゼクティブ・アレクサンダー +--D/D/D Gust High King Alexander local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -30,13 +31,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -53,8 +54,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10af) + return c:IsFaceup() and c:IsSetCard(SET_DDD) end function s.atkcon(e) return Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil)>=3 -end +end \ No newline at end of file diff --git a/official/c67675300.lua b/official/c67675300.lua index a34dc813fc..d64aa54783 100644 --- a/official/c67675300.lua +++ b/official/c67675300.lua @@ -33,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.target(e,c) return c~=e:GetHandler() and c:GetCounter(0x1015)~=0 -end +end \ No newline at end of file diff --git a/official/c6767771.lua b/official/c6767771.lua index 5d5a67809a..98c71afad8 100644 --- a/official/c6767771.lua +++ b/official/c6767771.lua @@ -1,14 +1,14 @@ --- 壱世壊を劈く弦声 --- Tearalaments Scream --- Scripted by Hatter +--壱世壊を劈く弦声 +--Tearlaments Scream +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - -- Mill 3 cards + --Mill 3 cards local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DECKDES+CATEGORY_ATKCHANGE) @@ -23,7 +23,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Add 1 "Tearalaments" Trap to the hand + --Add 1 "Tearalaments" Trap to the hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -37,9 +37,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.cfilter(c) - return c:IsFaceup() and (c:IsCode(CARD_VISAS_STARFROST) or (c:IsSetCard(0x182) and c:IsMonster())) + return c:IsFaceup() and (c:IsCode(CARD_VISAS_STARFROST) or (c:IsSetCard(SET_TEARLAMENTS) and c:IsMonster())) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) @@ -50,17 +50,17 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.DiscardDeck(tp,3,REASON_EFFECT) - -- Reduce ATK + --Reduce ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(-500) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsSetCard(0x182) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_TEARLAMENTS) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c67680512.lua b/official/c67680512.lua index 0436d908c8..748a95f6f9 100644 --- a/official/c67680512.lua +++ b/official/c67680512.lua @@ -46,7 +46,7 @@ function s.lkfilter(c,mg) end function s.filter(tc,c,tp) local mg=Group.FromCards(c,tc) - return tc:IsFaceup() and tc:IsCanBeLinkMaterial() and tc:IsSummonType(SUMMON_TYPE_SPECIAL) + return tc:IsFaceup() and tc:IsCanBeLinkMaterial() and tc:IsSpecialSummoned() and Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c67688478.lua b/official/c67688478.lua index 2e5e41b992..584d57ddb2 100644 --- a/official/c67688478.lua +++ b/official/c67688478.lua @@ -11,22 +11,18 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsActiveType(TYPE_MONSTER)) + if ep==tp or (not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:IsMonsterEffect()) or (not Duel.IsChainNegatable(ev)) then return false end local ex,tg,tc,p=Duel.GetOperationInfo(ev,CATEGORY_HANDES) return re:IsHasCategory(CATEGORY_HANDES) and (not ex or p~=1-tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -40,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67692580.lua b/official/c67692580.lua index f1d60de2a1..34f145f26b 100644 --- a/official/c67692580.lua +++ b/official/c67692580.lua @@ -20,4 +20,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c67696066.lua b/official/c67696066.lua index db9911436b..6ef061067e 100644 --- a/official/c67696066.lua +++ b/official/c67696066.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xc6} +s.listed_series={SET_PERFORMAGE} function s.filter(c,e,tp) - return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAGE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -34,7 +34,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67712104.lua b/official/c67712104.lua index 4694de8ee4..aaae3d8fdb 100644 --- a/official/c67712104.lua +++ b/official/c67712104.lua @@ -37,12 +37,12 @@ function s.initial_effect(c) e3:SetOperation(s.indesop) c:RegisterEffect(e3) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.econ(e) return e:GetHandler():GetSequence()>4 end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() + return te:IsMonsterEffect() and te:GetOwnerPlayer()~=e:GetHandlerPlayer() end function s.imcon(e) local ph=Duel.GetCurrentPhase() @@ -60,10 +60,10 @@ function s.indescond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if at==c then return true end local lg=c:GetLinkedGroup() - return at and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x12b) and lg:IsContains(at) + return at and at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(SET_MARINCESS) and lg:IsContains(at) end function s.costfilter(c) - return c:IsSetCard(0x12b) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MARINCESS) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.indescost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -81,14 +81,14 @@ function s.indesop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) at:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end end \ No newline at end of file diff --git a/official/c67723438.lua b/official/c67723438.lua index 18056ea4be..bb9e9ec1e8 100644 --- a/official/c67723438.lua +++ b/official/c67723438.lua @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) --Banish it during the End Phase of this turn aux.DelayedOperation(sc,PHASE_END,id,e,tp,function(ag) Duel.Remove(ag,POS_FACEUP,REASON_EFFECT) end,nil,nil,nil,aux.Stringid(id,1)) end -end +end \ No newline at end of file diff --git a/official/c67744384.lua b/official/c67744384.lua index 594c27558c..cc3f0660bd 100644 --- a/official/c67744384.lua +++ b/official/c67744384.lua @@ -13,21 +13,21 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0x10b) and c:IsAbleToHand() + return c:IsSetCard(SET_TINDANGLE) and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,LOCATION_MZONE,0,1,3,nil) if #g>0 then local ct=Duel.ChangePosition(g,POS_FACEUP_DEFENSE) - if ct==#g and g:IsExists(Card.IsSetCard,ct,nil,0x10b) then + if ct==#g and g:IsExists(Card.IsSetCard,ct,nil,SET_TINDANGLE) then local sg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() @@ -38,5 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end - +end \ No newline at end of file diff --git a/official/c67748760.lua b/official/c67748760.lua index 9517b94c03..9033b0fd77 100644 --- a/official/c67748760.lua +++ b/official/c67748760.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x102) + return c:IsFaceup() and c:IsSetCard(SET_ROKKET) end function s.spcon(e,c) if c==nil then return true end @@ -35,7 +35,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) - return c:IsSetCard(0x102) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ROKKET) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -48,4 +48,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67750322.lua b/official/c67750322.lua index c0369e91c8..bf4eead452 100644 --- a/official/c67750322.lua +++ b/official/c67750322.lua @@ -1,4 +1,5 @@ --スカル・マイスター +--Skull Meister local s,id=GetID() function s.initial_effect(c) --Inactivate @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -25,14 +26,10 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return ep~=tp and Duel.IsChainDisablable(ev) and loc==LOCATION_GRAVE end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c67754901.lua b/official/c67754901.lua index c70d3dd337..24cd491eb4 100644 --- a/official/c67754901.lua +++ b/official/c67754901.lua @@ -1,4 +1,5 @@ --オッドアイズ・ミラージュ・ドラゴン +--Odd-Eyes Mirage Dragon local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,13 +29,13 @@ function s.initial_effect(c) e2:SetOperation(s.penop) c:RegisterEffect(e2) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} s.listed_names={id} function s.indfilter(c) - return c:IsFaceup() and c:IsSetCard(0x99) + return c:IsFaceup() and c:IsSetCard(SET_ODD_EYES) end function s.indcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0x99) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,SET_ODD_EYES) end function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.indfilter(chkc) end @@ -51,7 +52,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -59,11 +60,11 @@ function s.valcon(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsSetCard(SET_ODD_EYES) and c:IsType(TYPE_PENDULUM) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) end function s.penfilter(c) - return c:IsSetCard(0x99) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsCode(id) and not c:IsForbidden() + return c:IsSetCard(SET_ODD_EYES) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsCode(id) and not c:IsForbidden() end function s.pencon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -88,4 +89,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end -end +end \ No newline at end of file diff --git a/official/c67757079.lua b/official/c67757079.lua index 7bcea7769c..f0d08e8a6c 100644 --- a/official/c67757079.lua +++ b/official/c67757079.lua @@ -1,4 +1,5 @@ --キング・オブ・ビースト +--King of the Beasts local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,1,id) @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c67775894.lua b/official/c67775894.lua index cf51f86b52..9498143cca 100644 --- a/official/c67775894.lua +++ b/official/c67775894.lua @@ -38,4 +38,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67779172.lua b/official/c67779172.lua index fee3180eee..28e69d8038 100644 --- a/official/c67779172.lua +++ b/official/c67779172.lua @@ -1,4 +1,5 @@ --ブラックフェザー・シュート +--Black-Winged Strafe local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.costfilter(c) - return c:IsSetCard(0x33) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67797569.lua b/official/c67797569.lua index 57b64306ae..2ab8779f7e 100644 --- a/official/c67797569.lua +++ b/official/c67797569.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -62,22 +62,22 @@ function s.costfilter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - local sc=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x39),tp,LOCATION_MZONE,0,nil) + local sc=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) if chk==0 then return sc>0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCanTurnSet),tp,0,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_POSITION,1,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x39),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsCanTurnSet),tp,0,LOCATION_MZONE,1,ct,nil) if #g>0 then Duel.HintSelection(g) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c67808837.lua b/official/c67808837.lua index 754d3e947b..52567d617b 100644 --- a/official/c67808837.lua +++ b/official/c67808837.lua @@ -1,4 +1,5 @@ --EMキングベアー +--Performapal King Bear local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c,false) @@ -41,10 +42,10 @@ function s.initial_effect(c) e4:SetValue(s.atkval) c:RegisterEffect(e4) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -54,15 +55,15 @@ function s.thfilter(c) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDestructable() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -72,16 +73,16 @@ function s.indescon(e) return e:GetHandler():IsAttackPos() end function s.indesval(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.atkcon(e) local ph=Duel.GetCurrentPhase() local tp=Duel.GetTurnPlayer() - return tp==e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return tp==e:GetHandler():GetControler() and Duel.IsBattlePhase() end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_ONFIELD,0,nil)*100 -end +end \ No newline at end of file diff --git a/official/c67820935.lua b/official/c67820935.lua index 83d0a3bd82..1e4bf09f21 100644 --- a/official/c67820935.lua +++ b/official/c67820935.lua @@ -1,6 +1,5 @@ --肥大化 --Massivemorph - local s,id=GetID() function s.initial_effect(c) --Opponent's monster's ATK/DEF becomes doubled, but cannot attack directly @@ -10,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -32,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -44,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end \ No newline at end of file diff --git a/official/c67829249.lua b/official/c67829249.lua index be0c4812f9..85d3138a39 100644 --- a/official/c67829249.lua +++ b/official/c67829249.lua @@ -19,7 +19,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.setfilter(c) return c:IsSpell() and c:IsSSetable() diff --git a/official/c67831115.lua b/official/c67831115.lua index 8ded23c244..f598b11687 100644 --- a/official/c67831115.lua +++ b/official/c67831115.lua @@ -1,4 +1,5 @@ --星遺物に差す影 +--World Legacy in Shadow local s,id=GetID() function s.initial_effect(c) --activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x104)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_KRAWLER)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -40,7 +41,7 @@ function s.initial_effect(c) e5:SetOperation(s.tgop) c:RegisterEffect(e5) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.spfilter(c,e,tp) return c:IsLevelBelow(2) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) end @@ -80,4 +81,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToBattle() then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67835547.lua b/official/c67835547.lua index c5bc353567..d0f06145c8 100644 --- a/official/c67835547.lua +++ b/official/c67835547.lua @@ -1,13 +1,13 @@ --- まどろみの神碑 --- Mysterune of Slumber --- Scripted by Hatter +--まどろみの神碑 +--Runick Slumber +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateMysteruneQPEffect(c,id,0,s.natktg,s.natkop,3,EFFECT_FLAG_CARD_TARGET) c:RegisterEffect(e1) end -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.natktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -18,22 +18,22 @@ function s.natkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then local c=e:GetHandler() - -- Cannot attack this turn + --Cannot attack this turn local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,3)) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - -- Destruction protection + --Destruction protection local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCountLimit(1) e2:SetValue(function(_,_,r) return (r&REASON_BATTLE+REASON_EFFECT)~=0 end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) return true end diff --git a/official/c6783559.lua b/official/c6783559.lua index 59f3ddf976..10ba4c0bf6 100644 --- a/official/c6783559.lua +++ b/official/c6783559.lua @@ -1,4 +1,5 @@ --アリジバク +--Self-Destruct Ant local s,id=GetID() function s.initial_effect(c) --flip @@ -34,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -45,4 +46,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67853262.lua b/official/c67853262.lua index eaa0816827..1199ab05ba 100644 --- a/official/c67853262.lua +++ b/official/c67853262.lua @@ -41,4 +41,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c67865534.lua b/official/c67865534.lua index 32f2b42acf..ee9529eeb5 100644 --- a/official/c67865534.lua +++ b/official/c67865534.lua @@ -1,5 +1,5 @@ --希望の魔術師 ---Hope Magician +--Magician of Hope local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -53,10 +53,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsType(TYPE_PENDULUM) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end @@ -75,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -88,7 +84,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.xyzfilter(c) return c:IsType(TYPE_PENDULUM) and c:IsMonster() @@ -106,4 +102,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then Duel.Overlay(c,tc) end -end +end \ No newline at end of file diff --git a/official/c67901914.lua b/official/c67901914.lua index 740a91b79a..659f15c330 100644 --- a/official/c67901914.lua +++ b/official/c67901914.lua @@ -1,7 +1,6 @@ --魔弾-ネバー・エンドルフィン --Magical Musket - Steady Hands --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Targeted "Magical Musket" monster's ATK/DEF becomes double of original ATK/DEF @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,19 +23,15 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x108} - +s.listed_series={SET_MAGICAL_MUSKET} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 and Duel.GetAttackTarget()==nil then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x108) and c:GetFlagEffect(id)==0 + return c:IsFaceup() and c:IsSetCard(SET_MAGICAL_MUSKET) and c:GetFlagEffect(id)==0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -46,7 +41,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) g:GetFirst():RegisterEffect(e1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -58,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) diff --git a/official/c67904682.lua b/official/c67904682.lua index c05c0b1205..54800552c3 100644 --- a/official/c67904682.lua +++ b/official/c67904682.lua @@ -1,4 +1,5 @@ --ダーク・フラット・トップ +--Dark Flattop local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -27,10 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x63} +s.listed_series={SET_REACTOR} s.listed_names={16898077} function s.spfilter1(c,e,tp) - return (c:IsSetCard(0x63) or c:IsCode(16898077)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return (c:IsSetCard(SET_REACTOR) or c:IsCode(16898077)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter1(chkc,e,tp) end @@ -64,4 +65,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c67906797.lua b/official/c67906797.lua index 1e159fefa7..49d4940988 100644 --- a/official/c67906797.lua +++ b/official/c67906797.lua @@ -1,5 +1,5 @@ --天地返し ---Upside Down +--The Great Noodle Inversion --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) diff --git a/official/c67922702.lua b/official/c67922702.lua index 1b45233ff1..8cd4c2a642 100644 --- a/official/c67922702.lua +++ b/official/c67922702.lua @@ -2,43 +2,43 @@ --Mecha Phantom Beast Tetherwolf local s,id=GetID() function s.initial_effect(c) - --Gains the levels of all "Mecha Phantom Beast Token" + --Special Summon 1 "Mecha Phantom Beast Token" (Machine/WIND/Level 3/ATK 0/DEF 0) local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetValue(s.lvval) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Cannot be destroyed by battle or effects while you control a Token + --This card's Level is increased by the total Levels of all "Mecha Phantom Beast Tokens" you control local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetCondition(s.indcon) - e2:SetValue(1) + e2:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCode,TOKEN_MECHA_PHANTOM_BEAST),c:GetControler(),LOCATION_MZONE,0,nil):GetSum(Card.GetLevel) end) c:RegisterEffect(e2) - local e3=e2:Clone() - e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + --While you control a Token, this card cannot be destroyed by battle or card effects + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) + e3:SetRange(LOCATION_MZONE) + e3:SetCondition(s.indcon) + e3:SetValue(1) c:RegisterEffect(e3) - --Special Summon 1 "Mecha Phantom Beast Token" - local e4=Effect.CreateEffect(c) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) - e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_SUMMON_SUCCESS) - e4:SetTarget(s.sptg) - e4:SetOperation(s.spop) + local e4=e3:Clone() + e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e4) - --Increase its ATK by 800 + --Make this card gain 800 ATK, until the end of that turn local e5=Effect.CreateEffect(c) e5:SetDescription(aux.Stringid(id,1)) e5:SetCategory(CATEGORY_ATKCHANGE) e5:SetType(EFFECT_TYPE_QUICK_O) - e5:SetRange(LOCATION_MZONE) - e5:SetCode(EVENT_FREE_CHAIN) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP) + e5:SetCode(EVENT_FREE_CHAIN) + e5:SetRange(LOCATION_MZONE) e5:SetHintTiming(TIMING_DAMAGE_STEP) e5:SetCondition(s.atkcon) e5:SetCost(s.atkcost) @@ -46,15 +46,6 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={TOKEN_MECHA_PHANTOM_BEAST} -function s.lvval(e,c) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsCode,TOKEN_MECHA_PHANTOM_BEAST),c:GetControler(),LOCATION_MZONE,0,nil):GetSum(Card.GetLevel) -end -function s.tknfilter(c) - return c:IsType(TYPE_TOKEN) or c:IsOriginalType(TYPE_TOKEN) -end -function s.indcon(e) - return Duel.IsExistingMatchingCard(s.tknfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) @@ -67,16 +58,26 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end end +function s.tknfilter(c) + return c:IsType(TYPE_TOKEN) or c:IsOriginalType(TYPE_TOKEN) +end +function s.indcon(e) + return Duel.IsExistingMatchingCard(s.tknfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) +end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetBattleTarget()~=nil and Duel.IsPhase(PHASE_DAMAGE) and not Duel.IsDamageCalculated() + local bc=e:GetHandler():GetBattleTarget() + return Duel.IsPhase(PHASE_DAMAGE) and not Duel.IsDamageCalculated() and bc and bc:IsControler(1-tp) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not e:GetHandler():HasFlagEffect(id) - and Duel.CheckReleaseGroupCost(tp,Card.IsType,1,false,nil,nil,TYPE_TOKEN) end + local c=e:GetHandler() + if chk==0 then return not c:HasFlagEffect(id) and Duel.CheckReleaseGroupCost(tp,Card.IsType,1,false,nil,nil,TYPE_TOKEN) end local g=Duel.SelectReleaseGroupCost(tp,Card.IsType,1,1,false,nil,nil,TYPE_TOKEN) Duel.Release(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():UpdateAttack(800,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) -end \ No newline at end of file + local c=e:GetHandler() + if c:IsRelateToEffect(e) and c:IsFaceup() then + c:UpdateAttack(800,RESETS_STANDARD_DISABLE_PHASE_END) + end +end diff --git a/official/c67934141.lua b/official/c67934141.lua index d641842083..62e54f00fe 100644 --- a/official/c67934141.lua +++ b/official/c67934141.lua @@ -1,4 +1,5 @@ --超熱血球児 +--Ultimate Baseball Kid local s,id=GetID() function s.initial_effect(c) --atkup @@ -45,4 +46,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c67949763.lua b/official/c67949763.lua index 2945143084..f8aa6f00bf 100644 --- a/official/c67949763.lua +++ b/official/c67949763.lua @@ -16,7 +16,7 @@ end s.listed_names={67949764} function s.filter(c,tp) return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x87,TYPES_TOKEN,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_UMBRAL_HORROR,TYPES_TOKEN,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,tp) end @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) atk=tc:GetAttack() cr=true end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x87,TYPES_TOKEN,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end + if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_UMBRAL_HORROR,TYPES_TOKEN,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end if cr then local de=Effect.CreateEffect(e:GetHandler()) de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -54,24 +54,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK) e3:SetValue(atk) e3:SetLabelObject(tc) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e3,true) if cr then - token:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,0,rfid) - tc:CreateRelation(token,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + token:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,0,rfid) + tc:CreateRelation(token,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) end end Duel.SpecialSummonComplete() @@ -84,4 +84,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,0,nil,e:GetLabel()) Duel.Destroy(g,REASON_EFFECT) e:Reset() -end +end \ No newline at end of file diff --git a/official/c67951831.lua b/official/c67951831.lua index d65aef8a71..3977661742 100644 --- a/official/c67951831.lua +++ b/official/c67951831.lua @@ -1,4 +1,5 @@ --ヒーローハート +--Hero Heart local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3008) + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -27,13 +28,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c6795211.lua b/official/c6795211.lua index b92f3e1ded..fdb9ec613c 100644 --- a/official/c6795211.lua +++ b/official/c6795211.lua @@ -1,4 +1,5 @@ --アポート +--Teleport local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -23,10 +24,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c,e,sp) return c:IsRace(RACE_PSYCHIC) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end @@ -45,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c67955331.lua b/official/c67955331.lua index 5bf9571181..76612c9813 100644 --- a/official/c67955331.lua +++ b/official/c67955331.lua @@ -1,5 +1,5 @@ --幸運の前借り ---Luck Loan +--Lucky Loan --Adapted from the TF version by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x12e} +s.listed_series={SET_FORTUNE_FAIRY} function s.spfilter(c,lv,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:HasLevel() and c:GetOriginalLevel()==lv-1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x12e) and c:HasLevel() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,c:GetOriginalLevel(),e,tp) + return c:IsFaceup() and c:IsSetCard(SET_FORTUNE_FAIRY) and c:HasLevel() + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,c:GetOriginalLevel(),e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -29,13 +29,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tc:GetOriginalLevel(),e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,tc:GetOriginalLevel(),e,tp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.spcon) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetDescription(aux.Stringid(id,0)) @@ -62,4 +62,4 @@ function s.spcon(e) end function s.splimit(e,c,tp,sumtp,sumpos) return not c:IsRace(RACE_SPELLCASTER) -end +end \ No newline at end of file diff --git a/official/c67957315.lua b/official/c67957315.lua index 7adbb5e615..34f32a389d 100644 --- a/official/c67957315.lua +++ b/official/c67957315.lua @@ -9,14 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(TIMING_BATTLE_PHASE+TIMING_CHAIN_END) + e1:SetHintTiming(TIMING_BATTLE_PHASE|TIMING_CHAIN_END) e1:SetCondition(s.adcon) e1:SetCost(s.adcost) e1:SetOperation(s.adop) c:RegisterEffect(e1) end function s.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() and (e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget()) end function s.cfilter(c) @@ -24,7 +24,7 @@ function s.cfilter(c) end function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.adop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,10 +33,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c67959180.lua b/official/c67959180.lua index 3284686abd..b1d87c8de7 100644 --- a/official/c67959180.lua +++ b/official/c67959180.lua @@ -24,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) if Duel.CallCoin(tp) then e1:SetValue(c:GetAttack()*2) else diff --git a/official/c67964209.lua b/official/c67964209.lua index da935a08ea..8f9bd28c29 100644 --- a/official/c67964209.lua +++ b/official/c67964209.lua @@ -1,4 +1,5 @@ --神竜アクアバザル +--Divine Dragon Aquabizarre local s,id=GetID() function s.initial_effect(c) --todeck @@ -36,6 +37,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c67968069.lua b/official/c67968069.lua index 99d583b778..3f1284bca9 100644 --- a/official/c67968069.lua +++ b/official/c67968069.lua @@ -1,4 +1,5 @@ --ジャンク・パペット +--Junk Puppet local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.filter(c,e,tp) - return c:IsSetCard(0x1083) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c67972302.lua b/official/c67972302.lua index d6861e2103..972f94d0fc 100644 --- a/official/c67972302.lua +++ b/official/c67972302.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfRevealCost) + e2:SetCost(Cost.SelfReveal) e2:SetTarget(s.nstg) e2:SetOperation(s.nsop) c:RegisterEffect(e2) diff --git a/official/c67985943.lua b/official/c67985943.lua index 14e5f3ec31..45556930a6 100644 --- a/official/c67985943.lua +++ b/official/c67985943.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),aux.FilterBoolFunctionEx(Card.IsRace,RACE_PYRO)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),aux.FilterBoolFunctionEx(Card.IsRace,RACE_PYRO)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -23,8 +23,8 @@ function s.initial_effect(c) e3:SetCondition(s.actcon) c:RegisterEffect(e3) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end diff --git a/official/c67987611.lua b/official/c67987611.lua index b8702029e2..c138614280 100644 --- a/official/c67987611.lua +++ b/official/c67987611.lua @@ -1,4 +1,5 @@ --アマゾネスの弩弓隊 +--Amazoness Archers local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4) + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) return not c:IsPosition(POS_FACEUP_ATTACK) @@ -36,12 +37,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_MUST_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c6799227.lua b/official/c6799227.lua index 3525825afe..bdfc912368 100644 --- a/official/c6799227.lua +++ b/official/c6799227.lua @@ -1,4 +1,5 @@ --ハーフ・カウンター +--Half Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,8 +30,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68001309.lua b/official/c68001309.lua index b99ac085cc..fb797c532d 100644 --- a/official/c68001309.lua +++ b/official/c68001309.lua @@ -1,4 +1,5 @@ --Subterror Cave Clash +--Subterror Cave Clash local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xed)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SUBTERROR)) e2:SetValue(s.atkval) c:RegisterEffect(e2) local e3=e2:Clone() @@ -32,17 +33,17 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} s.listed_names={id} function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil)*500 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local rc=eg:GetFirst() - return ep~=tp and rc:IsControler(tp) and rc:IsSetCard(0xed) + return ep~=tp and rc:IsControler(tp) and rc:IsSetCard(SET_SUBTERROR) end function s.thfilter(c) - return c:IsSetCard(0xed) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SUBTERROR) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -57,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68005187.lua b/official/c68005187.lua index a0c2639ba2..c91c3a476e 100644 --- a/official/c68005187.lua +++ b/official/c68005187.lua @@ -22,12 +22,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_RELEASE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68007326.lua b/official/c68007326.lua index c4b576d85a..e76017f448 100644 --- a/official/c68007326.lua +++ b/official/c68007326.lua @@ -1,4 +1,5 @@ --守護天使 ジャンヌ +--Guardian Angel Joan local s,id=GetID() function s.initial_effect(c) --recover @@ -31,4 +32,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68018709.lua b/official/c68018709.lua index c6d2b32257..b1e373617a 100644 --- a/official/c68018709.lua +++ b/official/c68018709.lua @@ -11,4 +11,4 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e1:SetDescription(aux.Stringid(id,0)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c68024506.lua b/official/c68024506.lua index 43687568f1..e60078de59 100644 --- a/official/c68024506.lua +++ b/official/c68024506.lua @@ -31,7 +31,7 @@ s.listed_series={SET_MAGICAL_MUSKET} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - if Duel.GetCurrentPhase()&PHASE_DAMAGE+PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if Duel.GetCurrentPhase()&PHASE_DAMAGE|PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) return c:IsColumn(seq,p,LOCATION_SZONE) end diff --git a/official/c68038375.lua b/official/c68038375.lua index 35add4708c..608ff3d15d 100644 --- a/official/c68038375.lua +++ b/official/c68038375.lua @@ -1,5 +1,5 @@ --忍法 落葉舞 ---Ninjitsu Art of Fallen Leaves' Dance +--Ninjitsu Art of Dancing Leaves --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -35,13 +35,13 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x2b,0x61} +s.listed_series={SET_NINJA,SET_NINJITSU_ART} function s.releasefilter(c,tp) - return ((c:IsFaceup() and c:IsSetCard(0x2b)) or c:IsPosition(POS_FACEDOWN_DEFENSE)) and c:IsReleasableByEffect() + return ((c:IsFaceup() and c:IsSetCard(SET_NINJA)) or c:IsPosition(POS_FACEDOWN_DEFENSE)) and c:IsReleasableByEffect() and Duel.GetMZoneCount(tp,c)>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NINJA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.releasefilter(chkc,tp) end @@ -70,7 +70,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x61) and c:IsSpellTrap() and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_NINJITSU_ART) and c:IsSpellTrap() and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end diff --git a/official/c68045685.lua b/official/c68045685.lua index d70a057702..78839fe418 100644 --- a/official/c68045685.lua +++ b/official/c68045685.lua @@ -1,7 +1,6 @@ --武神籬 ---Bujintersection +--Bujincandescence --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -42,31 +41,26 @@ function s.initial_effect(c) e4:SetRange(LOCATION_SZONE) e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCountLimit(1) - e4:SetCost(s.spcost) - e4:SetCondition(function(_,tp)return Duel.GetTurnPlayer()==tp end) + e4:SetCost(Cost.SelfToGrave) + e4:SetCondition(function(_,tp)return Duel.IsTurnPlayer(tp) end) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end - --Lists "Bujin" archetype -s.listed_series={0x88} - +s.listed_series={SET_BUJIN} function s.target(e,c) - return c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) + return c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) end - --Define cost function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x88) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_BUJIN) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) end - --Send 1 "Bujin" monster from hand/face-up to GY as cost function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end - --Activation legality function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsNegatable() and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end @@ -74,42 +68,34 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,1,0,0) end - --Negate 1 of opponent's face-up cards function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then + if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end end - --Send this face-up card to GY as cost -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end - --Check for a "Bujin" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_BUJIN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end - --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -118,10 +104,9 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end - --Special summon 1 "Bujin" monster from GY function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end \ No newline at end of file diff --git a/official/c68054593.lua b/official/c68054593.lua index ed2917df2a..689b20eeef 100644 --- a/official/c68054593.lua +++ b/official/c68054593.lua @@ -1,4 +1,5 @@ --燃える闘志 +--Fiery Fervor local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -28,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atkup local e1=Effect.CreateEffect(c) @@ -36,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK) e1:SetCondition(s.atkcon) e1:SetValue(s.atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -44,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -57,9 +55,9 @@ function s.atkfilter(c) return c:IsFaceup() and c:GetAttack()>c:GetBaseAttack() end function s.atkcon(e) - return (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL) + return (Duel.IsPhase(PHASE_DAMAGE) or Duel.IsPhase(PHASE_DAMAGE_CAL)) and Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil) end function s.atkval(e,c) return c:GetBaseAttack()*2 -end +end \ No newline at end of file diff --git a/official/c68057622.lua b/official/c68057622.lua index 0d031ce580..a425f3b8d6 100644 --- a/official/c68057622.lua +++ b/official/c68057622.lua @@ -1,4 +1,5 @@ --カウンターマシンガンパンチ +--Continuous Destruction Punch local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(Duel.GetAttacker(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68059897.lua b/official/c68059897.lua index 8ebb5d2079..e88be296d3 100644 --- a/official/c68059897.lua +++ b/official/c68059897.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_REMOVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.PayLPCost(900)) + e3:SetCost(Cost.PayLP(900)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c68073522.lua b/official/c68073522.lua index 15e710c810..59ce36a54d 100644 --- a/official/c68073522.lua +++ b/official/c68073522.lua @@ -1,4 +1,5 @@ --魂吸収 +--Soul Absorption local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68077936.lua b/official/c68077936.lua index a1df5504db..de8088b9ac 100644 --- a/official/c68077936.lua +++ b/official/c68077936.lua @@ -1,4 +1,5 @@ --融爆 +--Induced Explosion local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DESTROYED) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.descon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.activate) c:RegisterEffect(e2) @@ -28,7 +29,7 @@ function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) and re and re:IsActiveType(TYPE_SPELL) + return eg:IsExists(s.cfilter,1,nil,tp) and re and re:IsSpellEffect() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end @@ -44,5 +45,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.cfilter,1,nil,tp) and re and re:IsActiveType(TYPE_SPELL) and aux.exccon(e) -end + return eg:IsExists(s.cfilter,1,nil,tp) and re and re:IsSpellEffect() and aux.exccon(e) +end \ No newline at end of file diff --git a/official/c68084557.lua b/official/c68084557.lua index 667daa3e11..75f5592b21 100644 --- a/official/c68084557.lua +++ b/official/c68084557.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -57,4 +57,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:CheckEquipTarget(c) then Duel.Equip(tp,tc,c) end -end +end \ No newline at end of file diff --git a/official/c68087897.lua b/official/c68087897.lua index 32c5ed2385..f3d0a25fa3 100644 --- a/official/c68087897.lua +++ b/official/c68087897.lua @@ -1,4 +1,5 @@ --スケイルモース +--Scary Moth local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT) @@ -11,4 +12,4 @@ function s.initial_effect(c) e1:SetTargetRange(1,1) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c68120130.lua b/official/c68120130.lua index 881ddace88..034b99c5fe 100644 --- a/official/c68120130.lua +++ b/official/c68120130.lua @@ -1,4 +1,5 @@ --ジャンク・ディフェンダー +--Junk Defender local s,id=GetID() function s.initial_effect(c) --spsummon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) - e2:SetCondition(s.defcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetOperation(s.defup) c:RegisterEffect(e2) end @@ -43,15 +44,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -function s.defcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.defup(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c68124775.lua b/official/c68124775.lua index cafbb44c0b..7693fbd2f2 100644 --- a/official/c68124775.lua +++ b/official/c68124775.lua @@ -1,4 +1,5 @@ --オリエント・ドラゴン +--Orient Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -17,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemove() @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68140974.lua b/official/c68140974.lua index 56412a3d69..c959c58fd7 100644 --- a/official/c68140974.lua +++ b/official/c68140974.lua @@ -59,7 +59,7 @@ function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:IsType(TYPE_SYNCHRO) end function s.filter(c,tp) - return c:IsMonster() and (c:GetReason()&0x41)==0x41 and c:IsPreviousControler(tp) + return c:IsMonster() and (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -100,7 +100,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -114,7 +114,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return ep~=tp and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -127,4 +127,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68144350.lua b/official/c68144350.lua index 452f64e79a..ec5dc30277 100644 --- a/official/c68144350.lua +++ b/official/c68144350.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.counterfilter(c) - return c:IsSetCard(0x84) + return c:IsSetCard(SET_BATTLIN_BOXER) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -25,7 +25,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetLabelObject(e) @@ -33,10 +33,10 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x84) + return not c:IsSetCard(SET_BATTLIN_BOXER) end function s.filter(c,e,tp) - return c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BATTLIN_BOXER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -51,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c68159562.lua b/official/c68159562.lua index 2401ea8249..0740fb65eb 100644 --- a/official/c68159562.lua +++ b/official/c68159562.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.attachtg) e2:SetOperation(s.attachop) c:RegisterEffect(e2) diff --git a/official/c68167124.lua b/official/c68167124.lua index 06c43f86ae..d39d12f0fc 100644 --- a/official/c68167124.lua +++ b/official/c68167124.lua @@ -1,4 +1,5 @@ --針剣士 +--Stinging Swordsman local s,id=GetID() function s.initial_effect(c) --return @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_SZONE,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68170903.lua b/official/c68170903.lua index bb87a2f2ab..258c250e51 100644 --- a/official/c68170903.lua +++ b/official/c68170903.lua @@ -1,4 +1,5 @@ --陽動作戦 +--A Feint Plan local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,9 +16,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetValue(s.atlimit) - e1:SetReset(RESET_PHASE+PHASE_END,1) + e1:SetReset(RESET_PHASE|PHASE_END,1) Duel.RegisterEffect(e1,tp) end function s.atlimit(e,c) return c:IsFacedown() -end +end \ No newline at end of file diff --git a/official/c68182934.lua b/official/c68182934.lua index c378448728..d202935f93 100644 --- a/official/c68182934.lua +++ b/official/c68182934.lua @@ -1,4 +1,5 @@ --ドラコニアの翼竜騎兵 +--Sky Dragoons of Draconia local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -33,4 +34,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68191243.lua b/official/c68191243.lua index 30111a6479..b8e125cc9c 100644 --- a/official/c68191243.lua +++ b/official/c68191243.lua @@ -1,4 +1,5 @@ --黒蠍団召集 +--Mustering of the Dark Scorpions local s,id=GetID() function s.initial_effect(c) --activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x1a} +s.listed_series={SET_DARK_SCORPION} s.listed_names={76922029} function s.cfilter(c) return c:IsFaceup() and c:IsCode(76922029) @@ -20,7 +21,7 @@ function s.con(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x1a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DARK_SCORPION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,4 +36,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c68191756.lua b/official/c68191756.lua index c0b2240408..3816c730fe 100644 --- a/official/c68191756.lua +++ b/official/c68191756.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10c} +s.listed_series={SET_MEKK_KNIGHT} function s.filter(c,e,tp) - return c:IsSetCard(0x10c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -32,15 +32,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.splimit(e,c) - return not c:IsSetCard(0x10c) + return not c:IsSetCard(SET_MEKK_KNIGHT) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -69,4 +69,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoHand(tc,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68215963.lua b/official/c68215963.lua index 57065bcb94..a85504774c 100644 --- a/official/c68215963.lua +++ b/official/c68215963.lua @@ -1,4 +1,5 @@ --宝玉獣 エメラルド・タートル +--Crystal Beast Emerald Tortoise local s,id=GetID() function s.initial_effect(c) --send replace @@ -31,10 +32,10 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.filter(c) return c:IsAttackPos() and c:GetAttackedCount()>0 and c:IsCanChangePosition() @@ -51,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0) end -end +end \ No newline at end of file diff --git a/official/c68223137.lua b/official/c68223137.lua index 3851c9a304..6ecb4357a4 100644 --- a/official/c68223137.lua +++ b/official/c68223137.lua @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and (not tc:IsAbleToDeck() or Duel.SelectYesNo(tp,aux.Stringid(id,0))) then Duel.SpecialSummon(tc,0,tp,p,false,false,POS_FACEUP) else - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c68226653.lua b/official/c68226653.lua index 4636b8bbff..818c0f186c 100644 --- a/official/c68226653.lua +++ b/official/c68226653.lua @@ -1,4 +1,5 @@ --フレムベル・ドラグノフ +--Flamvell Dragnov local s,id=GetID() function s.initial_effect(c) --damage @@ -61,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c68246154.lua b/official/c68246154.lua index 7ad375ea82..91ea8fa303 100644 --- a/official/c68246154.lua +++ b/official/c68246154.lua @@ -95,4 +95,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c68250822.lua b/official/c68250822.lua index d7b2f1ef99..d336797e11 100644 --- a/official/c68250822.lua +++ b/official/c68250822.lua @@ -1,5 +1,5 @@ --スプライト・ダブルクロス ---Splight Double Cross +--Spright Double Cross --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -30,13 +30,13 @@ function s.spfilter(c,e,tp,zone) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local zone=aux.GetMMZonesPointedTo(tp,Card.IsLink,LOCATION_MZONE,0,nil,2) - local b1=Duel.IsExistingTarget(s.atchfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp) + local b1=Duel.IsExistingTarget(s.atchfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil,tp) local b2=Duel.IsExistingTarget(s.ctrlfilter,tp,0,LOCATION_MZONE,1,nil,zone) local b3=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,zone) if chkc then local label=e:GetLabel() if label==1 then - return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.atchfilter(chkc,tp) + return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.atchfilter(chkc,tp) elseif label==2 then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.ctrlfilter(chkc,zone) elseif label==3 then @@ -52,7 +52,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if op==1 then e:SetCategory(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - local g=Duel.SelectTarget(tp,s.atchfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.atchfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil,tp) if g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) end diff --git a/official/c68258355.lua b/official/c68258355.lua index df3e4c3f91..d25441f12c 100644 --- a/official/c68258355.lua +++ b/official/c68258355.lua @@ -1,7 +1,6 @@ --ZS-武装賢者 ---ZS - Arms Sage +--ZS - Armed Sage --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -26,8 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Utopia" and "ZW -" archetype -s.listed_series={0x107f,0x107e} - +s.listed_series={SET_UTOPIA,SET_ZW} --Check for exactly 1 level 4 monster function s.spcon(e) local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) @@ -38,7 +36,7 @@ end --If an "Utopia" Xyz used this card as material function s.efcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return r==REASON_XYZ and c:GetReasonCard():IsSetCard(0x107f) + return r==REASON_XYZ and c:GetReasonCard():IsSetCard(SET_UTOPIA) end --Grant effect to "Utopia "Xyz monster using this card as material function s.efop(e,tp,eg,ep,ev,re,r,rp) @@ -53,24 +51,24 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.xyzcon) e1:SetTarget(s.xyztg) e1:SetOperation(s.xyzop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end --If Xyz summoned function s.xyzcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end --Check for "ZW -" monster function s.filter(c) - return c:IsSetCard(0x107e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ZW) and c:IsMonster() and c:IsAbleToHand() end --Activation legality function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -85,4 +83,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c68280530.lua b/official/c68280530.lua index 49d38626d3..fcf8b19140 100644 --- a/official/c68280530.lua +++ b/official/c68280530.lua @@ -1,4 +1,5 @@ --ロイヤルナイツ +--Royal Knight local s,id=GetID() function s.initial_effect(c) --recover @@ -31,4 +32,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68295149.lua b/official/c68295149.lua index dbd15d1985..000af1a8b9 100644 --- a/official/c68295149.lua +++ b/official/c68295149.lua @@ -42,11 +42,11 @@ function s.atkfilter(c) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and s.atkfilter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_MZONE) and s.atkfilter(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) - and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -61,11 +61,11 @@ function s.op(tc,c,atk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end function s.tgval(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and rp~=e:GetHandlerPlayer() + return re:IsMonsterEffect() and rp~=e:GetHandlerPlayer() end function s.repfilter(c,e) return c:IsType(TYPE_FRSX) and c:IsMonster() and c:IsAbleToRemove() @@ -84,5 +84,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c68299524.lua b/official/c68299524.lua index d87bebd230..f9dfcacb97 100644 --- a/official/c68299524.lua +++ b/official/c68299524.lua @@ -1,4 +1,5 @@ --パンデミック・ドラゴン +--Pandemic Dragon local s,id=GetID() function s.initial_effect(c) --attack down @@ -59,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -92,7 +93,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68300121.lua b/official/c68300121.lua index c8c6c8f619..c160b0e311 100644 --- a/official/c68300121.lua +++ b/official/c68300121.lua @@ -12,8 +12,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_START) e2:SetCondition(s.gycon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.gytg) e2:SetOperation(s.gyop) c:RegisterEffect(e2) diff --git a/official/c6830480.lua b/official/c6830480.lua index 36625b27e7..14b0ebf7e5 100644 --- a/official/c6830480.lua +++ b/official/c6830480.lua @@ -31,18 +31,18 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.tg) e3:SetOperation(s.op) c:RegisterEffect(e3) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0x2b) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_NINJA) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:IsControler(tp) and at:IsSetCard(0x2b) + return at:IsControler(tp) and at:IsSetCard(SET_NINJA) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -52,16 +52,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) at:RegisterEffect(e1) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) + return c:IsFaceup() and c:IsSetCard(SET_NINJA) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -75,8 +71,8 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68304813.lua b/official/c68304813.lua index c85e6f25dd..b021280129 100644 --- a/official/c68304813.lua +++ b/official/c68304813.lua @@ -1,4 +1,5 @@ --冥界の宝札 +--Precious Cards from Beyond local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local mg=tc:GetMaterial() - return tc:IsSummonType(SUMMON_TYPE_TRIBUTE) and tc:IsSummonPlayer(tp) and mg + return tc:IsTributeSummoned() and tc:IsSummonPlayer(tp) and mg and mg:FilterCount(s.cfilter,nil)>=2 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68319538.lua b/official/c68319538.lua index 38dff564d4..329f9e49af 100644 --- a/official/c68319538.lua +++ b/official/c68319538.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterSummonCode(652362),1,1,Synchro.NonTunerEx(Card.IsSetCard,0xc),1,99) + Synchro.AddProcedure(c,aux.FilterSummonCode(652362),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_ALIEN),1,99) c:EnableReviveLimit() --to hand local e1=Effect.CreateEffect(c) @@ -31,7 +31,7 @@ function s.initial_effect(c) end s.material={652362} s.listed_names={652362} -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.filter(c) return c:IsFaceup() and c:IsSpellTrap() and c:IsAbleToHand() @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68334074.lua b/official/c68334074.lua index 696de9b6c9..39f24fe36c 100644 --- a/official/c68334074.lua +++ b/official/c68334074.lua @@ -20,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,2,REASON_COST) end function s.filter(c,e,tp) - return c:IsCode(CARD_DARK_MAGICIAN,78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsCode(CARD_DARK_MAGICIAN,CARD_BUSTER_BLADER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c68353324.lua b/official/c68353324.lua index 0e2917ae40..a08a3da0cd 100644 --- a/official/c68353324.lua +++ b/official/c68353324.lua @@ -1,4 +1,5 @@ --素早いビーバー +--Nimble Beaver local s,id=GetID() function s.initial_effect(c) --summon success @@ -11,20 +12,20 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x78} +s.listed_series={SET_NIMBLE} function s.filter(c,e,tp) - return c:IsSetCard(0x78) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NIMBLE) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c6836211.lua b/official/c6836211.lua index 5281bffc99..9188bbc38a 100644 --- a/official/c6836211.lua +++ b/official/c6836211.lua @@ -1,4 +1,5 @@ --大皇帝ペンギン +--The Great Emperor Penguin local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,17 +8,13 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x5a) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PENGUIN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -35,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c68366996.lua b/official/c68366996.lua index bd61318de9..854d76f7b0 100644 --- a/official/c68366996.lua +++ b/official/c68366996.lua @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c68392533.lua b/official/c68392533.lua index ece28da3f8..dece8e74ba 100644 --- a/official/c68392533.lua +++ b/official/c68392533.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_TO_GRAVE) e2:SetCondition(s.thcon) - e2:SetCost(s.thcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -42,10 +42,6 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) local ec=c:GetPreviousEquipTarget() return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToHand() end Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) @@ -56,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c68395509.lua b/official/c68395509.lua index 5bc2bd0b71..26d755b358 100644 --- a/official/c68395509.lua +++ b/official/c68395509.lua @@ -1,4 +1,5 @@ --マジェスペクター・クロウ +--Majespecter Crow - Yata local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -33,9 +34,9 @@ function s.initial_effect(c) e5:SetValue(s.indval) c:RegisterEffect(e5) end -s.listed_series={0xd0} +s.listed_series={SET_MAJESPECTER} function s.thfilter(c) - return c:IsSetCard(0xd0) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_MAJESPECTER) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -51,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c68396121.lua b/official/c68396121.lua index 8a0ab01e34..9b1c926097 100644 --- a/official/c68396121.lua +++ b/official/c68396121.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.negop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --atk @@ -27,10 +27,6 @@ function s.initial_effect(c) end s.xyz_number=107 s.listed_names={88177324} -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT)) and not c:IsDisabled() end @@ -42,12 +38,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end local e1=Effect.CreateEffect(c) @@ -56,12 +52,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(0,1) Duel.RegisterEffect(e2,tp) end @@ -87,7 +83,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c68396778.lua b/official/c68396778.lua index e7c8f36ddc..0d57502705 100644 --- a/official/c68396778.lua +++ b/official/c68396778.lua @@ -1,4 +1,5 @@ --悪魔への貢物 +--Faustian Bargain local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,ft,tp) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) + return c:IsSpecialSummoned() and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) end function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c68400115.lua b/official/c68400115.lua index e927dc38ac..c786f3a657 100644 --- a/official/c68400115.lua +++ b/official/c68400115.lua @@ -1,4 +1,5 @@ --裸の王様 +--The Emperor's Holiday local s,id=GetID() function s.initial_effect(c) --activate @@ -31,4 +32,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if tl==LOCATION_SZONE and re:IsActiveType(TYPE_EQUIP) and re:GetHandler()~=e:GetHandler() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c6840573.lua b/official/c6840573.lua index 76d3c2b85a..8cc0b35065 100644 --- a/official/c6840573.lua +++ b/official/c6840573.lua @@ -1,7 +1,8 @@ --バロックス +--Barox local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,98818516,15303296) -end +end \ No newline at end of file diff --git a/official/c68406755.lua b/official/c68406755.lua index fc82f5ff1b..d968841f06 100644 --- a/official/c68406755.lua +++ b/official/c68406755.lua @@ -45,13 +45,13 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0xe2} +s.listed_series={SET_TRIAMID} function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0xe2) + return se:GetHandler():IsSetCard(SET_TRIAMID) end function s.spfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) - and c:IsSetCard(0xe2) and not c:IsCode(id) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) + and c:IsSetCard(SET_TRIAMID) and not c:IsCode(id) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -68,7 +68,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe2) + return c:IsFaceup() and c:IsSetCard(SET_TRIAMID) end function s.efcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler()) @@ -79,4 +79,4 @@ function s.atkval(e,c) end function s.attg(e,c) return c:IsCode(id) -end +end \ No newline at end of file diff --git a/official/c68427465.lua b/official/c68427465.lua index 2777ac7b9e..5ae8efe592 100644 --- a/official/c68427465.lua +++ b/official/c68427465.lua @@ -1,4 +1,5 @@ --破邪の大剣-バオウ +--Wicked-Breaking Flamberge - Baou local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,nil,nil,s.cost) @@ -28,12 +29,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c68431965.lua b/official/c68431965.lua index 32fd298f55..a1f4b1468c 100644 --- a/official/c68431965.lua +++ b/official/c68431965.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCondition(s.sccon) e2:SetTarget(s.sctarg) e2:SetOperation(s.scop) c:RegisterEffect(e2) end function s.lvlcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.tgfilter(c,lv) return c:IsLevelBelow(lv-1) and c:IsAbleToGrave() @@ -54,7 +54,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Cannot activate the effects of monsters with the same name local e2=Effect.CreateEffect(c) @@ -64,16 +64,16 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(1,0) e2:SetValue(s.aclimit) e2:SetLabel(tc:GetCode()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_TRIGGER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end function s.aclimit(e,re,tp) - return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER) + return re:GetHandler():IsCode(e:GetLabel()) and re:IsMonsterEffect() end function s.sccon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() @@ -93,4 +93,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c68441986.lua b/official/c68441986.lua index e92a6bf42e..08a59ff5ce 100644 --- a/official/c68441986.lua +++ b/official/c68441986.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.countercond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.countertg) e2:SetOperation(s.counterop) c:RegisterEffect(e2) @@ -72,7 +72,7 @@ function s.counterop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetCondition(function(e) return e:GetHandler():GetCounter(0x1101)>0 end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c68450517.lua b/official/c68450517.lua index 3fc02553b3..7c1228453b 100644 --- a/official/c68450517.lua +++ b/official/c68450517.lua @@ -1,6 +1,5 @@ --A・ジェネクス・ドゥルダーク --Genex Ally Duradark - local s,id=GetID() function s.initial_effect(c) --Destroy 1 of opponent's monster, who has same attribute as this card @@ -24,7 +23,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.filter(c,att) diff --git a/official/c68456353.lua b/official/c68456353.lua index 874ba6adbe..6973e84170 100644 --- a/official/c68456353.lua +++ b/official/c68456353.lua @@ -1,4 +1,5 @@ --エクストリオの牙 +--Exterio's Fang local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) + return c:IsFaceup() and c:IsSetCard(SET_NATURIA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp~=tp and Duel.IsChainNegatable(ev) @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT,nil) -end +end \ No newline at end of file diff --git a/official/c68462976.lua b/official/c68462976.lua index 551b97cc4e..b12ba5710b 100644 --- a/official/c68462976.lua +++ b/official/c68462976.lua @@ -1,4 +1,5 @@ --魔法族の里 +--Secret Village of the Spellcasters local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,7 +27,7 @@ function s.initial_effect(c) e2:SetLabelObject(e3) end function s.actlimit(e,te,tp) - if not te:IsHasType(EFFECT_TYPE_ACTIVATE) or not te:IsActiveType(TYPE_SPELL) then return false end + if not te:IsHasType(EFFECT_TYPE_ACTIVATE) or not te:IsSpellEffect() then return false end if tp==e:GetHandlerPlayer() then return e:GetLabel()==1 else return e:GetLabel()==2 end end @@ -37,4 +38,4 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) if not b1 then te:SetLabel(1) elseif b1 and not b2 then te:SetLabel(2) else te:SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c68464358.lua b/official/c68464358.lua index 431b2c717c..373cb42b7b 100644 --- a/official/c68464358.lua +++ b/official/c68464358.lua @@ -17,12 +17,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.desfilter(c,ft) return c:IsFaceup() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -51,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c68468459.lua b/official/c68468459.lua index c84c8dd83d..3dcadcdfdc 100644 --- a/official/c68468459.lua +++ b/official/c68468459.lua @@ -28,5 +28,5 @@ function s.fextra(e,tp,mg) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) -end + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c68473226.lua b/official/c68473226.lua index c050942205..973c71bdf8 100644 --- a/official/c68473226.lua +++ b/official/c68473226.lua @@ -1,6 +1,5 @@ --ハードアームドラゴン --Hardened Armed Dragon - local s,id=GetID() function s.initial_effect(c) --Special summon procedure @@ -63,7 +62,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) e1:SetCondition(s.indcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) end function s.indcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c68477598.lua b/official/c68477598.lua index cba946d117..d63626ca9e 100644 --- a/official/c68477598.lua +++ b/official/c68477598.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsPendulumSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and eg:IsExists(s.cfilter,1,nil) @@ -25,5 +25,5 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) - Duel.SendtoDeck(eg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c6849042.lua b/official/c6849042.lua index 495babf9cc..a103bff55d 100644 --- a/official/c6849042.lua +++ b/official/c6849042.lua @@ -35,4 +35,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68490573.lua b/official/c68490573.lua index 3482b20162..4560933393 100644 --- a/official/c68490573.lua +++ b/official/c68490573.lua @@ -1,5 +1,5 @@ - -- 大いなる魂 - -- The Great Soul + --大いなる魂 + --The Great Soul local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -21,12 +21,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.discon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.cfilter(c) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO) end @@ -34,7 +34,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x57) or (c:IsRace(RACE_DRAGON) and c:IsLevel(1))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_RESONATOR) or (c:IsRace(RACE_DRAGON) and c:IsLevel(1))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -58,7 +58,7 @@ function s.cfilter2(c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsChainDisablable(ev) then return false end - return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) and re:IsActiveType(TYPE_MONSTER) + return Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) and re:IsMonsterEffect() end function s.atkfilter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) @@ -77,7 +77,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetValue(2000) tc:RegisterEffect(e1) end diff --git a/official/c6850209.lua b/official/c6850209.lua index 71e3f87d30..53107ab113 100644 --- a/official/c6850209.lua +++ b/official/c6850209.lua @@ -39,13 +39,13 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return s[tp] and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end diff --git a/official/c68507541.lua b/official/c68507541.lua index 2c5e3cfe93..ffd8b70a03 100644 --- a/official/c68507541.lua +++ b/official/c68507541.lua @@ -1,8 +1,9 @@ --アマゾネスペット虎獅子 +--Amazoness Pet Liger local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,10979723,aux.FilterBoolFunctionEx(Card.IsSetCard,0x4)) + Fusion.AddProcMix(c,true,true,10979723,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_AMAZONESS)) --atk up local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,8 +34,8 @@ function s.initial_effect(c) e3:SetValue(s.atktg) c:RegisterEffect(e3) end -s.listed_series={0x4} -s.material_setcode=0x4 +s.listed_series={SET_AMAZONESS} +s.material_setcode=SET_AMAZONESS function s.atkcon1(e) return e:GetHandler()==Duel.GetAttacker() end @@ -44,7 +45,7 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(500) c:RegisterEffect(e1) end @@ -52,7 +53,7 @@ end function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=a:GetBattleTarget() - return a:IsControler(tp) and a:IsSetCard(0x4) + return a:IsControler(tp) and a:IsSetCard(SET_AMAZONESS) and d and d:IsControler(1-tp) end function s.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -67,11 +68,11 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-800) tc:RegisterEffect(e1) end end function s.atktg(e,c) - return c:IsFaceup() and c:IsSetCard(0x4) and c~=e:GetHandler() -end + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c6853254.lua b/official/c6853254.lua index 0310e4ba40..0296283946 100644 --- a/official/c6853254.lua +++ b/official/c6853254.lua @@ -1,4 +1,5 @@ --復活の福音 +--Return of the Dragon Lords local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -50,4 +51,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68535320.lua b/official/c68535320.lua index 8705afe020..a35d58e5f0 100644 --- a/official/c68535320.lua +++ b/official/c68535320.lua @@ -38,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c68540058.lua b/official/c68540058.lua index bfec17b2de..e787481e9d 100644 --- a/official/c68540058.lua +++ b/official/c68540058.lua @@ -1,4 +1,5 @@ --メタル化・魔法反射装甲 +--Metalmorph local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,14 +26,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -46,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) --atk up local e4=Effect.CreateEffect(c) @@ -54,16 +52,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetCondition(s.atkcon) e4:SetValue(s.atkval) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e4) else c:CancelToGrave(false) end end function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttacker()==e:GetHandler():GetEquipTarget() and Duel.GetAttackTarget() end function s.atkval(e,c) return Duel.GetAttackTarget():GetAttack()/2 -end +end \ No newline at end of file diff --git a/official/c68540059.lua b/official/c68540059.lua deleted file mode 100644 index 6a33af5e5c..0000000000 --- a/official/c68540059.lua +++ /dev/null @@ -1,67 +0,0 @@ ---メタル化・魔法反射装甲 -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_EQUIP) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsLocation(LOCATION_SZONE) then return end - local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - Duel.Equip(tp,c,tc) - c:CancelToGrave() - --Atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_EQUIP) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - c:RegisterEffect(e1) - local e2=e1:Clone() - e2:SetCode(EFFECT_UPDATE_DEFENSE) - c:RegisterEffect(e2) - --Equip limit - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetCode(EFFECT_EQUIP_LIMIT) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) - c:RegisterEffect(e3) - --atk up - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_EQUIP) - e4:SetCode(EFFECT_UPDATE_ATTACK) - e4:SetCondition(s.atkcon) - e4:SetValue(s.atkval) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) - c:RegisterEffect(e4) - end -end -function s.atkcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL - and Duel.GetAttacker()==e:GetHandler():GetEquipTarget() and Duel.GetAttackTarget() -end -function s.atkval(e,c) - return Duel.GetAttackTarget():GetAttack()/2 -end diff --git a/official/c68543408.lua b/official/c68543408.lua index a7e294d307..56fd403753 100644 --- a/official/c68543408.lua +++ b/official/c68543408.lua @@ -1,4 +1,5 @@ --スターダスト・シャオロン +--Stardust Xiaolong local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,7 +26,7 @@ end s.listed_names={CARD_STARDUST_DRAGON} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsCode(CARD_STARDUST_DRAGON) and tc:IsSummonType(SUMMON_TYPE_SYNCHRO) + return tc:IsControler(tp) and tc:IsCode(CARD_STARDUST_DRAGON) and tc:IsSynchroSummoned() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c6855503.lua b/official/c6855503.lua index 5c0de5dfea..32d838d302 100644 --- a/official/c6855503.lua +++ b/official/c6855503.lua @@ -1,8 +1,8 @@ --赫灼竜マスカレイド ---Masquerade, the Crimsongleam Dragon +--Masquerade the Blazing Dragon local s,id=GetID() function s.initial_effect(c) - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x166),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESPIA),s.matfilter) c:EnableReviveLimit() --activate cost local e1=Effect.CreateEffect(c) @@ -38,13 +38,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x166} +s.listed_series={SET_DESPIA} function s.matfilter(c,fc,st,tp) return c:IsAttribute(ATTRIBUTE_LIGHT,fc,st,tp) or c:IsAttribute(ATTRIBUTE_DARK,fc,st,tp) end function s.costcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsFusionSummoned() end function s.costchk(e,te_or_c,tp) local ct=#{Duel.GetPlayerEffect(tp,id)} @@ -74,7 +74,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c6859683.lua b/official/c6859683.lua index 144840d51e..a67a9636bc 100644 --- a/official/c6859683.lua +++ b/official/c6859683.lua @@ -1,4 +1,5 @@ --成功確率0% +--Success Probability 0% local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -21,4 +22,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g<2 then return end local rg=g:RandomSelect(tp,2) Duel.SendtoGrave(rg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68597372.lua b/official/c68597372.lua index ffdfd8a226..5c703be317 100644 --- a/official/c68597372.lua +++ b/official/c68597372.lua @@ -1,4 +1,5 @@ --発条機甲ゼンマイスター +--Wind-Up Zenmaister local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,10 +29,6 @@ end function s.atkval(e,c) return c:GetOverlayCount()*300 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsCanTurnSet() end @@ -46,12 +43,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCondition(s.flipcon) e1:SetOperation(s.flipop) e1:SetLabelObject(tc) @@ -65,4 +62,4 @@ end function s.flipop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.ChangePosition(tc,POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c68601507.lua b/official/c68601507.lua index 70985543a6..74572e2e61 100644 --- a/official/c68601507.lua +++ b/official/c68601507.lua @@ -10,21 +10,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=Duel.GetAttackTarget() if not c then return false end if c:IsControler(1-tp) then c=Duel.GetAttacker() end e:SetLabelObject(c) - return c and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsRelateToBattle() and not c:IsAttack(c:GetBaseAttack()*2) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return c and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and c:IsRelateToBattle() and not c:IsAttack(c:GetBaseAttack()*2) end function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetLabelObject() @@ -33,7 +29,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(c:GetBaseAttack()*2) c:RegisterEffect(e1) end diff --git a/official/c68618157.lua b/official/c68618157.lua index 0220029bae..03b5bdceb5 100644 --- a/official/c68618157.lua +++ b/official/c68618157.lua @@ -1,4 +1,5 @@ --武神姫-アマテラス +--Bujinki Amaterasu local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -15,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,17 +30,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.thcon) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -59,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.thfilter(c) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAbleToHand() @@ -77,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c68625727.lua b/official/c68625727.lua index fca82053c5..5ce319729f 100644 --- a/official/c68625727.lua +++ b/official/c68625727.lua @@ -1,6 +1,5 @@ --占術姫ペタルエルフ --Prediction Princess Petalelf - local s,id=GetID() function s.initial_effect(c) --Change opponent's attack position monsters to defense position @@ -32,7 +31,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e1) end end diff --git a/official/c68630939.lua b/official/c68630939.lua index 3544d15a79..0e8fd67a63 100644 --- a/official/c68630939.lua +++ b/official/c68630939.lua @@ -1,9 +1,9 @@ --- ナンバーズ・プロテクト --- Numbers Protect --- Scripted by Hatter +--ナンバーズ・プロテクト +--Numbers Protection +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate and destroy + --Negate and destroy local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) - -- Set itself from GY + --Set itself from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -27,11 +27,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsChainNegatable(ev) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -47,7 +47,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end function s.setfilter(c,tp) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + and c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.setfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) @@ -60,14 +60,14 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68658728.lua b/official/c68658728.lua index 320aa331cf..e6a4af70d5 100644 --- a/official/c68658728.lua +++ b/official/c68658728.lua @@ -1,4 +1,5 @@ --リトル・キメラ +--Little Chimera local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -19,4 +20,4 @@ function s.tg1(e,c) end function s.tg2(e,c) return c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c68661341.lua b/official/c68661341.lua index 2a64e0fe91..fe09c60058 100644 --- a/official/c68661341.lua +++ b/official/c68661341.lua @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) e1:SetLabel(g:GetFirst():GetCode()) @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c) return c:GetCode()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c68663748.lua b/official/c68663748.lua index fbd6074510..c1424b3e90 100644 --- a/official/c68663748.lua +++ b/official/c68663748.lua @@ -1,5 +1,5 @@ --フォーチュンフューチャー ---Fortune's Vision +--Fortune's Future local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x31) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_FORTUNE_LADY) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -28,8 +28,8 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68670547.lua b/official/c68670547.lua index 05f3b662d4..4fe6e8c0d1 100644 --- a/official/c68670547.lua +++ b/official/c68670547.lua @@ -1,4 +1,5 @@ --闇竜の黒騎士 +--Paladin of the Cursed Dragon local s,id=GetID() function s.initial_effect(c) --spsummon @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c68679595.lua b/official/c68679595.lua index 5cae9a05eb..61d27e8333 100644 --- a/official/c68679595.lua +++ b/official/c68679595.lua @@ -1,5 +1,5 @@ --獣装合体 ライオ・ホープレイ ---Leo Utopia Ray +--Ultimate Leo Utopia Ray --Scripted by Eerie Code Duel.LoadCardScript("c56840427.lua") local s,id=GetID() @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -34,30 +34,26 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={56840427} -s.listed_series={0x107e} +s.listed_series={SET_ZW} s.xyz_number=39 function s.filter(c,tc,tp) - if not (c:IsSetCard(0x107e) and not c:IsForbidden()) then return false end + if not (c:IsSetCard(SET_ZW) and not c:IsForbidden()) then return false end local effs={c:GetCardEffect(75402014)} for _,te in ipairs(effs) do if te:GetValue()(tc,c,tp) then return true end end return false end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e:GetHandler(),tp) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e:GetHandler(),tp) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,c,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,c,tp) local tc=g:GetFirst() if tc then local eff=tc:GetCardEffect(75402014) @@ -65,7 +61,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.discfilter(c) - return c:IsSetCard(0x107e) and c:GetOriginalType() & TYPE_MONSTER ~= 0 + return c:IsSetCard(SET_ZW) and c:GetOriginalType() & TYPE_MONSTER ~= 0 end function s.discon(e) return e:GetHandler():GetEquipGroup():IsExists(s.discfilter,1,nil) @@ -88,12 +84,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if tc:IsImmuneToEffect(e1) or tc:IsImmuneToEffect(e2) then return end Duel.AdjustInstantly(tc) @@ -103,7 +99,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(atk) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c68688135.lua b/official/c68688135.lua index 64931867ea..cb0d32fbb0 100644 --- a/official/c68688135.lua +++ b/official/c68688135.lua @@ -1,5 +1,5 @@ --ヴァンパイアの支配 - +--Vampire Domination -- local s,id=GetID() function s.initial_effect(c) @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8e) + return c:IsFaceup() and c:IsSetCard(SET_VAMPIRE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,5 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(tp,re:GetHandler():GetBaseAttack(),REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c68722455.lua b/official/c68722455.lua index 35410f8621..0acb3643f7 100644 --- a/official/c68722455.lua +++ b/official/c68722455.lua @@ -1,4 +1,5 @@ --赤鬼 +--Red Ogre local s,id=GetID() function s.initial_effect(c) --to hand @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if #rg>0 then Duel.SendtoHand(rg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68745629.lua b/official/c68745629.lua index b68bcfd911..5fd22320ef 100644 --- a/official/c68745629.lua +++ b/official/c68745629.lua @@ -1,4 +1,5 @@ --E・HERO フレイム・ブラスト +--Elemental HERO Inferno local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,10 +22,10 @@ function s.initial_effect(c) e2:SetValue(1000) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkcon(e) local ph=Duel.GetCurrentPhase() if ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL then return false end local bc=e:GetHandler():GetBattleTarget() return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c68762510.lua b/official/c68762510.lua index 744027b1d3..573bca6123 100644 --- a/official/c68762510.lua +++ b/official/c68762510.lua @@ -31,4 +31,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68769900.lua b/official/c68769900.lua index 59e2e0eff8..e197e982ac 100644 --- a/official/c68769900.lua +++ b/official/c68769900.lua @@ -1,7 +1,6 @@ --海造賊-赤髭の航海士 --Redbeard, the Plunder Patroll Matey --Scripted by senpaizuri - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Plunder Patroll" from extra deck @@ -30,14 +29,13 @@ function s.initial_effect(c) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end -s.listed_series={0x13f} +s.listed_series={SET_PLUNDER_PATROLL} s.listed_names={id} - function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,e,tp,att) - return c:IsSetCard(0x13f) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.cfilter(c) @@ -45,7 +43,7 @@ function s.cfilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if chk==0 then return att>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -55,7 +53,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if att==0 then return end @@ -68,7 +66,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -78,10 +76,10 @@ function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE) end function s.eqfilter(c,ec) - return c:IsFaceup() and c:IsSetCard(0x13f) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and not c:IsCode(id) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -103,7 +101,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) diff --git a/official/c68774379.lua b/official/c68774379.lua index 89aa1b819f..c4925ed2b7 100644 --- a/official/c68774379.lua +++ b/official/c68774379.lua @@ -1,4 +1,5 @@ --サイバー・バリア・ドラゴン +--Cyber Barrier Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -23,4 +24,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c68779682.lua b/official/c68779682.lua index ad4e91cd52..9b70141852 100644 --- a/official/c68779682.lua +++ b/official/c68779682.lua @@ -17,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() return re:IsHasType(EFFECT_TYPE_ACTIVATE) and not rc:IsStatus(STATUS_ACT_FROM_HAND) and rc:IsPreviousPosition(POS_FACEDOWN) and rp==tp - and rc:GetType()==TYPE_TRAP and not rc:IsCode(id) + and rc:IsNormalTrap() and not rc:IsCode(id) and rc:CheckActivateEffect(false,true,true)~=nil end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,13 +54,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END,ct) + e1:SetReset(RESET_PHASE|PHASE_END,ct) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,ct) + e2:SetReset(RESET_PHASE|PHASE_END,ct) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) + aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.damval(e,re,val,r,rp,rc) if rp==e:GetHandlerPlayer() and (r&REASON_EFFECT)~=0 then return 0 diff --git a/official/c68786330.lua b/official/c68786330.lua index c0aae80a9d..6580b1c78b 100644 --- a/official/c68786330.lua +++ b/official/c68786330.lua @@ -1,4 +1,5 @@ --アタック・フェロモン +--Attack Pheromones local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local a=Duel.GetAttackTarget() Duel.ChangePosition(a,POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c68809475.lua b/official/c68809475.lua index 91cbf75c4b..4e032b8578 100644 --- a/official/c68809475.lua +++ b/official/c68809475.lua @@ -1,4 +1,5 @@ --コアキメイル・スピード +--Koa'ki Meiru Speeder local s,id=GetID() function s.initial_effect(c) --cost @@ -26,7 +27,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -68,7 +69,7 @@ function s.filter(c) return c:IsCode(36623431) and not c:IsPublic() end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW + return ep==tp and Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter,1,nil) end @@ -93,4 +94,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68811206.lua b/official/c68811206.lua index e679146294..518a11901a 100644 --- a/official/c68811206.lua +++ b/official/c68811206.lua @@ -1,4 +1,5 @@ --Tyler the Great Warrior +--Tyler the Great Warrior local s,id=GetID() function s.initial_effect(c) --spsummon condition @@ -37,4 +38,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c68812773.lua b/official/c68812773.lua index 5ab0f68ef1..8571ec9081 100644 --- a/official/c68812773.lua +++ b/official/c68812773.lua @@ -2,8 +2,9 @@ --Lillybot local s,id=GetID() function s.initial_effect(c) - --summon,flip + --Special Summon 1 "Orbital 7" from your GY local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) @@ -14,9 +15,9 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_FLIP) c:RegisterEffect(e2) - -- + --Special Summon "Photon" and/or "Galaxy" monsters from your hand local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,0)) + e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) @@ -26,11 +27,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x7b,0x55} -s.listed_names={71071546} +s.listed_series={SET_GALAXY,SET_PHOTON} +s.listed_names={71071546} --"Orbital 7" function s.filter(c,e,tp) - return c:IsCode(71071546) - and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) + return c:IsCode(71071546) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x7b) or c:IsSetCard(0x55)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard({SET_GALAXY,SET_PHOTON}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.cfilter(c,ft,tp) return c:IsRace(RACE_MACHINE) @@ -80,4 +80,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c68815132.lua b/official/c68815132.lua index 5b33cd5c97..38cb4e2e09 100644 --- a/official/c68815132.lua +++ b/official/c68815132.lua @@ -1,4 +1,5 @@ --ハーピィ・ダンサー +--Harpie Dancer local s,id=GetID() function s.initial_effect(c) --return @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e2) end @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Summon(tp,g:GetFirst(),true,nil) end end -end +end \ No newline at end of file diff --git a/official/c68815401.lua b/official/c68815401.lua index 9f706418b4..1dd108eace 100644 --- a/official/c68815401.lua +++ b/official/c68815401.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={68815402} -s.listed_series={0xb9} +s.listed_series={SET_BLAZE_ACCELERATOR} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,500) and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end Duel.PayLPCost(tp,500) @@ -23,14 +23,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xb9),tp,LOCATION_ONFIELD,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_BLAZE_ACCELERATOR),tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,1000,1000,3,RACE_PYRO,ATTRIBUTE_FIRE) end - local dg1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0xb9),tp,LOCATION_ONFIELD,0,nil) + local dg1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_BLAZE_ACCELERATOR),tp,LOCATION_ONFIELD,0,nil) local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) dg1:Merge(dg2) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg1,#dg1,0,0) @@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local dg1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0xb9),tp,LOCATION_ONFIELD,0,nil) + local dg1=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_BLAZE_ACCELERATOR),tp,LOCATION_ONFIELD,0,nil) if Duel.Destroy(dg1,REASON_EFFECT)>0 then local dg2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if Duel.Destroy(dg2,REASON_EFFECT)>0 @@ -48,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) end end -end +end \ No newline at end of file diff --git a/official/c68819554.lua b/official/c68819554.lua index dbf9a73e4d..e7342ee241 100644 --- a/official/c68819554.lua +++ b/official/c68819554.lua @@ -31,16 +31,16 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0xc6} +s.listed_series={SET_PERFORMAGE} function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) @@ -59,7 +59,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.damop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -67,11 +67,11 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsSetCard(0xc6) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_PERFORMAGE) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c68823957.lua b/official/c68823957.lua index 0286603d4d..304d4c7aae 100644 --- a/official/c68823957.lua +++ b/official/c68823957.lua @@ -8,8 +8,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) - e1:SetCost(s.ccost) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.cbtg) e1:SetOperation(s.cbop) c:RegisterEffect(e1) @@ -18,9 +18,9 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_CHAINING) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) e2:SetCondition(s.cecon) - e2:SetCost(s.ccost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.cetg) e2:SetOperation(s.ceop) c:RegisterEffect(e2) @@ -37,10 +37,6 @@ function s.initial_effect(c) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e4) end -function s.ccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.cbfilter(c,e) return c:IsCanBeEffectTarget(e) end @@ -86,4 +82,4 @@ function s.ceop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c68829754.lua b/official/c68829754.lua index 9ec0faacda..b16cb9e9f4 100644 --- a/official/c68829754.lua +++ b/official/c68829754.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c68833958.lua b/official/c68833958.lua index 9017645d24..b7ce62ebf4 100644 --- a/official/c68833958.lua +++ b/official/c68833958.lua @@ -1,4 +1,5 @@ --一騎加勢 +--Back-Up Rider local s,id=GetID() function s.initial_effect(c) --activate @@ -24,7 +25,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68836428.lua b/official/c68836428.lua index eadabaff42..31ffc3248a 100644 --- a/official/c68836428.lua +++ b/official/c68836428.lua @@ -1,4 +1,5 @@ --トライエッジ・リヴァイア +--Tri-Edge Levia local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -19,19 +20,12 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or c:GetAttack()>0) end @@ -50,21 +44,21 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetValue(-800) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c68860936.lua b/official/c68860936.lua index be11257e88..57d256d5f1 100644 --- a/official/c68860936.lua +++ b/official/c68860936.lua @@ -19,19 +19,19 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end local ph=Duel.GetCurrentPhase() - if tp~=Duel.GetTurnPlayer() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + if Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() then + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c68875140.lua b/official/c68875140.lua index cc0dbbe397..f85b925f95 100644 --- a/official/c68875140.lua +++ b/official/c68875140.lua @@ -1,4 +1,5 @@ --押し売りゴブリン +--Hard-sellin' Goblin local s,id=GetID() function s.initial_effect(c) --activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp + return ep~=tp and eg:GetFirst():IsControler(tp) end function s.filter(c) return c:GetSequence()<5 and c:IsAbleToHand() @@ -40,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c68881649.lua b/official/c68881649.lua index c1d5abf569..cc6f0f2f31 100644 --- a/official/c68881649.lua +++ b/official/c68881649.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end \ No newline at end of file diff --git a/official/c68897338.lua b/official/c68897338.lua index 9a02aba0c8..0ff8caf30d 100644 --- a/official/c68897338.lua +++ b/official/c68897338.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.handspcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.handsptg) e2:SetOperation(s.handspop) c:RegisterEffect(e2) diff --git a/official/c6890729.lua b/official/c6890729.lua index 257e3ce824..703dc80727 100644 --- a/official/c6890729.lua +++ b/official/c6890729.lua @@ -1,4 +1,5 @@ --ボンディング-DHO +--Bonding - DHO local s,id=GetID() function s.initial_effect(c) --activate @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -26,32 +27,32 @@ function s.cfilter(c,code) return c:IsCode(code) and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,43017476) - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,22587018) - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,58071123) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,43017476) + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,22587018) + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,58071123) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,43017476) + local g1=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,43017476) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,22587018) + local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,22587018) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g3=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,58071123) + local g3=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,58071123) g1:Merge(g2) g1:Merge(g3) Duel.ConfirmCards(1-tp,g1) - Duel.SendtoDeck(g1,nil,2,REASON_COST) + Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.filter(c,e,tp) return c:IsCode(6022371) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) g:GetFirst():CompleteProcedure() @@ -61,14 +62,14 @@ function s.thfilter(c) return c:IsCode(6022371,85066822) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c68933343.lua b/official/c68933343.lua index 385e6cb000..c4e5bef8e8 100644 --- a/official/c68933343.lua +++ b/official/c68933343.lua @@ -1,4 +1,5 @@ --音響戦士ベーシス +--Symphonic Warrior Basses local s,id=GetID() function s.initial_effect(c) --lv up @@ -16,14 +17,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target2) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsLevelAbove(1) end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -47,8 +48,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(ct) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c68934651.lua b/official/c68934651.lua index 880b28629e..a0532592c8 100644 --- a/official/c68934651.lua +++ b/official/c68934651.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.ctfilter(c) return c:IsType(TYPES) and c:IsRace(RACE_CYBERSE) @@ -75,7 +75,7 @@ function s.atkval(e,c) return c:GetCounter(COUNTER_FW)*2500 end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) + return rp==1-tp and re:IsMonsterEffect() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_FW,1,REASON_COST) end @@ -98,10 +98,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.chainop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end function s.chainop(e) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c68937720.lua b/official/c68937720.lua index 2c17b22029..fa35bb9812 100644 --- a/official/c68937720.lua +++ b/official/c68937720.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) c:RegisterEffect(e1) --prevent activation local e2=Effect.CreateEffect(c) @@ -18,11 +18,7 @@ function s.initial_effect(c) e2:SetValue(s.aclimit) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.aclimit(e,re,tp) local loc=re:GetActivateLocation() - return loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) + return loc==LOCATION_HAND and re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c68950538.lua b/official/c68950538.lua index a42c45f2d6..e18156d3a3 100644 --- a/official/c68950538.lua +++ b/official/c68950538.lua @@ -1,4 +1,5 @@ --電子光虫-センチビット +--Digital Bug Centibit local s,id=GetID() function s.initial_effect(c) --xyzlimit @@ -63,17 +64,17 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(s.atkfilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.atkfilter(e,c) return c:IsPosition(POS_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c68957034.lua b/official/c68957034.lua index 60a33e1a46..8f0e4709ac 100644 --- a/official/c68957034.lua +++ b/official/c68957034.lua @@ -1,15 +1,15 @@ --- 輝く炎の神碑 --- Mysterune of the Brilliant Flame --- Scripted by Hatter +--輝く炎の神碑 +--Runick Flashing Fire +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateMysteruneQPEffect(c,id,CATEGORY_DESTROY,s.destg,s.desop,2,EFFECT_FLAG_CARD_TARGET) c:RegisterEffect(e1) end -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsSummonType(SUMMON_TYPE_SPECIAL) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsSpecialSummoned() end if chk==0 then return Duel.IsExistingTarget(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsSummonType,tp,0,LOCATION_MZONE,1,1,nil,SUMMON_TYPE_SPECIAL) diff --git a/official/c68987122.lua b/official/c68987122.lua index 120662ba4b..fc118f40a5 100644 --- a/official/c68987122.lua +++ b/official/c68987122.lua @@ -65,12 +65,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() @@ -94,4 +94,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and not tc:IsPosition(POS_FACEUP_DEFENSE) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c68989981.lua b/official/c68989981.lua index d621bde856..97f3e12ff6 100644 --- a/official/c68989981.lua +++ b/official/c68989981.lua @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69000994.lua b/official/c69000994.lua index 4b6ca97c19..2905a35f06 100644 --- a/official/c69000994.lua +++ b/official/c69000994.lua @@ -1,4 +1,5 @@ --炎王獣 バロン +--Fire King Avatar Barong local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,17 +26,17 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_GRAVE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.thcon) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x81} +s.listed_series={SET_FIRE_KING} function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) + and c:IsReason(REASON_EFFECT) and c:IsSetCard(SET_FIRE_KING) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -54,20 +55,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.threg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 then return end - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) then return end + if Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,0,1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(id)>0 end function s.thfilter(c) - return c:IsSetCard(0x81) and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_FIRE_KING) and c:GetCode()~=id and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -81,4 +82,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c69003792.lua b/official/c69003792.lua index 4b73a89317..831b4ea369 100644 --- a/official/c69003792.lua +++ b/official/c69003792.lua @@ -3,16 +3,16 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - local ritparams={handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,0x138),lv=s.ritlevel,location=LOCATION_DECK,sumpos=POS_FACEUP_DEFENSE} + local ritparams={handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,SET_MEGALITH),lv=s.ritlevel,location=LOCATION_DECK,sumpos=POS_FACEUP_DEFENSE} --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) e1:SetTarget(s.target(Ritual.Target(ritparams),Ritual.Operation(ritparams))) c:RegisterEffect(e1) end -s.listed_series={0x138} +s.listed_series={SET_MEGALITH} function s.ritlevel(c) return c:GetLevel()*2 end @@ -56,6 +56,6 @@ function s.op(tc,c,atk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c6901008.lua b/official/c6901008.lua index 0005e739a9..399dde7d76 100644 --- a/official/c6901008.lua +++ b/official/c6901008.lua @@ -1,4 +1,5 @@ --幻影王 ハイド・ライド +--Phantom King Hydride local s,id=GetID() function s.initial_effect(c) --nontuner @@ -8,4 +9,4 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_NONTUNER) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c69015963.lua b/official/c69015963.lua index acbababe54..f450768031 100644 --- a/official/c69015963.lua +++ b/official/c69015963.lua @@ -1,4 +1,5 @@ --デビル・フランケン +--Cyber-Stein local s,id=GetID() function s.initial_effect(c) --spsummon @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(5000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -15,10 +16,6 @@ end function s.filter(c,e,tp) return c:IsType(TYPE_FUSION) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,5000) end - Duel.PayLPCost(tp,5000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) @@ -29,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c69023354.lua b/official/c69023354.lua index 888d779c16..c31d4ae328 100644 --- a/official/c69023354.lua +++ b/official/c69023354.lua @@ -1,4 +1,5 @@ --機甲忍者エアー +--Air Armor Ninja local s,id=GetID() function s.initial_effect(c) --lv down @@ -17,9 +18,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.filter(c) - return c:IsFaceup() and c:GetLevel()~=0 and c:IsSetCard(0x2b) + return c:IsFaceup() and c:GetLevel()~=0 and c:IsSetCard(SET_NINJA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -34,8 +35,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69025477.lua b/official/c69025477.lua index 1d969e7294..819de55423 100644 --- a/official/c69025477.lua +++ b/official/c69025477.lua @@ -1,4 +1,5 @@ --六武衆-ヤリザ +--The Six Samurai - Yariza local s,id=GetID() function s.initial_effect(c) --diratk @@ -17,15 +18,15 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id end function s.dircon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,5 +44,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c69031175.lua b/official/c69031175.lua index 2ffe03591a..92b01cc8bb 100644 --- a/official/c69031175.lua +++ b/official/c69031175.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x33),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BLACKWING),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() -- local e1=Effect.CreateEffect(c) @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetOperation(s.operation2) c:RegisterEffect(e4) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} s.counter_place_list={0x1002} function s.condition1(e,tp,eg,ep,ev,re,r,rp) local atg=Duel.GetAttackTarget() @@ -69,14 +69,14 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) t:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) t:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c69035382.lua b/official/c69035382.lua index f8f05d52d8..2f0e775c0c 100644 --- a/official/c69035382.lua +++ b/official/c69035382.lua @@ -1,5 +1,6 @@ --奈落との契約 +--Contract with the Abyss local s,id=GetID() function s.initial_effect(c) Ritual.AddProcEqual(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK)) -end +end \ No newline at end of file diff --git a/official/c6903857.lua b/official/c6903857.lua index 2d9a328403..8538589575 100644 --- a/official/c6903857.lua +++ b/official/c6903857.lua @@ -1,4 +1,5 @@ --パワー・ブレイカー +--Power Breaker local s,id=GetID() function s.initial_effect(c) --destroy @@ -50,4 +51,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() and c:IsRelateToBattle() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c69039982.lua b/official/c69039982.lua index b8b89c34d9..4e62a50d69 100644 --- a/official/c69039982.lua +++ b/official/c69039982.lua @@ -1,5 +1,5 @@ --リユナイト・パラディオン ---Reunite Palladion +--Crusadia Revival --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -29,15 +29,15 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} function s.tg(e,c) - return c:IsLinkMonster() and c:IsSetCard(0x116) + return c:IsLinkMonster() and c:IsSetCard(SET_CRUSADIA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x116) and c:IsLinkMonster() + return c:IsFaceup() and c:IsSetCard(SET_CRUSADIA) and c:IsLinkMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(e:GetHandler()) @@ -61,10 +61,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(tc:GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end - +end \ No newline at end of file diff --git a/official/c69042950.lua b/official/c69042950.lua index 71bd886007..d358e74958 100644 --- a/official/c69042950.lua +++ b/official/c69042950.lua @@ -1,4 +1,5 @@ --バグ・ロード +--Crashbug Road local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c69058960.lua b/official/c69058960.lua index 39f7dd5c55..2c1dc3f248 100644 --- a/official/c69058960.lua +++ b/official/c69058960.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -39,10 +39,6 @@ function s.initial_effect(c) end s.xyz_number=13 s.listed_names={95442074} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end end @@ -56,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) diff --git a/official/c69069911.lua b/official/c69069911.lua index 343e057bec..101b95d656 100644 --- a/official/c69069911.lua +++ b/official/c69069911.lua @@ -1,4 +1,5 @@ --カチコチドラゴン +--Kachi Kochi Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCountLimit(1) e1:SetCondition(s.atcon) - e1:SetCost(s.atcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.atop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end @@ -20,10 +21,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() and c:CanChainAttack() and c:IsStatus(STATUS_OPPO_BATTLE) end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c69072185.lua b/official/c69072185.lua index ab92f72ef9..3537638aab 100644 --- a/official/c69072185.lua +++ b/official/c69072185.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -75,4 +75,4 @@ function s.maintop(e,tp,eg,ep,ev,re,r,rp) elseif op==2 then Duel.Destroy(c,REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c69073023.lua b/official/c69073023.lua index 531431f772..d9b8435170 100644 --- a/official/c69073023.lua +++ b/official/c69073023.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.efilter(e,te) - return te:IsActiveType(TYPE_MONSTER) and not te:IsActiveType(TYPE_XYZ) + return te:IsMonsterEffect() and not te:IsActiveType(TYPE_XYZ) end function s.indes(e,c) return not c:IsType(TYPE_XYZ) @@ -72,10 +72,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.damval(e,re,val,r,rp,rc) return math.floor(val/2) -end +end \ No newline at end of file diff --git a/official/c69087397.lua b/official/c69087397.lua index d77eb5f279..ed4d611ad5 100644 --- a/official/c69087397.lua +++ b/official/c69087397.lua @@ -1,5 +1,5 @@ --ふわんだりぃずと旅じたく ---Floowandereeze and the Journey Preparations +--Floowandereeze and the Advent of Adventure --Scripted by Zefile local s,id=GetID() function s.initial_effect(c) @@ -15,19 +15,19 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x16f} +s.listed_series={SET_FLOOWANDEREEZE} function s.filter(c) return c:IsMonster() and c:IsRace(RACE_WINGEDBEAST) and c:IsAbleToRemoveAsCost() and (c:IsFaceup() or not c:IsOnField()) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filteradd(c) - return c:IsSetCard(0x16f) and (c:IsMonster() or c:IsType(TYPE_FIELD)) and c:IsAbleToHand() + return c:IsSetCard(SET_FLOOWANDEREEZE) and (c:IsMonster() or c:IsType(TYPE_FIELD)) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filteradd,tp,LOCATION_DECK,0,1,nil) end @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.BreakEffect() Duel.Recover(tp,500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69091732.lua b/official/c69091732.lua index 3aa561e1c5..3f30af1994 100644 --- a/official/c69091732.lua +++ b/official/c69091732.lua @@ -1,4 +1,5 @@ --義賊の入門書 +--Introduction to Gallantry local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,5 +26,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) local dg=g:RandomSelect(tp,1) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) -end + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c6909330.lua b/official/c6909330.lua index c34e10b7ae..f6a5141232 100644 --- a/official/c6909330.lua +++ b/official/c6909330.lua @@ -38,7 +38,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(eg) do if tc:GetPreviousTypeOnField() & (TYPE_SPELL+TYPE_TRAP)~=0 and tc:IsPreviousPosition(POS_FACEDOWN) and tc:IsPreviousLocation(LOCATION_ONFIELD) and tc:IsReason(REASON_EFFECT) then - Duel.RegisterFlagEffect(tc:GetPreviousControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetPreviousControler(),id,RESET_PHASE|PHASE_END,0,1) end end end @@ -62,4 +62,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,800,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69105797.lua b/official/c69105797.lua index 8c6839c374..8430e13181 100644 --- a/official/c69105797.lua +++ b/official/c69105797.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -26,10 +26,6 @@ s.counter_place_list={COUNTER_PREDATOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -43,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.atkfilter) tc:RegisterEffect(e1) end @@ -56,7 +52,7 @@ function s.ccon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) end function s.cfilter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsSpecialSummoned() end function s.cop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,7 +64,7 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -77,4 +73,4 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) end function s.lvcon(e) return e:GetHandler():GetCounter(COUNTER_PREDATOR)>0 -end +end \ No newline at end of file diff --git a/official/c69109764.lua b/official/c69109764.lua index 3a9d9641d1..facbe2229a 100644 --- a/official/c69109764.lua +++ b/official/c69109764.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) @@ -34,7 +34,7 @@ function s.tgfilter(c) return c:IsRace(RACE_DRAGON) and c:IsLevelBelow(4) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and s.tgfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tgfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil) diff --git a/official/c69112325.lua b/official/c69112325.lua index 5eda5fd39c..24462642ef 100644 --- a/official/c69112325.lua +++ b/official/c69112325.lua @@ -1,4 +1,5 @@ --神聖なる森 +--Spiritual Forest local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,8 +19,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.indtg(e,c) - return c:IsRace(RACE_PLANT+RACE_BEAST+RACE_BEASTWARRIOR) + return c:IsRace(RACE_PLANT|RACE_BEAST|RACE_BEASTWARRIOR) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c69120785.lua b/official/c69120785.lua index c46255a64f..e15aa9c998 100644 --- a/official/c69120785.lua +++ b/official/c69120785.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) diff --git a/official/c69121954.lua b/official/c69121954.lua index be57fd3c05..9964b84a0b 100644 --- a/official/c69121954.lua +++ b/official/c69121954.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x11a),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DINOWRESTLER),2,2) c:EnableReviveLimit() --grave to hand local e2=Effect.CreateEffect(c) @@ -31,17 +31,17 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} s.listed_names={90173539} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return rp==e:GetHandlerPlayer() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return rp==e:GetHandlerPlayer() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:GetHandler():IsCode(90173539) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x11a) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_DINOWRESTLER) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.thfilter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -58,7 +58,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DINOWRESTLER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -75,12 +75,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -91,10 +91,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x11a) -end - + return not c:IsSetCard(SET_DINOWRESTLER) +end \ No newline at end of file diff --git a/official/c69122763.lua b/official/c69122763.lua index e9838dee0c..03b39ea6ba 100644 --- a/official/c69122763.lua +++ b/official/c69122763.lua @@ -1,4 +1,5 @@ --守護霊のお守り +--Deal of Phantom local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(Duel.GetMatchingGroupCount(Card.IsMonster,tp,LOCATION_GRAVE,0,nil)*100) tc:RegisterEffect(e1) end diff --git a/official/c69123138.lua b/official/c69123138.lua index 3e46965678..a7c801da3c 100644 --- a/official/c69123138.lua +++ b/official/c69123138.lua @@ -1,4 +1,5 @@ --ゼラ +--Zera the Mant local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c69133798.lua b/official/c69133798.lua index 112a4c87ab..9af7feeb77 100644 --- a/official/c69133798.lua +++ b/official/c69133798.lua @@ -47,7 +47,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c69145169.lua b/official/c69145169.lua index fab3d35af9..ffb540d28b 100644 --- a/official/c69145169.lua +++ b/official/c69145169.lua @@ -1,6 +1,6 @@ ---JP name +--受け継ぎし魂 --Successor Soul ---Scripted by Naim +--scripted by Naim local s,id=GetID() function s.initial_effect(c) --Activate @@ -47,7 +47,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(s.atkcon) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -57,17 +57,17 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc,e) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,e) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,e) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_GRAVE) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.BreakEffect() Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) @@ -86,6 +86,6 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(p,id)~=0 and Duel.GetFlagEffectLabel(p,id)~=fid then Duel.SetFlagEffectLabel(p,id,0) else - Duel.RegisterFlagEffect(p,id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + Duel.RegisterFlagEffect(p,id,RESETS_STANDARD_PHASE_END,0,1,fid) end -end +end \ No newline at end of file diff --git a/official/c69155991.lua b/official/c69155991.lua index f3c8e309e6..2cb564aecb 100644 --- a/official/c69155991.lua +++ b/official/c69155991.lua @@ -76,4 +76,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69162969.lua b/official/c69162969.lua index db35564aba..9f18e7182e 100644 --- a/official/c69162969.lua +++ b/official/c69162969.lua @@ -1,4 +1,5 @@ --ライトニング・ボルテックス +--Lightning Vortex local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -23,4 +24,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69164989.lua b/official/c69164989.lua index 11b690722f..773ab70682 100644 --- a/official/c69164989.lua +++ b/official/c69164989.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e1:SetLabel(0) c:RegisterEffect(e1) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} function s.filter(c,e,tp,check) - return c:IsSetCard(0x141) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_RIKKA) and c:IsMonster() and c:IsAbleToHand() and (check==0 or Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil,c:GetOriginalLevel(),c:GetCode())) end function s.filter2(c,lv,code) @@ -59,4 +59,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c69170403.lua b/official/c69170403.lua index 6f0e7a7062..d5e3c3b4c1 100644 --- a/official/c69170403.lua +++ b/official/c69170403.lua @@ -42,15 +42,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -87,7 +87,7 @@ function s.dcop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(dc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69170557.lua b/official/c69170557.lua index 99d5df5c89..46347996b7 100644 --- a/official/c69170557.lua +++ b/official/c69170557.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.ctcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.cttg) e2:SetOperation(s.ctop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -50,10 +50,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end end -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end end @@ -62,4 +58,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do tc:AddCounter(0x1024,1) end -end +end \ No newline at end of file diff --git a/official/c6917479.lua b/official/c6917479.lua index 582e8b7bff..5d2b9f1821 100644 --- a/official/c6917479.lua +++ b/official/c6917479.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.ctcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) @@ -35,10 +35,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_VAMPIRE} -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.ctfilter2(c) return c:IsFaceup() and c:IsSetCard(SET_VAMPIRE) and c:IsAbleToChangeControler() end diff --git a/official/c69176131.lua b/official/c69176131.lua index 6169566034..d9c8ce3b16 100644 --- a/official/c69176131.lua +++ b/official/c69176131.lua @@ -1,4 +1,5 @@ --スペース・サイクロン +--Space Cyclone local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg==0 then return end Duel.HintSelection(sg) sg:GetFirst():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69181753.lua b/official/c69181753.lua index 99ea959820..df38a9df84 100644 --- a/official/c69181753.lua +++ b/official/c69181753.lua @@ -1,5 +1,5 @@ --EMクリボーダー ---Performapal Kuribohrder +--Performapal Kuribohble --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -35,9 +35,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) Duel.CalculateDamage(a,c) end end -end +end \ No newline at end of file diff --git a/official/c691925.lua b/official/c691925.lua index b37c0ad409..ae2b37b81a 100644 --- a/official/c691925.lua +++ b/official/c691925.lua @@ -12,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.costfilter(c) - return c:IsSetCard(0x38) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDiscardDeck(tp,2) @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) Duel.BreakEffect() Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69196160.lua b/official/c69196160.lua index 7800caa8e9..e9ed84b18e 100644 --- a/official/c69196160.lua +++ b/official/c69196160.lua @@ -1,4 +1,5 @@ --サンダー・クラッシュ +--Thunder Crash local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69207766.lua b/official/c69207766.lua index e0b81f1a72..14a6752470 100644 --- a/official/c69207766.lua +++ b/official/c69207766.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e5:SetType(EFFECT_TYPE_IGNITION) e5:SetRange(LOCATION_SZONE) e5:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end) - e5:SetCost(s.descost) + e5:SetCost(Cost.SelfToGrave) e5:SetTarget(s.destg) e5:SetOperation(s.desop) c:RegisterEffect(e5) @@ -68,10 +68,6 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) s.equipop(c,e,tp,tc) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end diff --git a/official/c69211541.lua b/official/c69211541.lua index fe439364f4..a9c9edb90b 100644 --- a/official/c69211541.lua +++ b/official/c69211541.lua @@ -1,4 +1,5 @@ --EMパートナーガ +--Performapal Partnaga local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -34,7 +35,7 @@ function s.initial_effect(c) e5:SetTarget(aux.TargetBoolFunction(Card.IsLevelBelow,5)) c:RegisterEffect(e5) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -42,7 +43,7 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -54,7 +55,7 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -67,7 +68,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69217334.lua b/official/c69217334.lua index e107a3f69b..163a04fdb7 100644 --- a/official/c69217334.lua +++ b/official/c69217334.lua @@ -57,17 +57,17 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) pc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PUBLIC) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) pc:RegisterEffect(e2) end end function s.cfilter(c,tp) - return c:IsCode(46427957,72426662) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsCode(46427957,72426662) and c:IsControler(tp) and c:IsRitualSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) diff --git a/official/c69228245.lua b/official/c69228245.lua index bb1f40b29c..603643978e 100644 --- a/official/c69228245.lua +++ b/official/c69228245.lua @@ -1,6 +1,5 @@ --EMチェーンジラフ --Performapal Changeraffe - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -58,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end @@ -78,7 +77,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1,true) local e2=e1:Clone() diff --git a/official/c69230391.lua b/official/c69230391.lua index c14894d9eb..01beeffc27 100644 --- a/official/c69230391.lua +++ b/official/c69230391.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -42,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,g) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local hg=g:Select(tp,1,1,nil) - Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(hg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(1-tp) local tc=hg:GetFirst() if tc:IsMonster() then @@ -60,4 +60,4 @@ function s.valcheck(e,c) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c69243722.lua b/official/c69243722.lua index 95c4847c89..1cf3a1ad98 100644 --- a/official/c69243722.lua +++ b/official/c69243722.lua @@ -1,4 +1,5 @@ --ジェムナイト・エメラル +--Gem-Knight Emerald local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.costfilter(c,ft) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToRemoveAsCost() and (ft>0 or c:GetSequence()<5) @@ -30,7 +31,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(rg,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69243953.lua b/official/c69243953.lua index af68ea1694..f51101434f 100644 --- a/official/c69243953.lua +++ b/official/c69243953.lua @@ -1,4 +1,5 @@ --蝶の短剣-エルマ +--Butterfly Dagger - Elma local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -39,4 +40,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c6924874.lua b/official/c6924874.lua index a738b7602c..6d481351cd 100644 --- a/official/c6924874.lua +++ b/official/c6924874.lua @@ -1,4 +1,5 @@ --ハーピィズペット仔竜 +--Harpie's Pet Baby Dragon local s,id=GetID() function s.initial_effect(c) --at limit @@ -36,10 +37,10 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_HARPIE) and c:GetCode()~=id end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x64) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_HARPIE) and c:GetCode()~=id end function s.adcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) @@ -65,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69257165.lua b/official/c69257165.lua index 62bb65cca2..475276d336 100644 --- a/official/c69257165.lua +++ b/official/c69257165.lua @@ -1,4 +1,5 @@ --精神汚染 +--Mind Pollutant local s,id=GetID() function s.initial_effect(c) --control @@ -34,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local sg=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_HAND,0,1,1,nil,tp) local lv=sg:GetFirst():GetLevel() e:SetLabel(lv) - Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_COST|REASON_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.ctffilter,tp,0,LOCATION_MZONE,1,1,nil,lv) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetLevel()==e:GetLabel() then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c69270537.lua b/official/c69270537.lua index e340fef0f2..c5defe8304 100644 --- a/official/c69270537.lua +++ b/official/c69270537.lua @@ -1,4 +1,5 @@ --コンタクト・アウト +--Contact Out local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9} +s.listed_series={SET_NEOS} function s.tdfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() + return c:IsFaceup() and c:IsSetCard(SET_NEOS) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -27,7 +28,7 @@ function s.spfilter(c,e,tp,fc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and tc:IsLocation(LOCATION_EXTRA) then local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc) if tc:CheckFusionMaterial(sg,nil,PLAYER_NONE|FUSPROC_NOTFUSION) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(mats,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c69272449.lua b/official/c69272449.lua index 6bdb763133..31587a7662 100644 --- a/official/c69272449.lua +++ b/official/c69272449.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_REMOVE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.PayLPCost(300)) + e4:SetCost(Cost.PayLP(300)) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) diff --git a/official/c69279219.lua b/official/c69279219.lua index b7dd692b1b..5a09e9b721 100644 --- a/official/c69279219.lua +++ b/official/c69279219.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1500)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,14 +19,10 @@ function s.cfilter(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if tp==ep or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and tc+tg:FilterCount(s.cfilter,nil)-#tg>0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -38,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69293721.lua b/official/c69293721.lua index e0d926d60c..aada8ad343 100644 --- a/official/c69293721.lua +++ b/official/c69293721.lua @@ -1,4 +1,5 @@ --水精鱗-アビスグンデ +--Mermail Abyssgunde local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DISCARD) and e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.filter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MERMAIL) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69296555.lua b/official/c69296555.lua index f9886bbffe..749d514b59 100644 --- a/official/c69296555.lua +++ b/official/c69296555.lua @@ -1,4 +1,5 @@ --光の護封陣 +--Array of Revealing Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.atktg(e,c) return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) and c:IsRace(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c69299029.lua b/official/c69299029.lua index 0676348ba1..04ed27aae7 100644 --- a/official/c69299029.lua +++ b/official/c69299029.lua @@ -1,4 +1,4 @@ ---Japanese name +--王の遺宝祀りし聖域 --Treasures of the Kings --Scripted by The Razgriz local s,id=GetID() @@ -62,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c69303178.lua b/official/c69303178.lua index c3db2459af..b4360deadc 100644 --- a/official/c69303178.lua +++ b/official/c69303178.lua @@ -1,4 +1,5 @@ --光神機-桜火 +--Majestic Mech - Ohka local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -38,4 +39,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoGrave(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69304426.lua b/official/c69304426.lua index a3cd16bda0..76b969ac41 100644 --- a/official/c69304426.lua +++ b/official/c69304426.lua @@ -1,4 +1,5 @@ --アーティファクト-ヴァジュラ +--Artifact Vajra local s,id=GetID() function s.initial_effect(c) --set @@ -52,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:GetSequence()<5 @@ -78,4 +79,4 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c6930746.lua b/official/c6930746.lua index 9d2c69c266..b040abc30a 100644 --- a/official/c6930746.lua +++ b/official/c6930746.lua @@ -1,4 +1,5 @@ --限界竜シュヴァルツシルト +--Schwarzschild Limit Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c69313735.lua b/official/c69313735.lua index 8152e1df33..1d10129c10 100644 --- a/official/c69313735.lua +++ b/official/c69313735.lua @@ -1,4 +1,5 @@ --ディスカバード・アタック +--Checkmate local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} s.listed_names={35975813} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.rfilter(c,tp) - return c:IsSetCard(0x45) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c) + return c:IsSetCard(SET_ARCHFIEND) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c) end function s.filter(c) return c:IsFaceup() and c:IsCode(35975813) @@ -44,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69319869.lua b/official/c69319869.lua index 90f796475c..69c1281757 100644 --- a/official/c69319869.lua +++ b/official/c69319869.lua @@ -1,4 +1,5 @@ --鈍重 +--Gravity Lash local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:HasNonZeroDefense() end if chk==0 then return Duel.IsExistingTarget(Card.HasNonZeroDefense,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetDefense()*-1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69320362.lua b/official/c69320362.lua index 9c072ef718..0062c549f9 100644 --- a/official/c69320362.lua +++ b/official/c69320362.lua @@ -1,4 +1,5 @@ --伝説のゼンマイ +--Legendary Wind-Up Key local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x58) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_WIND_UP) and c:IsCanTurnSet() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c69327790.lua b/official/c69327790.lua index f67a82efb6..21ae96b806 100644 --- a/official/c69327790.lua +++ b/official/c69327790.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.otcon(e,c,minc) if c==nil then return true end @@ -35,10 +35,10 @@ function s.otop(e,tp,eg,ep,ev,re,r,rp,c) local mg=Duel.GetMatchingGroup(s.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil) local sg=Duel.SelectTribute(tp,c,1,1,mg) c:SetMaterial(sg) - Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL) + Duel.Release(sg,REASON_SUMMON|REASON_MATERIAL) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -85,4 +85,4 @@ function s.valcheck(e,c) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c69351984.lua b/official/c69351984.lua index 9581d4eb67..cbe2d0088d 100644 --- a/official/c69351984.lua +++ b/official/c69351984.lua @@ -1,4 +1,5 @@ --メタルフォーゼ・ヴォルフレイム +--Metalfoes Volflame local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -14,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.desfilter(c,tp) if c:IsFacedown() then return false end local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -25,7 +26,7 @@ function s.desfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g:GetFirst()) end end -end +end \ No newline at end of file diff --git a/official/c69381150.lua b/official/c69381150.lua index 146f413145..e82991fa19 100644 --- a/official/c69381150.lua +++ b/official/c69381150.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.descon) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x135) + return c:IsFaceup() and c:IsSetCard(SET_IGNISTER) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetAbsoluteRange(0,1-p,p) e1:SetRange(LOCATION_SZONE) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -65,7 +65,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp) return sumtype&SUMMON_TYPE_LINK==SUMMON_TYPE_LINK end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desfilter(c) return c:IsReleasableByEffect() and c:IsType(TYPE_LINK) @@ -77,5 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectReleaseGroup(tp,s.desfilter,1,1,nil) Duel.Release(g,REASON_COST) else Duel.Destroy(c,REASON_COST) end -end - +end \ No newline at end of file diff --git a/official/c69394324.lua b/official/c69394324.lua index 96951bcc17..03b8ab8456 100644 --- a/official/c69394324.lua +++ b/official/c69394324.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion Summon procedure c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc008),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESTINY_HERO),3) --Rearrange the top 5 cards of a player's Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -40,8 +40,8 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xc008} -s.material_setcode={0x8,0xc008} +s.listed_series={SET_DESTINY_HERO} +s.material_setcode={SET_HERO,SET_DESTINY_HERO} function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>4 end @@ -67,10 +67,10 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc008) and c:IsLevelBelow(9) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsLevelBelow(9) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c69402394.lua b/official/c69402394.lua index 2d40a7fbf7..b340b19e18 100644 --- a/official/c69402394.lua +++ b/official/c69402394.lua @@ -1,4 +1,5 @@ --暗黒の謀略 +--Dark Scheme local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2 or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<2 then return end if Duel.SelectYesNo(1-tp,aux.Stringid(id,0)) then - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD,nil) if Duel.IsChainDisablable(0) then Duel.NegateEffect(0) return @@ -36,8 +37,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,1-tp,LOCATION_HAND,0,2,2,nil) g1:Merge(g2) - Duel.SendtoGrave(g1,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g1,REASON_EFFECT|REASON_DISCARD) Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(1-tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69408987.lua b/official/c69408987.lua index be7b4919a2..4fe8def480 100644 --- a/official/c69408987.lua +++ b/official/c69408987.lua @@ -1,4 +1,5 @@ --スパイダー・ウェブ +--Spider Web local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,15 +23,15 @@ end function s.posop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if Duel.ChangePosition(a,POS_FACEUP_DEFENSE)~=0 then - e:GetHandler():CreateRelation(a,RESET_EVENT+RESETS_STANDARD) + e:GetHandler():CreateRelation(a,RESET_EVENT|RESETS_STANDARD) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) e1:SetCondition(s.poscon2) a:RegisterEffect(e1) end end function s.poscon2(e) return e:GetOwner():IsRelateToCard(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c69436288.lua b/official/c69436288.lua index 6a4a4f77a4..d4202c0836 100644 --- a/official/c69436288.lua +++ b/official/c69436288.lua @@ -1,9 +1,9 @@ --- デス・クラーケン --- Doom Kraken --- Scripted by Hatter +--デス・クラーケン +--Doom Kraken +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_DESTROY) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Return self to hand + --Return self to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -81,4 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) and c:IsLocation(LOCATION_HAND) then Duel.NegateAttack() end -end +end \ No newline at end of file diff --git a/official/c69448290.lua b/official/c69448290.lua index 0cd067bd38..ab5f5366a6 100644 --- a/official/c69448290.lua +++ b/official/c69448290.lua @@ -1,6 +1,5 @@ --霞の谷の雷鳥 --Mist Valley Thunderbird - local s,id=GetID() function s.initial_effect(c) --If returned to hand, special summon itself @@ -36,7 +35,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c69452756.lua b/official/c69452756.lua index fe765188bc..086858fd53 100644 --- a/official/c69452756.lua +++ b/official/c69452756.lua @@ -17,15 +17,11 @@ function s.initial_effect(c) e1:SetRange(LOCATION_SZONE) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_EQUIP) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_CHAIN) - e1:SetCost(s.descost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local exc=not c:IsStatus(STATUS_EFFECT_ENABLED) and c or nil diff --git a/official/c69456283.lua b/official/c69456283.lua index 3bb63e0e3b..42a7aabb58 100644 --- a/official/c69456283.lua +++ b/official/c69456283.lua @@ -1,4 +1,5 @@ --コイツ +--Koitsu local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,48202661),true) diff --git a/official/c69461394.lua b/official/c69461394.lua index 7f5d5860f3..3c18dddee6 100644 --- a/official/c69461394.lua +++ b/official/c69461394.lua @@ -1,4 +1,5 @@ --A・O・J フィールド・マーシャル +--Ally of Justice Field Marshal local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -37,4 +38,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69488544.lua b/official/c69488544.lua index 96afa88a0d..5b02171001 100644 --- a/official/c69488544.lua +++ b/official/c69488544.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Gemini.EffectStatusCondition(e) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and rp==1-tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + and rp==1-tp and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.filter(c,e,tp) return c:IsType(TYPE_GEMINI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -80,4 +80,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69492187.lua b/official/c69492187.lua index 4c05b00728..75df5b9b24 100644 --- a/official/c69492187.lua +++ b/official/c69492187.lua @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetAbsoluteRange(tp,1,0) e1:SetCondition(s.splimcon) e1:SetTarget(s.splimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sg:GetFirst():RegisterEffect(e1,true) end end @@ -59,4 +59,4 @@ end --Cannot special summon from extra deck function s.splimit(e,c) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c69512157.lua b/official/c69512157.lua index 22b7807b0c..2b44fe11e6 100644 --- a/official/c69512157.lua +++ b/official/c69512157.lua @@ -1,4 +1,5 @@ --竜魔王ベクターP +--Vector Pendulum, the Dracoverlord local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -23,4 +24,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if re:GetActiveType()==TYPE_PENDULUM+TYPE_SPELL and p~=tp and (loc&LOCATION_PZONE)~=0 then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c69514125.lua b/official/c69514125.lua index e40212eee9..59dcaf781b 100644 --- a/official/c69514125.lua +++ b/official/c69514125.lua @@ -1,4 +1,5 @@ --神聖騎士パーシアス +--Avenging Knight Parshath local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -36,4 +37,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c69522668.lua b/official/c69522668.lua index 62186a39bf..6e1ccb2f42 100644 --- a/official/c69522668.lua +++ b/official/c69522668.lua @@ -1,9 +1,9 @@ --魔鍵変鬼-トランスフルミネ ---Magikey-Mutated Ogre - Transfurmine +--Magikey Fiend - Transfurlmine --scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x167),1,1,Synchro.NonTunerEx(Card.IsType,TYPE_NORMAL),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MAGIKEY),1,1,Synchro.NonTunerEx(Card.IsType,TYPE_NORMAL),1,99) c:EnableReviveLimit() --Make up to 2 attacks on monsters each Battle Phase local e1=Effect.CreateEffect(c) @@ -47,16 +47,16 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.matcheck(e,c) e:SetLabel(c:GetMaterial():GetClassCount(Card.GetAttribute)) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) local obj=e:GetLabelObject() - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and obj and obj:GetLabel()>1 + return e:GetHandler():IsSynchroSummoned() and obj and obj:GetLabel()>1 end function s.setfilter(c) - return c:IsSetCard(0x167) and c:IsSpellTrap() and not c:IsType(TYPE_FIELD) and c:IsSSetable() + return c:IsSetCard(SET_MAGIKEY) and c:IsSpellTrap() and not c:IsType(TYPE_FIELD) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -95,4 +95,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69526976.lua b/official/c69526976.lua index 5a4c08e853..ed521b956b 100644 --- a/official/c69526976.lua +++ b/official/c69526976.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.lvcon) e2:SetOperation(s.lvop) @@ -25,7 +25,7 @@ function s.indval(e,c) return c:IsLevelBelow(e:GetHandler():GetLevel()) or c:IsLinkMonster() or c:IsType(TYPE_XYZ) end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,7 +36,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69529337.lua b/official/c69529337.lua index f02bbaccb3..df0b5ca0d6 100644 --- a/official/c69529337.lua +++ b/official/c69529337.lua @@ -42,7 +42,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_ROCK),tp,LOCATION_MZONE,0,nil) for sc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) diff --git a/official/c69529567.lua b/official/c69529567.lua index d93ba83da9..fabb7d00aa 100644 --- a/official/c69529567.lua +++ b/official/c69529567.lua @@ -1,4 +1,5 @@ --おとぼけオポッサム +--Playful Possum local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1) e2:SetCondition(s.spcon) @@ -37,11 +38,11 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end @@ -51,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69533836.lua b/official/c69533836.lua index 589e107ef7..37410d5c25 100644 --- a/official/c69533836.lua +++ b/official/c69533836.lua @@ -88,4 +88,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) c:GetEquipTarget():RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69537999.lua b/official/c69537999.lua index 882997bac2..b40ef5499b 100644 --- a/official/c69537999.lua +++ b/official/c69537999.lua @@ -26,7 +26,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end @@ -54,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c69542930.lua b/official/c69542930.lua index 8a9f445d75..3eed1c2303 100644 --- a/official/c69542930.lua +++ b/official/c69542930.lua @@ -1,4 +1,5 @@ --光と闇の洗礼 +--Dedication through Light and Darkness local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69550259.lua b/official/c69550259.lua index ce5674235b..120bfab4e2 100644 --- a/official/c69550259.lua +++ b/official/c69550259.lua @@ -21,14 +21,14 @@ end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) local sync=e:GetHandler():GetReasonCard() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x2016,TYPES_TOKEN,0,0,sync:GetLevel(),RACE_MACHINE,ATTRIBUTE_WIND) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SPEEDROID,TYPES_TOKEN,0,0,sync:GetLevel(),RACE_MACHINE,ATTRIBUTE_WIND) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local sync=c:GetReasonCard() - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x2016,TYPES_TOKEN,0,0,sync:GetLevel(),RACE_MACHINE,ATTRIBUTE_WIND) then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_SPEEDROID,TYPES_TOKEN,0,0,sync:GetLevel(),RACE_MACHINE,ATTRIBUTE_WIND) then local tk=Duel.CreateToken(tp,id+1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c69553552.lua b/official/c69553552.lua index c46b86c02c..4b7e2f8362 100644 --- a/official/c69553552.lua +++ b/official/c69553552.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.indcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x107),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FA),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() @@ -41,21 +41,21 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local d=a:GetBattleTarget() if not d then return false end if not a:IsControler(tp) then a,d=d,a end - return a:IsControler(tp) and a:IsSetCard(0x107) and a:GetLevel()-a:GetOriginalLevel()>=5 and ep~=tp + return a:IsControler(tp) and a:IsSetCard(SET_FA) and a:GetLevel()-a:GetOriginalLevel()>=5 and ep~=tp end function s.rmfilter(c) return c:IsAbleToRemove() and (c:IsLocation(LOCATION_ONFIELD) or aux.SpElimFilter(c,false,true)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local tc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil):GetFirst() if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local g=Duel.GetMatchingGroup(s.winfilter,tp,LOCATION_REMOVED,0,nil) if g:GetClassCount(Card.GetCode)>=3 then Duel.Win(tp,WIN_REASON_FA_WINNERS) @@ -63,5 +63,5 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.winfilter(c) - return c:IsSetCard(0x107) and c:IsType(TYPE_FIELD) and c:GetFlagEffect(id)~=0 -end + return c:IsSetCard(SET_FA) and c:IsType(TYPE_FIELD) and c:GetFlagEffect(id)~=0 +end \ No newline at end of file diff --git a/official/c69572169.lua b/official/c69572169.lua index ff210bf01d..8dfe8a49d3 100644 --- a/official/c69572169.lua +++ b/official/c69572169.lua @@ -1,4 +1,5 @@ --E・HERO フラッシュ +--Elemental HERO Flash local s,id=GetID() function s.initial_effect(c) --flip @@ -14,12 +15,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.rfilter(c) - return c:IsSetCard(0x3008) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_GRAVE,0,e:GetHandler()) @@ -28,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(sg+e:GetHandler(),POS_FACEUP,REASON_COST) end function s.filter(c) - return c:GetType()==TYPE_SPELL and c:IsAbleToHand() + return c:IsNormalSpell() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c69579761.lua b/official/c69579761.lua index 8cfebc168e..9de621b0b8 100644 --- a/official/c69579761.lua +++ b/official/c69579761.lua @@ -1,4 +1,5 @@ --デス・コアラ +--Des Koala local s,id=GetID() function s.initial_effect(c) --flip @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*400 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69584564.lua b/official/c69584564.lua index c2d083a2eb..9953ab1621 100644 --- a/official/c69584564.lua +++ b/official/c69584564.lua @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c6958551.lua b/official/c6958551.lua index 4ced8e63ae..f0c9884395 100644 --- a/official/c6958551.lua +++ b/official/c6958551.lua @@ -1,4 +1,5 @@ --シャドー・トゥーン +--Shadow Toon local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 then Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69599136.lua b/official/c69599136.lua index 5026c4cd79..e49df8ca95 100644 --- a/official/c69599136.lua +++ b/official/c69599136.lua @@ -1,6 +1,5 @@ --底なし落とし穴 --Floodgate Trap Hole - local s,id=GetID() function s.initial_effect(c) --When opponent summons a monster(s), change it to face-down defense position @@ -44,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c69601012.lua b/official/c69601012.lua index 7b241d6116..9be7bffcb4 100644 --- a/official/c69601012.lua +++ b/official/c69601012.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,{id,1}) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c69610326.lua b/official/c69610326.lua index f92e2e496c..31d73471b8 100644 --- a/official/c69610326.lua +++ b/official/c69610326.lua @@ -40,12 +40,12 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10f8} +s.listed_series={SET_SUPREME_KING_GATE} function s.pccon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.pcfilter(c) - return c:IsSetCard(0x10f8) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return c:IsSetCard(SET_SUPREME_KING_GATE) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.pctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) @@ -60,12 +60,12 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,3)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) if not Duel.CheckPendulumZones(tp) then return end @@ -79,7 +79,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsAttribute(ATTRIBUTE_DARK) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.thfilter(c) - return c:IsSetCard(0x10f8) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsSetCard(SET_SUPREME_KING_GATE) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -103,4 +103,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69610924.lua b/official/c69610924.lua index e227c88211..f78a83e51f 100644 --- a/official/c69610924.lua +++ b/official/c69610924.lua @@ -1,4 +1,5 @@ --No.17 リバイス・ドラゴン +--Number 17: Leviathan Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --cannot direct attack @@ -25,10 +26,6 @@ s.xyz_number=17 function s.dircon(e) return e:GetHandler():GetOverlayCount()==0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -37,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69632396.lua b/official/c69632396.lua index d4b7e07c3e..c94601e3e3 100644 --- a/official/c69632396.lua +++ b/official/c69632396.lua @@ -1,4 +1,5 @@ --ゴブリンのその場しのぎ +--Goblin Out of the Frying Pan local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,17 +8,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ec:CancelToGrave() Duel.SendtoHand(ec,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69633792.lua b/official/c69633792.lua index db0208025e..0f3a8d97d2 100644 --- a/official/c69633792.lua +++ b/official/c69633792.lua @@ -1,4 +1,5 @@ --エヴォルダー・テリアス +--Evolsaur Terias local s,id=GetID() function s.initial_effect(c) --atkdown @@ -19,7 +20,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69655484.lua b/official/c69655484.lua index 8ee7a38b11..afc3310e34 100644 --- a/official/c69655484.lua +++ b/official/c69655484.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_BECOME_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(function(e,tp,eg) return eg:IsContains(e:GetHandler()) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.edsptg) e1:SetOperation(s.edspop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c6967870.lua b/official/c6967870.lua index f08545760e..716c728cba 100644 --- a/official/c6967870.lua +++ b/official/c6967870.lua @@ -44,4 +44,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Send the top 2 cards of your opponent's Deck to the GY Duel.DiscardDeck(1-tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69680031.lua b/official/c69680031.lua index ee19690586..fefc7c4e77 100644 --- a/official/c69680031.lua +++ b/official/c69680031.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -31,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Dogmatika" archetype -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} --Specifically lists itself s.listed_names={id} --If special summoned from extra deck @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,nil) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x146),tp,LOCATION_MZONE,0,1,e:GetHandler()) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DOGMATIKA),tp,LOCATION_MZONE,0,1,e:GetHandler()) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -65,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -75,22 +75,22 @@ end --If your "Dogmatika" monster declares an attack function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:IsControler(tp) and at:IsSetCard(0x146) + return at:IsControler(tp) and at:IsSetCard(SET_DOGMATIKA) end --Activation legality function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x146),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DOGMATIKA),tp,LOCATION_MZONE,0,1,nil) end end --All "Dogmatika" monsters gain 500 ATK function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x146),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DOGMATIKA),tp,LOCATION_MZONE,0,nil) for tc in aux.Next(g) do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69695704.lua b/official/c69695704.lua index ad321b749b..b5bc3014f8 100644 --- a/official/c69695704.lua +++ b/official/c69695704.lua @@ -1,4 +1,5 @@ --ブラッドストーム +--Battlestorm local s,id=GetID() function s.initial_effect(c) --attackup @@ -29,7 +30,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_WINGEDBEAST),tp,LOCATION_MZONE,0,3,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -44,4 +45,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69700783.lua b/official/c69700783.lua index e50fa9f84a..716af76540 100644 --- a/official/c69700783.lua +++ b/official/c69700783.lua @@ -1,5 +1,5 @@ --ヴァンパイア・デザイア ---Vampire Desire +--Vampire's Desire -- local s,id=GetID() function s.initial_effect(c) @@ -13,20 +13,20 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.tgfilter1(c,tp) local lv=c:GetLevel() return lv>0 and c:IsFaceup() and Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_DECK,0,1,nil,lv) end function s.tgfilter2(c,lv) - return c:IsMonster() and c:IsSetCard(0x8e) and not c:IsLevel(lv) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_VAMPIRE) and not c:IsLevel(lv) and c:IsAbleToGrave() end function s.spfilter1(c,tp) return c:IsAbleToGrave() and Duel.GetMZoneCount(tp,c)>0 end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x8e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VAMPIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -74,7 +74,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end else @@ -86,5 +86,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end - +end \ No newline at end of file diff --git a/official/c69711728.lua b/official/c69711728.lua index c99c974a27..9752626645 100644 --- a/official/c69711728.lua +++ b/official/c69711728.lua @@ -32,13 +32,13 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.cfilter(c,e,tp) - return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsFusionSummoned() and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,c:GetLevel(),e,tp) end function s.filter(c,lv,e,tp) - return c:HasLevel() and c:GetLevel()0 end @@ -27,6 +24,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then local sg=g:RandomSelect(1-tp,1,nil) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c69750546.lua b/official/c69750546.lua index be2a978e4f..55065ccd5a 100644 --- a/official/c69750546.lua +++ b/official/c69750546.lua @@ -1,4 +1,5 @@ --ヴォルカニック・バックショット +--Volcanic Scattershot local s,id=GetID() function s.initial_effect(c) --damage @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xb9} +s.listed_series={SET_BLAZE_ACCELERATOR} s.listed_names={id} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,14 +38,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0xb9) + return re and re:GetHandler():IsSetCard(SET_BLAZE_ACCELERATOR) end function s.costfilter(c) return c:IsCode(id) and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,2,nil) end - local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK|LOCATION_HAND,0,2,nil) end + local g=Duel.GetMatchingGroup(s.costfilter,tp,LOCATION_DECK|LOCATION_HAND,0,nil) if #g>2 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) g=g:Select(tp,2,2,nil) @@ -60,4 +61,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69757518.lua b/official/c69757518.lua index 8c1fab57d7..feecbea758 100644 --- a/official/c69757518.lua +++ b/official/c69757518.lua @@ -1,5 +1,5 @@ --Number C5: Chaos Chimera Dragon ---CNo.5 亡朧龍カオス・キマイラ・ドラゴン +--Number C5: Chaos Chimera Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -19,14 +19,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetCondition(s.atcon) - e2:SetCost(s.atcost) + e2:SetCost(Cost.Detach(1)) e2:SetOperation(s.atop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TODECK) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCost(s.cost) @@ -42,10 +42,6 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.GetAttacker()==c and c:CanChainAttack(0,true) end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToBattle() then return end @@ -54,7 +50,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,9 +73,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg1=sg:Select(tp,1,1,nil) local c=e:GetHandler() - if Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then + if Duel.SendtoDeck(sg1,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then sg:Sub(sg1) Duel.Overlay(c,sg) end end -end +end \ No newline at end of file diff --git a/official/c69764158.lua b/official/c69764158.lua index 8f0d8a2320..ef3f5af48c 100644 --- a/official/c69764158.lua +++ b/official/c69764158.lua @@ -1,4 +1,5 @@ --ペロペロケルペロス +--Peropero Cerperus local s,id=GetID() function s.initial_effect(c) --destroy @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.descon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c6979239.lua b/official/c6979239.lua index 0f4433ac00..73ba00b920 100644 --- a/official/c6979239.lua +++ b/official/c6979239.lua @@ -1,4 +1,5 @@ --リーフ・フェアリー +--Woodland Sprite local s,id=GetID() function s.initial_effect(c) --damage @@ -31,4 +32,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69792699.lua b/official/c69792699.lua index 780f9785ef..56ca58a3e2 100644 --- a/official/c69792699.lua +++ b/official/c69792699.lua @@ -3,7 +3,7 @@ --Scripted by Neo Yuno local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x5a)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_PENGUIN)) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -34,7 +34,7 @@ function s.initial_effect(c) e5:SetCode(EVENT_REMOVE) c:RegisterEffect(e5) end -s.listed_series={0x5a} +s.listed_series={SET_PENGUIN} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and eg:GetFirst()==e:GetHandler():GetEquipTarget() end @@ -52,7 +52,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end function s.cfilter(c,tp,re) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==1-tp - and c:IsReason(REASON_EFFECT) and re:GetHandler():IsSetCard(0x5a) + and c:IsReason(REASON_EFFECT) and re:GetHandler():IsSetCard(SET_PENGUIN) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg and eg:IsExists(s.cfilter,1,nil,tp,re) end @@ -71,7 +71,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetLabel(code) e1:SetTarget(s.distg) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -79,7 +79,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e2:SetLabel(code) e2:SetCondition(s.discon) e2:SetOperation(s.disop) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) local e3=e1:Clone() e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) @@ -95,4 +95,4 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c69809989.lua b/official/c69809989.lua index 288cc09862..9f165bb707 100644 --- a/official/c69809989.lua +++ b/official/c69809989.lua @@ -1,9 +1,9 @@ --- ゴーストリック・ショット --- Ghostrick Shot --- Scripted by Hatter +--ゴーストリック・ショット +--Ghostrick Shot +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION) @@ -13,34 +13,34 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Attach + --Attach local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.spfilter(c,e,tp) - return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GHOSTRICK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.posfilter(c) - return c:IsSetCard(0x8d) and c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() + return c:IsSetCard(SET_GHOSTRICK) and c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -52,12 +52,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_GHOSTRICK) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,e:GetHandler(),0x8d) end + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,e:GetHandler(),SET_GHOSTRICK) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0) @@ -67,7 +67,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_XYZ) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,1,nil,0x8d) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_GRAVE,0,1,1,nil,SET_GHOSTRICK) if #g==0 then return end Duel.Overlay(tc,g) end diff --git a/official/c69811710.lua b/official/c69811710.lua index f965aeb9e9..a10665be8e 100644 --- a/official/c69811710.lua +++ b/official/c69811710.lua @@ -72,4 +72,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(tk2,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c69815951.lua b/official/c69815951.lua index 9b55dfeec7..e0578ae663 100644 --- a/official/c69815951.lua +++ b/official/c69815951.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) end s.listed_names={22398665} function s.tgval(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_MONSTER) + return aux.tgoval(e,re,rp) and re:IsMonsterEffect() end function s.valcheck(e,c) local g=c:GetMaterial() @@ -51,10 +51,10 @@ function s.valcheck(e,c) end function s.atkcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)~=0 + return c:IsRitualSummoned() and c:GetFlagEffect(id)~=0 end function s.atkfilter(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.gycon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) @@ -77,7 +77,7 @@ function s.tgfilter(c) end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return s.tgfilter() end - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(aux.AND(s.tgfilter,Card.IsCanBeEffectTarget),tp,0,LOCATION_ONFIELD,nil,e) if chk==0 then return ct>0 and aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon(ct),0) end local rg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon(ct),1,tp,HINTMSG_REMOVE,s.rescon(ct),nil,false) diff --git a/official/c69831560.lua b/official/c69831560.lua index 663c074270..d80d5446ca 100644 --- a/official/c69831560.lua +++ b/official/c69831560.lua @@ -76,7 +76,7 @@ function s.arcanareg(c,coin) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) e2:SetOperation(s.posop) diff --git a/official/c69832741.lua b/official/c69832741.lua index a8eeda0638..6f4ad09bc9 100644 --- a/official/c69832741.lua +++ b/official/c69832741.lua @@ -18,6 +18,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c6983839.lua b/official/c6983839.lua index f36d93e660..895e6a3a34 100644 --- a/official/c6983839.lua +++ b/official/c6983839.lua @@ -12,19 +12,19 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69838592.lua b/official/c69838592.lua index 9ccb07bb6e..f96776039d 100644 --- a/official/c69838592.lua +++ b/official/c69838592.lua @@ -1,4 +1,5 @@ --妖仙獣 大幽谷響 +--Yosenju Oyam local s,id=GetID() function s.initial_effect(c) --spsummon @@ -33,13 +34,13 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.cfilter(c) - return c:IsSetCard(0xb3) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_YOSENJU) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -72,7 +73,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(bc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -83,7 +84,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.thfilter(c) - return c:IsSetCard(0xb3) and c:IsAbleToHand() + return c:IsSetCard(SET_YOSENJU) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -96,4 +97,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c69838761.lua b/official/c69838761.lua index c829310445..d23fc957cf 100644 --- a/official/c69838761.lua +++ b/official/c69838761.lua @@ -1,5 +1,5 @@ --マシンナーズ・メタルクランチ ---Machina Metalcrunch +--Machina Metalcruncher --scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -37,7 +37,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1800) c:RegisterEffect(e1) @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tg=sg:RandomSelect(1-tp,1) Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69840739.lua b/official/c69840739.lua index 89861cb8ea..14fff4fadd 100644 --- a/official/c69840739.lua +++ b/official/c69840739.lua @@ -1,86 +1,87 @@ --アーティファクト-デュランダル +--Artifact Durendal local s,id=GetID() function s.initial_effect(c) - --xyz summon - Xyz.AddProcedure(c,nil,5,2) c:EnableReviveLimit() - --change effect + --Xyz Summon procedure: 2 Level 5 monsters + Xyz.AddProcedure(c,nil,5,2) + --Activate 1 of these effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetCode(EVENT_CHAINING) + e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e1:SetCondition(s.chcon) - e1:SetCost(s.cost) - e1:SetTarget(s.chtg) - e1:SetOperation(s.chop) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCountLimit(1) + e1:SetCost(Cost.Detach(1)) + e1:SetTarget(s.efftg) + e1:SetOperation(s.effop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) - --reload - local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) - e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_MZONE) - e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e2:SetCost(s.cost) - e2:SetTarget(s.drtg) - e2:SetOperation(s.drop) - c:RegisterEffect(e2) -end -function s.chcon(e,tp,eg,ep,ev,re,r,rp) - local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return (re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE) - or ((re:GetActiveType()==TYPE_SPELL or re:GetActiveType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end -function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,rp,0,LOCATION_ONFIELD,1,nil) end end -function s.chop(e,tp,eg,ep,ev,re,r,rp) - local g=Group.CreateGroup() - Duel.ChangeTargetCard(ev,g) - Duel.ChangeChainOperation(ev,s.repop) +function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) + local event_chaining,_,_,event_value,reason_effect,_,reason_player=Duel.CheckEvent(EVENT_CHAINING,true) + --The activated effect becomes "Destroy 1 Spell/Trap Card your opponent controls" + local b1=event_chaining and Duel.IsExistingMatchingCard(Card.IsSpellTrap,reason_player,0,LOCATION_ONFIELD,1,nil) + and ((reason_effect:IsMonsterEffect() and Duel.GetChainInfo(event_value,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE) + or (reason_effect:GetHandler():IsNormalSpellTrap() and reason_effect:IsHasType(EFFECT_TYPE_ACTIVATE))) + --Each player with a hand shuffles their entire hand into the Deck, then draws the same number of cards they shuffled into the Deck + local b2=(Duel.IsPlayerCanDraw(tp) or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0) + and (Duel.IsPlayerCanDraw(1-tp) or Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0) + and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,LOCATION_HAND,1,nil) + if chk==0 then return b1 or b2 end + local op=not b1 and 2 + or Duel.SelectEffect(tp, + {b1,aux.Stringid(id,1)}, + {b2,aux.Stringid(id,2)}) + e:SetLabel(op) + if op==1 then + e:SetCategory(0) + Duel.SetTargetParam(event_value) + elseif op==2 then + e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) + if not b1 then Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2)) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) + end end -function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) +function s.effop(e,tp,eg,ep,ev,re,r,rp) + local op=e:GetLabel() + if op==1 then + --The activated effect becomes "Destroy 1 Spell/Trap Card your opponent controls" + local g=Group.CreateGroup() + local event_value=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) + Duel.ChangeTargetCard(event_value,g) + Duel.ChangeChainOperation(event_value,s.repop) + elseif op==2 then + --Each player with a hand shuffles their entire hand into the Deck, then draws the same number of cards they shuffled into the Deck + local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) + if Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then + local og=Duel.GetOperatedGroup():Match(Card.IsLocation,nil,LOCATION_DECK) + local turn_player=Duel.GetTurnPlayer() + local non_turn_player=1-turn_player + if og:IsExists(Card.IsControler,1,nil,turn_player) then Duel.ShuffleDeck(turn_player) end + if og:IsExists(Card.IsControler,1,nil,non_turn_player) then Duel.ShuffleDeck(non_turn_player) end + local ct1=og:FilterCount(Card.IsPreviousControler,nil,turn_player) + local ct2=og:FilterCount(Card.IsPreviousControler,nil,non_turn_player) + Duel.BreakEffect() + if ct1>0 then + Duel.Draw(turn_player,ct1,REASON_EFFECT) + end + if ct2>0 then + Duel.Draw(non_turn_player,ct2,REASON_EFFECT) + end + end + end end function s.repop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:GetType()==TYPE_SPELL or c:GetType()==TYPE_TRAP then + if c:IsNormalSpellTrap() then c:CancelToGrave(false) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) if #g>0 then Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end end -function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) - local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) - local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) - if chk==0 then return (Duel.IsPlayerCanDraw(tp) or h1==0) - and (Duel.IsPlayerCanDraw(1-tp) or h2==0) - and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,LOCATION_HAND,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,PLAYER_ALL,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) -end -function s.drop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - if Duel.SendtoDeck(g,nil,0,REASON_EFFECT)~=0 then - local og=g:Filter(Card.IsLocation,nil,LOCATION_DECK) - if og:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end - if og:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end - Duel.BreakEffect() - local ct1=og:FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,tp),nil) - local ct2=og:FilterCount(aux.FilterEqualFunction(Card.GetPreviousControler,1-tp),nil) - Duel.Draw(tp,ct1,REASON_EFFECT) - Duel.Draw(1-tp,ct2,REASON_EFFECT) - end -end diff --git a/official/c69846323.lua b/official/c69846323.lua index c571d2b6fc..137d97d136 100644 --- a/official/c69846323.lua +++ b/official/c69846323.lua @@ -1,4 +1,5 @@ --カンツウツボ +--Piercing Moray local s,id=GetID() function s.initial_effect(c) --atkup @@ -18,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c) - return c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) + return c:IsRace(RACE_FISH|RACE_AQUA|RACE_SEASERPENT) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,e:GetHandler()) end @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c69852487.lua b/official/c69852487.lua index 08d78bc0c8..770968638d 100644 --- a/official/c69852487.lua +++ b/official/c69852487.lua @@ -1,5 +1,5 @@ --希望皇アストラル・ホープ ---Utopic Astral Hope +--Astraltopia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x73,0x139,0x7e,0x16c} +s.listed_series={SET_XYZ,SET_ONOMAT,SET_ZEXAL,SET_NUMBER_SPELL_TRAP} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_XYZ),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -41,14 +41,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) if not (c:IsSpellTrap() and c:IsAbleToHand()) then return false end - return c:IsSetCard(0x73) or c:IsSetCard(0x139) or c:IsSetCard(0x7e) or c:IsSetCard(0x16c) + return c:IsSetCard(SET_XYZ) or c:IsSetCard(SET_ONOMAT) or c:IsSetCard(SET_ZEXAL) or c:IsSetCard(SET_NUMBER_SPELL_TRAP) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -61,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c69865139.lua b/official/c69865139.lua index f467ade948..15f3826269 100644 --- a/official/c69865139.lua +++ b/official/c69865139.lua @@ -1,4 +1,5 @@ --天輪の葬送士 +--Guiding Light local s,id=GetID() function s.initial_effect(c) --spsummon @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c69868555.lua b/official/c69868555.lua index 817005c26c..7c23ca08d6 100644 --- a/official/c69868555.lua +++ b/official/c69868555.lua @@ -64,18 +64,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -107,9 +107,9 @@ function s.thcostfilter(c) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -121,4 +121,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c698785.lua b/official/c698785.lua index 08d901ac9e..2ad536d2b4 100644 --- a/official/c698785.lua +++ b/official/c698785.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) @@ -29,4 +25,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c69884162.lua b/official/c69884162.lua index e96f818286..61f5e53e48 100644 --- a/official/c69884162.lua +++ b/official/c69884162.lua @@ -13,4 +13,4 @@ function s.initial_effect(c) e1:SetValue(CARD_NEOS) c:RegisterEffect(e1) end -s.listed_names={CARD_NEOS} +s.listed_names={CARD_NEOS} \ No newline at end of file diff --git a/official/c69890967.lua b/official/c69890967.lua index b7bb6e21f2..57fadf93b5 100644 --- a/official/c69890967.lua +++ b/official/c69890967.lua @@ -83,7 +83,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end end @@ -107,7 +107,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c69895264.lua b/official/c69895264.lua index 9c8b885a86..a1813a4a51 100644 --- a/official/c69895264.lua +++ b/official/c69895264.lua @@ -1,9 +1,9 @@ --- ラビュリンス・セッティング --- Labrynth Setting --- Scripted by Hatter +--ラビュリンス・セッティング +--Labrynth Set-Up +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Send to Deck + --Send to Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK) @@ -16,19 +16,19 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x17f} +s.listed_series={SET_LABRYNTH} function s.tdfilter(c) - return c:IsFaceup() and c:IsSetCard(0x17f) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToDeck() + return c:IsFaceup() and c:IsSetCard(SET_LABRYNTH) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,2,2,nil) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,2,2,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.setfilter(c) - return not c:IsSetCard(0x17f) and c:GetType()==TYPE_TRAP and c:IsSSetable() + return not c:IsSetCard(SET_LABRYNTH) and c:IsNormalTrap() and c:IsSSetable() end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) @@ -44,4 +44,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c6990577.lua b/official/c6990577.lua index 3e2a458c93..829f8fe5a1 100644 --- a/official/c6990577.lua +++ b/official/c6990577.lua @@ -1,5 +1,5 @@ --守護竜アンドレイク ---Andrake the Guardragon +--Guardragon Andrake --scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) @@ -38,7 +38,7 @@ function s.splimit(e,se,sp,st) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return eg:GetFirst()==c and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) + return eg:GetFirst()==c and c:IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -47,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return eg:GetFirst()==c and c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_REMOVED) + return eg:GetFirst()==c and c:IsPreviousLocation(LOCATION_GRAVE|LOCATION_REMOVED) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -71,5 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c6992184.lua b/official/c6992184.lua index ba4866d985..2966e5f3cf 100644 --- a/official/c6992184.lua +++ b/official/c6992184.lua @@ -1,5 +1,5 @@ --Pendulum Encore ---scripted by edo9300 +--Pendulum Encore local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -32,7 +32,7 @@ function s.initial_effect(c) end) end function s.pencon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.IsMainPhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.filter(c,tp) s.exclude_card=c @@ -53,8 +53,8 @@ function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) return res end e:SetLabel(0) - Duel.DiscardHand(tp,s.filter,1,1,REASON_COST+REASON_DISCARD,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_HAND) + Duel.DiscardHand(tp,s.filter,1,1,REASON_COST|REASON_DISCARD,nil,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_HAND) end function s.addreset(c) s.should_check=true @@ -74,7 +74,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetTargetRange(LOCATION_PZONE,0) e1:SetValue(aux.indsval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_ACTIVATE) @@ -86,7 +86,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCountLimit(1) e3:SetOperation(s.retop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end end @@ -95,4 +95,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c69925461.lua b/official/c69925461.lua index c694d1e863..444f8fd61e 100644 --- a/official/c69925461.lua +++ b/official/c69925461.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.SelfTributeCost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.lv6sptg) e3:SetOperation(s.lv6spop) c:RegisterEffect(e3) diff --git a/official/c69933858.lua b/official/c69933858.lua index 54b0d85ab9..f7fb53c825 100644 --- a/official/c69933858.lua +++ b/official/c69933858.lua @@ -1,4 +1,5 @@ --ギルフォード・ザ・レジェンド +--Gilford the Legend local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -46,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Equip(tp,ec,tc,true,true) end Duel.EquipComplete() -end +end \ No newline at end of file diff --git a/official/c69937550.lua b/official/c69937550.lua index df262519cf..ec09207a0f 100644 --- a/official/c69937550.lua +++ b/official/c69937550.lua @@ -1,4 +1,5 @@ --宝玉獣 アンバー・マンモス +--Crystal Beast Amber Mammoth local s,id=GetID() function s.initial_effect(c) --send replace @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.cbop) c:RegisterEffect(e2) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.repcon(e) local c=e:GetHandler() return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY) @@ -31,15 +32,15 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.cbcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bt=eg:GetFirst() - return r~=REASON_REPLACE and c~=bt and bt:IsFaceup() and bt:IsSetCard(0x1034) and bt:GetControler()==c:GetControler() + return r~=REASON_REPLACE and c~=bt and bt:IsFaceup() and bt:IsSetCard(SET_CRYSTAL_BEAST) and bt:GetControler()==c:GetControler() end function s.cbtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():GetAttackableTarget():IsContains(e:GetHandler()) end @@ -49,4 +50,4 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and not Duel.GetAttacker():IsImmuneToEffect(e) then Duel.ChangeAttackTarget(c) end -end +end \ No newline at end of file diff --git a/official/c69946549.lua b/official/c69946549.lua index c96d9ca59a..46d137331f 100644 --- a/official/c69946549.lua +++ b/official/c69946549.lua @@ -40,7 +40,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -51,8 +51,8 @@ function s.lvcon(e) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetCounter(COUNTER_PREDATOR)>0 + return rp==1-tp and re:IsMonsterEffect() and re:GetHandler():GetCounter(COUNTER_PREDATOR)>0 end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c69954399.lua b/official/c69954399.lua index cb4d3c0fbc..9cdbdb1c49 100644 --- a/official/c69954399.lua +++ b/official/c69954399.lua @@ -51,7 +51,7 @@ function s.turnop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ct=c:GetTurnCounter() c:SetTurnCounter(ct+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetTurnCounter()==2 and e:GetHandler():GetFlagEffect(id)>0 @@ -77,4 +77,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c69975751.lua b/official/c69975751.lua index cb79f85e8b..7d960018cc 100644 --- a/official/c69975751.lua +++ b/official/c69975751.lua @@ -56,4 +56,4 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c69982329.lua b/official/c69982329.lua index 5bf467e230..ced77287ce 100644 --- a/official/c69982329.lua +++ b/official/c69982329.lua @@ -1,4 +1,5 @@ --ペンデュラム・ターン +--Pendulum Shift local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,10 +35,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c70000776.lua b/official/c70000776.lua index f6597f46a5..221d411e31 100644 --- a/official/c70000776.lua +++ b/official/c70000776.lua @@ -26,18 +26,18 @@ function s.initial_effect(c) e3:SetCondition(s.sdcon) c:RegisterEffect(e3) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} s.listed_names={CARD_NECROVALLEY} function s.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x2e) + return c:IsFaceup() and c:IsSetCard(SET_GRAVEKEEPERS) end function s.actcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsEnvironment(CARD_NECROVALLEY) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0x2e) + return not c:IsSetCard(SET_GRAVEKEEPERS) end function s.sdcon(e) return not Duel.IsExistingMatchingCard(s.cfilter1,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) or not Duel.IsEnvironment(CARD_NECROVALLEY) -end +end \ No newline at end of file diff --git a/official/c70026064.lua b/official/c70026064.lua index ef00df9da3..22bf1e3902 100644 --- a/official/c70026064.lua +++ b/official/c70026064.lua @@ -1,4 +1,5 @@ --武神-ヒルコ +--Bujin Hiruko local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -9,19 +10,19 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_PZONE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0x88) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_BUJIN) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode(),pg) end function s.filter2(c,e,tp,mc,code,pg) - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ) and c:IsSetCard(0x88) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_BUJIN) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -44,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c70043345.lua b/official/c70043345.lua index a9075efc88..cff33cc052 100644 --- a/official/c70043345.lua +++ b/official/c70043345.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xb2} +s.listed_series={SET_UA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local b1=Duel.GetCurrentPhase()~=PHASE_DAMAGE local b2=Duel.CheckEvent(EVENT_BATTLE_START) and s.rmcon(e,tp,eg,ep,ev,re,r,rp) and s.rmtg(e,tp,eg,ep,ev,re,r,rp,0) @@ -54,7 +54,7 @@ function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetAttackTarget() if not bc then return false end if tc:IsControler(1-tp) then tc,bc=bc,tc end - if tc:IsFaceup() and tc:IsSetCard(0xb2) then + if tc:IsFaceup() and tc:IsSetCard(SET_UA) then e:SetLabelObject(bc) return true else return false end @@ -63,18 +63,18 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local bc=e:GetLabelObject() if chk==0 then return bc:IsAbleToRemove() and Duel.GetFlagEffect(tp,id)==0 end Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local bc=e:GetLabelObject() - if bc:IsRelateToBattle() and bc:IsControler(1-tp) and Duel.Remove(bc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if bc:IsRelateToBattle() and bc:IsControler(1-tp) and Duel.Remove(bc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then bc:SetTurnCounter(0) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) e1:SetLabelObject(bc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -83,7 +83,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -95,7 +95,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xb2) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_UA) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -108,4 +108,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c70046172.lua b/official/c70046172.lua index 674e928ee5..d1e9ff3843 100644 --- a/official/c70046172.lua +++ b/official/c70046172.lua @@ -1,4 +1,5 @@ --突進 +--Rush Recklessly local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -28,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(700) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70054514.lua b/official/c70054514.lua index 991d08a1f4..9642334cfd 100644 --- a/official/c70054514.lua +++ b/official/c70054514.lua @@ -1,4 +1,5 @@ --ダークシー・フロート +--Darksea Float local s,id=GetID() function s.initial_effect(c) --draw @@ -26,4 +27,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70070211.lua b/official/c70070211.lua index c60aa9a068..c270391c04 100644 --- a/official/c70070211.lua +++ b/official/c70070211.lua @@ -1,5 +1,5 @@ --ジョウルリ-パンクナシワリ・サプライズ ---Joururi P.U.N.K. Nashiwari Surprise +--Joruri-P.U.N.K. Nashiwari Surprise --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -15,10 +15,10 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} --Pop function s.filter(c) - return c:IsSetCard(0x173) and c:IsFaceup() + return c:IsSetCard(SET_PUNK) and c:IsFaceup() end function s.tgfilter(c,punk) return c:IsFacedown() or punk @@ -36,4 +36,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70074904.lua b/official/c70074904.lua index 10f1b08b21..433954b2f1 100644 --- a/official/c70074904.lua +++ b/official/c70074904.lua @@ -1,4 +1,5 @@ --D.D.アサイラント +--D.D. Assailant local s,id=GetID() function s.initial_effect(c) --remove @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(a,d) local rg=g:Filter(Card.IsRelateToBattle,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70083592.lua b/official/c70083592.lua index 5eabd4e5d1..e9094fdde9 100644 --- a/official/c70083592.lua +++ b/official/c70083592.lua @@ -1,8 +1,10 @@ --縫合蘇生 +--Suture Rebirth local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -12,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa9,0xad} +s.listed_series={SET_FLUFFAL,SET_FRIGHTFUR} function s.filter(c,e,tp) - return (c:IsSetCard(0xa9) or c:IsSetCard(0xad)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard({SET_FLUFFAL,SET_FRIGHTFUR}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -31,13 +33,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c70083723.lua b/official/c70083723.lua index d06cca65eb..cc9a69ce77 100644 --- a/official/c70083723.lua +++ b/official/c70083723.lua @@ -1,4 +1,5 @@ --ナチュル・ドラゴンフライ +--Naturia Dragonfly local s,id=GetID() function s.initial_effect(c) --indes @@ -16,13 +17,13 @@ function s.initial_effect(c) e1:SetValue(s.atkval) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.indes(e,c) return c:GetAttack()>=2000 end function s.filter(c) - return c:IsSetCard(0x2a) and c:IsMonster() + return c:IsSetCard(SET_NATURIA) and c:IsMonster() end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*200 -end +end \ No newline at end of file diff --git a/official/c70089580.lua b/official/c70089580.lua index 932bacf604..9d90893819 100644 --- a/official/c70089580.lua +++ b/official/c70089580.lua @@ -1,4 +1,5 @@ --オーロラ・ウィング +--Aurora Wing local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c70095154.lua b/official/c70095154.lua index d9b28fff7a..a441243c3e 100644 --- a/official/c70095154.lua +++ b/official/c70095154.lua @@ -1,4 +1,5 @@ --サイバー・ドラゴン +--Cyber Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,4 +16,4 @@ function s.spcon(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c70095155.lua b/official/c70095155.lua deleted file mode 100644 index b88c477e79..0000000000 --- a/official/c70095155.lua +++ /dev/null @@ -1,18 +0,0 @@ ---サイバー·ドラゴン -local s,id=GetID() -function s.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(s.spcon) - c:RegisterEffect(e1) -end -function s.spcon(e,c) - if c==nil then return true end - return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 - and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 - and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end diff --git a/official/c70101178.lua b/official/c70101178.lua index 00ed9d04b8..70fc9163f4 100644 --- a/official/c70101178.lua +++ b/official/c70101178.lua @@ -1,4 +1,5 @@ --パンサー・シャーク +--Panther Shark local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -32,4 +33,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c70109009.lua b/official/c70109009.lua index 6e01a5e2cc..49687465c0 100644 --- a/official/c70109009.lua +++ b/official/c70109009.lua @@ -41,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70117791.lua b/official/c70117791.lua index 616eee2694..573666a4db 100644 --- a/official/c70117791.lua +++ b/official/c70117791.lua @@ -53,4 +53,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70122149.lua b/official/c70122149.lua index a26a24556d..9bb9b41446 100644 --- a/official/c70122149.lua +++ b/official/c70122149.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={CARD_EVIL_EYE_SELENE} function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x129) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_EVIL_EYE) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -53,7 +53,7 @@ function s.dmgcond(e,tp,eg,ep,ev,re,r,rp) end function s.dmgtg(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttackTarget() - if chk==0 then return a~=nil and a:IsControler(tp) and a:IsSetCard(0x129) end + if chk==0 then return a~=nil and a:IsControler(tp) and a:IsSetCard(SET_EVIL_EYE) end end function s.dmgop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -62,14 +62,14 @@ function s.dmgop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_ALSO_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)==REASON_EFFECT and e:GetHandler():IsPreviousLocation(LOCATION_FZONE) end function s.filter(c) - return c:IsSetCard(0x129) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_EVIL_EYE) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c70124586.lua b/official/c70124586.lua index 653936ddf5..4b42625c54 100644 --- a/official/c70124586.lua +++ b/official/c70124586.lua @@ -1,4 +1,5 @@ --ホールディング・レッグス +--Holding Legs local s,id=GetID() function s.initial_effect(c) --to hand @@ -23,7 +24,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.target) e4:SetOperation(s.operation) c:RegisterEffect(e4) @@ -49,8 +50,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70138455.lua b/official/c70138455.lua index b4a1ce8986..4f3493e431 100644 --- a/official/c70138455.lua +++ b/official/c70138455.lua @@ -1,4 +1,5 @@ --ミスター・ボンバー +--Blast Juggler local s,id=GetID() function s.initial_effect(c) --destroy @@ -6,10 +7,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_DESTROY) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -17,10 +18,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsAttackBelow(1000) end @@ -38,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(s.desfilter,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70156946.lua b/official/c70156946.lua index 08c0d1ad6c..34963ec610 100644 --- a/official/c70156946.lua +++ b/official/c70156946.lua @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -67,4 +67,4 @@ function s.xyzlv(e,c,rc) else return e:GetHandler():GetLevel() end -end +end \ No newline at end of file diff --git a/official/c70156997.lua b/official/c70156997.lua index 5f6be81deb..c6c3c0f151 100644 --- a/official/c70156997.lua +++ b/official/c70156997.lua @@ -1,4 +1,5 @@ --地霊術-「鉄」 +--Spiritual Earth Art - Kurogane local s,id=GetID() function s.initial_effect(c) --Activate @@ -53,4 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c70168345.lua b/official/c70168345.lua index c963c204d6..a344b50928 100644 --- a/official/c70168345.lua +++ b/official/c70168345.lua @@ -21,7 +21,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsCode(CARD_DARK_MAGICIAN) end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsCode,CARD_DARK_MAGICIAN),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsCode,CARD_DARK_MAGICIAN),tp,LOCATION_MZONE,0,1,1,nil) end @@ -29,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local atk=0 - local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) local bc=g:GetFirst() for bc in aux.Next(g) do atk=atk+bc:GetAttack() @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70187958.lua b/official/c70187958.lua index 755add16e3..25fa0af999 100644 --- a/official/c70187958.lua +++ b/official/c70187958.lua @@ -1,4 +1,5 @@ --ダーク砂バク +--Dark Desertapir local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c70194827.lua b/official/c70194827.lua index 9f82701209..a118f8c92f 100644 --- a/official/c70194827.lua +++ b/official/c70194827.lua @@ -1,4 +1,5 @@ --ブレード・バウンサー +--Blade Bounzer local s,id=GetID() function s.initial_effect(c) --chain attack @@ -18,7 +19,7 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.atop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -28,6 +29,6 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c7019529.lua b/official/c7019529.lua index 3e21c1a867..2000dd085b 100644 --- a/official/c7019529.lua +++ b/official/c7019529.lua @@ -1,4 +1,5 @@ --空の昆虫兵 +--Insect Soldiers of the Sky local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,4 +16,4 @@ function s.condtion(e) return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil and Duel.GetAttackTarget():IsFaceup() and Duel.GetAttackTarget():IsAttribute(ATTRIBUTE_WIND) -end +end \ No newline at end of file diff --git a/official/c70204022.lua b/official/c70204022.lua index 51d3b4d030..d7c3cb3100 100644 --- a/official/c70204022.lua +++ b/official/c70204022.lua @@ -1,10 +1,10 @@ --- 音響戦士ディージェス --- Symphonic Warrior Deejays --- Scripted by Hatter +--音響戦士ディージェス +--Symphonic Warrior DJJ +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Flip "Symphonic Warrior" monster face-up + --Flip "Symphonic Warrior" monster face-up local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_POSITION) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1) - -- Special Summon self + --Special Summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetTarget(s.ssptg) e2:SetOperation(s.sspop) c:RegisterEffect(e2) - -- Special Summon "Symphonic Warrior" monster from Deck + --Special Summon "Symphonic Warrior" monster from Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -42,10 +42,10 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.listed_names={75304793,id} function s.posfilter(c) - return c:IsSetCard(0x1066) and c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() + return c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -59,7 +59,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.sspcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x1066) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_SYMPHONIC_WARRIOR) end function s.ssptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -74,7 +74,7 @@ function s.sspop(e,tp,eg,ep,ev,re,r,rp) end end function s.dspfilter(c,e,tp,pos) - return c:IsSetCard(0x1066) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) + return c:IsSetCard(SET_SYMPHONIC_WARRIOR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) end function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) local pos=POS_FACEDOWN_DEFENSE @@ -94,11 +94,11 @@ function s.dspop(e,tp,eg,ep,ev,re,r,rp) if sc:IsFacedown() then Duel.ConfirmCards(1-tp,sc) elseif sc:IsFaceup() then - -- Negate its effects + --Negate its effects local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -107,4 +107,4 @@ function s.dspop(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c7020743.lua b/official/c7020743.lua index 6863ee60aa..31e4a756cb 100644 --- a/official/c7020743.lua +++ b/official/c7020743.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e6:SetRange(LOCATION_MZONE) e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e6:SetCondition(function(e) return e:GetHandler():GetOverlayCount()>=8 end) - e6:SetCost(aux.dxmcostgen(4,4,nil)) + e6:SetCost(Cost.Detach(4,4,nil)) e6:SetTarget(s.destg) e6:SetOperation(s.desop) c:RegisterEffect(e6,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c7021574.lua b/official/c7021574.lua index bb28a3c75f..ffadb9d472 100644 --- a/official/c7021574.lua +++ b/official/c7021574.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCondition(s.thcon) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -30,17 +30,12 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xa4} +s.listed_series={SET_KURIBOH} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.thfilter(c) - return c:IsSetCard(0xa4) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_KURIBOH) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -59,7 +54,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -74,8 +69,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-1500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70219023.lua b/official/c70219023.lua index cfdda08aa7..0cafe70c70 100644 --- a/official/c70219023.lua +++ b/official/c70219023.lua @@ -25,7 +25,7 @@ function s.fusfilter(typ) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ct=0 @@ -126,7 +126,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(math.floor(diff/2)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -134,7 +134,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(c:GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3),nil) end diff --git a/official/c70226289.lua b/official/c70226289.lua index 8bbb9a52b1..e3521b4669 100644 --- a/official/c70226289.lua +++ b/official/c70226289.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Part of "Witchcrafter" archetype -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.filter(c,e,tp) - return c:IsSetCard(0x128) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -48,12 +48,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) e1:SetOperation(s.actop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -61,7 +61,7 @@ end --Player's spellcaster monster effect activated function s.actop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if rc:IsRace(RACE_SPELLCASTER) and re:IsActiveType(TYPE_MONSTER) and ep==tp then + if rc:IsRace(RACE_SPELLCASTER) and re:IsMonsterEffect() and ep==tp then Duel.SetChainLimit(s.chainlm) end end @@ -70,7 +70,7 @@ function s.chainlm(e,rp,tp) end --Check if player controls a "Witchcrafter" monster function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()==tp + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70231910.lua b/official/c70231910.lua index 3ba50942c4..96bb60b501 100644 --- a/official/c70231910.lua +++ b/official/c70231910.lua @@ -1,4 +1,5 @@ --ブラック・コア +--Dark Core local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsAbleToRemove() @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70238111.lua b/official/c70238111.lua index bf2d330470..dcb4b1a449 100644 --- a/official/c70238111.lua +++ b/official/c70238111.lua @@ -21,30 +21,30 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.filter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:GetLink()==3 and c:IsAbleToRemove() and aux.SpElimFilter(c,true,true) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,mc) - return c:IsSetCard(0x101) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c:IsSetCard(SET_CODE_TALKER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) if #g>0 then @@ -58,12 +58,8 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.spfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x101) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_CODE_TALKER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter2(chkc,e,tp) end @@ -75,7 +71,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c70245411.lua b/official/c70245411.lua index 184e1dc59a..98c0bd41d5 100644 --- a/official/c70245411.lua +++ b/official/c70245411.lua @@ -29,11 +29,11 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xa9} +s.listed_series={SET_FLUFFAL} s.listed_names={30068120} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsSetCard(0xa9) and tc:IsMonster() then + if tc:IsSetCard(SET_FLUFFAL) and tc:IsMonster() then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -60,12 +60,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end else Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_DISCARD) end Duel.ShuffleHand(tp) end function s.filter(c) - return (c:IsCode(30068120) or (c:IsSetCard(0xa9) and c:IsMonster())) and c:IsAbleToHand() + return (c:IsCode(30068120) or (c:IsSetCard(SET_FLUFFAL) and c:IsMonster())) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c70252926.lua b/official/c70252926.lua index 1dbdf31639..f00b78c051 100644 --- a/official/c70252926.lua +++ b/official/c70252926.lua @@ -1,5 +1,5 @@ --フォーチュンレディ・エヴァリー ---Fortune Lady Ever +--Fortune Lady Every local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_REMOVE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -44,7 +44,7 @@ function s.value(e,c) return c:GetLevel()*400 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.filter(c) return c:IsMonster() and c:IsFaceup() and c:IsAbleToRemove() @@ -64,7 +64,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) if c:GetLevel()==lvl+1 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -77,7 +77,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rmfilter(c) return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_SPELLCASTER) @@ -96,4 +96,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c7025445.lua b/official/c7025445.lua index 9400fd0235..68638e16a7 100644 --- a/official/c7025445.lua +++ b/official/c7025445.lua @@ -53,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-g:GetFirst():GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -64,14 +64,14 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c70261145.lua b/official/c70261145.lua index bde85c4c4c..5dab15fe7e 100644 --- a/official/c70261145.lua +++ b/official/c70261145.lua @@ -1,4 +1,5 @@ --ナチュル・トライアンフ +--Naturia Tulip local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -8,9 +9,9 @@ function s.initial_effect(c) e1:SetOperation(s.chop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) + return c:IsFaceup() and c:IsSetCard(SET_NATURIA) end function s.chop(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end @@ -22,7 +23,7 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70271583.lua b/official/c70271583.lua index 1eefc15c27..f4254e53ef 100644 --- a/official/c70271583.lua +++ b/official/c70271583.lua @@ -1,4 +1,5 @@ --カラクリ守衛 参壱参 +--Karakuri Watchdog mdl 313 "Saizan" local s,id=GetID() function s.initial_effect(c) --must attack @@ -32,7 +33,7 @@ function s.initial_effect(c) e5:SetValue(1) c:RegisterEffect(e5) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -43,7 +44,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (e:GetHandler()==Duel.GetAttacker() or e:GetHandler()==Duel.GetAttackTarget()) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) + return c:IsFaceup() and c:IsSetCard(SET_KARAKURI) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -54,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -64,4 +65,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c70278545.lua b/official/c70278545.lua index 626619311a..0d47fd4f31 100644 --- a/official/c70278545.lua +++ b/official/c70278545.lua @@ -1,4 +1,5 @@ --謙虚な壺 +--Pot of Generosity local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,6 +23,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>=2 then Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,2,2,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70284332.lua b/official/c70284332.lua index 4ea600755b..0b410324f3 100644 --- a/official/c70284332.lua +++ b/official/c70284332.lua @@ -1,4 +1,5 @@ --調律師の陰謀 +--Tuner's Scheme local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE) e1:SetRange(LOCATION_MZONE) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetCondition(s.con) tc:RegisterEffect(e1) --redirect @@ -50,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetCondition(s.dircon) e2:SetValue(LOCATION_REMOVED) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -68,4 +69,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70298454.lua b/official/c70298454.lua index aafd4a018e..61d9dc3df3 100644 --- a/official/c70298454.lua +++ b/official/c70298454.lua @@ -15,4 +15,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c7030340.lua b/official/c7030340.lua index 610662eae6..cb36fe6da3 100644 --- a/official/c7030340.lua +++ b/official/c7030340.lua @@ -1,4 +1,5 @@ --百機夜工 +--Factory of 100 Machines local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,21 +13,21 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter1(c) - return c:IsSetCard(0x26) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.filter2(c,sg) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and not sg:IsContains(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter2(chkc) end - local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return #rg>0 and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,0,1,nil,rg) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter2,tp,LOCATION_MZONE,0,1,1,nil,rg) Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,#rg,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) local tc=Duel.GetFirstTarget() if ct>0 and tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then @@ -34,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(#g*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70307656.lua b/official/c70307656.lua index 2768aa6538..eb6f2d4033 100644 --- a/official/c70307656.lua +++ b/official/c70307656.lua @@ -1,4 +1,5 @@ --グラッジ +--Mucus Yolk local s,id=GetID() function s.initial_effect(c) --direct attack @@ -16,17 +17,17 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.atkcon) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(id)~=0 + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetFlagEffect(id)~=0 end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,7 +37,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70329348.lua b/official/c70329348.lua index e449b8bc85..d5adc554bd 100644 --- a/official/c70329348.lua +++ b/official/c70329348.lua @@ -1,4 +1,5 @@ --炎舞-「天権」 +--Fire Formation - Tenken local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,7 +23,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR) @@ -42,13 +43,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -56,10 +57,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetValue(s.efilter) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) tc:RegisterEffect(e3) end end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() -end +end \ No newline at end of file diff --git a/official/c70333910.lua b/official/c70333910.lua index 32072d9271..3aef130154 100644 --- a/official/c70333910.lua +++ b/official/c70333910.lua @@ -1,7 +1,6 @@ --ノクトビジョン・ドラゴン --Noctovision Dragon --Adapted from anime version by Messoras - local s,id=GetID() function s.initial_effect(c) --Negate opponent's card/effect that targets your set card(s) @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.discon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -65,7 +64,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c70335319.lua b/official/c70335319.lua index 24b52eee36..2f532e5d3a 100644 --- a/official/c70335319.lua +++ b/official/c70335319.lua @@ -81,7 +81,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 then s[ep]=s[ep]+1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.cfilter(c) @@ -121,7 +121,7 @@ function s.cacost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(at:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -146,13 +146,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + return ep~=tp and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) end function s.disfilter(c) return c:IsSpellTrap() and c:IsAbleToGraveAsCost() @@ -169,4 +169,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateActivation(ev) -end +end \ No newline at end of file diff --git a/official/c70342110.lua b/official/c70342110.lua index d426e5638d..7b35197e78 100644 --- a/official/c70342110.lua +++ b/official/c70342110.lua @@ -1,4 +1,5 @@ --次元幽閉 +--Dimensional Prison local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:CanAttack() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70344351.lua b/official/c70344351.lua index 8e0a29d67b..ceea23e27c 100644 --- a/official/c70344351.lua +++ b/official/c70344351.lua @@ -1,4 +1,5 @@ --フォースフィールド +--Riryoku Field local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and #tg==1 and tg:GetFirst():IsLocation(LOCATION_MZONE) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70355994.lua b/official/c70355994.lua index d7a5144cc1..0c523c8f49 100644 --- a/official/c70355994.lua +++ b/official/c70355994.lua @@ -25,14 +25,14 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.setcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -45,7 +45,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() and Duel.IsExistingTarget(s.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -58,7 +58,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter2(chkc) end diff --git a/official/c70368879.lua b/official/c70368879.lua index adb370472a..0fa324173a 100644 --- a/official/c70368879.lua +++ b/official/c70368879.lua @@ -1,4 +1,5 @@ --成金ゴブリン +--Upstart Goblin local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70369116.lua b/official/c70369116.lua index 1e7cb3362e..b23c9b430c 100644 --- a/official/c70369116.lua +++ b/official/c70369116.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x46} +s.listed_series={SET_FUSION} function s.atfilter(c) return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_DARK) end @@ -43,12 +43,12 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(ATTRIBUTE_DARK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.copfilter(c) - return c:IsAbleToGraveAsCost() and c:IsSetCard(0x46) and (c:GetType()==TYPE_SPELL or c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY) and c:CheckActivateEffect(true,true,false)~=nil + return c:IsAbleToGraveAsCost() and c:IsSetCard(SET_FUSION) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:CheckActivateEffect(true,true,false)~=nil end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,2000) and Duel.IsExistingMatchingCard(s.copfilter,tp,LOCATION_DECK,0,1,nil) end @@ -90,7 +90,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end - +end \ No newline at end of file diff --git a/official/c703897.lua b/official/c703897.lua index 04c31ced1f..1082dc0f08 100644 --- a/official/c703897.lua +++ b/official/c703897.lua @@ -26,13 +26,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x11b} +s.listed_series={SET_ORCUST} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x11b) and c:IsLinkMonster() + return c:IsFaceup() and c:IsSetCard(SET_ORCUST) and c:IsLinkMonster() end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() @@ -63,7 +63,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -75,14 +75,14 @@ function s.thfilter(c) return (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_REMOVED) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_REMOVED,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c70389815.lua b/official/c70389815.lua index efe0cfbb22..33b62ae26b 100644 --- a/official/c70389815.lua +++ b/official/c70389815.lua @@ -7,24 +7,20 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) c:RegisterEffect(e1) end s.listed_series={SET_ATTRACTION,SET_AMAZEMENT} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then return s.thtg(e,tp,eg,ep,ev,re,r,rp,0) else return s.settg(e,tp,eg,ep,ev,re,r,rp,0) end end - if Duel.GetTurnPlayer()==tp then + if Duel.IsTurnPlayer(tp) then e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e:SetOperation(s.thop) s.thtg(e,tp,eg,ep,ev,re,r,rp,1) diff --git a/official/c70391588.lua b/official/c70391588.lua index 11630d9565..e0912cf6b0 100644 --- a/official/c70391588.lua +++ b/official/c70391588.lua @@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,0,0,lv,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetValue(lv) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c70406920.lua b/official/c70406920.lua index 0d72d8ccf7..90ce82e8d8 100644 --- a/official/c70406920.lua +++ b/official/c70406920.lua @@ -19,7 +19,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.sumlimit) @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) @@ -38,14 +38,14 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1000,1000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -75,6 +75,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c70410002.lua b/official/c70410002.lua index 522797a348..28615683f3 100644 --- a/official/c70410002.lua +++ b/official/c70410002.lua @@ -18,4 +18,4 @@ end function s.atkval(e,c) local g=Duel.GetMatchingGroup(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil) return g:GetSum(Card.GetLink)*300 -end +end \ No newline at end of file diff --git a/official/c70422863.lua b/official/c70422863.lua index 3ed12b6523..b5e8a502df 100644 --- a/official/c70422863.lua +++ b/official/c70422863.lua @@ -1,4 +1,5 @@ --星守る結界 +--Hexatellarknight local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,20 +29,20 @@ function s.initial_effect(c) e4:SetOperation(s.negop) c:RegisterEffect(e4) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.atktg(e,c) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x9c) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_TELLARKNIGHT) end function s.atkval(e,c) return c:GetOverlayCount()*200 end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsType(TYPE_XYZ) and tc:IsSetCard(0x9c) + return tc:IsFaceup() and tc:IsType(TYPE_XYZ) and tc:IsSetCard(SET_TELLARKNIGHT) and tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) end function s.cfilter(c) - return c:IsSetCard(0x9c) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_TELLARKNIGHT) and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -50,4 +51,4 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c70423794.lua b/official/c70423794.lua index be016bc046..a69f4a9735 100644 --- a/official/c70423794.lua +++ b/official/c70423794.lua @@ -1,7 +1,8 @@ --D・コード +--Morphtronic Cord local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x26)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_MORPHTRONIC)) --destroy local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.descon(e,tp,eg,ep,ev,re,r,rp) local tg=e:GetHandler():GetEquipTarget() return tg and eg:IsContains(tg) @@ -24,7 +25,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70427670.lua b/official/c70427670.lua index 776000b2bf..8eb1120247 100644 --- a/official/c70427670.lua +++ b/official/c70427670.lua @@ -1,10 +1,10 @@ --- 捕食植物ブフォリキュラ --- Predaplant Bufollicula --- Scripted by Hatter +--捕食植物ブフォリキュラ +--Predaplant Bufolicula +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Fusion Summon 1 DARK Fusion Monster + --Fusion Summon 1 DARK Fusion Monster local params = {aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK)} local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e1:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e1) - -- Add 1 face-up DARK Pendulum Monster from the Extra Deck to the hand + --Add 1 face-up DARK Pendulum Monster from the Extra Deck to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -32,7 +32,7 @@ s.listed_names={id} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (r&REASON_FUSION)==REASON_FUSION and c:IsFaceup() - and c:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) + and c:IsLocation(LOCATION_GRAVE|LOCATION_EXTRA) end function s.thfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_PENDULUM) diff --git a/official/c7044562.lua b/official/c7044562.lua index 4eb2af114b..af4366722a 100644 --- a/official/c7044562.lua +++ b/official/c7044562.lua @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(tp) end Duel.ShuffleDeck(tp) -end +end \ No newline at end of file diff --git a/official/c70456282.lua b/official/c70456282.lua index aa5b14db47..f71eb49f75 100644 --- a/official/c70456282.lua +++ b/official/c70456282.lua @@ -22,13 +22,13 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.spcon(e,c) if c==nil then return true end - return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,nil,0x33) + return Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,false,1,true,c,c:GetControler(),nil,false,nil,SET_BLACKWING) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,nil,0x33) + local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,false,true,true,c,nil,nil,false,nil,SET_BLACKWING) if g then g:KeepAlive() e:SetLabelObject(g) @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetCode(EFFECT_ADD_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) g:DeleteGroup() end @@ -70,7 +70,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70458081.lua b/official/c70458081.lua index 7efa1d1144..6f2eb3dff5 100644 --- a/official/c70458081.lua +++ b/official/c70458081.lua @@ -1,5 +1,5 @@ --EMジンライノ ---Peformapal Thunderhino +--Performapal Thunderhino local s,id=GetID() function s.initial_effect(c) --Other monsters cannot be targeted by attacks @@ -38,5 +38,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c70465810.lua b/official/c70465810.lua index 079f634389..33f7fb40ca 100644 --- a/official/c70465810.lua +++ b/official/c70465810.lua @@ -1,5 +1,5 @@ --BF-幻耀のスズリ ---Blackwing - Suthri the Illusory Spark +--Blackwing - Sudri the Phantom Glimmer --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -59,7 +59,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c70479321.lua b/official/c70479321.lua index b1673a7d2a..27c74a0207 100644 --- a/official/c70479321.lua +++ b/official/c70479321.lua @@ -93,7 +93,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70485614.lua b/official/c70485614.lua index 062dcb12c8..0c794792b3 100644 --- a/official/c70485614.lua +++ b/official/c70485614.lua @@ -1,5 +1,5 @@ --決戦のゴルゴンダ ---Final Battle at Golgonda +--Decisive Battle of Golgonda --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_SZONE|LOCATION_GRAVE) e2:SetValue(60884672) c:RegisterEffect(e2) --Destruction replacement @@ -39,9 +39,9 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={60884672,CARD_ALBAZ} -s.listed_series={0x158} +s.listed_series={SET_SPRINGANS} function s.repfilter(c,tp) - return c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + return c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.tgfilter(c) return c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_ALBAZ) and c:IsAbleToGrave() @@ -53,7 +53,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local sg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) Duel.Hint(HINT_CARD,0,id) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_REPLACE) return true else return false end end @@ -61,20 +61,20 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.spcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ALBAZ),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ALBAZ),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x158) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPRINGANS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c70491682.lua b/official/c70491682.lua index 37ce9d5f01..8307463795 100644 --- a/official/c70491682.lua +++ b/official/c70491682.lua @@ -1,5 +1,5 @@ --Vendread Anima ---scripted by Naim +--Vendread Anima local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -24,9 +24,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.spfilter(c,e,tp) - return c:IsSetCard(0x106) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) + return c:IsSetCard(SET_VENDREAD) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end @@ -48,19 +48,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) return not c:IsRace(RACE_ZOMBIE) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x106) + return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,SET_VENDREAD) and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=eg:Filter(Card.IsSetCard,nil,0x106) + local g=eg:Filter(Card.IsSetCard,nil,SET_VENDREAD) local rc=g:GetFirst() if not rc then return end local e1=Effect.CreateEffect(c) @@ -75,9 +75,8 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end - rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) -end - + rc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) +end \ No newline at end of file diff --git a/official/c70493141.lua b/official/c70493141.lua index 61474b1066..9d750f5cc9 100644 --- a/official/c70493141.lua +++ b/official/c70493141.lua @@ -1,4 +1,5 @@ --雷仙神 +--The Ascended of Thunder local s,id=GetID() function s.initial_effect(c) --special summon @@ -45,4 +46,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70534340.lua b/official/c70534340.lua index da7ac816ca..46f3dcdecd 100644 --- a/official/c70534340.lua +++ b/official/c70534340.lua @@ -23,17 +23,17 @@ function s.initial_effect(c) end s.listed_names={CARD_ALBAZ} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.fusfilter(c) return c:IsLevelBelow(8) and not c:IsCode(id) end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end function s.stage2(e,tc,tp,mg,chk) if chk==2 then @@ -44,7 +44,7 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Cannot Special Summon from the Extra Deck, except Fusion Monsters local e2=Effect.CreateEffect(c) @@ -54,7 +54,7 @@ function s.stage2(e,tc,tp,mg,chk) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end @@ -63,5 +63,5 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_REMOVED) -end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE|LOCATION_REMOVED) +end \ No newline at end of file diff --git a/official/c70538272.lua b/official/c70538272.lua index 66a3043f37..b470ad57a7 100644 --- a/official/c70538272.lua +++ b/official/c70538272.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) diff --git a/official/c70546737.lua b/official/c70546737.lua index 552e6c216b..179f1a7266 100644 --- a/official/c70546737.lua +++ b/official/c70546737.lua @@ -25,17 +25,17 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x87} +s.listed_series={SET_UMBRAL_HORROR} function s.filter(c,clv) local lv=c:GetLevel() - return c:IsSetCard(0x87) and lv~=0 and lv~=clv + return c:IsSetCard(SET_UMBRAL_HORROR) and lv~=0 and lv~=clv and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE)) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc,e:GetHandler():GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc,e:GetHandler():GetLevel()) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -46,7 +46,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -65,4 +65,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if rc:IsRelateToEffect(e) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70551291.lua b/official/c70551291.lua index 6db691b859..5ad45e5f24 100644 --- a/official/c70551291.lua +++ b/official/c70551291.lua @@ -76,7 +76,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) if _replace_count>_replace_max then return end @@ -106,4 +106,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil) if #dg==0 then return end Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70560957.lua b/official/c70560957.lua index 0f7e4bf134..b3ce2f738f 100644 --- a/official/c70560957.lua +++ b/official/c70560957.lua @@ -1,6 +1,5 @@ --トゥーン・ロールバック ---Toon Roollback - +--Toon Rollback local s,id=GetID() function s.initial_effect(c) --Targeted toon monster can make a second attack @@ -35,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c70564929.lua b/official/c70564929.lua index d0611f14e2..0dfbe150cf 100644 --- a/official/c70564929.lua +++ b/official/c70564929.lua @@ -1,4 +1,5 @@ --魔界台本「魔界の宴咜女」 +--Abyss Script - Abysstainment local s,id=GetID() function s.initial_effect(c) --activate @@ -29,14 +30,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x20ec,0x10ec} +s.listed_series={SET_ABYSS_SCRIPT,SET_ABYSS_ACTOR} function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x10ec) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x10ec) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_ABYSS_ACTOR) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_ABYSS_ACTOR) Duel.Release(g,REASON_COST) end function s.setfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end @@ -53,7 +54,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter2(c) - return c:IsSetCard(0x10ec) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -62,7 +63,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c70569684.lua b/official/c70569684.lua index 262a58f52c..6b566e7a70 100644 --- a/official/c70569684.lua +++ b/official/c70569684.lua @@ -47,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsMainPhase() and Duel.GetTurnPlayer()==1-tp + return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsFaceup() and c:IsControler(tp) and s.filter(chkc,e) end @@ -69,9 +69,9 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c70583986.lua b/official/c70583986.lua index a3a6aa4b09..3aeb4f7b4e 100644 --- a/official/c70583986.lua +++ b/official/c70583986.lua @@ -1,6 +1,5 @@ --氷結界の虎王ドゥローレン --Dewloren, Tiger King of the Ice Barrier - local s,id=GetID() function s.initial_effect(c) --Synchro summon procedure @@ -42,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct*500) c:RegisterEffect(e1) end diff --git a/official/c70595331.lua b/official/c70595331.lua index 5da522d09b..ada3311586 100644 --- a/official/c70595331.lua +++ b/official/c70595331.lua @@ -44,4 +44,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70597485.lua b/official/c70597485.lua index 9f3687e3a9..0b1c11c067 100644 --- a/official/c70597485.lua +++ b/official/c70597485.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.xyztg) e3:SetOperation(s.xyzop) c:RegisterEffect(e3) @@ -33,19 +33,19 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e4:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e4:SetCountLimit(1,{id,1}) e4:SetCondition(s.thcon) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x162} +s.listed_series={SET_MATERIACTOR} function s.adval(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*500 end function s.xyzfilter(c) - return c:IsMonster() and c:IsSetCard(0x162) + return c:IsMonster() and c:IsSetCard(SET_MATERIACTOR) end function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c70624184.lua b/official/c70624184.lua index a4d166fca0..7fdb8b2bc5 100644 --- a/official/c70624184.lua +++ b/official/c70624184.lua @@ -1,4 +1,5 @@ --セイクリッド・ハワー +--Constellar Rasalhague local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,29 +8,25 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} s.listed_names={id} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x53) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_CONSTELLAR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c70628672.lua b/official/c70628672.lua index c9877e76fd..69aed6a126 100644 --- a/official/c70628672.lua +++ b/official/c70628672.lua @@ -21,23 +21,23 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x16) and c:IsType(TYPE_FUSION) + return c:IsFaceup() and c:IsSetCard(SET_ROID) and c:IsType(TYPE_FUSION) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,rp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,rp,LOCATION_DECK|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) then @@ -45,18 +45,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(eg,REASON_EFFECT) end local cd=re:GetHandler():GetCode() - local g=Duel.GetMatchingGroup(Card.IsCode,rp,LOCATION_DECK+LOCATION_EXTRA,0,nil,cd) + local g=Duel.GetMatchingGroup(Card.IsCode,rp,LOCATION_DECK|LOCATION_EXTRA,0,nil,cd) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x16) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_ROID) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -67,7 +63,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70630741.lua b/official/c70630741.lua index 29dc9cafa1..d2b4e367c3 100644 --- a/official/c70630741.lua +++ b/official/c70630741.lua @@ -1,4 +1,5 @@ --レスキュー・ウォリアー +--Rescue Warrior local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c70636044.lua b/official/c70636044.lua index 396a3579b0..f89216d553 100644 --- a/official/c70636044.lua +++ b/official/c70636044.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.negcon) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c70645913.lua b/official/c70645913.lua index 92852cc26e..4b1513cb52 100644 --- a/official/c70645913.lua +++ b/official/c70645913.lua @@ -1,6 +1,5 @@ --ヴァンパイアの眷属 --Vampire Retainer - local s,id=GetID() function s.initial_effect(c) --If special summoned, add 1 "Vampire" spell/trap from deck @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -27,14 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x8e} - -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end +s.listed_series={SET_VAMPIRE} function s.thfilter(c) - return c:IsSetCard(0x8e) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_VAMPIRE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -49,12 +43,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.costfilter(c,tp) - return c:IsSetCard(0x8e) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 + return c:IsSetCard(SET_VAMPIRE) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -70,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c70655556.lua b/official/c70655556.lua index a58cb47147..ecf9ccde8a 100644 --- a/official/c70655556.lua +++ b/official/c70655556.lua @@ -1,4 +1,5 @@ --スピア・シャーク +--Spear Shark local s,id=GetID() function s.initial_effect(c) --lvup @@ -30,7 +31,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70668285.lua b/official/c70668285.lua index 9026e1a45d..0540cf00ac 100644 --- a/official/c70668285.lua +++ b/official/c70668285.lua @@ -1,4 +1,5 @@ --光天使ソード +--Star Seraph Sword local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0x86} +s.listed_series={SET_STAR_SERAPH} function s.cfilter(c) - return c:IsSetCard(0x86) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_STAR_SERAPH) and c:GetBaseAttack()>0 and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -30,7 +31,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70676581.lua b/official/c70676581.lua index cbeb6e09b9..7e98a1742b 100644 --- a/official/c70676581.lua +++ b/official/c70676581.lua @@ -1,4 +1,5 @@ --ダーク・ジェネラル フリード +--Dark General Freed local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -50,7 +51,7 @@ function s.disfilter(c,tp) return c:IsControler(tp) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_DARK) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL) then return end + if not re:IsSpellEffect() then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g==0 then return end @@ -78,7 +79,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -93,4 +94,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c70681994.lua b/official/c70681994.lua index 6a02bc08f8..80a52bc42c 100644 --- a/official/c70681994.lua +++ b/official/c70681994.lua @@ -1,7 +1,8 @@ --魔装騎士ドラゴネス +--Dragoness the Wicked Knight local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,53153481,33064647) -end +end \ No newline at end of file diff --git a/official/c706925.lua b/official/c706925.lua index cf191c7050..f4468f9202 100644 --- a/official/c706925.lua +++ b/official/c706925.lua @@ -24,13 +24,13 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x77} +s.listed_series={SET_ATLANTEAN} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end function s.spfilter(c,e,tp) - return not c:IsCode(id) and c:IsLevelBelow(4) and c:IsSetCard(0x77) and c:IsRace(RACE_SEASERPENT) + return not c:IsCode(id) and c:IsLevelBelow(4) and c:IsSetCard(SET_ATLANTEAN) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) end function s.desfilter(c) @@ -65,4 +65,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70703416.lua b/official/c70703416.lua index 30dfdd864d..ca3d58faca 100644 --- a/official/c70703416.lua +++ b/official/c70703416.lua @@ -26,15 +26,15 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2f) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() end function s.atkcon(e,tp,ev,ep,eg,re,r,rp) return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.tgfilter(c,lv) - return c:IsLevelBelow(3) and c:IsSetCard(0x2f) and c:IsAbleToGrave() + return c:IsLevelBelow(3) and c:IsSetCard(SET_ICE_BARRIER) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,7 +52,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c70709488.lua b/official/c70709488.lua index bdbc52b823..20753f7f2f 100644 --- a/official/c70709488.lua +++ b/official/c70709488.lua @@ -1,7 +1,6 @@ --虫忍 ハガクレミノ ---Insect Shinobi Hagakuremino +--Shinobi Insect Hagakuremino --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -40,7 +39,7 @@ end function s.cfilter(c,tp,zone) local seq=c:GetPreviousSequence() if c:GetPreviousControler()==1-tp then seq=seq+16 end - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -51,13 +50,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Banish it if it leaves the field local e1=Effect.CreateEffect(e:GetHandler()) @@ -65,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c70711847.lua b/official/c70711847.lua index add75eeed0..ff453309b5 100644 --- a/official/c70711847.lua +++ b/official/c70711847.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_REMOVE) c:RegisterEffect(e3) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} s.listed_names={id} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD) local tc=g:RandomSelect(1-tp,1,1,nil) Duel.BreakEffect() - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_DISCARD) if not Duel.IsPlayerCanSpecialSummon(tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end if not tc:GetFirst():IsCode(id) then Duel.BreakEffect() @@ -66,7 +66,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0 end function s.thfilter(c) - return c:IsSetCard(0x11e) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DANGER) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c70744296.lua b/official/c70744296.lua index bb7d3e98e8..222991abc6 100644 --- a/official/c70744296.lua +++ b/official/c70744296.lua @@ -30,4 +30,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7076131.lua b/official/c7076131.lua index f4523b8d68..db6c853260 100644 --- a/official/c7076131.lua +++ b/official/c7076131.lua @@ -1,4 +1,5 @@ --ロスト・ネクスト +--Next to be Lost local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()) Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70771599.lua b/official/c70771599.lua index 43f55a6fc6..34a983d84b 100644 --- a/official/c70771599.lua +++ b/official/c70771599.lua @@ -1,4 +1,5 @@ --覇王眷竜 クリアウィング +--Supreme King Dragon Clear Wing local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -41,7 +42,7 @@ function s.matfilter(c,val,sc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_DARK,sc,sumtype,tp) and c:IsType(TYPE_PENDULUM,sc,sumtype,tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) @@ -76,8 +77,8 @@ function s.ddop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,2,false,aux.ReleaseCheckMMZ,nil,0x20f8) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,2,2,false,aux.ReleaseCheckMMZ,nil,0x20f8) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,2,false,aux.ReleaseCheckMMZ,nil,SET_SUPREME_KING_DRAGON) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,2,2,false,aux.ReleaseCheckMMZ,nil,SET_SUPREME_KING_DRAGON) Duel.Release(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -90,4 +91,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c70780151.lua b/official/c70780151.lua index c8fc7bbbcb..f990baf293 100644 --- a/official/c70780151.lua +++ b/official/c70780151.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCode(EVENT_CHAINING) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -55,10 +55,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) if not tg or #tg~=1 or not tg:GetFirst():IsRace(RACE_PSYCHIC) then return false end return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -72,4 +68,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70786111.lua b/official/c70786111.lua index c4f15147d4..aa755423bc 100644 --- a/official/c70786111.lua +++ b/official/c70786111.lua @@ -42,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(e,c) return e:GetOwner()==c end) c:RegisterEffect(e1) end diff --git a/official/c70791313.lua b/official/c70791313.lua index 8f0dcbd232..4dd185e5da 100644 --- a/official/c70791313.lua +++ b/official/c70791313.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -49,4 +49,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7080743.lua b/official/c7080743.lua index d985ff3fb3..eb5f0924da 100644 --- a/official/c7080743.lua +++ b/official/c7080743.lua @@ -1,4 +1,5 @@ --豪腕特急トロッコロッコ +--Express Train Trolley Olley local s,id=GetID() function s.initial_effect(c) --effect gain @@ -22,19 +23,19 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,7 +44,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70821187.lua b/official/c70821187.lua index 29f57e6df2..0843d8db77 100644 --- a/official/c70821187.lua +++ b/official/c70821187.lua @@ -1,4 +1,5 @@ --再生ミイラ +--Regenerating Mummy local s,id=GetID() function s.initial_effect(c) --damage @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)==1 then Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c70828912.lua b/official/c70828912.lua index a1fea2fb97..d504f29143 100644 --- a/official/c70828912.lua +++ b/official/c70828912.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,10 +19,6 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -49,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -61,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70832512.lua b/official/c70832512.lua index 16420dfac5..f7c809edf2 100644 --- a/official/c70832512.lua +++ b/official/c70832512.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.descond) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c7084129.lua b/official/c7084129.lua index d377fb68b1..d10d00acee 100644 --- a/official/c7084129.lua +++ b/official/c7084129.lua @@ -1,4 +1,5 @@ --マジシャンズ・ロッド +--Magician's Rod local s,id=GetID() function s.initial_effect(c) --search @@ -43,7 +44,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp==tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return Duel.IsTurnPlayer(1-tp) and rp==tp and re:IsSpellTrapEffect() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsRace,1,false,nil,nil,RACE_SPELLCASTER) end @@ -59,4 +60,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70843274.lua b/official/c70843274.lua index fa5a5d0a51..74bc4daec5 100644 --- a/official/c70843274.lua +++ b/official/c70843274.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_REMOVED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end) diff --git a/official/c70856343.lua b/official/c70856343.lua index 66e0b948d5..fd21358d65 100644 --- a/official/c70856343.lua +++ b/official/c70856343.lua @@ -1,7 +1,6 @@ --契珖のヴルーレセンス --Radiant Vouirescence --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -28,7 +27,6 @@ function s.initial_effect(c) end --Specifically lists itself s.listed_names={id} - --If opponent controls a monster function s.tgcon(e,tp) return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) @@ -36,7 +34,7 @@ end --Discard 1 card as cost function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end --Check for "Fluorescent Vluorescences" function s.tgfilter(c) @@ -73,6 +71,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(ATTRIBUTE_DARK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c70861343.lua b/official/c70861343.lua index 084df90632..1b12086b00 100644 --- a/official/c70861343.lua +++ b/official/c70861343.lua @@ -18,15 +18,15 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.cfilter(c,e,tp,ft) local lv=c:GetLevel() - return c:IsFaceup() and lv>0 and c:IsSetCard(0x2b) + return c:IsFaceup() and lv>0 and c:IsSetCard(SET_NINJA) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,lv+3,e,tp) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,lv+3,e,tp) end function s.filter(c,lv,e,tp) - return c:IsLevelBelow(lv) and c:IsRace(RACE_BEAST+RACE_WINGEDBEAST+RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(lv) and c:IsRace(RACE_BEAST|RACE_WINGEDBEAST|RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -34,14 +34,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,e,tp,ft) e:SetLabel(rg:GetFirst():GetLevel()+3) Duel.Release(rg,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e:GetLabel(),e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then c:SetCardTarget(tc) @@ -53,4 +53,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70865988.lua b/official/c70865988.lua index 0e53e1dd44..ce8a8d5570 100644 --- a/official/c70865988.lua +++ b/official/c70865988.lua @@ -1,4 +1,5 @@ --全弾発射 +--Full Salvo local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70875686.lua b/official/c70875686.lua index 7036d8798c..20e8a6775e 100644 --- a/official/c70875686.lua +++ b/official/c70875686.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --2+ "Prank-Kids" monsters - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x120),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PRANK_KIDS),2) --Must be Link Summoned local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) @@ -19,8 +19,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) - e1:SetCost(aux.CostWithReplace(s.descost,CARD_PRANKKIDS_MEOWMU)) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) + e1:SetCost(aux.CostWithReplace(Cost.SelfTribute,CARD_PRANKKIDS_MEOWMU)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -37,12 +37,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x120} -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end +s.listed_series={SET_PRANK_KIDS} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local sg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if chk==0 then return #sg>0 end @@ -70,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70875955.lua b/official/c70875955.lua index a99ee50627..1f475c6e43 100644 --- a/official/c70875955.lua +++ b/official/c70875955.lua @@ -31,23 +31,23 @@ function s.initial_effect(c) e3:SetOperation(s.mtop) c:RegisterEffect(e3) end -s.listed_series={0x101b} +s.listed_series={SET_MECHA_PHANTOM_BEAST} s.listed_names={TOKEN_MECHA_PHANTOM_BEAST} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHA_PHANTOM_BEAST,0x101b,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) + if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHA_PHANTOM_BEAST,SET_MECHA_PHANTOM_BEAST,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHA_PHANTOM_BEAST,0x101b,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHA_PHANTOM_BEAST,SET_MECHA_PHANTOM_BEAST,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then local token=Duel.CreateToken(tp,TOKEN_MECHA_PHANTOM_BEAST) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end end function s.rfilter(c) - return c:IsType(TYPE_TOKEN) or c:IsSetCard(0x101b) + return c:IsType(TYPE_TOKEN) or c:IsSetCard(SET_MECHA_PHANTOM_BEAST) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckReleaseGroupCost(tp,s.rfilter,1,false,nil,nil) @@ -57,4 +57,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoGrave(e:GetHandler(),REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c7089711.lua b/official/c7089711.lua index 5eb3ecb485..d8c8d91aee 100644 --- a/official/c7089711.lua +++ b/official/c7089711.lua @@ -1,4 +1,5 @@ --ハネハネ +--Hane-Hane local s,id=GetID() function s.initial_effect(c) --flip @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToHand() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70899775.lua b/official/c70899775.lua index af9766ab6f..9abd24ee0c 100644 --- a/official/c70899775.lua +++ b/official/c70899775.lua @@ -1,6 +1,5 @@ --ピアニッシモ --Pianissimo - local s,id=GetID() function s.initial_effect(c) --Targeted monster's original ATK becomes 100, also cannot be destroyed by battle or card effect @@ -10,14 +9,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:GetFlagEffect(id)==0 end @@ -30,13 +26,13 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsMonster() and tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) --Original ATK becomes 100 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot be destroyed by battle or card effect local e2=Effect.CreateEffect(e:GetHandler()) @@ -45,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c70902743.lua b/official/c70902743.lua index 9080564341..4626928610 100644 --- a/official/c70902743.lua +++ b/official/c70902743.lua @@ -1,4 +1,5 @@ --レッド・デーモンズ・ドラゴン +--Red Dragon Archfiend local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -51,4 +52,4 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local g=Duel.GetMatchingGroup(aux.FilterEqualFunction(Card.GetAttackAnnouncedCount,0),tp,LOCATION_MZONE,0,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70908596.lua b/official/c70908596.lua index 00228189f9..794881a51f 100644 --- a/official/c70908596.lua +++ b/official/c70908596.lua @@ -1,4 +1,5 @@ --セイクリッド・カウスト +--Constellar Kaus local s,id=GetID() function s.initial_effect(c) --lv change @@ -19,9 +20,9 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_CONSTELLAR) and c:IsLevelAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -42,10 +43,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) if e:GetLabel()==0 then e1:SetValue(1) else e1:SetValue(-1) end tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c70913714.lua b/official/c70913714.lua index 889960f474..444d22f98d 100644 --- a/official/c70913714.lua +++ b/official/c70913714.lua @@ -43,13 +43,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_CANNOT_ATTACK) @@ -63,7 +63,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e4:SetCondition(s.ctcon) e4:SetTarget(s.cttg) e4:SetOperation(s.ctop) - e4:SetReset(RESET_EVENT+0x1020000) + e4:SetReset(RESET_EVENT|RESET_TURN_SET|RESET_TOFIELD) c:RegisterEffect(e4) end end @@ -83,4 +83,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if ec and ec:IsRelateToEffect(e) then Duel.GetControl(ec,tp) end -end +end \ No newline at end of file diff --git a/official/c70914287.lua b/official/c70914287.lua index da31732039..e50fd91abd 100644 --- a/official/c70914287.lua +++ b/official/c70914287.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={44632120,71036835,7021574,34419588,CARD_KURIBOH} -s.listed_series={0xa4} +s.listed_series={SET_KURIBOH} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetMatchingGroupCount(Card.IsMonster,tp,LOCATION_GRAVE,0,nil)>Duel.GetMatchingGroupCount(Card.IsMonster,1-tp,LOCATION_GRAVE,0,nil) end @@ -56,10 +56,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.atkfilter(c) - return c:IsSetCard(0xa4) and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) + return c:IsSetCard(SET_KURIBOH) and c:IsMonster() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.val(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_MZONE+LOCATION_GRAVE,0,nil)*300 + return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,nil)*300 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() and Duel.GetCurrentChain()==0 @@ -69,7 +69,7 @@ function s.spfilter(c,e,tp,code) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local locs=LOCATION_GRAVE+LOCATION_HAND + local locs=LOCATION_GRAVE|LOCATION_HAND if chk==0 then return c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>=5 and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -86,7 +86,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<5 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end - local locs=LOCATION_GRAVE+LOCATION_HAND + local locs=LOCATION_GRAVE|LOCATION_HAND local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,locs,0,nil,e,tp,44632120) local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,locs,0,nil,e,tp,71036835) local g3=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,locs,0,nil,e,tp,7021574) @@ -110,4 +110,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP_ATTACK) end end -end +end \ No newline at end of file diff --git a/official/c70916046.lua b/official/c70916046.lua index 1cae7d84a9..7587ada3cf 100644 --- a/official/c70916046.lua +++ b/official/c70916046.lua @@ -57,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) else Duel.SetLP(tp,math.max(Duel.GetLP(tp)-(dc*500),0)) end -end +end \ No newline at end of file diff --git a/official/c70917315.lua b/official/c70917315.lua index e30623686e..67762d5181 100644 --- a/official/c70917315.lua +++ b/official/c70917315.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.descon) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -43,19 +43,19 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.limcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.limval(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_SPELL) and not rc:IsSetCard(0xe0) and not rc:IsImmuneToEffect(e) + return re:IsSpellEffect() and not rc:IsSetCard(SET_AMORPHAGE) and not rc:IsImmuneToEffect(e) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,9 +68,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) - and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id)~=0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) + and (e:GetHandler():IsPendulumSummoned() or e:GetHandler():GetFlagEffect(id)~=0) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) + return not c:IsOriginalSetCard(SET_AMORPHAGE) end \ No newline at end of file diff --git a/official/c7092142.lua b/official/c7092142.lua index c2d571fb32..b678c6fd8e 100644 --- a/official/c7092142.lua +++ b/official/c7092142.lua @@ -1,4 +1,5 @@ --激流蘇生 +--Torrential Reborn local s,id=GetID() function s.initial_effect(c) --Activate @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ft<#sg then return end local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7093411.lua b/official/c7093411.lua index 9b9ade03fa..b09847b92f 100644 --- a/official/c7093411.lua +++ b/official/c7093411.lua @@ -1,4 +1,5 @@ --宝玉獣 サファイア・ペガサス +--Crystal Beast Sapphire Pegasus local s,id=GetID() function s.initial_effect(c) --send replace @@ -35,22 +36,22 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.filter(c) - return c:IsSetCard(0x1034) and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and not c:IsForbidden() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_HAND,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) @@ -58,9 +59,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(tc,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end -end +end \ No newline at end of file diff --git a/official/c70939418.lua b/official/c70939418.lua index b0c206732e..4facc33951 100644 --- a/official/c70939418.lua +++ b/official/c70939418.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(TIMING_BATTLE_STEP_END+TIMING_BATTLE_END) + e2:SetHintTiming(TIMING_BATTLE_STEP_END|TIMING_BATTLE_END) e2:SetCondition(s.sccon) e2:SetTarget(s.sctg) e2:SetOperation(s.scop) @@ -38,9 +38,9 @@ function s.initial_effect(c) e3:SetOperation(s.ddop) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE + return Duel.IsBattlePhase() and ep==tp and (r&REASON_BATTLE+REASON_EFFECT)~=0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -93,12 +93,12 @@ function s.ddop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() local c=e:GetHandler() local sync=c:GetReasonCard() - if tc and tc:IsSetCard(0x2016) and tc:IsMonster() and tc:IsLocation(LOCATION_GRAVE) then + if tc and tc:IsSetCard(SET_SPEEDROID) and tc:IsMonster() and tc:IsLocation(LOCATION_GRAVE) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sync:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c70946699.lua b/official/c70946699.lua index 57151f829a..7e1cf4ef56 100644 --- a/official/c70946699.lua +++ b/official/c70946699.lua @@ -1,4 +1,5 @@ --炎虎梁山爆 +--Five Brothers Explosion local s,id=GetID() function s.initial_effect(c) --recover @@ -53,4 +54,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local dam=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_GRAVE,0,nil)*500 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70948327.lua b/official/c70948327.lua index cf819c231c..dc24726439 100644 --- a/official/c70948327.lua +++ b/official/c70948327.lua @@ -1,4 +1,5 @@ --ナノブレイカー +--Nanobreaker local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,4 +23,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() and d:IsFaceup() and d:IsLevelBelow(3) then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c70950698.lua b/official/c70950698.lua index 66485146a0..df06553b93 100644 --- a/official/c70950698.lua +++ b/official/c70950698.lua @@ -58,4 +58,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c70969517.lua b/official/c70969517.lua index 726cddfcac..f7254a82d7 100644 --- a/official/c70969517.lua +++ b/official/c70969517.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x1b} +s.listed_series={SET_PHANTOM_BEAST} function s.otfilter(c,tp) - return c:IsSetCard(0x1b) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_PHANTOM_BEAST) and (c:IsControler(tp) or c:IsFaceup()) end function s.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -37,7 +37,7 @@ function s.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end function s.damcon2(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 and rp~=tp and e:GetHandler():IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and e:GetHandler():IsPreviousControler(tp) end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -48,4 +48,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c70975131.lua b/official/c70975131.lua index c2e15287a4..4bebd42c1c 100644 --- a/official/c70975131.lua +++ b/official/c70975131.lua @@ -1,6 +1,5 @@ --番猫-ウォッチキャット --Watch Cat --- local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfBanish) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.setcon) e3:SetTarget(s.settg) @@ -49,17 +48,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)~=0 and Duel.GetTurnPlayer()==tp + return e:GetHandler():GetFlagEffect(id)~=0 and Duel.IsTurnPlayer(tp) end function s.setfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable() + return c:IsContinuousSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -72,5 +67,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end - +end \ No newline at end of file diff --git a/official/c70980824.lua b/official/c70980824.lua index 3a0cb9ccce..97c5b41866 100644 --- a/official/c70980824.lua +++ b/official/c70980824.lua @@ -1,6 +1,5 @@ --氷結界の還零龍 トリシューラ ---Trishula, Subzero Dragon of the Ice Barrier - +--Trishula, Zero Dragon of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --Synchro summon procedure @@ -31,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end @@ -49,7 +48,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsSynchroSummoned() and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) end @@ -59,14 +58,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,loc,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then @@ -74,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(3300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) g:GetFirst():RegisterEffect(e1) local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) if #g2>0 then @@ -82,7 +81,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(math.ceil(tc2:GetBaseAttack()/2)) tc2:RegisterEffect(e1) end @@ -93,21 +92,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc3:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc3:RegisterEffect(e2) if tc3:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc3:RegisterEffect(e3) end end end end -end +end \ No newline at end of file diff --git a/official/c71002019.lua b/official/c71002019.lua index 651bcabfb8..43c1ff3bba 100644 --- a/official/c71002019.lua +++ b/official/c71002019.lua @@ -1,7 +1,6 @@ --六花精ボタン --Mudan the Rikka Fairy --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -29,7 +28,7 @@ function s.initial_effect(c) e3:SetCondition(s.thcon) c:RegisterEffect(e3) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} function s.cfilter(c,tp) return c:IsRikkaReleasable(tp) and Duel.GetMZoneCount(tp,c)>0 end @@ -49,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function s.thfilter(c) - return c:IsSetCard(0x141) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_RIKKA) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,5 +64,5 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_PLANT) + return re:IsMonsterEffect() and re:GetHandler():IsRace(RACE_PLANT) end \ No newline at end of file diff --git a/official/c71007216.lua b/official/c71007216.lua index 0c09691e76..42e540bebe 100644 --- a/official/c71007216.lua +++ b/official/c71007216.lua @@ -17,10 +17,10 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0xf0} +s.listed_series={SET_WINDWITCH} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xf0) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_WINDWITCH) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -40,9 +40,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_WIND) -end +end \ No newline at end of file diff --git a/official/c71015787.lua b/official/c71015787.lua index 96117e0432..64686abab4 100644 --- a/official/c71015787.lua +++ b/official/c71015787.lua @@ -1,5 +1,5 @@ --サイレント・ウォビー ---Silent Wooby +--Silent Wobby local s,id=GetID() function s.initial_effect(c) --Special Sumon itself to the opponent's field diff --git a/official/c71036835.lua b/official/c71036835.lua index 3f3c0ef582..6bf06f03c3 100644 --- a/official/c71036835.lua +++ b/official/c71036835.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_KURIBOH} -s.listed_series={0xa4} +s.listed_series={SET_KURIBOH} function s.thcfilter(c,tp) - return c:IsPreviousSetCard(0xa4) and c:IsPreviousControler(tp) + return c:IsPreviousSetCard(SET_KURIBOH) and c:IsPreviousControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thcfilter,1,nil,tp) @@ -53,7 +53,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xa4),tp,LOCATION_MZONE,0,1,e:GetHandler()) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_KURIBOH),tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackAbove,1),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -67,10 +67,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if not tc:IsImmuneToEffect(e) then flag=1 end end if flag==1 then Duel.NegateAttack() end end -end +end \ No newline at end of file diff --git a/official/c71039903.lua b/official/c71039903.lua index 8faab85712..4c188b5444 100644 --- a/official/c71039903.lua +++ b/official/c71039903.lua @@ -1,4 +1,5 @@ --太古の白石 +--The White Stone of Ancients local s,id=GetID() function s.initial_effect(c) --to grave @@ -16,12 +17,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -33,11 +34,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLUE_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -53,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0xdd) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLUE_EYES) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -66,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then end -end +end \ No newline at end of file diff --git a/official/c71044499.lua b/official/c71044499.lua index a272470095..a423805221 100644 --- a/official/c71044499.lua +++ b/official/c71044499.lua @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(1-tp) end end -end +end \ No newline at end of file diff --git a/official/c71060915.lua b/official/c71060915.lua index 58b572ce62..e9be42b47d 100644 --- a/official/c71060915.lua +++ b/official/c71060915.lua @@ -1,4 +1,5 @@ --フェザー・ウィンド +--Feather Wind local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71068247.lua b/official/c71068247.lua index ad14491f24..7517add1d1 100644 --- a/official/c71068247.lua +++ b/official/c71068247.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,10 +33,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -51,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.adcon(e) return e:GetHandler():GetOverlayCount()==0 -end +end \ No newline at end of file diff --git a/official/c71069715.lua b/official/c71069715.lua index a8abbf2ac6..fb993ef242 100644 --- a/official/c71069715.lua +++ b/official/c71069715.lua @@ -24,17 +24,17 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.tdtg) e3:SetOperation(s.tdop) c:RegisterEffect(e3) end -s.listed_series={0xae,0xaf} +s.listed_series={SET_DARK_CONTRACT,SET_DD} function s.indtg(e,c) - return c:IsSetCard(0xae) + return c:IsSetCard(SET_DARK_CONTRACT) end function s.tdfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsAbleToDeck() + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) and chkc~=e:GetHandler() end @@ -49,4 +49,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71071546.lua b/official/c71071546.lua index 6767b3f21b..1a18d795f5 100644 --- a/official/c71071546.lua +++ b/official/c71071546.lua @@ -1,10 +1,10 @@ --オービタル7 --Orbital 7 - local s,id=GetID() +local COUNTER_YOU_GOT_IT_BOSS=0x2c function s.initial_effect(c) --Can hold You Got It Boss! counters - c:EnableCounterPermit(0x2c) + c:EnableCounterPermit(COUNTER_YOU_GOT_IT_BOSS) --Place 1 You Got It Boss! counter on itselef local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -15,8 +15,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) --Make its ATK become 2000 local e2=Effect.CreateEffect(c) - e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCost(s.atkcost) @@ -30,24 +30,23 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x55,0x7b} -s.counter_place_list={0x2c} - +s.listed_series={SET_PHOTON,SET_GALAXY} +s.counter_place_list={COUNTER_YOU_GOT_IT_BOSS} function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then - c:AddCounter(0x2c,1) + c:AddCounter(COUNTER_YOU_GOT_IT_BOSS,1) end end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=e:GetHandler():GetCounter(0x2c) - if chk==0 then return ct>0 and e:GetHandler():IsCanRemoveCounter(tp,0x2c,ct,REASON_COST) end - e:GetHandler():RemoveCounter(tp,0x2c,ct,REASON_COST) + local ct=e:GetHandler():GetCounter(COUNTER_YOU_GOT_IT_BOSS) + if chk==0 then return ct>0 and e:GetHandler():IsCanRemoveCounter(tp,COUNTER_YOU_GOT_IT_BOSS,ct,REASON_COST) end + e:GetHandler():RemoveCounter(tp,COUNTER_YOU_GOT_IT_BOSS,ct,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttack()~=2000 end @@ -61,7 +60,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) --Cannot attack directly local e2=Effect.CreateEffect(c) @@ -69,7 +68,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) --Send itself to GY local e3=Effect.CreateEffect(c) @@ -85,12 +84,8 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) - return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end diff --git a/official/c71074418.lua b/official/c71074418.lua index e606f3d971..4665ad671d 100644 --- a/official/c71074418.lua +++ b/official/c71074418.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.thcon3) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop3) c:RegisterEffect(e3) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.tgfilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() end @@ -43,10 +43,10 @@ function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and eg:IsExists(s.tgfilter,1,nil,tp) end function s.filter(c,tp) - return c:IsAbleToHand() and (c:IsControler(1-tp) or (c:IsSpell() and c:IsSetCard(0x128))) + return c:IsAbleToHand() and (c:IsControler(1-tp) or (c:IsSpell() and c:IsSetCard(SET_WITCHCRAFTER))) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and s.filter(chkc,tp) end + if chkc then return chkc:IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) and s.filter(chkc,tp) end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end @@ -59,12 +59,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) then return end - if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then + if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function s.thcon3(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.thtg3(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -74,4 +74,4 @@ function s.thop3(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SendtoHand(c,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c71089030.lua b/official/c71089030.lua index 16c38e5160..221a32913e 100644 --- a/official/c71089030.lua +++ b/official/c71089030.lua @@ -78,4 +78,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) for tc in g:Iter() do tc:NegateEffects(c,RESET_PHASE|PHASE_END,true) end -end +end \ No newline at end of file diff --git a/official/c71095768.lua b/official/c71095768.lua index 4636872377..9d1b3d2044 100644 --- a/official/c71095768.lua +++ b/official/c71095768.lua @@ -56,7 +56,7 @@ function s.matcheck(g,lc,sumtype,tp) return g:GetClassCount(Card.GetLevel)==1 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.spfilter(c,e,tp) return c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -70,18 +70,18 @@ function s.spcheck(sg,e,tp,mg) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,nil,e,tp) return Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,nil,e,tp) local sg=aux.SelectUnselectGroup(g,e,tp,2,2,s.spcheck,1,tp,HINTMSG_SPSUMMON) if #sg~=2 then return end for tc in sg:Iter() do @@ -89,7 +89,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -127,7 +127,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) and re:IsActiveType(TYPE_XYZ) and (loc&LOCATION_MZONE)~=0 and bit.extract(c:GetLinkedZone(),seq)~=0 end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.desfilter(chkc) end @@ -141,4 +141,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71098407.lua b/official/c71098407.lua index 868c07a3d7..5eb1701028 100644 --- a/official/c71098407.lua +++ b/official/c71098407.lua @@ -1,4 +1,5 @@ --もの忘れ +--Memory Loss local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + return rp~=tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and re:GetHandler():IsLocation(LOCATION_MZONE) and re:GetHandler():IsPosition(POS_FACEUP_ATTACK) and re:GetHandler():IsCanChangePosition() end @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and rc:IsRelateToEffect(e) then Duel.ChangePosition(rc,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c71106375.lua b/official/c71106375.lua index 2aef622398..2607397ded 100644 --- a/official/c71106375.lua +++ b/official/c71106375.lua @@ -1,4 +1,5 @@ --ジュラック・イグアノン +--Jurrac Iguanon local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -31,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71107816.lua b/official/c71107816.lua index 8347e3b68c..92f5895410 100644 --- a/official/c71107816.lua +++ b/official/c71107816.lua @@ -1,4 +1,5 @@ --悪魔の調理師 +--The Bistro Butcher local s,id=GetID() function s.initial_effect(c) --draw @@ -25,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c71133680.lua b/official/c71133680.lua index cc6806ba87..b637a762d9 100644 --- a/official/c71133680.lua +++ b/official/c71133680.lua @@ -11,8 +11,8 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -29,16 +29,9 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.atkfilter(c,e,tp) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,Group.FromCards(c,e:GetHandler())) + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,Group.FromCards(c,e:GetHandler())) end function s.desfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and (c:GetBaseAttack()>0 or c:GetBaseDefense()>0) @@ -48,19 +41,19 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_MZONE|LOCATION_HAND) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local dc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc):GetFirst() + local dc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,tc):GetFirst() if dc and Duel.Destroy(dc,REASON_EFFECT)~=0 then - if not tc or tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end + if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(dc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -79,6 +72,6 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)~=0 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c71143015.lua b/official/c71143015.lua index 2347bae67a..5753cb5af1 100644 --- a/official/c71143015.lua +++ b/official/c71143015.lua @@ -47,4 +47,4 @@ function s.extrtarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD) -end +end \ No newline at end of file diff --git a/official/c71159974.lua b/official/c71159974.lua index 8d1e7f1f28..522146965d 100644 --- a/official/c71159974.lua +++ b/official/c71159974.lua @@ -1,5 +1,5 @@ --魔鍵召竜-アンドラビムス ---Magikey Summon Dragon - Andrabimus +--Magikey Dragon - Andrabime --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -44,22 +44,22 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.matfilter1(c,fc,sumtype,tp) - return c:IsSetCard(0x167) and c:IsType(TYPE_EFFECT,fc,sumtype,tp) + return c:IsSetCard(SET_MAGIKEY) and c:IsType(TYPE_EFFECT,fc,sumtype,tp) end function s.matfilter2(c,fc,sumtype,tp) return c:IsType(TYPE_NORMAL,fc,sumtype,tp) and not c:IsType(TYPE_TOKEN,fc,sumtype,tp) end --No Cards and Effects on Fusion Summon function s.limcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.limop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetCurrentChain()==0 then Duel.SetChainLimitTillChainEnd(s.chainlm) elseif Duel.GetCurrentChain()==1 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) @@ -86,7 +86,7 @@ function s.chainlm(e,rp,tp) end --Destroy function s.attfilter(c,tp) - return ((c:IsSetCard(0x167) or c:IsType(TYPE_NORMAL)) and c:IsMonster()) + return ((c:IsSetCard(SET_MAGIKEY) or c:IsType(TYPE_NORMAL)) and c:IsMonster()) and Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttribute()) end function s.desfilter(c,att) @@ -111,11 +111,11 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end --Draw function s.drfilter(c,tp,att) - return c:IsPreviousControler(1-tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetAttribute()&att>0 + return c:IsPreviousControler(1-tp) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetAttribute()&att>0 end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local att,mat=0,e:GetHandler():GetMaterial() - if e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and mat:GetClassCount(Card.GetAttribute)>1 then + if e:GetHandler():IsFusionSummoned() and mat:GetClassCount(Card.GetAttribute)>1 then for tc in Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_GRAVE,0,nil):Iter() do att=att|tc:GetAttribute() end @@ -131,4 +131,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c71166481.lua b/official/c71166481.lua index 9ef7d12fe7..253e8dfeba 100644 --- a/official/c71166481.lua +++ b/official/c71166481.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.chcon) - e1:SetCost(s.chcost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.chtg) e1:SetOperation(s.chop) c:RegisterEffect(e1) @@ -28,14 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.xop) c:RegisterEffect(e2) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=75 function s.chcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and rp==1-tp -end -function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) + return re:IsMonsterEffect() and rp==1-tp end function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end @@ -50,7 +46,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(1-tp,1,REASON_EFFECT) end function s.xfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) end function s.xtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -65,4 +61,4 @@ function s.xop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c71172240.lua b/official/c71172240.lua index b80a619a89..d2c2768dea 100644 --- a/official/c71172240.lua +++ b/official/c71172240.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.tdcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -32,10 +32,6 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) and not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.tdfilter(c) return c:IsFaceup() and c:GetSequence()>=5 and c:IsAbleToDeck() end @@ -52,11 +48,11 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c71175527.lua b/official/c71175527.lua index 5a6d6349c0..3feb0fa066 100644 --- a/official/c71175527.lua +++ b/official/c71175527.lua @@ -35,12 +35,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -51,9 +51,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,tp,sumtp,sumpos) return c:GetAttribute()~=ATTRIBUTE_WIND -end +end \ No newline at end of file diff --git a/official/c71181155.lua b/official/c71181155.lua index 63d5bc06db..0f6486c89f 100644 --- a/official/c71181155.lua +++ b/official/c71181155.lua @@ -1,4 +1,5 @@ --幻獣クロスウィング +--Phantom Beast Cross-Wing local s,id=GetID() function s.initial_effect(c) --atkup @@ -7,8 +8,8 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_GRAVE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1b)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_PHANTOM_BEAST)) e1:SetValue(300) c:RegisterEffect(e1) end -s.listed_series={0x1b} +s.listed_series={SET_PHANTOM_BEAST} \ No newline at end of file diff --git a/official/c71197066.lua b/official/c71197066.lua index cdee7ea2c2..fbc3907fe3 100644 --- a/official/c71197066.lua +++ b/official/c71197066.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71200730.lua b/official/c71200730.lua index 3805090a5f..8e68b454a9 100644 --- a/official/c71200730.lua +++ b/official/c71200730.lua @@ -1,4 +1,5 @@ --闇より出でし絶望 +--Despair from the Dark local s,id=GetID() function s.initial_effect(c) --spsummon @@ -24,4 +25,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71203602.lua b/official/c71203602.lua index 5721877c56..ad2e58b5f4 100644 --- a/official/c71203602.lua +++ b/official/c71203602.lua @@ -1,4 +1,5 @@ --イビリチュア・リヴァイアニマ +--Evigishki Levianima local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) @@ -23,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.ShuffleHand(tp) - if tc:IsSetCard(0x3a) and tc:IsMonster() then + if tc:IsSetCard(SET_GISHKI) and tc:IsMonster() then Duel.BreakEffect() local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c71209500.lua b/official/c71209500.lua index 687fc5df34..11a52786eb 100644 --- a/official/c71209500.lua +++ b/official/c71209500.lua @@ -1,6 +1,5 @@ --アマゾネス・スカウト --Amazoness Scouts - local s,id=GetID() function s.initial_effect(c) --Your "Amazoness" monsters cannot targeted by monster effects, also cannot be destroyed by card effects @@ -10,19 +9,14 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e1:SetCost(s.efcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.eftg) e1:SetOperation(s.efop) c:RegisterEffect(e1) end -s.listed_series={0x4} - -function s.efcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_AMAZONESS} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4) + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) end function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -39,7 +33,7 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Cannot be destroyed by card effects local e2=Effect.CreateEffect(c) @@ -48,10 +42,10 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.efilter(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c71218746.lua b/official/c71218746.lua index 39ff068277..2f3569b6d3 100644 --- a/official/c71218746.lua +++ b/official/c71218746.lua @@ -1,4 +1,5 @@ --ドリルロイド +--Drillroid local s,id=GetID() function s.initial_effect(c) --destroy @@ -21,4 +22,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then Duel.Destroy(t,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71222868.lua b/official/c71222868.lua index a4d97cdfa9..f08ca7c501 100644 --- a/official/c71222868.lua +++ b/official/c71222868.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(aux.dxmcostgen(3,3,nil)) + e3:SetCost(Cost.Detach(3,3,nil)) e3:SetTarget(s.copytg) e3:SetOperation(s.copyop) c:RegisterEffect(e3) @@ -80,4 +80,4 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) local code=tc:GetOriginalCodeRule() c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c71233859.lua b/official/c71233859.lua index 620d4ef087..f675d4c042 100644 --- a/official/c71233859.lua +++ b/official/c71233859.lua @@ -1,4 +1,5 @@ --フォトン・ブースター +--Photon Booster local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,8 +33,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(2000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c71249758.lua b/official/c71249758.lua index 778744ad9c..79032e921f 100644 --- a/official/c71249758.lua +++ b/official/c71249758.lua @@ -1,4 +1,5 @@ --D2シールド +--D2 Shield local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEUP_DEFENSE) end if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_DEFENSE) end @@ -29,8 +27,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(def*2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c712559.lua b/official/c712559.lua index 135cfbd2db..175619736a 100644 --- a/official/c712559.lua +++ b/official/c712559.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_AMAZONESS)) e2:SetValue(200) c:RegisterEffect(e2) --Special Summon 1 "Amazoness" from your Deck @@ -30,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.cfilter(c,e,tp) - return c:IsSetCard(0x4) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:HasLevel() + return c:IsSetCard(SET_AMAZONESS) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:HasLevel() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel()) end function s.spfilter(c,e,tp,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(lv) and c:IsSetCard(SET_AMAZONESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,e,tp) diff --git a/official/c71272951.lua b/official/c71272951.lua index 1770db8874..ce0b5eef89 100644 --- a/official/c71272951.lua +++ b/official/c71272951.lua @@ -1,4 +1,5 @@ --オーバースペック +--Overworked local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,4 +23,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7127502.lua b/official/c7127502.lua index 351fdbc916..bf68755882 100644 --- a/official/c7127502.lua +++ b/official/c7127502.lua @@ -1,4 +1,5 @@ --竜魔王レクターP +--Lector Pendulum, the Dracoverlord local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -37,4 +38,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(c,tc) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71278040.lua b/official/c71278040.lua index 07617a4c35..2628dd5f8c 100644 --- a/official/c71278040.lua +++ b/official/c71278040.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) end s.listed_names={id} function s.linkfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_LINK) and c:IsSummonPlayer(tp) + return c:IsLinkSummoned() and c:IsSummonPlayer(tp) end function s.handspcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.linkfilter,1,nil,tp) diff --git a/official/c71279983.lua b/official/c71279983.lua index afe42eabca..b5141d5028 100644 --- a/official/c71279983.lua +++ b/official/c71279983.lua @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -76,4 +76,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71283180.lua b/official/c71283180.lua index 8a1926bc53..2c04b23e2f 100644 --- a/official/c71283180.lua +++ b/official/c71283180.lua @@ -1,4 +1,5 @@ --トルネード・バード +--Tornado Bird local s,id=GetID() function s.initial_effect(c) --flip @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #dg==2 then Duel.SendtoHand(dg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71315423.lua b/official/c71315423.lua index b28895a4ea..6e509f0194 100644 --- a/official/c71315423.lua +++ b/official/c71315423.lua @@ -1,4 +1,5 @@ --ワーム・ミリディス +--Worm Millidith local s,id=GetID() function s.initial_effect(c) --flip @@ -33,12 +34,12 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --eqlimit local e2=Effect.CreateEffect(c) @@ -47,7 +48,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) e2:SetLabelObject(tc) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) @@ -62,4 +63,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if tg then Duel.Damage(tg:GetControler(),400,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71331215.lua b/official/c71331215.lua index b36e6472c8..b3d651db81 100644 --- a/official/c71331215.lua +++ b/official/c71331215.lua @@ -1,5 +1,5 @@ --War Rock Ordeal ---scripted by Rundas +--War Rock Ordeal local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -31,7 +31,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} s.counter_place_list={0x205} --place counters on activation function s.actop(e,tp,eg,ep,ev,re,r,rp) @@ -42,7 +42,7 @@ end function s.dcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local rc=tc:GetReasonCard() - return #eg==1 and rc:IsControler(tp) and tc:IsMonster() and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x161) + return #eg==1 and rc:IsControler(tp) and tc:IsMonster() and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(SET_WAR_ROCK) end function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and e:GetHandler():IsCanRemoveCounter(tp,0x205,1,REASON_EFFECT) end @@ -64,4 +64,4 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7133305.lua b/official/c7133305.lua index 5a2b0848ae..9584015ca8 100644 --- a/official/c7133305.lua +++ b/official/c7133305.lua @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ACTIVATE) @@ -41,13 +41,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) Duel.SpecialSummonComplete() end end function s.aclimit(e,re,tp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc:GetFlagEffect(id)==0 -end - + return re:IsMonsterEffect() and rc:GetFlagEffect(id)==0 +end \ No newline at end of file diff --git a/official/c71341529.lua b/official/c71341529.lua index 1ab73c26df..f8a7f0e60a 100644 --- a/official/c71341529.lua +++ b/official/c71341529.lua @@ -21,7 +21,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71344451.lua b/official/c71344451.lua index e277384883..ed054577fe 100644 --- a/official/c71344451.lua +++ b/official/c71344451.lua @@ -17,7 +17,7 @@ end s.listed_names={id} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) diff --git a/official/c71345905.lua b/official/c71345905.lua index 3903b104d4..05ad7b9132 100644 --- a/official/c71345905.lua +++ b/official/c71345905.lua @@ -1,4 +1,5 @@ --RDM-ヌメロン・フォール +--Rank-Down-Magic Numeron Fall local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and rk>1 and c:IsFaceup() and c:IsSetCard(0x107f) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and rk>1 and c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk,pg) end function s.filter2(c,e,tp,mc,rk,pg) - return c:IsRankBelow(rk-1) and c:IsSetCard(0x107f) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsRankBelow(rk-1) and c:IsSetCard(SET_UTOPIA) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -46,12 +47,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_BE_BATTLE_TARGET) sc:RegisterEffect(e2) - sc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + sc:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end end function s.disop(e,tp,eg,ep,ev,re,r,rp) @@ -61,12 +62,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c71348837.lua b/official/c71348837.lua index 6d73cb8917..8828dd4c02 100644 --- a/official/c71348837.lua +++ b/official/c71348837.lua @@ -15,8 +15,8 @@ function s.initial_effect(c) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x71)) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MADOLCHE)) c:RegisterEffect(e2) --Set 1 "Madolche" Spell/Trap from your Deck local e3=Effect.CreateEffect(c) @@ -33,17 +33,17 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={id} -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x71) - and (c:IsPreviousLocation(LOCATION_GRAVE) or (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousSetCard(0x71))) + return c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(SET_MADOLCHE) + and (c:IsPreviousLocation(LOCATION_GRAVE) or (c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousSetCard(SET_MADOLCHE))) and not c:IsLocation(LOCATION_EXTRA) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.setfilter(c) - return c:IsSetCard(0x71) and c:IsSpellTrap() and c:IsSSetable() and not c:IsForbidden() and not c:IsCode(id) + return c:IsSetCard(SET_MADOLCHE) and c:IsSpellTrap() and c:IsSSetable() and not c:IsForbidden() and not c:IsCode(id) end function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) @@ -51,4 +51,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c71353388.lua b/official/c71353388.lua index 6d6d7e6792..50af722ff7 100644 --- a/official/c71353388.lua +++ b/official/c71353388.lua @@ -1,4 +1,5 @@ --リード・バタフライ +--Reed Butterfly local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),0,LOCATION_MZONE,1,nil) and not Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c71384012.lua b/official/c71384012.lua index d53097640d..1bb620eca8 100644 --- a/official/c71384012.lua +++ b/official/c71384012.lua @@ -1,5 +1,5 @@ --見習い魔嬢 ---Apprentice Witchling +--Wee Witch's Apprentice --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71386411.lua b/official/c71386411.lua index 4f7ddea1f1..70c07dd7ba 100644 --- a/official/c71386411.lua +++ b/official/c71386411.lua @@ -40,16 +40,16 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:IsRelateToBattle() and tc:IsStatus(STATUS_OPPO_BATTLE) - and tc:IsFaceup() and tc:IsSetCard(0x9a) then + and tc:IsFaceup() and tc:IsSetCard(SET_SUPERHEAVY_SAMURAI) then s[tc:GetControler()]=true end end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return s[tp] and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return s[tp] and Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end @@ -66,10 +66,10 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsLevelAbove(2) and c:IsSetCard(0x9a) and c:IsType(TYPE_SYNCHRO) + return c:IsFaceup() and c:IsLevelAbove(2) and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsType(TYPE_SYNCHRO) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -89,7 +89,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) local tc=Duel.GetFirstTarget() @@ -97,7 +97,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_LEVEL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(-1) tc:RegisterEffect(e2) if c:IsRelateToEffect(e) then @@ -105,5 +105,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c) - return not c:IsSetCard(0x9a) -end + return not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) +end \ No newline at end of file diff --git a/official/c71395725.lua b/official/c71395725.lua index 1373d0bec2..c8cab5b6f3 100644 --- a/official/c71395725.lua +++ b/official/c71395725.lua @@ -1,4 +1,5 @@ --獣人アレス +--Man Beast of Ares local s,id=GetID() function s.initial_effect(c) --chain @@ -38,6 +39,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c71406430.lua b/official/c71406430.lua index 7b2702eb1d..21de276ba3 100644 --- a/official/c71406430.lua +++ b/official/c71406430.lua @@ -1,22 +1,22 @@ -- --- Libromancer Doombroker --- Scripted by Hatter +--Libromancer Doombroker +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- Check materials on Ritual Summon + --Check materials on Ritual Summon local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.matcheck) c:RegisterEffect(e0) - -- Can attack directly + --Can attack directly local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCondition(s.matcon) c:RegisterEffect(e1) - -- Set 1 "Libromancer" Trap from the Deck + --Set 1 "Libromancer" Trap from the Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) - -- Shuffle 1 card to the Deck + --Shuffle 1 card to the Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TODECK) @@ -38,19 +38,19 @@ function s.initial_effect(c) e3:SetOperation(s.tdop) c:RegisterEffect(e3) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.matcheck(e,c) if c:GetMaterial():IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.matcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)>0 + return c:IsRitualSummoned() and c:GetFlagEffect(id)>0 end function s.setfilter(c) - return c:IsSetCard(0x17d) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_LIBROMANCER) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c71408082.lua b/official/c71408082.lua index 4a215c049e..c316b23e67 100644 --- a/official/c71408082.lua +++ b/official/c71408082.lua @@ -1,4 +1,5 @@ --黒竜の聖騎士 +--Paladin of Dark Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,12 +18,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} s.listed_names={18803791} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -40,24 +41,20 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71411377.lua b/official/c71411377.lua index f23a45887f..464623532c 100644 --- a/official/c71411377.lua +++ b/official/c71411377.lua @@ -1,5 +1,5 @@ --女王親衛隊 --- Queen's Bodyguard +--Queen's Bodyguard local s,id=GetID() function s.initial_effect(c) --at limit @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetValue(aux.imval1) c:RegisterEffect(e1) end -s.listed_series={0x14} +s.listed_series={SET_ALLURE_QUEEN} function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x14) -end + return c:IsFaceup() and c:IsSetCard(SET_ALLURE_QUEEN) +end \ No newline at end of file diff --git a/official/c71413901.lua b/official/c71413901.lua index e771733151..800cfff5db 100644 --- a/official/c71413901.lua +++ b/official/c71413901.lua @@ -51,7 +51,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,COUNTER_SPELL,1,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -65,4 +65,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71415349.lua b/official/c71415349.lua index c48c436a09..1fa2143be2 100644 --- a/official/c71415349.lua +++ b/official/c71415349.lua @@ -1,4 +1,5 @@ --ハンプティ・ダンディ +--Humpty Grumpty local s,id=GetID() function s.initial_effect(c) --turn set @@ -22,7 +23,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -38,7 +39,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c71417170.lua b/official/c71417170.lua index 1472d55874..27f7456aaf 100644 --- a/official/c71417170.lua +++ b/official/c71417170.lua @@ -1,4 +1,5 @@ --ディフェンダーズ・クロス +--Defenders Intersect local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) end @@ -28,12 +29,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c71422989.lua b/official/c71422989.lua index 91767d722c..e1c745d590 100644 --- a/official/c71422989.lua +++ b/official/c71422989.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local params={aux.FilterBoolFunction(Card.IsSetCard,0x1047),Card.IsAbleToRemove,nil,Fusion.BanishMaterial} + local params={aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT),Card.IsAbleToRemove,nil,Fusion.BanishMaterial} local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.counterfilter(c) - return c:IsSetCard(0x1047) + return c:IsSetCard(SET_GEM_KNIGHT) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -25,17 +25,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x1047) + return not c:IsSetCard(SET_GEM_KNIGHT) end function s.filter(c) - return c:IsSetCard(0x1047) and c:IsAbleToHand() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +54,4 @@ function s.operation(oldtg,oldop) end end end -end +end \ No newline at end of file diff --git a/official/c7142724.lua b/official/c7142724.lua index 3719f58acc..9161e3ccf8 100644 --- a/official/c7142724.lua +++ b/official/c7142724.lua @@ -28,18 +28,18 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x16e} +s.listed_series={SET_ICEJADE} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x16e) + return c:IsMonster() and c:IsSetCard(SET_ICEJADE) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) @@ -70,6 +70,6 @@ function s.op(tc,c,atk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c71442223.lua b/official/c71442223.lua index be32fa97d2..2ecb7587e1 100644 --- a/official/c71442223.lua +++ b/official/c71442223.lua @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} s.counter_place_list={0x1038} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xe3) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_CUBIC) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local at=Duel.GetAttacker() @@ -38,14 +38,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then local tg=Group.FromCards(tc) local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter2),1-tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,1-tp,tc) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter2),1-tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,1-tp,tc) if ft>0 and #g>0 then if Duel.IsPlayerAffectedByEffect(1-tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local sg=g:Clone() if #g>ft then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) sg=g:Select(1-tp,ft,ft,nil) - g:Remove(Card.IsLocation,nil,LOCATION_MZONE+LOCATION_GRAVE) + g:Remove(Card.IsLocation,nil,LOCATION_MZONE|LOCATION_GRAVE) Duel.SendtoGrave(g,REASON_EFFECT) end local sc=sg:GetFirst() @@ -76,7 +76,7 @@ function s.counter(tc,ec) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) -- tc:AddCounter(0x1038,1) @@ -84,9 +84,9 @@ function s.counter(tc,ec) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetCondition(s.disable) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_DISABLE) tc:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c71453557.lua b/official/c71453557.lua index 30cb7f0076..95143bd039 100644 --- a/official/c71453557.lua +++ b/official/c71453557.lua @@ -1,4 +1,5 @@ --自律行動ユニット +--Autonomous Action Unit local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1500)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -18,12 +19,8 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==1-tp + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(Card.IsCanBeSpecialSummoned,tp,0,LOCATION_GRAVE,1,nil,e,0,tp,false,false) end @@ -46,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -56,4 +53,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71459017.lua b/official/c71459017.lua index 59d390657e..ac33cad123 100644 --- a/official/c71459017.lua +++ b/official/c71459017.lua @@ -83,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp,chk) if c:GetCounter(0x203)==0 and Duel.Destroy(c,REASON_EFFECT)>0 then Duel.Damage(tp,2000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71459861.lua b/official/c71459861.lua index 47ddf76a1e..5b6b35bfb8 100644 --- a/official/c71459861.lua +++ b/official/c71459861.lua @@ -1,7 +1,6 @@ --サモン・ストーム --Summon Storm --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -22,17 +21,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(aux.exccon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end --Pay 800 LP as cost -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end --Check for a level 4/6 WIND monster function s.filter(c,e,tp) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) @@ -72,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71466592.lua b/official/c71466592.lua index e048a0ad38..0292a73605 100644 --- a/official/c71466592.lua +++ b/official/c71466592.lua @@ -1,4 +1,5 @@ --魔力吸収球体 +--Maryokutai local s,id=GetID() function s.initial_effect(c) --Negate @@ -9,20 +10,16 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()~=tp end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -34,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71490127.lua b/official/c71490127.lua index 3f54904ec4..1772751f6f 100644 --- a/official/c71490127.lua +++ b/official/c71490127.lua @@ -6,12 +6,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_MZONE|LOCATION_GRAVE) end \ No newline at end of file diff --git a/official/c7150545.lua b/official/c7150545.lua index 85de9cf953..80cceb4b4e 100644 --- a/official/c7150545.lua +++ b/official/c7150545.lua @@ -1,7 +1,6 @@ --カッター・シャーク --Buzzsaw Shark --Scripted by Eerie Code and edo9300 - local s,id=GetID() function s.initial_effect(c) --Special summon 1 fish monster from deck @@ -52,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -65,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ge1:SetDescription(aux.Stringid(id,1)) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --Clock Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c71519605.lua b/official/c71519605.lua index 83f3bc1917..b2605af2bc 100644 --- a/official/c71519605.lua +++ b/official/c71519605.lua @@ -1,4 +1,5 @@ --オシャレオン +--Oshaleon local s,id=GetID() function s.initial_effect(c) --search @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c71521025.lua b/official/c71521025.lua index de1edd8e2a..137520fa14 100644 --- a/official/c71521025.lua +++ b/official/c71521025.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) c:RegisterEffect(e2) @@ -51,11 +51,6 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.filter1(c,e,tp) return c:IsType(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c:GetType()&(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK)) @@ -66,7 +61,7 @@ end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter1(chkc,e,tp) end if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) - and Duel.GetLocationCount(tp,LOCATION_MZONE) > -1 end + and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local sg=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,1,tp,0) @@ -74,7 +69,7 @@ function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then local type=tc:GetType()&(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK) if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -84,4 +79,4 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c7152333.lua b/official/c7152333.lua index 90b0c74bf5..262328a08b 100644 --- a/official/c7152333.lua +++ b/official/c7152333.lua @@ -1,4 +1,5 @@ --アンブラル・グール +--Umbral Horror Ghoul local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x87) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UMBRAL_HORROR) and c:GetAttack()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttack()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -27,7 +28,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71541986.lua b/official/c71541986.lua index 0e11e93b0f..f91b62d5cd 100644 --- a/official/c71541986.lua +++ b/official/c71541986.lua @@ -1,4 +1,5 @@ --エクシーズ・ディメンション・スプラッシュ +--Xyz Dimension Splash local s,id=GetID() function s.initial_effect(c) --spsummon @@ -40,17 +41,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) @@ -58,11 +59,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetRange(LOCATION_MZONE) e4:SetCode(EFFECT_UNRELEASABLE_SUM) e4:SetValue(1) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4) local e5=e4:Clone() e5:SetCode(EFFECT_UNRELEASABLE_NONSUM) tc:RegisterEffect(e5) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c71544954.lua b/official/c71544954.lua index b6a010c80e..9c993520d0 100644 --- a/official/c71544954.lua +++ b/official/c71544954.lua @@ -3,39 +3,30 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - --special summon - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) - c:RegisterEffect(e1) - --cannot special summon - local e2=Effect.CreateEffect(c) - e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_SPSUMMON_CONDITION) - c:RegisterEffect(e2) + c:AddMustBeSpecialSummoned() + --Must be Special Summoned (from your hand) by banishing any number of Rock monster(s) from your GY + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,0)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_SPSUMMON_PROC) + e0:SetRange(LOCATION_HAND) + e0:SetCondition(s.spcon) + e0:SetTarget(s.sptg) + e0:SetOperation(s.spop) + c:RegisterEffect(e0) end -function s.spfilter(c,tp) - return c:IsRace(RACE_ROCK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) - and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) +function s.spconfilter(c,tp) + return c:IsRace(RACE_ROCK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.GetMZoneCount(tp,c)>0 end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,#rg,nil,0) + local g=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) + return #g>0 and aux.SelectUnselectGroup(g,e,tp,1,1,nil,0) end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local c=e:GetHandler() - local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) + local rg=Duel.GetMatchingGroup(s.spconfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,#rg,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -49,16 +40,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Remove(g,POS_FACEUP,REASON_COST) local val=#g*700 + g:DeleteGroup() + --The original ATK/DEF of this card become the number of Rock monsters banished to Special Summon it x 700 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) + e1:SetRange(LOCATION_MZONE) e1:SetValue(val) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) c:RegisterEffect(e2) - g:DeleteGroup() end diff --git a/official/c71545247.lua b/official/c71545247.lua index b18efafddd..99a7509ba3 100644 --- a/official/c71545247.lua +++ b/official/c71545247.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetOperation(s.atkop) @@ -61,7 +61,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(value*300) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c71549257.lua b/official/c71549257.lua index 94d53af4a6..e5f237f04e 100644 --- a/official/c71549257.lua +++ b/official/c71549257.lua @@ -1,7 +1,6 @@ --H・C ナックル・ナイフ ---Heroic Challenger – Knuckle Knife +--Heroic Challenger - Knuckle Sword --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -32,10 +31,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Heroic" archetype -s.listed_series={0x6f} - +s.listed_series={SET_HEROIC} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x6f) and not c:IsLevel(1) + return c:IsFaceup() and c:IsSetCard(SET_HEROIC) and not c:IsLevel(1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -82,7 +80,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(sg:GetFirst():GetLevel()) oc:RegisterEffect(e1) end @@ -93,7 +91,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ge1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) ge1:SetTargetRange(LOCATION_MZONE,0) ge1:SetTarget(function(e,c) return not c:IsType(TYPE_XYZ) end) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3),nil) end \ No newline at end of file diff --git a/official/c71555408.lua b/official/c71555408.lua index ff7dcdad44..54737073ac 100644 --- a/official/c71555408.lua +++ b/official/c71555408.lua @@ -1,7 +1,6 @@ --剛鬼アイアン・クロー --Gouki Iron Claw --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Your battling "Gouki" monster gains 500 ATK, becomes unaffected by opponent's card effects @@ -14,7 +13,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --If sent from field to GY, add 1 "Gouki" card from deck @@ -30,20 +29,15 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} - function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() if ph~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end e:SetLabelObject(tc) - return tc and tc:IsSetCard(0xfc) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return tc and tc:IsSetCard(SET_GOUKI) and tc:IsRelateToBattle() and Duel.GetAttackTarget()~=nil end function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetLabelObject() @@ -54,7 +48,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Unaffected by opponent's card effects local e2=Effect.CreateEffect(c) @@ -65,7 +59,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e2:SetValue(s.efilter) e2:SetOwnerPlayer(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2,true) end end @@ -76,7 +70,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c71564150.lua b/official/c71564150.lua index c119c970b2..ebf9e7a38f 100644 --- a/official/c71564150.lua +++ b/official/c71564150.lua @@ -1,6 +1,5 @@ --地獄の傀儡魔人 --Perditious Puppeteer - local s,id=GetID() function s.initial_effect(c) --Take control all of opponent's level 3 or lower monsters @@ -16,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsLevelBelow(3) and c:IsControlerCanBeChanged() @@ -40,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c71564252.lua b/official/c71564252.lua index 240269adaa..76b408b854 100644 --- a/official/c71564252.lua +++ b/official/c71564252.lua @@ -1,4 +1,5 @@ --ライオウ +--Thunder King Rai-Oh local s,id=GetID() function s.initial_effect(c) --disable search @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_SPSUMMON) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -24,10 +25,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp~=ep and #eg==1 and Duel.GetCurrentChain()==0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,0,0) @@ -36,4 +33,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c71578874.lua b/official/c71578874.lua index 06fbe401e0..014d8cc772 100644 --- a/official/c71578874.lua +++ b/official/c71578874.lua @@ -1,4 +1,5 @@ --Emミラー・コンダクター +--Performage Mirror Conductor local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -21,14 +22,14 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetHintTiming(TIMING_DAMAGE_STEP) e3:SetCountLimit(1) - e3:SetCondition(s.swcon) + e3:SetCondition(aux.StatChangeDamageStepCondition) e3:SetTarget(s.swtg) e3:SetOperation(s.swop) c:RegisterEffect(e3) end function s.filter(c) return c:IsFaceup() and c:GetAttack()~=c:GetDefense() and c:IsDefenseAbove(0) - and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and c:IsSpecialSummoned() end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -44,7 +45,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(val) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -52,9 +53,6 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end -function s.swcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.swfilter(c) return c:IsFaceup() and c:IsDefenseAbove(0) end @@ -75,7 +73,7 @@ function s.swop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SWAP_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SWAP_DEFENSE_FINAL) @@ -84,4 +82,4 @@ function s.swop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71583486.lua b/official/c71583486.lua index 37e27f6fe9..e9e8043824 100644 --- a/official/c71583486.lua +++ b/official/c71583486.lua @@ -53,4 +53,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c71587526.lua b/official/c71587526.lua index c4a9fd6ae8..76f605accd 100644 --- a/official/c71587526.lua +++ b/official/c71587526.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToRemove() end @@ -32,10 +32,10 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then - local rg=Duel.GetMatchingGroup(s.rfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,tc,tc:GetCode()) + local rg=Duel.GetMatchingGroup(s.rfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,tc,tc:GetCode()) if Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_REMOVED) and #rg>0 then Duel.BreakEffect() Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c71594310.lua b/official/c71594310.lua index 57762bd803..0de8d5cbfd 100644 --- a/official/c71594310.lua +++ b/official/c71594310.lua @@ -1,7 +1,8 @@ --ジェムナイト・パール +--Gem-Knight Pearl local s,id=GetID() function s.initial_effect(c) --xyz summon Xyz.AddProcedure(c,nil,4,2) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c71595845.lua b/official/c71595845.lua index 81417a63d1..2326d04a66 100644 --- a/official/c71595845.lua +++ b/official/c71595845.lua @@ -1,7 +1,6 @@ --人形の幸福 --Doll Happiness --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -37,10 +36,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Doll Monster" archetype -s.listed_series={0x15c} +s.listed_series={SET_DOLL_MONSTER} --Specifically lists "Princess Cologne", "Box of Friends", and "Grandpa Demetto" s.listed_names={75574498,81587028,44190146} - --Check for "Box of Friends" or "Grandpa Demetto" function s.filter(c) return c:IsCode(81587028,44190146) and c:IsAbleToHand() @@ -70,17 +68,17 @@ function s.atlimit(e,c) end --Check for a "Doll Monster" card function s.tgfilter(c) - return c:IsSetCard(0x15c) and c:IsAbleToGrave() + return c:IsSetCard(SET_DOLL_MONSTER) and c:IsAbleToGrave() end --Activation legality function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end - local dg=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local dg=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,tp,LOCATION_HAND|LOCATION_MZONE) else - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end @@ -89,7 +87,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectMatchingCard(tp,Card.IsMonster,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g1=Duel.SelectMatchingCard(tp,Card.IsMonster,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g1>0 and Duel.Destroy(g1,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g2=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) @@ -103,14 +101,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp,s.lizfilter) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,3)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -120,4 +118,4 @@ function s.splimit(e,c) end function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_XYZ) -end +end \ No newline at end of file diff --git a/official/c71612253.lua b/official/c71612253.lua index 68901fb800..400e9a9e8d 100644 --- a/official/c71612253.lua +++ b/official/c71612253.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -37,22 +37,18 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x10af,xyzc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==4 + return c:IsFaceup() and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_DDD,xyzc,SUMMON_TYPE_XYZ,tp) and c:GetRank()==4 end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if (r&REASON_EFFECT)~=0 then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)~=0 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -67,7 +63,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -79,7 +75,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.tgfilter(c) - return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGrave() + return (c:IsSetCard(SET_DD) or c:IsSetCard(SET_DARK_CONTRACT)) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -91,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71614230.lua b/official/c71614230.lua index 78b843d03d..6cecdf71bd 100644 --- a/official/c71614230.lua +++ b/official/c71614230.lua @@ -56,4 +56,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71616908.lua b/official/c71616908.lua index 1903d681c8..5c7c8fce03 100644 --- a/official/c71616908.lua +++ b/official/c71616908.lua @@ -1,9 +1,10 @@ --ジェムナイト・アメジス +--Gem-Knight Amethyst local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),aux.FilterBoolFunctionEx(Card.IsRace,RACE_AQUA)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),aux.FilterBoolFunctionEx(Card.IsRace,RACE_AQUA)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -22,8 +23,8 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end @@ -38,4 +39,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_SZONE,LOCATION_SZONE,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7161742.lua b/official/c7161742.lua index 9d845eb7af..4c3a5d5610 100644 --- a/official/c7161742.lua +++ b/official/c7161742.lua @@ -8,17 +8,17 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x10f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_PREDAPLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetCode(CARD_EHERO_BLAZEMAN) e4:SetTargetRange(1,0) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end function s.splimit(e,c) diff --git a/official/c71620241.lua b/official/c71620241.lua index 8b57f81271..dcbbfd7702 100644 --- a/official/c71620241.lua +++ b/official/c71620241.lua @@ -54,7 +54,7 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.filter(c) return c:IsSetCard(SET_ADVANCED_CRYSTAL_BEAST) and not c:IsForbidden() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) @@ -77,6 +77,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(tc,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end end \ No newline at end of file diff --git a/official/c71628381.lua b/official/c71628381.lua index e7e051e320..926d2e5387 100644 --- a/official/c71628381.lua +++ b/official/c71628381.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) @@ -28,7 +28,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.mgfilter(c,e,tp,fusc) return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) - or (c:GetReason()&0x40008)~=0x40008 or c:GetReasonCard()~=fusc + or (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))~=(REASON_FUSION|REASON_MATERIAL) or c:GetReasonCard()~=fusc or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local mg=c:GetMaterial() local sumable=true local sumtype=c:GetSummonType() - if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)==0 or (sumtype&SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or #mg==0 + if Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)==0 or (sumtype&SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or #mg==0 or #mg>Duel.GetLocationCount(tp,LOCATION_MZONE) or mg:IsExists(s.mgfilter,1,nil,e,tp,c) then sumable=false diff --git a/official/c71645242.lua b/official/c71645242.lua index 645061708c..5594791bfe 100644 --- a/official/c71645242.lua +++ b/official/c71645242.lua @@ -1,5 +1,6 @@ --ブラック・ガーデン --Black Garden +local SUMMONED_BY_BLACK_GARDEN=0x20 local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,7 +42,7 @@ function s.initial_effect(c) end s.listed_names={id,TOKEN_ROSE} function s.cfilter(c,tp) - return c:IsControler(tp) and c:GetSummonType()~=SUMMON_TYPE_SPECIAL+0x20 + return c:IsControler(tp) and c:GetSummonType()~=SUMMON_TYPE_SPECIAL+SUMMONED_BY_BLACK_GARDEN end function s.regcon(e,tp,eg,ep,ev,re,r,rp) local sf=0 @@ -81,20 +82,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(math.ceil(tc:GetAttack()/2)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) if not tc:IsImmuneToEffect(e1) and math.ceil(preatk/2)==tc:GetAttack() then change=true end end if not change then return end if bit.extract(ev,tp)~=0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0x123,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,SET_ROSE,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,1-tp) then local token=Duel.CreateToken(tp,TOKEN_ROSE) - Duel.SpecialSummonStep(token,0x20,tp,1-tp,false,false,POS_FACEUP_ATTACK) + Duel.SpecialSummonStep(token,SUMMONED_BY_BLACK_GARDEN,tp,1-tp,false,false,POS_FACEUP_ATTACK) end if bit.extract(ev,1-tp)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(1-tp,TOKEN_ROSE,0x123,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,tp) then + and Duel.IsPlayerCanSpecialSummonMonster(1-tp,TOKEN_ROSE,SET_ROSE,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,tp) then local token=Duel.CreateToken(1-tp,TOKEN_ROSE) - Duel.SpecialSummonStep(token,0x20,1-tp,tp,false,false,POS_FACEUP_ATTACK) + Duel.SpecialSummonStep(token,SUMMONED_BY_BLACK_GARDEN,1-tp,tp,false,false,POS_FACEUP_ATTACK) end Duel.SpecialSummonComplete() end @@ -102,7 +103,7 @@ function s.mzfilter(c,tp) return c:IsControler(tp) and c:GetSequence()<5 end function s.filter2(c,atk,e,tp) - return c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0x20,tp,false,false) + return c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,SUMMONED_BY_BLACK_GARDEN,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter2(chkc,e:GetLabel(),e,tp) end @@ -136,6 +137,6 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local atk=og:GetSum(Card.GetPreviousAttackOnField) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:GetAttack()==atk then - Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(tc,SUMMONED_BY_BLACK_GARDEN,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71650854.lua b/official/c71650854.lua index a07302610f..821fba7e2e 100644 --- a/official/c71650854.lua +++ b/official/c71650854.lua @@ -53,11 +53,11 @@ function s.initial_effect(c) c:RegisterEffect(e7) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(tp) and (Duel.IsMainPhase()) and (not Duel.CheckPhaseActivity() or (Duel.GetFlagEffect(tp,CARD_MAGICAL_MIDBREAKER)>0 and Duel.GetCurrentChain()==1)) end function s.indcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.tgoval(e,re,rp) return rp~=1-e:GetHandlerPlayer() and not re:GetHandler():IsImmuneToEffect(e) diff --git a/official/c71652522.lua b/official/c71652522.lua index 4d36f3e022..b32df6e3b4 100644 --- a/official/c71652522.lua +++ b/official/c71652522.lua @@ -27,17 +27,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1) - e2:SetReset(RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_PHASE|PHASE_BATTLE) e2:SetOperation(s.ctop) e2:SetLabelObject(tc) Duel.RegisterEffect(e2,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_BATTLE,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_BATTLE,0,1) end end function s.ctop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c71692913.lua b/official/c71692913.lua index cf1e7b7ebe..4f3e5bbe25 100644 --- a/official/c71692913.lua +++ b/official/c71692913.lua @@ -1,4 +1,5 @@ --相克の魔術師 +--Xiangke Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -41,7 +42,7 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_XYZ_LEVEL) e1:SetValue(s.xyzlv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -65,13 +66,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c71696014.lua b/official/c71696014.lua index 5874ecf6e6..9d83ec7e08 100644 --- a/official/c71696014.lua +++ b/official/c71696014.lua @@ -1,6 +1,5 @@ --マジシャンズ・ローブ --Magician's Robe - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Dark Magician" from deck @@ -32,16 +31,15 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_DARK_MAGICIAN} - function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.cfilter(c) return c:IsSpellTrap() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsCode(CARD_DARK_MAGICIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -60,7 +58,7 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) end end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and rp==tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return Duel.IsTurnPlayer(1-tp) and rp==tp and re:IsSpellTrapEffect() end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -77,7 +75,7 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c71703785.lua b/official/c71703785.lua index de381ccf21..e7df199429 100644 --- a/official/c71703785.lua +++ b/official/c71703785.lua @@ -67,4 +67,4 @@ function s.dmspop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71705144.lua b/official/c71705144.lua index 887429e343..74482cfa58 100644 --- a/official/c71705144.lua +++ b/official/c71705144.lua @@ -1,4 +1,5 @@ --EMキャスト・チェンジ +--Performapal Recasting local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.filter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and c:IsAbleToDeck() and not c:IsPublic() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and c:IsAbleToDeck() and not c:IsPublic() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp) @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(p,ct+1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7171149.lua b/official/c7171149.lua index 12c405e3de..d653828766 100644 --- a/official/c7171149.lua +++ b/official/c7171149.lua @@ -42,7 +42,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.cfilter1(c) @@ -61,4 +61,4 @@ function s.aclimit(e,re,tp) end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c71717923.lua b/official/c71717923.lua index 45b89ce0ae..6310769f8b 100644 --- a/official/c71717923.lua +++ b/official/c71717923.lua @@ -1,4 +1,5 @@ --モーム +--Mormolith local s,id=GetID() function s.initial_effect(c) --destroy @@ -33,4 +34,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c71734607.lua b/official/c71734607.lua index 977f5e5527..35d31310cb 100644 --- a/official/c71734607.lua +++ b/official/c71734607.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x141} +s.listed_series={SET_RIKKA} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x141) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) and not c:IsCode(id) + return c:IsSetCard(SET_RIKKA) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) and not c:IsCode(id) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -54,7 +54,7 @@ function s.splimit(e,c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return Duel.GetTurnPlayer()==1-tp and (#g==0 or (#g>0 and g:FilterCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),nil)==#g)) + return Duel.IsTurnPlayer(1-tp) and (#g==0 or (#g>0 and g:FilterCount(aux.FaceupFilter(Card.IsRace,RACE_PLANT),nil)==#g)) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71736213.lua b/official/c71736213.lua index bd05798d5d..ba165aa454 100644 --- a/official/c71736213.lua +++ b/official/c71736213.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.thfilter(c) - return c:IsSetCard(0x107a) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -42,4 +42,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c71750854.lua b/official/c71750854.lua index 6a2879aba1..2ff77f4dc4 100644 --- a/official/c71750854.lua +++ b/official/c71750854.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN) e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(aux.PayLPCost(600)) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.efftg) e1:SetOperation(s.effop) c:RegisterEffect(e1) diff --git a/official/c71759912.lua b/official/c71759912.lua index 307cb0ab9f..73cd120345 100644 --- a/official/c71759912.lua +++ b/official/c71759912.lua @@ -1,4 +1,5 @@ --ラッコアラ +--Tree Otter local s,id=GetID() function s.initial_effect(c) --atk up @@ -18,7 +19,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsControler(tp) and chkc:GetLocation()==LOCATION_MZONE end + if chkc then return chkc:IsFaceup() and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) @@ -31,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c71782404.lua b/official/c71782404.lua index bbe0bfbb12..1e3f364f08 100644 --- a/official/c71782404.lua +++ b/official/c71782404.lua @@ -14,8 +14,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,e,tp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) - and c:IsPreviousSetCard(0x3b) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) + return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) + and c:IsPreviousSetCard(SET_RED_EYES) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return eg:IsContains(chkc) and s.cfilter(chkc,e,tp) end @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,tc:GetBaseAttack(),REASON_EFFECT,true) Duel.RDComplete() end -end +end \ No newline at end of file diff --git a/official/c71786742.lua b/official/c71786742.lua index d255eb0af0..dec669d2ad 100644 --- a/official/c71786742.lua +++ b/official/c71786742.lua @@ -1,4 +1,5 @@ --ギアギアーノ +--Geargiano local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsLevel(4) and c:IsRace(RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -36,13 +33,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c71791814.lua b/official/c71791814.lua index 9d9a691934..e91ecf0aff 100644 --- a/official/c71791814.lua +++ b/official/c71791814.lua @@ -78,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71799173.lua b/official/c71799173.lua index d1dbc9ae7b..6c07d57df0 100644 --- a/official/c71799173.lua +++ b/official/c71799173.lua @@ -1,4 +1,5 @@ --ガーディアン・オブ・オーダー +--Guardian of Order local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -18,4 +19,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),LOCATION_MZONE,0,2,nil) -end +end \ No newline at end of file diff --git a/official/c7180418.lua b/official/c7180418.lua index adbb4db5f5..35728bbf0e 100644 --- a/official/c7180418.lua +++ b/official/c7180418.lua @@ -1,4 +1,5 @@ --魔導アーマー エグゼ +--Armor Exe local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -17,7 +18,7 @@ function s.initial_effect(c) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetCountLimit(1) e4:SetRange(LOCATION_MZONE) e4:SetOperation(s.ccost) @@ -28,7 +29,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.ccost(e,tp,eg,ep,ev,re,r,rp) @@ -37,4 +38,4 @@ function s.ccost(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c71817640.lua b/official/c71817640.lua index 66ca9d7ff9..5cda037182 100644 --- a/official/c71817640.lua +++ b/official/c71817640.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc7)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DRACOSLAYER)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -46,11 +46,11 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0xc7,0xda} +s.listed_series={SET_DRACOSLAYER,SET_DRACOVERLORD} function s.descon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() local cont,loc,race=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_RACE) - return re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0xc7) and cont==tp and loc==LOCATION_MZONE and race==RACE_DRAGON + return re:IsMonsterEffect() and rc:IsSetCard(SET_DRACOSLAYER) and cont==tp and loc==LOCATION_MZONE and race==RACE_DRAGON end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -66,7 +66,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.filter(c,e,tp) - return (c:IsSetCard(0xc7) or c:IsSetCard(0xda)) and c:IsMonster() and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) + return (c:IsSetCard(SET_DRACOSLAYER) or c:IsSetCard(SET_DRACOVERLORD)) and c:IsMonster() and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -87,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end, aux.Stringid(id,3) ) -end +end \ No newline at end of file diff --git a/official/c71821687.lua b/official/c71821687.lua index b871416920..7a449c7db4 100644 --- a/official/c71821687.lua +++ b/official/c71821687.lua @@ -22,7 +22,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,2)) @@ -30,7 +30,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spfilter(c,e,tp) return c:IsCode(78275321) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -54,10 +54,10 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) > 0 and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1))then + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1))then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71829750.lua b/official/c71829750.lua index 627f09d161..7ecadb21da 100644 --- a/official/c71829750.lua +++ b/official/c71829750.lua @@ -1,4 +1,5 @@ --ナーガ +--Serpentine Princess local s,id=GetID() function s.initial_effect(c) --special summon @@ -29,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c7183277.lua b/official/c7183277.lua index 6989c5aaa5..383da5fcdd 100644 --- a/official/c7183277.lua +++ b/official/c7183277.lua @@ -28,4 +28,4 @@ s.listed_series={SET_LIGHTSWORN} function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) -end +end \ No newline at end of file diff --git a/official/c71861848.lua b/official/c71861848.lua index 3537c5af42..65f3c715fe 100644 --- a/official/c71861848.lua +++ b/official/c71861848.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.regcon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_LINK end @@ -26,15 +26,15 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.target) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x119) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_SALAMANGREAT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.thfilter(c) - return c:IsSetCard(0x119) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SALAMANGREAT) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c71863024.lua b/official/c71863024.lua index a053c26b9c..6925011f84 100644 --- a/official/c71863024.lua +++ b/official/c71863024.lua @@ -1,4 +1,5 @@ --EMラディッシュ・ホース +--Performapal Radish Horse local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -33,9 +34,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop2) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:GetAttack()>0 + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) and c:GetAttack()>0 end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -59,12 +60,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) hc:RegisterEffect(e1) end end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.hspcon(e,c) if c==nil then return true end @@ -95,15 +96,15 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) hc:RegisterEffect(e1) if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(atk) tc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c71870152.lua b/official/c71870152.lua index 6fcaa59467..779b79ced7 100644 --- a/official/c71870152.lua +++ b/official/c71870152.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -35,12 +35,12 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.value(e,c) return c:GetLevel()*200 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -49,12 +49,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsFaceup() and c:IsAttackPos() and re and re:GetHandler():IsSetCard(0x31) + return c:IsFaceup() and c:IsAttackPos() and re and re:GetHandler():IsSetCard(SET_FORTUNE_LADY) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end diff --git a/official/c71880877.lua b/official/c71880877.lua index c415dbde85..5ccbf77696 100644 --- a/official/c71880877.lua +++ b/official/c71880877.lua @@ -1,4 +1,5 @@ --SDロボ・モンキ +--Super Defense Robot Monki local s,id=GetID() function s.initial_effect(c) --spsummon @@ -23,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x85} +s.listed_series={SET_SUPER_DEFENSE_ROBOT} s.listed_names={71071546} function s.filter(c,e,tp) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,12 +47,12 @@ function s.rmfilter(c,tp) and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,c) end function s.thfilter(c) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsMonster() and c:IsAbleToHand() + return (c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) or c:IsCode(71071546)) and c:IsMonster() and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -67,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c71921856.lua b/official/c71921856.lua index dd9b4987a3..450f4fb4e6 100644 --- a/official/c71921856.lua +++ b/official/c71921856.lua @@ -1,5 +1,5 @@ --Number 79: Battlin' Boxer Nova Kaiser ---No.79 BK 新星のカイザー +--Number 79: Battlin' Boxer Nova Kaiser local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -33,20 +33,20 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} s.xyz_number=79 function s.filter(c) - return c:IsSetCard(0x84) and c:IsMonster() + return c:IsSetCard(SET_BATTLIN_BOXER) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.Overlay(c,g) end @@ -62,7 +62,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and ct>0 end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_BATTLIN_BOXER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -85,4 +85,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c71930383.lua b/official/c71930383.lua index 2dada0fe73..8fd734307c 100644 --- a/official/c71930383.lua +++ b/official/c71930383.lua @@ -1,4 +1,5 @@ --パトロイド +--Patroid local s,id=GetID() function s.initial_effect(c) --confirm @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c71934924.lua b/official/c71934924.lua index 72a1790536..e38ad61876 100644 --- a/official/c71934924.lua +++ b/official/c71934924.lua @@ -1,4 +1,5 @@ --疾風!凶殺陣 +--Swift Samurai Storm! local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,17 +22,17 @@ function s.initial_effect(c) e3:SetOperation(s.upop) c:RegisterEffect(e3) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.check(c,tp) - return c and c:IsSetCard(0x3d) and c:IsControler(tp) + return c and c:IsSetCard(SET_SIX_SAMURAI) and c:IsControler(tp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) if s.check(Duel.GetAttacker(),tp) or s.check(Duel.GetAttackTarget(),tp) then - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetFlagEffect(id)==0 + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetFlagEffect(id)==0 end function s.upop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,8 +45,8 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end -end +end \ No newline at end of file diff --git a/official/c71948047.lua b/official/c71948047.lua index da633125a9..77330d0275 100644 --- a/official/c71948047.lua +++ b/official/c71948047.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -25,15 +25,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end s.listed_series={SET_RESCUE_ACE} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsSetCard(SET_RESCUE_ACE) end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_RESCUE_ACE),tp,LOCATION_MZONE,0,1,nil) end diff --git a/official/c7194917.lua b/official/c7194917.lua index 9a80643fcf..0c75514c72 100644 --- a/official/c7194917.lua +++ b/official/c7194917.lua @@ -1,4 +1,5 @@ --No.52 ダイヤモンド・クラブ・キング +--Number 52: Diamond Crab King local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.adcost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.adop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --pos local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon1) @@ -32,10 +33,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=52 -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.adop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -43,13 +40,13 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e2) end end @@ -69,4 +66,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToBattle() and c:IsDefensePos() then Duel.ChangePosition(c,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c71971554.lua b/official/c71971554.lua index 667538828b..9977b57ace 100644 --- a/official/c71971554.lua +++ b/official/c71971554.lua @@ -1,4 +1,5 @@ --ロード・シンクロン +--Road Synchron local s,id=GetID() function s.initial_effect(c) --summon success @@ -26,7 +27,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) c:RegisterEffect(e1) end @@ -37,4 +38,4 @@ function s.lvval(e,c) if lv<=2 then return 16 end return lv-2 end -end +end \ No newline at end of file diff --git a/official/c71978434.lua b/official/c71978434.lua index 9e59505f58..4479d866ff 100644 --- a/official/c71978434.lua +++ b/official/c71978434.lua @@ -37,7 +37,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) - Duel.SendtoGrave(g,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end @@ -62,9 +62,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -98,10 +98,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then if Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))==0 then - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(sg,nil,1,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c71983925.lua b/official/c71983925.lua index 60ce977430..4fec0beba2 100644 --- a/official/c71983925.lua +++ b/official/c71983925.lua @@ -1,4 +1,5 @@ --魔法封印の呪符 +--Talisman of Spell Sealing local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_TRIGGER) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetRange(LOCATION_SZONE) - e3:SetTargetRange(0xa,0xa) + e3:SetTargetRange(LOCATION_HAND|LOCATION_SZONE,LOCATION_HAND|LOCATION_SZONE) e3:SetTarget(s.distg) c:RegisterEffect(e3) --disable @@ -55,7 +56,7 @@ function s.distg(e,c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if (tl&LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then + if (tl&LOCATION_SZONE)~=0 and re:IsSpellEffect() then Duel.NegateEffect(ev) end end \ No newline at end of file diff --git a/official/c7198399.lua b/official/c7198399.lua index 75f5c36689..6809e8a8e2 100644 --- a/official/c7198399.lua +++ b/official/c7198399.lua @@ -1,4 +1,5 @@ --チョコ・マジシャン・ガール +--Chocolate Magician Girl local s,id=GetID() function s.initial_effect(c) --draw @@ -29,7 +30,7 @@ function s.costfilter(c) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -63,9 +64,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(math.ceil(a:GetAttack()/2)) a:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c71985676.lua b/official/c71985676.lua index 3c6f422a63..074b206262 100644 --- a/official/c71985676.lua +++ b/official/c71985676.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.dmcon) - e1:SetCost(s.dmcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.dmop) c:RegisterEffect(e1) --Special Summon @@ -26,34 +26,30 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.dmcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() return d and a:GetControler()~=d:GetControler() end -function s.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.dmop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.spcfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,4 +61,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c7200041.lua b/official/c7200041.lua index 140bcea62d..9f84aac9c1 100644 --- a/official/c7200041.lua +++ b/official/c7200041.lua @@ -1,4 +1,5 @@ --メタル・シューター +--Metal Shooter local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x26) @@ -46,4 +47,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) and c:IsCanRemoveCounter(tp,0x26,1,REASON_COST) end c:RemoveCounter(tp,0x26,1,REASON_EFFECT) return true -end +end \ No newline at end of file diff --git a/official/c72006609.lua b/official/c72006609.lua index 4323d65825..c4117e382e 100644 --- a/official/c72006609.lua +++ b/official/c72006609.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x10c)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MEKK_KNIGHT)) e2:SetValue(s.tglimit) c:RegisterEffect(e2) --avoid battle damage @@ -34,26 +34,26 @@ function s.initial_effect(c) e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x10c)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MEKK_KNIGHT)) e3:SetValue(s.tglimit) c:RegisterEffect(e3) end -s.listed_series={0x10c,0xfe} +s.listed_series={SET_MEKK_KNIGHT,SET_WORLD_LEGACY} function s.lcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x10c,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_MEKK_KNIGHT,lc,sumtype,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.costfilter(c) - return ((c:IsSetCard(0x10c) and c:IsMonster()) or c:IsSetCard(0xfe)) and c:IsDiscardable() + return ((c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster()) or c:IsSetCard(SET_WORLD_LEGACY)) and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xfe) and c:IsAbleToHand() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -69,5 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.tglimit(e,c) return c and not c:GetColumnGroup():IsContains(c:GetBattleTarget()) -end - +end \ No newline at end of file diff --git a/official/c720147.lua b/official/c720147.lua index 598476407d..4252549419 100644 --- a/official/c720147.lua +++ b/official/c720147.lua @@ -13,22 +13,22 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.check(sg,tp,exg) return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,sg,sg,tp) end function s.filter(c,sg,tp) return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,#sg,sg,c) + and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,#sg,sg,c) end function s.matfilter(c,tc) - return c:IsSetCard(0x134) and c:IsMonster() and not c:IsType(TYPE_TOKEN) + return c:IsSetCard(SET_GENERAIDER) and c:IsMonster() and not c:IsType(TYPE_TOKEN) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c~=tc end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,s.check,nil,0x134) end + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,s.check,nil,SET_GENERAIDER) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,99,false,s.check,nil,0x134) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,99,false,s.check,nil,SET_GENERAIDER) Duel.Release(g,REASON_COST) local og=Duel.GetOperatedGroup() og:KeepAlive() @@ -46,10 +46,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and rg and #rg>0 then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,#rg,#rg,rg,tc) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,#rg,#rg,rg,tc) if #g>0 then g:ForEach(Card.CancelToGrave) Duel.Overlay(tc,g,true) end end -end +end \ No newline at end of file diff --git a/official/c72022087.lua b/official/c72022087.lua index 4d8d570241..f8958eb913 100644 --- a/official/c72022087.lua +++ b/official/c72022087.lua @@ -1,4 +1,5 @@ --自由解放 +--Liberty at Last! local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.acfilter,nil,e) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72029628.lua b/official/c72029628.lua index 13292b61ac..92650d17cf 100644 --- a/official/c72029628.lua +++ b/official/c72029628.lua @@ -2,12 +2,12 @@ --Fragment Fusion local s,id=GetID() function s.initial_effect(c) - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),function(cc) return aux.SpElimFilter(cc,true) end,s.fextra,Fusion.BanishMaterial,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT),function(cc) return aux.SpElimFilter(cc,true) end,s.fextra,Fusion.BanishMaterial,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,s.extratg) c:RegisterEffect(e1) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil @@ -16,7 +16,7 @@ function s.stage2(e,tc,tp,mg,chk) local c=e:GetHandler() local fid=c:GetFieldID() if chk==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end if chk==1 then local e1=Effect.CreateEffect(c) @@ -44,4 +44,4 @@ end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE) -end +end \ No newline at end of file diff --git a/official/c72043279.lua b/official/c72043279.lua index cfdc563abb..a717fe3e53 100644 --- a/official/c72043279.lua +++ b/official/c72043279.lua @@ -1,5 +1,5 @@ --覇王城 ---Supreme King Castle +--Supreme King's Castle local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_DARK_FUSION} -s.listed_series={0x6008} +s.listed_series={SET_EVIL_HERO} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local bc=Duel.GetAttackTarget() @@ -39,12 +39,12 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return bc:IsFaceup() and bc:IsRace(RACE_FIEND) end function s.atkcfilter(c) - return c:IsMonster() and c:IsSetCard(0x6008) and c:HasLevel() and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_EVIL_HERO) and c:HasLevel() and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil):GetFirst() Duel.SendtoGrave(tc,REASON_COST) e:SetLabel(tc:GetLevel()) end @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c72044448.lua b/official/c72044448.lua index d30523df16..50d3e3f42c 100644 --- a/official/c72044448.lua +++ b/official/c72044448.lua @@ -1,4 +1,5 @@ --破滅のフォトン・ストリーム +--Photon Stream of Destruction local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,17 +14,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107b} +s.listed_series={SET_GALAXY_EYES} s.listed_names={CARD_GALAXYEYES_P_DRAGON} function s.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x107b) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES) end function s.cfilter2(c) return c:IsFaceup() and c:IsCode(CARD_GALAXYEYES_P_DRAGON) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil) - and (Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)) + and (Duel.IsTurnPlayer(tp) or Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,nil)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72053645.lua b/official/c72053645.lua index cb868a84b2..743932ec9b 100644 --- a/official/c72053645.lua +++ b/official/c72053645.lua @@ -29,16 +29,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - if Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then + if Duel.IsTurnPlayer(tp) and Duel.IsBattlePhase() then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.bpcon) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,tp) end end function s.bpcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c72056560.lua b/official/c72056560.lua index fa227f6792..d39332a8f3 100644 --- a/official/c72056560.lua +++ b/official/c72056560.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.costfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c72060415.lua b/official/c72060415.lua index 6bc2d3a1da..eca55ae25e 100644 --- a/official/c72060415.lua +++ b/official/c72060415.lua @@ -18,9 +18,9 @@ function s.cfilter(c,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) @@ -37,4 +37,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c7206349.lua b/official/c7206349.lua index a7df60449c..dd4f09dab6 100644 --- a/official/c7206349.lua +++ b/official/c7206349.lua @@ -1,14 +1,14 @@ --- 春化精の花盛 --- Flower Bloom of the Vernusylph --- Scripted by Hatter +--春化精の花盛 +--Vernusylph in Full Bloom +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Increase ATK + --Increase ATK local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCondition(s.atkcon) e2:SetValue(1000) c:RegisterEffect(e2) - -- Special Summon 1 "Vera, the Vernalizer Fairy Goddess" + --Special Summon 1 "Vera, the Vernalizer Fairy Goddess" local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) - -- Return 1 card to the hand + --Return 1 card to the hand local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_TOHAND) @@ -43,7 +43,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={63708033,55125728} -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),e:GetHandlerPlayer(),LOCATION_MZONE,0,5,nil) end @@ -51,9 +51,9 @@ function s.spcostfilter(c) return c:IsCode(63708033) and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) @@ -72,13 +72,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thconfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x183) and c:IsSummonLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_VERNUSYLPH) and c:IsSummonLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thconfilter,1,nil,tp) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local loc=LOCATION_MZONE+LOCATION_GRAVE + local loc=LOCATION_MZONE|LOCATION_GRAVE if chkc then return chkc:IsLocation(loc) and chkc:IsMonster() and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsMonster,Card.IsAbleToHand),tp,loc,loc,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) diff --git a/official/c72064891.lua b/official/c72064891.lua index 0c6cd71965..692f53f3a6 100644 --- a/official/c72064891.lua +++ b/official/c72064891.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) + e2:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c72090076.lua b/official/c72090076.lua index f82e480f30..039c85c50a 100644 --- a/official/c72090076.lua +++ b/official/c72090076.lua @@ -1,5 +1,5 @@ --ネメシス・コリドー ---Nemesis Corridor +--Nemeses Corridor --Umbrella scripted by ahtelel, updated by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x13d} +s.listed_series={SET_NEMESES} s.listed_names={id} function s.tdfilter(c) return c:IsMonster() and c:IsFaceup() and c:IsAbleToDeck() and not c:IsCode(id) @@ -43,11 +43,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.thfilter(c) - return c:IsSetCard(0x13d) and c:IsMonster() and c:IsFaceup() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NEMESES) and c:IsMonster() and c:IsFaceup() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end @@ -61,5 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c72129804.lua b/official/c72129804.lua index ffac68b941..496d623e8c 100644 --- a/official/c72129804.lua +++ b/official/c72129804.lua @@ -21,10 +21,10 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0xf3,0x10f3} +s.listed_series={SET_PREDAP,SET_PREDAPLANT} s.counter_place_list={COUNTER_PREDATOR} function s.cfilter(c) - return c:IsSetCard(0xf3) and not c:IsPublic() + return c:IsSetCard(SET_PREDAP) and not c:IsPublic() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local hg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,e:GetHandler()) @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -57,7 +57,7 @@ function s.lvcon(e) return e:GetHandler():GetCounter(COUNTER_PREDATOR)>0 end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x10f3) and c:IsLocation(LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_PREDAPLANT) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -69,4 +69,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72142276.lua b/official/c72142276.lua index ba5385bc03..4c24de1827 100644 --- a/official/c72142276.lua +++ b/official/c72142276.lua @@ -1,4 +1,5 @@ --炎熱伝導場 +--Molten Conduction Field local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.tgfilter(c) - return c:IsSetCard(0x39) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_LAVAL) and c:IsMonster() and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72144675.lua b/official/c72144675.lua index ada57f84c2..fec6645084 100644 --- a/official/c72144675.lua +++ b/official/c72144675.lua @@ -1,4 +1,5 @@ --トラファスフィア +--Troposphere local s,id=GetID() function s.initial_effect(c) --tribute limit @@ -20,5 +21,5 @@ function s.tlimit(e,c) return not c:IsRace(RACE_WINGEDBEAST) end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end + return te:IsTrapEffect() +end \ No newline at end of file diff --git a/official/c72150572.lua b/official/c72150572.lua index 665dc798c8..8ba8d32c87 100644 --- a/official/c72150572.lua +++ b/official/c72150572.lua @@ -1,4 +1,5 @@ --融合体駆除装置 +--Anti-Fusion Device local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72167543.lua b/official/c72167543.lua index 7f17e9adbe..bfff00a733 100644 --- a/official/c72167543.lua +++ b/official/c72167543.lua @@ -1,4 +1,5 @@ --ダウナード・マジシャン +--Downerd Magician local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -26,11 +27,11 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.ovfilter(c) - return c:IsFaceup() and c:IsRankBelow(3) and Duel.GetCurrentPhase()==PHASE_MAIN2 + return c:IsFaceup() and c:IsRankBelow(3) and Duel.IsPhase(PHASE_MAIN2) end function s.atkval(e,c) return c:GetOverlayCount()*200 end function s.rmop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72171665.lua b/official/c72171665.lua index 6365efaa89..c16a819665 100644 --- a/official/c72171665.lua +++ b/official/c72171665.lua @@ -57,4 +57,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72181263.lua b/official/c72181263.lua index 12093415fa..27901c99a6 100644 --- a/official/c72181263.lua +++ b/official/c72181263.lua @@ -34,13 +34,12 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} function s.desfilter1(c,e) return c:IsSpellTrap() and c:IsCanBeEffectTarget(e) end function s.desfilter2(c,e,tp) - return c:IsFaceup() and (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsControler(tp) - and c:IsCanBeEffectTarget(e) + return c:IsFaceup() and c:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and c:IsControler(tp) and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) return sg:IsExists(s.desfilter1,1,nil,e) and sg:IsExists(s.desfilter2,1,e:GetHandler(),e,tp) @@ -85,9 +84,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_FIEND) -end +end \ No newline at end of file diff --git a/official/c72192100.lua b/official/c72192100.lua index 4fcc269622..171968dac5 100644 --- a/official/c72192100.lua +++ b/official/c72192100.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetCode(EVENT_TO_GRAVE) e3:SetRange(LOCATION_HAND) - e3:SetCost(aux.SelfToGraveCost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c72204747.lua b/official/c72204747.lua index fb70b028d8..a303644f4b 100644 --- a/official/c72204747.lua +++ b/official/c72204747.lua @@ -1,4 +1,5 @@ --オーバー・デステニー +--Over Destiny local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.filter1(c,e,sp) local lv=math.floor(c:GetLevel()/2) - return lv>0 and c:IsSetCard(0xc008) + return lv>0 and c:IsSetCard(SET_DESTINY_HERO) and Duel.IsExistingMatchingCard(s.filter2,sp,LOCATION_DECK,0,1,nil,lv,e,sp) end function s.filter2(c,lv,e,sp) - return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsLevelBelow(lv) and c:IsSetCard(SET_DESTINY_HERO) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter1(chkc,e,tp) end @@ -43,10 +44,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_EVENT|RESETS_STANDARD) e1:SetOperation(s.des) sc:RegisterEffect(e1) end function s.des(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72218246.lua b/official/c72218246.lua index 96fc7a31bd..9637167e02 100644 --- a/official/c72218246.lua +++ b/official/c72218246.lua @@ -29,12 +29,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x123,0x1123} +s.listed_series={SET_ROSE,SET_ROSE_DRAGON} function s.spcheck(g,lc,sumtype,tp) return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) end @@ -42,7 +42,7 @@ function s.mzfilter(c) return c:IsRace(RACE_PLANT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.exkfilter(c,sg,tp,oc) local sg = sg + oc @@ -52,7 +52,7 @@ function s.excheck(sg,tp,exg,ssg,c) return ssg:IsExists(s.exkfilter,1,nil,sg,tp,c) end function s.spfilter(c,e,tp,chk) - return (c:IsSetCard(0x123) or c:IsRace(RACE_PLANT)) and c:IsType(TYPE_SYNCHRO) and (not chk or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) + return (c:IsSetCard(SET_ROSE) or c:IsRace(RACE_PLANT)) and c:IsType(TYPE_SYNCHRO) and (not chk or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -81,7 +81,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x1123) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROSE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -95,4 +95,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72228247.lua b/official/c72228247.lua index d0e13d4d7b..3c8dab8aac 100644 --- a/official/c72228247.lua +++ b/official/c72228247.lua @@ -1,5 +1,5 @@ --マギアス・パラディオン ---Crusadia Magias +--Crusadia Magius local s,id=GetID() function s.initial_effect(c) --link summon @@ -35,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} function s.matfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x116,lc,sumtype,tp) and not c:IsSummonCode(lc,sumtype,tp,id) + return c:IsSetCard(SET_CRUSADIA,lc,sumtype,tp) and not c:IsSummonCode(lc,sumtype,tp,id) end function s.lcheck(g,lc) return g:IsExists(Card.IsType,1,nil,TYPE_LINK) @@ -50,7 +50,7 @@ function s.atklimit(e,c) return e:GetHandler():GetLinkedGroup():IsContains(c) end function s.thfilter(c,tp) - return c:IsMonster() and c:IsSetCard(0x116) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_CRUSADIA) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end @@ -63,5 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) end -end - +end \ No newline at end of file diff --git a/official/c72237166.lua b/official/c72237166.lua index 63c8a28515..c776fe4f21 100644 --- a/official/c72237166.lua +++ b/official/c72237166.lua @@ -1,4 +1,5 @@ --カイザー・サクリファイス +--Samsara Kaiser local s,id=GetID() function s.initial_effect(c) --to hand @@ -24,4 +25,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c72258771.lua b/official/c72258771.lua index ee199a27a1..0c7678571e 100644 --- a/official/c72258771.lua +++ b/official/c72258771.lua @@ -28,10 +28,10 @@ function s.initial_effect(c) e4:SetValue(s.efilter) c:RegisterEffect(e4) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -55,8 +55,8 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.otfilter(c,tp) - return c:IsSetCard(0x1d) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_KOAKI_MEIRU) and (c:IsControler(tp) or c:IsFaceup()) end function s.efilter(e,re,rp) - return re:IsActiveType(TYPE_TRAP) -end + return re:IsTrapEffect() +end \ No newline at end of file diff --git a/official/c72270339.lua b/official/c72270339.lua index f2945e7af6..eb97625dec 100644 --- a/official/c72270339.lua +++ b/official/c72270339.lua @@ -105,4 +105,4 @@ function s.spgyop(e,tp,eg,ep,ev,re,r,rp) and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72272462.lua b/official/c72272462.lua index b19bf9cce1..649b8a1c81 100644 --- a/official/c72272462.lua +++ b/official/c72272462.lua @@ -3,7 +3,7 @@ --scripted by Rundas local s,id=GetID() function s.initial_effect(c) - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x166),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESPIA),s.matfilter) c:EnableReviveLimit() --Change ATK to 0 local e1=Effect.CreateEffect(c) @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x166} +s.listed_series={SET_DESPIA} s.listed_names={CARD_ALBAZ} function s.matfilter(c,fc,st,tp) return c:IsAttribute(ATTRIBUTE_LIGHT,fc,st,tp) or c:IsAttribute(ATTRIBUTE_DARK,fc,st,tp) @@ -57,7 +57,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -67,7 +67,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) end function s.thfilter(c,e,tp,ft) - return ((c:IsSetCard(0x166) and c:IsMonster()) or c:IsCode(CARD_ALBAZ)) + return ((c:IsSetCard(SET_DESPIA) and c:IsMonster()) or c:IsCode(CARD_ALBAZ)) and (c:IsAbleToHand() or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ft>0)) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,1)) end -end +end \ No newline at end of file diff --git a/official/c72278479.lua b/official/c72278479.lua index 5030cfbdab..80c43d35e5 100644 --- a/official/c72278479.lua +++ b/official/c72278479.lua @@ -1,4 +1,5 @@ --ブラック・リターン +--Black Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return #eg==1 and eg:GetFirst():IsSetCard(0x33) + return #eg==1 and eg:GetFirst():IsSetCard(SET_BLACKWING) end function s.filter(c) return c:IsFaceup() and c:IsAbleToHand() and c:GetAttack()>0 @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72283691.lua b/official/c72283691.lua index aa736a4053..f2d199ef62 100644 --- a/official/c72283691.lua +++ b/official/c72283691.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) e2:SetCondition(s.mtcon) @@ -40,7 +40,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetDecktopGroup(tp,10) @@ -58,7 +58,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_MSET) @@ -97,4 +97,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() and not tc:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72287557.lua b/official/c72287557.lua index 169df89e47..ce982351d3 100644 --- a/official/c72287557.lua +++ b/official/c72287557.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return #eg==1 and tc:IsControler(1-tp) and tc:IsSummonType(SUMMON_TYPE_FUSION) + return #eg==1 and tc:IsControler(1-tp) and tc:IsFusionSummoned() end function s.cfilter(c,tp,eg) return Duel.GetMZoneCount(tp,c)>0 and not eg:IsContains(c) @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c72291078.lua b/official/c72291078.lua index 51b6878d15..30f3a7daf5 100644 --- a/official/c72291078.lua +++ b/official/c72291078.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SUMMON) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,TOKEN_MECHA_PHANTOM_BEAST) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72291412.lua b/official/c72291412.lua index da088808df..a9e58d8974 100644 --- a/official/c72291412.lua +++ b/official/c72291412.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion summon using materials from the GY - local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0x10af),matfilter=aux.FALSE,extrafil=s.fextra, + local params = {fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_DDD),matfilter=aux.FALSE,extrafil=s.fextra, extraop=Fusion.BanishMaterial,gc=Fusion.ForcedHandler,extratg=s.extratarget} local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(Fusion.SummonEffOP(params)) c:RegisterEffect(e1) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil diff --git a/official/c72302403.lua b/official/c72302403.lua index 5b9fb211e5..ee2802132b 100644 --- a/official/c72302403.lua +++ b/official/c72302403.lua @@ -1,4 +1,5 @@ --光の護封剣 +--Swords of Revealing Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -46,7 +47,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetLabelObject(e1) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e3:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,3) c:RegisterEffect(e3) end function s.reset(e,tp,eg,ep,ev,re,r,rp) @@ -59,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_RULE) if re then re:Reset() end end -end +end \ No newline at end of file diff --git a/official/c72309040.lua b/official/c72309040.lua index 51a685bd9b..feb7ade480 100644 --- a/official/c72309040.lua +++ b/official/c72309040.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -42,7 +42,7 @@ function s.value(e,c) return 500*Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonster),0,LOCATION_REMOVED,LOCATION_REMOVED,nil) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.IsTurnPlayer(1-tp) + return e:GetHandler():IsSynchroSummoned() and Duel.IsTurnPlayer(1-tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end diff --git a/official/c72318602.lua b/official/c72318602.lua index 82ea1973a1..4c3203c0ee 100644 --- a/official/c72318602.lua +++ b/official/c72318602.lua @@ -8,21 +8,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1045} +s.listed_series={SET_RED_DRAGON_ARCHFIEND} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1045) + return c:IsFaceup() and c:IsSetCard(SET_RED_DRAGON_ARCHFIEND) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -30,6 +26,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(aux.indoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c72323266.lua b/official/c72323266.lua index 9d50bebb6f..7d11c6b190 100644 --- a/official/c72323266.lua +++ b/official/c72323266.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -31,11 +31,6 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(nil,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.thfilter(c) return c:IsLevelBelow(3) and c:IsRace(RACE_FIEND) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() end diff --git a/official/c72328962.lua b/official/c72328962.lua index 806d4f7326..60910bfed9 100644 --- a/official/c72328962.lua +++ b/official/c72328962.lua @@ -1,4 +1,5 @@ --魔轟神ソルキウス +--Fabled Soulkius local s,id=GetID() function s.initial_effect(c) --spsummon @@ -30,4 +31,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72329844.lua b/official/c72329844.lua index 072e24c515..2591b79a7e 100644 --- a/official/c72329844.lua +++ b/official/c72329844.lua @@ -1,5 +1,5 @@ --スプライト・スプリンド ---Splight Sprind +--Spright Sprind --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -49,7 +49,7 @@ function s.lcheck(g,lc,sumtype,tp) end function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.tgfilter(c) return c:IsLevel(2) and c:IsAbleToGrave() diff --git a/official/c72330894.lua b/official/c72330894.lua index 3c131fa80d..4071ec0dab 100644 --- a/official/c72330894.lua +++ b/official/c72330894.lua @@ -70,7 +70,7 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(g,REASON_EFFECT|REASON_REPLACE) end function s.spfilter(c,e,tp,lv) return c:IsRace(RACE_WINGEDBEAST) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c72332074.lua b/official/c72332074.lua index 6c04828488..acdc20d589 100644 --- a/official/c72332074.lua +++ b/official/c72332074.lua @@ -22,10 +22,10 @@ function s.initial_effect(c) e2:SetOperation(s.actop) c:RegisterEffect(e2) end -s.listed_series={0x10dc} +s.listed_series={SET_SUPER_QUANTUM} s.listed_names={58753372,10424147} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10dc) + return c:IsFaceup() and c:IsSetCard(SET_SUPER_QUANTUM) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) @@ -60,9 +60,9 @@ end function s.actcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) - and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) end + and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c) g:AddCard(c) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -75,4 +75,4 @@ end function s.actop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.actfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) -end +end \ No newline at end of file diff --git a/official/c72336818.lua b/official/c72336818.lua index 8012cf09d8..23b900e0ac 100644 --- a/official/c72336818.lua +++ b/official/c72336818.lua @@ -13,5 +13,4 @@ function s.initial_effect(c) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsLinked)) c:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c72345736.lua b/official/c72345736.lua index 5d631e7325..f6d028a44b 100644 --- a/official/c72345736.lua +++ b/official/c72345736.lua @@ -2,8 +2,8 @@ --Six Samurai United local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x3) - c:SetCounterLimit(0x3,2) + c:EnableCounterPermit(COUNTER_BUSHIDO) + c:SetCounterLimit(COUNTER_BUSHIDO,2) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -37,25 +37,25 @@ function s.initial_effect(c) e5:SetValue(1) c:RegisterEffect(e5) end -s.listed_series={0x3d} -s.counter_place_list={0x3} +s.listed_series={SET_SIX_SAMURAI} +s.counter_place_list={COUNTER_BUSHIDO} function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.ctfilter,1,nil) then - e:GetHandler():AddCounter(0x3,1) + e:GetHandler():AddCounter(COUNTER_BUSHIDO,1) end end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - local ct=e:GetHandler():GetCounter(0x3) + local ct=e:GetHandler():GetCounter(COUNTER_BUSHIDO) e:SetLabel(ct) Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return c:GetCounter(0x3)>0 and Duel.IsPlayerCanDraw(tp,c:GetCounter(0x3)) end + if chk==0 then return c:GetCounter(COUNTER_BUSHIDO)>0 and Duel.IsPlayerCanDraw(tp,c:GetCounter(COUNTER_BUSHIDO)) end local ct=e:GetLabel() Duel.SetTargetPlayer(tp) Duel.SetTargetParam(ct) diff --git a/official/c72355272.lua b/official/c72355272.lua index f4163e6dbd..98cd3e1ef6 100644 --- a/official/c72355272.lua +++ b/official/c72355272.lua @@ -1,4 +1,5 @@ --メタファイズ・ネフティス +--Metaphys Nephthys local s,id=GetID() function s.initial_effect(c) --remove @@ -17,19 +18,19 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetRange(LOCATION_REMOVED) e2:SetCondition(s.thcon) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x105} +s.listed_series={SET_METAPHYS} function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x105) + return re and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_METAPHYS) end function s.rmfilter(c) return c:IsFacedown() and c:IsSpellTrap() and c:IsAbleToRemove() @@ -48,12 +49,8 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end - Duel.SendtoDeck(e:GetHandler(),tp,2,REASON_COST) -end function s.thfilter(c) - return c:IsSetCard(0x105) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_METAPHYS) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -66,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c72355441.lua b/official/c72355441.lua index dffd53bf69..5988240887 100644 --- a/official/c72355441.lua +++ b/official/c72355441.lua @@ -1,4 +1,5 @@ --エクシーズ・ギフト +--Xyz Gift local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not Duel.CheckRemoveOverlayCard(tp,1,0,2,REASON_EFFECT) then return end Duel.RemoveOverlayCard(tp,1,0,2,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72370114.lua b/official/c72370114.lua index 0d2d134373..a5049533df 100644 --- a/official/c72370114.lua +++ b/official/c72370114.lua @@ -1,4 +1,5 @@ --ギアギアタッカー +--Geargiattacker local s,id=GetID() function s.initial_effect(c) --turn set @@ -21,11 +22,11 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -35,10 +36,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) + return c:IsFaceup() and c:IsSetCard(SET_GEARGIA) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) @@ -55,4 +56,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72378329.lua b/official/c72378329.lua index b55ea71668..f7cc1e340b 100644 --- a/official/c72378329.lua +++ b/official/c72378329.lua @@ -1,5 +1,5 @@ --ビーストアイズ・ペンデュラム・ドラゴン --- Beast-Eyes Pendulum Dragon +--Beast-Eyes Pendulum Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -33,7 +33,7 @@ function s.contactfil(tp) return Duel.GetReleaseGroup(tp) end function s.contactop(g) - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c72386290.lua b/official/c72386290.lua index 81f5efb834..7c3ffb457e 100644 --- a/official/c72386290.lua +++ b/official/c72386290.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.setcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c72402069.lua b/official/c72402069.lua index 770e2f160f..3194956628 100644 --- a/official/c72402069.lua +++ b/official/c72402069.lua @@ -1,9 +1,10 @@ --DDD超死偉王ホワイテスト・ヘル・アーマゲドン +--D/D/D Super Doom King Bright Armageddon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x10af),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_DDD),1,99) --destroy and damage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -51,12 +52,12 @@ function s.initial_effect(c) e6:SetOperation(s.penop) c:RegisterEffect(e6) end -s.listed_series={0x10af,0xaf} +s.listed_series={SET_DDD,SET_DD} function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():GetControler()~=tp end function s.desfilter1(c,tp) - return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x10af) and c:GetAttack()>0 + return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsSetCard(SET_DDD) and c:GetAttack()>0 and Duel.IsExistingMatchingCard(s.desfilter2,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end function s.desfilter2(c,atk) @@ -99,18 +100,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -128,4 +129,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c72403299.lua b/official/c72403299.lua index c88c8e8a17..c4189b46a5 100644 --- a/official/c72403299.lua +++ b/official/c72403299.lua @@ -1,4 +1,5 @@ --リチュア・ディバイナー +--Gishki Diviner local s,id=GetID() function s.initial_effect(c) --announce @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c72405967.lua b/official/c72405967.lua index f7e805f7e2..21c2395f04 100644 --- a/official/c72405967.lua +++ b/official/c72405967.lua @@ -23,4 +23,4 @@ function s.handesop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c72409226.lua b/official/c72409226.lua index 529806cf09..e69fadf9b1 100644 --- a/official/c72409226.lua +++ b/official/c72409226.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.deckspthtg) e1:SetOperation(s.deckspthop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c7241272.lua b/official/c7241272.lua index a5ee398a62..11baad721e 100644 --- a/official/c7241272.lua +++ b/official/c7241272.lua @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72413000.lua b/official/c72413000.lua index da6909ae1a..b6f94e4ac1 100644 --- a/official/c72413000.lua +++ b/official/c72413000.lua @@ -10,12 +10,12 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xa9} +s.listed_series={SET_FLUFFAL} s.listed_names={70245411} function s.cfilter(c) return c:IsFaceup() and c:IsCode(70245411) @@ -24,7 +24,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end function s.filter(c) - return c:IsSetCard(0xa9) and c:IsMonster() and c:IsAbleToRemove() + return c:IsSetCard(SET_FLUFFAL) and c:IsMonster() and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -50,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c72426662.lua b/official/c72426662.lua index bef840f377..53ecadcf4f 100644 --- a/official/c72426662.lua +++ b/official/c72426662.lua @@ -1,4 +1,5 @@ --終焉の王デミス +--Demise, King of Armageddon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72427512.lua b/official/c72427512.lua index fa25956d33..2a401bdd1f 100644 --- a/official/c72427512.lua +++ b/official/c72427512.lua @@ -1,9 +1,9 @@ --- 擬態する人喰い虫 --- Mimetizing Man-Eater Bug --- Scripted by Hatter +--擬態する人喰い虫 +--Mimicking Man-Eater Bug +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Flip + --Flip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) - -- Cannot be destroyed by battle with monsters of the same type + --Cannot be destroyed by battle with monsters of the same type local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetValue(1) c:RegisterEffect(e2) - -- Cannot be destroyed by effects of monsters of the same type + --Cannot be destroyed by effects of monsters of the same type local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetValue(s.efindes) @@ -39,17 +39,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.Destroy(tc,REASON_EFFECT)>0 and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsRelateToEffect(e) and c:IsFaceup() then - -- Gain target's original attack + --Gain target's original attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local tc_race=tc:GetOriginalRace() if not c:IsRace(tc_race) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() - -- Change race into target's original race + --Change race into target's original race local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RACE) e2:SetValue(tc_race) @@ -60,4 +60,4 @@ end function s.efindes(e,re) local tc=re:GetHandler() return tc and e:GetHandler():IsRace(tc:GetRace()) -end +end \ No newline at end of file diff --git a/official/c72429240.lua b/official/c72429240.lua index ab2664e354..a63ad70451 100644 --- a/official/c72429240.lua +++ b/official/c72429240.lua @@ -1,4 +1,5 @@ --ヴェルズ・オランタ +--Evilswarm O'lantern local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -29,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7243511.lua b/official/c7243511.lua index 800f4af2f2..9510e4d31c 100644 --- a/official/c7243511.lua +++ b/official/c7243511.lua @@ -1,4 +1,5 @@ --コアラッコアラ +--Koalo-Koala local s,id=GetID() function s.initial_effect(c) --fusion material @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72439556.lua b/official/c72439556.lua index 12f796d5c2..e51068a3cf 100644 --- a/official/c72439556.lua +++ b/official/c72439556.lua @@ -1,4 +1,5 @@ --ガスタの希望 カムイ +--Kamui, Hope of Gusto local s,id=GetID() function s.initial_effect(c) --flip @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.filter(c,e,tp) - return c:IsSetCard(0x10) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return true end @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72443568.lua b/official/c72443568.lua index 06c50ef28d..082e671ca6 100644 --- a/official/c72443568.lua +++ b/official/c72443568.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.LVnum=8 -s.LVset=0xe8 +s.LVset=SET_SILENT_MAGICIAN function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() -end + return te:IsSpellEffect() and te:GetOwnerPlayer()~=e:GetHandlerPlayer() +end \ No newline at end of file diff --git a/official/c72446038.lua b/official/c72446038.lua index 48921975a6..6f3a320da8 100644 --- a/official/c72446038.lua +++ b/official/c72446038.lua @@ -1,5 +1,6 @@ --合成魔術 +--Synthesis Spell local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,84385264) -end +end \ No newline at end of file diff --git a/official/c72453068.lua b/official/c72453068.lua index ee0f12daa3..aaa8b6eab7 100644 --- a/official/c72453068.lua +++ b/official/c72453068.lua @@ -1,5 +1,5 @@ --ロスライム ---Timewasting +--Loss Time --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -18,5 +18,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,Duel.GetLP(1-tp)-1000) -end - +end \ No newline at end of file diff --git a/official/c72490637.lua b/official/c72490637.lua index cf45fadd38..01555b65f9 100644 --- a/official/c72490637.lua +++ b/official/c72490637.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil):Filter(Card.IsType,nil,TYPE_PENDULUM) end return nil diff --git a/official/c72491806.lua b/official/c72491806.lua index fc17c8d472..9ddedd6bf8 100644 --- a/official/c72491806.lua +++ b/official/c72491806.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.tsop) c:RegisterEffect(e2) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -59,11 +59,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.thfilter(c,e,tp,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and c:IsAbleToHand() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_UA) and c:IsAbleToHand() and (ft>0 or c:GetSequence()<5) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) end function s.spfilter2(c,e,tp,code) - return c:IsSetCard(0xb2) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UA) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -85,4 +85,4 @@ function s.tsop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c72497366.lua b/official/c72497366.lua index f76bcbfbd7..4c7112f485 100644 --- a/official/c72497366.lua +++ b/official/c72497366.lua @@ -1,4 +1,5 @@ --悪魔の憑代 +--Sinister Yorishiro local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,10 +37,10 @@ end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() if chk==0 then return #eg==1 and tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) - and tc:IsRace(RACE_FIEND) and tc:IsLevelAbove(5) and tc:IsSummonType(SUMMON_TYPE_NORMAL) + and tc:IsRace(RACE_FIEND) and tc:IsLevelAbove(5) and tc:IsNormalSummoned() and not tc:IsReason(REASON_REPLACE) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c72498838.lua b/official/c72498838.lua index 97450bc6a2..1c6d4dc4e6 100644 --- a/official/c72498838.lua +++ b/official/c72498838.lua @@ -1,5 +1,5 @@ --結晶の大賢者サンドリヨン ---Magistus Verre Cendrillon +--Rilliona, the Magistus of Verre --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -24,14 +24,14 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.eqtg) e3:SetOperation(s.eqop) c:RegisterEffect(e3) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.schfilter(c) - return c:IsSetCard(0x152) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MAGISTUS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.tgfilter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(4) and c:IsFaceup() @@ -78,22 +78,22 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil) then local tg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil) if #tg>0 then - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN) end end end end function s.eqfilter(c) - return c:IsSetCard(0x152) and not c:IsLevel(4) and c:IsMonster() + return c:IsSetCard(SET_MAGISTUS) and not c:IsLevel(4) and c:IsMonster() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x152) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_MAGISTUS) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x152),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_MAGISTUS),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x152),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_MAGISTUS),tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -107,7 +107,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) ec:RegisterEffect(e1) @@ -115,4 +115,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c72502414.lua b/official/c72502414.lua index c13cce7009..3c7c97e292 100644 --- a/official/c72502414.lua +++ b/official/c72502414.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) and c:IsType(TYPE_XYZ) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c72520073.lua b/official/c72520073.lua index 6670e4596e..18e5650b35 100644 --- a/official/c72520073.lua +++ b/official/c72520073.lua @@ -1,4 +1,5 @@ --闇の芸術家 +--Dark Artist local s,id=GetID() function s.initial_effect(c) --defdown @@ -14,8 +15,8 @@ end function s.defcon(e) local c=e:GetHandler() local bc=c:GetBattleTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and c==Duel.GetAttackTarget() and bc:IsAttribute(ATTRIBUTE_LIGHT) + return Duel.IsPhase(PHASE_DAMAGE_CAL) and c==Duel.GetAttackTarget() and bc:IsAttribute(ATTRIBUTE_LIGHT) end function s.defval(e,c) return math.ceil(e:GetHandler():GetDefense()/2) -end +end \ No newline at end of file diff --git a/official/c72529749.lua b/official/c72529749.lua index 84a0b4703a..4c19e8b1b5 100644 --- a/official/c72529749.lua +++ b/official/c72529749.lua @@ -24,17 +24,17 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=aux.zptgroup(eg,nil,e:GetHandler()) local tg=g:Filter(Card.IsLocation,nil,LOCATION_MZONE) Duel.SetTargetCard(tg) - local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g2=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) g:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetTargetCards(e) - local g2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g2=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) g:Merge(g2) if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then local ct=Duel.GetOperatedGroup():FilterCount(Card.IsControler,nil,1-tp) Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72537897.lua b/official/c72537897.lua index 592150dfc8..1c41acfa16 100644 --- a/official/c72537897.lua +++ b/official/c72537897.lua @@ -35,16 +35,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local fid=c:GetFieldID() for tc in aux.Next(sg) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end sg:KeepAlive() @@ -68,7 +68,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -90,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72549351.lua b/official/c72549351.lua index 488aa7c49e..8a32b95edb 100644 --- a/official/c72549351.lua +++ b/official/c72549351.lua @@ -1,4 +1,5 @@ --ドラゴニック・タクティクス +--Dragonic Tactics local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72554862.lua b/official/c72554862.lua index 9711205015..81cc9e7a9d 100644 --- a/official/c72554862.lua +++ b/official/c72554862.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - local timing=TIMING_BATTLE_PHASE+TIMING_BATTLE_END+TIMING_ATTACK+TIMING_BATTLE_START+TIMING_DAMAGE_STEP + local timing=TIMING_BATTLE_PHASE|TIMING_BATTLE_END|TIMING_ATTACK|TIMING_BATTLE_START|TIMING_DAMAGE_STEP e2:SetHintTiming(timing,timing) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) @@ -34,7 +34,7 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} function s.checkfilter(c) return c and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) end @@ -42,10 +42,10 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsDamageCalculated() then return end local bc0,bc1=Duel.GetBattleMonster(0) if s.checkfilter(bc0) then - Duel.RegisterFlagEffect(bc0:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(bc0:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end if s.checkfilter(bc1) then - Duel.RegisterFlagEffect(bc1:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(bc1:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end function s.atkval(e,c) @@ -62,7 +62,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x161),tp,LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WAR_ROCK),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) @@ -73,14 +73,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if sc:IsRelateToEffect(e) then Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end - local atkg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x161),tp,LOCATION_MZONE,0,nil) + local atkg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_WAR_ROCK),tp,LOCATION_MZONE,0,nil) for tc in aux.Next(atkg) do --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(200) tc:RegisterEffect(e1) end @@ -91,7 +91,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e2:SetTarget(aux.TargetBoolFunction(Card.IsLevelBelow,5)) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,1),0) end \ No newline at end of file diff --git a/official/c72563071.lua b/official/c72563071.lua index bba141f754..55cfd631b3 100644 --- a/official/c72563071.lua +++ b/official/c72563071.lua @@ -1,4 +1,5 @@ --サイコ・ショックウェーブ +--Psychic Shockwave local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,14 +14,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return ep~=tp and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.cfilter(c) return c:IsSpellTrap() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:GetLevel()==6 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE) @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72566043.lua b/official/c72566043.lua index 57f59dbaf6..d415bb1a76 100644 --- a/official/c72566043.lua +++ b/official/c72566043.lua @@ -60,5 +60,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsSSetable() then Duel.SSet(tp,tc) end -end - +end \ No newline at end of file diff --git a/official/c72580321.lua b/official/c72580321.lua index cb84eb6efe..f61fcdf354 100644 --- a/official/c72580321.lua +++ b/official/c72580321.lua @@ -1,4 +1,5 @@ --ブロック・ゴーレム +--Block Golem local s,id=GetID() function s.initial_effect(c) --spsummon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -22,10 +23,6 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_GRAVE,0,nil) return #g>0 and not g:IsExists(s.cfilter,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsLevelBelow(4) and not c:IsCode(id) and c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -48,9 +45,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c72589042.lua b/official/c72589042.lua index 59829f7576..dd939bed9b 100644 --- a/official/c72589042.lua +++ b/official/c72589042.lua @@ -10,18 +10,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_ONFIELD+LOCATION_HAND,0,e:GetHandler())==0 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) + return Duel.GetAttacker():IsControler(1-tp) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_ONFIELD|LOCATION_HAND,0,e:GetHandler())==0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) @@ -29,15 +24,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end -function s.filter(c,e,tp) +function s.spfilter(c,e,tp) return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) if #sg>0 and Duel.Destroy(sg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.BreakEffect() Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72621670.lua b/official/c72621670.lua index dca6e9a46c..4bb010f0a9 100644 --- a/official/c72621670.lua +++ b/official/c72621670.lua @@ -1,4 +1,5 @@ --ダブルマジックアームバインド +--Double Magical Arm Bind local s,id=GetID() function s.initial_effect(c) --activate @@ -39,6 +40,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.tfilter,nil,e) if #g<2 then return end local rct=1 - if Duel.GetTurnPlayer()~=tp then rct=2 end + if Duel.IsTurnPlayer(1-tp) then rct=2 end Duel.GetControl(g,tp,PHASE_END,rct) -end +end \ No newline at end of file diff --git a/official/c72630549.lua b/official/c72630549.lua index fa078dae00..465276e509 100644 --- a/official/c72630549.lua +++ b/official/c72630549.lua @@ -1,4 +1,5 @@ --カオス・マジシャン +--Chaos Command Magician local s,id=GetID() function s.initial_effect(c) --disable @@ -29,4 +30,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if g:GetFirst()==e:GetHandler() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c72634965.lua b/official/c72634965.lua index c1b90c2b11..04dce2a5ed 100644 --- a/official/c72634965.lua +++ b/official/c72634965.lua @@ -1,4 +1,5 @@ --虚無の統括者 +--Vanity's Ruler local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -16,4 +17,4 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(0,1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c72648577.lua b/official/c72648577.lua index ae3940c298..914c24db39 100644 --- a/official/c72648577.lua +++ b/official/c72648577.lua @@ -11,26 +11,26 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.filter(c) - return c:IsSetCard(0xaf) and (c:IsMonster() or c:IsLocation(LOCATION_PZONE)) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToDeck() + return c:IsSetCard(SET_DD) and (c:IsMonster() or c:IsLocation(LOCATION_PZONE)) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToDeck() end function s.thfilter(c) - return c:IsSetCard(0xaf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_PZONE+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_MZONE+LOCATION_PZONE+LOCATION_GRAVE+LOCATION_HAND) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_PZONE|LOCATION_GRAVE|LOCATION_HAND,0,3,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_MZONE|LOCATION_PZONE|LOCATION_GRAVE|LOCATION_HAND) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_MZONE+LOCATION_PZONE+LOCATION_GRAVE+LOCATION_HAND,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_MZONE|LOCATION_PZONE|LOCATION_GRAVE|LOCATION_HAND,0,nil) if #g<3 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,3,3,nil) local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND) Duel.ConfirmCards(1-tp,cg) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) local dg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) if #dg>1 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(tp) end end -end +end \ No newline at end of file diff --git a/official/c7264861.lua b/official/c7264861.lua index 3e5fab4eac..d203e762aa 100644 --- a/official/c7264861.lua +++ b/official/c7264861.lua @@ -1,4 +1,5 @@ --インフェルニティ・ビースト +--Infernity Beast local s,id=GetID() function s.initial_effect(c) --actlimit @@ -17,4 +18,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c72648810.lua b/official/c72648810.lua index 422bf9325d..636ccace63 100644 --- a/official/c72648810.lua +++ b/official/c72648810.lua @@ -1,5 +1,5 @@ --揺るがぬ絆 ---Unawering Bound +--Unwavering Bond local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c72657739.lua b/official/c72657739.lua index d754839bda..87a9535456 100644 --- a/official/c72657739.lua +++ b/official/c72657739.lua @@ -1,4 +1,5 @@ --怨念のキラードール +--Malice Doll of Demise local s,id=GetID() function s.initial_effect(c) --register @@ -16,18 +17,18 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72664875.lua b/official/c72664875.lua index 0bbf5aeda1..4ea8dda1da 100644 --- a/official/c72664875.lua +++ b/official/c72664875.lua @@ -51,7 +51,7 @@ function s.initial_effect(c) e5:SetOperation(s.damop) c:RegisterEffect(e5) end -s.material_setcode=0xe3 +s.material_setcode=SET_CUBIC function s.hvop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2)) end @@ -65,7 +65,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -80,4 +80,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72677437.lua b/official/c72677437.lua index 8657c73a6d..33f0ae279f 100644 --- a/official/c72677437.lua +++ b/official/c72677437.lua @@ -1,4 +1,5 @@ --毒蛇王ヴェノミノン +--Vennominon the King of Poisonous Snakes local s,id=GetID() function s.initial_effect(c) --spsummon condition @@ -50,9 +51,9 @@ function s.cfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,te) return te:GetHandler():IsCode(54306223) -end +end \ No newline at end of file diff --git a/official/c7268133.lua b/official/c7268133.lua index 559ef79157..c7952e4509 100644 --- a/official/c7268133.lua +++ b/official/c7268133.lua @@ -1,4 +1,5 @@ --EMライフ・ソードマン +--Performapal Life Swordsman local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -38,15 +39,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -60,6 +57,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c72700231.lua b/official/c72700231.lua index d1b700bd95..8a709da9ea 100644 --- a/official/c72700231.lua +++ b/official/c72700231.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -26,9 +26,9 @@ function s.initial_effect(c) aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter) end s.listed_names={id} -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x121) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_MAYAKASHI) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -59,8 +59,8 @@ function s.tgfilter(c) return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave() end function s.sslimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end \ No newline at end of file diff --git a/official/c72705654.lua b/official/c72705654.lua index efae913c3a..f86b321e39 100644 --- a/official/c72705654.lua +++ b/official/c72705654.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.dsptg) e2:SetOperation(s.dspop) c:RegisterEffect(e2) diff --git a/official/c72708264.lua b/official/c72708264.lua index 17eb141605..19f84567b9 100644 --- a/official/c72708264.lua +++ b/official/c72708264.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.copyop) c:RegisterEffect(e1) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.copycon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN) end function s.costfilter(c) - return c:IsSetCard(0x99) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ODD_EYES) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end @@ -34,8 +34,7 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c72709014.lua b/official/c72709014.lua index 746888160a..5bae83484e 100644 --- a/official/c72709014.lua +++ b/official/c72709014.lua @@ -34,7 +34,7 @@ function s.regfilter(c,ec) end function s.regop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.regfilter,1,nil,e:GetHandler():GetEquipTarget()) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -52,17 +52,17 @@ function s.spfilter(c,e,tp,code) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,e:GetHandler():GetEquipTarget():GetCode()) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,e:GetHandler():GetEquipTarget():GetCode()) end local code=e:GetLabel() e:SetLabel(0) Duel.SetTargetParam(code) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,code) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,code) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) g:GetFirst():CompleteProcedure() diff --git a/official/c72710085.lua b/official/c72710085.lua index ff19f9d4c7..1d1e90353d 100644 --- a/official/c72710085.lua +++ b/official/c72710085.lua @@ -1,4 +1,5 @@ --星邪の神喰 +--Jewels of the Valiant local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -39,4 +40,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72714226.lua b/official/c72714226.lua index 2f84b1739d..8f147e83d2 100644 --- a/official/c72714226.lua +++ b/official/c72714226.lua @@ -1,4 +1,5 @@ --アサルト・ガンドッグ +--Assault Dog local s,id=GetID() function s.initial_effect(c) --special summon @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #sg > 0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72714392.lua b/official/c72714392.lua index f4ba9b00b1..f291078025 100644 --- a/official/c72714392.lua +++ b/official/c72714392.lua @@ -1,4 +1,5 @@ --BF-大旆のヴァーユ +--Blackwing - Vayu the Emblem of Honor local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,18 +21,18 @@ function s.initial_effect(c) e2:SetValue(aux.TRUE) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c,e,tp) local lv=c:GetLevel() - return lv>0 and c:IsSetCard(0x33) and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() + return lv>0 and c:IsSetCard(SET_BLACKWING) and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_EXTRA,0,1,nil,lv+1,e,tp) end function s.exfilter(c,lv,e,tp) - return c:IsSetCard(0x33) and c:GetLevel()==lv and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLACKWING) and c:GetLevel()==lv and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end - if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) and e:GetHandler():IsAbleToRemove() and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -52,13 +53,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c72714461.lua b/official/c72714461.lua index f7644b0137..3c88739eda 100644 --- a/official/c72714461.lua +++ b/official/c72714461.lua @@ -1,4 +1,5 @@ --慧眼の魔術師 +--Wisdom-Eye Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -18,21 +19,21 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(s.sccost) + e3:SetCost(Cost.SelfDiscard) e3:SetTarget(s.sctg) e3:SetOperation(s.scop) c:RegisterEffect(e3) end -s.listed_series={0x98,0x9f} +s.listed_series={SET_MAGICIAN,SET_PERFORMAPAL} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0x98) or c:IsSetCard(0x9f) + return c:IsSetCard(SET_MAGICIAN) or c:IsSetCard(SET_PERFORMAPAL) end function s.pencon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler()) end function s.penfilter(c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() + return c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and not c:IsForbidden() end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_DECK,0,1,nil) end @@ -49,10 +50,6 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) end end end -function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST) -end function s.scfilter(c) return c:GetLeftScale()~=c:GetOriginalLeftScale() end @@ -69,11 +66,11 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(tc:GetOriginalLeftScale()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) e2:SetValue(tc:GetOriginalRightScale()) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c72767833.lua b/official/c72767833.lua index fd82cdffc1..c51e8a5aa0 100644 --- a/official/c72767833.lua +++ b/official/c72767833.lua @@ -1,4 +1,5 @@ --カード・フリッパー +--Card Rotator local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c72772445.lua b/official/c72772445.lua index 77a43ec5d3..c4728ca7d5 100644 --- a/official/c72772445.lua +++ b/official/c72772445.lua @@ -38,9 +38,9 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xe2} +s.listed_series={SET_TRIAMID} function s.actfilter(c,tp) - return c and c:IsFaceup() and c:IsSetCard(0xe2) and c:IsMonster() and c:IsControler(tp) + return c and c:IsFaceup() and c:IsSetCard(SET_TRIAMID) and c:IsMonster() and c:IsControler(tp) end function s.actcon(e) local tp=e:GetHandlerPlayer() @@ -51,7 +51,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_FZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRIAMID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c72776252.lua b/official/c72776252.lua index 2fa1712950..b977e18d0a 100644 --- a/official/c72776252.lua +++ b/official/c72776252.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.rmcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) diff --git a/official/c72813401.lua b/official/c72813401.lua index a4c661b82a..c942d00c09 100644 --- a/official/c72813401.lua +++ b/official/c72813401.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.nsfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSummonable(true,nil) end @@ -49,7 +49,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -61,7 +61,7 @@ function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end function s.filter(c) - return c:IsSetCard(0x2016) and c:IsMonster() and c:IsLevelAbove(1) and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsLevelAbove(1) and c:IsAbleToHand() end function s.rescon(lv) return function(sg,e,tp,mg) diff --git a/official/c72819261.lua b/official/c72819261.lua index 4b651083ea..9d4adec0a9 100644 --- a/official/c72819261.lua +++ b/official/c72819261.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x400d,0x113} +s.listed_series={SET_ELEMENTSABER,SET_ELEMENTAL_LORD} function s.costfilter(c,tp) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,c) end function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -35,7 +35,7 @@ function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) fg:AddCard(pe:GetHandler()) end local loc=LOCATION_HAND - if #fg>0 then loc=LOCATION_HAND+LOCATION_DECK end + if #fg>0 then loc=LOCATION_HAND|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil,tp):GetFirst() @@ -47,12 +47,12 @@ function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) fc=fg:Select(tp,1,1,nil) end Duel.Hint(HINT_CARD,0,fc:GetCode()) - fc:RegisterFlagEffect(61557074,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + fc:RegisterFlagEffect(61557074,RESETS_STANDARD_PHASE_END,0,0) end Duel.SendtoGrave(tc,REASON_COST) end function s.filter(c) - return (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGrave() + return (c:IsSetCard(SET_ELEMENTSABER) or c:IsSetCard(SET_ELEMENTAL_LORD)) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGrave() end function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -81,6 +81,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c72837335.lua b/official/c72837335.lua index 9b7145f1bb..adafa18751 100644 --- a/official/c72837335.lua +++ b/official/c72837335.lua @@ -1,4 +1,5 @@ --先史遺産ゴルディアス・ユナイト +--Chronomaly Gordian Knot local s,id=GetID() function s.initial_effect(c) --spsummon @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.filter(c,e,tp) - return c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CHRONOMALY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,8 +33,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(g:GetFirst():GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c72843899.lua b/official/c72843899.lua index 65d0e27850..f38e5bc903 100644 --- a/official/c72843899.lua +++ b/official/c72843899.lua @@ -62,5 +62,5 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end \ No newline at end of file diff --git a/official/c72845813.lua b/official/c72845813.lua index 289ddfe85e..c7e8d7c37d 100644 --- a/official/c72845813.lua +++ b/official/c72845813.lua @@ -1,4 +1,5 @@ --A・O・J D.D.チェッカー +--Ally of Justice Quarantine local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -10,4 +11,4 @@ function s.initial_effect(c) e1:SetTargetRange(1,1) e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c72855441.lua b/official/c72855441.lua index db069bf024..5bb898936e 100644 --- a/official/c72855441.lua +++ b/official/c72855441.lua @@ -1,4 +1,5 @@ --青き眼の護人 +--Protector with Eyes of Blue local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.gvop) c:RegisterEffect(e2) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} function s.spfilter1(c,e,tp) return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -41,7 +42,7 @@ function s.gvfilter(c,ft) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave() and (ft>0 or c:GetSequence()<5) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLUE_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -66,4 +67,4 @@ function s.gvop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c72859417.lua b/official/c72859417.lua index 25ad15c91b..b7e67e466a 100644 --- a/official/c72859417.lua +++ b/official/c72859417.lua @@ -69,4 +69,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72860663.lua b/official/c72860663.lua index a5b507cae1..a7a13aa308 100644 --- a/official/c72860663.lua +++ b/official/c72860663.lua @@ -1,12 +1,12 @@ --- ヴァンパイア・ファシネイター --- Vampire Fascinator --- Scripted by Hatter +--ヴァンパイア・ファシネイター +--Vampire Fascinator +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2+ monsters, including a Zombie monster + --2+ monsters, including a Zombie monster Link.AddProcedure(c,nil,2,3,s.lcheck) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,11 +14,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e)return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)end) + e1:SetCondition(function(e)return e:GetHandler():IsLinkSummoned()end) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Take control + --Take control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_CONTROL) @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end - -- Cannot Special Summon non-Zombie monsters + --Cannot Special Summon non-Zombie monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) diff --git a/official/c72869010.lua b/official/c72869010.lua index 6d24968e5c..3d32b92e18 100644 --- a/official/c72869010.lua +++ b/official/c72869010.lua @@ -1,7 +1,8 @@ --ソウル・ハンター +--Soul Hunter local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,99510761,28450915) -end +end \ No newline at end of file diff --git a/official/c72881007.lua b/official/c72881007.lua index a5fe3e4c9f..7c14023166 100644 --- a/official/c72881007.lua +++ b/official/c72881007.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToGraveAsCost() and c:GetSequence()<5 end function s.rescon(sg,e,tp,mg) return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,sg+e:GetHandler()) @@ -44,7 +44,7 @@ function s.ctfilter(c,tp) return c:IsPreviousControler(1-tp) and c:IsLocation(LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,0,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) @@ -61,4 +61,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c72883039.lua b/official/c72883039.lua index dc227b2aac..561915c38e 100644 --- a/official/c72883039.lua +++ b/official/c72883039.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetRange(LOCATION_SZONE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4a)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TIMELORD)) e3:SetValue(1) c:RegisterEffect(e3) --cannot to deck @@ -35,7 +35,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_CANNOT_TO_DECK) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x4a)) + e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TIMELORD)) c:RegisterEffect(e4) --spsummon local e5=Effect.CreateEffect(c) @@ -50,7 +50,7 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x4a} +s.listed_series={SET_TIMELORD} s.listed_names={36894320} function s.acfilter(c) return c:IsFaceup() and c:IsCode(36894320) and c:IsAbleToGraveAsCost() @@ -79,10 +79,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x4a) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_TIMELORD) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.spcheck(sg,e,tp,mg) local ct1=sg:GetClassCount(Card.GetCode) @@ -91,17 +91,16 @@ function s.spcheck(sg,e,tp,mg) return ct1==ct3 and ct2==ct3,ct1~=ct3 or ct2~=ct3 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft==0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if #sg==0 then return end local rg=aux.SelectUnselectGroup(sg,e,tp,1,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(rg,0,tp,tp,true,false,POS_FACEUP) -end - +end \ No newline at end of file diff --git a/official/c72885174.lua b/official/c72885174.lua index 4fcf006762..fc0f7208e1 100644 --- a/official/c72885174.lua +++ b/official/c72885174.lua @@ -1,4 +1,5 @@ --フォーチュン・スリップ +--Slip of Fortune local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget() + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -29,11 +30,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() local a=Duel.GetAttacker() local tc=Duel.GetAttackTarget() - if a:IsRelateToEffect(e) and a:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if a:IsRelateToEffect(e) and a:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c72892473.lua b/official/c72892473.lua index 0a69fbad6e..5fbd8d7ef4 100644 --- a/official/c72892473.lua +++ b/official/c72892473.lua @@ -1,4 +1,5 @@ --手札抹殺 +--Card Destruction local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,8 +25,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) Duel.BreakEffect() Duel.Draw(tp,h1,REASON_EFFECT) Duel.Draw(1-tp,h2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c72896720.lua b/official/c72896720.lua index 7538818b82..5f75248fcf 100644 --- a/official/c72896720.lua +++ b/official/c72896720.lua @@ -1,6 +1,5 @@ --インフェルニティ・デス・ドラゴン --Infernity Doom Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -32,7 +31,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c72903645.lua b/official/c72903645.lua index 92b49b236b..44f157f340 100644 --- a/official/c72903645.lua +++ b/official/c72903645.lua @@ -1,4 +1,5 @@ --マグナ・スラッシュドラゴン +--Magna-Slash Dragon local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsContinuousSpell() and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -23,7 +24,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -37,4 +38,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72913666.lua b/official/c72913666.lua index f74f2ba594..af989bc293 100644 --- a/official/c72913666.lua +++ b/official/c72913666.lua @@ -1,4 +1,5 @@ --ゴーストリック・ワーウルフ +--Ghostrick Warwolf local s,id=GetID() function s.initial_effect(c) --summon limit @@ -27,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -37,7 +38,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +58,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Damage(p,ct*100,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7291576.lua b/official/c7291576.lua index d0045b6b05..0c0979fbf2 100644 --- a/official/c7291576.lua +++ b/official/c7291576.lua @@ -53,5 +53,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c72926163.lua b/official/c72926163.lua index eccb550a5c..4887dd334c 100644 --- a/official/c72926163.lua +++ b/official/c72926163.lua @@ -1,4 +1,5 @@ --E・HERO ネオス・ナイト +--Elemental HERO Neos Knight local s,id=GetID() function s.initial_effect(c) --fusion material @@ -37,7 +38,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS} function s.valcheck(e,c) local g=c:GetMaterial() local atk=0 @@ -49,7 +50,7 @@ function s.valcheck(e,c) e:SetLabel(atk) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,7 +60,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c72932673.lua b/official/c72932673.lua index 8bc8f533be..6f1cf8ceb7 100644 --- a/official/c72932673.lua +++ b/official/c72932673.lua @@ -1,7 +1,8 @@ --アビスケイル-ミヅチ +--Abyss-scale of the Mizuchi local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x74)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_MERMAIL)) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -17,14 +18,14 @@ function s.initial_effect(c) e4:SetOperation(s.negop) c:RegisterEffect(e4) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.negcon(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return rp~=tp and (loc&LOCATION_SZONE)~=0 - and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev) + and re:IsSpellEffect() and Duel.IsChainDisablable(ev) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72957245.lua b/official/c72957245.lua index 2dfc83d998..e4989b9fe3 100644 --- a/official/c72957245.lua +++ b/official/c72957245.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end --Part of "Adamacia" archetype -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} --Check for rock monster function s.filter(c,e,tp) return c:IsRace(RACE_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then local dc=Duel.GetOperatedGroup():GetFirst() - if dc:IsSetCard(0x140) and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK,0,1,nil) + if dc:IsSetCard(SET_ADAMANCIPATOR) and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_DECK,0,1,1,nil) @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c72959823.lua b/official/c72959823.lua index 3a2ab63ffd..b571a4ad98 100644 --- a/official/c72959823.lua +++ b/official/c72959823.lua @@ -1,4 +1,5 @@ --重装機甲 パンツァードラゴン +--Panzer Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c72971064.lua b/official/c72971064.lua index b249558a52..20b6cecedf 100644 --- a/official/c72971064.lua +++ b/official/c72971064.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.retopthcon) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.retopthtg) e2:SetOperation(s.retopthop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -50,8 +50,8 @@ function s.retopthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return eg:IsContains(chkc) and s.retopthfilter(chkc,e,tp) end if chk==0 then return eg:IsExists(s.retopthfilter,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local tc=nil - if #eg==1 then + local tc=nil + if #eg==1 then tc=eg:GetFirst() Duel.SetTargetCard(tc) else @@ -83,8 +83,8 @@ function s.llthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.llthop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c72989439.lua b/official/c72989439.lua index f94fb68c04..0ae79a9f67 100644 --- a/official/c72989439.lua +++ b/official/c72989439.lua @@ -1,6 +1,5 @@ --カオス・ソルジャー -開闢の使者- --Black Luster Soldier - Envoy of the Beginning - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -49,8 +48,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,7 +58,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -83,12 +82,12 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsAbleToRemove() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) diff --git a/official/c72992744.lua b/official/c72992744.lua index d3095b2980..6dcaafabde 100644 --- a/official/c72992744.lua +++ b/official/c72992744.lua @@ -1,4 +1,5 @@ --ジェスター・ロード +--Jester Lord local s,id=GetID() function s.initial_effect(c) -- @@ -19,4 +20,4 @@ function s.filter(c) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.filter,0,LOCATION_SZONE,LOCATION_SZONE,nil)*1000 -end +end \ No newline at end of file diff --git a/official/c73001017.lua b/official/c73001017.lua index 8306249f63..3c5f6b2280 100644 --- a/official/c73001017.lua +++ b/official/c73001017.lua @@ -31,14 +31,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -64,5 +64,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c73018302.lua b/official/c73018302.lua index e531e682ef..dcfe9c9ed1 100644 --- a/official/c73018302.lua +++ b/official/c73018302.lua @@ -1,4 +1,5 @@ --黒羽を狩る者 +--Hunter of Black Feathers local s,id=GetID() function s.initial_effect(c) --destroy @@ -43,4 +44,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) and s.check(tp) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73026394.lua b/official/c73026394.lua index 82015b4bcd..5324783353 100644 --- a/official/c73026394.lua +++ b/official/c73026394.lua @@ -1,4 +1,5 @@ --フュージョン・ガード +--Fusion Guard local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ex=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) - return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return ex and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.filter(c) return c:IsType(TYPE_FUSION) and c:IsAbleToGrave() @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73040500.lua b/official/c73040500.lua index 31b0bcaa69..395e032023 100644 --- a/official/c73040500.lua +++ b/official/c73040500.lua @@ -1,4 +1,5 @@ --魔轟神ウルストス +--Fabled Urustos local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetValue(400) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.con(e) return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)<=2 end function s.tg(e,c) - return c:IsFaceup() and c:IsSetCard(0x35) -end + return c:IsFaceup() and c:IsSetCard(SET_FABLED) +end \ No newline at end of file diff --git a/official/c7304544.lua b/official/c7304544.lua index 3b3b4e2abc..d14d5471b5 100644 --- a/official/c7304544.lua +++ b/official/c7304544.lua @@ -1,4 +1,5 @@ --ナチュル・パイナポー +--Naturia Pineapple local s,id=GetID() function s.initial_effect(c) --Change race @@ -14,7 +15,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1) e2:SetCondition(s.condition) @@ -23,10 +24,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:IsCode(id) and c:IsFaceup()) + return c:IsSpellTrap() or (c:IsCode(id) and c:IsFaceup()) end function s.filter2(c) - return c:IsMonster() and not c:IsRace(RACE_PLANT+RACE_BEAST) + return c:IsMonster() and not c:IsRace(RACE_PLANT|RACE_BEAST) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and not Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_GRAVE,0,1,nil) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c73046708.lua b/official/c73046708.lua index d57ef37417..80ed9805ff 100644 --- a/official/c73046708.lua +++ b/official/c73046708.lua @@ -66,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetRange(LOCATION_SZONE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.SelfToGrave) e3:SetOperation(function() Duel.ChainAttack() end) e3:SetReset(RESET_EVENT|RESETS_STANDARD) eqc:RegisterEffect(e3) @@ -75,9 +75,4 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler():GetEquipTarget() return ec==Duel.GetAttacker() and ec:CanChainAttack() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) end \ No newline at end of file diff --git a/official/c73048641.lua b/official/c73048641.lua index 007b45b902..5bcea5fa69 100644 --- a/official/c73048641.lua +++ b/official/c73048641.lua @@ -1,6 +1,5 @@ --ハーフ・シャット --Half Shut - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot be destroyed by battle, also halve its ATK @@ -10,14 +9,11 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -32,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk/2) tc:RegisterEffect(e1) --Cannot be destroyed by battle @@ -41,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) tc:RegisterEffect(e2) end diff --git a/official/c7305060.lua b/official/c7305060.lua index 86626670f8..84ebf34357 100644 --- a/official/c7305060.lua +++ b/official/c7305060.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.descon) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -43,12 +43,12 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -61,16 +61,16 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) - and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id)~=0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) + and (e:GetHandler():IsPendulumSummoned() or e:GetHandler():GetFlagEffect(id)~=0) end function s.limcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.limval(e,re,rp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_TRAP) and not rc:IsSetCard(0xe0) and not rc:IsImmuneToEffect(e) + return re:IsTrapEffect() and not rc:IsSetCard(SET_AMORPHAGE) and not rc:IsImmuneToEffect(e) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) + return not c:IsOriginalSetCard(SET_AMORPHAGE) end \ No newline at end of file diff --git a/official/c73079365.lua b/official/c73079365.lua index d8a7bc7e35..97abfdf1c7 100644 --- a/official/c73079365.lua +++ b/official/c73079365.lua @@ -1,4 +1,5 @@ --突風 +--Gust local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,13 +15,13 @@ function s.initial_effect(c) end function s.filter(c,tp) return c:IsSpell() and c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousControler(tp) - and (c:GetReason()&0x41)==0x41 + and (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and eg:IsExists(s.filter,1,nil,tp) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) and chkc~=e:GetHandler() end @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73079836.lua b/official/c73079836.lua index 8e51f289e2..69e094b639 100644 --- a/official/c73079836.lua +++ b/official/c73079836.lua @@ -24,14 +24,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.rmcon) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) @@ -64,10 +64,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c73082255.lua b/official/c73082255.lua index 88099a2df3..0ba0fd6fd9 100644 --- a/official/c73082255.lua +++ b/official/c73082255.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.gytg) e3:SetOperation(s.gyop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -50,7 +50,7 @@ function s.tgval(e,re,rp) local rc=re:GetHandler() local loc=re:GetActivateLocation() return re:IsMonsterEffect() and loc==LOCATION_MZONE and not rc:IsSummonLocation(LOCATION_GRAVE) - and rc:IsSummonType(SUMMON_TYPE_SPECIAL) + and rc:IsSpecialSummoned() end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,4) and Duel.IsPlayerCanDiscardDeck(1-tp,4) end diff --git a/official/c73125233.lua b/official/c73125233.lua index 3cf7fe8c59..ebdb814c63 100644 --- a/official/c73125233.lua +++ b/official/c73125233.lua @@ -1,4 +1,5 @@ --風帝ライザー +--Raiza the Storm Monarch local s,id=GetID() function s.initial_effect(c) --to deck @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -29,6 +30,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73130445.lua b/official/c73130445.lua index 49a8123591..0d6d70408a 100644 --- a/official/c73130445.lua +++ b/official/c73130445.lua @@ -1,4 +1,5 @@ --EMリザードロー +--Performapal Lizardraw local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -25,10 +26,10 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} s.listed_names={id} function s.desfilter(c) - return c:IsSetCard(0x9f) and not c:IsCode(id) + return c:IsSetCard(SET_PERFORMAPAL) and not c:IsCode(id) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -50,7 +51,7 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil) @@ -60,4 +61,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil) Duel.Draw(tp,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73134081.lua b/official/c73134081.lua index 4300f1f7f1..d9e976c4e5 100644 --- a/official/c73134081.lua +++ b/official/c73134081.lua @@ -1,4 +1,5 @@ --火あぶりの刑 +--Final Flame local s,id=GetID() function s.initial_effect(c) --damage @@ -20,4 +21,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73134082.lua b/official/c73134082.lua deleted file mode 100644 index 1ef6157219..0000000000 --- a/official/c73134082.lua +++ /dev/null @@ -1,23 +0,0 @@ ---火あぶりの刑(EU) -local s,id=GetID() -function s.initial_effect(c) - --damage - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.damtg) - e1:SetOperation(s.damop) - c:RegisterEffect(e1) -end -function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(1-tp) - Duel.SetTargetParam(600) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,600) -end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Damage(p,d,REASON_EFFECT) -end diff --git a/official/c73136204.lua b/official/c73136204.lua index 8b2043cac7..bef6d588d0 100644 --- a/official/c73136204.lua +++ b/official/c73136204.lua @@ -66,7 +66,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) local og=Duel.GetOperatedGroup() local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK) if ct==0 then return end diff --git a/official/c73146473.lua b/official/c73146473.lua index f089b7c42c..a926b0a623 100644 --- a/official/c73146473.lua +++ b/official/c73146473.lua @@ -1,4 +1,5 @@ --クロス・ポーター +--Cross Porter local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,12 +22,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1f} +s.listed_series={SET_NEO_SPACIAN} function s.cfilter(c,ft) return ft>0 or c:GetSequence()<5 end function s.filter(c,e,tp) - return c:IsSetCard(0x1f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -50,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.sfilter(c) - return c:IsSetCard(0x1f) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73148972.lua b/official/c73148972.lua index 39e42f46c6..3f48c49973 100644 --- a/official/c73148972.lua +++ b/official/c73148972.lua @@ -26,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73167098.lua b/official/c73167098.lua index 8eb85dbb15..7482589955 100644 --- a/official/c73167098.lua +++ b/official/c73167098.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.rmcost) + e2:SetCost(Cost.PayLP(2000)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) @@ -48,10 +48,6 @@ function s.indcon(e) local tp=e:GetHandlerPlayer() return Duel.GetLP(tp)> Duel.GetLP(1-tp) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsCode,{28265983,92266279,15177750}),tp,LOCATION_ONFIELD,0,nil) if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,nil) end diff --git a/official/c73176465.lua b/official/c73176465.lua index 01c3ed786a..9d699e7563 100644 --- a/official/c73176465.lua +++ b/official/c73176465.lua @@ -1,4 +1,5 @@ --ライトロード・アーチャー フェリス +--Felis, Lightsworn Archer local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.descost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -35,7 +36,7 @@ function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end function s.condtion(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_EFFECT)~=0 and re:IsActiveType(TYPE_MONSTER) + return (r&REASON_EFFECT)~=0 and re:IsMonsterEffect() and e:GetHandler():IsPreviousLocation(LOCATION_DECK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -47,10 +48,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) @@ -66,4 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardDeck(tp,3,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73178098.lua b/official/c73178098.lua index 31f3858e50..78fb24423c 100644 --- a/official/c73178098.lua +++ b/official/c73178098.lua @@ -1,4 +1,5 @@ --虚栄巨影 +--Ego Boost local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,8 +24,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) e1:SetValue(1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c73192600.lua b/official/c73192600.lua index 9a4f1d91cf..b3215025eb 100644 --- a/official/c73192600.lua +++ b/official/c73192600.lua @@ -1,5 +1,5 @@ --星遺物の対焉 ---World Legacy Finality +--World Legacy Cliffhanger --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -22,12 +22,12 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) if chk==0 then return #g>0 end Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end @@ -38,10 +38,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,tp,sumtp,sumpos) return sumtp & SUMMON_TYPE_LINK == SUMMON_TYPE_LINK -end - +end \ No newline at end of file diff --git a/official/c73193552.lua b/official/c73193552.lua index 5c0da1fcfc..e5259d87ec 100644 --- a/official/c73193552.lua +++ b/official/c73193552.lua @@ -1,5 +1,5 @@ --革命の御旗 ---Revered Banner of the Revolution +--Pennant of Revolution --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -46,7 +46,7 @@ function s.initial_effect(c) end s.listed_names={72022087} function s.thcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -56,13 +56,13 @@ function s.thfilter(c) return c:IsCode(72022087) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -115,5 +115,5 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) Duel.HintSelection(g) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(g,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c73199638.lua b/official/c73199638.lua index 27cdc2c3d1..f39c01caf4 100644 --- a/official/c73199638.lua +++ b/official/c73199638.lua @@ -1,4 +1,5 @@ --海皇の咆哮 +--Call of the Atlanteans local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.sumlimit) @@ -51,4 +52,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if ft<=2 then return end if g:FilterCount(s.rfilter,nil,e,tp)~=3 then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c7320132.lua b/official/c7320132.lua index 96d6f464a4..a1762588b2 100644 --- a/official/c7320132.lua +++ b/official/c7320132.lua @@ -20,14 +20,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x42,0x4b} +s.listed_series={SET_NORDIC,SET_AESIR} function s.spfilter(c,e,tp) - return c:IsSetCard(0x42) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NORDIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -40,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local c=e:GetHandler() - -- Cannot Special Summon non-Aesir monsters from Extra Deck + --Cannot Special Summon non-Aesir monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) @@ -48,18 +48,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetAbsoluteRange(tp,1,0) - e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x4b) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AESIR) end) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) - -- Lizard check - local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return c:IsOriginalSetCard(0x4b) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + --Lizard check + local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return c:IsOriginalSetCard(SET_AESIR) end) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end function s.thfilter(c) - return c:IsSetCard(0x42) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NORDIC) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c73206827.lua b/official/c73206827.lua index dbf9918e8a..1d24c7d8f8 100644 --- a/official/c73206827.lua +++ b/official/c73206827.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_COIN) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c73213494.lua b/official/c73213494.lua index 28715353c0..5e3c546606 100644 --- a/official/c73213494.lua +++ b/official/c73213494.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 ハックルスパー +--Calcab, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -32,15 +33,15 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -70,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73218989.lua b/official/c73218989.lua index b610571437..58df072153 100644 --- a/official/c73218989.lua +++ b/official/c73218989.lua @@ -47,7 +47,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER_E) + e4:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e4:SetCondition(s.descon) e4:SetCost(s.descost) e4:SetTarget(s.destg) @@ -74,15 +74,15 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) - local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,tp) + local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) + local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil,tp) local g=g1:Clone() g:Merge(g2) return #g1>0 and #g2>0 and aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) - local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local g1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) + local g2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local rg=g1:Clone() rg:Merge(g2) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) @@ -102,7 +102,7 @@ end --counter and damage function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and c:GetFlagEffect(1)~=0 + return ep==1-tp and re:IsMonsterEffect() and c:GetFlagEffect(1)~=0 end function s.damop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -130,4 +130,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73219648.lua b/official/c73219648.lua index a8595293c1..07722561ad 100644 --- a/official/c73219648.lua +++ b/official/c73219648.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c73239437.lua b/official/c73239437.lua index 60b4fcaf68..741b514bcb 100644 --- a/official/c73239437.lua +++ b/official/c73239437.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x8} +s.listed_series={SET_HERO} s.listed_names={CARD_NEOS } function s.spcfilter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:ListsCodeAsMaterial(CARD_NEOS) @@ -23,7 +23,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x8) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c73240432.lua b/official/c73240432.lua index 0d38fa5c63..c5844ef6d7 100644 --- a/official/c73240432.lua +++ b/official/c73240432.lua @@ -1,4 +1,5 @@ --エッジインプ・コットン・イーター +--Edge Imp Cotton Eater local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -37,10 +38,10 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0xad) and c:IsType(TYPE_FUSION) - and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsControler(tp) and c:IsSetCard(SET_FRIGHTFUR) and c:IsType(TYPE_FUSION) + and c:IsFusionSummoned() end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -54,7 +55,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,1,REASON_EFFECT) end function s.damfilter(c) - return c:IsSetCard(0xad) and c:IsMonster() + return c:IsSetCard(SET_FRIGHTFUR) and c:IsMonster() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -67,4 +68,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local val=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_GRAVE,0,nil)*200 Duel.Damage(p,val,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73244186.lua b/official/c73244186.lua index dd072d405c..1be6d45d44 100644 --- a/official/c73244186.lua +++ b/official/c73244186.lua @@ -1,9 +1,9 @@ -- --- Moray of Avarice --- Scripted by Hatter +--Moray of Avarice +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Draw 2 cards + --Draw 2 cards local e1=Effect.CreateEffect(c) e1:SetCategory(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) @@ -17,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.drcostfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToRemoveAsCost() + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsAbleToRemoveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.drcostfilter,tp,LOCATION_MZONE,0,1,nil) end diff --git a/official/c73262676.lua b/official/c73262676.lua index 11ab63d4ea..1c42dffce2 100644 --- a/official/c73262676.lua +++ b/official/c73262676.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xc) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_ALIEN) and c:HasLevel() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -37,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) sg:GetFirst():AddCounter(COUNTER_A,1) end end -end +end \ No newline at end of file diff --git a/official/c73271204.lua b/official/c73271204.lua index de82c81d6c..5430db610c 100644 --- a/official/c73271204.lua +++ b/official/c73271204.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.milop) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.filter(c) - return c:IsSetCard(0xe6) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -36,7 +36,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -54,7 +54,7 @@ end function s.milcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - return e:GetHandler():IsReason(REASON_EFFECT) and rc:IsSetCard(0xe6) and rc:IsMonster() + return e:GetHandler():IsReason(REASON_EFFECT) and rc:IsSetCard(SET_FLOWER_CARDIAN) and rc:IsMonster() end function s.miltg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end @@ -78,4 +78,4 @@ function s.milop(e,tp,eg,ep,ev,re,r,rp) end Duel.SortDecktop(tp,tp,#g) end -end +end \ No newline at end of file diff --git a/official/c73275815.lua b/official/c73275815.lua index c1a1ad86dd..9babc901c7 100644 --- a/official/c73275815.lua +++ b/official/c73275815.lua @@ -1,5 +1,5 @@ --リンケージ・ホール ---Linkage Hole +--Link Hole --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -31,5 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c73285669.lua b/official/c73285669.lua index 967004c65d..bd4d9758bb 100644 --- a/official/c73285669.lua +++ b/official/c73285669.lua @@ -1,20 +1,21 @@ --剣闘獣エセダリ +--Gladiator Beast Essedarii local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR),2) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) end -s.listed_series={0x19} -s.material_setcode=0x19 +s.listed_series={SET_GLADIATOR} +s.material_setcode=SET_GLADIATOR function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA -end +end \ No newline at end of file diff --git a/official/c73287067.lua b/official/c73287067.lua index 6634cb5142..4bc4e1956b 100644 --- a/official/c73287067.lua +++ b/official/c73287067.lua @@ -34,5 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(p,d,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c73289035.lua b/official/c73289035.lua index 7b69c25f7d..6f1a3a21fd 100644 --- a/official/c73289035.lua +++ b/official/c73289035.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,11 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x88} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_BUJIN} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) @@ -51,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:GetLevel()==4 and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==4 and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -74,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c73304257.lua b/official/c73304257.lua index 85e049fef9..515bc72f49 100644 --- a/official/c73304257.lua +++ b/official/c73304257.lua @@ -1,5 +1,5 @@ --獣王アルファ ---Zoo King Alpha +--Alpha, the Master of Beasts --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -56,7 +56,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,id)) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local tg=Duel.GetTargetCards(e) if Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 then @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73309655.lua b/official/c73309655.lua index b6323bfc2f..e98e0ade62 100644 --- a/official/c73309655.lua +++ b/official/c73309655.lua @@ -37,7 +37,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end @@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp==1-tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp==1-tp and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsMonster() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() @@ -70,5 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c73318863.lua b/official/c73318863.lua index 733837a706..a5d267bc41 100644 --- a/official/c73318863.lua +++ b/official/c73318863.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.ctcon) tc:RegisterEffect(e1) end diff --git a/official/c73333463.lua b/official/c73333463.lua index e8981cfe11..196504bfbd 100644 --- a/official/c73333463.lua +++ b/official/c73333463.lua @@ -1,4 +1,5 @@ --アーマロイドガイデンゴー +--Armoroid local s,id=GetID() function s.initial_effect(c) --summon success @@ -19,17 +20,17 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x16) then + if g:IsExists(Card.IsSetCard,1,nil,SET_ROID) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.filter(c) return c:IsSpellTrap() and c:IsAbleToRemove() @@ -44,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73341839.lua b/official/c73341839.lua index 3863b12a76..f6f12c01b7 100644 --- a/official/c73341839.lua +++ b/official/c73341839.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x102),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ROKKET),2,2) --spsummon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -16,9 +16,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10f,0x102} +s.listed_series={SET_BORREL,SET_ROKKET} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10f) and c:IsLinkMonster() + return c:IsFaceup() and c:IsSetCard(SET_BORREL) and c:IsLinkMonster() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetValue(s.lnklimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabel(e:GetLabel()) c:RegisterEffect(e1,true) end @@ -53,5 +53,4 @@ end function s.lnklimit(e,c) if not c then return false end return c:IsLink(e:GetLabel()) -end - +end \ No newline at end of file diff --git a/official/c73345237.lua b/official/c73345237.lua index ee0d8f18a3..994d26e1d9 100644 --- a/official/c73345237.lua +++ b/official/c73345237.lua @@ -1,5 +1,5 @@ --サムサリック・サイクルのベンガランス ---Benghalances of the Samsaric Cycle +--Benghalancer the Resurgent --Scripted by Kohana Sonogami local s,id=GetID() function s.initial_effect(c) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return Duel.IsMainPhase()end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) @@ -74,8 +74,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c73347079.lua b/official/c73347079.lua index a6576d0c62..eb36df3333 100644 --- a/official/c73347079.lua +++ b/official/c73347079.lua @@ -1,4 +1,5 @@ --RR-フォース・ストリクス +--Raidraptor - Force Strix local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -21,7 +22,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.thcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,10 +30,6 @@ end function s.adval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_WINGEDBEAST),c:GetControler(),LOCATION_MZONE,0,c)*500 end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) return c:GetLevel()==4 and c:IsRace(RACE_WINGEDBEAST) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() end @@ -47,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73356503.lua b/official/c73356503.lua index f6b47bd898..3c472415f1 100644 --- a/official/c73356503.lua +++ b/official/c73356503.lua @@ -1,4 +1,5 @@ --烈風の結界像 +--Barrier Statue of the Stormwinds local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:GetAttribute()~=ATTRIBUTE_WIND -end +end \ No newline at end of file diff --git a/official/c73359475.lua b/official/c73359475.lua index f50819dfd5..c6dcc83fdc 100644 --- a/official/c73359475.lua +++ b/official/c73359475.lua @@ -1,4 +1,5 @@ --聖騎士パーシヴァル +--Noble Knight Peredur local s,id=GetID() function s.initial_effect(c) --Attribute Dark @@ -26,15 +27,15 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x207a} +s.listed_series={SET_NOBLE_ARMS} function s.eqcon2(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) + return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return s.eqcon2(e) and e:GetHandler():IsLocation(LOCATION_GRAVE) end function s.thfilter(c) - return c:IsSetCard(0x207a) and c:IsAbleToHand() + return c:IsSetCard(SET_NOBLE_ARMS) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -48,4 +49,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73360025.lua b/official/c73360025.lua index b7a2f5bf77..cb258df48f 100644 --- a/official/c73360025.lua +++ b/official/c73360025.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.checkmat(tp,sg,fc) - return fc:IsSetCard(0xaf) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) + return fc:IsSetCard(SET_DD) or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil),s.checkmat end return nil @@ -61,4 +61,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7336745.lua b/official/c7336745.lua index 53c7396b97..b501460d8b 100644 --- a/official/c7336745.lua +++ b/official/c7336745.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end diff --git a/official/c7337976.lua b/official/c7337976.lua index d3abb1f257..a0ba69dc79 100644 --- a/official/c7337976.lua +++ b/official/c7337976.lua @@ -1,5 +1,5 @@ --煉獄の災天 ---Void Calamity +--Void Apocalypse --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -26,15 +26,15 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.tgcost2) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.tgtg2) e3:SetOperation(s.tgop2) c:RegisterEffect(e3) end -s.listed_series={0xbb} +s.listed_series={SET_INFERNOID} function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.tgfilter(c) return c:IsRace(RACE_FIEND) and c:IsAbleToGrave() @@ -51,25 +51,20 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -function s.tgcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.tgfilter2(c) - return c:IsSetCard(0xbb) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_INFERNOID) and c:IsMonster() and c:IsAbleToGrave() end function s.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.tgop2(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(Card.IsSummonLocation,tp,0,LOCATION_MZONE,nil,LOCATION_EXTRA) if ct<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,ct,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,ct,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73398797.lua b/official/c73398797.lua index 1e3bbd7e2e..3468a92055 100644 --- a/official/c73398797.lua +++ b/official/c73398797.lua @@ -1,4 +1,5 @@ --白竜の聖騎士 +--Paladin of White Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -38,29 +39,25 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(d,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(CARD_BLUEEYES_W_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,CARD_BLUEEYES_W_DRAGON)) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c73405179.lua b/official/c73405179.lua index 009dc31f3e..cbc6b59720 100644 --- a/official/c73405179.lua +++ b/official/c73405179.lua @@ -55,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73414375.lua b/official/c73414375.lua index 5e519b5fe2..36eed5ab62 100644 --- a/official/c73414375.lua +++ b/official/c73414375.lua @@ -21,17 +21,17 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() local p=Duel.GetTurnPlayer() - if Duel.IsExistingTarget(s.rmfilter,p,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil,1-p) and Duel.SelectYesNo(p,aux.Stringid(id,1)) then + if Duel.IsExistingTarget(s.rmfilter,p,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil,1-p) and Duel.SelectYesNo(p,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(p,s.rmfilter,p,0,LOCATION_MZONE+LOCATION_GRAVE,1,3,nil,p) + local rg=Duel.SelectMatchingCard(p,s.rmfilter,p,0,LOCATION_MZONE|LOCATION_GRAVE,1,3,nil,p) Duel.HintSelection(rg,true) g:Merge(rg) end - if Duel.IsExistingTarget(s.rmfilter,1-p,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil,1-p) and Duel.SelectYesNo(1-p,aux.Stringid(id,1)) then + if Duel.IsExistingTarget(s.rmfilter,1-p,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil,1-p) and Duel.SelectYesNo(1-p,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(1-p,s.rmfilter,1-p,0,LOCATION_MZONE+LOCATION_GRAVE,1,3,nil,1-p) + local rg=Duel.SelectMatchingCard(1-p,s.rmfilter,1-p,0,LOCATION_MZONE|LOCATION_GRAVE,1,3,nil,1-p) Duel.HintSelection(rg,true) g:Merge(rg) end Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73417207.lua b/official/c73417207.lua index fd40c05622..97a963a362 100644 --- a/official/c73417207.lua +++ b/official/c73417207.lua @@ -1,4 +1,5 @@ --極星霊スヴァルトアールヴ +--Mara of the Nordic Alfar local s,id=GetID() function s.initial_effect(c) --hand synchro @@ -22,12 +23,12 @@ function s.initial_effect(c) e1:SetOperation(s.synop) c:RegisterEffect(e1) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.synfilter(e,c) - return c:IsLocation(LOCATION_HAND) and c:IsSetCard(0x42) and c:IsControler(e:GetHandlerPlayer()) + return c:IsLocation(LOCATION_HAND) and c:IsSetCard(SET_NORDIC) and c:IsControler(e:GetHandlerPlayer()) end function s.synval(e,c,sc) - if c:IsSetCard(0x42) and c:IsLocation(LOCATION_HAND) then + if c:IsSetCard(SET_NORDIC) and c:IsLocation(LOCATION_HAND) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_HAND_SYNCHRO+EFFECT_SYNCHRO_CHECK) @@ -47,7 +48,7 @@ function s.chk2(c) return false end function s.filterchk(c) - if c:IsSetCard(0x42) then return false end + if c:IsSetCard(SET_NORDIC) then return false end return not c:IsHasEffect(EFFECT_HAND_SYNCHRO) or c:IsHasEffect(EFFECT_HAND_SYNCHRO+EFFECT_SYNCHRO_CHECK) or c:GetCardEffect(EFFECT_HAND_SYNCHRO):GetLabel()~=id end @@ -65,4 +66,4 @@ function s.synchktg(e,c,sg,tg,ntg,tsg,ntsg) end function s.synop(e,tg,ntg,sg,lv,sc,tp) return #sg==3,false -end +end \ No newline at end of file diff --git a/official/c73421698.lua b/official/c73421698.lua index a5610107bb..6745c3c4f9 100644 --- a/official/c73421698.lua +++ b/official/c73421698.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_REMOVED) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.selfspcond) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetCountLimit(1,{id,2}) e3:SetCondition(s.syncsumcond) e3:SetTarget(s.syncsumtg) diff --git a/official/c73428497.lua b/official/c73428497.lua index 3711523d10..aaacd6fa8c 100644 --- a/official/c73428497.lua +++ b/official/c73428497.lua @@ -1,4 +1,5 @@ --ギアギアーセナル +--Geargiarsenal local s,id=GetID() function s.initial_effect(c) --atkup @@ -15,24 +16,20 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x72) + return c:IsFaceup() and c:IsSetCard(SET_GEARGIA) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*200 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x72) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GEARGIA) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -47,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c73431236.lua b/official/c73431236.lua index 738f15dc2b..2a78f598e1 100644 --- a/official/c73431236.lua +++ b/official/c73431236.lua @@ -1,4 +1,5 @@ --名工 虎鉄 +--Iron Blacksmith Kotetsu local s,id=GetID() function s.initial_effect(c) --flip @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73445448.lua b/official/c73445448.lua index 1faaea0863..1da10ee77e 100644 --- a/official/c73445448.lua +++ b/official/c73445448.lua @@ -52,20 +52,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c73452089.lua b/official/c73452089.lua index 402d0c987f..93ce1a6d82 100644 --- a/official/c73452089.lua +++ b/official/c73452089.lua @@ -33,16 +33,16 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_DARK_MAGICIAN} -s.material_setcode={0x10a2} +s.material_setcode={SET_DARK_MAGICIAN} function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,0,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)*100 + return Duel.GetMatchingGroupCount(s.filter,0,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,nil)*100 end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end @@ -61,4 +61,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73468603.lua b/official/c73468603.lua index 268b159992..5ad3eb2565 100644 --- a/official/c73468603.lua +++ b/official/c73468603.lua @@ -27,8 +27,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg2=g:Select(tp,1,1,nil) Duel.SSet(tp,tg1) Duel.SSet(tp,tg2,1-tp) - tg1:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) - tg2:GetFirst():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tg1:GetFirst():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) + tg2:GetFirst():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) tg1:Merge(tg2) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -58,4 +58,4 @@ function s.actlimit(e,re,tp) end function s.setlimit(e,c,tp) return c:IsType(TYPE_FIELD) and c:GetFlagEffect(id)==0 -end +end \ No newline at end of file diff --git a/official/c734741.lua b/official/c734741.lua index 5b7665e5e9..5f95862ec4 100644 --- a/official/c734741.lua +++ b/official/c734741.lua @@ -29,19 +29,19 @@ function s.initial_effect(c) e3:SetValue(s.synlimit) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0xb1) + return not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -55,4 +55,4 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c73478096.lua b/official/c73478096.lua index 6708acb5e6..1764e39265 100644 --- a/official/c73478096.lua +++ b/official/c73478096.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) end s.listed_series={SET_PHOTON,SET_GALAXY} function s.spconfilter(c) - return c:IsFaceup() and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsMonster() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -50,7 +50,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) diff --git a/official/c73483491.lua b/official/c73483491.lua index 230a038c21..b65776160d 100644 --- a/official/c73483491.lua +++ b/official/c73483491.lua @@ -1,8 +1,9 @@ --レアル・ジェネクス・ヴィンディカイト +--Vindikite R-Genex local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_WIND),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GENEX),1,1,Synchro.NonTunerEx(Card.IsAttribute,ATTRIBUTE_WIND),1,99) c:EnableReviveLimit() --untargetable local e1=Effect.CreateEffect(c) @@ -23,13 +24,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsRelateToBattle() and c:GetBattleTarget():IsMonster() end function s.filter(c) - return c:IsSetCard(0x2) and c:IsAbleToHand() + return c:IsSetCard(SET_GENEX) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -42,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73507661.lua b/official/c73507661.lua index 54507dd560..199c41c96a 100644 --- a/official/c73507661.lua +++ b/official/c73507661.lua @@ -1,4 +1,5 @@ --妖精の風 +--Fairy Wind local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,ct*300,REASON_EFFECT,true) Duel.Damage(1-tp,ct*300,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c73511233.lua b/official/c73511233.lua index 7212b1110d..c95695fb95 100644 --- a/official/c73511233.lua +++ b/official/c73511233.lua @@ -35,36 +35,36 @@ function s.initial_effect(c) e3:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e3) end -s.listed_series={0x98,0x99,0x9f} +s.listed_series={SET_MAGICIAN,SET_ODD_EYES,SET_PERFORMAPAL} function s.thcfilter(c,tp) - return c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsControler(tp) and c:IsFusionSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.thcfilter,1,nil,tp) end function s.thfilter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsSetCard(0x98) or c:IsSetCard(0x99) or c:IsSetCard(0x9f)) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsSetCard(SET_MAGICIAN) or c:IsSetCard(SET_ODD_EYES) or c:IsSetCard(SET_PERFORMAPAL)) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) end function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c73534250.lua b/official/c73534250.lua index 0c5639cade..2ed77ae64f 100644 --- a/official/c73534250.lua +++ b/official/c73534250.lua @@ -14,15 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.ctfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.ctfilter,tp,0,LOCATION_MZONE,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLACKWING) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -39,12 +39,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -55,14 +55,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,1)) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x33) and c:IsLocation(LOCATION_EXTRA) + return not c:IsSetCard(SET_BLACKWING) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x107a) + return not c:IsOriginalSetCard(SET_NOBLE_KNIGHT) end \ No newline at end of file diff --git a/official/c73539069.lua b/official/c73539069.lua index f18ffbc490..f7cec7e8d9 100644 --- a/official/c73539069.lua +++ b/official/c73539069.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -71,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)>0 and #hg>0 then Duel.SendtoHand(hg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73542331.lua b/official/c73542331.lua index c12138328d..51bc373891 100644 --- a/official/c73542331.lua +++ b/official/c73542331.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) e1:SetTarget(s.sptg) diff --git a/official/c73544866.lua b/official/c73544866.lua index 53b8c5144b..09fa3e1ee0 100644 --- a/official/c73544866.lua +++ b/official/c73544866.lua @@ -1,4 +1,5 @@ --ガーディアン・バオウ +--Guardian Baou local s,id=GetID() function s.initial_effect(c) --sum limit @@ -44,12 +45,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end end @@ -66,7 +67,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c73558460.lua b/official/c73558460.lua index 69eff2a1e1..3615a9f011 100644 --- a/official/c73558460.lua +++ b/official/c73558460.lua @@ -1,5 +1,5 @@ --サイバネット・リカバー ---Cynet Recover +--Cynet Recovery --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -46,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c73567374.lua b/official/c73567374.lua index e032a83004..121822beeb 100644 --- a/official/c73567374.lua +++ b/official/c73567374.lua @@ -28,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end g:ForEach(Card.EnableGeminiStatus) aux.DelayedOperation(g,PHASE_END,id,e,tp,function(ag) Duel.ChangePosition(ag,POS_FACEDOWN_DEFENSE) end) -end +end \ No newline at end of file diff --git a/official/c73574678.lua b/official/c73574678.lua index be9a6e04d3..2b0215ad03 100644 --- a/official/c73574678.lua +++ b/official/c73574678.lua @@ -1,4 +1,5 @@ --アマゾネスの吹き矢兵 +--Amazoness Blowpiper local s,id=GetID() function s.initial_effect(c) --atkdown @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -31,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c73575650.lua b/official/c73575650.lua index 6d3882f3ab..81d8e85306 100644 --- a/official/c73575650.lua +++ b/official/c73575650.lua @@ -55,15 +55,15 @@ end --Activation legality function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return - Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end --Performing the effect of adding to hand function s.thop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg=Duel.SelectMatchingCard(tp,s.tgfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) + local tg=Duel.SelectMatchingCard(tp,s.tgfilter1,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp) local tc=tg:GetFirst() if tc then local code = tc:GetCode() @@ -96,15 +96,15 @@ end --Activation legality function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return - Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE) + Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end --Performing the effect of adding to hand function s.thop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tg=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) + local tg=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp) local tc=tg:GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -120,4 +120,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEDOWN) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end -end +end \ No newline at end of file diff --git a/official/c73578229.lua b/official/c73578229.lua index 52396ed4d3..4b93268635 100644 --- a/official/c73578229.lua +++ b/official/c73578229.lua @@ -46,7 +46,7 @@ function s.etarget(e,c) return e:GetLabelObject():IsContains(c) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) + return te:IsSpellEffect() end function s.adjustop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -77,4 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(ag,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c73580471.lua b/official/c73580471.lua index 30ba95be55..35a11b1558 100644 --- a/official/c73580471.lua +++ b/official/c73580471.lua @@ -1,4 +1,5 @@ --ブラック・ローズ・ドラゴン +--Black Rose Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -28,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -45,9 +46,9 @@ function s.costfilter(c) return c:IsRace(RACE_PLANT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -66,7 +67,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c73594093.lua b/official/c73594093.lua index 6c055226b0..4ac7c97fb1 100644 --- a/official/c73594093.lua +++ b/official/c73594093.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0xe1))) + c:RegisterEffect(Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_METALFOES))) --draw local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0xe1} +s.listed_series={SET_METALFOES} function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) @@ -23,9 +23,9 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then + if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73599290.lua b/official/c73599290.lua index 1b9aaf0ccd..93dd8168f8 100644 --- a/official/c73599290.lua +++ b/official/c73599290.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) c:RegisterEffect(e1) -- local e2=Effect.CreateEffect(c) @@ -18,11 +18,7 @@ function s.initial_effect(c) e2:SetValue(s.aclimit) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.aclimit(e,re,tp) local loc=re:GetActivateLocation() - return (loc==LOCATION_GRAVE or loc==LOCATION_REMOVED) and re:IsActiveType(TYPE_MONSTER) + return (loc==LOCATION_GRAVE or loc==LOCATION_REMOVED) and re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c73602965.lua b/official/c73602965.lua index 5db5468c95..a5be73d6e7 100644 --- a/official/c73602965.lua +++ b/official/c73602965.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(s.spsetcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.spsettarget) e1:SetOperation(s.spsetop) c:RegisterEffect(e1) @@ -32,11 +32,6 @@ function s.initial_effect(c) end s.listed_series={SET_LABRYNTH} s.listed_names={id} -function s.spsetcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spsetfilter(c,e,tp,ft) return (ft>0 and c:IsSetCard(SET_LABRYNTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (c:IsNormalTrap() and c:IsSSetable()) diff --git a/official/c73625877.lua b/official/c73625877.lua index febaeca0fa..5d6852eae5 100644 --- a/official/c73625877.lua +++ b/official/c73625877.lua @@ -1,4 +1,5 @@ --タイム・エスケーパー +--Time Escaper local s,id=GetID() function s.initial_effect(c) --remove @@ -9,15 +10,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemove() end @@ -32,15 +29,15 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end + if Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)==0 then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) then e1:SetLabel(0) else e1:SetLabel(Duel.GetTurnCount()) @@ -49,9 +46,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) e:Reset() -end +end \ No newline at end of file diff --git a/official/c73628505.lua b/official/c73628505.lua index b98fee857d..08b24b218e 100644 --- a/official/c73628505.lua +++ b/official/c73628505.lua @@ -25,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73639099.lua b/official/c73639099.lua index 5a69d8481e..3720c60f32 100644 --- a/official/c73639099.lua +++ b/official/c73639099.lua @@ -41,18 +41,18 @@ function s.initial_effect(c) e5:SetOperation(s.setop) c:RegisterEffect(e5) end -s.listed_series={0x108a,0x4c,0x89} +s.listed_series={SET_TRAPTRIX,SET_TRAP_HOLE,SET_HOLE} --Link material of a non-link "Traptrix" monster function s.matfilter(c,lc,sumtype,tp) - return c:IsSetCard(0x108a,lc,sumtype,tp) and not c:IsType(TYPE_LINK,lc,sumtype,tp) + return c:IsSetCard(SET_TRAPTRIX,lc,sumtype,tp) and not c:IsType(TYPE_LINK,lc,sumtype,tp) end --If this card was link summoned function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end --Unaffected by trap effects function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) + return te:IsTrapEffect() end --If a normal trap card is activated function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -64,7 +64,7 @@ function s.namefilter(c,cd) end --Check for "Traptrix" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRAPTRIX) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not Duel.IsExistingMatchingCard(s.namefilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) end --Activation legality @@ -83,12 +83,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --If your "Traptrix" monster effect activates, except this card function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsActiveType(TYPE_MONSTER) - and re:GetHandler():IsSetCard(0x108a) and re:GetHandler()~=e:GetHandler() + return rp==tp and re:IsMonsterEffect() + and re:GetHandler():IsSetCard(SET_TRAPTRIX) and re:GetHandler()~=e:GetHandler() end --Check for "Trap Hole" normal trap function s.setfilter(c) - return (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:GetType()==TYPE_TRAP and c:IsSSetable() + return (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) and c:IsNormalTrap() and c:IsSSetable() end --Activation legality function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -101,4 +101,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c73640163.lua b/official/c73640163.lua index 7d81572ce0..644f860788 100644 --- a/official/c73640163.lua +++ b/official/c73640163.lua @@ -1,7 +1,6 @@ --ペンギン僧侶 ---Penguin Priest +--Penguin Cleric --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -29,11 +28,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Penguin" archetype -s.listed_series={0x5a} - +s.listed_series={SET_PENGUIN} --Check for a "Penguin" monster that was sent to GY by opponent's card function s.cfilter(c,e,tp) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsPreviousSetCard(0x5a) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsPreviousSetCard(SET_PENGUIN) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) and c:IsCanBeEffectTarget(e) and c:IsPreviousPosition(POS_FACEUP) end --Activation legality @@ -55,14 +53,14 @@ end function s.ssop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)==1 + if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT|REASON_DISCARD)==1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) end end --Check for a "Penguin" monster function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x5a) + return c:IsFaceup() and c:IsSetCard(SET_PENGUIN) end --Activation legality function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -83,10 +81,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) if tc:IsImmuneToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) - end -end + end +end \ No newline at end of file diff --git a/official/c73642296.lua b/official/c73642296.lua index 9b0a0fd3c0..db3c2f01b8 100644 --- a/official/c73642296.lua +++ b/official/c73642296.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.negtg) e1:SetOperation(function(e,tp,eg,ep,ev) Duel.NegateActivation(ev) end) c:RegisterEffect(e1) @@ -35,12 +35,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) or s.check(ev,CATEGORY_TOEXTRA)) then return true end return false end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,tp,0) -end +end \ No newline at end of file diff --git a/official/c73648243.lua b/official/c73648243.lua index 9fb4270c7c..a1d7a2ee60 100644 --- a/official/c73648243.lua +++ b/official/c73648243.lua @@ -1,4 +1,5 @@ --サンドモス +--Sand Moth local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (c:GetReason()&0x41)==0x41 and c:IsPreviousLocation(LOCATION_MZONE) + return (c:GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -28,8 +29,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SWAP_BASE_AD) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c73652465.lua b/official/c73652465.lua index b5e417f551..bc69664e3d 100644 --- a/official/c73652465.lua +++ b/official/c73652465.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end @@ -50,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c73659078.lua b/official/c73659078.lua index 2f2e80e14c..3921d25765 100644 --- a/official/c73659078.lua +++ b/official/c73659078.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.countertg) e1:SetOperation(s.counterop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c73664385.lua b/official/c73664385.lua index b6a6c055ef..f1c6e8fb07 100644 --- a/official/c73664385.lua +++ b/official/c73664385.lua @@ -75,4 +75,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c73665146.lua b/official/c73665146.lua index 2b8e4aa4b1..61c44ffde4 100644 --- a/official/c73665146.lua +++ b/official/c73665146.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -35,7 +35,7 @@ end s.counter_place_list={COUNTER_SPELL} s.listed_names={72443568} s.LVnum=4 -s.LVset=0xe8 +s.LVset=SET_SILENT_MAGICIAN function s.addc(e,tp,eg,ep,ev,re,r,rp) if ep~=tp then e:GetHandler():AddCounter(COUNTER_SPELL,1) @@ -47,24 +47,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetCounter(COUNTER_SPELL)==5 and tp==Duel.GetTurnPlayer() end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(72443568) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c73667937.lua b/official/c73667937.lua index bb7c73aa52..5c5eb518b2 100644 --- a/official/c73667937.lua +++ b/official/c73667937.lua @@ -36,12 +36,12 @@ function s.initial_effect(c) e4:SetValue(s.valcheck) c:RegisterEffect(e4) end -s.listed_series={0xf0} +s.listed_series={SET_WINDWITCH} function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.damfil(c) - return c:IsMonster() and c:IsSetCard(0xf0) and c:IsAttackAbove(1) + return c:IsMonster() and c:IsSetCard(SET_WINDWITCH) and c:IsAttackAbove(1) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.damfil(chkc) end @@ -66,11 +66,11 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() end if chk==0 then - local wwchk=c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetFlagEffect(id)+1 or 1 + local wwchk=c:IsSynchroSummoned() and c:GetFlagEffect(id)+1 or 1 local ct=c:GetFlagEffect(id+1) return ct0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and (ft>0 or c:GetSequence()<5) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,c:GetCode(),e,tp) end function s.spfilter(c,code,e,tp) - return c:IsSetCard(0x10cf) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -54,10 +55,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return aux.exccon(e) and Duel.IsTurnPlayer(tp) and (Duel.IsMainPhase()) end function s.thfilter(c) - return c:IsSetCard(0x10cf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -71,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73698349.lua b/official/c73698349.lua index 83a48ab15a..23403283b3 100644 --- a/official/c73698349.lua +++ b/official/c73698349.lua @@ -1,12 +1,11 @@ --ジャイアント・オーク --Giant Orc - local s,id=GetID() function s.initial_effect(c) --After attacking, change itself to defense position local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.poscon) @@ -27,6 +26,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c73702909.lua b/official/c73702909.lua index 8ebc4307f8..102eb91132 100644 --- a/official/c73702909.lua +++ b/official/c73702909.lua @@ -1,4 +1,5 @@ --リトルトルーパー +--Little Trooper local s,id=GetID() function s.initial_effect(c) --spsummon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73729209.lua b/official/c73729209.lua index 0e9f293c5b..6a5f0f0efc 100644 --- a/official/c73729209.lua +++ b/official/c73729209.lua @@ -1,4 +1,5 @@ --スキル・サクセサー +--Skill Successor local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) e1:SetLabel(400) @@ -23,15 +24,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.activate) e2:SetLabel(800) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -44,11 +42,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) tc:RegisterEffect(e1) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) -end + return aux.exccon(e) and Duel.IsTurnPlayer(tp) and aux.StatChangeDamageStepCondition() +end \ No newline at end of file diff --git a/official/c73734821.lua b/official/c73734821.lua index 601de98db6..b402650a4e 100644 --- a/official/c73734821.lua +++ b/official/c73734821.lua @@ -40,9 +40,9 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and rp==tp end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -52,12 +52,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.thfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToHand() + return c:IsFaceup() and c:IsContinuousSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -67,7 +67,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.tffilter(c,tp) - return c:IsSetCard(0x98) and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:GetActivateEffect():IsActivatable(tp,true) + return c:IsSetCard(SET_MAGICIAN) and c:IsContinuousSpell() and c:GetActivateEffect():IsActivatable(tp,true) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -101,4 +101,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7373632.lua b/official/c7373632.lua index 9bb0794051..e93498d604 100644 --- a/official/c7373632.lua +++ b/official/c7373632.lua @@ -88,4 +88,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_RULE,PLAYER_NONE,1-tp) end -end +end \ No newline at end of file diff --git a/official/c73752131.lua b/official/c73752131.lua index 47661d93ef..79437e7075 100644 --- a/official/c73752131.lua +++ b/official/c73752131.lua @@ -32,7 +32,7 @@ end s.counter_place_list={COUNTER_SPELL} s.listed_names={CARD_DARK_MAGICIAN} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -56,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c73776643.lua b/official/c73776643.lua index aa941e285e..385f9e5d13 100644 --- a/official/c73776643.lua +++ b/official/c73776643.lua @@ -1,4 +1,5 @@ --オヤコーン +--Papa-Corn local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.condtion(e) return Duel.IsExistingMatchingCard(Card.IsFaceup,0,LOCATION_FZONE,LOCATION_FZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c73778008.lua b/official/c73778008.lua index 728afde588..fd7d423351 100644 --- a/official/c73778008.lua +++ b/official/c73778008.lua @@ -1,4 +1,5 @@ --深海の怒り +--Rage of the Deep Sea local s,id=GetID() function s.initial_effect(c) --atkup @@ -14,5 +15,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FISH+RACE_SEASERPENT+RACE_AQUA)*500 -end + return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FISH|RACE_SEASERPENT|RACE_AQUA)*500 +end \ No newline at end of file diff --git a/official/c73779005.lua b/official/c73779005.lua index 1fb2a35955..85e12124b0 100644 --- a/official/c73779005.lua +++ b/official/c73779005.lua @@ -1,4 +1,5 @@ --ドラコニアの獣竜騎兵 +--Dragoons of Draconia local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -38,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c73783043.lua b/official/c73783043.lua index 2e3313c069..1ece7c98e6 100644 --- a/official/c73783043.lua +++ b/official/c73783043.lua @@ -1,4 +1,5 @@ --レアル・ジェネクス・アクセラレーター +--R-Genex Accelerator local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.filter(c,e,tp) - return c:IsSetCard(0x2) and c:IsControler(tp) and not c:IsPublic() + return c:IsSetCard(SET_GENEX) and c:IsControler(tp) and not c:IsPublic() and c:IsPreviousLocation(LOCATION_DECK) and c:IsPreviousControler(tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c73787254.lua b/official/c73787254.lua index 5bf7dc3d54..fcfebafa9e 100644 --- a/official/c73787254.lua +++ b/official/c73787254.lua @@ -1,4 +1,5 @@ --セイバー・ヴォールト +--Saber Vault local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x100d)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_X_SABER)) e2:SetValue(s.val1) c:RegisterEffect(e2) local e3=e2:Clone() @@ -20,10 +21,10 @@ function s.initial_effect(c) e3:SetValue(s.val2) c:RegisterEffect(e3) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.val1(e,c) return c:GetLevel()*100 end function s.val2(e,c) return -c:GetLevel()*100 -end +end \ No newline at end of file diff --git a/official/c73810864.lua b/official/c73810864.lua index b4eea504ff..d604a4d7d8 100644 --- a/official/c73810864.lua +++ b/official/c73810864.lua @@ -1,7 +1,6 @@ --Live☆Twin リィラ --Live☆Twin Lil-la --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -39,25 +38,25 @@ function s.initial_effect(c) c:RegisterEffect(e4) end --Lists "Kisikil" archetype -s.listed_series={0x153} +s.listed_series={SET_KI_SIKIL} --Specifically lists itself s.listed_names={id} --Check for "Kisikil" monster function s.filter(c,e,tp) - return c:IsSetCard(0x153) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_KI_SIKIL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) and not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end --Special summon 1 "Kisikil" monster from hand/deck function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c73820802.lua b/official/c73820802.lua index 17bc5f4888..7abcaf048b 100644 --- a/official/c73820802.lua +++ b/official/c73820802.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.condition) e2:SetCountLimit(1) e2:SetOperation(s.operation) @@ -37,8 +37,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) if #hg>0 then local sg=hg:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end end Duel.MoveSequence(tc,1) -end +end \ No newline at end of file diff --git a/official/c73828446.lua b/official/c73828446.lua index aabc45b7ae..b7e470e374 100644 --- a/official/c73828446.lua +++ b/official/c73828446.lua @@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c73837870.lua b/official/c73837870.lua index 42466e1ff4..cceab3cd60 100644 --- a/official/c73837870.lua +++ b/official/c73837870.lua @@ -1,4 +1,5 @@ --サニー・ピクシー +--Sunny Pixie local s,id=GetID() function s.initial_effect(c) --lp rec @@ -26,4 +27,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73853830.lua b/official/c73853830.lua index 7a68644c2a..ba2c56871e 100644 --- a/official/c73853830.lua +++ b/official/c73853830.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c73860462.lua b/official/c73860462.lua index 9f9d6b8d05..c99ef85f46 100644 --- a/official/c73860462.lua +++ b/official/c73860462.lua @@ -23,4 +23,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) local tg=g:Select(tp,1,1,nil) Duel.XyzSummon(tp,tg:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c73866096.lua b/official/c73866096.lua index 13780d0b5b..73ddba683b 100644 --- a/official/c73866096.lua +++ b/official/c73866096.lua @@ -1,4 +1,5 @@ --ドドドドロー +--Dodododraw local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x82} +s.listed_series={SET_DODODO} function s.cfilter(c) - return c:IsSetCard(0x82) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_DODODO) and c:IsMonster() and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -32,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73872164.lua b/official/c73872164.lua index 3d44f24051..2755e42ebf 100644 --- a/official/c73872164.lua +++ b/official/c73872164.lua @@ -1,4 +1,5 @@ --お家おとりつぶし +--Eliminating the League local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c73879377.lua b/official/c73879377.lua index f374337179..760a6c53fc 100644 --- a/official/c73879377.lua +++ b/official/c73879377.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) end s.listed_names={46384672} s.LVnum=7 -s.LVset=0x111 +s.LVset=SET_ARMED_DRAGON function s.cfilter(c,tp) local atk=c:GetAttack() if atk<0 then atk=0 end @@ -50,4 +50,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c73881652.lua b/official/c73881652.lua index 8a0a814768..dcb36c1928 100644 --- a/official/c73881652.lua +++ b/official/c73881652.lua @@ -1,4 +1,5 @@ --十二獣の方合 +--Zoodiac Combo local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,17 +19,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.tgfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf1) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_ZOODIAC) end function s.matfilter(c) - return c:IsMonster() and c:IsSetCard(0xf1) + return c:IsMonster() and c:IsSetCard(SET_ZOODIAC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end @@ -48,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.drfilter(c,e) - return c:IsSetCard(0xf1) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) + return c:IsSetCard(SET_ZOODIAC) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -63,12 +64,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73887236.lua b/official/c73887236.lua index 2afb170d54..f9ad3a88d9 100644 --- a/official/c73887236.lua +++ b/official/c73887236.lua @@ -1,4 +1,5 @@ --RR-ライズ・ファルコン +--Raidraptor - Rise Falcon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -17,21 +18,17 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end function s.atkfilter(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return c:IsSpecialSummoned() end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 - and c:IsSummonType(SUMMON_TYPE_SPECIAL) + and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -47,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c73891874.lua b/official/c73891874.lua index 8e50800453..9551a0db1b 100644 --- a/official/c73891874.lua +++ b/official/c73891874.lua @@ -1,4 +1,5 @@ --ホワイト・ホーンズ・ドラゴン +--White-Horned Dragon local s,id=GetID() function s.initial_effect(c) --atk @@ -33,8 +34,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct*300) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c73898890.lua b/official/c73898890.lua index a0d527022f..977180dff5 100644 --- a/official/c73898890.lua +++ b/official/c73898890.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c73899015.lua b/official/c73899015.lua index dda4b00ef6..ec8b1c070b 100644 --- a/official/c73899015.lua +++ b/official/c73899015.lua @@ -1,6 +1,5 @@ --ヴェノム・スネーク --Venom Snake - local s,id=GetID() function s.initial_effect(c) --Place 1 venom counter on 1 of opponent's monsters @@ -16,8 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.counter_place_list={0x1009} - +s.counter_place_list={COUNTER_VENOM} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end --Cannot attack @@ -27,21 +25,21 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1009,1) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1009,1) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(COUNTER_VENOM,1) end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_VENOM,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1009,1) + local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_VENOM,1) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,1) then + if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(COUNTER_VENOM,1) then local atk=tc:GetAttack() - tc:AddCounter(0x1009,1) + tc:AddCounter(COUNTER_VENOM,1) if atk>0 and tc:GetAttack()==0 then Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0) end diff --git a/official/c73906480.lua b/official/c73906480.lua index 24b0df70d5..0d84d5c70f 100644 --- a/official/c73906480.lua +++ b/official/c73906480.lua @@ -13,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BUJIN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetValue(s.xyzlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -59,4 +59,4 @@ end function s.xyzlimit(e,c) if not c then return false end return not c:IsRace(RACES_BEAST_BWARRIOR_WINGB) -end +end \ No newline at end of file diff --git a/official/c7391448.lua b/official/c7391448.lua index 0a23d4f392..1f50bb9024 100644 --- a/official/c7391448.lua +++ b/official/c7391448.lua @@ -1,4 +1,5 @@ --ゴヨウ・ガーディアン +--Goyo Guardian local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c73915051.lua b/official/c73915051.lua index 1fff79b0d2..d98eaa1c3f 100644 --- a/official/c73915051.lua +++ b/official/c73915051.lua @@ -1,6 +1,5 @@ --スケープ・ゴート --Scapegoat - local s,id=GetID() function s.initial_effect(c) --Special summon 4 tokens @@ -22,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.sumlimit) @@ -31,7 +30,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() @@ -40,7 +39,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e4:SetDescription(aux.Stringid(id,1)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end @@ -67,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() diff --git a/official/c7392745.lua b/official/c7392745.lua index c886b713c8..814f1b9bc4 100644 --- a/official/c7392745.lua +++ b/official/c7392745.lua @@ -25,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c73941492.lua b/official/c73941492.lua index 8205c52cba..7fde540c8d 100644 --- a/official/c73941492.lua +++ b/official/c73941492.lua @@ -1,6 +1,5 @@ --調弦の魔術師 --Harmonizing Magician - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -50,13 +49,12 @@ function s.initial_effect(c) c:RegisterEffect(e7) end s.listed_names={id} -s.listed_series={0x98} - +s.listed_series={SET_MAGICIAN} function s.filter(e,c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) end function s.atkval(e,c) local g=Duel.GetMatchingGroup(s.atkfilter,c:GetControler(),LOCATION_EXTRA,0,nil) @@ -67,7 +65,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:GetSummonType()==SUMMON_TYPE_PENDULUM and c:IsPreviousLocation(LOCATION_HAND) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) + return c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,12 +84,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Banish it if it leaves the field local e3=Effect.CreateEffect(c) @@ -99,7 +97,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_REDIRECT) + e3:SetReset(RESET_EVENT|RESETS_REDIRECT) e3:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e3,true) end diff --git a/official/c739444.lua b/official/c739444.lua index 0b0c393539..021f32b0a4 100644 --- a/official/c739444.lua +++ b/official/c739444.lua @@ -37,7 +37,7 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end function s.discon(e) return e:GetHandler():GetFlagEffect(id)~=0 @@ -46,4 +46,4 @@ function s.disop(e,tp) local c=e:GetHandler() local flag=(c:GetLinkedZone(tp)&0xff0000ff) return flag -end +end \ No newline at end of file diff --git a/official/c7394770.lua b/official/c7394770.lua index f0683b79fa..45999ebba3 100644 --- a/official/c7394770.lua +++ b/official/c7394770.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1047),aux.FALSE,s.extrafil,nil,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GEM_KNIGHT),aux.FALSE,s.extrafil,nil,nil,s.stage2,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) --Destroy @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x1047} +s.listed_series={SET_GEM_KNIGHT} function s.extrafil(e,tp,mg1) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK,0,nil) end @@ -39,7 +39,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -63,7 +63,7 @@ function s.cfilter(c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFirstCardTarget() end @@ -76,11 +76,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(tc:GetBaseDefense()) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c73956664.lua b/official/c73956664.lua index d06b78d822..aaff320842 100644 --- a/official/c73956664.lua +++ b/official/c73956664.lua @@ -1,5 +1,5 @@ --ティアラメンツ・レイノハート ---Tearalaments Rainoheart +--Tearlaments Reinoheart --scripted by Zefile local s,id=GetID() function s.initial_effect(c) @@ -30,10 +30,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} s.listed_names={id} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x182) and c:IsAbleToGrave() and not c:IsCode(id) + return c:IsMonster() and c:IsSetCard(SET_TEARLAMENTS) and c:IsAbleToGrave() and not c:IsCode(id) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,7 +47,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.disfilter(c) - return c:IsSetCard(0x182) and c:IsAbleToGrave() + return c:IsSetCard(SET_TEARLAMENTS) and c:IsAbleToGrave() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -67,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) diff --git a/official/c73964868.lua b/official/c73964868.lua index fb8da89eb7..32b6bdefe4 100644 --- a/official/c73964868.lua +++ b/official/c73964868.lua @@ -1,4 +1,5 @@ --セイクリッド・プレアデス +--Constellar Pleiades local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -14,15 +15,11 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end @@ -35,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73977033.lua b/official/c73977033.lua index d6c19e63b8..3b939bcb15 100644 --- a/official/c73977033.lua +++ b/official/c73977033.lua @@ -1,4 +1,5 @@ --RR-ブースター・ストリクス +--Raidraptor - Booster Strix local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,19 +9,15 @@ function s.initial_effect(c) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=eg:GetFirst() - return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0xba) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) + return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(SET_RAIDRAPTOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local tg=Duel.GetAttacker() @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:CanAttack() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c73979030.lua b/official/c73979030.lua index d81f221f38..5b378b8aae 100644 --- a/official/c73979030.lua +++ b/official/c73979030.lua @@ -1,5 +1,5 @@ --相愛のアンブレカム ---Anbraecum of Mutual Love +--Angraecum Umbrella --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -37,12 +37,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) --lizard check diff --git a/official/c73988674.lua b/official/c73988674.lua index dcd4cd6951..2ab398d3a5 100644 --- a/official/c73988674.lua +++ b/official/c73988674.lua @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleExtra(1-tp) Duel.ShuffleExtra(tp) -end +end \ No newline at end of file diff --git a/official/c74003290.lua b/official/c74003290.lua index 106e0e704d..194272b835 100644 --- a/official/c74003290.lua +++ b/official/c74003290.lua @@ -1,6 +1,5 @@ --迷い風 --Lost Wind - local s,id=GetID() function s.initial_effect(c) --Targeted monster has its effects negated, also halve its original ATK @@ -10,8 +9,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) - e1:SetCondition(s.condition) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -27,11 +26,8 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) - return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -42,12 +38,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -80,7 +76,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c74009824.lua b/official/c74009824.lua index a20fa14a19..824b485555 100644 --- a/official/c74009824.lua +++ b/official/c74009824.lua @@ -1,8 +1,9 @@ --エルシャドール・ウェンディゴ +--El Shaddoll Wendigo local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9d),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) --cannot spsummon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -33,8 +34,8 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x9d} -s.material_setcode=0x9d +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL function s.matfilter(c,lc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_WIND,lc,sumtype,tp) or c:IsHasEffect(4904633) end @@ -52,15 +53,15 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.indval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.indval(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -74,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74018812.lua b/official/c74018812.lua index b0d14275c2..58018fa3f0 100644 --- a/official/c74018812.lua +++ b/official/c74018812.lua @@ -40,7 +40,7 @@ function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.setcostfilter,tp,LOCATION_HAND,0,1,c,tp) end Duel.SendtoGrave(c,REASON_COST) - Duel.DiscardHand(tp,s.setcostfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp) + Duel.DiscardHand(tp,s.setcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,tp) end function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c74029853.lua b/official/c74029853.lua index 45366acc28..d64221eb7e 100644 --- a/official/c74029853.lua +++ b/official/c74029853.lua @@ -1,4 +1,5 @@ --黄金色の竹光 +--Golden Bamboo Sword local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x60} +s.listed_series={SET_BAMBOO_SWORD} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x60) and c:IsType(TYPE_EQUIP) + return c:IsFaceup() and c:IsSetCard(SET_BAMBOO_SWORD) and c:IsType(TYPE_EQUIP) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) @@ -28,4 +29,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7403341.lua b/official/c7403341.lua index 9b36ef2ea7..2dc706ec9f 100644 --- a/official/c7403341.lua +++ b/official/c7403341.lua @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x101),tp,LOCATION_MZONE,0,1,nil) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CODE_TALKER),tp,LOCATION_MZONE,0,1,nil) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rc=re:GetHandler() @@ -43,12 +43,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetLabel(ec:GetOriginalCode()) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) e2:SetTargetRange(0,1) Duel.RegisterEffect(e2,tp) end diff --git a/official/c7405310.lua b/official/c7405310.lua index a128517356..d940745adc 100644 --- a/official/c7405310.lua +++ b/official/c7405310.lua @@ -33,6 +33,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,cg) end else - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c74064212.lua b/official/c74064212.lua index d400fda215..49a416ad83 100644 --- a/official/c74064212.lua +++ b/official/c74064212.lua @@ -1,4 +1,5 @@ --ヴァイロン・プリズム +--Vylon Prism local s,id=GetID() function s.initial_effect(c) --equip @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(s.eqcon) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -25,10 +26,6 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetPreviousLocation()==LOCATION_MZONE end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -49,7 +46,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -61,4 +58,4 @@ function s.atkcon(e) local ph=Duel.GetCurrentPhase() local ec=e:GetHandler():GetEquipTarget() return ec and (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and ec:IsRelateToBattle() -end +end \ No newline at end of file diff --git a/official/c7407724.lua b/official/c7407724.lua index 9b4357cf3a..206298ab17 100644 --- a/official/c7407724.lua +++ b/official/c7407724.lua @@ -1,7 +1,6 @@ --六花精エリカ --Erica the Rikka Fairy --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Making your battling plant monster gain 1000 ATK/DEF @@ -10,10 +9,10 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfTribute) e1:SetOperation(s.atkop) c:RegisterEffect(e1) --Special summon itself from GY @@ -36,10 +35,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabelObject(tc) return tc and tc~=e:GetHandler() and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRace(RACE_PLANT) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() if tc:IsRelateToBattle() and tc:IsFaceup() and tc:IsControler(tp) then @@ -47,7 +42,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -75,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c74078255.lua b/official/c74078255.lua index 81184ddfd6..cf376e0212 100644 --- a/official/c74078255.lua +++ b/official/c74078255.lua @@ -1,9 +1,9 @@ --- ティアラメンツ・メイルゥ --- Tearalaments Merrli --- Scripted by Hatter +--ティアラメンツ・メイルゥ +--Tearlaments Merrli +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Mill 3 cards + --Mill 3 cards local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DECKDES) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Fusion Summon + --Fusion Summon local fusparams = {matfilter=Card.IsAbleToDeck,extrafil=s.extramat,extraop=s.extraop,gc=Fusion.ForcedHandler,extratg=s.extratarget} local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) @@ -43,10 +43,10 @@ function s.extramat(e,tp,mg) end function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) end function s.extraop(e,tc,tp,sg) - local gg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_GRAVE) + local gg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_GRAVE) if #gg>0 then Duel.HintSelection(gg,true) end local rg=sg:Filter(Card.IsFacedown,nil) if #rg>0 then Duel.ConfirmCards(1-tp,rg) end @@ -60,4 +60,4 @@ function s.extraop(e,tc,tp,sg) Duel.SortDeckbottom(tp,1-tp,#dg-ct) end sg:Clear() -end +end \ No newline at end of file diff --git a/official/c74094021.lua b/official/c74094021.lua index 76f6374bb6..fab01311df 100644 --- a/official/c74094021.lua +++ b/official/c74094021.lua @@ -1,4 +1,5 @@ --真六武衆-ミズホ +--Legendary Six Samurai - Mizuho local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={48505422} function s.spfilter(c) return c:IsFaceup() and c:IsCode(48505422) @@ -33,7 +34,7 @@ function s.spcon(e,c) Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) end function s.cfilter(c) - return c:IsSetCard(0x3d) + return c:IsSetCard(SET_SIX_SAMURAI) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) @@ -53,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74095602.lua b/official/c74095602.lua index f504182a25..00fa943a57 100644 --- a/official/c74095602.lua +++ b/official/c74095602.lua @@ -1,4 +1,5 @@ --英雄変化-リフレクター・レイ +--Change of Hero - Reflector Ray local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local tc=eg:GetFirst() - return tc:IsPreviousControler(tp) and tc:IsType(TYPE_FUSION) and tc:IsSetCard(0x3008) + return tc:IsPreviousControler(tp) and tc:IsType(TYPE_FUSION) and tc:IsSetCard(SET_ELEMENTAL_HERO) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -30,4 +31,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74117290.lua b/official/c74117290.lua index f134e9017d..f08a888682 100644 --- a/official/c74117290.lua +++ b/official/c74117290.lua @@ -1,4 +1,5 @@ --暗黒界の取引 +--Dark World Dealings local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,10 +22,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if h1>0 or h2>0 then Duel.BreakEffect() end if h1>0 then Duel.ShuffleHand(tp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end if h2>0 then Duel.ShuffleHand(1-tp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c74122412.lua b/official/c74122412.lua index 463fba8f55..b296c6a50e 100644 --- a/official/c74122412.lua +++ b/official/c74122412.lua @@ -1,6 +1,5 @@ --グングニールの影霊衣 --Nekroz of Gungnir - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -19,7 +18,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.indcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.indtg) e2:SetOperation(s.indop) c:RegisterEffect(e2) @@ -34,20 +33,15 @@ function s.initial_effect(c) e3:SetCost(s.descost) e3:SetTarget(s.destg) e3:SetOperation(s.desop) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e3) end -s.listed_series={0xb4} - +s.listed_series={SET_NEKROZ} function s.mat_filter(c) return c:GetLevel()~=7 end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb4) + return c:IsFaceup() and c:IsSetCard(SET_NEKROZ) end function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -64,7 +58,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -73,11 +67,11 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0xb4) and c:IsDiscardable() + return c:IsSetCard(SET_NEKROZ) and c:IsDiscardable() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end diff --git a/official/c74130411.lua b/official/c74130411.lua index 98853669be..fa97b237c9 100644 --- a/official/c74130411.lua +++ b/official/c74130411.lua @@ -1,4 +1,5 @@ --バイオファルコン +--Biofalcon local s,id=GetID() function s.initial_effect(c) --search diff --git a/official/c74131780.lua b/official/c74131780.lua index 6d63b3886e..9159b83bfe 100644 --- a/official/c74131780.lua +++ b/official/c74131780.lua @@ -1,4 +1,5 @@ --ならず者傭兵部隊 +--Exiled Force local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end @@ -29,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74148483.lua b/official/c74148483.lua index e0afd88b67..05ac709f2b 100644 --- a/official/c74148483.lua +++ b/official/c74148483.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.spfilter(c) - return c:IsMonster() and c:IsSetCard(0xb) and c:IsAbleToGraveAsCost() + return c:IsMonster() and c:IsSetCard(SET_INFERNITY) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -59,12 +59,12 @@ function s.lvcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end function s.lvfilter(c) - return c:IsSetCard(0xb) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_INFERNITY) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,7 +86,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) else e1:SetValue(-1) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c74153887.lua b/official/c74153887.lua index 98bcef4c40..476039f0ff 100644 --- a/official/c74153887.lua +++ b/official/c74153887.lua @@ -53,4 +53,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c74157028.lua b/official/c74157028.lua index 58d8c18bde..497c289ae2 100644 --- a/official/c74157028.lua +++ b/official/c74157028.lua @@ -1,4 +1,5 @@ --サイバー・ツイン・ドラゴン +--Cyber Twin Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -11,4 +12,4 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} \ No newline at end of file diff --git a/official/c74163487.lua b/official/c74163487.lua index 1fff4e2516..978e9b20ec 100644 --- a/official/c74163487.lua +++ b/official/c74163487.lua @@ -1,7 +1,6 @@ --レストレーション・ポイントガード --Restoration Point Guard --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -26,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.incfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsLinkSummoned() end function s.incon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsType,1,nil,TYPE_LINK) and eg:IsExists(s.incfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) @@ -42,7 +41,7 @@ function s.inop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c74191528.lua b/official/c74191528.lua index 8a7f233490..ab6c43a5fe 100644 --- a/official/c74191528.lua +++ b/official/c74191528.lua @@ -1,5 +1,5 @@ --運命の一枚 ---Card of Spirit +--Card of Fate --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -45,4 +45,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(1-tp) end end -end +end \ No newline at end of file diff --git a/official/c74191942.lua b/official/c74191942.lua index e871762a0b..725c840237 100644 --- a/official/c74191942.lua +++ b/official/c74191942.lua @@ -1,4 +1,5 @@ --苦渋の選択 +--Painful Choice local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) g:Sub(sg) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74202664.lua b/official/c74202664.lua index 632066b2da..67e5410420 100644 --- a/official/c74202664.lua +++ b/official/c74202664.lua @@ -1,5 +1,5 @@ --一か八か ---All or Nothing +--One or Eight --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(1-p,recv,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c74203495.lua b/official/c74203495.lua index 2cd4131a12..cb22207699 100644 --- a/official/c74203495.lua +++ b/official/c74203495.lua @@ -1,6 +1,5 @@ --PSYフレームギア・δ --PSY-Framegear Delta - local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -25,12 +24,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_PSYFRAME_DRIVER} - function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return ep~=tp and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,CARD_PSYFRAME_LAMBDA)) end function s.spfilter(c,e,tp) @@ -41,8 +39,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) @@ -52,15 +50,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g==0 then return end local tc=g:GetFirst() local c=e:GetHandler() local fid=c:GetFieldID() Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() g:AddCard(c) g:KeepAlive() diff --git a/official/c74210057.lua b/official/c74210057.lua index d99879bd9e..1c491a5cdd 100644 --- a/official/c74210057.lua +++ b/official/c74210057.lua @@ -1,5 +1,5 @@ --テクスチェンジャー ---Texchangure +--Texchanger --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -23,15 +23,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not Duel.NegateAttack() or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c74218258.lua b/official/c74218258.lua index 4564e8d18a..9d1ea1b000 100644 --- a/official/c74218258.lua +++ b/official/c74218258.lua @@ -1,5 +1,5 @@ --虹の天気模様 ---The Weather Rainbow Canvas +--The Weather Rainbowed Canvas --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -28,16 +28,16 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x109) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) + return c:IsSetCard(SET_THE_WEATHER) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) end function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) end @@ -64,10 +64,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_DECK) -end - +end \ No newline at end of file diff --git a/official/c74270067.lua b/official/c74270067.lua index 2fd50e7019..47e64f1731 100644 --- a/official/c74270067.lua +++ b/official/c74270067.lua @@ -1,4 +1,5 @@ --ピケルの魔法陣 +--Pikeru's Circle of Enchantment local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,14 +16,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c74289646.lua b/official/c74289646.lua index 0103b82921..dc9deac7d1 100644 --- a/official/c74289646.lua +++ b/official/c74289646.lua @@ -43,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(res*500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) elseif chain_link==3 then --Inflict damage to your opponent equal to the result x 500 diff --git a/official/c74294676.lua b/official/c74294676.lua index 15fbf22207..cc156d6d9d 100644 --- a/official/c74294676.lua +++ b/official/c74294676.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition1) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_SUMMON) e2:SetCondition(s.condition2) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.target2) e2:SetOperation(s.operation2) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -65,4 +65,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74298287.lua b/official/c74298287.lua index d0f45daaf7..3a78eb4e2d 100644 --- a/official/c74298287.lua +++ b/official/c74298287.lua @@ -1,4 +1,5 @@ --水精鱗-アビスディーネ +--Mermail Abyssdine local s,id=GetID() function s.initial_effect(c) --special summon @@ -25,12 +26,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x74) + return c:IsFaceup() and c:IsSetCard(SET_MERMAIL) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return (r&REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) + return (r&REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK|LOCATION_GRAVE) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,10 +46,10 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x74) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_MERMAIL) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x74) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MERMAIL) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -63,4 +64,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c74311226.lua b/official/c74311226.lua index 804aaee435..4887b92092 100644 --- a/official/c74311226.lua +++ b/official/c74311226.lua @@ -26,7 +26,7 @@ function s.datg(e,c) return c:IsLevelBelow(3) and c:IsRace(RACE_SEASERPENT) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) + return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) end function s.thfilter(c) @@ -43,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,c) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c74329404.lua b/official/c74329404.lua index 742bd8bd36..6acde36fd6 100644 --- a/official/c74329404.lua +++ b/official/c74329404.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) end s.counter_place_list={0x1c} function s.ctfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0xc008) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_DESTINY_HERO) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.ctfilter,1,nil,tp) @@ -44,7 +44,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) + return Duel.IsTurnPlayer(tp) and (Duel.IsMainPhase()) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1c)>=2 end @@ -52,7 +52,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.filter1(c,e,tp) return c:IsFaceup() and (not e or c:IsRelateToEffect(e)) - and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode()) + and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.filter2(c,code) return c:IsCode(code) and c:IsAbleToHand() @@ -60,7 +60,7 @@ end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter1,1,nil,nil,tp) end Duel.SetTargetCard(eg) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter1,nil,e,tp) @@ -71,7 +71,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end local tc=g:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local ag=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil,tc:GetCode()) + local ag=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter2),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,2,nil,tc:GetCode()) Duel.SendtoHand(ag,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,ag) -end +end \ No newline at end of file diff --git a/official/c74335036.lua b/official/c74335036.lua index b5d8431487..118df8aef0 100644 --- a/official/c74335036.lua +++ b/official/c74335036.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -30,8 +30,8 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7436169.lua b/official/c7436169.lua index b320a624c0..49c912f2a0 100644 --- a/official/c7436169.lua +++ b/official/c7436169.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -25,15 +25,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST,id} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.tgfilter(c,e,tp) return c:IsFaceup() and c:IsCanBeEffectTarget(e) and ((c:IsCode(CARD_VISAS_STARFROST) and c:IsControler(tp)) diff --git a/official/c74364659.lua b/official/c74364659.lua index 0c4733d803..804dc23d6b 100644 --- a/official/c74364659.lua +++ b/official/c74364659.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.ctcon) tc:RegisterEffect(e1) end diff --git a/official/c74367458.lua b/official/c74367458.lua index 4290bd5596..73164516e8 100644 --- a/official/c74367458.lua +++ b/official/c74367458.lua @@ -54,4 +54,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Equip(tp,tc,c) end -end +end \ No newline at end of file diff --git a/official/c74371660.lua b/official/c74371660.lua index 4dac581191..eb896095a2 100644 --- a/official/c74371660.lua +++ b/official/c74371660.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -30,10 +30,6 @@ end function s.dscon(e) return e:GetHandler():GetOverlayCount()~=0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,atk) return c:IsNegatableMonster() and c:GetAttack()0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c74393852.lua b/official/c74393852.lua index 8cbed945c6..43d0e4d0fa 100644 --- a/official/c74393852.lua +++ b/official/c74393852.lua @@ -76,4 +76,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c74402414.lua b/official/c74402414.lua index 5d93f1efa2..97a08980e0 100644 --- a/official/c74402414.lua +++ b/official/c74402414.lua @@ -77,13 +77,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local rg=g:Select(tp,5,5,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) for tc in aux.Next(rg) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end e:GetLabelObject():Clear() e:GetLabelObject():Merge(rg) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) - if rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if rp==1-tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(0x25,1) end end @@ -129,4 +129,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if ct>0 and c:GetPreviousControler()==tp then Duel.Damage(tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74416026.lua b/official/c74416026.lua index 9f6593af98..70995d7378 100644 --- a/official/c74416026.lua +++ b/official/c74416026.lua @@ -1,4 +1,5 @@ --デストーイ・マーチ +--Frightfur March local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} function s.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0xad) + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_FRIGHTFUR) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsExists(s.filter,1,nil,tp) - and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.spfilter(c,e,tp) - return c:IsType(TYPE_FUSION) and c:IsLevelAbove(8) and c:IsSetCard(0xad) + return c:IsType(TYPE_FUSION) and c:IsLevelAbove(8) and c:IsSetCard(SET_FRIGHTFUR) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -53,26 +54,26 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(sc) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_END) then e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else e:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) Duel.SpecialSummonComplete() sc:CompleteProcedure() - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0 + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0 end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74416224.lua b/official/c74416224.lua index 14fdebf1c1..7ccc59df4b 100644 --- a/official/c74416224.lua +++ b/official/c74416224.lua @@ -1,4 +1,5 @@ --ブラック・レイ・ランサー +--Black Ray Lancer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -34,12 +31,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c74426895.lua b/official/c74426895.lua index f31934c68c..e14bd1681a 100644 --- a/official/c74426895.lua +++ b/official/c74426895.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetValue(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x614d,0xc0} +s.listed_series={SET_SPIRITUAL_WATER_ART,SET_POSSESSED} function s.spfilter1(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() end @@ -109,7 +109,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsAbleToHand() and (c:IsSetCard(0x614d) or (c:IsSetCard(0xc0) and c:IsSpellTrap())) + return c:IsAbleToHand() and (c:IsSetCard(SET_SPIRITUAL_WATER_ART) or (c:IsSetCard(SET_POSSESSED) and c:IsSpellTrap())) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c74431740.lua b/official/c74431740.lua index 2e29f45c00..1fe921ff88 100644 --- a/official/c74431740.lua +++ b/official/c74431740.lua @@ -22,23 +22,23 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x104f} +s.listed_series={SET_ASSAULT_MODE} s.listed_names={CARD_ASSAULT_MODE} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.cfilter(c,e,tp,ft) - return c:IsSetCard(0x104f) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) + return c:IsSetCard(SET_ASSAULT_MODE) and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.filter(c,e,tp,cd) - return c:IsSetCard(0x104f) and not c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_ASSAULT_MODE) and not c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -78,5 +78,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 then return end Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c7443908.lua b/official/c7443908.lua index ce2cead0cb..c225677ab0 100644 --- a/official/c7443908.lua +++ b/official/c7443908.lua @@ -1,5 +1,5 @@ --- 地翔星ハヤテ --- Hayate the Earth Star +--地翔星ハヤテ +--Hayate the Earth Star local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -67,7 +67,7 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local tgp,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) - and tgp~=tp and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and eg:IsExists(s.filter2,1,nil,tp) + and tgp~=tp and re:IsMonsterEffect() and loc==LOCATION_MZONE and eg:IsExists(s.filter2,1,nil,tp) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -82,7 +82,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) c:RegisterEffect(e1) @@ -102,10 +102,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) c:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c74439492.lua b/official/c74439492.lua index 5daa9169b1..65cb49b3ec 100644 --- a/official/c74439492.lua +++ b/official/c74439492.lua @@ -1,4 +1,5 @@ --スクラップ・ポリッシュ +--Scrap Sheen local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x24) + return c:IsFaceup() and c:IsSetCard(SET_SCRAP) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -33,8 +34,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) ac:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c74440055.lua b/official/c74440055.lua index 8a1386cff9..0f05b7f0d7 100644 --- a/official/c74440055.lua +++ b/official/c74440055.lua @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c7445307.lua b/official/c7445307.lua index a9350f912e..7c427ecff3 100644 --- a/official/c7445307.lua +++ b/official/c7445307.lua @@ -1,4 +1,5 @@ --デュアル・アセンブルム +--Dual Assembwurm local s,id=GetID() function s.initial_effect(c) --spsummon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -32,7 +33,7 @@ function s.mzfilter(c,tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,c) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=-ft+1 if chk==0 then return ft>-2 and #rg>1 and (ft>0 or rg:IsExists(s.mzfilter,ct,nil,tp)) end @@ -66,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(math.ceil(atk/2)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() @@ -92,4 +93,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74458486.lua b/official/c74458486.lua index 5b61a107c8..332499e1a2 100644 --- a/official/c74458486.lua +++ b/official/c74458486.lua @@ -1,8 +1,10 @@ --援護射撃 +--Covering Fire local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) @@ -14,25 +16,27 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local phase=Duel.GetCurrentPhase() - return phase==PHASE_DAMAGE and not Duel.IsDamageCalculated() - and Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget() + local bc=Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE) and not Duel.IsDamageCalculated() and bc and bc:IsControler(tp) and bc:IsFaceup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end - if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,Duel.GetAttackTarget()) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,Duel.GetAttackTarget()) + local bc=Duel.GetAttackTarget() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:HasNonZeroAttack() and chkc~=bc end + if chk==0 then return Duel.IsExistingTarget(Card.HasNonZeroAttack,tp,LOCATION_MZONE,0,1,bc) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,Card.HasNonZeroAttack,tp,LOCATION_MZONE,0,1,1,bc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local at=Duel.GetAttackTarget() local tc=Duel.GetFirstTarget() - if at:IsFaceup() and at:IsRelateToBattle() and tc:IsRelateToEffect(e) and tc:IsFaceup() then + local bc=Duel.GetAttackTarget() + if bc:IsFaceup() and bc:IsRelateToBattle() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then + --The attacked monster gains ATK equal to that target's ATK, during the Damage Step only local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetValue(tc:GetAttack()) - at:RegisterEffect(e1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) + bc:RegisterEffect(e1) end end diff --git a/official/c744887.lua b/official/c744887.lua index 320f02e671..52a00d30a6 100644 --- a/official/c744887.lua +++ b/official/c744887.lua @@ -1,7 +1,6 @@ --虚の王 ウートガルザ --Utgarda, Generaider Boss of Delusion --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -19,9 +18,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.cfilter(c,tp) - return (c:IsRace(RACE_ROCK) or (c:IsSetCard(0x134) and c:IsMonster())) and (c:IsControler(tp) or c:IsFaceup()) + return (c:IsRace(RACE_ROCK) or (c:IsSetCard(SET_GENERAIDER) and c:IsMonster())) and (c:IsControler(tp) or c:IsFaceup()) end function s.check(sg,tp) return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,sg) @@ -43,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74506079.lua b/official/c74506079.lua index accb8869ad..3e21a2cea8 100644 --- a/official/c74506079.lua +++ b/official/c74506079.lua @@ -1,4 +1,5 @@ --ワーム・ゼロ +--Worm Zero local s,id=GetID() function s.initial_effect(c) --fusion material @@ -11,9 +12,9 @@ function s.initial_effect(c) e2:SetValue(s.matcheck) c:RegisterEffect(e2) end -s.material_setcode=0x3e +s.material_setcode=SET_WORM function s.ffilter(c,fc,sumtype,tp) - return c:IsSetCard(0x3e,fc,sumtype,tp) and c:IsRace(RACE_REPTILE,fc,sumtype,tp) + return c:IsSetCard(SET_WORM,fc,sumtype,tp) and c:IsRace(RACE_REPTILE,fc,sumtype,tp) end function s.matcheck(e,c) local ct=c:GetMaterial():GetClassCount(Card.GetCode) @@ -22,7 +23,7 @@ function s.matcheck(e,c) ae:SetType(EFFECT_TYPE_SINGLE) ae:SetCode(EFFECT_SET_ATTACK) ae:SetValue(ct*500) - ae:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + ae:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(ae) end if ct>=2 then @@ -35,7 +36,7 @@ function s.matcheck(e,c) e1:SetCountLimit(1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end if ct>=4 then @@ -48,7 +49,7 @@ function s.matcheck(e,c) e1:SetCost(s.tgcost) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end if ct>=6 then @@ -61,7 +62,7 @@ function s.matcheck(e,c) e1:SetCountLimit(1) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end end @@ -87,9 +88,9 @@ function s.costfilter(c) return c:IsRace(RACE_REPTILE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local rg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(rg,POS_FACEUP,REASON_COST) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -114,4 +115,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74509280.lua b/official/c74509280.lua index c9778c167a..395a0dc884 100644 --- a/official/c74509280.lua +++ b/official/c74509280.lua @@ -1,4 +1,5 @@ --Sin パラレルギア +--Malefic Parallel Gear local s,id=GetID() function s.initial_effect(c) --hand synchro @@ -22,12 +23,12 @@ function s.initial_effect(c) e1:SetOperation(s.synop) c:RegisterEffect(e1) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} function s.synfilter(e,c) - return c:IsLocation(LOCATION_HAND) and c:IsSetCard(0x23) and c:IsControler(e:GetHandlerPlayer()) + return c:IsLocation(LOCATION_HAND) and c:IsSetCard(SET_MALEFIC) and c:IsControler(e:GetHandlerPlayer()) end function s.synval(e,c,sc) - if c:IsSetCard(0x23) and c:IsLocation(LOCATION_HAND) then + if c:IsSetCard(SET_MALEFIC) and c:IsLocation(LOCATION_HAND) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_HAND_SYNCHRO+EFFECT_SYNCHRO_CHECK) @@ -64,4 +65,4 @@ function s.synchktg(e,c,sg,tg,ntg,tsg,ntsg) end function s.synop(e,tg,ntg,sg,lv,sc,tp) return #sg==2,false -end +end \ No newline at end of file diff --git a/official/c7452945.lua b/official/c7452945.lua index f6798c5204..dd4561cec1 100644 --- a/official/c7452945.lua +++ b/official/c7452945.lua @@ -1,4 +1,5 @@ --天命の聖剣 +--Noble Arms of Destiny local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -38,7 +39,7 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) end function s.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsRace(RACE_WARRIOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter2(chkc) end @@ -48,4 +49,4 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) -end +end \ No newline at end of file diff --git a/official/c74530899.lua b/official/c74530899.lua index 3b51393d89..dfa2c99c7a 100644 --- a/official/c74530899.lua +++ b/official/c74530899.lua @@ -1,4 +1,5 @@ --時械神メタイオン +--Metaion, the Timelord local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -36,7 +37,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.thcon) @@ -48,7 +49,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,2)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.tdcon) @@ -79,11 +80,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.SendtoHand(g,nil,REASON_EFFECT) local og=Duel.GetOperatedGroup() - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND+LOCATION_EXTRA) + local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND|LOCATION_EXTRA) Duel.Damage(1-tp,ct*300,REASON_EFFECT) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -92,6 +93,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74567889.lua b/official/c74567889.lua index 3133ce7606..421eb9a0fb 100644 --- a/official/c74567889.lua +++ b/official/c74567889.lua @@ -29,16 +29,16 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} s.listed_names={59054773} function s.matfilter(c,scard,sumtype,tp) - return not c:IsLinkMonster() and c:IsSetCard(0x135,scard,sumtype,tp) + return not c:IsLinkMonster() and c:IsSetCard(SET_IGNISTER,scard,sumtype,tp) end function s.thfilter(c) return c:IsCode(59054773) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -53,16 +53,16 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and re:GetHandler():GetBaseAttack()==2300 and re:GetHandler():IsRace(RACE_CYBERSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local zone=e:GetHandler():GetLinkedZone()&0x1f + local zone=e:GetHandler():GetLinkedZone()&ZONES_MMZ if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,nil,nil,zone)>0 end end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local zone=c:GetLinkedZone()&0x1f + local zone=c:GetLinkedZone()&ZONES_MMZ if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE,nil,nil,zone)>0 then Duel.MoveSequence(c,math.log(zone,2)) if c:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then @@ -73,8 +73,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c74576482.lua b/official/c74576482.lua index 9b63a07f48..6f0176e0d9 100644 --- a/official/c74576482.lua +++ b/official/c74576482.lua @@ -1,4 +1,5 @@ --コアキメイル・シーパンサー +--Koa'ki Meiru Sea Panther local s,id=GetID() function s.initial_effect(c) --cost @@ -26,7 +27,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -83,6 +84,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74577599.lua b/official/c74577599.lua index 24408f85a2..693675f2da 100644 --- a/official/c74577599.lua +++ b/official/c74577599.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.gysptg) e3:SetOperation(s.gyspop) c:RegisterEffect(e3) diff --git a/official/c74578720.lua b/official/c74578720.lua index 0047cc616f..7a52238b52 100644 --- a/official/c74578720.lua +++ b/official/c74578720.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_BATTLE_START) e1:SetCountLimit(1,id) e1:SetCondition(function(e,tp) return Duel.IsBattlePhase() and Duel.IsTurnPlayer(1-tp) end) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetOperation(s.reflectdamop) c:RegisterEffect(e1) --Special Summon this card diff --git a/official/c74580251.lua b/official/c74580251.lua index 9456762cd5..dc8825fb66 100644 --- a/official/c74580251.lua +++ b/official/c74580251.lua @@ -1,4 +1,5 @@ --セフィラの神意 +--Zefra Providence local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,10 +21,10 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0xc4} +s.listed_series={SET_ZEFRA} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xc4) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_ZEFRA) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -38,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xc4) and c:IsLocation(LOCATION_ONFIELD) + return c:IsFaceup() and c:IsSetCard(SET_ZEFRA) and c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,4 +51,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74582050.lua b/official/c74582050.lua index b7e4e3fbd5..05cf6559a0 100644 --- a/official/c74582050.lua +++ b/official/c74582050.lua @@ -1,4 +1,5 @@ --ダイナミスト・エラプション +--Dinomist Eruption local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.cfilter(c,tp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousSetCard(0xd8) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + and c:IsPreviousSetCard(SET_DINOMIST) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74583607.lua b/official/c74583607.lua index 3b8d188468..64e8eb074f 100644 --- a/official/c74583607.lua +++ b/official/c74583607.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) --special summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -28,16 +28,16 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xaf,0xae} -s.material_setcode=0xaf +s.listed_series={SET_DD,SET_DARK_CONTRACT} +s.material_setcode=SET_DD function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -59,7 +59,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp)) end function s.thfilter(c) - return c:IsSetCard(0xae) and c:IsAbleToHand() + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -73,4 +73,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74586817.lua b/official/c74586817.lua index d15ce114e9..1ea7f4992e 100644 --- a/official/c74586817.lua +++ b/official/c74586817.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) @@ -58,7 +58,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local hg=g:RandomSelect(1-tp,1) if #hg~=1 then return end local rg=hg+c - if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)==0 then return end + if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY)==0 then return end local retg=c:HasFlagEffect(id) and rg or hg retg:Match(Card.IsLocation,nil,LOCATION_REMOVED) aux.DelayedOperation(retg,PHASE_STANDBY,id+1,e,tp,s.retop,s.retcon,RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) @@ -86,7 +86,7 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg>0 then - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tg,REASON_EFFECT|REASON_RETURN) end end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c74591968.lua b/official/c74591968.lua index 3d231c4032..9ae5bf049e 100644 --- a/official/c74591968.lua +++ b/official/c74591968.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -40,9 +40,9 @@ function s.initial_effect(c) end s.listed_names={60482781} s.LVnum=4 -s.LVset=0x5f +s.LVset=SET_MYSTIC_SWORDSMAN function s.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() @@ -61,23 +61,19 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(60482781) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end @@ -85,4 +81,4 @@ end function s.sumcon(e,c,minc) if not c then return true end return false -end +end \ No newline at end of file diff --git a/official/c74593218.lua b/official/c74593218.lua index d2a5238a09..201b9b5e02 100644 --- a/official/c74593218.lua +++ b/official/c74593218.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -23,11 +23,7 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -46,8 +42,8 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c7459919.lua b/official/c7459919.lua index ce6184d5ec..63a0e26bb6 100644 --- a/official/c7459919.lua +++ b/official/c7459919.lua @@ -1,9 +1,9 @@ --- BF-刻夜のゾンダ --- Blackwing - Zonda the Timely Night --- Scripted by Hatter +--BF-刻夜のゾンダ +--Blackwing - Zonda the Dusk +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Cannot Special Summon monsters from Extra Deck, except Synchro Monsters + --Cannot Special Summon monsters from Extra Deck, except Synchro Monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) c:RegisterEffect(e1) - -- Lizard check + --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) - -- Return 1 monster to the hand + --Return 1 monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND) @@ -28,19 +28,19 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - -- Special Summon 1 Level 5 or higher "Blackwing" monster + --Special Summon 1 Level 5 or higher "Blackwing" monster local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,id) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -55,18 +55,18 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x33) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLACKWING) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and sc:IsAttackAbove(1) then Duel.BreakEffect() Duel.Damage(tp,sc:GetAttack(),REASON_EFFECT) diff --git a/official/c74605254.lua b/official/c74605254.lua index 6c624c057c..ecfd20dad0 100644 --- a/official/c74605254.lua +++ b/official/c74605254.lua @@ -1,4 +1,5 @@ --DD魔導賢者ガリレイ +--D/D Savant Galilei local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -17,7 +18,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_PZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.sccon) e3:SetTarget(s.sctg) @@ -32,20 +33,20 @@ function s.initial_effect(c) e4:SetRange(LOCATION_HAND) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1,id) - e4:SetCost(s.thcost) + e4:SetCost(Cost.SelfDiscard) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - return not c:IsSetCard(0xaf) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DD) and (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c,lv) - return c:IsFaceup() and not c:IsSetCard(0xaf) and c:IsLevelBelow(lv) + return c:IsFaceup() and not c:IsSetCard(SET_DD) and c:IsLevelBelow(lv) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,7 +65,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(scl) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) @@ -75,12 +76,8 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.thfilter(c) - return c:IsFaceup() and (c:IsSetCard(0xae) or c:IsSetCard(0xaf)) and c:IsAbleToHand() + return c:IsFaceup() and (c:IsSetCard(SET_DARK_CONTRACT) or c:IsSetCard(SET_DD)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -95,4 +92,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c74611888.lua b/official/c74611888.lua index 9b32b6d921..ee9747a6f7 100644 --- a/official/c74611888.lua +++ b/official/c74611888.lua @@ -1,4 +1,5 @@ --手のひら返し +--Turnabout local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c74627016.lua b/official/c74627016.lua index c9ae39bf3f..618828c95a 100644 --- a/official/c74627016.lua +++ b/official/c74627016.lua @@ -42,4 +42,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c74640994.lua b/official/c74640994.lua index 40ec245eff..7aff061950 100644 --- a/official/c74640994.lua +++ b/official/c74640994.lua @@ -7,21 +7,18 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_END_PHASE) - e1:SetCondition(s.condition) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_END_PHASE) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xed} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_SUBTERROR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xed) + return c:IsFaceup() and c:IsSetCard(SET_SUBTERROR) end function s.fufilter(c) - return c:IsFacedown() and c:IsSetCard(0xed) + return c:IsFacedown() and c:IsSetCard(SET_SUBTERROR) end function s.fdfilter(c) return s.filter(c) and c:IsCanTurnSet() @@ -48,7 +45,7 @@ end function s.effectfilter(e,ct) local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) local tc=te:GetHandler() - return tc:IsSetCard(0xed) + return tc:IsSetCard(SET_SUBTERROR) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -80,7 +77,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -91,9 +88,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DISEFFECT) e1:SetValue(s.effectfilter) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end if not c:IsRelateToEffect(e) then return end if c:IsSSetable(true) then @@ -102,4 +99,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEDOWN) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end -end +end \ No newline at end of file diff --git a/official/c74641045.lua b/official/c74641045.lua index 53881f0248..e12bd0c870 100644 --- a/official/c74641045.lua +++ b/official/c74641045.lua @@ -1,4 +1,5 @@ --マドルチェ・プディンセス +--Madolche Puddingcess local s,id=GetID() function s.initial_effect(c) --to deck @@ -45,7 +46,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.atkcon(e) diff --git a/official/c74644400.lua b/official/c74644400.lua index 460da336fa..06c2fc2edd 100644 --- a/official/c74644400.lua +++ b/official/c74644400.lua @@ -75,8 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c74652966.lua b/official/c74652966.lua index 709e1b9535..559c7a6639 100644 --- a/official/c74652966.lua +++ b/official/c74652966.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e3:SetCountLimit(1,{id,2}) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.linktg) e3:SetOperation(s.linkop) c:RegisterEffect(e3) @@ -127,4 +127,4 @@ function s.linkop(e,tp,eg,ep,ev,re,r,rp) if sc then Duel.LinkSummon(tp,sc) end -end +end \ No newline at end of file diff --git a/official/c74657662.lua b/official/c74657662.lua index 50c19bc1db..881dedc75f 100644 --- a/official/c74657662.lua +++ b/official/c74657662.lua @@ -1,7 +1,8 @@ --ヴァイロン・マテリアル +--Vylon Material local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x30)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_VYLON)) --Atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -20,13 +21,13 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x30) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_VYLON) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -39,4 +40,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c74665651.lua b/official/c74665651.lua index f1d40f929f..3db93dd3cd 100644 --- a/official/c74665651.lua +++ b/official/c74665651.lua @@ -1,7 +1,6 @@ --聖光の夢魔鏡 --Dream Mirror of Joy --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tftg) e2:SetOperation(s.tfop) c:RegisterEffect(e2) @@ -37,30 +36,29 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={CARD_DREAM_MIRROR_TERROR} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.filter(c,tp) return c:IsCode(CARD_DREAM_MIRROR_TERROR) and c:GetActivateEffect():IsActivatable(tp,true,true) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,tp) end if not Duel.CheckPhaseActivity() then Duel.RegisterFlagEffect(tp,CARD_MAGICAL_MIDBREAKER,RESET_CHAIN,0,1) end end function s.tfop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,tp):GetFirst() Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) end function s.imfilter(c) - return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_LIGHT) + return c:IsFaceup() and c:IsSetCard(SET_DREAM_MIRROR) and c:IsAttribute(ATTRIBUTE_LIGHT) end function s.limcond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.imfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.atfilter(c) - return c:IsFaceup() and c:IsSetCard(0x131) + return c:IsFaceup() and c:IsSetCard(SET_DREAM_MIRROR) end function s.atlimit(e,c) local g=Duel.GetMatchingGroup(s.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil) - return c:IsFaceup() and c:IsSetCard(0x131) and not g:GetMaxGroup(Card.GetLevel):IsContains(c) + return c:IsFaceup() and c:IsSetCard(SET_DREAM_MIRROR) and not g:GetMaxGroup(Card.GetLevel):IsContains(c) end \ No newline at end of file diff --git a/official/c74689476.lua b/official/c74689476.lua index e24a7a3b5e..2bb6e3805a 100644 --- a/official/c74689476.lua +++ b/official/c74689476.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c74694807.lua b/official/c74694807.lua index 4951dc4fe5..7052a1587e 100644 --- a/official/c74694807.lua +++ b/official/c74694807.lua @@ -24,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) else Duel.PayLPCost(tp,800) end end function s.filter(c,e,tp) - return (c:GetType()&0x41)==0x41 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -49,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -60,4 +60,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_DESTROY) and tc and tc:IsLocation(LOCATION_MZONE) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74701381.lua b/official/c74701381.lua index b7aa29a497..872bcde359 100644 --- a/official/c74701381.lua +++ b/official/c74701381.lua @@ -27,4 +27,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.value(e,c) return e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c74703140.lua b/official/c74703140.lua index cefb8eac26..89fd7e02b0 100644 --- a/official/c74703140.lua +++ b/official/c74703140.lua @@ -1,7 +1,8 @@ --裁きの鷹 +--Punished Eagle local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,41396436,7805359) -end +end \ No newline at end of file diff --git a/official/c74711057.lua b/official/c74711057.lua index 7f756a80ed..57e65ea1d6 100644 --- a/official/c74711057.lua +++ b/official/c74711057.lua @@ -1,4 +1,5 @@ --E・HERO ジ・アース +--Elemental HERO Terra Firma local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,10 +22,10 @@ function s.initial_effect(c) e2:SetValue(aux.fuslimit) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),0x3008) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),0x3008) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,e:GetHandler(),SET_ELEMENTAL_HERO) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,e:GetHandler(),SET_ELEMENTAL_HERO) e:SetLabel(g:GetFirst():GetAttack()) Duel.Release(g,REASON_COST) end @@ -35,6 +36,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c74713516.lua b/official/c74713516.lua index 78ba5a5acf..84896d7414 100644 --- a/official/c74713516.lua +++ b/official/c74713516.lua @@ -2,61 +2,54 @@ --Dark Mimic LV1 local s,id=GetID() function s.initial_effect(c) - --flip + --FLIP: Draw 1 card local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e1:SetTarget(s.drtg) + e1:SetOperation(s.drop) c:RegisterEffect(e1) - --special summon + --Special Summon 1 "Dark Mimic LV3" from your hand or Deck local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PHASE+PHASE_STANDBY) - e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetRange(LOCATION_MZONE) + e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_names={1102515} +s.listed_names={1102515} --"Dark Mimic LV3" s.LVnum=1 -s.LVset=0x53 -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) +s.LVset=SET_DARK_MIMIC +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end -function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return tp==Duel.GetTurnPlayer() -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(1102515) and c:IsCanBeSpecialSummoned(e,1,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() - if tc and Duel.SpecialSummon(tc,1,tp,tp,true,true,POS_FACEUP)>0 then - tc:CompleteProcedure() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if sc and Duel.SpecialSummon(sc,1,tp,tp,true,true,POS_FACEUP)>0 then + sc:CompleteProcedure() end end diff --git a/official/c74715061.lua b/official/c74715061.lua index 46417a00ed..00221a6d3f 100644 --- a/official/c74715061.lua +++ b/official/c74715061.lua @@ -1,5 +1,5 @@ --ストライピング・パートナー ---Striping Panther +--Striping Partner local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -33,7 +33,7 @@ function s.initial_effect(c) end function s.spcon1(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and rp==tp + return re:IsMonsterEffect() and loc==LOCATION_MZONE and rp==tp end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,4 +62,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c74717840.lua b/official/c74717840.lua index 7d6fa6fdf3..f170153d21 100644 --- a/official/c74717840.lua +++ b/official/c74717840.lua @@ -10,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2a) + return c:IsFaceup() and c:IsSetCard(SET_NATURIA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -24,9 +24,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c74728028.lua b/official/c74728028.lua index de2d87d87f..54f34ac72f 100644 --- a/official/c74728028.lua +++ b/official/c74728028.lua @@ -1,4 +1,5 @@ --エクシーズ・レセプション +--Xyz Reception local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,25 +39,25 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e3,true) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_SET_DEFENSE_FINAL) e4:SetValue(0) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e4,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c74730899.lua b/official/c74730899.lua index deb4f15998..2cb04fe1ae 100644 --- a/official/c74730899.lua +++ b/official/c74730899.lua @@ -1,4 +1,5 @@ --燃料電池メン +--Batteryman Fuel Cell local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x28) + return c:IsFaceup() and c:IsSetCard(SET_BATTERYMAN) end function s.spcon(e,c) if c==nil then return true end @@ -33,7 +34,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,2,nil) end function s.retcfilter(c) - return c:IsSetCard(0x28) + return c:IsSetCard(SET_BATTERYMAN) end function s.retfilter(c,e) return c:IsAbleToHand() and c:IsCanBeEffectTarget(e) @@ -56,4 +57,4 @@ function s.retop(e) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7473735.lua b/official/c7473735.lua index 6d94a86577..90e18b1236 100644 --- a/official/c7473735.lua +++ b/official/c7473735.lua @@ -93,4 +93,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not sc then return end local g=Group.FromCards(fc,sc) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c74741494.lua b/official/c74741494.lua index 0e450d6a03..c020df27ad 100644 --- a/official/c74741494.lua +++ b/official/c74741494.lua @@ -1,4 +1,5 @@ --能力調整 +--Level Tuning local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c74752631.lua b/official/c74752631.lua index 80454196a0..afce0739ee 100644 --- a/official/c74752631.lua +++ b/official/c74752631.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetCost(s.thcost) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) @@ -47,7 +47,7 @@ function s.lcheck(g,lc,sumtype,tp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:PlacesCounter(COUNTER_BUSHIDO) and c:IsAbleToHand() @@ -63,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c74762582.lua b/official/c74762582.lua index a1c01d301c..fe66ce192b 100644 --- a/official/c74762582.lua +++ b/official/c74762582.lua @@ -1,4 +1,5 @@ --Subterror Fiendess +--Subterror Fiendess local s,id=GetID() function s.initial_effect(c) --negate @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetCountLimit(1,id) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -27,16 +28,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} function s.discon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xed) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_SUBTERROR) and c:IsCanTurnSet() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -63,24 +60,24 @@ function s.posfilter(c) return c:IsFaceup() and c:IsCanTurnSet() end function s.spfilter(c,e,tp) - return c:IsSetCard(0xed) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) + return c:IsSetCard(SET_SUBTERROR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local g=Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc1=Duel.GetFirstTarget() if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and Duel.ChangePosition(tc1,POS_FACEDOWN_DEFENSE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_DEFENSE)~=0 then @@ -89,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c7478431.lua b/official/c7478431.lua index 28d0e1ce29..b29328880b 100644 --- a/official/c7478431.lua +++ b/official/c7478431.lua @@ -16,13 +16,13 @@ function s.initial_effect(c) e1:SetOperation(s.disop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.discon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) + return ep~=tp and re:IsMonsterEffect() and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)~=LOCATION_DECK and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x2a) and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_NATURIA) and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -43,4 +43,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74798297.lua b/official/c74798297.lua index 6a809cc9a1..a1d731fa34 100644 --- a/official/c74798297.lua +++ b/official/c74798297.lua @@ -1,7 +1,6 @@ --不知火流 才華の陣 --Shiranui Style Success --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -23,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.immtg) e2:SetOperation(s.immop) e2:SetHintTiming(TIMING_END_PHASE) @@ -49,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1) end @@ -74,7 +73,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c7480763.lua b/official/c7480763.lua index 4c34413586..b5c62b6c4a 100644 --- a/official/c7480763.lua +++ b/official/c7480763.lua @@ -1,8 +1,6 @@ --アーティファクト-ダグザ --Artifact Dagda ---Logical Nonsense - ---Substitute ID +--scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -32,16 +30,14 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end - --Part of "Artifact" archetype -s.listed_series={0x97} - +s.listed_series={SET_ARTIFACT} --Monsters with different names function s.matfilter(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end --"Artifact" monster that can be set as a spell function s.setfilter(c) - return c:IsSetCard(0x97) and c:IsMonster() and c:IsSSetable(true) + return c:IsSetCard(SET_ARTIFACT) and c:IsMonster() and c:IsSSetable(true) end --If the card/effect (other than this card) was activated on the field function s.setcon(e,tp,eg,ep,ev,re,r,rp) @@ -51,12 +47,12 @@ end --Activation legality function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end end --If a card/effect on the field is activated, set an "Artifact" from hand/deck, but destroy it later function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) if #g>0 then local c=e:GetHandler() local tc=g:GetFirst() @@ -69,12 +65,12 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - if Duel.GetCurrentPhase()==PHASE_END and Duel.GetTurnPlayer()~=tp then - e1:SetLabel(Duel.GetTurnCount()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + if Duel.IsPhase(PHASE_END) and Duel.IsTurnPlayer(1-tp) then + e1:SetLabel(Duel.GetTurnCount()) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,2) else - e1:SetLabel(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetLabel(0) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) end Duel.RegisterEffect(e1,tp) tc:CreateEffectRelation(e1) @@ -83,7 +79,7 @@ end --Check for flag function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - return Duel.GetTurnPlayer()~=tp and Duel.GetTurnCount()~=e:GetLabel() and tc:IsRelateToEffect(e) + return Duel.IsTurnPlayer(1-tp) and Duel.GetTurnCount()~=e:GetLabel() and tc:IsRelateToEffect(e) end --Destroy the set "Artifact" card function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -93,11 +89,11 @@ end --If this link summoned card is destroyed during opponent's turn function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK) and Duel.GetTurnPlayer()~=tp + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLinkSummoned() and Duel.GetTurnPlayer()~=tp end --Check for "Artifact" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x97) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_ARTIFACT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -113,4 +109,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c74820316.lua b/official/c74820316.lua index deafe0566a..a6d14755d0 100644 --- a/official/c74820316.lua +++ b/official/c74820316.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.tgcond) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -108,4 +108,4 @@ end function s.babeltgcond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) and c:IsPreviousLocation(LOCATION_EMZONE) and c:GetTurnID()==Duel.GetTurnCount() -end +end \ No newline at end of file diff --git a/official/c74822425.lua b/official/c74822425.lua index 83c6636b02..d9225c4585 100644 --- a/official/c74822425.lua +++ b/official/c74822425.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9d),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) --cannot spsummon local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -36,20 +36,20 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x9d} -s.material_setcode=0x9d +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL function s.matfilter(c,lc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_EARTH,lc,sumtype,tp) or c:IsHasEffect(4904633) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) + return loc==LOCATION_MZONE and re:IsMonsterEffect() and (re:GetHandler():GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x9d) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,SET_SHADDOLL) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) @@ -58,7 +58,7 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x9d) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,SET_SHADDOLL) if #g>0 then Duel.BreakEffect() Duel.SendtoGrave(g,REASON_EFFECT) @@ -66,7 +66,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74823665.lua b/official/c74823665.lua index 044866a6d5..dbff046c66 100644 --- a/official/c74823665.lua +++ b/official/c74823665.lua @@ -25,20 +25,20 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spfilter(c,tp) - return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -67,4 +67,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74825788.lua b/official/c74825788.lua index 74f2cab7ac..0725cac45d 100644 --- a/official/c74825788.lua +++ b/official/c74825788.lua @@ -1,6 +1,5 @@ --H-ヒートハート --H - Heated Heart - local s,id=GetID() function s.initial_effect(c) --Targeted monster gains 500 ATK, also inflict piercing damage @@ -26,7 +25,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) tc:RegisterEffect(e1) --Inflict piercing damage @@ -35,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c74839123.lua b/official/c74839123.lua index 73e9b796fd..ec9c45cd44 100644 --- a/official/c74839123.lua +++ b/official/c74839123.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_FUSION)) e2:SetCode(EFFECT_ADD_SETCODE) - e2:SetValue(0xad) + e2:SetValue(SET_FRIGHTFUR) c:RegisterEffect(e2) --return local e3=Effect.CreateEffect(c) @@ -27,20 +27,20 @@ function s.initial_effect(c) e3:SetOperation(s.tdop) c:RegisterEffect(e3) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} function s.cfilter(c) - return c:IsSetCard(0xad) and c:IsType(TYPE_FUSION) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_FRIGHTFUR) and c:IsType(TYPE_FUSION) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,2,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,2,2,nil) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsSetCard(0xad) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() + return c:IsSetCard(SET_FRIGHTFUR) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,6 +52,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74841885.lua b/official/c74841885.lua index 68e88d66cd..b39aef48da 100644 --- a/official/c74841885.lua +++ b/official/c74841885.lua @@ -41,7 +41,7 @@ function s.valcheck(e,c) e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e0:SetRange(LOCATION_MZONE) e0:SetCode(3682106) - e0:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e0:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e0) end if lbl~=0 then @@ -61,7 +61,7 @@ function s.valcheck(e,c) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distg) e1:SetLabel(lbl) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) --disable effect local e2=Effect.CreateEffect(c) @@ -70,7 +70,7 @@ function s.valcheck(e,c) e2:SetRange(LOCATION_MZONE) e2:SetLabel(lbl) e2:SetOperation(s.disop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e2) if lbl&TYPE_TRAP~=0 then local e3=Effect.CreateEffect(c) @@ -80,7 +80,7 @@ function s.valcheck(e,c) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTarget(s.distg) e3:SetLabel(TYPE_TRAP) - e3:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e3) end end @@ -96,4 +96,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) -end +end \ No newline at end of file diff --git a/official/c74845897.lua b/official/c74845897.lua index 6fdf9dd711..c6e8154448 100644 --- a/official/c74845897.lua +++ b/official/c74845897.lua @@ -1,4 +1,5 @@ --真炎の爆発 +--Rekindling local s,id=GetID() function s.initial_effect(c) --activate @@ -35,7 +36,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() for tc in aux.Next(g) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -43,7 +44,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetLabel(fid) e1:SetLabelObject(g) @@ -68,4 +69,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tg=g:Filter(s.rmfilter,nil,e:GetLabel()) g:DeleteGroup() Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74848038.lua b/official/c74848038.lua index 166943dc76..8fc1260e85 100644 --- a/official/c74848038.lua +++ b/official/c74848038.lua @@ -1,4 +1,5 @@ --死者転生 +--Monster Reincarnation local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.tgfilter(c) return c:IsMonster() and c:IsAbleToHand() @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c74850403.lua b/official/c74850403.lua index b33b53b684..12f821e63e 100644 --- a/official/c74850403.lua +++ b/official/c74850403.lua @@ -1,4 +1,5 @@ --星霜のペンデュラムグラフ +--Star Pendulumgraph local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,20 +29,20 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.evalue(e,re,rp) - return re:IsActiveType(TYPE_SPELL) and rp~=e:GetHandlerPlayer() + return re:IsSpellEffect() and rp~=e:GetHandlerPlayer() end function s.thcfilter(c,tp) - return c:IsType(TYPE_PENDULUM) and c:IsPreviousSetCard(0x98) + return c:IsType(TYPE_PENDULUM) and c:IsPreviousSetCard(SET_MAGICIAN) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_PZONE) + and c:IsPreviousLocation(LOCATION_MZONE|LOCATION_PZONE) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thcfilter,1,nil,tp) end function s.thfilter(c) - return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x98) and c:IsAbleToHand() + return c:IsType(TYPE_PENDULUM) and c:IsSetCard(SET_MAGICIAN) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -55,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c74852810.lua b/official/c74852810.lua index aa3b745706..4f73c50103 100644 --- a/official/c74852810.lua +++ b/official/c74852810.lua @@ -1,4 +1,5 @@ --オーバーレイ・キャプチャー +--Overlay Capture local s,id=GetID() function s.initial_effect(c) -- @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:CancelToGrave() Duel.Overlay(tc2,c) end -end +end \ No newline at end of file diff --git a/official/c74854609.lua b/official/c74854609.lua index 272875b385..4efc45c8a1 100644 --- a/official/c74854609.lua +++ b/official/c74854609.lua @@ -13,11 +13,11 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return d:IsFaceup() and d:IsSetCard(0x56) and a:IsControler(1-tp) + return d:IsFaceup() and d:IsSetCard(SET_INZEKTOR) and a:IsControler(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local a=Duel.GetAttacker() @@ -41,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) ec:RegisterEffect(e1) @@ -49,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) ec:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c74860293.lua b/official/c74860293.lua index 1a88fd18e7..17996df845 100644 --- a/official/c74860293.lua +++ b/official/c74860293.lua @@ -19,12 +19,12 @@ function s.initial_effect(c) end s.material={63977008} s.listed_names={63977008} -s.material_setcode=0x1017 +s.material_setcode=SET_SYNCHRON function s.tfilter(c,lc,stype,tp) return c:IsSummonCode(lc,stype,tp,63977008) or c:IsHasEffect(20932152) end function s.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -38,4 +38,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74875003.lua b/official/c74875003.lua index 2f8c1a6767..db1ed3414f 100644 --- a/official/c74875003.lua +++ b/official/c74875003.lua @@ -40,14 +40,14 @@ function s.initial_effect(c) e6:SetTarget(s.splimit) c:RegisterEffect(e6) end -s.listed_names={id,CARD_RA,10000020,10000000} +s.listed_names={id,CARD_RA,CARD_SLIFER,CARD_OBELISK} function s.filter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -55,14 +55,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ft>2 then ft=2 end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,ft,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,ft,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.sumval(e,c) - return not c:IsCode(10000000,CARD_RA,10000020) + return not c:IsCode(CARD_OBELISK,CARD_RA,CARD_SLIFER) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not se:GetHandler():IsCode(id) -end +end \ No newline at end of file diff --git a/official/c74879881.lua b/official/c74879881.lua index f711a676cf..1e5b65acea 100644 --- a/official/c74879881.lua +++ b/official/c74879881.lua @@ -1,5 +1,5 @@ --ミミックリル ---Mimickuril +--Mimikuril --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -27,7 +27,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then Duel.DisableShuffleCheck() local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(s.tdop) Duel.RegisterEffect(e2,tp) if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,1,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end Duel.SpecialSummonComplete() else @@ -54,5 +54,5 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) else return true end end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetLabelObject(),nil,1,REASON_EFFECT) -end + Duel.SendtoDeck(e:GetLabelObject(),nil,SEQ_DECKBOTTOM,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c74889525.lua b/official/c74889525.lua index e9c00f3f73..3e85583856 100644 --- a/official/c74889525.lua +++ b/official/c74889525.lua @@ -1,12 +1,11 @@ --黄金狂エルドリッチ ---El Rey Conquista Eldlich - +--Eldlich the Mad Golden Lord local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion summon procedure - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x142),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELDLICH),s.matfilter) --Name becomes "Eldlich the Golden Lord" while in monster zones local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -40,9 +39,8 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={CARD_GOLDEN_LORD} -s.listed_series={0x142} -s.material_setcode={0x142} - +s.listed_series={SET_ELDLICH} +s.material_setcode={SET_ELDLICH} function s.matfilter(c,fc,sumtype,tp) return c:IsRace(RACE_ZOMBIE,fc,sumtype,tp) and c:IsLevelAbove(5) end @@ -71,7 +69,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetControl(tc,tp) then local c=e:GetHandler() - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END --Cannot attack this turn local e1=Effect.CreateEffect(c) e1:SetDescription(3206) @@ -79,11 +77,11 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetReset(reset) - tc:RegisterEffect(e1) + tc:RegisterEffect(e1) --Cannot activate its effect local e2=e1:Clone() e2:SetDescription(3302) e2:SetCode(EFFECT_CANNOT_TRIGGER) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c74891384.lua b/official/c74891384.lua index 8c8f61876c..c8278d5d97 100644 --- a/official/c74891384.lua +++ b/official/c74891384.lua @@ -27,22 +27,22 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.dtcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x140) + return re and re:GetHandler():IsSetCard(SET_ADAMANCIPATOR) end function s.dtfilter(c) return c:IsRace(RACE_ROCK) and c:IsAbleToDeck() end function s.dttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.dtfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.dtfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.dtop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0)) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dtfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dtfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil):GetFirst() if tc then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) if not tc:IsLocation(LOCATION_EXTRA) then Duel.ConfirmDecktop(tp,1) end @@ -53,10 +53,10 @@ function s.tdfilter(c) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and c:IsAbleToDeck() end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) and c:IsAbleToDeck() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local tc=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil):GetFirst() Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,tp,LOCATION_GRAVE) if tc:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,tp,0) @@ -65,8 +65,8 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) - and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) + and c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 then Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c74892653.lua b/official/c74892653.lua index 2efffec6fa..bdff78c1a4 100644 --- a/official/c74892653.lua +++ b/official/c74892653.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) e3:SetOperation(s.scop) c:RegisterEffect(e3) end -s.listed_series={0x66} +s.listed_series={SET_WARRIOR} s.listed_names={84012625} s.synchro_tuner_required=1 s.synchro_nt_required=1 @@ -55,7 +55,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -74,7 +74,7 @@ function s.sccon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousPosition(POS_FACEUP) end function s.filter(c,e,tp) - return c:IsSetCard(0x66) and c:IsLevelBelow(8) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsSetCard(SET_WARRIOR) and c:IsLevelBelow(8) and c:IsType(TYPE_SYNCHRO) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -91,4 +91,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c7489323.lua b/official/c7489323.lua index 1850095d32..38a5d24b3f 100644 --- a/official/c7489323.lua +++ b/official/c7489323.lua @@ -1,4 +1,5 @@ --ミリス・レディエント +--Milus Radiant local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -19,4 +20,4 @@ function s.tg1(e,c) end function s.tg2(e,c) return c:IsAttribute(ATTRIBUTE_WIND) -end +end \ No newline at end of file diff --git a/official/c74920585.lua b/official/c74920585.lua index c624aafb1d..e4f9807243 100644 --- a/official/c74920585.lua +++ b/official/c74920585.lua @@ -1,14 +1,14 @@ --- 壱世壊に奏でる哀唱 --- Tearalaments Sulliek --- Scripted by Hatter +--壱世壊に奏でる哀唱 +--Tearlaments Sulliek +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - -- Negate 1 face-up monster's effects + --Negate 1 face-up monster's effects local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE) @@ -22,7 +22,7 @@ function s.initial_effect(c) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) - -- Add 1 "Tearlaments" monster to the hand + --Add 1 "Tearlaments" monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -56,7 +56,7 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not (tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e)) or tc:IsImmuneToEffect(e) then return end - -- Negate its effects + --Negate its effects Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) diff --git a/official/c74923978.lua b/official/c74923978.lua index 2b1ec380f3..9e3d72f531 100644 --- a/official/c74923978.lua +++ b/official/c74923978.lua @@ -1,4 +1,5 @@ --強制接収 +--Forced Requisition local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,5 +32,5 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local ct=e:GetLabel() - Duel.DiscardHand(1-tp,nil,ct,ct,REASON_EFFECT+REASON_DISCARD) -end + Duel.DiscardHand(1-tp,nil,ct,ct,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c74926274.lua b/official/c74926274.lua index a0b7e419bd..f00ce2c32d 100644 --- a/official/c74926274.lua +++ b/official/c74926274.lua @@ -1,4 +1,5 @@ --ペンデュラム・アライズ +--Pendulum Rising local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -67,4 +68,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c74936480.lua b/official/c74936480.lua index cff05cb1ee..967ff78ecd 100644 --- a/official/c74936480.lua +++ b/official/c74936480.lua @@ -1,12 +1,12 @@ --- ダイノルフィア・ステルスベギア --- Dinoruffia Stealthbegia --- Scripted by Hatter +--ダイノルフィア・ステルスベギア +--Dinomorphia Stealthbergia +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 “Dinoruffia” monsters with different names + --2 “Dinoruffia” monsters with different names Fusion.AddProcMixN(c,true,true,s.ffilter,2) - -- No LP Cost + --No LP Cost local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_LPCOST_CHANGE) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetCondition(function(e) return Duel.GetLP(e:GetHandlerPlayer())<=2000 end) e1:SetValue(s.lpcostval) c:RegisterEffect(e1) - -- Damage + --Damage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE) @@ -28,7 +28,7 @@ function s.initial_effect(c) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -41,9 +41,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.ffilter(c,fc,sumtype,tp,sub,mg,sg) - return c:IsSetCard(0x175,fc,sumtype,tp) and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetCode(fc,sumtype,tp),fc,sumtype,tp)) + return c:IsSetCard(SET_DINOMORPHIA,fc,sumtype,tp) and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetCode(fc,sumtype,tp),fc,sumtype,tp)) end function s.fusfilter(c,code,fc,sumtype,tp) return c:IsSummonCode(fc,sumtype,tp,code) and not c:IsHasEffect(511002961) @@ -52,11 +52,11 @@ function s.lpcostval(e,re,rp,val) if not re then return val end local rc=re:GetHandler() if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsTrap() then return 0 end - if re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x175) then return 0 end + if re:IsMonsterEffect() and rc:IsSetCard(SET_DINOMORPHIA) then return 0 end return val end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetBaseAttack()>0 + return rp==1-tp and re:IsMonsterEffect() and re:GetHandler():GetBaseAttack()>0 end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -73,7 +73,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x175) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOMORPHIA) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c74937659.lua b/official/c74937659.lua index 2b2e3e4045..971d1c7fb4 100644 --- a/official/c74937659.lua +++ b/official/c74937659.lua @@ -1,5 +1,5 @@ --サブテラーマリスの妖魔 ---Subterror Behemoth Apparition +--Subterror Behemoth Fiendess local s,id=GetID() function s.initial_effect(c) --link summon @@ -34,9 +34,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} function s.matfilter(c) - return c:IsSetCard(0xed) and c:GetOriginalLevel()>=0 + return c:IsSetCard(SET_SUBTERROR) and c:GetOriginalLevel()>=0 end function s.matcheck(e,c) local g=c:GetMaterial():Filter(s.matfilter,nil) @@ -45,7 +45,7 @@ function s.matcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) end function s.tgfilter(c) @@ -86,13 +86,13 @@ function s.thfilter(c) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c74952447.lua b/official/c74952447.lua index 877f0b575a..d9bab86551 100644 --- a/official/c74952447.lua +++ b/official/c74952447.lua @@ -1,4 +1,5 @@ --かつて神と呼ばれた亀 +--Testudo erat Numen local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsAttackAbove(1800) -end +end \ No newline at end of file diff --git a/official/c7496001.lua b/official/c7496001.lua index ada992567e..75ceed44f0 100644 --- a/official/c7496001.lua +++ b/official/c7496001.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.accost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.actg) e2:SetOperation(s.acop) c:RegisterEffect(e2) @@ -55,10 +55,6 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1,true) end end -function s.accost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,tp) return c:IsCode(60884672) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) @@ -68,7 +64,7 @@ function s.actg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.acop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() if not tc then return end if tc:IsFieldSpell() then Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c74968065.lua b/official/c74968065.lua index aad8bd3a8c..73fb8f5bde 100644 --- a/official/c74968065.lua +++ b/official/c74968065.lua @@ -1,4 +1,5 @@ --ヘカテリス +--Hecatrice local s,id=GetID() function s.initial_effect(c) --search @@ -7,17 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={1353770} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(1353770) and c:IsAbleToHand() end @@ -32,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c74974229.lua b/official/c74974229.lua index cd2a68a8f0..a5aebe88f9 100644 --- a/official/c74974229.lua +++ b/official/c74974229.lua @@ -1,5 +1,5 @@ --エーリアン・ソルジャー M/フレーム ---Alien Shocktrooper Mighty/Frame +--Alien Shocktrooper M-Frame --scripted by Logical Nonsense --Substitute ID local s,id=GetID() @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -43,7 +43,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil) e:SetLabel(g:GetFirst():GetOriginalLevel()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -61,7 +61,7 @@ end --Check if this card was destroyed function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end --Check for opponent's monsters with A-Counters function s.acfilter(c) @@ -88,5 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end local sg=aux.SelectUnselectGroup(g,e,tp,1,ct,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end - +end \ No newline at end of file diff --git a/official/c74976215.lua b/official/c74976215.lua index b3df8768ee..2ef720ea35 100644 --- a/official/c74976215.lua +++ b/official/c74976215.lua @@ -1,4 +1,5 @@ --クロスソード・ハンター +--Cross-Sword Beetle local s,id=GetID() function s.initial_effect(c) --pierce @@ -16,4 +17,4 @@ function s.condition(e) end function s.target(e,c) return c:IsRace(RACE_INSECT) -end +end \ No newline at end of file diff --git a/official/c74983881.lua b/official/c74983881.lua index 863d956d70..9dc2bb7513 100644 --- a/official/c74983881.lua +++ b/official/c74983881.lua @@ -10,18 +10,14 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={74983882} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return Duel.IsPhase(PHASE_MAIN2) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c74997493.lua b/official/c74997493.lua index 155eedc8c7..41ecbb7384 100644 --- a/official/c74997493.lua +++ b/official/c74997493.lua @@ -28,7 +28,7 @@ function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,13 +41,13 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(aux.zptcon(Card.IsFaceup)) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) if c:GetMaterialCount()==2 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end end if c:GetMaterialCount()>=3 then @@ -59,12 +59,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e3:SetCountLimit(1) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) if c:GetMaterialCount()==3 then - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4)) else - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,5)) end end end @@ -79,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -104,7 +104,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_LINK) and c:GetMaterialCount()==4 + return c:IsLinkSummoned() and c:GetMaterialCount()==4 end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,4) end @@ -124,4 +124,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT) Duel.SortDeckbottom(p,p,3) end -end +end \ No newline at end of file diff --git a/official/c7500772.lua b/official/c7500772.lua index 205d8d2a24..1fb43c9846 100644 --- a/official/c7500772.lua +++ b/official/c7500772.lua @@ -1,4 +1,5 @@ --イーグル・シャーク +--Eagle Shark local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -32,4 +33,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c75014062.lua b/official/c75014062.lua index e049492e15..04e06ace47 100644 --- a/official/c75014062.lua +++ b/official/c75014062.lua @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,th) end end -end +end \ No newline at end of file diff --git a/official/c75025112.lua b/official/c75025112.lua index 17f47eb97f..3fc34be11d 100644 --- a/official/c75025112.lua +++ b/official/c75025112.lua @@ -17,13 +17,13 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,true,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.CanSummonOrSet,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,true,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,true,nil):GetFirst() if tc then Duel.SummonOrSet(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c75041269.lua b/official/c75041269.lua index 4fd40397fc..9fa40662ba 100644 --- a/official/c75041269.lua +++ b/official/c75041269.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.ctcon) e2:SetOperation(s.ctop) c:RegisterEffect(e2) @@ -53,7 +53,7 @@ function s.dcon(e) return e:GetHandler():GetCounter(0x1b)>=4 end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x1b,1) @@ -74,13 +74,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if g and #g>0 then Duel.SpecialSummon(g,1,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75043725.lua b/official/c75043725.lua index a4dac282d9..6efb333792 100644 --- a/official/c75043725.lua +++ b/official/c75043725.lua @@ -1,4 +1,5 @@ --冥界の使者 +--Emissary of the Afterlife local s,id=GetID() function s.initial_effect(c) --search @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g1,nil,REASON_EFFECT) if tc1 then Duel.ConfirmCards(1-tp,tc1) end if tc2 then Duel.ConfirmCards(tp,tc2) end -end +end \ No newline at end of file diff --git a/official/c75046994.lua b/official/c75046994.lua index 6d56eec925..e82fb3a792 100644 --- a/official/c75046994.lua +++ b/official/c75046994.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.PayLPCost(600)) + e2:SetCost(Cost.PayLP(600)) e2:SetTarget(s.thsptg) e2:SetOperation(s.thspop) c:RegisterEffect(e2) @@ -53,23 +53,23 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function s.thspfilter(c,e,tp,sp_chk) return c:IsSetCard(SET_PUNK) and c:IsMonster() and not c:IsLevel(8) - and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) + and (c:IsAbleToHand() or (sp_chk and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,sp_chk) + local sp_chk=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,sp_chk) end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) diff --git a/official/c75047173.lua b/official/c75047173.lua index f8e5c51140..e2707afa12 100644 --- a/official/c75047173.lua +++ b/official/c75047173.lua @@ -10,9 +10,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_NEOS} -s.listed_series={0x8} +s.listed_series={SET_HERO} function s.spfilter(c) - return c:IsType(TYPE_FUSION) and c:ListsArchetypeAsMaterial(0x8) + return c:IsType(TYPE_FUSION) and c:ListsArchetypeAsMaterial(SET_HERO) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsAbleToDeck)),tp,LOCATION_GRAVE,0,nil)+ @@ -21,7 +21,7 @@ end function s.extraop(e,tc,tp,sg) local rg=sg:Filter(Card.IsFacedown,nil) if #rg>0 then Duel.ConfirmCards(1-tp,rg) end - local gyrmg=sg:Filter(Card.IsLocation,nil,LOCATION_GRAVE+LOCATION_REMOVED) + local gyrmg=sg:Filter(Card.IsLocation,nil,LOCATION_GRAVE|LOCATION_REMOVED) if #gyrmg>0 then Duel.HintSelection(gyrmg,true) end Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK) @@ -36,7 +36,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TO_DECK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e1:SetCode(EFFECT_CANNOT_TO_HAND) diff --git a/official/c75059201.lua b/official/c75059201.lua index 6d6cacc994..da6b2d6a79 100644 --- a/official/c75059201.lua +++ b/official/c75059201.lua @@ -52,7 +52,7 @@ function s.initial_effect(c) e6:SetCondition(s.actcon) c:RegisterEffect(e6) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkval(e,c) return c:GetLevel()*300 end @@ -71,7 +71,7 @@ function s.tglimit(e,c) return c~=e:GetHandler() end function s.tgval(e,re,rp) - if not aux.tgoval(e,re,rp) or not re:IsActiveType(TYPE_MONSTER) then return false end + if not aux.tgoval(e,re,rp) or not re:IsMonsterEffect() then return false end local c=re:GetHandler() local lv=e:GetHandler():GetLevel() if c:GetRank()>0 then @@ -81,7 +81,7 @@ function s.tgval(e,re,rp) else return false end end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -90,12 +90,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.actcon(e) if not e:GetHandler():IsLevelAbove(7) then return false end @@ -103,5 +103,5 @@ function s.actcon(e) if not a then return false end local d=a:GetBattleTarget() if a:IsControler(1-e:GetHandler():GetControler()) then a,d=d,a end - return a and a:IsSetCard(0x107) -end + return a and a:IsSetCard(SET_FA) +end \ No newline at end of file diff --git a/official/c75064463.lua b/official/c75064463.lua index de59de1544..12f2c71503 100644 --- a/official/c75064463.lua +++ b/official/c75064463.lua @@ -1,4 +1,5 @@ --ハーピィ・クィーン +--Harpie Queen local s,id=GetID() function s.initial_effect(c) --search @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -16,16 +17,11 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e2) end s.listed_names={75782277} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(75782277) and c:IsAbleToHand() end @@ -39,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c75078585.lua b/official/c75078585.lua index 76ca0b77fb..8510512fc3 100644 --- a/official/c75078585.lua +++ b/official/c75078585.lua @@ -1,4 +1,5 @@ --スクランブル・エッグ +--Scramble Egg local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end s.listed_names={36472900} function s.cfilter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -24,14 +25,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75081613.lua b/official/c75081613.lua index f48ace9e1f..1c9883411b 100644 --- a/official/c75081613.lua +++ b/official/c75081613.lua @@ -37,14 +37,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -68,4 +68,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75083197.lua b/official/c75083197.lua index d0ffbb5566..c6324143fc 100644 --- a/official/c75083197.lua +++ b/official/c75083197.lua @@ -1,5 +1,5 @@ --告天子竜パイレン ---Pairen the Skylark Dragon +--Dragonlark Pairen --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -25,10 +25,10 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.spcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -43,10 +43,6 @@ function s.indescon(e) return Duel.IsExistingMatchingCard(s.indesfil,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end --Detach 1 material as cost -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end --filter for Level 5 or lower monsters function s.spfilter(c,e,tp) return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -66,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75105429.lua b/official/c75105429.lua index 453953f2f2..f1c8c572c1 100644 --- a/official/c75105429.lua +++ b/official/c75105429.lua @@ -1,4 +1,5 @@ --シンクロ・イジェクション +--Synchro Ejection local s,id=GetID() function s.initial_effect(c) --remove @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT)~=0 then Duel.Draw(1-tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75109441.lua b/official/c75109441.lua index e49f1e0fc2..4644dc29d8 100644 --- a/official/c75109441.lua +++ b/official/c75109441.lua @@ -1,4 +1,5 @@ --半蛇人サクズィー +--Cobraman Sakuzy local s,id=GetID() function s.initial_effect(c) --turn set @@ -21,7 +22,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -35,4 +36,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ConfirmCards(tp,g) end -end +end \ No newline at end of file diff --git a/official/c75116619.lua b/official/c75116619.lua index 5f6f3eead9..7cb3209396 100644 --- a/official/c75116619.lua +++ b/official/c75116619.lua @@ -30,21 +30,21 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={id} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and not c:IsCode(id) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.costfilter(c) - return c:IsSetCard(0x3d) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -65,7 +65,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.vfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and not c:IsCode(id) end function s.valcon(e) return Duel.IsExistingMatchingCard(s.vfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,2,nil) diff --git a/official/c75119040.lua b/official/c75119040.lua index 7db28cd975..3037c33ce2 100644 --- a/official/c75119040.lua +++ b/official/c75119040.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10b),3,3) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TINDANGLE),3,3) --atk local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -34,17 +34,17 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} s.listed_names={94365540,75119041} function s.cfilter(c) - return c:IsSetCard(0x10b) and c:IsMonster() + return c:IsSetCard(SET_TINDANGLE) and c:IsMonster() end function s.atkcon(e) local g=Duel.GetMatchingGroup(s.cfilter,e:GetHandler():GetControler(),LOCATION_GRAVE,0,nil) return g:GetClassCount(Card.GetCode)>=3 and g:IsExists(Card.IsCode,1,nil,94365540) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10b) + return c:IsFaceup() and c:IsSetCard(SET_TINDANGLE) end function s.atkval(e,c) return c:GetLinkedGroup():FilterCount(s.atkfilter,nil)*500 @@ -53,15 +53,15 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetAttackAnnouncedCount()>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x10b,TYPES_TOKEN,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) + if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_TINDANGLE,TYPES_TOKEN,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x10b,TYPES_TOKEN,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_TINDANGLE,TYPES_TOKEN,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c7512044.lua b/official/c7512044.lua index ea97d81c41..d96b57f329 100644 --- a/official/c7512044.lua +++ b/official/c7512044.lua @@ -1,4 +1,5 @@ --精神統一 +--Gather Your Mind local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c75130221.lua b/official/c75130221.lua index fcee925362..7630ffbc42 100644 --- a/official/c75130221.lua +++ b/official/c75130221.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.extrafilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end @@ -47,7 +47,7 @@ function s.extraval(chk,summon_type,e,...) local c=e:GetHandler() if chk==0 then local tp,sc=... - if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(0x101) or Duel.GetFlagEffect(tp,id)>0 then + if summon_type~=SUMMON_TYPE_LINK or not sc:IsSetCard(SET_CODE_TALKER) or Duel.GetFlagEffect(tp,id)>0 then return Group.CreateGroup() else table.insert(s.flagmap[c],c:RegisterFlagEffect(id,0,0,1)) @@ -57,7 +57,7 @@ function s.extraval(chk,summon_type,e,...) local sg,sc,tp=... if summon_type&SUMMON_TYPE_LINK == SUMMON_TYPE_LINK and #sg>0 then Duel.Hint(HINT_CARD,tp,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end elseif chk==2 then for _,eff in ipairs(s.flagmap[c]) do @@ -70,7 +70,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() e:SetLabel(0) if c:IsPreviousLocation(LOCATION_ONFIELD) then e:SetLabel(1) end - return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x101) + return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_CODE_TALKER) end function s.disfilter(c) return c:IsFaceup() and not (c:GetAttack()==0 and c:IsDisabled()) @@ -90,20 +90,20 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c75132317.lua b/official/c75132317.lua index 3c55771cee..55cff5a61d 100644 --- a/official/c75132317.lua +++ b/official/c75132317.lua @@ -28,15 +28,15 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.tgfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0x7c) and c:IsSpellTrap() + return c:IsControler(tp) and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.tgfilter,1,nil,tp) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() @@ -54,7 +54,7 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1 end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) local nc=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,2,nil) diff --git a/official/c75141056.lua b/official/c75141056.lua index d7d8bcd0bc..bacfce2981 100644 --- a/official/c75141056.lua +++ b/official/c75141056.lua @@ -12,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.tgfilter(c) return c:IsFaceup() and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_DECK,0,1,nil,c) end function s.cfilter(c,tc) - return c:IsSetCard(0x3008) and not c:IsCode(tc:GetCode()) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_ELEMENTAL_HERO) and not c:IsCode(tc:GetCode()) and c:IsMonster() and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc) end @@ -35,9 +35,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(gc:GetCode()) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c75147529.lua b/official/c75147529.lua index c3582995f5..b3945a83d7 100644 --- a/official/c75147529.lua +++ b/official/c75147529.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e2:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) diff --git a/official/c75153328.lua b/official/c75153328.lua index 8d458ee23e..8f5e0caa15 100644 --- a/official/c75153328.lua +++ b/official/c75153328.lua @@ -1,5 +1,5 @@ --強制切断 ---Creature Disconnection +--Packet Swap --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then Duel.SwapControl(a,b) end -end +end \ No newline at end of file diff --git a/official/c75157704.lua b/official/c75157704.lua index 5efbb25be4..caba219588 100644 --- a/official/c75157704.lua +++ b/official/c75157704.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x14e} +s.listed_series={SET_DUAL_AVATAR} function s.filter(c) - return c:IsSpellTrap() and c:IsSetCard(0x14e) and not c:IsCode(id) + return c:IsSpellTrap() and c:IsSetCard(SET_DUAL_AVATAR) and not c:IsCode(id) and c:IsAbleToRemoveAsCost() and c:CheckActivateEffect(false,true,false)~=nil end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c75162696.lua b/official/c75162696.lua index 842afd8b0d..4c333bde62 100644 --- a/official/c75162696.lua +++ b/official/c75162696.lua @@ -1,4 +1,5 @@ --ウィクトーリア +--Victoria local s,id=GetID() function s.initial_effect(c) --spsummon @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsRace(RACE_DRAGON) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75180828.lua b/official/c75180828.lua index 0a508e5b4b..d1b74195a6 100644 --- a/official/c75180828.lua +++ b/official/c75180828.lua @@ -1,4 +1,5 @@ --水精鱗-サルフアビス +--Mermail Abyssbalaen local s,id=GetID() function s.initial_effect(c) --special summon @@ -33,13 +34,13 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.cfilter(c) - return c:IsSetCard(0x74) and c:IsDiscardable() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MERMAIL) and c:IsDiscardable() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,4,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,4,4,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,4,4,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -55,7 +56,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.descount(c) - return c:IsSetCard(0x74) and c:IsMonster() + return c:IsSetCard(SET_MERMAIL) and c:IsMonster() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end @@ -74,17 +75,17 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.rfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x74) + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(SET_MERMAIL) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.rfilter,1,false,nil,e:GetHandler()) end @@ -105,9 +106,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLE_START) e1:SetTarget(s.destg2) e1:SetOperation(s.desop2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_PHASE|PHASE_END,0,1) end end function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -120,4 +121,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if d~=nil and d:IsRelateToBattle() and d:IsDefensePos() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75190122.lua b/official/c75190122.lua index b7e17b6b39..215380d822 100644 --- a/official/c75190122.lua +++ b/official/c75190122.lua @@ -1,4 +1,5 @@ --黒・爆・裂・破・魔・導 +--Dark Burning Magic local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75195825.lua b/official/c75195825.lua index 71f6ac9025..b9e5954dd7 100644 --- a/official/c75195825.lua +++ b/official/c75195825.lua @@ -1,4 +1,5 @@ --竜剣士マスターP +--Master Pendulum, the Dracoslayer local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,4 +29,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75198893.lua b/official/c75198893.lua index f2a8ff5a34..b1308ac836 100644 --- a/official/c75198893.lua +++ b/official/c75198893.lua @@ -32,7 +32,7 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(tc:GetOriginalCode()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Change ATK/DEF local e2=e1:Clone() @@ -59,7 +59,7 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e6:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e6:SetReset(RESET_EVENT+RESETS_REDIRECT+RESET_PHASE+PHASE_END) + e6:SetReset(RESET_EVENT|RESETS_REDIRECT|RESET_PHASE|PHASE_END) e6:SetValue(LOCATION_REMOVED) c:RegisterEffect(e6) end \ No newline at end of file diff --git a/official/c75209824.lua b/official/c75209824.lua index c7ebcba742..afaef9b3d3 100644 --- a/official/c75209824.lua +++ b/official/c75209824.lua @@ -1,4 +1,5 @@ --ガーディアン・スタチュー +--Guardian Statue local s,id=GetID() function s.initial_effect(c) --turn set @@ -24,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c75214390.lua b/official/c75214390.lua index c6a156caa6..cebf038d68 100644 --- a/official/c75214390.lua +++ b/official/c75214390.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -48,8 +48,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetOverlayCount()*500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c75215744.lua b/official/c75215744.lua index 428ce29f5b..218b445d00 100644 --- a/official/c75215744.lua +++ b/official/c75215744.lua @@ -59,7 +59,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()>0 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()>0 end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) local effs=e:GetLabel() diff --git a/official/c75220074.lua b/official/c75220074.lua index 939df95a7c..05d1bcc652 100644 --- a/official/c75220074.lua +++ b/official/c75220074.lua @@ -1,5 +1,5 @@ --鎧竜-アームド・ドラゴン- ---Armored Dragon +--Armed Dragon, the Armored Dragon local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -20,13 +20,13 @@ function s.spfilter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Cannot attack directly this turn local e1=Effect.CreateEffect(e:GetHandler()) @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c75223115.lua b/official/c75223115.lua index 1c230b63b3..91f2acb946 100644 --- a/official/c75223115.lua +++ b/official/c75223115.lua @@ -48,10 +48,10 @@ function s.initial_effect(c) e7:SetRange(LOCATION_SZONE) e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e7:SetCondition(s.discon) - e7:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x23)) + e7:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MALEFIC)) c:RegisterEffect(e7) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} s.listed_names={27564031} function s.filter(c,tp) return c:IsCode(27564031) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) @@ -70,24 +70,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_FZONE) e1:SetTargetRange(LOCATION_FZONE,LOCATION_FZONE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end end function s.discon(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.stuff(c) local mt=c:GetMetatable() - return c:IsFaceup() and mt.has_malefic_unique and mt.has_malefic_unique[c]==true and not c:IsDisabled() and c:IsSetCard(0x23) + return c:IsFaceup() and mt.has_malefic_unique and mt.has_malefic_unique[c]==true and not c:IsDisabled() and c:IsSetCard(SET_MALEFIC) end function s.validitycheck() return Duel.IsExistingMatchingCard(s.stuff,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.rmfilter(c,...) - return c:IsFaceup() and c:IsSetCard(0x23) and c:IsCode(...) + return c:IsFaceup() and c:IsSetCard(SET_MALEFIC) and c:IsCode(...) end function s.rmfilter2(c,fieldid,...) return c:GetFieldID()0 then Duel.Destroy(sg,REASON_RULE) Duel.Readjust() end -end +end \ No newline at end of file diff --git a/official/c75249652.lua b/official/c75249652.lua index 3d63d42d16..8623095955 100644 --- a/official/c75249652.lua +++ b/official/c75249652.lua @@ -1,4 +1,5 @@ --業炎のバリア -ファイヤー・フォース- +--Blazing Mirror Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c75252099.lua b/official/c75252099.lua index d6f01874e2..b5d1ff7394 100644 --- a/official/c75252099.lua +++ b/official/c75252099.lua @@ -1,4 +1,5 @@ --ローズ・バード +--Bird of Roses local s,id=GetID() function s.initial_effect(c) --special summon @@ -34,4 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c75253697.lua b/official/c75253697.lua index 008a3b2af9..5d63e13785 100644 --- a/official/c75253697.lua +++ b/official/c75253697.lua @@ -13,16 +13,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=72 -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) -end function s.dfilter(c,pos) return c:IsPosition(pos) end @@ -48,6 +44,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c75285069.lua b/official/c75285069.lua index a4a9b13b8a..1f6e2a22cb 100644 --- a/official/c75285069.lua +++ b/official/c75285069.lua @@ -1,4 +1,5 @@ --モイスチャー星人 +--Moisture Creature local s,id=GetID() function s.initial_effect(c) --summon with 3 tribute @@ -18,7 +19,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_TRIBUTE+1 end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -28,4 +29,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75286621.lua b/official/c75286621.lua index 2c072749ee..0c6256200e 100644 --- a/official/c75286621.lua +++ b/official/c75286621.lua @@ -23,13 +23,13 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cfilter(c,rtype) return c:IsType(rtype) and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rtype=(re:GetActiveType()&0x7) + local rtype=(re:GetActiveType()&(TYPE_MONSTER|TYPE_SPELL|TYPE_TRAP)) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,rtype) end Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST,nil,rtype) end diff --git a/official/c75292259.lua b/official/c75292259.lua index 642032547a..26a79b784f 100644 --- a/official/c75292259.lua +++ b/official/c75292259.lua @@ -1,4 +1,5 @@ --ポセイドン・オオカブト +--Great Poseidon Beetle local s,id=GetID() function s.initial_effect(c) --chain attack @@ -12,9 +13,9 @@ end function s.atcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() + return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() and bc:GetBattlePosition()==POS_FACEUP_ATTACK and c:CanChainAttack(3) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack(e:GetHandler():GetBattleTarget()) -end +end \ No newline at end of file diff --git a/official/c75294187.lua b/official/c75294187.lua index 63cbeacb2f..6d1d8ee0fb 100644 --- a/official/c75294187.lua +++ b/official/c75294187.lua @@ -27,7 +27,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_MZONE|LOCATION_GRAVE) end function s.hlfilter(c) - return c:IsNormalTrap() and (c:IsSetCard(SET_HOLE) or c:IsSetCard(SET_TRAP_HOLE)) + return c:IsNormalTrap() and c:IsSetCard({SET_HOLE,SET_TRAP_HOLE}) end function s.rmfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) @@ -44,4 +44,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75304793.lua b/official/c75304793.lua index 2c7f075494..5b9081f63a 100644 --- a/official/c75304793.lua +++ b/official/c75304793.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_FZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1066)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SYMPHONIC_WARRIOR)) e3:SetValue(s.atkval) c:RegisterEffect(e3) --counter @@ -35,10 +35,10 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.counter_place_list={0x35} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x1066) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re and re:GetHandler():IsSetCard(SET_SYMPHONIC_WARRIOR) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x35,1) @@ -47,13 +47,13 @@ function s.atkval(e,c) return e:GetHandler():GetCounter(0x35)*100 end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1066) + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local b1=Duel.IsCanRemoveCounter(tp,1,0,0x35,5,REASON_COST) local b2=Duel.IsCanRemoveCounter(tp,1,0,0x35,7,REASON_COST) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) if chk==0 then return ct>0 and (b1 or b2) end local op=0 if b1 and b2 then @@ -72,7 +72,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) else e:SetCategory(CATEGORY_REMOVE) Duel.RemoveCounter(tp,1,0,0x35,7,REASON_COST) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD|LOCATION_GRAVE) end end function s.rmfilter(c) @@ -88,9 +88,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,ct*300,REASON_EFFECT) else Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,ct,nil) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,ct,nil) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c75311421.lua b/official/c75311421.lua index 1c3a1cb8b5..0f5a87fd49 100644 --- a/official/c75311421.lua +++ b/official/c75311421.lua @@ -1,9 +1,9 @@ --- ボティス --- Votis --- Scripted by Hatter +--ボティス +--Votis +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Add to hand + --Add to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.exctg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Excavate and sort cards + --Excavate and sort cards local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -55,7 +55,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:GetTurnID()==Duel.GetTurnCount() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_NORMAL) + return c:GetTurnID()==Duel.GetTurnCount() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsNormalSummoned() end function s.sdop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end diff --git a/official/c75326861.lua b/official/c75326861.lua index 77f57d0488..c96d6b29b1 100644 --- a/official/c75326861.lua +++ b/official/c75326861.lua @@ -1,4 +1,5 @@ --天刑王 ブラック・ハイランダー +--Dark Highlander local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -49,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,des*400,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c75347539.lua b/official/c75347539.lua index 580e6735cc..ed0ea450e1 100644 --- a/official/c75347539.lua +++ b/official/c75347539.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -70,10 +70,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Release(g,REASON_COST) g:DeleteGroup() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp,code) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -101,4 +97,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if #g~=3 or ft<3 then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c75361204.lua b/official/c75361204.lua index a1b9e2b4cd..d13bec31ae 100644 --- a/official/c75361204.lua +++ b/official/c75361204.lua @@ -1,4 +1,5 @@ --グレイドル・スプリット +--Graydle Split local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,16 +9,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xd1} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_GRAYDLE} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -29,20 +27,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then Duel.Equip(tp,c,tc) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) @@ -54,15 +52,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCost(s.spcost) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipTarget() and Duel.GetTurnPlayer()==tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return e:GetHandler():GetEquipTarget() and Duel.IsTurnPlayer(tp) + and (Duel.IsMainPhase()) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end @@ -70,11 +68,11 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(e:GetHandler(),REASON_COST) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GRAYDLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter2(c,e,tp,code) - return c:IsSetCard(0xd1) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GRAYDLE) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -100,8 +98,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc2=g2:GetFirst() Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc1:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + tc2:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() g1:Merge(g2) g1:KeepAlive() @@ -132,4 +130,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75363626.lua b/official/c75363626.lua index 67a984a7aa..d7da32aedb 100644 --- a/official/c75363626.lua +++ b/official/c75363626.lua @@ -1,4 +1,5 @@ --マドルチェ・シューバリエ +--Madolche Chouxvalier local s,id=GetID() function s.initial_effect(c) --to deck @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetValue(s.atktg) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -31,9 +32,9 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.atktg(e,c) - return c:IsFaceup() and c:GetCode()~=id and c:IsSetCard(0x71) -end + return c:IsFaceup() and c:GetCode()~=id and c:IsSetCard(SET_MADOLCHE) +end \ No newline at end of file diff --git a/official/c75364199.lua b/official/c75364199.lua index cc33d70994..4864b37c5d 100644 --- a/official/c75364199.lua +++ b/official/c75364199.lua @@ -1,5 +1,5 @@ --相視相殺 ---Stalemate +--Mutually Affured Destruction --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -16,7 +16,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_PUBLIC) e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -25,11 +25,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetTargetRange(1,1) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.aclimit(e,re,tp) local rc=re:GetHandler() return Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_HAND,1,nil,rc:GetCode()) -end - +end \ No newline at end of file diff --git a/official/c75366958.lua b/official/c75366958.lua index d36b08e1ef..f870ac09f3 100644 --- a/official/c75366958.lua +++ b/official/c75366958.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 @@ -31,5 +31,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x11a) -end + return not c:IsSetCard(SET_DINOWRESTLER) +end \ No newline at end of file diff --git a/official/c75367227.lua b/official/c75367227.lua index 4763c732b9..fdb3c2d2af 100644 --- a/official/c75367227.lua +++ b/official/c75367227.lua @@ -1,4 +1,5 @@ --ゴーストリック・アルカード +--Ghostrick Alucard local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -35,13 +36,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.tg(e,c) - return c~=e:GetHandler() and (c:IsFacedown() or c:IsSetCard(0x8d)) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return c~=e:GetHandler() and (c:IsFacedown() or c:IsSetCard(SET_GHOSTRICK)) end function s.desfilter(c) return c:IsFacedown() @@ -60,7 +57,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x8d) and c:IsAbleToHand() + return c:IsSetCard(SET_GHOSTRICK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -75,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c75372290.lua b/official/c75372290.lua index fc8a5258d7..0c1ca63349 100644 --- a/official/c75372290.lua +++ b/official/c75372290.lua @@ -1,4 +1,5 @@ --絶対防御将軍 +--Total Defense Shogun local s,id=GetID() function s.initial_effect(c) --to defense @@ -36,4 +37,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsAttackPos() and c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c75375465.lua b/official/c75375465.lua index 97575edf00..7f2059711f 100644 --- a/official/c75375465.lua +++ b/official/c75375465.lua @@ -1,4 +1,5 @@ --地獄の番熊 +--Pandemonium Watchbear local s,id=GetID() function s.initial_effect(c) --indes @@ -17,4 +18,4 @@ function s.indtg(e,c) end function s.indval(e,re,tp) return e:GetHandler():GetControler()~=tp -end +end \ No newline at end of file diff --git a/official/c75380687.lua b/official/c75380687.lua index 9143ebbc99..40dec0bf6f 100644 --- a/official/c75380687.lua +++ b/official/c75380687.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.material_setcode=0x10a2 +s.material_setcode=SET_DARK_MAGICIAN s.listed_names={CARD_DARK_MAGICIAN,1784686} function s.splimit(e,se,sp,st) return (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION or se:GetHandler():IsCode(1784686) @@ -56,7 +56,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct*100) c:RegisterEffect(e1) end @@ -77,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsRace(RACE_SPELLCASTER) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75392615.lua b/official/c75392615.lua index 51a192218a..39e55d273b 100644 --- a/official/c75392615.lua +++ b/official/c75392615.lua @@ -1,27 +1,24 @@ --マインド・ハック +--Mind Haxorz local s,id=GetID() function s.initial_effect(c) --confirm local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.filter(c) return (c:IsOnField() and c:IsFacedown()) or (c:IsLocation(LOCATION_HAND) and not c:IsPublic()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_HAND|LOCATION_ONFIELD,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_HAND|LOCATION_ONFIELD,nil) Duel.ConfirmCards(tp,g) Duel.ShuffleHand(1-tp) -end +end \ No newline at end of file diff --git a/official/c7540107.lua b/official/c7540107.lua index 23f273f7a8..4e7d61d934 100644 --- a/official/c7540107.lua +++ b/official/c7540107.lua @@ -36,12 +36,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.incon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xfc) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -55,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -63,7 +63,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -76,5 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c75402014.lua b/official/c75402014.lua index b9677e7e63..6f35359494 100644 --- a/official/c75402014.lua +++ b/official/c75402014.lua @@ -1,7 +1,6 @@ --竜装合体 ドラゴニック・ホープレイ ---Dragonic Utopia Ray +--Ultimate Dragonic Utopia Ray --Scripted by Larry126 - Duel.LoadCardScript("c56840427.lua") local s,id=GetID() function s.initial_effect(c) @@ -39,16 +38,15 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x107e} +s.listed_series={SET_ZW} s.xyz_number=39 - function s.filter(c,tc,tp) - if not (c:IsSetCard(0x107e) and not c:IsForbidden()) then return false end + if not (c:IsSetCard(SET_ZW) and not c:IsForbidden()) then return false end local effs={c:GetCardEffect(id)} for _,te in ipairs(effs) do if te:GetValue()(tc,c,tp) then return true end @@ -57,14 +55,14 @@ function s.filter(c,tc,tp) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e:GetHandler(),tp) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e:GetHandler(),tp) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,c,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,c,tp) local tc=g:GetFirst() if tc then local eff=tc:GetCardEffect(id) @@ -76,12 +74,8 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsContains(e:GetHandler()) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x107e) and c:IsOriginalType(TYPE_MONSTER) + return c:IsFaceup() and c:IsSetCard(SET_ZW) and c:IsOriginalType(TYPE_MONSTER) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsNegatable() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) end @@ -100,22 +94,22 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c7541475.lua b/official/c7541475.lua index 8f71246672..b69f052da9 100644 --- a/official/c7541475.lua +++ b/official/c7541475.lua @@ -1,4 +1,5 @@ --カブキ・ドラゴン +--Kabuki Dragon local s,id=GetID() function s.initial_effect(c) --position @@ -23,4 +24,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() then Duel.ChangePosition(d,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c75416738.lua b/official/c75416738.lua index 1efd6c9e40..95a3eb7a28 100644 --- a/official/c75416738.lua +++ b/official/c75416738.lua @@ -66,5 +66,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.immfilter(e,te) local c=te:GetOwner() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(SET_HOLE) or c:IsSetCard(SET_TRAP_HOLE)) -end + return c:IsNormalTrap() and (c:IsSetCard(SET_HOLE) or c:IsSetCard(SET_TRAP_HOLE)) +end \ No newline at end of file diff --git a/official/c75417459.lua b/official/c75417459.lua index f829e5131a..4215169d45 100644 --- a/official/c75417459.lua +++ b/official/c75417459.lua @@ -1,4 +1,5 @@ --拘束解除 +--Release Restraint local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,15 +30,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c75421661.lua b/official/c75421661.lua index 70b3bfd934..b52dfb4236 100644 --- a/official/c75421661.lua +++ b/official/c75421661.lua @@ -1,4 +1,5 @@ --ドドドガッサー +--Dododo Swordsman local s,id=GetID() function s.initial_effect(c) --atkup @@ -23,7 +24,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e:GetHandler():RegisterEffect(e1) end function s.filter(c,e) @@ -41,4 +42,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75425043.lua b/official/c75425043.lua index cccb558954..f87ca0be1e 100644 --- a/official/c75425043.lua +++ b/official/c75425043.lua @@ -1,6 +1,5 @@ --PSYフレームギア・α --PSY-Framegear Alpha - local s,id=GetID() function s.initial_effect(c) c:EnableUnsummonable() @@ -26,9 +25,8 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xc1} +s.listed_series={SET_PSY_FRAME} s.listed_names={CARD_PSYFRAME_DRIVER} - function s.splimit(e,se,sp,st) return se:IsHasType(EFFECT_TYPE_ACTIONS) end @@ -42,32 +40,32 @@ function s.spfilter2(c,e,tp) return c:IsCode(CARD_PSYFRAME_DRIVER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.thfilter0,tp,LOCATION_DECK,0,1,c) end function s.thfilter0(c) - return c:IsSetCard(0xc1) and not c:IsCode(id) + return c:IsSetCard(SET_PSY_FRAME) and not c:IsCode(id) end function s.thfilter(c) - return c:IsSetCard(0xc1) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PSY_FRAME) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g==0 then return end local tc=g:GetFirst() local c=e:GetHandler() local fid=c:GetFieldID() Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() g:AddCard(c) g:KeepAlive() diff --git a/official/c75425320.lua b/official/c75425320.lua index 4342313f98..cf2d33f44a 100644 --- a/official/c75425320.lua +++ b/official/c75425320.lua @@ -1,4 +1,5 @@ --真竜凰の使徒 +--Disciples of the True Dracophoenix local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,9 +41,9 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.tdfilter(c) - return c:IsSetCard(0xf9) and c:IsAbleToDeck() + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -58,17 +59,17 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tg=Duel.GetTargetCards(e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end function s.sumfilter(c) - return c:IsSetCard(0xf9) and c:IsSummonable(true,nil,1) + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsSummonable(true,nil,1) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end @@ -89,9 +90,9 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -99,4 +100,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75433814.lua b/official/c75433814.lua index 3330bfb4bb..12a7ca0942 100644 --- a/official/c75433814.lua +++ b/official/c75433814.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -37,7 +37,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) for tc in g:Iter() do tc:AddCounter(0x1024,1) end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,2) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)~=0 and Duel.GetTurnPlayer()~=tp @@ -55,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75434695.lua b/official/c75434695.lua index bfd8eb3d44..a666dce1ac 100644 --- a/official/c75434695.lua +++ b/official/c75434695.lua @@ -1,4 +1,5 @@ --E・HERO フォレストマン +--Elemental HERO Woodsman local s,id=GetID() function s.initial_effect(c) --to hand @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.con) e1:SetTarget(s.tg) @@ -16,20 +17,20 @@ function s.initial_effect(c) end s.listed_names={CARD_POLYMERIZATION} function s.con(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c75448086.lua b/official/c75448086.lua index f34f31b802..ace83695fd 100644 --- a/official/c75448086.lua +++ b/official/c75448086.lua @@ -1,5 +1,5 @@ --王の試練 ---Generaid Quest +--Generaider Boss Quest --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -14,12 +14,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.cfilter(c) - return c:IsSetCard(0x134) and c:IsMonster() and not c:IsPublic() and c:IsAbleToDeck() + return c:IsSetCard(SET_GENERAIDER) and c:IsMonster() and not c:IsPublic() and c:IsAbleToDeck() end function s.thfilter(c) - return not c:IsCode(id) and c:IsSetCard(0x134) and c:IsSpellTrap() and c:IsAbleToHand() + return not c:IsCode(id) and c:IsSetCard(SET_GENERAIDER) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) @@ -39,7 +39,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) Duel.ShuffleDeck(tp) Duel.BreakEffect() - Duel.SendtoDeck(rc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(rc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c75452921.lua b/official/c75452921.lua index e1df6a6871..16bc43e785 100644 --- a/official/c75452921.lua +++ b/official/c75452921.lua @@ -31,14 +31,14 @@ function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.desfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetSequence()<5 + return c:IsSpecialSummoned() and c:GetSequence()<5 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end @@ -66,5 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.indtg(e,c) return c:GetMutualLinkedGroupCount()>0 -end - +end \ No newline at end of file diff --git a/official/c75457624.lua b/official/c75457624.lua index 9fcdcd9ce7..0c0da7af52 100644 --- a/official/c75457624.lua +++ b/official/c75457624.lua @@ -1,4 +1,5 @@ --霊獣の相絆 +--Ritual Beast's Bond local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.cfilter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) @@ -26,7 +27,7 @@ function s.rescon(sg,e,tp,mg) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg) end function s.spfilter(c,e,tp,sg) - return c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,sg,c) > 0 + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,sg,c) > 0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75487237.lua b/official/c75487237.lua index eefe88d1f5..579d445b96 100644 --- a/official/c75487237.lua +++ b/official/c75487237.lua @@ -1,4 +1,5 @@ --ミドル・シールド・ガードナー +--Mid Shield Gardna local s,id=GetID() function s.initial_effect(c) --turn set @@ -22,7 +23,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then + if re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return #tg==1 and tg:GetFirst()==e:GetHandler() and e:GetHandler():IsFacedown() else @@ -44,4 +45,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(eg,REASON_EFFECT) end Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c7548747.lua b/official/c7548747.lua index 71b43ff8ac..692882ce98 100644 --- a/official/c7548747.lua +++ b/official/c7548747.lua @@ -1,5 +1,5 @@ --大いなる魔導 ---Theologia Magistus +--Magistus Theurgy --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -15,16 +15,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.tgfilter(c,tp,check) - return c:IsFaceup() and c:IsSetCard(0x152) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE,0,1,c,check) + return c:IsFaceup() and c:IsSetCard(SET_MAGISTUS) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_EXTRA|LOCATION_MZONE|LOCATION_GRAVE,0,1,c,check) end function s.eqfilter(c,check) return not c:IsForbidden() and c:IsMonster() - and ((check and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_EXTRA)) or (c:IsSetCard(0x152) and not c:IsLevel(4))) + and ((check and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_EXTRA)) or (c:IsSetCard(SET_MAGISTUS) and not c:IsLevel(4))) end function s.chkfilter(c,typ) - return c:IsMonster() and c:IsSetCard(0x152) and c:IsType(typ) + return c:IsMonster() and c:IsSetCard(SET_MAGISTUS) and c:IsType(typ) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local check=Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_GRAVE,0,1,nil,TYPE_FUSION) @@ -46,14 +46,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_GRAVE,0,1,nil,TYPE_XYZ) and Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_GRAVE,0,1,nil,TYPE_LINK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_EXTRA+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,tc,check) + local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_EXTRA|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,tc,check) local eq=g:GetFirst() if eq then Duel.Equip(tp,eq,tc,true) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) eq:RegisterEffect(e1) diff --git a/official/c75498415.lua b/official/c75498415.lua index 1bd79c67bf..22485c4181 100644 --- a/official/c75498415.lua +++ b/official/c75498415.lua @@ -1,4 +1,5 @@ --BF-暁のシロッコ +--Blackwing - Sirocco the Dawn local s,id=GetID() function s.initial_effect(c) --summon & set with no tribute @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 @@ -33,10 +34,10 @@ function s.ntcon(e,c,minc) and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -50,7 +51,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(g:GetFirst():GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -65,11 +66,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) end end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c75500286.lua b/official/c75500286.lua index 68b83208fb..b1ae44f907 100644 --- a/official/c75500286.lua +++ b/official/c75500286.lua @@ -1,4 +1,5 @@ --封印の黄金櫃 +--Gold Sarcophagus local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,16 +25,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) e1:SetLabel(0) tg:RegisterEffect(e1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -42,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) else e:SetLabel(1) end -end +end \ No newline at end of file diff --git a/official/c75524092.lua b/official/c75524092.lua index 83522e9fa9..da9bd8eb9c 100644 --- a/official/c75524092.lua +++ b/official/c75524092.lua @@ -50,7 +50,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_USE_AS_COST) e1:SetTargetRange(LOCATION_HAND,0) e1:SetTarget(s.limittg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_TRIGGER) @@ -62,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.limittg(e,c) return c:IsCode(id) -end +end \ No newline at end of file diff --git a/official/c75525309.lua b/official/c75525309.lua index 255c8314d6..d733041501 100644 --- a/official/c75525309.lua +++ b/official/c75525309.lua @@ -1,4 +1,5 @@ --六武派二刀流 +--Six Style - Dual Wield local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local ct=#g local tg=g:GetFirst() - return ct==1 and tg:IsFaceup() and tg:IsAttackPos() and tg:IsSetCard(0x3d) + return ct==1 and tg:IsFaceup() and tg:IsAttackPos() and tg:IsSetCard(SET_SIX_SAMURAI) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:GetControler()~=tp and chkc:IsOnField() and chkc:IsAbleToHand() end @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75539614.lua b/official/c75539614.lua index bac46b5954..827f759ede 100644 --- a/official/c75539614.lua +++ b/official/c75539614.lua @@ -37,4 +37,4 @@ function s.val(e,c) local ct=e:GetHandler():GetFlagEffectLabel(id) if not ct then return 0 end return ct -end +end \ No newline at end of file diff --git a/official/c75560629.lua b/official/c75560629.lua index 630b8d9dc4..33c767eb87 100644 --- a/official/c75560629.lua +++ b/official/c75560629.lua @@ -1,4 +1,5 @@ --フリント +--Flint local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter,s.eqlimit) @@ -64,4 +65,4 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() return c:IsReason(REASON_LOST_TARGET) and ec and ec:IsReason(REASON_DESTROY) -end +end \ No newline at end of file diff --git a/official/c75574498.lua b/official/c75574498.lua index 6ee5b5fb63..527114299a 100644 --- a/official/c75574498.lua +++ b/official/c75574498.lua @@ -1,4 +1,5 @@ --プリンセス・コロン +--Princess Cologne local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -37,20 +38,20 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCode(EVENT_TO_GRAVE) e4:SetCondition(s.spcon2) - e4:SetCost(s.spcost2) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.sptg2) e4:SetOperation(s.spop2) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_names={81587028} +s.listed_names={81587028} --"Box of Friends" function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.spfilter1(c,e,tp) return c:IsCode(81587028) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter1(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter1(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -73,23 +74,19 @@ end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter2(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c75620895.lua b/official/c75620895.lua index f08712b5ca..7a0717cf40 100644 --- a/official/c75620895.lua +++ b/official/c75620895.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end @@ -39,10 +35,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1) + c:CopyEffect(code,RESET_EVENT|RESETS_STANDARD,1) end -end +end \ No newline at end of file diff --git a/official/c75622824.lua b/official/c75622824.lua index 8eb6de0157..a72d8fccdf 100644 --- a/official/c75622824.lua +++ b/official/c75622824.lua @@ -49,8 +49,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c75646520.lua b/official/c75646520.lua index 9873a14cf0..ff0dc4b675 100644 --- a/official/c75646520.lua +++ b/official/c75646520.lua @@ -1,4 +1,5 @@ --金属探知器 +--Metal Detector local s,id=GetID() function s.initial_effect(c) --activate @@ -20,9 +21,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distarget) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.distarget(e,c) - return c:GetType()==TYPE_CONTINUOUS+TYPE_TRAP -end + return c:IsContinuousTrap() +end \ No newline at end of file diff --git a/official/c75652080.lua b/official/c75652080.lua index 2e3a6771d5..859f3c3b10 100644 --- a/official/c75652080.lua +++ b/official/c75652080.lua @@ -1,4 +1,5 @@ --ダブル・サイクロン +--Double Cyclone local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7565547.lua b/official/c7565547.lua index 19d3bd7e02..7234233170 100644 --- a/official/c7565547.lua +++ b/official/c7565547.lua @@ -32,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.EquipComplete() Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75660578.lua b/official/c75660578.lua index fa8eb046b6..d9e22d3092 100644 --- a/official/c75660578.lua +++ b/official/c75660578.lua @@ -3,45 +3,53 @@ --Scripted by Hel local s,id=GetID() function s.initial_effect(c) + --You can only control 1 "Hela, Generaider Boss of Doom" c:SetUniqueOnField(1,0,id) - --special summon + --Special Summon 1 "Generaider" monster or 1 Zombie monster from your GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCountLimit(1,id) e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) + e1:SetCountLimit(1,id) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x134} -function s.cfilter(c,e,tp,ft) - return (c:IsRace(RACE_ZOMBIE) or (c:IsSetCard(0x134) and c:IsMonster())) - and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) +s.listed_names={id} +s.listed_series={SET_GENERAIDER} +function s.spcostfilter(c,e,tp) + return (c:IsSetCard(SET_GENERAIDER) or c:IsRace(RACE_ZOMBIE)) and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return not c:IsCode(code) and (c:IsRace(RACE_ZOMBIE) or c:IsSetCard(0x134)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return (c:IsSetCard(SET_GENERAIDER) or c:IsRace(RACE_ZOMBIE)) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,e,tp,ft) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,e,tp,ft) - Duel.Release(g,REASON_COST) - e:SetLabel(g:GetFirst():GetCode()) +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + e:SetLabel(-100) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,aux.ReleaseCheckMMZ,nil,e,tp) end + local rc=Duel.SelectReleaseGroupCost(tp,s.spcostfilter,1,1,false,aux.ReleaseCheckMMZ,nil,e,tp):GetFirst() + e:SetLabel(rc:GetCode()) + Duel.Release(rc,REASON_COST) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local tc=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetLabel()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,tp,LOCATION_GRAVE) +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local label=e:GetLabel() + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,label) end + if chk==0 then + local res=label==-100 + e:SetLabel(0) + return res + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,label) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end diff --git a/official/c75672051.lua b/official/c75672051.lua index 730cf1254f..45161e8240 100644 --- a/official/c75672051.lua +++ b/official/c75672051.lua @@ -41,14 +41,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(math.floor(tc:GetAttack()/2)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) Duel.BreakEffect() Duel.Destroy(c,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_EFFECT+REASON_BATTLE)~=0 + return r&(REASON_EFFECT|REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -66,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75673220.lua b/official/c75673220.lua index 758795d062..6dbd0399d3 100644 --- a/official/c75673220.lua +++ b/official/c75673220.lua @@ -1,4 +1,5 @@ --スナップドラゴン +--Snapdragon local s,id=GetID() function s.initial_effect(c) --remove @@ -22,7 +23,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local rg=g:RandomSelect(tp,1) local tc=rg:GetFirst() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -30,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +46,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.SendtoHand(tc,1-tp,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75675029.lua b/official/c75675029.lua index c89dc5dc4b..4b55ad188d 100644 --- a/official/c75675029.lua +++ b/official/c75675029.lua @@ -1,4 +1,5 @@ --記憶破壊王 +--Memory Crush King local s,id=GetID() function s.initial_effect(c) --remove @@ -20,16 +21,16 @@ function s.filter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) if #g~=0 then Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*1000) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT) if ct~=0 then Duel.Damage(1-tp,ct*1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75676192.lua b/official/c75676192.lua index 4a3be792a4..9c39840a53 100644 --- a/official/c75676192.lua +++ b/official/c75676192.lua @@ -48,12 +48,12 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkval(e,c) return c:GetLevel()*300 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -64,7 +64,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -75,7 +75,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLevelAbove(13) end function s.filter(c,e,tp) - return c:IsSetCard(0x107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75690317.lua b/official/c75690317.lua index 418ed350bb..8eafffcb94 100644 --- a/official/c75690317.lua +++ b/official/c75690317.lua @@ -1,5 +1,5 @@ --カラクリ蝦蟇 四六弐四 ---Karakuri Toad mdl 4624 “Shirokunishi” +--Karakuri Gama mdl 4624 "Shirokunishi" --scripted by Logical Nonsense --Substitute ID local s,id=GetID() @@ -26,12 +26,12 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1,id) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} --Switch battle position function s.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,7 +41,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Karakuri" monster that can switch position function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) and c:IsCanChangePosition() + return c:IsFaceup() and c:IsSetCard(SET_KARAKURI) and c:IsCanChangePosition() end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -57,5 +57,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end - +end \ No newline at end of file diff --git a/official/c75702749.lua b/official/c75702749.lua index 2f193d1c3b..c4b5023a8b 100644 --- a/official/c75702749.lua +++ b/official/c75702749.lua @@ -1,5 +1,5 @@ --幻煌龍の螺旋絞 ---Spiral Hold of the Mythic Radiance Dragon +--Phantasm Spiral Grip local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL)) @@ -32,8 +32,8 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) end @@ -42,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then local tc=g:GetFirst() if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then @@ -52,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c75713017.lua b/official/c75713017.lua index e57da43ebb..4892f86964 100644 --- a/official/c75713017.lua +++ b/official/c75713017.lua @@ -23,7 +23,7 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD|REASON_COST) end function s.atop(e,tp,eg,ep,ev,re,r,rp) local seq=e:GetLabel() @@ -33,9 +33,9 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetLabel(0x1<0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end --Activation legality @@ -66,7 +64,7 @@ function s.cfilter(c,re) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re and re:IsActiveType(TYPE_TRAP) and re:GetHandler():GetOriginalType()==TYPE_TRAP + return rp==tp and re and re:IsTrapEffect() and re:GetHandler():GetOriginalType()==TYPE_TRAP and eg:IsExists(s.cfilter,1,nil) end --Activation legality diff --git a/official/c7573135.lua b/official/c7573135.lua index 8864084310..fc2387bd85 100644 --- a/official/c7573135.lua +++ b/official/c7573135.lua @@ -1,4 +1,5 @@ --剣闘獣アウグストル +--Gladiator Beast Augustus local s,id=GetID() function s.initial_effect(c) --spsummon @@ -16,16 +17,16 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end function s.hspfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,113,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,113,tp,false,false,POS_FACEUP_DEFENSE) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -40,8 +41,8 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP_DEFENSE) local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -63,32 +64,25 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0x19) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,113,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,113,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c75732622.lua b/official/c75732622.lua index b759ee5f14..dea0fd95bb 100644 --- a/official/c75732622.lua +++ b/official/c75732622.lua @@ -47,10 +47,10 @@ function s.spcop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_MSET) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c75733063.lua b/official/c75733063.lua index 21aa1b9c97..af3f6073b6 100644 --- a/official/c75733063.lua +++ b/official/c75733063.lua @@ -1,4 +1,5 @@ --機皇兵スキエル・アイン +--Meklord Army of Skiel local s,id=GetID() function s.initial_effect(c) --atkup @@ -20,9 +21,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x13,0x6013} +s.listed_series={SET_MEKLORD,SET_MEKLORD_ARMY} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13) + return c:IsFaceup() and c:IsSetCard(SET_MEKLORD) end function s.val(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,c)*200 @@ -31,7 +32,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsSetCard(0x6013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MEKLORD_ARMY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75745607.lua b/official/c75745607.lua index f1a9a4f22e..9aa280df20 100644 --- a/official/c75745607.lua +++ b/official/c75745607.lua @@ -25,13 +25,13 @@ function s.hdreg(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PREDRAW) e1:SetOperation(s.hdop) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) Duel.RegisterEffect(e1,tp) - aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,1)):SetReset(RESET_PHASE+PHASE_DRAW) + aux.RegisterClientHint(c,0,tp,0,1,aux.Stringid(id,1)):SetReset(RESET_PHASE|PHASE_DRAW) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND) if #g>0 then - Duel.SendtoGrave(g,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(g,REASON_DISCARD|REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7574904.lua b/official/c7574904.lua index deb6460482..a912577fa0 100644 --- a/official/c7574904.lua +++ b/official/c7574904.lua @@ -1,8 +1,6 @@ ---JP name +--ミュートリアル・アームズ --Myutant Arsenal ---Logical Nonsense - ---Substitute ID +--scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) --Must special summoned by a "Myutant" effect @@ -48,25 +46,24 @@ function s.initial_effect(c) c:RegisterEffect(e4) end --Lists "Myutant" archetype -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} --Must special summoned by a "Myutant" effect function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x159) + return se:GetHandler():IsSetCard(SET_MYUTANT) end --Cannot be targeted by opponent's trap effects function s.tgval(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_TRAP) + return aux.tgoval(e,re,rp) and re:IsTrapEffect() end --Opponent activates a monster effect function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) + return rp~=tp and re:IsMonsterEffect() end --Banish 1 card from your hand or field as cost function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end --Activation legality @@ -92,7 +89,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end --Check for 1 of your face-up banished "Myutant" spells function s.thfilter(c) - return c:IsSetCard(0x159) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_MYUTANT) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c7576264.lua b/official/c7576264.lua index a09b3fec5c..3a4bb7ac64 100644 --- a/official/c7576264.lua +++ b/official/c7576264.lua @@ -1,4 +1,5 @@ --幻獣ワイルドホーン +--Phantom Beast Wild-Horn local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c75775867.lua b/official/c75775867.lua index ade832705f..595f4e261a 100644 --- a/official/c75775867.lua +++ b/official/c75775867.lua @@ -1,4 +1,5 @@ --D・パッチン +--Morphtronic Slingen local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,12 +23,12 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.descon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() end function s.cfilter(c) - return c:GetCode()~=id and c:IsSetCard(0x26) + return c:GetCode()~=id and c:IsSetCard(SET_MORPHTRONIC) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) @@ -49,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x26) + return c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -67,5 +68,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c75779210.lua b/official/c75779210.lua index 3191037cc9..bbd6062d59 100644 --- a/official/c75779210.lua +++ b/official/c75779210.lua @@ -1,4 +1,5 @@ --ヴァイロン・エプシロン +--Vylon Epsilon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -48,4 +49,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75780818.lua b/official/c75780818.lua index d3a3610f6a..360ab45b1f 100644 --- a/official/c75780818.lua +++ b/official/c75780818.lua @@ -1,12 +1,12 @@ --- ダイナ・タンク --- Dyna Tank --- Scripted by Hatter +--ダイナ・タンク +--Dyna Tank +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 1 Machine monster + 1 Dinosaur monster + --1 Machine monster + 1 Dinosaur monster Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),aux.FilterBoolFunctionEx(Card.IsRace,RACE_DINOSAUR)) - -- Gain ATK + --Gain ATK local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Replace target + --Replace target local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_QUICK_O) @@ -31,7 +31,7 @@ function s.initial_effect(c) e2:SetTarget(s.tartg) e2:SetOperation(s.tarop) c:RegisterEffect(e2) - -- Special Summon 1 Dinosaur monster + --Special Summon 1 Dinosaur monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -49,18 +49,18 @@ function s.atkval(e,c) e:SetLabel(#g==1 and g:GetFirst():GetBaseAttack() or 0) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local atk=e:GetLabelObject():GetLabel() if atk>0 then local c=e:GetHandler() - -- Increase ATK + --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end diff --git a/official/c75782277.lua b/official/c75782277.lua index 5cf3cc9c69..1a381dc239 100644 --- a/official/c75782277.lua +++ b/official/c75782277.lua @@ -1,5 +1,5 @@ --ハーピィの狩場 ---Harpie's Hunting Ground +--Harpies' Hunting Ground local s,id=GetID() function s.initial_effect(c) --Activate @@ -54,7 +54,7 @@ function s.check(e,tp,eg,ep,ev,re,r,rp) if #g2>0 then Duel.RaiseEvent(g2,EVENT_CUSTOM+id,re,r,rp,1,0) end end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -68,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75797046.lua b/official/c75797046.lua index f8b11d03fd..4b4cf51119 100644 --- a/official/c75797046.lua +++ b/official/c75797046.lua @@ -1,8 +1,9 @@ --フォトン・アレキサンドラ・クィーン +--Photon Alexandra Queen local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x6a),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BUTTERSPY),4,2) c:EnableReviveLimit() --return local e1=Effect.CreateEffect(c) @@ -10,16 +11,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.retcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x6a} -function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_BUTTERSPY} function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -38,4 +35,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,ct1*300,REASON_EFFECT,true) Duel.Damage(1-tp,ct2*300,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c7582066.lua b/official/c7582066.lua index 8d72873ba0..23476ab320 100644 --- a/official/c7582066.lua +++ b/official/c7582066.lua @@ -1,4 +1,5 @@ --サイコ・デビル +--Psychic Nightmare local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -32,7 +33,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c75830094.lua b/official/c75830094.lua index ed8c3d168d..2f97a65290 100644 --- a/official/c75830094.lua +++ b/official/c75830094.lua @@ -24,38 +24,34 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_names={11224103} s.LVnum=4 -s.LVset=0x3 +s.LVset=SET_HORUS_BLACK_FLAME_DRAGON function s.bdop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(11224103) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c75840616.lua b/official/c75840616.lua index d75063058a..f1f28afd54 100644 --- a/official/c75840616.lua +++ b/official/c75840616.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x88),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_BUJIN),4,2) c:EnableReviveLimit() --search local e1=Effect.CreateEffect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -24,13 +24,9 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x88} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_BUJIN} function s.filter(c) - return c:IsSetCard(0x88) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -39,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) aux.ToHandOrElse(g:GetFirst(),tp) -end +end \ No newline at end of file diff --git a/official/c75884822.lua b/official/c75884822.lua index 9205000505..92550d3f7b 100644 --- a/official/c75884822.lua +++ b/official/c75884822.lua @@ -41,13 +41,13 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xf,0x111} +s.listed_series={SET_OJAMA,SET_ARMED_DRAGON} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.thfilter(c) - return c:IsSetCard(0xf) and c:IsAbleToHand() + return c:IsSetCard(SET_OJAMA) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -60,24 +60,24 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,g) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) end end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) - and ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_FUSION)) or (c:IsSetCard(0x111) and c:IsMonster())) + and ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_FUSION)) or (c:IsSetCard(SET_ARMED_DRAGON) and c:IsMonster())) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) - return ((c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)) or c:IsLocation(LOCATION_HAND+LOCATION_GRAVE)) and c:IsControler(tp) and c:IsSetCard(0xf) + return ((c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD)) or c:IsLocation(LOCATION_HAND|LOCATION_GRAVE)) and c:IsControler(tp) and c:IsSetCard(SET_OJAMA) and c:IsAbleToRemove() and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) e:SetLabelObject(g:GetFirst()) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) return true @@ -91,10 +91,10 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(tc,POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_OJAMA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -112,4 +112,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c75886890.lua b/official/c75886890.lua index e68a00aa9f..2100f2db97 100644 --- a/official/c75886890.lua +++ b/official/c75886890.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) e1:SetCondition(s.eqcon) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -30,10 +30,6 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:GetPreviousLocation()==LOCATION_MZONE end -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -52,7 +48,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -82,4 +78,4 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Equip(tp,tc,ec) end -end +end \ No newline at end of file diff --git a/official/c75888208.lua b/official/c75888208.lua index f9fd9825b9..a1d1fb6357 100644 --- a/official/c75888208.lua +++ b/official/c75888208.lua @@ -1,7 +1,6 @@ --夢魔鏡の夢魔-イケロス --Ikelos, the Dream Mirror Mara --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Dream Mirror" monster from hand @@ -22,24 +21,23 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.dspcon) - e2:SetCost(s.dspcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.dsptg) e2:SetOperation(s.dspop) c:RegisterEffect(e2) end s.listed_names={49389190,CARD_DREAM_MIRROR_JOY} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x131) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DREAM_MIRROR) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -55,13 +53,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.dspcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_DREAM_MIRROR_JOY),tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) -end -function s.dspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.dspfilter(c,e,tp) return c:IsCode(49389190) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c75892194.lua b/official/c75892194.lua index 3388cebae4..f7c7c749aa 100644 --- a/official/c75892194.lua +++ b/official/c75892194.lua @@ -53,4 +53,4 @@ end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end +end \ No newline at end of file diff --git a/official/c75901113.lua b/official/c75901113.lua index 2438f824ef..d7597f6a09 100644 --- a/official/c75901113.lua +++ b/official/c75901113.lua @@ -1,7 +1,6 @@ --鎧竜の聖騎士 ---Paladin of Armored Dragon +--Knight of Armor Dragon --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -25,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -47,14 +46,10 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetBattleTarget() if tc:IsRelateToBattle() then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end --Tribute itself as cost -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end --Check for a level 5+ WIND dragon monster function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -63,14 +58,14 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end --Special summon 1 level 5+ WIND dragon monster from hand or deck function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) diff --git a/official/c75902998.lua b/official/c75902998.lua index ed2eb64c6c..4ec339ab39 100644 --- a/official/c75902998.lua +++ b/official/c75902998.lua @@ -1,4 +1,5 @@ --串刺しの落とし穴 +--Trap Hole of Spikes local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c75906310.lua b/official/c75906310.lua index b9d79ddbb6..1d26cd3651 100644 --- a/official/c75906310.lua +++ b/official/c75906310.lua @@ -53,10 +53,10 @@ function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA end function s.contactfil(tp) - return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.spcon(tp) return Duel.GetFlagEffect(tp,id)~=0 and Duel.GetFlagEffect(tp,id+1)~=0 @@ -68,25 +68,25 @@ function s.aclimit(e,re,tp) return Duel.IsExistingMatchingCard(s.acfilter,e:GetHandlerPlayer(),LOCATION_REMOVED,LOCATION_REMOVED,1,nil,re:GetHandler():GetCode()) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmfilter(c) return c:IsAbleToRemove() and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,false,true)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) if chk==0 then return #g>0 end Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,nil) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75917088.lua b/official/c75917088.lua index 2262542fca..16efec5776 100644 --- a/official/c75917088.lua +++ b/official/c75917088.lua @@ -1,4 +1,5 @@ --魔法の国の王女-ピケル +--Princess Pikeru local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -14,7 +15,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) Duel.Recover(p,ct*800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75922381.lua b/official/c75922381.lua index 1228ac82f9..54d7098df6 100644 --- a/official/c75922381.lua +++ b/official/c75922381.lua @@ -1,9 +1,9 @@ --- スプライト・レッド --- Splight Red --- Scripted by Hatter +--スプライト・レッド +--Spright Red +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Negate monster effect + --Negate monster effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) @@ -35,7 +35,7 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.discostfilter(c) return c:IsLevel(2) or c:IsRank(2) or c:IsLink(2) diff --git a/official/c75923050.lua b/official/c75923050.lua index be5a829b89..1c42bf6d1a 100644 --- a/official/c75923050.lua +++ b/official/c75923050.lua @@ -48,7 +48,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not (c:IsRelateToEffect(e) and c:IsFaceup()) then return end - if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0 then + if Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c) if #sg==0 then return end diff --git a/official/c75926389.lua b/official/c75926389.lua index e9ba82789c..d008992970 100644 --- a/official/c75926389.lua +++ b/official/c75926389.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(TIMING_STANDBY_PHASE) e2:SetCondition(function(e,tp) return Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c7593748.lua b/official/c7593748.lua index 6db9289f58..c0c55e30d4 100644 --- a/official/c7593748.lua +++ b/official/c7593748.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --xyz summon c:EnableReviveLimit() - Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1083),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_GIMMICK_PUPPET),4,2) --control local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.ctcost) + e1:SetCost(Cost.Detach(2)) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -25,17 +25,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.lvcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x1083} -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:CheckRemoveOverlayCard(tp,2,REASON_COST) end - c:RemoveOverlayCard(tp,2,2,REASON_COST) -end +s.listed_series={SET_GIMMICK_PUPPET} function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chkc then return chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() and chkc:IsLocation(LOCATION_MZONE) end @@ -54,7 +49,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --cannot attack local ge2=Effect.CreateEffect(c) @@ -63,7 +58,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) ge2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) ge2:SetTargetRange(LOCATION_MZONE,0) ge2:SetTarget(s.atktg) - ge2:SetReset(RESET_PHASE+PHASE_END) + ge2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge2,tp) --client hint aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) @@ -73,15 +68,11 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x1083) + return not c:IsSetCard(SET_GIMMICK_PUPPET) end function s.atktg(e,c) return not c:IsType(TYPE_XYZ) end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.lvfilter(c) return c:IsFaceup() and c:HasLevel() and not c:IsLevel(8) end @@ -95,7 +86,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c75937826.lua b/official/c75937826.lua index fd2efb544d..a5e9e91ee4 100644 --- a/official/c75937826.lua +++ b/official/c75937826.lua @@ -1,4 +1,5 @@ --巨大戦艦 ビッグ・コアMk-Ⅱ +--B.E.S. Big Core MK-2 local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x1f) @@ -79,4 +80,4 @@ function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 -end +end \ No newline at end of file diff --git a/official/c759393.lua b/official/c759393.lua index 018404dd0e..3e543169ae 100644 --- a/official/c759393.lua +++ b/official/c759393.lua @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.ctcon) tc:RegisterEffect(e1) end diff --git a/official/c75944053.lua b/official/c75944053.lua index 7283117584..e5848851df 100644 --- a/official/c75944053.lua +++ b/official/c75944053.lua @@ -1,4 +1,5 @@ --ブンボーグ003 +--Deskbot 003 local s,id=GetID() function s.initial_effect(c) --spsummon @@ -18,15 +19,15 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) - e2:SetCondition(s.condition) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0xab) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESKBOT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -42,10 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xab) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -62,10 +60,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c75946257.lua b/official/c75946257.lua index af6c4a1642..37acfc1f90 100644 --- a/official/c75946257.lua +++ b/official/c75946257.lua @@ -1,4 +1,5 @@ --混沌の呪術師 +--Witch Doctor of Chaos local s,id=GetID() function s.initial_effect(c) --flip @@ -15,10 +16,10 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c75967082.lua b/official/c75967082.lua index 973a4acc36..471ccff373 100644 --- a/official/c75967082.lua +++ b/official/c75967082.lua @@ -1,4 +1,5 @@ --漏電 +--Short Circuit local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x28) + return c:IsFaceup() and c:IsSetCard(SET_BATTERYMAN) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,3,nil) @@ -26,4 +27,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c75987257.lua b/official/c75987257.lua index d7c7b4d423..e022699176 100644 --- a/official/c75987257.lua +++ b/official/c75987257.lua @@ -1,4 +1,5 @@ --隷属の鱗粉 +--Butterflyoke local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tc=Duel.GetAttacker() @@ -49,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end else @@ -70,4 +71,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if ec then Duel.ChangePosition(ec,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c75988594.lua b/official/c75988594.lua index 1b092993a9..345ac83643 100644 --- a/official/c75988594.lua +++ b/official/c75988594.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.thfilter(c) return c:IsRace(RACE_MACHINE) and c:IsAbleToHand() @@ -40,7 +40,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) - if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) then + if Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) @@ -48,7 +48,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -58,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c) return c:IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c75991479.lua b/official/c75991479.lua index 1163ef5dd8..4de6802275 100644 --- a/official/c75991479.lua +++ b/official/c75991479.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) end function s.regop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsFacedown() then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -35,18 +35,18 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) + local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,0,1,1,nil) if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)~=0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) end end -end +end \ No newline at end of file diff --git a/official/c75991898.lua b/official/c75991898.lua index 77adfcac6f..75be7ae666 100644 --- a/official/c75991898.lua +++ b/official/c75991898.lua @@ -1,4 +1,5 @@ --ラヴァルバル・ドラゴン +--Lavalval Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -16,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.costfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_LAVAL) and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,2,nil) end @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76004142.lua b/official/c76004142.lua index 9bcd899762..2a5c57a95d 100644 --- a/official/c76004142.lua +++ b/official/c76004142.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_DRAW_PHASE|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -59,4 +59,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7602800.lua b/official/c7602800.lua index c2d0d07352..42a763fa60 100644 --- a/official/c7602800.lua +++ b/official/c7602800.lua @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -76,5 +76,5 @@ function s.desrepval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.RemoveCounter(tp,1,0,COUNTER_FEATHER,1,REASON_EFFECT+REASON_REPLACE) + Duel.RemoveCounter(tp,1,0,COUNTER_FEATHER,1,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c7602840.lua b/official/c7602840.lua index 3daf8a3812..276f68c4e2 100644 --- a/official/c7602840.lua +++ b/official/c7602840.lua @@ -1,4 +1,5 @@ --ユーフォロイド +--UFOroid local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c76029419.lua b/official/c76029419.lua index f157d03e87..bcfcfc2a62 100644 --- a/official/c76029419.lua +++ b/official/c76029419.lua @@ -50,7 +50,7 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -66,7 +66,7 @@ function s.defop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c76039636.lua b/official/c76039636.lua index 2f4694ef0b..22a628b00c 100644 --- a/official/c76039636.lua +++ b/official/c76039636.lua @@ -35,11 +35,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -63,4 +63,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76052811.lua b/official/c76052811.lua index 25b58d9c27..6caf90d162 100644 --- a/official/c76052811.lua +++ b/official/c76052811.lua @@ -1,4 +1,5 @@ --地獄詩人ヘルポエマー +--Helpoemer local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -19,7 +20,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetCategory(CATEGORY_HANDES) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1) e3:SetCondition(s.hdcon) @@ -30,11 +31,11 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.hdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and e:GetHandler():GetFlagEffect(id)~=0 + return Duel.IsTurnPlayer(1-tp) and e:GetHandler():GetFlagEffect(id)~=0 end function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -43,10 +44,10 @@ function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76066541.lua b/official/c76066541.lua index 25bdd5a65b..7dede746e5 100644 --- a/official/c76066541.lua +++ b/official/c76066541.lua @@ -1,4 +1,5 @@ --ドラゴンダウザー +--Dragon Dowser local s,id=GetID() function s.initial_effect(c) --spsummon @@ -36,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -58,4 +59,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76067258.lua b/official/c76067258.lua index f53936cbd1..2f256c8cc4 100644 --- a/official/c76067258.lua +++ b/official/c76067258.lua @@ -1,4 +1,5 @@ --No.66 覇鍵甲虫マスター・キー・ビートル +--Number 66: Master Key Beetle local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -25,10 +26,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.xyz_number=66 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,ec) return not ec:IsHasCardTarget(c) end @@ -44,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then c:SetCardTarget(tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) --indes local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -52,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_OWNER_RELATE) e2:SetCondition(s.indcon) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end @@ -71,4 +68,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c76075139.lua b/official/c76075139.lua index fc6c9f6d40..d886c2d0b1 100644 --- a/official/c76075139.lua +++ b/official/c76075139.lua @@ -1,20 +1,20 @@ --- ヴァリアンツG-グランデューク --- Vaylantz Genesis Grand Duke --- Scripted by Hatter +--ヴァリアンツG-グランデューク +--Vaylantz Genesis Grand Duke +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c,false) c:EnableReviveLimit() - -- 2 "Valiants" monsters + --2 "Valiants" monsters Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_VAYLANTZ),2) - -- Special Summon limitation + --Special Summon limitation local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(s.splimit) c:RegisterEffect(e0) - -- Alternate summon procedure + --Alternate summon procedure local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) @@ -24,7 +24,7 @@ function s.initial_effect(c) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special Summon self or move 1 "Valiants" monster + --Special Summon self or move 1 "Valiants" monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_IGNITION) @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) e2:SetTarget(s.spmvtg) c:RegisterEffect(e2) - -- Send Monster Card to hand + --Send Monster Card to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE+CATEGORY_ATKCHANGE) @@ -71,7 +71,7 @@ end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) g:DeleteGroup() end function s.spmvtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -137,7 +137,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if dam>0 then Duel.BreakEffect() local c=e:GetHandler() - -- Gain ATK + --Gain ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) diff --git a/official/c76075810.lua b/official/c76075810.lua index 887158838f..7a721d2893 100644 --- a/official/c76075810.lua +++ b/official/c76075810.lua @@ -37,4 +37,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76076738.lua b/official/c76076738.lua index 95c1388e6e..7e9394fc88 100644 --- a/official/c76076738.lua +++ b/official/c76076738.lua @@ -56,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c76080032.lua b/official/c76080032.lua index 7643dc9939..dbd8d8549b 100644 --- a/official/c76080032.lua +++ b/official/c76080032.lua @@ -55,7 +55,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1900) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -67,11 +67,11 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c7608148.lua b/official/c7608148.lua index cb063ba835..5ce323ca19 100644 --- a/official/c7608148.lua +++ b/official/c7608148.lua @@ -62,7 +62,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 @@ -75,7 +75,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(1,0) e2:SetValue(s.aclimit) e2:SetLabel(tc:GetCode()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end diff --git a/official/c76103404.lua b/official/c76103404.lua index 6f92cf439e..0c3cbb1dd9 100644 --- a/official/c76103404.lua +++ b/official/c76103404.lua @@ -1,4 +1,5 @@ --サイバー・プチ・エンジェル +--Cyber Petit Angel local s,id=GetID() function s.initial_effect(c) --tohand @@ -19,10 +20,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x2093} +s.listed_series={SET_CYBER_ANGEL} s.listed_names={39996157} function s.thfilter(c) - return ((c:IsSetCard(0x2093) and c:IsMonster()) or c:IsCode(39996157)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_CYBER_ANGEL) and c:IsMonster()) or c:IsCode(39996157)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -35,4 +36,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c76103675.lua b/official/c76103675.lua index 5cd95f2c06..43f03eae77 100644 --- a/official/c76103675.lua +++ b/official/c76103675.lua @@ -1,4 +1,5 @@ --火の粉 +--Sparks local s,id=GetID() function s.initial_effect(c) --damage @@ -20,4 +21,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7610394.lua b/official/c7610394.lua index 34178b1b14..db5e2cc1e0 100644 --- a/official/c7610394.lua +++ b/official/c7610394.lua @@ -19,22 +19,22 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end s.listed_names={CARD_EVIL_EYE_SELENE,7610395} -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x129,TYPES_TOKEN,400,400,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_EVIL_EYE,TYPES_TOKEN,400,400,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end s.eyefilter=aux.FaceupFilter(Card.IsCode,CARD_EVIL_EYE_SELENE) function s.tkop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x129,TYPES_TOKEN,400,400,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_EVIL_EYE,TYPES_TOKEN,400,400,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP) then local g=Group.FromCards(Duel.CreateToken(tp,id+1)) local ct=1 if not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.IsExistingMatchingCard(s.eyefilter,tp,LOCATION_SZONE,0,1,nil) @@ -53,7 +53,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) @@ -67,9 +67,8 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetTargetRange(LOCATION_SZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x129)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_EVIL_EYE)) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end - +end \ No newline at end of file diff --git a/official/c76137276.lua b/official/c76137276.lua index 5bb119756e..603561e358 100644 --- a/official/c76137276.lua +++ b/official/c76137276.lua @@ -1,4 +1,5 @@ --マジック・キャプチャー +--Spell Reclamation local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,11 +12,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) + return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) then @@ -23,7 +24,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_TO_GRAVE) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) re:GetHandler():RegisterEffect(e1) end end @@ -31,4 +32,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsHasEffect(EFFECT_NECRO_VALLEY) then Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76137614.lua b/official/c76137614.lua index ddf39b7e0c..190fcf7b56 100644 --- a/official/c76137614.lua +++ b/official/c76137614.lua @@ -35,4 +35,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76145142.lua b/official/c76145142.lua index 0360ea900e..bedf08c9ca 100644 --- a/official/c76145142.lua +++ b/official/c76145142.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0x11b,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_ORCUST,lc,sumtype,tp) end function s.indcon(e) return e:GetHandler():IsLinked() @@ -51,7 +51,7 @@ function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.tdfilter(c) @@ -68,7 +68,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tg=Duel.GetTargetCards(e) if #tg==0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local og=Duel.GetOperatedGroup() if #og==0 then return end if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end @@ -79,4 +79,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76145933.lua b/official/c76145933.lua index 3c6e253356..b4ba7b20c3 100644 --- a/official/c76145933.lua +++ b/official/c76145933.lua @@ -1,9 +1,9 @@ --- スプライト・ブルー --- Splight Blue --- Scripted by Hatter +--スプライト・ブルー +--Spright Blue +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.spcon) c:RegisterEffect(e1) - -- Search 1 "Splight" monster + --Search 1 "Splight" monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x181} +s.listed_series={SET_SPRIGHT} function s.spconfilter(c) return c:IsFaceup() and (c:IsLevel(2) or c:IsRank(2)) end @@ -35,7 +35,7 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE,0,1,nil) end function s.thfilter(c) - return c:IsSetCard(0x181) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SPRIGHT) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c7614732.lua b/official/c7614732.lua index aa872d4243..13824de301 100644 --- a/official/c7614732.lua +++ b/official/c7614732.lua @@ -13,7 +13,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) --Cannot be destroyed by card effects local e2=e1:Clone() @@ -27,8 +27,8 @@ function s.stage2(e,tc,tp,sg,chk) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ADD_TYPE) e3:SetValue(TYPE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) end end -end +end \ No newline at end of file diff --git a/official/c7617062.lua b/official/c7617062.lua index e1de669669..da452a49ee 100644 --- a/official/c7617062.lua +++ b/official/c7617062.lua @@ -1,4 +1,5 @@ --ゴーストリック・ミュージアム +--Ghostrick Museum local s,id=GetID() function s.initial_effect(c) --Activate @@ -53,12 +54,12 @@ function s.dirtg(e,c) return not Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,1,nil) end function s.ftarget(e,c) - return not c:IsSetCard(0x8d) + return not c:IsSetCard(SET_GHOSTRICK) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) - eg:GetFirst():RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) + eg:GetFirst():RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -71,4 +72,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c7617253.lua b/official/c7617253.lua index 182613ba6f..2e8c284859 100644 --- a/official/c7617253.lua +++ b/official/c7617253.lua @@ -15,10 +15,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -34,7 +34,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return c:IsSetCard(0x2034) and c:IsAbleToHand() + return c:IsSetCard(SET_ULTIMATE_CRYSTAL) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetAttacker() @@ -48,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c76202610.lua b/official/c76202610.lua index 59d706321d..6345e6a41d 100644 --- a/official/c76202610.lua +++ b/official/c76202610.lua @@ -1,4 +1,5 @@ --ダークロン +--Darklon local s,id=GetID() function s.initial_effect(c) --level,attribute @@ -18,14 +19,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetValue(ATTRIBUTE_DARK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c76203291.lua b/official/c76203291.lua index ca85f04bc5..40a2fc25b5 100644 --- a/official/c76203291.lua +++ b/official/c76203291.lua @@ -1,4 +1,5 @@ --光鱗のトビウオ +--Golden Flying Fish local s,id=GetID() function s.initial_effect(c) --destroy @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76209339.lua b/official/c76209339.lua index 0b3187a76d..180af40304 100644 --- a/official/c76209339.lua +++ b/official/c76209339.lua @@ -1,7 +1,6 @@ --メガリス・エマージョン --Megalith Emergence --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,10 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x138} - +s.listed_series={SET_MEGALITH} function s.spfilter(c,e,tp) - return c:IsSetCard(0x138) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MEGALITH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -45,7 +43,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) tc:RegisterEffect(e1) end diff --git a/official/c76214441.lua b/official/c76214441.lua index dc7a073758..2c288d7ee2 100644 --- a/official/c76214441.lua +++ b/official/c76214441.lua @@ -1,4 +1,5 @@ --ライフ・コーディネイター +--Lifeforce Harmonizer local s,id=GetID() function s.initial_effect(c) --Negate @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -23,10 +24,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return ex and ((cp~=PLAYER_ALL and Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER)) or (cp==PLAYER_ALL and (Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER)))) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -38,4 +35,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76218313.lua b/official/c76218313.lua index f59f2a7fa4..cfed569af8 100644 --- a/official/c76218313.lua +++ b/official/c76218313.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c76218643.lua b/official/c76218643.lua index e84fc78491..52abf10651 100644 --- a/official/c76218643.lua +++ b/official/c76218643.lua @@ -1,4 +1,5 @@ --ブラックポータン +--Black Potan local s,id=GetID() function s.initial_effect(c) --lp damage @@ -42,4 +43,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76224717.lua b/official/c76224717.lua index bd6743b5f7..4725941d89 100644 --- a/official/c76224717.lua +++ b/official/c76224717.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - if tc:IsSummonType(SUMMON_TYPE_TRIBUTE) then + if tc:IsTributeSummoned() then local mg=tc:GetMaterial() if mg then s[ep]=s[ep]+mg:FilterCount(Card.IsMonster,nil) diff --git a/official/c76232522.lua b/official/c76232522.lua index 6fda33bda6..d4194cd806 100644 --- a/official/c76232522.lua +++ b/official/c76232522.lua @@ -38,12 +38,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetOperation(s.desop) e3:SetLabelObject(tc) Duel.RegisterEffect(e3,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end Duel.SpecialSummonComplete() end @@ -70,5 +70,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c7623640.lua b/official/c7623640.lua index 5d159583a7..861ea679a8 100644 --- a/official/c7623640.lua +++ b/official/c7623640.lua @@ -1,4 +1,5 @@ --暗黒界の導師 セルリ +--Ceruli, Guru of Dark World local s,id=GetID() function s.initial_effect(c) --spsummon @@ -23,7 +24,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -35,12 +36,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.hdcon(e,tp,eg,ep,ev,re,r,rp) - return re:GetHandler():IsSetCard(0x6) + return re:GetHandler():IsSetCard(SET_DARK_WORLD) end function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) -end + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD,nil) +end \ No newline at end of file diff --git a/official/c7625614.lua b/official/c7625614.lua index 0976f97c4a..841c602e4c 100644 --- a/official/c7625614.lua +++ b/official/c7625614.lua @@ -1,4 +1,5 @@ --レアゴールド・アーマー +--Raregold Armor local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -18,4 +19,4 @@ function s.atkcon(e) end function s.atktg(e,c) return c~=e:GetHandler():GetEquipTarget() -end +end \ No newline at end of file diff --git a/official/c76263644.lua b/official/c76263644.lua index b0f40e3e1e..da300914d2 100644 --- a/official/c76263644.lua +++ b/official/c76263644.lua @@ -1,4 +1,5 @@ --Dragoon D-END +--Destiny End Dragoon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,7 +22,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -30,8 +31,8 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xc008} -s.material_setcode={0x8,0xc008} +s.listed_series={SET_DESTINY_HERO} +s.material_setcode={SET_HERO,SET_DESTINY_HERO} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end local e1=Effect.CreateEffect(e:GetHandler()) @@ -39,7 +40,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -63,16 +64,16 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.spfilter(c,tp) - return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -83,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c7628844.lua b/official/c7628844.lua index e1cf6447a7..86a00db2db 100644 --- a/official/c7628844.lua +++ b/official/c7628844.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e1:SetCondition(function() return not (Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated()) end) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c76290637.lua b/official/c76290637.lua index 0492837e38..001b0808e9 100644 --- a/official/c76290637.lua +++ b/official/c76290637.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c76297408.lua b/official/c76297408.lua index d816df5840..947fed442b 100644 --- a/official/c76297408.lua +++ b/official/c76297408.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.rmcon) - e2:SetCost(s.rmcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) @@ -23,21 +23,17 @@ end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FIEND),tp,LOCATION_MZONE,0,1,nil) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.rfilter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.rfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) - and Duel.IsExistingTarget(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingTarget(s.rfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) + and Duel.IsExistingTarget(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=Duel.SelectTarget(tp,s.rfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g1=Duel.SelectTarget(tp,s.rfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(1-tp,s.rfilter,1-tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g2=Duel.SelectTarget(1-tp,s.rfilter,1-tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,#g1,0,0) end @@ -45,4 +41,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetTargetCards(e) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76302448.lua b/official/c76302448.lua index a3b7c42365..96b416c99e 100644 --- a/official/c76302448.lua +++ b/official/c76302448.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c76305638.lua b/official/c76305638.lua index 9c9b1a08f7..aebd4a2b9e 100644 --- a/official/c76305638.lua +++ b/official/c76305638.lua @@ -26,7 +26,7 @@ end function s.atkcon(e) local ph=Duel.GetCurrentPhase() local tp=Duel.GetTurnPlayer() - return tp~=e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return tp~=e:GetHandler():GetControler() and Duel.IsBattlePhase() end function s.spfilter(c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) @@ -34,11 +34,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -52,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Remove(g,POS_FACEUP,REASON_COST) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c7631534.lua b/official/c7631534.lua index a96d023934..83d1d8b1ea 100644 --- a/official/c7631534.lua +++ b/official/c7631534.lua @@ -1,11 +1,11 @@ --双天脚 鎧吽 ---Gaiun of the Souten Kicks +--Dual Avatar Feet - Armored Un-Gyo --Scripted by edo9300 local s,id=GetID() function s.initial_effect(c) --Fusion summon procedure c:EnableReviveLimit() - Fusion.AddProcFunRep(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14e),2,true) + Fusion.AddProcFunRep(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DUAL_AVATAR),2,true) --Destruction replacement local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetHintTiming(0,TIMING_SPSUMMON+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMING_SPSUMMON|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.negcon) @@ -29,15 +29,15 @@ function s.initial_effect(c) e2:SetOperation(s.negop) c:RegisterEffect(e2) end -s.material_setcode={0x14e} -s.listed_series={0x14e} +s.material_setcode={SET_DUAL_AVATAR} +s.listed_series={SET_DUAL_AVATAR} function s.desfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x14e) + return c:IsFaceup() and c:IsSetCard(SET_DUAL_AVATAR) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsReason(REASON_EFFECT) - and not c:IsReason(REASON_REPLACE) and c:IsSetCard(0x14e) and c:IsType(TYPE_FUSION) + and not c:IsReason(REASON_REPLACE) and c:IsSetCard(SET_DUAL_AVATAR) and c:IsType(TYPE_FUSION) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return #(eg:Filter(s.repfilter,nil,tp))==1 @@ -56,10 +56,10 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(g,REASON_EFFECT|REASON_REPLACE) end function s.negfil(c) - return c:IsFaceup() and c:IsSetCard(0x14e) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_EFFECT) + return c:IsFaceup() and c:IsSetCard(SET_DUAL_AVATAR) and c:IsFusionSummoned() and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_EFFECT) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() and Duel.IsExistingMatchingCard(s.negfil,tp,LOCATION_MZONE,0,1,nil) @@ -82,14 +82,14 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c76321376.lua b/official/c76321376.lua index ebf891d23b..83d940ea28 100644 --- a/official/c76321376.lua +++ b/official/c76321376.lua @@ -1,4 +1,5 @@ --マイン・ゴーレム +--Mine Golem local s,id=GetID() function s.initial_effect(c) --damage @@ -24,4 +25,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7634581.lua b/official/c7634581.lua index 188925c31c..04d8c3a71a 100644 --- a/official/c7634581.lua +++ b/official/c7634581.lua @@ -1,4 +1,5 @@ --オレイカルコス・シュノロス +--Orichalcos Shunoros local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -54,4 +55,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then c:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c76348260.lua b/official/c76348260.lua index e2361770ea..b3708ae3e2 100644 --- a/official/c76348260.lua +++ b/official/c76348260.lua @@ -1,4 +1,5 @@ --極星天ミーミル +--Mimir of the Nordic Ascendant local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -15,9 +16,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x42) + return c:IsFaceup() and c:IsSetCard(SET_NORDIC) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and not Duel.CheckPhaseActivity() @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76352503.lua b/official/c76352503.lua index affdf66d3f..dca6eaa445 100644 --- a/official/c76352503.lua +++ b/official/c76352503.lua @@ -1,7 +1,6 @@ --霊道士チャンシー ---Changshi the Spiritualist +--Changshi the Spiridao --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -28,20 +27,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end - --Check for a Zombie monster function s.tgfilter(c) return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end --Send 1 Zombie monster from hand or Deck to GY function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end @@ -52,9 +50,9 @@ function s.cfilter(c,tp) and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end --Activation legality @@ -73,9 +71,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c76353872.lua b/official/c76353872.lua index 647fdad0b8..563fb2a546 100644 --- a/official/c76353872.lua +++ b/official/c76353872.lua @@ -31,7 +31,7 @@ function s.cfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -58,7 +58,7 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(at:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) at:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_ATTACK_FINAL) @@ -68,5 +68,4 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.ChangePosition(at,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c76359406.lua b/official/c76359406.lua index 2b400f81a4..3974687db4 100644 --- a/official/c76359406.lua +++ b/official/c76359406.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) end s.listed_series={SET_CRYSTRON} function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.posfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() + return c:IsSpecialSummoned() and c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,0,LOCATION_MZONE,1,nil) end @@ -48,7 +48,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and (r&REASON_EFFECT+REASON_BATTLE)>0 + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and (r&REASON_EFFECT+REASON_BATTLE)>0 end function s.spfilter(c,e,tp) return c:IsSetCard(SET_CRYSTRON) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c76372778.lua b/official/c76372778.lua index 70f3c4298b..68dce6c70c 100644 --- a/official/c76372778.lua +++ b/official/c76372778.lua @@ -1,4 +1,5 @@ --イビリチュア・メロウガイスト +--Evigishki Merrowgeist local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLED) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end @@ -20,10 +21,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not bc:IsType(TYPE_TOKEN) and bc:GetLeaveFieldDest()==0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -33,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetTarget(s.reptg) e1:SetOperation(s.repop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) bc:RegisterEffect(e1) end end @@ -43,5 +40,5 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return true end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c76375976.lua b/official/c76375976.lua index ca569783ab..8fbf52cd12 100644 --- a/official/c76375976.lua +++ b/official/c76375976.lua @@ -57,7 +57,7 @@ function s.conopp(e) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)0 @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76403456.lua b/official/c76403456.lua index 09500154bb..ea65b157b4 100644 --- a/official/c76403456.lua +++ b/official/c76403456.lua @@ -31,6 +31,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c76407432.lua b/official/c76407432.lua index 4f48b6656e..4e715c1db6 100644 --- a/official/c76407432.lua +++ b/official/c76407432.lua @@ -1,4 +1,5 @@ --バスター・カウンター +--Assault Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x104f} +s.listed_series={SET_ASSAULT_MODE} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x104f) + return c:IsFaceup() and c:IsSetCard(SET_ASSAULT_MODE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end if not Duel.IsChainNegatable(ev) then return false end - return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76416959.lua b/official/c76416959.lua index 74f45fc9b6..67fc264044 100644 --- a/official/c76416959.lua +++ b/official/c76416959.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.sscon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) and not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) end @@ -51,7 +51,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.tgtg(e,c) - return c:IsSetCard(0x137) and c~=e:GetHandler() + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c~=e:GetHandler() end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76419637.lua b/official/c76419637.lua index f54083176a..9fa0969f30 100644 --- a/official/c76419637.lua +++ b/official/c76419637.lua @@ -1,4 +1,5 @@ --CX 激烈華戦艦タオヤメ +--CXyz Battleship Cherry Blossom local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -24,14 +25,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.damcon) - e2:SetCost(s.damcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end s.listed_names={40424929} function s.dccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) end function s.dctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -41,15 +42,11 @@ function s.dctg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.dcop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,40424929) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) @@ -60,4 +57,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(p,LOCATION_ONFIELD,LOCATION_ONFIELD) Duel.Damage(p,ct*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76436988.lua b/official/c76436988.lua index 4aff8872fd..7b84d8b0d2 100644 --- a/official/c76436988.lua +++ b/official/c76436988.lua @@ -1,4 +1,5 @@ --ギラギランサー +--Gillagillancer local s,id=GetID() function s.initial_effect(c) --special summon @@ -39,4 +40,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76442347.lua b/official/c76442347.lua index e467ccd659..b06f161d1c 100644 --- a/official/c76442347.lua +++ b/official/c76442347.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x5a} +s.listed_series={SET_PENGUIN} function s.flipop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|(RESETS_STANDARD|RESET_OVERLAY)&~(RESET_LEAVE|RESET_TOGRAVE),0,0) end @@ -29,7 +29,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.filter(c,e,tp) - return c:IsSetCard(0x5a) and c:GetCode()~=id + return c:IsSetCard(SET_PENGUIN) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -44,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c76442616.lua b/official/c76442616.lua index 4ae544315d..a1238e1ec0 100644 --- a/official/c76442616.lua +++ b/official/c76442616.lua @@ -1,4 +1,5 @@ --HERO'S ボンド +--HERO's Bond local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8,0x3008} +s.listed_series={SET_HERO,SET_ELEMENTAL_HERO} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8) + return c:IsFaceup() and c:IsSetCard(SET_HERO) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76459806.lua b/official/c76459806.lua index fde4694fe9..38f130f6a3 100644 --- a/official/c76459806.lua +++ b/official/c76459806.lua @@ -1,4 +1,5 @@ --ヴォルカニック・ロケット +--Volcanic Rocket local s,id=GetID() function s.initial_effect(c) --search @@ -17,19 +18,19 @@ function s.initial_effect(c) e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0xb9} +s.listed_series={SET_BLAZE_ACCELERATOR} function s.filter(c) - return c:IsSetCard(0xb9) and c:IsAbleToHand() + return c:IsSetCard(SET_BLAZE_ACCELERATOR) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c76471944.lua b/official/c76471944.lua index 46c08746e2..fc9b29bf30 100644 --- a/official/c76471944.lua +++ b/official/c76471944.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x9a),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),1,99) c:EnableReviveLimit() --defense attack local e1=Effect.CreateEffect(c) @@ -25,24 +25,21 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76473843.lua b/official/c76473843.lua index 955d799108..d679136ad0 100644 --- a/official/c76473843.lua +++ b/official/c76473843.lua @@ -1,4 +1,5 @@ --マジェスティックP +--Majesty's Pegasus local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd0)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MAJESPECTER)) e2:SetValue(300) c:RegisterEffect(e2) local e3=e2:Clone() @@ -30,7 +31,7 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0xd0} +s.listed_series={SET_MAJESPECTER} function s.cfilter(c,ft,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WIND) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) @@ -46,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd0) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAJESPECTER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -55,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76500786.lua b/official/c76500786.lua index c559abfb1b..2ab29ab962 100644 --- a/official/c76500786.lua +++ b/official/c76500786.lua @@ -1,7 +1,6 @@ --一曲集中 --Star Power!! --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Targeted link monster gains ATK, equal to total levels/ranks of monsters it points to x 400 @@ -37,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tot*400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) a:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c76515293.lua b/official/c76515293.lua index afe6bfb7b1..3bc8ca415d 100644 --- a/official/c76515293.lua +++ b/official/c76515293.lua @@ -47,4 +47,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) c:SetCardTarget(tc) end end -end +end \ No newline at end of file diff --git a/official/c76520646.lua b/official/c76520646.lua index 33d9aadc8f..70781d5e47 100644 --- a/official/c76520646.lua +++ b/official/c76520646.lua @@ -30,4 +30,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c76524506.lua b/official/c76524506.lua index 44ced5fb1e..96c21d84ea 100644 --- a/official/c76524506.lua +++ b/official/c76524506.lua @@ -1,5 +1,5 @@ --- ガーデン・ローズ・フローラ --- Garden Rose Flora +--ガーデン・ローズ・フローラ +--Garden Rose Flora local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.sccon) e2:SetTarget(s.sctarg) @@ -54,7 +54,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Clock Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -74,7 +74,7 @@ function s.lizfilter(e,c) return not (c:IsOriginalType(TYPE_SYNCHRO)) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c7653207.lua b/official/c7653207.lua index df62fba4f5..9f48ff3778 100644 --- a/official/c7653207.lua +++ b/official/c7653207.lua @@ -1,4 +1,5 @@ --アクア・ジェット +--Aqua Jet local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -26,8 +27,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1000) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c76532077.lua b/official/c76532077.lua index b4473ba9ab..8d1fb4e0f5 100644 --- a/official/c76532077.lua +++ b/official/c76532077.lua @@ -1,4 +1,5 @@ --底なし流砂 +--Bottomless Shifting Sand local s,id=GetID() function s.initial_effect(c) --activate @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.descon2) @@ -29,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -52,4 +53,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76539047.lua b/official/c76539047.lua index d0a5076ef9..30ee9f8e1e 100644 --- a/official/c76539047.lua +++ b/official/c76539047.lua @@ -1,4 +1,5 @@ --ポイズン・ファング +--Poison Fangs local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76543119.lua b/official/c76543119.lua index 763f7d4e68..05512993da 100644 --- a/official/c76543119.lua +++ b/official/c76543119.lua @@ -1,4 +1,5 @@ --ギミック・パペット-死の木馬 +--Gimmick Puppet Des Troy local s,id=GetID() function s.initial_effect(c) --destroy @@ -24,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1083) + return c:IsFaceup() and c:IsSetCard(SET_GIMMICK_PUPPET) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -45,7 +46,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1083) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76547525.lua b/official/c76547525.lua index 6b52bcecd8..588a8e80be 100644 --- a/official/c76547525.lua +++ b/official/c76547525.lua @@ -1,4 +1,5 @@ --レッド・ワイバーン +--Red Wyvern local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +24,7 @@ function s.cfilter(c,atk) return c:IsFaceup() and c:GetAttack()>atk end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e:GetHandler():GetAttack()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +44,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) else Duel.Destroy(tg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c76552147.lua b/official/c76552147.lua index 509ca3e487..6187864763 100644 --- a/official/c76552147.lua +++ b/official/c76552147.lua @@ -1,5 +1,5 @@ --D.D.D. - Different Dimension Derby ---Scripted by Eerie Code +--D.D.D. - Different Dimension Derby local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +25,7 @@ end function s.valcheck(e,c) local g=c:GetMaterial() if g:IsExists(Card.IsType,1,nil,TYPE_NORMAL) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD,0,1) end end function s.cfilter(c) @@ -48,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76573247.lua b/official/c76573247.lua index 675347d97a..992351ca02 100644 --- a/official/c76573247.lua +++ b/official/c76573247.lua @@ -21,4 +21,4 @@ function s.initial_effect(c) end function s.dircon(e) return e:GetHandler():GetColumnGroup():FilterCount(Card.IsControler,nil,1-e:GetHandlerPlayer())==0 -end +end \ No newline at end of file diff --git a/official/c76587747.lua b/official/c76587747.lua index 09906fd0da..1cec7076cf 100644 --- a/official/c76587747.lua +++ b/official/c76587747.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x126} +s.listed_series={SET_TIME_THIEF} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x126) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_TIME_THIEF) and c:IsType(TYPE_XYZ) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,rc) end end -end +end \ No newline at end of file diff --git a/official/c76589546.lua b/official/c76589546.lua index aeac081705..39e56800f8 100644 --- a/official/c76589546.lua +++ b/official/c76589546.lua @@ -38,5 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tk=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(tk,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c76589815.lua b/official/c76589815.lua index b91b5f4aec..ee8103f83f 100644 --- a/official/c76589815.lua +++ b/official/c76589815.lua @@ -1,4 +1,5 @@ --BK チート・コミッショナー +--Battlin' Boxer Cheat Commissioner local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -24,14 +25,14 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.cfcon) - e3:SetCost(s.cfcost) + e3:SetCost(Cost.Detach(2)) e3:SetTarget(s.cftg) e3:SetOperation(s.cfop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.atfilter(c) - return c:IsFaceup() and c:IsSetCard(0x84) + return c:IsFaceup() and c:IsSetCard(SET_BATTLIN_BOXER) end function s.atcon(e) return Duel.IsExistingMatchingCard(s.atfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) @@ -39,12 +40,8 @@ end function s.cfcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return (a:IsControler(tp) and a~=e:GetHandler() and a:IsSetCard(0x84)) - or (at and at:IsControler(tp) and at:IsFaceup() and at~=e:GetHandler() and at:IsSetCard(0x84)) -end -function s.cfcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) + return (a:IsControler(tp) and a~=e:GetHandler() and a:IsSetCard(SET_BATTLIN_BOXER)) + or (at and at:IsControler(tp) and at:IsFaceup() and at~=e:GetHandler() and at:IsSetCard(SET_BATTLIN_BOXER)) end function s.cftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 @@ -66,4 +63,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) end end Duel.ShuffleHand(1-tp) -end +end \ No newline at end of file diff --git a/official/c76614003.lua b/official/c76614003.lua index 5886e2608e..13b6da7fad 100644 --- a/official/c76614003.lua +++ b/official/c76614003.lua @@ -1,4 +1,5 @@ --ダーク・リペアラー +--Dark Tinker local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -21,4 +22,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if opt==1 then Duel.MoveSequence(tc,opt) end -end +end \ No newline at end of file diff --git a/official/c76614340.lua b/official/c76614340.lua index 8ddc2f236f..066c30eedf 100644 --- a/official/c76614340.lua +++ b/official/c76614340.lua @@ -1,9 +1,10 @@ --ジェムナイト・ルビーズ +--Gem-Knight Ruby local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,91731841,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047)) + Fusion.AddProcMix(c,false,false,91731841,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -27,13 +28,13 @@ function s.initial_effect(c) e4:SetCode(EFFECT_PIERCE) c:RegisterEffect(e4) end -s.listed_series={0x47,0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM,SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x47) + return c:IsFaceup() and c:IsSetCard(SET_GEM) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,e:GetHandler()) end @@ -48,6 +49,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c76641981.lua b/official/c76641981.lua index dafbc6782b..1b8b3018c2 100644 --- a/official/c76641981.lua +++ b/official/c76641981.lua @@ -1,4 +1,5 @@ --TG1-EM1 +--TG1-EM1 local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x27) and c:IsAbleToChangeControler() + return c:IsFaceup() and c:IsSetCard(SET_TG) and c:IsAbleToChangeControler() end function s.filter2(c) return c:IsAbleToChangeControler() @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToEffect(e) and b:IsRelateToEffect(e) then Duel.SwapControl(a,b) end -end +end \ No newline at end of file diff --git a/official/c76647978.lua b/official/c76647978.lua index 7950fa3e39..c7f0a85b4b 100644 --- a/official/c76647978.lua +++ b/official/c76647978.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) local e1=Fusion.CreateSummonEff(c,nil,Card.IsOnField,nil,nil,nil,s.stage2,2) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) local tg=e1:GetTarget() e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -21,23 +21,19 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.stage2(e,tc,tp,sg,chk) if chk==1 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,e:GetHandler():GetCardID()) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,e:GetHandler():GetCardID()) end end function s.mgfilter(c,e,tp,fusc,mg) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and (c:GetReason()&0x40008)==0x40008 and c:GetReasonCard()==fusc + and (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))==(REASON_FUSION|REASON_MATERIAL) and c:GetReasonCard()==fusc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE|FUSPROC_NOTFUSION) end @@ -72,18 +68,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(0) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e3,true) local e4=e3:Clone() e4:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -92,4 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c76650663.lua b/official/c76650663.lua index 10765751b9..05c8d48275 100644 --- a/official/c76650663.lua +++ b/official/c76650663.lua @@ -1,4 +1,5 @@ --A・O・J ブラインド・サッカー +--Ally of Justice Nullfier local s,id=GetID() function s.initial_effect(c) --Disable @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_OVERLAY)&~(RESET_LEAVE|RESET_TOGRAVE)) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c76660409.lua b/official/c76660409.lua index 3e13be133c..7e462fc558 100644 --- a/official/c76660409.lua +++ b/official/c76660409.lua @@ -1,4 +1,5 @@ --ペンデュラム・バック +--Pendulum Back local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76672730.lua b/official/c76672730.lua index b4d9f7f032..68a980ce89 100644 --- a/official/c76672730.lua +++ b/official/c76672730.lua @@ -1,5 +1,5 @@ --暗黒界の文殿 ---Dark World Library +--Dark World Archives --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -32,21 +32,21 @@ function s.initial_effect(c) e3:SetOperation(s.drwop) c:RegisterEffect(e3) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} function s.cfilter(c) - return c:IsSetCard(0x6) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_DARK_WORLD) and c:IsMonster() and c:IsDiscardable() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x6),tp,LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DARK_WORLD),tp,LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local dg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) - if #dg>0 and Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)>0 then + if #dg>0 and Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD)>0 then local og=Duel.GetOperatedGroup() - local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x6),tp,LOCATION_MZONE,0,nil) + local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DARK_WORLD),tp,LOCATION_MZONE,0,nil) if #sg==0 then return end local atk=og:GetFirst():GetLevel()*100 for tc in sg:Iter() do @@ -55,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -64,7 +64,7 @@ function s.dfilter(c,tp) return c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsOriginalRace(RACE_FIEND) and c:IsReason(REASON_EFFECT) end function s.drwcond(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(s.dfilter,1,nil,tp) and (re:GetHandler():IsSetCard(0x6) or rp==1-tp) + return eg:IsExists(s.dfilter,1,nil,tp) and (re:GetHandler():IsSetCard(SET_DARK_WORLD) or rp==1-tp) end function s.drwtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end @@ -74,7 +74,7 @@ end function s.drwop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil) - if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)>0 then + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD)>0 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end diff --git a/official/c76683171.lua b/official/c76683171.lua index 3f91cae71c..922a76bab9 100644 --- a/official/c76683171.lua +++ b/official/c76683171.lua @@ -1,4 +1,5 @@ --ワーム・アグリィ +--Worm Ugly local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(0x3e) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SUMMON and c:GetReasonCard():IsSetCard(SET_WORM) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c76685519.lua b/official/c76685519.lua index a60f37fecb..1e81c046fe 100644 --- a/official/c76685519.lua +++ b/official/c76685519.lua @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76714458.lua b/official/c76714458.lua index e2d0ec50fe..622ca0f4fb 100644 --- a/official/c76714458.lua +++ b/official/c76714458.lua @@ -1,4 +1,5 @@ --痛魂の呪術 +--Spell of Pain local s,id=GetID() function s.initial_effect(c) --reflect @@ -29,4 +30,4 @@ function s.refcon(e,re,val,r,rp,rc) if cc==0 or (r&REASON_EFFECT)==0 then return end local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) return cid==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c76721030.lua b/official/c76721030.lua index 8d2f6866e7..f6afb931b0 100644 --- a/official/c76721030.lua +++ b/official/c76721030.lua @@ -1,4 +1,5 @@ --暴君の暴言 +--Tyrant's Tirade local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,5 +25,5 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.aclimit(e,re,tp) local loc=re:GetActivateLocation() - return (loc==LOCATION_MZONE or loc==LOCATION_HAND) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) -end + return (loc==LOCATION_MZONE or loc==LOCATION_HAND) and re:IsMonsterEffect() and not re:GetHandler():IsImmuneToEffect(e) +end \ No newline at end of file diff --git a/official/c76722334.lua b/official/c76722334.lua index f87e313d1f..e26850750a 100644 --- a/official/c76722334.lua +++ b/official/c76722334.lua @@ -1,7 +1,6 @@ --カプシェル --Capshell --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Draw 1 card if... diff --git a/official/c7672244.lua b/official/c7672244.lua index e309e11662..2062208cfd 100644 --- a/official/c7672244.lua +++ b/official/c7672244.lua @@ -16,7 +16,7 @@ function s.filter(c) return c:IsControlerCanBeChanged() and c:IsFaceup() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) diff --git a/official/c76728962.lua b/official/c76728962.lua index a102394fcc..fc8d79e2bc 100644 --- a/official/c76728962.lua +++ b/official/c76728962.lua @@ -39,9 +39,8 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.toss_coin=true - function s.filter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:GetPreviousRaceOnField()&RACE_MACHINE)~=0 + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and (c:GetPreviousRaceOnField()&RACE_MACHINE)~=0 and (c:GetPreviousAttributeOnField()&ATTRIBUTE_DARK)~=0 and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end @@ -59,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end diff --git a/official/c76751255.lua b/official/c76751255.lua index 7e5f34f4d5..a2e39d2b2e 100644 --- a/official/c76751255.lua +++ b/official/c76751255.lua @@ -39,6 +39,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c76754619.lua b/official/c76754619.lua index 2b3ffa9f8c..e438220fef 100644 --- a/official/c76754619.lua +++ b/official/c76754619.lua @@ -1,4 +1,5 @@ --ピラミッドパワー +--Pyramid Energy local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end local op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) @@ -30,7 +28,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(200) sc:RegisterEffect(e1) end @@ -40,9 +38,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_DEFENSE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) sc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c76763417.lua b/official/c76763417.lua index f8c775b20d..1b8300fbf0 100644 --- a/official/c76763417.lua +++ b/official/c76763417.lua @@ -1,4 +1,5 @@ --サイバー・ジムナティクス +--Cyber Gymnast local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) @@ -33,4 +34,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsPosition(POS_FACEUP_ATTACK) and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76766706.lua b/official/c76766706.lua index d54e60ba15..94f980819d 100644 --- a/official/c76766706.lua +++ b/official/c76766706.lua @@ -1,4 +1,5 @@ --混沌の種 +--Chaos Seed local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c76774528.lua b/official/c76774528.lua index ac8b1412f2..e7526e004d 100644 --- a/official/c76774528.lua +++ b/official/c76774528.lua @@ -1,4 +1,5 @@ --スクラップ・ドラゴン +--Scrap Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -27,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) @@ -52,7 +53,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and tp~=crp and crp~=PLAYER_NONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x24) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SCRAP) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -66,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76775123.lua b/official/c76775123.lua index 0e72132532..12b4b6669f 100644 --- a/official/c76775123.lua +++ b/official/c76775123.lua @@ -1,4 +1,5 @@ --パトロール・ロボ +--Patrol Robo local s,id=GetID() function s.initial_effect(c) --confirm @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c76782778.lua b/official/c76782778.lua index 8d1e8a6260..b062f854be 100644 --- a/official/c76782778.lua +++ b/official/c76782778.lua @@ -1,5 +1,5 @@ --ドラゴンメイド・エルデ ---Dragonmaid Erde +--Dragonmaid Ernus --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(TIMING_END_PHASE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -28,20 +28,16 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_DRAGONMAID} function s.spfilter1(c,e,tp) - return c:IsSetCard(0x133) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_DRAGONMAID) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -60,7 +56,7 @@ function s.incon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_FUSION),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.spfilter2(c,e,tp) - return c:GetLevel()==2 and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==2 and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -77,4 +73,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c76792184.lua b/official/c76792184.lua index 0c610fdc1c..ed967bec91 100644 --- a/official/c76792184.lua +++ b/official/c76792184.lua @@ -1,5 +1,6 @@ --カオス-黒魔術の儀式 +--Black Magic Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,30208479) -end +end \ No newline at end of file diff --git a/official/c76794549.lua b/official/c76794549.lua index 48f2aaf862..f7b38830c8 100644 --- a/official/c76794549.lua +++ b/official/c76794549.lua @@ -43,15 +43,15 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x10f2,0x2073,0x2017,0x1046} -s.listed_names={94415058,13331639} +s.listed_series={SET_PENDULUM_DRAGON,SET_XYZ_DRAGON,SET_SYNCHRO_DRAGON,SET_FUSION_DRAGON} +s.listed_names={94415058,CARD_ZARC} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then - tc:RegisterFlagEffect(id,RESET_EVENT+0x1f20000+RESET_PHASE+PHASE_END,0,1) + if tc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) then + tc:RegisterFlagEffect(id,RESET_EVENT|RESET_TURN_SET|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE|RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) elseif tc:IsLocation(LOCATION_EXTRA) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end end @@ -60,15 +60,15 @@ function s.rpfilter(c,e,tp) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.rptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.rpop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,6)) - local g=Duel.SelectMatchingCard(tp,s.rpfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.rpfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() local op=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then @@ -84,7 +84,7 @@ function s.rpop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -109,7 +109,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - local g=Duel.GetMatchingGroup(s.thfilter1,tp,0x70,0x70,nil,tp) + local g=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_GRAVE|LOCATION_REMOVED|LOCATION_EXTRA,LOCATION_GRAVE|LOCATION_REMOVED|LOCATION_EXTRA,nil,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,7)) @@ -123,7 +123,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return (c:IsSetCard(0x10f2) or c:IsSetCard(0x2073) or c:IsSetCard(0x2017) or c:IsSetCard(0x1046)) and c:IsMonster() + return (c:IsSetCard(SET_PENDULUM_DRAGON) or c:IsSetCard(SET_XYZ_DRAGON) or c:IsSetCard(SET_SYNCHRO_DRAGON) or c:IsSetCard(SET_FUSION_DRAGON)) and c:IsMonster() and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true,true)) end function s.rescon(checkfunc) @@ -133,13 +133,13 @@ function s.rescon(checkfunc) end end function s.hnfilter(c,e,tp,sg) - return c:IsCode(13331639) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() + return c:IsCode(CARD_ZARC) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial() and Duel.GetLocationCountFromEx(tp,tp,sg and (sg+e:GetHandler()) or nil,c)>0 end function s.hncost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c) - local checkfunc=aux.PropertyTableFilter(Card.GetSetCard,0x10f2,0x2073,0x2017,0x1046) + local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,c) + local checkfunc=aux.PropertyTableFilter(Card.GetSetCard,SET_PENDULUM_DRAGON,SET_XYZ_DRAGON,SET_SYNCHRO_DRAGON,SET_FUSION_DRAGON) if chk==0 then return c:IsAbleToRemoveAsCost() and aux.SelectUnselectGroup(mg,e,tp,4,4,s.rescon(checkfunc),0) end local sg=aux.SelectUnselectGroup(mg,e,tp,4,4,s.rescon(checkfunc),1,tp,HINTMSG_REMOVE,s.rescon(checkfunc))+c Duel.Remove(sg,POS_FACEUP,REASON_COST) @@ -154,4 +154,4 @@ function s.hnop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)>0 then g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c76798740.lua b/official/c76798740.lua index a967ba29a4..0d6af6478b 100644 --- a/official/c76798740.lua +++ b/official/c76798740.lua @@ -1,5 +1,5 @@ --Vendread Charge ---Scripted by Eerie Code +--Vendread Charge local s,id=GetID() function s.initial_effect(c) --activate @@ -13,20 +13,20 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.cfilter(c,ft) return c:IsRace(RACE_ZOMBIE) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGraveAsCost() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,ft) end + if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,ft) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,ft) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x106) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VENDREAD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76806714.lua b/official/c76806714.lua index c178b57281..d045ab9b04 100644 --- a/official/c76806714.lua +++ b/official/c76806714.lua @@ -1,5 +1,6 @@ --亀の誓い +--Turtle Oath local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,91782219) -end +end \ No newline at end of file diff --git a/official/c76815942.lua b/official/c76815942.lua index 2cc96d94bb..d318a10f3a 100644 --- a/official/c76815942.lua +++ b/official/c76815942.lua @@ -1,8 +1,9 @@ --LL-インディペンデント・ナイチンゲール +--Lyrilusc - Independent Nightingale local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,48608796,aux.FilterBoolFunctionEx(Card.IsSetCard,0xf7)) + Fusion.AddProcMix(c,true,true,48608796,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LYRILUSC)) --increase level local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -47,14 +48,14 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0xf7} +s.listed_series={SET_LYRILUSC} s.listed_names={8491961} function s.matval(c,sc) local b if Card.IsOriginalSetCard then - b=c:IsOriginalSetCard(0xf7) + b=c:IsOriginalSetCard(SET_LYRILUSC) else - b=c:IsSetCard(0xf7) + b=c:IsSetCard(SET_LYRILUSC) end if (b or c:IsOriginalCode(8491961)) and c:IsType(TYPE_XYZ,sc,SUMMON_TYPE_FUSION) then return c:GetOverlayCount() @@ -66,7 +67,7 @@ function s.valcheck(e,c) e:GetLabelObject():SetLabel(val) end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()>0 + return e:GetHandler():IsFusionSummoned() and e:GetLabel()>0 end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -75,7 +76,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end diff --git a/official/c76823930.lua b/official/c76823930.lua index cb1edca85d..02868cee39 100644 --- a/official/c76823930.lua +++ b/official/c76823930.lua @@ -73,4 +73,4 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Summon(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c76830505.lua b/official/c76830505.lua index fb339fcedc..e986966307 100644 --- a/official/c76830505.lua +++ b/official/c76830505.lua @@ -1,7 +1,6 @@ --無限起動ブルータルドーザー --Infinitrack Brutal Dozer --scripted by Logical Nonsense ---Substitute ID local s,id=GetID() function s.initial_effect(c) --Special summon from hand @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Special summon "Infintrack" monster from deck + --Special Summon 1 "Infinitrack" monster from your Deck in Defense Position local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -23,70 +22,58 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.sscon) + e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end) e2:SetTarget(s.sstg) e2:SetOperation(s.ssop) c:RegisterEffect(e2) end s.listed_names={id} - --Part of "Infintrack" archetype -s.listed_series={0x127} - - --Check for EARTH machine +s.listed_series={SET_INFINITRACK} function s.cfilter(c,tp) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) - and (Duel.GetMZoneCount(tp,c,tp)>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) end - --Tribute cost function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,tp) end - local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,nil,nil,tp) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,aux.ReleaseCheckMMZ) end + local g=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,1,false,aux.ReleaseCheckMMZ) Duel.Release(g,REASON_COST) end - --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end - --Special summon from hand in defense position function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end - --Filter for "Infintrack" monster, besides itself function s.spfilter(c,e,tp) - return c:IsSetCard(0x127) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_INFINITRACK) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end - --If special summoned from hand -function s.sscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) -end - --Activation legality function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.ssop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() - if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then - local c=e:GetHandler() - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) - tc:RegisterEffect(e1,true) - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + local c=e:GetHandler() + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1,true) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_DISABLE_EFFECT) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) + end + Duel.SpecialSummonComplete() end - Duel.SpecialSummonComplete() + --You cannot Special Summon monsters for the rest of this turn, except EARTH Machine monsters local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -94,7 +81,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,2)) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) diff --git a/official/c76833149.lua b/official/c76833149.lua index c4c0d7d39e..8432878765 100644 --- a/official/c76833149.lua +++ b/official/c76833149.lua @@ -1,5 +1,5 @@ --メルフィー・マミィ ---Melffy Mammy +--Melffy Mommy --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -48,13 +48,13 @@ function s.mtfilter(c,e) end function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,e:GetHandler(),e) end + and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,e:GetHandler(),e) end end function s.mtop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,e:GetHandler(),e) + local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,e:GetHandler(),e) local tc=g:GetFirst() if tc then Duel.Overlay(c,tc,true) @@ -86,4 +86,4 @@ function s.dmgop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,e:GetLabelObject():GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76848240.lua b/official/c76848240.lua index 1d77078fdc..9e373eb087 100644 --- a/official/c76848240.lua +++ b/official/c76848240.lua @@ -1,4 +1,5 @@ --絶対不可侵領域 +--Non Aggression Area local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,11 +13,11 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp + return Duel.IsPhase(PHASE_STANDBY) and Duel.IsTurnPlayer(tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -24,7 +25,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) e1:SetCondition(s.efcon) e1:SetLabel(Duel.GetTurnCount()) Duel.RegisterEffect(e1,tp) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.efcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c76862289.lua b/official/c76862289.lua index 75ae314710..8dd31dd105 100644 --- a/official/c76862289.lua +++ b/official/c76862289.lua @@ -34,4 +34,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if ht<5 then Duel.Draw(p,5-ht,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76865611.lua b/official/c76865611.lua index 43f9557c8e..e6eab78f33 100644 --- a/official/c76865611.lua +++ b/official/c76865611.lua @@ -50,6 +50,6 @@ function s.opd(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c76871889.lua b/official/c76871889.lua index 8c8ceb7322..048f1c0efa 100644 --- a/official/c76871889.lua +++ b/official/c76871889.lua @@ -30,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.atop) c:RegisterEffect(e3) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0x106) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_VENDREAD) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -55,11 +55,11 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) local ec=eg:GetFirst() local bc=ec:GetBattleTarget() e:SetLabelObject(ec) - return ec:IsControler(tp) and ec:IsSetCard(0x106) and bc and bc:IsMonster() + return ec:IsControler(tp) and ec:IsSetCard(SET_VENDREAD) and bc and bc:IsMonster() and ec:CanChainAttack(0,true) and ec:IsStatus(STATUS_OPPO_BATTLE) end function s.atcfilter(c) - return c:IsMonster() and c:IsSetCard(0x106) and c:IsAbleToRemoveAsCost() + return c:IsMonster() and c:IsSetCard(SET_VENDREAD) and c:IsAbleToRemoveAsCost() end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.atcfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -77,7 +77,6 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) ec:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c76891401.lua b/official/c76891401.lua index b0fd4b14d0..7b4003cfdc 100644 --- a/official/c76891401.lua +++ b/official/c76891401.lua @@ -1,4 +1,5 @@ --神海竜ギシルノドン +--Sea Dragon Lord Gishilnodon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,7 +27,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(3000) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c76895648.lua b/official/c76895648.lua index 6bfd7e17ce..9d85f98f9a 100644 --- a/official/c76895648.lua +++ b/official/c76895648.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCategory(CATEGORY_DRAW) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) @@ -32,9 +32,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local dice=Duel.TossDice(tp,1) if dice==1 then - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) elseif dice==2 then - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) elseif dice==3 then Duel.Draw(tp,1,REASON_EFFECT) elseif dice==4 then @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76909279.lua b/official/c76909279.lua index f5b42998de..e6679321e7 100644 --- a/official/c76909279.lua +++ b/official/c76909279.lua @@ -13,4 +13,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) -end +end \ No newline at end of file diff --git a/official/c76913983.lua b/official/c76913983.lua index 345d82f79c..52acdaaf2f 100644 --- a/official/c76913983.lua +++ b/official/c76913983.lua @@ -1,8 +1,9 @@ --BF-アームズ・ウィング +--Blackwing Armed Wing local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x33),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BLACKWING),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --atkup local e1=Effect.CreateEffect(c) @@ -19,11 +20,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.atkcon(e) local ph=Duel.GetCurrentPhase() if ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() return e:GetHandler()==a and d and d:IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c76922029.lua b/official/c76922029.lua index 57621fccf6..e39767c6a0 100644 --- a/official/c76922029.lua +++ b/official/c76922029.lua @@ -39,4 +39,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Send the top 2 cards of your opponent's Deck to the GY Duel.DiscardDeck(1-tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c76925842.lua b/official/c76925842.lua index b2a01b4659..8a7622e045 100644 --- a/official/c76925842.lua +++ b/official/c76925842.lua @@ -1,4 +1,5 @@ --ダーク・パーシアス +--Darknight Parshath local s,id=GetID() function s.initial_effect(c) --atk @@ -33,9 +34,9 @@ function s.rfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -47,4 +48,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c76930964.lua b/official/c76930964.lua index 44c394a61c..c5d5074ffa 100644 --- a/official/c76930964.lua +++ b/official/c76930964.lua @@ -17,16 +17,16 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} s.listed_names={id} function s.otfilter(c,tp) - return c:IsSetCard(0x2b) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_NINJA) and (c:IsControler(tp) or c:IsFaceup()) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end function s.filter(c,e,tp) - return c:IsSetCard(0x2b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NINJA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) else Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c76937326.lua b/official/c76937326.lua index ef443c8d3b..0be869509a 100644 --- a/official/c76937326.lua +++ b/official/c76937326.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) --Synchro procedure - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x10),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_GUSTO),1,99) c:EnableReviveLimit() --Special Summon 2 "Gusto" monsters and Synchro Summon using them local e1=Effect.CreateEffect(c) @@ -28,15 +28,15 @@ function s.initial_effect(c) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.matfilter(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter(c,mg,tp,chk) - return c:IsSetCard(0x10) and c:IsType(TYPE_SYNCHRO) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) and (not mg or Card.IsSynchroSummonable(c,nil,mg,#mg,#mg)) + return c:IsSetCard(SET_GUSTO) and c:IsType(TYPE_SYNCHRO) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) and (not mg or Card.IsSynchroSummonable(c,nil,mg,#mg,#mg)) end function s.rescon(exg) return function(sg,e,tp,mg) @@ -47,12 +47,12 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local exg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,nil,tp) local cancelcon=s.rescon(exg) - local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) local ft=math.min(2,Duel.GetLocationCount(tp,LOCATION_MZONE)) if chk==0 then return ft>1 and Duel.IsPlayerCanSpecialSummonCount(tp,2) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and aux.SelectUnselectGroup(mg,e,tp,1,2,cancelcon,0) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) --cannot special summon except wind @@ -63,12 +63,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --synchro part local exg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,nil,tp) local cancelcon=s.rescon(exg) - local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) local g=aux.SelectUnselectGroup(mg,e,tp,1,2,cancelcon,1,tp,HINTMSG_SPSUMMON,cancelcon) if Duel.GetLocationCount(tp,LOCATION_MZONE)<#g or #g==0 or (Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and #g>1) then return end for tc in aux.Next(g) do @@ -76,7 +76,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -96,5 +96,5 @@ function s.splimit(e,c) end --opponent cannot target function s.tgtg(e,c) - return c:IsSetCard(0x10) and c:IsType(TYPE_SYNCHRO) and c~=e:GetHandler() -end + return c:IsSetCard(SET_GUSTO) and c:IsType(TYPE_SYNCHRO) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c76972801.lua b/official/c76972801.lua index 8fdc838b3b..c9b30fe38a 100644 --- a/official/c76972801.lua +++ b/official/c76972801.lua @@ -1,4 +1,5 @@ --ガガガガード +--Gagagaguard local s,id=GetID() function s.initial_effect(c) --Activate @@ -9,9 +10,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x54) + return c:IsFaceup() and c:IsSetCard(SET_GAGAGA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,2,nil) @@ -21,11 +22,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c76981308.lua b/official/c76981308.lua index 7f31490761..7e4180f8d7 100644 --- a/official/c76981308.lua +++ b/official/c76981308.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) @@ -31,13 +31,13 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x147} +s.listed_series={SET_MELFFY} function s.cfilter(c,tp) return c:IsRace(RACE_BEAST) and not c:IsPublic() and c:IsAbleToDeck() - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c:GetCode()) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.thfilter(c,code) - return c:IsMonster() and c:IsSetCard(0x147) and not c:IsCode(code) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_MELFFY) and not c:IsCode(code) and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end @@ -51,7 +51,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -59,7 +59,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local rc=sg:GetFirst() if rc:IsRelateToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,rc:GetCode()) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,rc:GetCode()) if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,g) Duel.ShuffleDeck(tp) @@ -69,7 +69,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) sg:DeleteGroup() end function s.rvfilter(c) - return c:IsMonster() and c:IsSetCard(0x147) and not c:IsPublic() + return c:IsMonster() and c:IsSetCard(SET_MELFFY) and not c:IsPublic() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.rvfilter,tp,LOCATION_HAND,0,1,nil) end @@ -89,7 +89,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end --Decrease ATK of opponent's monsters @@ -99,6 +99,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetValue(-value) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e2) end \ No newline at end of file diff --git a/official/c76986005.lua b/official/c76986005.lua index 3ee513bd92..97d038d944 100644 --- a/official/c76986005.lua +++ b/official/c76986005.lua @@ -1,4 +1,5 @@ --サイバー・ジラフ +--Cyber Kirin local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,14 +7,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -21,14 +18,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c76990617.lua b/official/c76990617.lua index eba33a9bb4..081da7aa13 100644 --- a/official/c76990617.lua +++ b/official/c76990617.lua @@ -1,4 +1,5 @@ --幻奏の音女ソナタ +--Sonata the Melodious Diva local s,id=GetID() function s.initial_effect(c) --special summon @@ -23,9 +24,9 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) + return c:IsFaceup() and c:IsSetCard(SET_MELODIOUS) end function s.spcon(e,c) if c==nil then return true end @@ -33,5 +34,5 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.tgcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) -end + return e:GetHandler():IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c7700132.lua b/official/c7700132.lua index c10faee5b8..d767b0f7aa 100644 --- a/official/c7700132.lua +++ b/official/c7700132.lua @@ -1,4 +1,5 @@ --ワーム・ノーブル +--Worm Noble local s,id=GetID() function s.initial_effect(c) --flip @@ -12,15 +13,15 @@ function s.initial_effect(c) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then + if Duel.IsPhase(PHASE_DAMAGE) and e:GetHandler()==Duel.GetAttackTarget() then Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(Duel.GetAttacker():GetAttack()/2) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,Duel.GetAttacker():GetAttack()/2) end end function s.damop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and e:GetHandler()==Duel.GetAttackTarget() then + if Duel.IsPhase(PHASE_DAMAGE) and e:GetHandler()==Duel.GetAttackTarget() then local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77007920.lua b/official/c77007920.lua index 7a478c9df2..4b320a9306 100644 --- a/official/c77007920.lua +++ b/official/c77007920.lua @@ -1,4 +1,5 @@ --レーザー砲機甲鎧 +--Laser Cannon Armor local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT)) @@ -11,4 +12,4 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c77013169.lua b/official/c77013169.lua index d489042140..813f536cc5 100644 --- a/official/c77013169.lua +++ b/official/c77013169.lua @@ -1,4 +1,5 @@ --超重武者ソード-999 +--Superheavy Samurai Swordsman local s,id=GetID() function s.initial_effect(c) --position @@ -24,7 +25,7 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) @@ -40,7 +41,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if a:IsControler(1-tp) then a,d=d,a end e:SetLabelObject(d) - return a and d and a:IsFaceup() and a:IsSetCard(0x9a) and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() + return a and d and a:IsFaceup() and a:IsSetCard(SET_SUPERHEAVY_SAMURAI) and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -48,11 +49,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c77027445.lua b/official/c77027445.lua index ded3dff9ab..c07d1c3c71 100644 --- a/official/c77027445.lua +++ b/official/c77027445.lua @@ -1,4 +1,5 @@ --ポセイドンの力 +--Power of Kaishin local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c77036039.lua b/official/c77036039.lua index 1ee1c94ecc..da9bc9bf18 100644 --- a/official/c77036039.lua +++ b/official/c77036039.lua @@ -1,4 +1,5 @@ --バスター・マーセナリ +--Assault Mercenary local s,id=GetID() function s.initial_effect(c) --destroy @@ -19,13 +20,13 @@ function s.cfilter(c) return c:IsCode(CARD_ASSAULT_MODE) and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c770365.lua b/official/c770365.lua index 749616d328..0b50308b0a 100644 --- a/official/c770365.lua +++ b/official/c770365.lua @@ -19,24 +19,20 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.atkval(e,c) return Duel.GetOverlayCount(c:GetControler(),1,0)*300 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end end function s.filter(c) - return c:IsSetCard(0x106e) + return c:IsSetCard(SET_SPELLBOOK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(tp) @@ -53,4 +49,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() end Duel.SortDecktop(tp,tp,5) -end +end \ No newline at end of file diff --git a/official/c77044671.lua b/official/c77044671.lua index c9272ac9a2..6be1b33d35 100644 --- a/official/c77044671.lua +++ b/official/c77044671.lua @@ -1,4 +1,5 @@ --ピラミッド・タートル +--Pyramid Turtle local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77058170.lua b/official/c77058170.lua index e4900c04ee..04baa126e1 100644 --- a/official/c77058170.lua +++ b/official/c77058170.lua @@ -43,8 +43,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc2:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c77060848.lua b/official/c77060848.lua index 91c54a3250..33afa92aaa 100644 --- a/official/c77060848.lua +++ b/official/c77060848.lua @@ -1,4 +1,5 @@ --極星霊デックアールヴ +--Svartalf of the Nordic Alfar local s,id=GetID() function s.initial_effect(c) --salvage @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x42} +s.listed_series={SET_NORDIC} function s.filter(c) - return c:IsSetCard(0x42) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NORDIC) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -29,4 +30,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c77075360.lua b/official/c77075360.lua index b39642ccde..f79a0142fc 100644 --- a/official/c77075360.lua +++ b/official/c77075360.lua @@ -38,10 +38,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x1017} -s.material_setcode=0x1017 +s.listed_series={SET_SYNCHRON} +s.material_setcode=SET_SYNCHRON function s.tfilter(c,lc,stype,tp) - return c:IsSetCard(0x1017,lc,stype,tp) or c:IsHasEffect(20932152) + return c:IsSetCard(SET_SYNCHRON,lc,stype,tp) or c:IsHasEffect(20932152) end function s.counterfilter(c) return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_SYNCHRO) @@ -54,7 +54,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) --lizard check @@ -67,10 +67,10 @@ function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0x1017) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_SYNCHRON) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -90,7 +90,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -103,7 +103,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c77084837.lua b/official/c77084837.lua index 81d1da59d8..b7b50a11b7 100644 --- a/official/c77084837.lua +++ b/official/c77084837.lua @@ -19,4 +19,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e3:SetValue(1) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c77087109.lua b/official/c77087109.lua index f59d8ca8f8..0087b66e96 100644 --- a/official/c77087109.lua +++ b/official/c77087109.lua @@ -1,4 +1,5 @@ --クロック・リゾネーター +--Clock Resonator local s,id=GetID() function s.initial_effect(c) --indes @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c77092311.lua b/official/c77092311.lua index 30aaa03ca8..e0a6e24e52 100644 --- a/official/c77092311.lua +++ b/official/c77092311.lua @@ -1,5 +1,5 @@ --毒の魔妖-土蜘蛛 ---Poison Mayakashi – Tsuchigumo +--Tsuchigumo, the Poisonous Mayakashi local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.spfilter(c,tp) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0 - and c:GetOriginalLevel()==7 and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp) + and c:GetOriginalLevel()==7 and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spfilter,1,nil,tp) @@ -67,5 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c77098449.lua b/official/c77098449.lua index 5acb65bba6..d0be2a9474 100644 --- a/official/c77098449.lua +++ b/official/c77098449.lua @@ -1,4 +1,5 @@ --ギャラクシー・ウェーブ +--Galaxy Wave local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:GetFirst():IsSummonType(SUMMON_TYPE_XYZ) and eg:GetFirst():IsControler(tp) + return eg:GetFirst():IsXyzSummoned() and eg:GetFirst():IsControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77102944.lua b/official/c77102944.lua index cf4b71b560..cb9324b348 100644 --- a/official/c77102944.lua +++ b/official/c77102944.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14a),1) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_APPLIANCER),1) --cannot link material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -44,10 +44,10 @@ function s.initial_effect(c) e5:SetOperation(s.desop) c:RegisterEffect(e5) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -74,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c77103950.lua b/official/c77103950.lua index 848110fc43..088afc8a86 100644 --- a/official/c77103950.lua +++ b/official/c77103950.lua @@ -1,5 +1,5 @@ --壱世壊=ペルレイノ ---Perlayno, the Primal Parallel Ruined Realm +--Primeval Planet Perlereino --scripted by Zefile local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetRange(LOCATION_FZONE) - e2:SetTarget(function(_,c) return c:IsSetCard(0x182) or c:IsType(TYPE_FUSION) end) + e2:SetTarget(function(_,c) return c:IsSetCard(SET_TEARLAMENTS) or c:IsType(TYPE_FUSION) end) e2:SetValue(500) c:RegisterEffect(e2) --Destroy 1 card on the field @@ -35,9 +35,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.thfilter(c) - return c:IsAbleToHand() and ((c:IsSetCard(0x182) and c:IsMonster()) or c:IsCode(CARD_VISAS_STARFROST)) + return c:IsAbleToHand() and ((c:IsSetCard(SET_TEARLAMENTS) and c:IsMonster()) or c:IsCode(CARD_VISAS_STARFROST)) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -50,8 +50,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsSetCard(0x182) and (c:IsMonster() or c:IsPreviousLocation(LOCATION_MZONE)) and c:IsReason(REASON_EFFECT) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE|LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) + and c:IsSetCard(SET_TEARLAMENTS) and (c:IsMonster() or c:IsPreviousLocation(LOCATION_MZONE)) and c:IsReason(REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) diff --git a/official/c77116346.lua b/official/c77116346.lua index 8746a5075a..2ea06efdeb 100644 --- a/official/c77116346.lua +++ b/official/c77116346.lua @@ -1,4 +1,5 @@ --ダイナミスト・チャージ +--Dinomist Charge local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xd8} +s.listed_series={SET_DINOMIST} function s.filter(c) - return c:IsSetCard(0xd8) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DINOMIST) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -39,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsSetCard(0xd8) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA) and c:IsSetCard(SET_DINOMIST) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -60,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(rg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,rg) end -end +end \ No newline at end of file diff --git a/official/c77121851.lua b/official/c77121851.lua index a6f23f4de9..5eee68278d 100644 --- a/official/c77121851.lua +++ b/official/c77121851.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) if r&REASON_RETURN+REASON_ADJUST~=0 then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -36,9 +36,9 @@ function s.costfilter(c,ft) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,ft) end + if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,ft) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,ft) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77133792.lua b/official/c77133792.lua index d1e4d9aab5..f9db107d66 100644 --- a/official/c77133792.lua +++ b/official/c77133792.lua @@ -1,4 +1,5 @@ --マグネット・コンバージョン +--Magnet Conversion local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,14 +19,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x2066} +s.listed_series={SET_MAGNET_WARRIOR} function s.filter(c) - return c:IsSetCard(0x2066) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -40,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x2066) and c:IsLevelBelow(4) + return c:IsFaceup() and c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77135531.lua b/official/c77135531.lua index c7a92a2ba7..4585742674 100644 --- a/official/c77135531.lua +++ b/official/c77135531.lua @@ -1,4 +1,5 @@ --竜の尖兵 +--Vanguard of the Dragon local s,id=GetID() function s.initial_effect(c) --atkup @@ -38,7 +39,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -62,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c7714344.lua b/official/c7714344.lua index 56e7a3aeab..e1e15fc917 100644 --- a/official/c7714344.lua +++ b/official/c7714344.lua @@ -41,7 +41,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(3) and c:IsSetCard(SET_PERFORMAPAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -57,10 +57,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and c:IsAbleToRemoveAsCost() and not c:IsCode(id) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and c:IsAbleToRemoveAsCost() and not c:IsCode(id) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) @@ -76,6 +76,6 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c77150143.lua b/official/c77150143.lua index 46a63e0484..99c72cf3a2 100644 --- a/official/c77150143.lua +++ b/official/c77150143.lua @@ -1,4 +1,5 @@ --十二獣サラブレード +--Zoodiac Thoroughblade local s,id=GetID() function s.initial_effect(c) --draw @@ -21,9 +22,9 @@ function s.initial_effect(c) e3:SetCondition(s.condition) c:RegisterEffect(e3) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.filter(c) - return c:IsSetCard(0xf1) and c:IsDiscardable(REASON_EFFECT) + return c:IsSetCard(SET_ZOODIAC) and c:IsDiscardable(REASON_EFFECT) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -31,10 +32,10 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.drop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.filter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then + if Duel.DiscardHand(tp,s.filter,1,1,REASON_EFFECT|REASON_DISCARD,nil)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end end function s.condition(e) return e:GetHandler():GetOriginalRace()==RACE_BEASTWARRIOR -end +end \ No newline at end of file diff --git a/official/c77152542.lua b/official/c77152542.lua index a82ee0f14f..72321d23c3 100644 --- a/official/c77152542.lua +++ b/official/c77152542.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} s.listed_names={id} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and not c:IsCode(id) end function s.spcon(e,c) if c==nil then return true end @@ -34,7 +34,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:GetLevel()>=1 + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and c:GetLevel()>=1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) and chkc~=e:GetHandler() end @@ -50,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c77189532.lua b/official/c77189532.lua index 54fb201726..a6bf1fa86d 100644 --- a/official/c77189532.lua +++ b/official/c77189532.lua @@ -112,4 +112,4 @@ function s.extraval2(chk,summon_type,e,...) s.flagmap2[c]=nil end end -end +end \ No newline at end of file diff --git a/official/c77202120.lua b/official/c77202120.lua index f3e22ace0a..f1ed74dc71 100644 --- a/official/c77202120.lua +++ b/official/c77202120.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -77,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77205367.lua b/official/c77205367.lua index 34b1745335..0645029858 100644 --- a/official/c77205367.lua +++ b/official/c77205367.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) - e3:SetCost(s.atkcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -35,10 +35,6 @@ s.listed_names={55727845} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,55727845) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local c=e:GetHandler() @@ -58,7 +54,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -66,7 +62,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(atk) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c77207191.lua b/official/c77207191.lua index 729e957e1e..3746bd53d1 100644 --- a/official/c77207191.lua +++ b/official/c77207191.lua @@ -1,4 +1,5 @@ --バフォメット +--Berfomet local s,id=GetID() function s.initial_effect(c) --effect @@ -29,4 +30,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c7721912.lua b/official/c7721912.lua index 1a8417bb56..adaa447717 100644 --- a/official/c7721912.lua +++ b/official/c7721912.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -47,23 +47,19 @@ function s.tunop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(19642774) tc:RegisterEffect(e1) --Becomes Tuner local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(TYPE_TUNER) tc:RegisterEffect(e2) end end --search a equip -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.thfilter(c) return c:IsType(TYPE_EQUIP) and c:IsSpell() and c:IsAbleToHand() end @@ -78,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c77229910.lua b/official/c77229910.lua index b2ff83609f..c53d0e894c 100644 --- a/official/c77229910.lua +++ b/official/c77229910.lua @@ -1,4 +1,5 @@ --D・バリア +--Morphtronic Forcefield local s,id=GetID() function s.initial_effect(c) --Negate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.dfilter(c,p) - return c:GetControler()==p and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x26) + return c:GetControler()==p and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsChainNegatable(ev) or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end @@ -22,7 +23,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ex and tg~=nil and tc+tg:FilterCount(s.dfilter,nil,tp)-#tg>0 end function s.filter(c) - return c:IsSetCard(0x26) and c:IsAbleToHand() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c77235086.lua b/official/c77235086.lua index 3ea4fde689..aa9480da63 100644 --- a/official/c77235086.lua +++ b/official/c77235086.lua @@ -1,4 +1,5 @@ --サイバー・エンジェル-弁天- +--Cyber Angel Benten local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -51,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c77252217.lua b/official/c77252217.lua index d688bdca9c..a26561a209 100644 --- a/official/c77252217.lua +++ b/official/c77252217.lua @@ -1,4 +1,5 @@ --電動刃虫 +--Chainsaw Insect local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -20,4 +21,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77297908.lua b/official/c77297908.lua index 70a5a71322..5c51ac0501 100644 --- a/official/c77297908.lua +++ b/official/c77297908.lua @@ -1,5 +1,5 @@ --魔界劇場「ファンタスティックシアター」 ---Abyss Playhouse – Fantastic Theater +--Abyss Playhouse - Fantastic Theater --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -73,7 +73,7 @@ function s.chop1(e,tp,eg,ep,ev,re,r,rp) Duel.ChangeChainOperation(ev,s.repop) end function s.confilter(c) - return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsPendulumSummoned() end function s.desfilter(c) return c:IsFacedown() and c:IsSpellTrap() diff --git a/official/c77307161.lua b/official/c77307161.lua index cc2be50b28..b726bd0567 100644 --- a/official/c77307161.lua +++ b/official/c77307161.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.matfilter(c,lc,sumtype,tp) - return c:IsLevelBelow(2) and c:IsSetCard(0xfb,lc,sumtype,tp) + return c:IsLevelBelow(2) and c:IsSetCard(SET_TRICKSTAR,lc,sumtype,tp) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end @@ -50,7 +50,7 @@ end function s.cfilter(c,tp,zone) local seq=c:GetPreviousSequence() if not c:IsPreviousControler(tp) then seq=seq+16 end - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0xfb) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsSetCard(SET_TRICKSTAR) and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0 end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -64,5 +64,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*200,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c77330185.lua b/official/c77330185.lua index 7120ec451b..92ee3efb39 100644 --- a/official/c77330185.lua +++ b/official/c77330185.lua @@ -1,4 +1,5 @@ --XX-セイバー ガルセム +--XX-Saber Garsem local s,id=GetID() function s.initial_effect(c) --search @@ -20,19 +21,19 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.atfilter(c) - return c:IsFaceup() and c:IsSetCard(0x100d) + return c:IsFaceup() and c:IsSetCard(SET_X_SABER) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atfilter,c:GetControler(),LOCATION_MZONE,0,nil)*200 end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (e:GetHandler():GetReason()&0x41)==0x41 + return (e:GetHandler():GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsSetCard(0x100d) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_X_SABER) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -45,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c77334267.lua b/official/c77334267.lua index 7f683e5964..e3a0755822 100644 --- a/official/c77334267.lua +++ b/official/c77334267.lua @@ -1,4 +1,5 @@ --発条装攻ゼンマイオー +--Wind-Up Arsenal Zenmaioh local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFacedown() end @@ -35,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local dg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7733560.lua b/official/c7733560.lua index 569359d451..669c214e37 100644 --- a/official/c7733560.lua +++ b/official/c7733560.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) --lp local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.lpcon) @@ -48,7 +48,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetProperty(EFFECT_FLAG_REPEAT) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) @@ -69,7 +69,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2)) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -78,6 +78,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsAbleToDeck() then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77336644.lua b/official/c77336644.lua index c14b764e6c..61f74aeb61 100644 --- a/official/c77336644.lua +++ b/official/c77336644.lua @@ -32,8 +32,8 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_names={CARD_ASSAULT_MODE,70902743} -s.assault_mode=70902743 +s.listed_names={CARD_ASSAULT_MODE,CARD_RED_DRAGON_ARCHFIEND} +s.assault_mode=CARD_RED_DRAGON_ARCHFIEND function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler() end @@ -50,7 +50,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter(c,e,tp) - return c:IsCode(70902743) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsCode(CARD_RED_DRAGON_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -65,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77360173.lua b/official/c77360173.lua index 6972c7e0f8..68a1086638 100644 --- a/official/c77360173.lua +++ b/official/c77360173.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} s.listed_names={id} function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) @@ -38,7 +38,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x57) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_RESONATOR) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -52,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77363314.lua b/official/c77363314.lua index 46b6e31fd1..e8be4a93fc 100644 --- a/official/c77363314.lua +++ b/official/c77363314.lua @@ -1,4 +1,5 @@ --クリスタル・ドラゴン +--Krystal Dragon local s,id=GetID() function s.initial_effect(c) --search @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE_STEP and Duel.GetCurrentChain()==0 + return Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_BATTLE_STEP) and Duel.GetCurrentChain()==0 and e:GetHandler():GetBattledGroupCount()>0 end function s.thfilter(c) @@ -32,4 +33,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c7736719.lua b/official/c7736719.lua index 2be2561981..6266252e2b 100644 --- a/official/c7736719.lua +++ b/official/c7736719.lua @@ -1,4 +1,5 @@ --エア・サーキュレーター +--Vortex Trooper local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g<2 or not Duel.IsPlayerCanDraw(tp) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local dg=g:Select(tp,2,2,nil) - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) @@ -46,4 +47,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77372241.lua b/official/c77372241.lua index 4fadd2cb56..bee89ca136 100644 --- a/official/c77372241.lua +++ b/official/c77372241.lua @@ -1,4 +1,5 @@ --フレムベル・グルニカ +--Flamvell Grunika local s,id=GetID() function s.initial_effect(c) --damage @@ -29,4 +30,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77379481.lua b/official/c77379481.lua index f195137086..d5dec01874 100644 --- a/official/c77379481.lua +++ b/official/c77379481.lua @@ -1,4 +1,5 @@ --大盤振舞侍 +--Sasuke Samurai #3 local s,id=GetID() function s.initial_effect(c) --draw @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ht<7 then Duel.Draw(p,7-ht,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77384395.lua b/official/c77384395.lua index a5f9896179..3e21f6ee41 100644 --- a/official/c77384395.lua +++ b/official/c77384395.lua @@ -1,11 +1,11 @@ -- --- Pazuzule --- Scripted by Hatter +--Pazuzule +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Pendulum properties + --Pendulum properties Pendulum.AddProcedure(c) - -- Change scale + --Change scale local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -15,14 +15,14 @@ function s.initial_effect(c) e1:SetTarget(s.sctg) e1:SetOperation(s.scop) c:RegisterEffect(e1) - -- Pendulum Summons cannot be negated + --Pendulum Summons cannot be negated local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(1,0) - e2:SetTarget(function(_,c)return c:IsSummonType(SUMMON_TYPE_PENDULUM) end) + e2:SetTarget(function(_,c)return c:IsPendulumSummoned() end) c:RegisterEffect(e2) end function s.scfilter(c,sc) @@ -42,12 +42,12 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if tc and tc:IsRelateToEffect(e) then local lv=tc:GetOriginalLevel() if lv~=c:GetLeftScale() then - -- Change scale + --Change scale local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -55,14 +55,14 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) c:RegisterEffect(e2) end end - -- Cannot Special Summon, except by Pendulum Summon + --Cannot Special Summon, except by Pendulum Summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(function(_,_,_,st)return SUMMON_TYPE_PENDULUM~=(st&SUMMON_TYPE_PENDULUM)end) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c77387463.lua b/official/c77387463.lua index 5311273974..e96611b384 100644 --- a/official/c77387463.lua +++ b/official/c77387463.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} s.listed_names={CARD_VIJAM,3775068} function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and c:IsAbleToGraveAsCost() end function s.spcon1(e,c) if c==nil then return true end @@ -64,7 +64,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -123,4 +123,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end else return end -end +end \ No newline at end of file diff --git a/official/c77402960.lua b/official/c77402960.lua index 57924fa4c5..755e4338f5 100644 --- a/official/c77402960.lua +++ b/official/c77402960.lua @@ -15,13 +15,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_NUMERON_NETWORK} -s.listed_series={0x114b} +s.listed_series={SET_NUMERON_GATE} function s.condition(e,tp,eg,ep,ev,re,r,rp) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) return fc and fc:IsFaceup() and fc:IsCode(CARD_NUMERON_NETWORK) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.filter(c,e,tp) - return c:IsSetCard(0x114b) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NUMERON_GATE) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0 @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local fid=c:GetFieldID() for tc in aux.Next(sg) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() sg:KeepAlive() @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetCode(EVENT_PHASE+PHASE_END) e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) e0:SetCountLimit(1) e0:SetLabel(fid) e0:SetLabelObject(sg) @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.limittg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabel(spc) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -103,4 +103,4 @@ end function s.countval(e,re,tp) local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SUMMON) if sp-e:GetLabel()>=1 then return 0 else return 1-sp+e:GetLabel() end -end +end \ No newline at end of file diff --git a/official/c77406972.lua b/official/c77406972.lua index a8329d48f2..514a5679c5 100644 --- a/official/c77406972.lua +++ b/official/c77406972.lua @@ -55,7 +55,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) if not (c:IsAbleToHand() and c:IsMonster()) then return false end @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c77411244.lua b/official/c77411244.lua index 7d4303f89f..817833714e 100644 --- a/official/c77411244.lua +++ b/official/c77411244.lua @@ -1,4 +1,5 @@ --B-バスター・ドレイク +--B-Buster Drake local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,s.unfilter) @@ -24,7 +25,7 @@ function s.unfilter(c) end function s.efilter(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:GetOwner()~=e:GetOwner() - and te:IsActiveType(TYPE_SPELL) + and te:IsSpellEffect() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) diff --git a/official/c77414722.lua b/official/c77414722.lua index d366b3ad62..0432ee0aed 100644 --- a/official/c77414722.lua +++ b/official/c77414722.lua @@ -1,4 +1,5 @@ --マジック・ジャマー +--Magic Jammer local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,12 +14,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77421977.lua b/official/c77421977.lua index fbb0d504ba..d96bfb96c3 100644 --- a/official/c77421977.lua +++ b/official/c77421977.lua @@ -3,7 +3,7 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,0x135),CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,s.condition) + aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),CATEGORY_ATKCHANGE,EFFECT_FLAG_DAMAGE_STEP,TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP,aux.StatChangeDamageStepCondition) --atk up local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -40,10 +40,7 @@ function s.initial_effect(c) e5:SetCode(EVENT_REMOVE) c:RegisterEffect(e5) end -s.listed_series={0x135} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_IGNISTER} function s.atkcon(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() and e:GetHandler():GetCardTargetCount()>0 end @@ -61,5 +58,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c77428945.lua b/official/c77428945.lua index 45ab624652..816ed53dda 100644 --- a/official/c77428945.lua +++ b/official/c77428945.lua @@ -1,4 +1,5 @@ --土地鋸 +--Terrene Toothed Tsuchinoko local s,id=GetID() function s.initial_effect(c) --position @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsFaceup() and c:IsCanTurnSet() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsCanTurnSet() and c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -23,4 +24,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c77432167.lua b/official/c77432167.lua index ecf90947f7..93941d2bb6 100644 --- a/official/c77432167.lua +++ b/official/c77432167.lua @@ -98,4 +98,4 @@ end function s.lpop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77454922.lua b/official/c77454922.lua index ab8dab5b84..8c39aa6bd6 100644 --- a/official/c77454922.lua +++ b/official/c77454922.lua @@ -1,5 +1,6 @@ --要塞クジラの誓い +--Fortress Whale's Oath local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,62337487) -end +end \ No newline at end of file diff --git a/official/c77462146.lua b/official/c77462146.lua index d4bc5a46e9..beb34414e4 100644 --- a/official/c77462146.lua +++ b/official/c77462146.lua @@ -1,6 +1,5 @@ --幻影騎士団シャドーベイル --The Phantom Knights of Shadow Veil - local s,id=GetID() function s.initial_effect(c) --Targeted monster gains 300 ATK/DEF @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -26,9 +25,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -41,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(300) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -54,13 +50,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,0,300,4,RACE_WARRIOR,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,4,RACE_WARRIOR,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,0,300,4,RACE_WARRIOR,ATTRIBUTE_DARK) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,300,4,RACE_WARRIOR,ATTRIBUTE_DARK) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_WARRIOR) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) @@ -71,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() diff --git a/official/c77491079.lua b/official/c77491079.lua index d1e329bf20..4be32b7895 100644 --- a/official/c77491079.lua +++ b/official/c77491079.lua @@ -1,4 +1,5 @@ --爆風トカゲ +--Gale Lizard local s,id=GetID() function s.initial_effect(c) --flip @@ -23,4 +24,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77505534.lua b/official/c77505534.lua index bb22a13453..1d91573ea1 100644 --- a/official/c77505534.lua +++ b/official/c77505534.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_POSITION) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK+TIMING_BATTLE_START) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK|TIMING_BATTLE_START) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) diff --git a/official/c77506119.lua b/official/c77506119.lua index 0a5b7c533c..5ecc77c6c1 100644 --- a/official/c77506119.lua +++ b/official/c77506119.lua @@ -1,4 +1,5 @@ --サンダー・ユニコーン +--Thunder Unicorn local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -18,7 +19,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -34,7 +35,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)*-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -43,9 +44,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.atlimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.atlimit(e,c) return c~=e:GetOwner() -end +end \ No newline at end of file diff --git a/official/c77511331.lua b/official/c77511331.lua index 6e6ccc2f48..137d472f28 100644 --- a/official/c77511331.lua +++ b/official/c77511331.lua @@ -53,4 +53,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77515704.lua b/official/c77515704.lua index 1a191454af..0726d795cf 100644 --- a/official/c77515704.lua +++ b/official/c77515704.lua @@ -21,12 +21,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x133) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_DRAGONMAID) and c:IsAbleToHand() end function s.athfilter(c) - return c:IsSetCard(0x133) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DRAGONMAID) and not c:IsCode(id) and c:IsAbleToHand() end function s.rthfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() @@ -77,4 +77,4 @@ function s.rthop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c77522571.lua b/official/c77522571.lua index 47fd48e18f..ce1e045a87 100644 --- a/official/c77522571.lua +++ b/official/c77522571.lua @@ -129,4 +129,4 @@ function s.exspop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c77527210.lua b/official/c77527210.lua index 3bcf9193e6..13e30423e5 100644 --- a/official/c77527210.lua +++ b/official/c77527210.lua @@ -26,7 +26,7 @@ end function s.atkcon(e) local ph=Duel.GetCurrentPhase() local tp=Duel.GetTurnPlayer() - return tp~=e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return tp~=e:GetHandler():GetControler() and Duel.IsBattlePhase() end function s.spfilter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) @@ -34,11 +34,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -52,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.Remove(g,POS_FACEUP,REASON_COST) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c77538567.lua b/official/c77538567.lua index c20b5c8595..b3790257aa 100644 --- a/official/c77538567.lua +++ b/official/c77538567.lua @@ -1,4 +1,5 @@ --魔宮の賄賂 +--Dark Bribe local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end Duel.Draw(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77539547.lua b/official/c77539547.lua index 0910094a04..23820ecc2c 100644 --- a/official/c77539547.lua +++ b/official/c77539547.lua @@ -28,13 +28,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={77539547} -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} --search function s.gvfilter(c) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave() end function s.thfilter(c) - return c:IsSetCard(0x137) and c:IsAbleToHand() and c:IsSpellTrap() + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsAbleToHand() and c:IsSpellTrap() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.gvfilter(chkc) end @@ -60,7 +60,7 @@ end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsSetCard(0x137) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c and rc:IsSetCard(SET_ANCIENT_WARRIORS) and rc:IsControler(tp) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsNegatableMonster() end @@ -76,12 +76,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c77558536.lua b/official/c77558536.lua index a529b7fa36..284601f0ee 100644 --- a/official/c77558536.lua +++ b/official/c77558536.lua @@ -1,4 +1,5 @@ --ライトロード・アサシン ライデン +--Raiden, Hand of the Lightsworn local s,id=GetID() function s.initial_effect(c) --atkup @@ -24,13 +25,13 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) end function s.cfilter(c) - return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x38) and c:IsMonster() + return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,2,REASON_EFFECT) @@ -44,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end end @@ -57,4 +58,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77561728.lua b/official/c77561728.lua index 604d24e795..e447caf81a 100644 --- a/official/c77561728.lua +++ b/official/c77561728.lua @@ -1,4 +1,5 @@ --攪乱作戦 +--Disturbance Strategy local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(1-tp) Duel.BreakEffect() Duel.Draw(1-tp,#g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77565204.lua b/official/c77565204.lua index 05ba141aec..b7854537bb 100644 --- a/official/c77565204.lua +++ b/official/c77565204.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.tgcon) e2:SetTarget(s.tgtg) @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_SZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.proccon) e3:SetOperation(s.procop) @@ -51,7 +51,7 @@ function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) c:SetTurnCounter(0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE_START|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetOperation(s.ctop) Duel.RegisterEffect(e1,tp) @@ -65,12 +65,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:Reset() return end - if Duel.GetTurnPlayer()~=tp then return end + if Duel.IsTurnPlayer(1-tp) then return end ct=ct+1 c:SetTurnCounter(ct) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==1 + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetTurnCounter()==1 end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -97,14 +97,14 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) mat:KeepAlive() Duel.SendtoGrave(mat,REASON_EFFECT) for mc in aux.Next(mat) do - mc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + mc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end e:SetLabel(code) e:SetLabelObject(mat) end end function s.proccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2 + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetTurnCounter()==2 end function s.procfilter(c,code,e,tp) return c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) @@ -143,4 +143,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77571454.lua b/official/c77571454.lua index 9d39123235..a859b0987c 100644 --- a/official/c77571454.lua +++ b/official/c77571454.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.namechangetg) e3:SetOperation(s.namechangeop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c77584012.lua b/official/c77584012.lua index f60529c623..e871e4d88c 100644 --- a/official/c77584012.lua +++ b/official/c77584012.lua @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local code=g:GetFirst():GetOriginalCode() e:SetLabel(code) Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -37,9 +37,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) -end + c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1) +end \ No newline at end of file diff --git a/official/c77585513.lua b/official/c77585513.lua index f916f5c151..f73e37dd22 100644 --- a/official/c77585513.lua +++ b/official/c77585513.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0xa,0xa) + e1:SetTargetRange(LOCATION_HAND|LOCATION_SZONE,LOCATION_HAND|LOCATION_SZONE) e1:SetTarget(aux.TargetBoolFunction(Card.IsTrap)) c:RegisterEffect(e1) --cannot activate @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,1) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) c:RegisterEffect(e2) --disable local e3=Effect.CreateEffect(c) @@ -47,10 +47,10 @@ function s.initial_effect(c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then + if tl==LOCATION_SZONE and re:IsTrapEffect() then Duel.NegateEffect(ev) end end function s.aclimit(e,re,tp) return re:GetHandler():IsTrap() -end +end \ No newline at end of file diff --git a/official/c77585514.lua b/official/c77585514.lua deleted file mode 100644 index bc8d4835a6..0000000000 --- a/official/c77585514.lua +++ /dev/null @@ -1,45 +0,0 @@ ---人造人間-サイコ·ショッカー -local s,id=GetID() -function s.initial_effect(c) - --cannot trigger - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) - e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(0xa,0xa) - e1:SetTarget(s.distg) - c:RegisterEffect(e1) - --disable - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_DISABLE) - e2:SetRange(LOCATION_MZONE) - e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) - e2:SetTarget(s.distg) - c:RegisterEffect(e2) - --disable effect - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_CHAIN_SOLVING) - e3:SetRange(LOCATION_MZONE) - e3:SetOperation(s.disop) - c:RegisterEffect(e3) - --disable trap monster - local e4=Effect.CreateEffect(c) - e4:SetType(EFFECT_TYPE_FIELD) - e4:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e4:SetRange(LOCATION_MZONE) - e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e4:SetTarget(s.distg) - c:RegisterEffect(e4) -end -function s.distg(e,c) - return c:IsTrap() -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if tl==LOCATION_SZONE and re:IsActiveType(TYPE_TRAP) then - Duel.NegateEffect(ev) - end -end diff --git a/official/c77590412.lua b/official/c77590412.lua index e8ec79a014..ca3041a597 100644 --- a/official/c77590412.lua +++ b/official/c77590412.lua @@ -1,9 +1,9 @@ --- パペット・ルーク --- Puppet Rook --- Scripted by Nellag +--パペット・ルーク +--Puppet Rook +--Scripted by Nellag local s,id=GetID() function s.initial_effect(c) - -- Send 1 EARTH Warrior from your Deck to the GY + --Send 1 EARTH Warrior from your Deck to the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_POSITION+CATEGORY_TOGRAVE) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) - -- Must attack this card, if able + --Must attack this card, if able local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_MUST_ATTACK) @@ -23,7 +23,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_MUST_ATTACK_MONSTER) e3:SetValue(s.atkval) c:RegisterEffect(e3) - -- Special Summon and change attack target + --Special Summon and change attack target local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) @@ -83,4 +83,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.ChangeAttackTarget(tc) end -end +end \ No newline at end of file diff --git a/official/c77600660.lua b/official/c77600660.lua index a87992e999..6867606eeb 100644 --- a/official/c77600660.lua +++ b/official/c77600660.lua @@ -1,4 +1,5 @@ --サイコ・エンペラー +--Psychic Emperor local s,id=GetID() function s.initial_effect(c) --recover @@ -26,4 +27,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) local val=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_PSYCHIC)*500 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Recover(p,val,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77608643.lua b/official/c77608643.lua index 7b4b50a4cb..9a3f8a4f13 100644 --- a/official/c77608643.lua +++ b/official/c77608643.lua @@ -1,4 +1,5 @@ --D-HERO ダイハードガイ +--Destiny HERO - Captain Tenacious local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,17 +20,17 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) e2:SetLabelObject(g) c:RegisterEffect(e2) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.filter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) - and c:IsPreviousControler(tp) and c:IsSetCard(0xc008) + and c:IsPreviousControler(tp) and c:IsSetCard(SET_DESTINY_HERO) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter,nil,e,tp) @@ -38,12 +39,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:GetFlagEffect(id)==0 then sg:Clear() - c:RegisterFlagEffect(id,RESET_EVENT+0x3fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE|RESET_TOFIELD|RESET_CONTROL|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end sg:Merge(g) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(id)~=0 + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetFlagEffect(id)~=0 end function s.spfilter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) @@ -62,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77610503.lua b/official/c77610503.lua index cb4a497a02..0ec916afb6 100644 --- a/official/c77610503.lua +++ b/official/c77610503.lua @@ -1,9 +1,9 @@ --- ふわんだりぃずと怖い海 --- Floowandereeze and the Scary Sea --- Scripted by Hatter +--ふわんだりぃずと怖い海 +--Floowandereeze and the Scary Sea +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Negate an opponent's Special Summon + --Negate an opponent's Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -26,25 +26,25 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - -- Opponent cannot Special Summon + --Opponent cannot Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(0,1) Duel.RegisterEffect(e1,tp) - -- Opponent can conduct 3 Normal Summons/Sets + --Opponent can conduct 3 Normal Summons/Sets local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(0,1) e2:SetValue(3) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) - -- Negate and return to hand + --Negate and return to hand Duel.NegateSummon(eg) Duel.SendtoHand(eg,nil,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c77610772.lua b/official/c77610772.lua index 4cfa0b4405..d484e0967e 100644 --- a/official/c77610772.lua +++ b/official/c77610772.lua @@ -41,7 +41,7 @@ function s.initial_effect(c) e5:SetOperation(s.spop2) c:RegisterEffect(e5) end -s.listed_series={0xfd} +s.listed_series={SET_WORLD_CHALICE} function s.spcheck(g,lc,sumtype,tp) return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) end @@ -66,7 +66,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xfd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_CHALICE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -80,4 +80,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77622396.lua b/official/c77622396.lua index ea1f3a502f..c1b398fc34 100644 --- a/official/c77622396.lua +++ b/official/c77622396.lua @@ -1,4 +1,5 @@ --あまのじゃくの呪い +--Reverse Trap local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_REVERSE_UPDATE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c77625948.lua b/official/c77625948.lua index 52ababac09..646591738f 100644 --- a/official/c77625948.lua +++ b/official/c77625948.lua @@ -42,13 +42,13 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(s.repval) tc:RegisterEffect(e3) end @@ -74,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetRange(LOCATION_MZONE) e1:SetValue(c:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE_CAL) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c77637979.lua b/official/c77637979.lua index f1aa7545a9..98b9c46a1d 100644 --- a/official/c77637979.lua +++ b/official/c77637979.lua @@ -1,8 +1,8 @@ --LANフォリンクス +--LANphorhynchus local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() Link.AddProcedure(c,nil,2,2) -end - +end \ No newline at end of file diff --git a/official/c77642288.lua b/official/c77642288.lua index 673653b866..a1b31104cf 100644 --- a/official/c77642288.lua +++ b/official/c77642288.lua @@ -1,4 +1,5 @@ --剣闘獣セクトル +--Gladiator Beast Secutor local s,id=GetID() function s.initial_effect(c) --special summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) @@ -14,14 +15,14 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return aux.gbspcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():GetBattledGroupCount()>0 end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,106,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,106,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() for tc in aux.Next(g) do Duel.SpecialSummonStep(tc,106,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c77656797.lua b/official/c77656797.lua index 8d4c3e1072..41455a7815 100644 --- a/official/c77656797.lua +++ b/official/c77656797.lua @@ -48,8 +48,8 @@ function s.eqsfilter(c,ec) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.eqsfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,0,LOCATION_HAND|LOCATION_GRAVE) end function s.eqmfilter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsForbidden() @@ -58,7 +58,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqsfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqsfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,c):GetFirst() if not (tc and Duel.Equip(tp,tc,c)) then return end local tg=Duel.GetMatchingGroup(s.eqmfilter,tp,LOCATION_DECK,0,nil) if #tg>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then @@ -79,7 +79,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c77672444.lua b/official/c77672444.lua index b319fb8792..e4aa4bad66 100644 --- a/official/c77672444.lua +++ b/official/c77672444.lua @@ -1,9 +1,9 @@ --- モーターバイオレンス --- Motor Violence --- Scripted by Hatter +--モーターバイオレンス +--Motor Frenzy +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Grant ATK + --Grant ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -19,7 +19,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon tokens + --Special Summon tokens local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -48,27 +48,27 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() for tc in aux.Next(g) do if tc:IsFaceup() and tc:GetBaseDefense()>0 then - -- Increase ATK + --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(tc:GetBaseDefense()/2) tc:RegisterEffect(e1) end - -- Cannot change battle position + --Cannot change battle position local e1=Effect.CreateEffect(c) e1:SetDescription(3313) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) tc:RegisterEffect(e1) end end function s.tkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsTributeSummoned() end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) diff --git a/official/c77679716.lua b/official/c77679716.lua index 9435e882d9..8de09217a1 100644 --- a/official/c77679716.lua +++ b/official/c77679716.lua @@ -1,4 +1,5 @@ --超重武者装留ブレイク・アーマー +--Superheavy Samurai Soulbreaker Armor local s,id=GetID() function s.initial_effect(c) --equip @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -30,10 +31,10 @@ function s.initial_effect(c) e3:SetOperation(s.damop) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} s.listed_names={id} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -55,18 +56,18 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(-1000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) - return c:IsSetCard(0x9a) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.cfilter(c) return c:IsCode(id) and c:IsAbleToRemoveAsCost() @@ -77,7 +78,7 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.damfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) and c:GetDefense()0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -66,4 +66,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp,c) Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.SortDecktop(p,p,d) end -end +end \ No newline at end of file diff --git a/official/c77700347.lua b/official/c77700347.lua index 9a4cc8fb51..35800ba537 100644 --- a/official/c77700347.lua +++ b/official/c77700347.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) diff --git a/official/c77710579.lua b/official/c77710579.lua index 5f4759e0bb..35fef9267f 100644 --- a/official/c77710579.lua +++ b/official/c77710579.lua @@ -39,12 +39,12 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x13,0x3013} +s.listed_series={SET_MEKLORD,SET_MEKLORD_EMPEROR} function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 end function s.filter(c) - return c:IsSetCard(0x13) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MEKLORD) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -62,18 +62,18 @@ function s.spcond(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x3013) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_MEKLORD_EMPEROR) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttribute,c:GetAttribute()),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end @@ -85,14 +85,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(s.atkcon) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetOperation(s.checkop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(e1) Duel.RegisterEffect(e2,tp) end @@ -105,4 +105,4 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local fid=eg:GetFirst():GetFieldID() e:GetLabelObject():SetLabel(fid) -end +end \ No newline at end of file diff --git a/official/c77714963.lua b/official/c77714963.lua index e88c04cb0e..f7290c156b 100644 --- a/official/c77714963.lua +++ b/official/c77714963.lua @@ -1,5 +1,5 @@ --骸魔妖ー夜叉 ---Yasha,the Skeletal Mayakashi +--Yasha, the Skeletal Mayakashi --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -26,13 +26,13 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter) end -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x121) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_MAYAKASHI) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,8 +46,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.sslimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end \ No newline at end of file diff --git a/official/c77723643.lua b/official/c77723643.lua index 2d6e709428..4bfeb66cd6 100644 --- a/official/c77723643.lua +++ b/official/c77723643.lua @@ -1,4 +1,5 @@ --シャドール・ドラゴン +--Shaddoll Dragon local s,id=GetID() function s.initial_effect(c) --flip @@ -47,7 +48,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -61,4 +62,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77751766.lua b/official/c77751766.lua index 3666a6f150..45c3d52ee5 100644 --- a/official/c77751766.lua +++ b/official/c77751766.lua @@ -55,6 +55,6 @@ function s.rctop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() if Duel.SSet(tp,sc)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=1 then Duel.BreakEffect() - Duel.Win(tp,0x59) + Duel.Win(tp,WIN_REASON_SUMMER_SCHOOLWORK) end end \ No newline at end of file diff --git a/official/c77754944.lua b/official/c77754944.lua index e49d52fa86..2d5b413f88 100644 --- a/official/c77754944.lua +++ b/official/c77754944.lua @@ -1,4 +1,5 @@ --万能地雷グレイモヤ +--Widespread Ruin local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) else Duel.Destroy(tg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c77754945.lua b/official/c77754945.lua deleted file mode 100644 index 4939590f02..0000000000 --- a/official/c77754945.lua +++ /dev/null @@ -1,36 +0,0 @@ ---万能地雷グレイモヤ(EU) -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function s.filter(c) - return c:IsFaceup() and c:IsAttackPos() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - local tg=g:GetMaxGroup(Card.GetAttack) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) - if #g>0 then - local tg=g:GetMaxGroup(Card.GetAttack) - if #tg>1 then - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local sg=tg:Select(tp,1,1,nil) - Duel.Destroy(sg,REASON_EFFECT) - else Duel.Destroy(tg,REASON_EFFECT) end - end -end diff --git a/official/c77778835.lua b/official/c77778835.lua index bbe692996a..0804e0d234 100644 --- a/official/c77778835.lua +++ b/official/c77778835.lua @@ -1,4 +1,5 @@ --ヒステリック・パーティー +--Hysteric Party local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ end s.listed_names={CARD_HARPIE_LADY} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsCode(CARD_HARPIE_LADY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -53,4 +54,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77783947.lua b/official/c77783947.lua index fe3ca1f157..f4e5bf420c 100644 --- a/official/c77783947.lua +++ b/official/c77783947.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e4:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e4:SetRange(LOCATION_SZONE) e4:SetCondition(s.sccon) e4:SetCost(s.sccost) @@ -27,7 +27,7 @@ function s.initial_effect(c) e4:SetOperation(s.scop) c:RegisterEffect(e4) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} function s.sccon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() or Duel.IsBattlePhase() end @@ -37,7 +37,7 @@ function s.sccost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(c,REASON_COST) end function s.mfilter(c) - return c:IsSetCard(0x9e) and c:IsMonster() + return c:IsSetCard(SET_YANG_ZING) and c:IsMonster() end function s.checkaddition(tp,sg,sc) return sg:IsExists(s.mfilter,1,nil) diff --git a/official/c7778726.lua b/official/c7778726.lua index c98eac1f87..9fe89a337d 100644 --- a/official/c7778726.lua +++ b/official/c7778726.lua @@ -1,5 +1,5 @@ --ハイパースター ---Hyper Star +--Hip Hoshiningen --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77797992.lua b/official/c77797992.lua index b64323d019..60ff5c49e5 100644 --- a/official/c77797992.lua +++ b/official/c77797992.lua @@ -1,4 +1,5 @@ --森の聖獣 アルパカリブ +--Alpacaribou, Mystical Beast of the Forest local s,id=GetID() function s.initial_effect(c) --indes1 @@ -31,11 +32,11 @@ function s.cona(e) return e:GetHandler():IsAttackPos() end function s.targeta(e,c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_WINGEDBEAST+RACE_PLANT+RACE_INSECT) + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_WINGEDBEAST|RACE_PLANT|RACE_INSECT) end function s.cond(e) return e:GetHandler():IsDefensePos() end function s.targetd(e,c) - return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsRace(RACE_WINGEDBEAST+RACE_PLANT+RACE_INSECT) -end + return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsRace(RACE_WINGEDBEAST|RACE_PLANT|RACE_INSECT) +end \ No newline at end of file diff --git a/official/c77799846.lua b/official/c77799846.lua index 0dcaca2b49..a0963e8221 100644 --- a/official/c77799846.lua +++ b/official/c77799846.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --special summon @@ -28,11 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x85} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_SUPER_DEFENSE_ROBOT} function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -41,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end end @@ -49,13 +45,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetOverlayCount()>0 end function s.rfilter(c,tp) - return c:IsSetCard(0x85) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -63,7 +59,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.mfilter(c) - return c:IsSetCard(0x85) and c:IsMonster() + return c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) and c:IsMonster() end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -76,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,mg) end end -end +end \ No newline at end of file diff --git a/official/c77826734.lua b/official/c77826734.lua index 42c455652f..f56f8aef28 100644 --- a/official/c77826734.lua +++ b/official/c77826734.lua @@ -1,4 +1,5 @@ --ペンデュラム・リボーン +--Pendulum Reborn local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,17 +18,17 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(s.filter,tp,loc,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_GRAVE end if loc==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,loc,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77832858.lua b/official/c77832858.lua index f9aa88f6cd..0acd4a2a69 100644 --- a/official/c77832858.lua +++ b/official/c77832858.lua @@ -105,4 +105,4 @@ function s.valcheck(e,c) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c77840540.lua b/official/c77840540.lua index d311827b03..5315161b29 100644 --- a/official/c77840540.lua +++ b/official/c77840540.lua @@ -1,5 +1,5 @@ --超進化の繭 ---Super Cocoon of Evolution +--Cocoon of Ultra Evolution --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1,id) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -67,11 +67,10 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 + and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tc:GetControler()) end Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c77841719.lua b/official/c77841719.lua index 994df4b4bb..c60de715db 100644 --- a/official/c77841719.lua +++ b/official/c77841719.lua @@ -37,9 +37,9 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local tct=1 - if Duel.GetTurnPlayer()~=tp then tct=2 - elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end + if Duel.IsTurnPlayer(1-tp) then tct=2 + elseif Duel.IsPhase(PHASE_END) then tct=3 end if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,tct) end -end +end \ No newline at end of file diff --git a/official/c77847678.lua b/official/c77847678.lua index 4fbae42ad6..d3480be325 100644 --- a/official/c77847678.lua +++ b/official/c77847678.lua @@ -1,4 +1,5 @@ --紫炎の計略 +--Shien's Scheme local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSetCard,1,nil,0x3d) + return eg:IsExists(Card.IsSetCard,1,nil,SET_SIX_SAMURAI) end function s.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77848740.lua b/official/c77848740.lua index bda9638cb4..f656d08838 100644 --- a/official/c77848740.lua +++ b/official/c77848740.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil) end @@ -52,24 +52,24 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x71) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_MADOLCHE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then local tc=g:GetFirst() if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1) tc:RegisterEffect(e1) end @@ -80,13 +80,13 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,3)) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x71) + return not c:IsSetCard(SET_MADOLCHE) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()==1-tp @@ -98,7 +98,6 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c77855162.lua b/official/c77855162.lua index d613fd2b8a..c6a151ede9 100644 --- a/official/c77855162.lua +++ b/official/c77855162.lua @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToBattle() and tc:IsControler(1-tp) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77876207.lua b/official/c77876207.lua index 59d6645150..9766db9a3c 100644 --- a/official/c77876207.lua +++ b/official/c77876207.lua @@ -1,4 +1,5 @@ --財宝への隠し通路 +--Secret Pass to the Treasures local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c77891946.lua b/official/c77891946.lua index 9856ae5320..cbca6d605f 100644 --- a/official/c77891946.lua +++ b/official/c77891946.lua @@ -1,5 +1,5 @@ --エクソシスター・バディス ---Exorsister Vadis +--Exosister Vadis --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -9,18 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x174} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end +s.listed_series={SET_EXOSISTER} function s.spfilter(c,e,tp) - return c:IsSetCard(0x174) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EXOSISTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.rescon(sg,e,tp,mg) return sg:IsExists(s.lfilter1,1,nil,sg) @@ -49,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g1:GetFirst() for tc in aux.Next(g1) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() g1:KeepAlive() @@ -71,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) @@ -96,8 +92,8 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end function s.splimit(e,c) - return not c:IsSetCard(0x174) and c:IsLocation(LOCATION_EXTRA) + return not c:IsSetCard(SET_EXOSISTER) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x174) -end + return not c:IsOriginalSetCard(SET_EXOSISTER) +end \ No newline at end of file diff --git a/official/c77895328.lua b/official/c77895328.lua index 96b66d0a19..009bcd7fdd 100644 --- a/official/c77895328.lua +++ b/official/c77895328.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -28,11 +28,6 @@ function s.initial_effect(c) end s.listed_names={33017655,id} s.listed_series={SET_DARK_WORLD} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.thfilter(c) return c:IsCode(33017655) and c:IsAbleToHand() end diff --git a/official/c77901552.lua b/official/c77901552.lua index a082fb61f7..35d92dd5e9 100644 --- a/official/c77901552.lua +++ b/official/c77901552.lua @@ -1,6 +1,5 @@ --聖刻龍-トフェニドラゴン --Hieratic Dragon of Tefnuit - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -35,7 +34,7 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) @@ -43,19 +42,19 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) diff --git a/official/c77910045.lua b/official/c77910045.lua index f906fdf8d6..58cce69108 100644 --- a/official/c77910045.lua +++ b/official/c77910045.lua @@ -1,4 +1,5 @@ --死の演算盤 +--Fatal Abacus local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(1-tp,500*ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c77913594.lua b/official/c77913594.lua index c6ee87a13c..b417fdfd5d 100644 --- a/official/c77913594.lua +++ b/official/c77913594.lua @@ -1,36 +1,32 @@ --- エクソシスター・パークス --- Exorsister Pax --- Scripted by Hatter +--エクソシスター・パークス +--Exosister Pax +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search + --Search local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e1:SetCondition(function()return Duel.IsMainPhase()end) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x174} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end +s.listed_series={SET_EXOSISTER} function s.thfilter(c) - return c:IsSetCard(0x174) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_EXOSISTER) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.listfilter(c,sc) - return c:IsSetCard(0x174) and c:IsFaceup() and c:IsMonster() and sc:ListsCode(c:GetCode()) + return c:IsSetCard(SET_EXOSISTER) and c:IsFaceup() and c:IsMonster() and sc:ListsCode(c:GetCode()) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -40,9 +36,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(tp) if sc:IsMonster() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.listfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,sc) + and Duel.IsExistingMatchingCard(s.listfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,sc) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77936940.lua b/official/c77936940.lua index bff40d7f5e..cc9146a573 100644 --- a/official/c77936940.lua +++ b/official/c77936940.lua @@ -1,4 +1,5 @@ --ゲルニア +--Gernia local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -21,9 +22,9 @@ function s.initial_effect(c) end function s.reg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)==0x41 and rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) + if (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -41,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c77967790.lua b/official/c77967790.lua index 8d049c01da..f98390bd19 100644 --- a/official/c77967790.lua +++ b/official/c77967790.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x11a),2) + Link.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DINOWRESTLER),2) c:EnableReviveLimit() --activation limit local e1=Effect.CreateEffect(c) @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.atkcon) @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) end @@ -48,7 +48,7 @@ function s.atlimit(e,c) return c~=e:GetHandler() end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAttackPos() end @@ -60,7 +60,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK) @@ -69,17 +69,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.atkcon2) e1:SetTarget(s.atktg2) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1) e2:SetLabelObject(tc) e2:SetCondition(s.descon) e2:SetOperation(s.desop) - e2:SetReset(RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e2,tp) end end @@ -102,4 +102,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Hint(HINT_CARD,0,id) Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c77972406.lua b/official/c77972406.lua index 9eb93064b2..2fd7825bc3 100644 --- a/official/c77972406.lua +++ b/official/c77972406.lua @@ -12,11 +12,11 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x50} -s.counter_place_list={0x1009} +s.listed_series={SET_VENOM} +s.counter_place_list={COUNTER_VENOM} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttackTarget() - return tc and tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(0x50) + return tc and tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(SET_VENOM) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -27,10 +27,10 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsRelateToEffect(e) and Duel.NegateAttack() then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) Duel.BreakEffect() local atk=tc:GetAttack() - tc:AddCounter(0x1009,1) + tc:AddCounter(COUNTER_VENOM,1) if atk>0 and tc:GetAttack()==0 then Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0) end diff --git a/official/c77994337.lua b/official/c77994337.lua index e3253fd3dc..daa821476c 100644 --- a/official/c77994337.lua +++ b/official/c77994337.lua @@ -34,7 +34,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(dc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c7799906.lua b/official/c7799906.lua index a3b99185d8..3c1c5744e4 100644 --- a/official/c7799906.lua +++ b/official/c7799906.lua @@ -43,14 +43,14 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x125,0x9f,0x98,0x99} +s.listed_series={SET_SMILE,SET_PERFORMAPAL,SET_MAGICIAN,SET_ODD_EYES} --Check for ATK higher than original ATK function s.filter(c) return c:IsFaceup() and c:GetAttack()>c:GetBaseAttack() end --Check if monster(s) with ATK higher than base ATK were destroyed function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousAttackOnField()>c:GetBaseAttack() + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetPreviousAttackOnField()>c:GetBaseAttack() and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) end --If it ever happened @@ -71,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Smile" spell/trap function s.thfilter(c) - return c:IsSetCard(0x125) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SMILE) and c:IsSpellTrap() and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -89,7 +89,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Performapal" monsters, "Magician" pendulums, or "Odd-Eyes" monsters function s.drfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x9f) or (c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(0x99)) + return c:IsFaceup() and (c:IsSetCard(SET_PERFORMAPAL) or (c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM)) or c:IsSetCard(SET_ODD_EYES)) end --If you only control those archetypes and this card's ATK is boosted function s.drcon(e,tp,eg,ep,ev,re,r,rp) @@ -113,8 +113,8 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) -end +end \ No newline at end of file diff --git a/official/c78004197.lua b/official/c78004197.lua index cd69034c03..25b5755c01 100644 --- a/official/c78004197.lua +++ b/official/c78004197.lua @@ -1,4 +1,5 @@ --暗黒界の武神 ゴルド +--Goldd, Wu-Lord of Dark World local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end @@ -41,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78009994.lua b/official/c78009994.lua index 22f7e9dbc4..22dd07fadc 100644 --- a/official/c78009994.lua +++ b/official/c78009994.lua @@ -51,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78010363.lua b/official/c78010363.lua index b7240e8d7c..5d8f468cb5 100644 --- a/official/c78010363.lua +++ b/official/c78010363.lua @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -47,4 +47,4 @@ end function s.aclimit(e,re,tp) local tc=e:GetLabelObject() return re:GetHandler():IsCode(tc:GetCode()) -end +end \ No newline at end of file diff --git a/official/c7802006.lua b/official/c7802006.lua index 9a68c20848..ef24d606d1 100644 --- a/official/c7802006.lua +++ b/official/c7802006.lua @@ -1,5 +1,5 @@ --魔草 マンドラゴラ ---magical Plant Mandragola +--Magical Plant Mandragola local s,id=GetID() function s.initial_effect(c) --flip @@ -20,4 +20,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do tc:AddCounter(COUNTER_SPELL,1) end -end +end \ No newline at end of file diff --git a/official/c78033100.lua b/official/c78033100.lua index 3fe0ad88c8..ca0a582316 100644 --- a/official/c78033100.lua +++ b/official/c78033100.lua @@ -1,4 +1,5 @@ --聖刻龍-ドラゴンゲイヴ +--Hieratic Dragon of Gebeb local s,id=GetID() function s.initial_effect(c) --spsummon @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetLabel(1) c:RegisterEffect(e2) end -s.listed_series={0x69} +s.listed_series={SET_HIERATIC} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -33,20 +34,20 @@ function s.spfilter1(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spfilter2(c,e,tp) - return c:IsType(TYPE_NORMAL) and c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_NORMAL) and c:IsSetCard(SET_HIERATIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=nil if e:GetLabel()==0 then - g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,0x13,0,1,1,nil,e,tp) + g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) else - g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,0x13,0,1,1,nil,e,tp) + g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) end local tc=g:GetFirst() if not tc then return end @@ -55,11 +56,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c7805147.lua b/official/c7805147.lua index 373d121282..b222cf9a5a 100644 --- a/official/c7805147.lua +++ b/official/c7805147.lua @@ -1,4 +1,5 @@ --兵隊竜 +--Soldier Dragons local s,id=GetID() function s.initial_effect(c) --spsummon @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78053598.lua b/official/c78053598.lua index 2186efe4cf..5dd0e2771d 100644 --- a/official/c78053598.lua +++ b/official/c78053598.lua @@ -1,4 +1,5 @@ --闇の指名者 +--Dark Designator local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c78063197.lua b/official/c78063197.lua index 9cdd670837..d3afcb7f4a 100644 --- a/official/c78063197.lua +++ b/official/c78063197.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion Summon - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x1110),Card.IsAbleToRemove,s.fextra,Fusion.BanishMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_EYES_RESTRICT),Card.IsAbleToRemove,s.fextra,Fusion.BanishMaterial,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id) c:RegisterEffect(e1) --equip @@ -14,22 +14,22 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end -s.listed_series={0x1110} +s.listed_series={SET_EYES_RESTRICT} s.listed_names={64631466} function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) end function s.filter(c,tp) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler() @@ -37,7 +37,7 @@ function s.filter(c,tp) end function s.eqfilter(c,ec,tp) local eff={c:GetCardEffect(89785779)} - if c:IsFacedown() or ((not c:IsSetCard(0x1110) or not c:IsType(TYPE_FUSION)) and not c:IsCode(64631466)) then return false end + if c:IsFacedown() or ((not c:IsSetCard(SET_EYES_RESTRICT) or not c:IsType(TYPE_FUSION)) and not c:IsCode(64631466)) then return false end for _,te in ipairs(eff) do if te:GetValue()(ec,c,tp) then return true end end @@ -61,4 +61,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) then te:GetOperation()(tc2,te:GetLabelObject(),tp,tc1) end -end +end \ No newline at end of file diff --git a/official/c78077209.lua b/official/c78077209.lua index fd71a6de23..43f432c0d1 100644 --- a/official/c78077209.lua +++ b/official/c78077209.lua @@ -1,22 +1,22 @@ --- 魔竜将ディアボリカ --- Diabolica, Dragon Fiend Commander --- Scripted by Hatter +--魔竜将ディアボリカ +--Diabolica the Draconique General +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_TO_GRAVE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add 1 Fiend monster to the hand + --Add 1 Fiend monster to the hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -46,14 +46,14 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end diff --git a/official/c78080961.lua b/official/c78080961.lua index 416957a721..1c16a60eed 100644 --- a/official/c78080961.lua +++ b/official/c78080961.lua @@ -1,6 +1,5 @@ --SPYRAL-ジーニアス --SPYRAL Quik-Fix - local s,id=GetID() function s.initial_effect(c) --If normal summoned, add 1 "SPYRAL GEAR" card from deck @@ -29,11 +28,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10ee} +s.listed_series={SET_SPYRAL_GEAR} s.listed_names={41091257} - function s.thfilter(c) - return c:IsSetCard(0x10ee) and c:IsAbleToHand() + return c:IsSetCard(SET_SPYRAL_GEAR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -55,7 +53,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -72,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c78082039.lua b/official/c78082039.lua index 7c91b77565..92373d64c2 100644 --- a/official/c78082039.lua +++ b/official/c78082039.lua @@ -1,4 +1,5 @@ --クローザー・フォレスト +--Closed Forest local s,id=GetID() function s.initial_effect(c) --activate @@ -43,6 +44,6 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,1) e1:SetValue(s.efilter) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c78084378.lua b/official/c78084378.lua index 6a0c2d3dd6..d2551baf2e 100644 --- a/official/c78084378.lua +++ b/official/c78084378.lua @@ -42,19 +42,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,1) e1:SetCondition(s.accon) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.accon(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() end function s.filter1(c) return c:IsRace(RACE_CYBERSE) and c:IsAbleToHand() @@ -81,5 +81,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end - +end \ No newline at end of file diff --git a/official/c78098950.lua b/official/c78098950.lua index e81ed7f772..08bcd45675 100644 --- a/official/c78098950.lua +++ b/official/c78098950.lua @@ -62,4 +62,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local loc=LOCATION_ONFIELD|LOCATION_REMOVED|LOCATION_GRAVE local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,loc,loc,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7811875.lua b/official/c7811875.lua index 92f67f2057..5dc2625cf2 100644 --- a/official/c7811875.lua +++ b/official/c7811875.lua @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(0,1) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -53,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON) Duel.RegisterEffect(e3,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,0,1,aux.Stringid(id,1),nil) -end +end \ No newline at end of file diff --git a/official/c78121572.lua b/official/c78121572.lua index 867251a408..aa6694bbc6 100644 --- a/official/c78121572.lua +++ b/official/c78121572.lua @@ -38,4 +38,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) tc:AddCounter(COUNTER_SPELL,1) end end -end +end \ No newline at end of file diff --git a/official/c78135071.lua b/official/c78135071.lua index e34628e06c..21ba21d060 100644 --- a/official/c78135071.lua +++ b/official/c78135071.lua @@ -1,26 +1,26 @@ --- エクソシスター・カスピテル --- Exorsister Caspitelle --- Scripted by Hatter +--エクソシスター・カスピテル +--Exosister Kaspitell +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Level 4 monsters + --2 Level 4 monsters Xyz.AddProcedure(c,nil,4,2) - -- Check materials on Xyz Summon + --Check materials on Xyz Summon local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) - -- Battle destruction immunity + --Battle destruction immunity local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetValue(function(_,c)return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_GRAVE)end) + e1:SetValue(function(_,c)return c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_GRAVE)end) c:RegisterEffect(e1) - -- Limit summons from GY + --Limit summons from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -30,32 +30,32 @@ function s.initial_effect(c) e2:SetCondition(s.limcon) e2:SetOperation(s.limop) c:RegisterEffect(e2) - -- Search monster + --Search monster local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.thcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x174) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END + if g:IsExists(Card.IsSetCard,1,nil,SET_EXOSISTER) then + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END c:RegisterFlagEffect(id,reset,0,1) end end function s.limcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_XYZ) and c:GetFlagEffect(id)>0 + return c:IsXyzSummoned() and c:GetFlagEffect(id)>0 end function s.limop(e,tp,eg,ep,ev,re,r,rp) - -- Neither player can Special Summon from the GY + --Neither player can Special Summon from the GY local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) @@ -63,15 +63,11 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_GRAVE) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.thfilter(c) - return c:IsSetCard(0x174) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_EXOSISTER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -84,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c78144171.lua b/official/c78144171.lua index b94953d4a3..fd48fb8031 100644 --- a/official/c78144171.lua +++ b/official/c78144171.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c78156759.lua b/official/c78156759.lua index e53a484856..bca2d7fa16 100644 --- a/official/c78156759.lua +++ b/official/c78156759.lua @@ -1,4 +1,5 @@ --発条機雷ゼンマイン +--Wind-Up Zenmaines local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -31,7 +32,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not c:IsReason(REASON_REPLACE) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end if Duel.SelectEffectYesNo(tp,c,96) then c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) return true else return false end end @@ -50,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78161361.lua b/official/c78161361.lua index 6dbd51364b..da5b5a11a5 100644 --- a/official/c78161361.lua +++ b/official/c78161361.lua @@ -1,5 +1,5 @@ --ドライブレイブ ---Dribrave +--Bravedrive --scripted by andre local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local at=Duel.GetAttacker() @@ -37,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) at:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78161960.lua b/official/c78161960.lua index c3147f7998..8cf45d71f4 100644 --- a/official/c78161960.lua +++ b/official/c78161960.lua @@ -17,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_BATTLE,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_BATTLE,0,1) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE) end function s.filter(c,e,tp) @@ -30,7 +30,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)==0 then return end local c=e:GetHandler() - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -46,14 +46,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c7817703.lua b/official/c7817703.lua index e13e44081c..8a93d5ff82 100644 --- a/official/c7817703.lua +++ b/official/c7817703.lua @@ -1,4 +1,5 @@ --D・パワーユニット +--Morphtronic Engine local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter,nil,nil,nil,s.operation) @@ -10,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsSetCard(0x26) and c:GetLevel()==3 + return c:IsSetCard(SET_MORPHTRONIC) and c:GetLevel()==3 end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -18,14 +19,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.descon) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) e:GetHandler():RegisterEffect(e1) end end @@ -47,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(e:GetHandler(),REASON_EFFECT)==0 then return end Duel.Damage(tp,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78184733.lua b/official/c78184733.lua index 1e25c92e86..e674f24af6 100644 --- a/official/c78184733.lua +++ b/official/c78184733.lua @@ -1,6 +1,5 @@ --エンタメ・フラッシュ --Command Performance - local s,id=GetID() function s.initial_effect(c) --Change opponent's attack position monsters to defense position @@ -14,9 +13,9 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_BATTLE_START) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -42,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end diff --git a/official/c78193831.lua b/official/c78193831.lua index db46f1fcb3..33787cd47f 100644 --- a/official/c78193831.lua +++ b/official/c78193831.lua @@ -1,4 +1,5 @@ --バスター・ブレイダー +--Buster Blader local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,8 +12,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE+LOCATION_MZONE,nil)*500 + return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE|LOCATION_MZONE,nil)*500 end function s.filter(c) return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end +end \ No newline at end of file diff --git a/official/c78193832.lua b/official/c78193832.lua deleted file mode 100644 index 9baedc1419..0000000000 --- a/official/c78193832.lua +++ /dev/null @@ -1,18 +0,0 @@ ---バスター·ブレイダー -local s,id=GetID() -function s.initial_effect(c) - --atkup - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetRange(LOCATION_MZONE) - e1:SetValue(s.val) - c:RegisterEffect(e1) -end -function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE+LOCATION_MZONE,nil)*500 -end -function s.filter(c) - return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end diff --git a/official/c78199891.lua b/official/c78199891.lua index e235a820f7..3fad3019a1 100644 --- a/official/c78199891.lua +++ b/official/c78199891.lua @@ -1,5 +1,5 @@ --御巫かみくらべ ---Mikanko Catfight +--Mikanko Rivalry --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e1:SetCondition(s.eqpcond) e1:SetTarget(s.eqptg) e1:SetOperation(s.eqpop) @@ -26,14 +26,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.eqpcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x18e),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MIKANKO),tp,LOCATION_MZONE,0,1,nil) end function s.eqfilter(c,eqtg,tp) return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(eqtg) and c:CheckUniqueOnField(tp) diff --git a/official/c78202553.lua b/official/c78202553.lua index d3875a6d75..bb2536d3b9 100644 --- a/official/c78202553.lua +++ b/official/c78202553.lua @@ -1,4 +1,5 @@ --Subterror Behemoth Stalagmo +--Subterror Behemoth Stalagmo local s,id=GetID() function s.initial_effect(c) --flip @@ -32,9 +33,9 @@ function s.initial_effect(c) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0xed) and c:IsDiscardable() + return c:IsMonster() and c:IsSetCard(SET_SUBTERROR) and c:IsDiscardable() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,nil) @@ -43,7 +44,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then + if Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_EFFECT|REASON_DISCARD)~=0 then Duel.Draw(tp,2,REASON_EFFECT) end end @@ -68,7 +69,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -76,4 +77,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c78211862.lua b/official/c78211862.lua index 4be183459e..09ab0c0c2d 100644 --- a/official/c78211862.lua +++ b/official/c78211862.lua @@ -1,4 +1,5 @@ --ライジング・エナジー +--Rising Energy local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,18 +9,15 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -33,8 +31,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1500) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78217065.lua b/official/c78217065.lua index 523358b749..211287e185 100644 --- a/official/c78217065.lua +++ b/official/c78217065.lua @@ -1,5 +1,5 @@ --エヴォリューション・レザルト・バースト ---Evolution Result Burst +--Evolution End Burst --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end --Cannot Special Summon, except with Spell effects @@ -45,12 +45,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTarget(s.splimit) Duel.RegisterEffect(e2,tp) end function s.atkfilter(c,tp,re) - return re and re:GetHandler():IsCode(3659803) and c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) + return re and re:GetHandler():IsCode(3659803) and c:IsSummonPlayer(tp) and c:IsFusionSummoned() and c:GetMaterialCount()>=6 end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -67,10 +67,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetValue(tc:GetMaterialCount()-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not (se and se:IsActiveType(TYPE_SPELL)) + return not (se and se:IsSpellEffect()) end \ No newline at end of file diff --git a/official/c78225596.lua b/official/c78225596.lua index 74d4811272..03529e578e 100644 --- a/official/c78225596.lua +++ b/official/c78225596.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14a),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_APPLIANCER),2) --cannot be targeted by attacks local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -52,7 +52,7 @@ function s.initial_effect(c) e5:SetOperation(s.drop) c:RegisterEffect(e5) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} function s.imcon(e) return e:GetHandler():IsLinked() end @@ -64,7 +64,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) end local mg=a:GetMutualLinkedGroup() local octg=e:GetHandler():GetMutualLinkedGroup() - return a and a:IsControler(tp) and a:IsLinkMonster() and a:IsSetCard(0x14a) + return a and a:IsControler(tp) and a:IsLinkMonster() and a:IsSetCard(SET_APPLIANCER) and a~=e:GetHandler() and b and b:IsControler(1-tp) and mg:IsContains(e:GetHandler()) and octg:IsContains(a) end @@ -80,7 +80,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(atkct*1000) a:RegisterEffect(e1) end @@ -88,14 +88,14 @@ end function s.checkfilter(c,e,tp) local mg=c:GetMutualLinkedGroup() local octg=e:GetHandler():GetMutualLinkedGroup() - return c:IsSetCard(0x14a) and c:IsLinkMonster() and c:IsControler(tp) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsSetCard(SET_APPLIANCER) and c:IsLinkMonster() and c:IsControler(tp) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not (mg:IsContains(e:GetHandler()) and octg:IsContains(c)) end function s.checkcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.checkfilter,1,e:GetHandler(),e,tp) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -109,4 +109,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78229193.lua b/official/c78229193.lua index 026ea9e26d..c37d6dbd50 100644 --- a/official/c78229193.lua +++ b/official/c78229193.lua @@ -1,4 +1,5 @@ --白闘気海豚 +--White Aura Dolphin local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -41,27 +42,27 @@ function s.atkoperation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(tc:GetBaseAttack()/2)) tc:RegisterEffect(e1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return rp==1-tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.cfilter(c,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.IsPlayerAffectedByEffect(tp,69832741)) + if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION)) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end @@ -72,8 +73,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c78231355.lua b/official/c78231355.lua index e2152187b8..fa862059a9 100644 --- a/official/c78231355.lua +++ b/official/c78231355.lua @@ -12,25 +12,25 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.filter(c,e,tp) - return c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.gyfilter(c,tc) - return c:IsSetCard(0x133) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_DRAGONMAID) and c:IsMonster() and c:IsAbleToGrave() and c:IsAttribute(tc:GetAttribute()) and not c:IsLevel(tc:GetLevel()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then local g=Duel.GetMatchingGroup(s.gyfilter,tp,LOCATION_DECK,0,nil,tc) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c78243409.lua b/official/c78243409.lua index c1d6777966..1b8033bde0 100644 --- a/official/c78243409.lua +++ b/official/c78243409.lua @@ -1,4 +1,5 @@ --火口に潜む者 +--The Thing in the Crater local s,id=GetID() function s.initial_effect(c) --special summon @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78266168.lua b/official/c78266168.lua index 6874003403..4ac33e34e5 100644 --- a/official/c78266168.lua +++ b/official/c78266168.lua @@ -1,4 +1,5 @@ --ジャイアントマミー +--Giant Axe Mummy local s,id=GetID() function s.initial_effect(c) --turn set @@ -24,7 +25,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.Destroy(a,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78274190.lua b/official/c78274190.lua index af78e25f3e..3cedf538df 100644 --- a/official/c78274190.lua +++ b/official/c78274190.lua @@ -39,13 +39,13 @@ function s.initial_effect(c) e5:SetOperation(s.operation) c:RegisterEffect(e5) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.sccon(e) local tp=e:GetHandlerPlayer() - return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.afilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0x9a) and c:CanChainAttack() + return c:IsControler(tp) and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:CanChainAttack() end function s.catg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.afilter,1,nil,tp) end @@ -60,13 +60,13 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x9a) end + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_SUPERHEAVY_SAMURAI) end local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) if ct>2 then ct=2 end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,ct,false,nil,nil,0x9a) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,ct,false,nil,nil,SET_SUPERHEAVY_SAMURAI) local rct=Duel.Release(g,REASON_COST) e:SetLabel(rct) end diff --git a/official/c78275321.lua b/official/c78275321.lua index 27141bb3b0..cc1c1b078c 100644 --- a/official/c78275321.lua +++ b/official/c78275321.lua @@ -1,4 +1,5 @@ --赤蟻アスカトル +--Fire Ant Ascator local s,id=GetID() function s.initial_effect(c) --spsummon @@ -34,12 +35,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() local e3=Effect.CreateEffect(c) @@ -47,11 +48,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetOperation(s.desop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) e3:SetCountLimit(1) tc:RegisterEffect(e3) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78310590.lua b/official/c78310590.lua index 488a0cd427..a369db895d 100644 --- a/official/c78310590.lua +++ b/official/c78310590.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -50,14 +50,10 @@ function s.initial_effect(c) e5:SetOperation(s.spop2) c:RegisterEffect(e5) end -s.listed_series={0x10ec,0x20ec} +s.listed_series={SET_ABYSS_ACTOR,SET_ABYSS_SCRIPT} s.listed_names={id} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.thfilter(c) - return c:IsSetCard(0x10ec) and not c:IsCode(id) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsSetCard(SET_ABYSS_ACTOR) and not c:IsCode(id) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -78,15 +74,15 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,3),nil) end function s.splimit(e,c) - return not (c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM)) + return not (c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM)) end function s.valfilter(c) - return c:IsSetCard(0x20ec) and c:IsSpell() + return c:IsSetCard(SET_ABYSS_SCRIPT) and c:IsSpell() end function s.val(e,c) return Duel.GetMatchingGroupCount(s.valfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*100 @@ -108,10 +104,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL)and re:GetHandler():IsSetCard(0x20ec) + return re:IsSpellEffect() and re:GetHandler():IsSetCard(SET_ABYSS_SCRIPT) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -127,7 +123,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -150,4 +146,3 @@ end function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) end - diff --git a/official/c78316184.lua b/official/c78316184.lua index 408818f985..89c12ce649 100644 --- a/official/c78316184.lua +++ b/official/c78316184.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) end s.listed_names={39996157} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) end @@ -48,7 +48,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -79,4 +79,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78348934.lua b/official/c78348934.lua index b6150c4f80..1d78a0fc23 100644 --- a/official/c78348934.lua +++ b/official/c78348934.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -28,9 +28,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_DESTRUCTION_SWORD,SET_BUSTER_BLADER} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.rmvfilter(c,e) return c:IsMonster() and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) end @@ -71,7 +68,7 @@ function s.cfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD|REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToHand() end diff --git a/official/c78349103.lua b/official/c78349103.lua index d9508c3afa..d6e0f2c57f 100644 --- a/official/c78349103.lua +++ b/official/c78349103.lua @@ -1,6 +1,5 @@ --マシンナーズ・ピースキーパー --Machina Peacekeeper - local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),false) @@ -33,4 +32,4 @@ function s.sop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c78355370.lua b/official/c78355370.lua index da2f532f06..544cb8a438 100644 --- a/official/c78355370.lua +++ b/official/c78355370.lua @@ -1,4 +1,5 @@ --クリボーン +--Kuribohrn local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,9 +8,9 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -22,16 +23,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.spcon2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xa4} -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_KURIBOH} function s.spfilter1(c,e,tp,tid) return c:GetTurnID()==tid and (c:GetReason()&REASON_BATTLE)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -54,7 +51,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():GetControler()~=tp end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xa4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsMonster() + return c:IsSetCard(SET_KURIBOH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsMonster() end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -78,4 +75,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78358521.lua b/official/c78358521.lua index 350fe1c0b4..b14364da46 100644 --- a/official/c78358521.lua +++ b/official/c78358521.lua @@ -32,18 +32,18 @@ function s.initial_effect(c) e3:SetOperation(s.decop) c:RegisterEffect(e3) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.rmfilter(c,tp) - return c:IsSetCard(0x53) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,c) end function s.filter(c) - return c:IsSetCard(0x53) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -60,14 +60,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) end if c:IsRelateToEffect(e) and c:IsFaceup() then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.sumfilter(c) - return c:IsSetCard(0x53) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_CONSTELLAR) and c:IsSummonable(true,nil) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND,0,1,nil) end @@ -92,7 +92,7 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.econ) e1:SetCountLimit(1) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -100,13 +100,13 @@ function s.decop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetTargetRange(1,0) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.econ(e) return #{Duel.GetPlayerEffect(e:GetHandlerPlayer(),id)}~=0 end function s.rfilter(e,c) - return c:IsSetCard(0x53) -end + return c:IsSetCard(SET_CONSTELLAR) +end \ No newline at end of file diff --git a/official/c78360952.lua b/official/c78360952.lua index d61bc5ce92..591ab255f2 100644 --- a/official/c78360952.lua +++ b/official/c78360952.lua @@ -1,7 +1,6 @@ --白昼のスナイパー ---Midday Sentinel +--Sunlit Sentinel --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -27,13 +26,13 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end diff --git a/official/c78362751.lua b/official/c78362751.lua index d8916db0e3..5dd66fd3fe 100644 --- a/official/c78362751.lua +++ b/official/c78362751.lua @@ -1,7 +1,6 @@ --しらうおの軍貫 --Gunkan Suship Shirauo --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -28,10 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Gunkan" archetype -s.listed_series={0x168} +s.listed_series={SET_GUNKAN} --Specifically lists itself and "Gunkan Suship Shari" s.listed_names={id,CARD_SUSHIP_SHARI} - --Check for a "Gunkan Suship Shari" you control (in MZ or as overlay material) function s.xyzfilter(c) return c:IsFaceup() and (c:IsCode(CARD_SUSHIP_SHARI) or (c:GetOverlayCount()>0 and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_SUSHIP_SHARI))) @@ -53,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Gunkan" monster, except "Gunkan Suship Shirauo" function s.ssfilter(c,e,tp) - return c:IsSetCard(0x168) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUNKAN) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end --Activation legality function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -72,7 +70,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.ssfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then --Move any number of "Gunkan Suship Shari" from deck/GY to top of deck Duel.BreakEffect() diff --git a/official/c78364470.lua b/official/c78364470.lua index 4497fa22d5..b8e82d5263 100644 --- a/official/c78364470.lua +++ b/official/c78364470.lua @@ -9,16 +9,16 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetDescription(aux.Stringid(id,0)) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x53)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_CONSTELLAR)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c78387742.lua b/official/c78387742.lua index e39f59b7af..23870b9ae8 100644 --- a/official/c78387742.lua +++ b/official/c78387742.lua @@ -1,6 +1,5 @@ --フェイク・ヒーロー --Fake Hero - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Elemental HERO" monster from hand @@ -12,10 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008} - +s.listed_series={SET_ELEMENTAL_HERO} function s.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) --Return it to hand during end phase local e2=Effect.CreateEffect(e:GetHandler()) @@ -44,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetOperation(s.retop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetCountLimit(1) tc:RegisterEffect(e2,true) end diff --git a/official/c78391364.lua b/official/c78391364.lua index e3e5bb290b..e0129a56e4 100644 --- a/official/c78391364.lua +++ b/official/c78391364.lua @@ -1,4 +1,5 @@ --超重武者テンB-N +--Superheavy Samurai Scales local s,id=GetID() function s.initial_effect(c) --spsummon @@ -24,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} s.listed_names={id} function s.spcon(e,c) if c==nil then return true end @@ -33,7 +34,7 @@ function s.spcon(e,c) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.filter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end diff --git a/official/c78394032.lua b/official/c78394032.lua index 31fa50ccae..4abcf3f413 100644 --- a/official/c78394032.lua +++ b/official/c78394032.lua @@ -31,4 +31,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,TOKEN_ENGINE) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c7841112.lua b/official/c7841112.lua index 539b8aaae6..2a33cb23b9 100644 --- a/official/c7841112.lua +++ b/official/c7841112.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.negcon) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -131,7 +131,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsAbleToExtra() and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 + if c:IsRelateToEffect(e) and c:IsAbleToExtra() and Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) and tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c7841921.lua b/official/c7841921.lua index 27ee00d0d1..69959c613a 100644 --- a/official/c7841921.lua +++ b/official/c7841921.lua @@ -1,4 +1,5 @@ --疾走の暗黒騎士ガイア +--Charging Gaia the Fierce Knight local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -42,11 +43,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetValue(1900) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE) c:RegisterEffect(e1) end function s.thfilter(c) - return c:IsSetCard(0x10cf) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -59,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c78420796.lua b/official/c78420796.lua index aa03efcda4..8ae0c7f243 100644 --- a/official/c78420796.lua +++ b/official/c78420796.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x175),aux.FALSE,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DINOMORPHIA),aux.FALSE,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) @@ -17,20 +17,20 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.fcheck(tp,sg,fc) return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 and sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)<=1 end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK+LOCATION_EXTRA,0,nil),s.fcheck + return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToGrave),tp,LOCATION_DECK|LOCATION_EXTRA,0,nil),s.fcheck end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -47,14 +47,14 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c78422252.lua b/official/c78422252.lua index e2876ba381..5d8428fe47 100644 --- a/official/c78422252.lua +++ b/official/c78422252.lua @@ -1,4 +1,5 @@ --XX-セイバー フラムナイト +--XX-Saber Fulhelmknight local s,id=GetID() function s.initial_effect(c) --negate attack @@ -25,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end @@ -44,7 +45,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return a==Duel.GetAttacker() and (d:GetBattlePosition()&POS_DEFENSE)~=0 end function s.filter(c,e,tp) - return c:IsSetCard(0x100d) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_X_SABER) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -59,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78437364.lua b/official/c78437364.lua index ecd58f0aeb..2e85cd695b 100644 --- a/official/c78437364.lua +++ b/official/c78437364.lua @@ -1,9 +1,9 @@ --剛鬼ザ・グレート・オーガ ---Gouki the Great Ogre +--Gouki The Great Ogre local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2) c:EnableReviveLimit() --atkdown local e1=Effect.CreateEffect(c) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.atkval(e,c) local val=math.max(c:GetBaseDefense(),0) return val*-1 @@ -50,5 +50,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c78447174.lua b/official/c78447174.lua index 76f8a84634..96596497fc 100644 --- a/official/c78447174.lua +++ b/official/c78447174.lua @@ -28,10 +28,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x14a} +s.listed_series={SET_APPLIANCER} s.listed_names={id} function s.sscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x14a),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_APPLIANCER),tp,LOCATION_MZONE,0,1,nil) end function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -63,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c7845138.lua b/official/c7845138.lua index 8adc5603e2..38fa2c274e 100644 --- a/official/c7845138.lua +++ b/official/c7845138.lua @@ -1,4 +1,5 @@ --茫漠の死者 +--Endless Decay local s,id=GetID() function s.initial_effect(c) --special summon @@ -33,7 +34,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(Duel.GetLP(1-tp)/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78474168.lua b/official/c78474168.lua index 0836ef6e79..198fca6f3a 100644 --- a/official/c78474168.lua +++ b/official/c78474168.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.activate2) c:RegisterEffect(e2) @@ -43,18 +43,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return aux.exccon(e) and Duel.GetTurnPlayer()==tp + return aux.exccon(e) and Duel.IsTurnPlayer(tp) end function s.activate2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -64,13 +64,13 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c7850740.lua b/official/c7850740.lua index 29316368b9..8a708d5f00 100644 --- a/official/c7850740.lua +++ b/official/c7850740.lua @@ -62,4 +62,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c78509901.lua b/official/c78509901.lua index e12fa6c345..97da820f03 100644 --- a/official/c78509901.lua +++ b/official/c78509901.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} s.listed_names={CARD_VIJAM,4998619} function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and c:IsAbleToGraveAsCost() end function s.spcon1(e,c) if c==nil then return true end @@ -61,7 +61,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -106,4 +106,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end else return end -end +end \ No newline at end of file diff --git a/official/c78512663.lua b/official/c78512663.lua index f37bc59dba..08d6b64095 100644 --- a/official/c78512663.lua +++ b/official/c78512663.lua @@ -27,13 +27,13 @@ function s.initial_effect(c) aux.EnableNeosReturn(c,nil,nil,nil,e2) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -52,4 +52,4 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7852509.lua b/official/c7852509.lua index 75b5b40988..056624068e 100644 --- a/official/c7852509.lua +++ b/official/c7852509.lua @@ -1,5 +1,5 @@ +--破壊輪廻 --Loop of Destruction ---Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --change code + --This card's name becomes "Ring of Destruction" while on the field local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -15,8 +15,9 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetValue(83555666) c:RegisterEffect(e2) - --destroy + --Destroy 1 monster on the field, and if you do, each player takes 500 damage local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) @@ -28,6 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end +s.listed_names={83555666} function s.cfilter(c) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) end @@ -49,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,500,REASON_EFFECT,true) Duel.RDComplete() end -end +end \ No newline at end of file diff --git a/official/c7852878.lua b/official/c7852878.lua index df66b759d1..1c2bc3f007 100644 --- a/official/c7852878.lua +++ b/official/c7852878.lua @@ -26,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.Destroy(a,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78534861.lua b/official/c78534861.lua index 4812299193..aa59e6a2b0 100644 --- a/official/c78534861.lua +++ b/official/c78534861.lua @@ -74,4 +74,4 @@ function s.distg(e,c) return true end return false -end +end \ No newline at end of file diff --git a/official/c78540593.lua b/official/c78540593.lua index f412ad388d..4b52cbfc21 100644 --- a/official/c78540593.lua +++ b/official/c78540593.lua @@ -1,4 +1,5 @@ --姫葵マリーナ +--Mariña, Princess of Sunflowers local s,id=GetID() function s.initial_effect(c) --destroy @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return #eg==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE+REASON_EFFECT) + return #eg==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE|REASON_EFFECT) and tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousControler(tp) and (tc:GetPreviousRaceOnField()&RACE_PLANT)~=0 end @@ -33,4 +34,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78543464.lua b/official/c78543464.lua index c77cf288f0..b0655308b0 100644 --- a/official/c78543464.lua +++ b/official/c78543464.lua @@ -1,5 +1,5 @@ --九字切りの呪符 ---Talisman of Kuji-kiri +--Kuji-Kiri Curse --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -19,9 +19,9 @@ function s.filter(c) return c:IsLevel(9) and c:IsAbleToGraveAsCost() and ((c:IsFaceup() and c:IsLocation(LOCATION_MZONE)) or c:IsLocation(LOCATION_HAND)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78552773.lua b/official/c78552773.lua index fb753761a6..6d522d2389 100644 --- a/official/c78552773.lua +++ b/official/c78552773.lua @@ -1,4 +1,5 @@ --スーパイ +--Supay local s,id=GetID() function s.initial_effect(c) --spsummon @@ -34,7 +35,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1,true) Duel.SpecialSummonComplete() @@ -43,11 +44,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetOperation(s.retop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetCountLimit(1) tc:RegisterEffect(e2) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78564023.lua b/official/c78564023.lua index f9ac910e0c..f8dbab7ea8 100644 --- a/official/c78564023.lua +++ b/official/c78564023.lua @@ -1,4 +1,5 @@ --BF-二の太刀のエテジア +--Blackwing - Etesian of Two Swords local s,id=GetID() function s.initial_effect(c) --atkup @@ -10,20 +11,16 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return a:IsControler(tp) and a:IsSetCard(0x33) and a:IsRelateToBattle() and d and d:IsRelateToBattle() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return a:IsControler(tp) and a:IsSetCard(SET_BLACKWING) and a:IsRelateToBattle() and d and d:IsRelateToBattle() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -34,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78574395.lua b/official/c78574395.lua index 0c5d3ba4bb..713f5b984c 100644 --- a/official/c78574395.lua +++ b/official/c78574395.lua @@ -1,5 +1,5 @@ --ワンダー・バルーン ---Wonder Ballons +--Wonder Balloons local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x32) @@ -46,4 +46,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsRelateToEffect(e) and c:IsFaceup() then c:AddCounter(0x32,e:GetLabel()) end -end +end \ No newline at end of file diff --git a/official/c78577570.lua b/official/c78577570.lua index 572e93d80f..6e687a2980 100644 --- a/official/c78577570.lua +++ b/official/c78577570.lua @@ -1,5 +1,6 @@ --ガルマソードの誓い +--Garma Sword Oath local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,7,nil,90844184) -end +end \ No newline at end of file diff --git a/official/c78586116.lua b/official/c78586116.lua index 8ee31b1c0a..eaa4f2646d 100644 --- a/official/c78586116.lua +++ b/official/c78586116.lua @@ -1,4 +1,5 @@ --パワーアップ・コネクター +--Power-Up Adapter local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.atop) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x26) + return c:IsFaceup() and c:IsSetCard(SET_MORPHTRONIC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -51,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,e,0,0,0,0,0) else @@ -59,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.eqlimit(e,c) - return c:IsSetCard(0x26) + return c:IsSetCard(SET_MORPHTRONIC) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local eq=e:GetHandler():GetEquipTarget() @@ -77,7 +78,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(eq:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78610936.lua b/official/c78610936.lua index 461886e16f..2b47dd54b7 100644 --- a/official/c78610936.lua +++ b/official/c78610936.lua @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local mg=tc:GetOverlayGroup() Duel.SendtoGrave(mg,REASON_EFFECT) Duel.AdjustInstantly(tc) - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)>0 then + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)>0 then local g=mg:Filter(aux.NecroValleyFilter(s.spfilter),nil,e,tp) local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE) if ft>0 and #g>0 then @@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c78613627.lua b/official/c78613627.lua index 643ad17f48..a03bce9bc6 100644 --- a/official/c78613627.lua +++ b/official/c78613627.lua @@ -1,4 +1,5 @@ --デス・カンガルー +--Des Kangaroo local s,id=GetID() function s.initial_effect(c) --destroy @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.Destroy(a,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78621186.lua b/official/c78621186.lua index cbbfe34bc0..6bbbda269c 100644 --- a/official/c78621186.lua +++ b/official/c78621186.lua @@ -1,4 +1,5 @@ --バーバリアン・ハウリング +--Battleguard Howling local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.cfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_WARRIOR) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and eg:IsExists(s.cfilter,1,nil,tp) + return rp~=tp and re:IsMonsterEffect() and eg:IsExists(s.cfilter,1,nil,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -43,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Damage(1-tp,dam,REASON_EFFECT)==0 then return end Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78625448.lua b/official/c78625448.lua index fd4bd79d0b..999d7f6298 100644 --- a/official/c78625448.lua +++ b/official/c78625448.lua @@ -19,29 +19,29 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x14b} +s.listed_series={SET_NUMERON} s.xyz_number=3 function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsStatus(STATUS_OPPO_BATTLE) and c:IsRelateToBattle() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x14b),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_NUMERON),tp,LOCATION_MZONE,0,nil) for tc in g:Iter() do --Double ATK until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_PHASE_END,1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78625592.lua b/official/c78625592.lua index 6191700600..ed92a0da7a 100644 --- a/official/c78625592.lua +++ b/official/c78625592.lua @@ -26,12 +26,12 @@ function s.initial_effect(c) e3:SetHintTiming(0,TIMING_ATTACK) e3:SetRange(LOCATION_GRAVE) e3:SetCondition(s.grcondition) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetOperation(s.groperation) c:RegisterEffect(e3) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1000) end @@ -43,13 +43,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end function s.grcondition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsAbleToEnterBP() or Duel.IsBattlePhase()) end function s.groperation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c78636495.lua b/official/c78636495.lua index cd9b187b8d..16eb2fa95d 100644 --- a/official/c78636495.lua +++ b/official/c78636495.lua @@ -1,4 +1,5 @@ --ニュート +--Slate Warrior local s,id=GetID() function s.initial_effect(c) --flip @@ -23,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) c:RegisterEffect(e1) local e2=e1:Clone() @@ -39,10 +40,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c7864030.lua b/official/c7864030.lua index 5dd639fd4d..e309dc7bdd 100644 --- a/official/c7864030.lua +++ b/official/c7864030.lua @@ -1,4 +1,5 @@ --超重武者タイマ-2 +--Superheavy Samurai Blowtorch local s,id=GetID() function s.initial_effect(c) --change battle target @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.condition1) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) c:RegisterEffect(e1) @@ -29,14 +30,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -54,7 +51,7 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) end end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()~=e:GetHandler() + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()~=e:GetHandler() end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -64,4 +61,4 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(at,c) end end -end +end \ No newline at end of file diff --git a/official/c78642798.lua b/official/c78642798.lua index d6b3a5f7eb..6b5d11878d 100644 --- a/official/c78642798.lua +++ b/official/c78642798.lua @@ -1,7 +1,6 @@ --黄金の邪教神 ---Golden Idol +--Golden-Eyes Idol --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -34,7 +33,6 @@ function s.initial_effect(c) end --Lists "Relinquished"/"Eyes Restrict" archetype s.listed_series={} - --Activation legality function s.looktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 end @@ -52,7 +50,7 @@ function s.lookop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(27125110) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -76,7 +74,7 @@ function s.equiptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end --Check for a "Relinquished"/"Eyes Restrict" monster function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x110) and not c:IsSummonableCard() + return c:IsFaceup() and c:IsSetCard(SET_RELINQUISHED) and not c:IsSummonableCard() end --Equip 1 of opponent's monsters to 1 of your "Relinquished"/"Eyes Restrict" monsters function s.equipop(e,tp,eg,ep,ev,re,r,rp) @@ -102,7 +100,7 @@ function s.eqop(c,e,tp,tc,atk) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -110,9 +108,9 @@ function s.eqop(c,e,tp,tc,atk) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end function s.eqlimit(e,c) return c:GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c78651105.lua b/official/c78651105.lua index 11bbe9b175..0de8ba2e51 100644 --- a/official/c78651105.lua +++ b/official/c78651105.lua @@ -36,7 +36,7 @@ function s.ntop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(1900) c:RegisterEffect(e1) @@ -52,4 +52,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78658564.lua b/official/c78658564.lua index 7405ad9bd6..2837994646 100644 --- a/official/c78658564.lua +++ b/official/c78658564.lua @@ -1,10 +1,11 @@ --ゴブリン突撃部隊 +--Goblin Attack Force local s,id=GetID() function s.initial_effect(c) --to defense local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.poscon) @@ -23,6 +24,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c78661338.lua b/official/c78661338.lua index 04f41be2fa..f797fea3fd 100644 --- a/official/c78661338.lua +++ b/official/c78661338.lua @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g==0 then return end Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,ct,ct,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end end @@ -71,7 +71,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -84,5 +84,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c78663366.lua b/official/c78663366.lua index ac879cacfd..fd9c3cb6c3 100644 --- a/official/c78663366.lua +++ b/official/c78663366.lua @@ -1,4 +1,5 @@ --ヴェルズ・サンダーバード +--Evilswarm Thunderbird local s,id=GetID() function s.initial_effect(c) --remove @@ -19,16 +20,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Remove(c,nil,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if c:IsRelateToEffect(e) and c:IsControler(tp) and Duel.Remove(c,nil,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - if Duel.GetCurrentPhase()==PHASE_STANDBY then + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + if Duel.IsPhase(PHASE_STANDBY) then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.retcon) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,2) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) end e1:SetLabelObject(c) e1:SetCountLimit(1) @@ -46,7 +47,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78665705.lua b/official/c78665705.lua index e8e3e1b90d..9a62516ada 100644 --- a/official/c78665705.lua +++ b/official/c78665705.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.condition) e2:SetOperation(s.checktribute) c:RegisterEffect(e2) @@ -28,12 +28,12 @@ function s.filter(c) return c:IsCode(CARD_RA) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -47,12 +47,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(aux.TargetBoolFunction(Card.IsLevelAbove,5)) e1:SetValue(0x1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_EXTRA_SET_COUNT) Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id+1)==0 @@ -62,15 +62,15 @@ function s.checktribute(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetOperation(s.atkboost) Duel.RegisterEffect(e1,0) - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.atkboost(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local c=e:GetHandler() - if tc:IsSummonType(SUMMON_TYPE_TRIBUTE) and tc:IsCode(CARD_RA) then + if tc:IsTributeSummoned() and tc:IsCode(CARD_RA) then local g=tc:GetMaterial() local atk=0 local def=0 @@ -82,11 +82,11 @@ function s.atkboost(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(def) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c7868571.lua b/official/c7868571.lua index 75e1b8daec..0432b0bbb8 100644 --- a/official/c7868571.lua +++ b/official/c7868571.lua @@ -1,4 +1,5 @@ --メタルフォーゼ・シルバード +--Metalfoes Silverd local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -24,7 +25,7 @@ function s.desfilter(c,tp) end end function s.filter(c,ignore) - return c:IsSetCard(0xe1) and c:IsSpellTrap() and c:IsSSetable(ignore) + return c:IsSetCard(SET_METALFOES) and c:IsSpellTrap() and c:IsSSetable(ignore) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g:GetFirst()) end end -end +end \ No newline at end of file diff --git a/official/c786906.lua b/official/c786906.lua index c6aa06ef8e..c9e0f4391a 100644 --- a/official/c786906.lua +++ b/official/c786906.lua @@ -29,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78697395.lua b/official/c78697395.lua index 65f5bba40b..86088fb54d 100644 --- a/official/c78697395.lua +++ b/official/c78697395.lua @@ -1,4 +1,5 @@ --第三の棺 +--The Third Sarcophagus local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -9,4 +10,4 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c78700060.lua b/official/c78700060.lua index 22a555535c..02e6c1aa24 100644 --- a/official/c78700060.lua +++ b/official/c78700060.lua @@ -17,17 +17,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return re:IsMonsterEffect() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -41,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78706415.lua b/official/c78706415.lua index bb23d7f9b2..2c497c4428 100644 --- a/official/c78706415.lua +++ b/official/c78706415.lua @@ -1,4 +1,5 @@ --ファイバーポッド +--Fiber Jar local s,id=GetID() function s.initial_effect(c) --flip @@ -11,12 +12,12 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,0x1e,0x1e) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=Duel.GetFieldGroup(tp,0x1e,0x1e) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) g:Remove(Card.IsStatus,nil,STATUS_BATTLE_DESTROYED) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK) @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(tp,5,REASON_EFFECT) Duel.Draw(1-tp,5,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78734254.lua b/official/c78734254.lua index c6d9a85b19..e3c65bee7f 100644 --- a/official/c78734254.lua +++ b/official/c78734254.lua @@ -1,4 +1,5 @@ --N・マリン・ドルフィン +--Neo-Spacian Marine Dolphin local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -28,7 +29,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end @@ -52,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c78748366.lua b/official/c78748366.lua index 64f53d224f..bf7569ad27 100644 --- a/official/c78748366.lua +++ b/official/c78748366.lua @@ -24,19 +24,19 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLED) e3:SetRange(LOCATION_SZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0xc5,0xbb} +s.listed_series={SET_VOID,SET_INFERNOID} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0xc5) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_VOID) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -56,7 +56,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -64,17 +64,13 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.sumlimit(e,c) - return not c:IsSetCard(0xbb) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return not c:IsSetCard(SET_INFERNOID) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if a:IsControler(1-tp) then a,d=d,a end - if chk==0 then return a and d and a:IsSetCard(0xbb) and (a:IsAbleToRemove() or d:IsAbleToRemove()) end + if chk==0 then return a and d and a:IsSetCard(SET_INFERNOID) and (a:IsAbleToRemove() or d:IsAbleToRemove()) end local g=Group.CreateGroup() if a:IsRelateToBattle() then g:AddCard(a) end if d:IsRelateToBattle() then g:AddCard(d) end @@ -86,4 +82,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(a,d) local rg=g:Filter(Card.IsRelateToBattle,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c78751195.lua b/official/c78751195.lua index 0becc15311..5adeaf6f87 100644 --- a/official/c78751195.lua +++ b/official/c78751195.lua @@ -29,12 +29,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Part of "@Ignister" archetype -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} --Lists "A.I. Love Fusion" s.listed_names={59332125} --Look for "@Ignister" monster function s.filter(c) - return c:IsSetCard(0x135) and c:IsFaceup() + return c:IsSetCard(SET_IGNISTER) and c:IsFaceup() end --Check for "@Ignister" monster in monster zones function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -73,11 +73,10 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,1,1,nil) - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) and #g>0 then local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end - +end \ No newline at end of file diff --git a/official/c78765160.lua b/official/c78765160.lua index d908b481df..201a6c8dc3 100644 --- a/official/c78765160.lua +++ b/official/c78765160.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) c:RegisterEffect(e1) --change code local e2=Effect.CreateEffect(c) @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetCost(s.damcost) e3:SetOperation(s.damop) c:RegisterEffect(e3) - -- send to deck and draw + --send to deck and draw local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) @@ -59,11 +59,11 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.tdfilter(c) @@ -81,12 +81,12 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not e:GetHandler():IsRelateToEffect(e) or not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==2 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78778375.lua b/official/c78778375.lua index 898266eb85..a24cbc4083 100644 --- a/official/c78778375.lua +++ b/official/c78778375.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc3),aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_EDGE_IMP),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL)) --Destroy 2 cards local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -25,18 +25,18 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_DAMAGE_STEP+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMING_DAMAGE_STEP|TIMING_END_PHASE) e2:SetCountLimit(1) - e2:SetCondition(s.atkcon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xc3,0xa9,0xad} -s.material_setcode={0xa9,0xc3} +s.listed_series={SET_EDGE_IMP,SET_FLUFFAL,SET_FRIGHTFUR} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g1=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil) @@ -55,27 +55,24 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atkfilter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:GetBaseAttack()>0 end function s.gyfilter(c) - return c:IsSetCard(0xad) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_FRIGHTFUR) and not c:IsCode(id) and c:IsAbleToGrave() end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end + and Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then --Increase ATK @@ -84,7 +81,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(tc:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78783370.lua b/official/c78783370.lua index f3f8e81bea..3744daac88 100644 --- a/official/c78783370.lua +++ b/official/c78783370.lua @@ -1,4 +1,5 @@ --地獄の扉越し銃 +--Barrel Behind the Door local s,id=GetID() function s.initial_effect(c) --reflect @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if re:IsSpellTrapEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) if ex and (cp==tp or cp==PLAYER_ALL) then return true end ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) @@ -34,4 +35,4 @@ function s.refcon(e,re,val,r,rp,rc) if cc==0 or (r&REASON_EFFECT)==0 then return end local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) return cid==e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c78785392.lua b/official/c78785392.lua index ffb404fee5..44e3b9aebb 100644 --- a/official/c78785392.lua +++ b/official/c78785392.lua @@ -1,6 +1,5 @@ --花合わせ --Flower Gathering - local s,id=GetID() function s.initial_effect(c) --Special summon 4 "Flower Cardian" monsters with 100 ATK from deck @@ -16,10 +15,9 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SUMMON,s.counterfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0xe6} - +s.listed_series={SET_FLOWER_CARDIAN} function s.counterfilter(c) - return c:IsSetCard(0xe6) + return c:IsSetCard(SET_FLOWER_CARDIAN) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SUMMON)==0 @@ -30,17 +28,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e2,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0xe6) + return not c:IsSetCard(SET_FLOWER_CARDIAN) end function s.filter(c,e,tp) - return c:GetAttack()==100 and c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) + return c:GetAttack()==100 and c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -60,12 +58,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Cannot be tributed for a tribute summon local e3=Effect.CreateEffect(c) @@ -75,7 +73,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_UNRELEASABLE_SUM) e3:SetRange(LOCATION_MZONE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3,true) end end diff --git a/official/c78789356.lua b/official/c78789356.lua index 10dcfcb69a..f80f88ef05 100644 --- a/official/c78789356.lua +++ b/official/c78789356.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c78792195.lua b/official/c78792195.lua index 014cac8744..f666d4b397 100644 --- a/official/c78792195.lua +++ b/official/c78792195.lua @@ -1,4 +1,5 @@ --六武衆の露払い +--Hand of the Six Samurai local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,15 +15,15 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.confilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) end function s.con(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.cfilter(c) - return c:IsSetCard(0x3d) + return c:IsSetCard(SET_SIX_SAMURAI) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e) @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78794994.lua b/official/c78794994.lua index f75ae95c88..e7e7b88cb0 100644 --- a/official/c78794994.lua +++ b/official/c78794994.lua @@ -1,4 +1,5 @@ --戦線復活の代償 +--Symbols of Duty local s,id=GetID() function s.initial_effect(c) --Activate @@ -50,7 +51,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -60,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c78811937.lua b/official/c78811937.lua index c6fe2ad4d6..e9dfc1e42d 100644 --- a/official/c78811937.lua +++ b/official/c78811937.lua @@ -1,4 +1,5 @@ --忍び寄る闇 +--Creeping Darkness local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,9 +16,9 @@ function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local rg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(rg,POS_FACEUP,REASON_COST) end function s.filter(c) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c78835747.lua b/official/c78835747.lua index 7066a4bfd2..235bce444c 100644 --- a/official/c78835747.lua +++ b/official/c78835747.lua @@ -1,4 +1,5 @@ --EMカレイドスコーピオン +--Performapal Kaleidoscorp local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -43,10 +44,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(s.atkfilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.atkfilter(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) -end + return c:IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c78836195.lua b/official/c78836195.lua index db4a042395..a4d7a87106 100644 --- a/official/c78836195.lua +++ b/official/c78836195.lua @@ -1,9 +1,9 @@ --- 瑞相剣究 --- Swordsoul Assessment --- Scripted by Hatter +--瑞相剣究 +--Swordsoul Assessment +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Banish up to 5 cards and increase the ATK of a monster you control + --Banish up to 5 cards and increase the ATK of a monster you control local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -11,11 +11,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.rmcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - -- Special Summon 1 "Swordsoul Token" + --Special Summon 1 "Swordsoul Token" local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -28,9 +28,6 @@ function s.initial_effect(c) end s.listed_names={TOKEN_SWORDSOUL} s.listed_series={SET_SWORDSOUL} -function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.rmfilter(c) return (c:IsSetCard(SET_SWORDSOUL) or (c:IsMonster() and c:IsRace(RACE_WYRM))) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) @@ -53,7 +50,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,5,tc) local rc=Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) if rc>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then - -- Increase ATK + --Increase ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) @@ -75,7 +72,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local token=Duel.CreateToken(tp,TOKEN_SWORDSOUL) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Cannot Special Summon non-Synchro monsters from Extra Deck + --Cannot Special Summon non-Synchro monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -85,7 +82,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) - -- Clock Lizard check + --Clock Lizard check local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) diff --git a/official/c78845026.lua b/official/c78845026.lua index 97e27d992d..7929778d93 100644 --- a/official/c78845026.lua +++ b/official/c78845026.lua @@ -1,4 +1,5 @@ --ライトニング・チューン +--Lightwave Tuning local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,8 +27,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c78859567.lua b/official/c78859567.lua index 59868acdeb..0d8027a32f 100644 --- a/official/c78859567.lua +++ b/official/c78859567.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(function() return Duel.GetCurrentPhase()==PHASE_MAIN2 end) + e1:SetCondition(function() return Duel.IsPhase(PHASE_MAIN2) end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -22,16 +22,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local zone=aux.GetMMZonesPointedTo(tp) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) - return ct>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) + return ct>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local zone=aux.GetMMZonesPointedTo(tp) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) if ct<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if #g>0 then local sg=aux.SelectUnselectGroup(g,e,tp,1,ct,dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,zone) diff --git a/official/c78864369.lua b/official/c78864369.lua index fca4371917..fc38211fa2 100644 --- a/official/c78864369.lua +++ b/official/c78864369.lua @@ -1,4 +1,5 @@ --リバースソウル +--Soul Reversal local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,6 +25,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c78868119.lua b/official/c78868119.lua index 8cc0789772..c46c7463be 100644 --- a/official/c78868119.lua +++ b/official/c78868119.lua @@ -27,4 +27,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78868776.lua b/official/c78868776.lua index f50da97984..28c3519bcc 100644 --- a/official/c78868776.lua +++ b/official/c78868776.lua @@ -1,4 +1,5 @@ --剣闘獣ラクエル +--Gladiator Beast Laquari local s,id=GetID() function s.initial_effect(c) --atk @@ -13,15 +14,15 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={id} function s.atkcon(e) return e:GetHandler():GetFlagEffect(id)>0 @@ -29,26 +30,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,100,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c78872731.lua b/official/c78872731.lua index e81e98c69b..140decc29e 100644 --- a/official/c78872731.lua +++ b/official/c78872731.lua @@ -1,4 +1,5 @@ --十二獣モルモラット +--Zoodiac Ratpier local s,id=GetID() function s.initial_effect(c) --send to grave @@ -17,15 +18,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} s.listed_names={id} function s.tgfilter(c) - return c:IsSetCard(0xf1) and c:IsAbleToGrave() + return c:IsSetCard(SET_ZOODIAC) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -41,24 +42,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOriginalRace()==RACE_BEASTWARRIOR end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c78876707.lua b/official/c78876707.lua index 2e4f9bca9a..556b38bc99 100644 --- a/official/c78876707.lua +++ b/official/c78876707.lua @@ -60,7 +60,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spfilter(c,e,tp) return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 diff --git a/official/c7889323.lua b/official/c7889323.lua index 8f363a74c7..1b0a158bfd 100644 --- a/official/c7889323.lua +++ b/official/c7889323.lua @@ -1,5 +1,5 @@ --鉄獣の死線 ---Tri-Brigade Last Stand +--Tri-Brigade Showdown --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetOperation(s.rthop) c:RegisterEffect(e3) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.cfilter(c,tp) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsControler(tp) and c:IsFaceup() end @@ -42,7 +42,7 @@ function s.thcond(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x14f) and c:IsFaceup() and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_TRI_BRIGADE) and c:IsFaceup() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end @@ -59,7 +59,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.rthcon(e,tp,eg,ep,ev,re,r,rp) local a,b=Duel.GetBattleMonster(tp) - return a and a:IsSetCard(0x14f) and b and b:IsAbleToHand() + return a and a:IsSetCard(SET_TRI_BRIGADE) and b and b:IsAbleToHand() end function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c78910579.lua b/official/c78910579.lua index a5ca4d8162..bb190fa905 100644 --- a/official/c78910579.lua +++ b/official/c78910579.lua @@ -1,4 +1,5 @@ --儀水鏡の反魂術 +--Aquamirror Cycle local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,9 +33,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TOHAND) local tc1=g1:GetFirst() - if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT)~=0 then + if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then local hg=g2:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoHand(hg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,hg) end -end +end \ No newline at end of file diff --git a/official/c78917791.lua b/official/c78917791.lua index 2f8c9f7247..a4c7ce8230 100644 --- a/official/c78917791.lua +++ b/official/c78917791.lua @@ -31,10 +31,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x12c} +s.listed_series={SET_TENYI} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -59,13 +59,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc:IsOnField() - and rc:IsSummonLocation(LOCATION_EXTRA) and not rc:IsSetCard(0x12c) + return re:IsMonsterEffect() and rc:IsOnField() + and rc:IsSummonLocation(LOCATION_EXTRA) and not rc:IsSetCard(SET_TENYI) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() diff --git a/official/c78922939.lua b/official/c78922939.lua index 065fc7a1c3..2f78b72df0 100644 --- a/official/c78922939.lua +++ b/official/c78922939.lua @@ -1,4 +1,5 @@ --ジャンク・サーバント +--Junk Servant local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,12 +11,12 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x43) + return c:IsFaceup() and c:IsSetCard(SET_JUNK) end function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c78933589.lua b/official/c78933589.lua index 3a342c106f..a926df1336 100644 --- a/official/c78933589.lua +++ b/official/c78933589.lua @@ -19,9 +19,9 @@ function s.initial_effect(c) e2:SetOperation(s.activate) c:RegisterEffect(e2) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.filter(c) - return c:IsSetCard(0x604e) and c:IsAbleToDeck() + return c:IsSetCard(SET_EVOLSAUR) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,ct,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c78936551.lua b/official/c78936551.lua index 4b98a0c0a2..b9c12ae782 100644 --- a/official/c78936551.lua +++ b/official/c78936551.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter) end s.listed_names={id} -s.listed_series={0x121} +s.listed_series={SET_MAYAKASHI} function s.spfilter(c,e,tp) - return c:IsSetCard(0x121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_MAYAKASHI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -48,19 +48,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x121) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_MAYAKASHI) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0x121) + return not c:IsOriginalSetCard(SET_MAYAKASHI) end \ No newline at end of file diff --git a/official/c78942513.lua b/official/c78942513.lua index f17ceb9388..eb176ca290 100644 --- a/official/c78942513.lua +++ b/official/c78942513.lua @@ -1,4 +1,5 @@ --魂源への影劫回帰 +--Purushaddoll Aeon local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,20 +9,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9d} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_SHADDOLL} function s.filter(c) - return c:IsSetCard(0x9d) and c:IsFaceup() + return c:IsSetCard(SET_SHADDOLL) and c:IsFaceup() end function s.tgfilter(c) - return c:IsSetCard(0x9d) and c:IsAbleToGrave() + return c:IsSetCard(SET_SHADDOLL) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -41,14 +39,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1000) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -70,4 +68,4 @@ function s.flipcon(e,tp,eg,ep,ev,re,r,rp) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(e:GetLabelObject(),POS_FACEDOWN_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c78949372.lua b/official/c78949372.lua index bca4682ef3..4fc81eb87e 100644 --- a/official/c78949372.lua +++ b/official/c78949372.lua @@ -36,9 +36,9 @@ function s.initial_effect(c) e5:SetValue(s.effectfilter) c:RegisterEffect(e5) end -s.listed_series={0xd0} +s.listed_series={SET_MAJESPECTER} function s.filter(c) - return c:IsSetCard(0xd0) and c:IsAbleToDeck() + return c:IsSetCard(SET_MAJESPECTER) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,21 +52,21 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end function s.tgcon(e) - return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil,0xd0) + return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil,SET_MAJESPECTER) end function s.effectfilter(e,ct) local p=e:GetHandlerPlayer() local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local tc=te:GetHandler() - return p==tp and (loc&LOCATION_ONFIELD)~=0 and tc:IsSetCard(0xd0) and tc~=e:GetHandler() -end + return p==tp and (loc&LOCATION_ONFIELD)~=0 and tc:IsSetCard(SET_MAJESPECTER) and tc~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c78986941.lua b/official/c78986941.lua index 7ed349360c..5c966abd2a 100644 --- a/official/c78986941.lua +++ b/official/c78986941.lua @@ -36,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c78990927.lua b/official/c78990927.lua index 62882a52d2..7572ec717d 100644 --- a/official/c78990927.lua +++ b/official/c78990927.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) --Ritual Summon - local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,0x138),nil,aux.Stringid(id,1),nil,nil,nil,nil,LOCATION_HAND+LOCATION_DECK) + local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,SET_MEGALITH),nil,aux.Stringid(id,1),nil,nil,nil,nil,LOCATION_HAND|LOCATION_DECK) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMING_MAIN_END) @@ -25,19 +25,19 @@ function s.initial_effect(c) e2:SetCondition(s.ritcon) c:RegisterEffect(e2) end -s.listed_series={0x138} +s.listed_series={SET_MEGALITH} function s.ritcon() return Duel.IsMainPhase() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.tgfilter(c,lv) return c:IsRitualMonster() and c:IsAbleToHand() and c:GetLevel()~=lv end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local lv=e:GetHandler():GetLevel() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==tp and s.tgfilter(chkc,lv) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tgfilter(chkc,lv) end if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE,0,1,nil,lv) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,lv) @@ -51,10 +51,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) Duel.BreakEffect() Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c79016563.lua b/official/c79016563.lua index 992633d500..a75ba20f74 100644 --- a/official/c79016563.lua +++ b/official/c79016563.lua @@ -1,5 +1,5 @@ --バイナル・ソーサレス ---Binal Sorceress +--Binary Sorceress local s,id=GetID() function s.initial_effect(c) --link summon @@ -49,8 +49,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,d,REASON_EFFECT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) - and e:GetHandler():GetMutualLinkedGroupCount()>=2 + return aux.StatChangeDamageStepCondition() and e:GetHandler():GetMutualLinkedGroupCount()>=2 end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end @@ -71,16 +70,16 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk/2) hc:RegisterEffect(e1) if not hc:IsImmuneToEffect(e1) then local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(atk/2) tc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c7903368.lua b/official/c7903368.lua index d634ff16d5..562b5e5e18 100644 --- a/official/c7903368.lua +++ b/official/c7903368.lua @@ -1,9 +1,9 @@ --- 水晶ドクロ --- Crystal Skull --- Scripted by Hatter +--水晶ドクロ +--Crystal Skull +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Take 1000 damage + --Take 1000 damage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_POSITION) @@ -18,7 +18,7 @@ function s.initial_effect(c) local e3=e1:Clone() e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e3) - -- Add to hand or Special Summon 1 Rock monster + --Add to hand or Special Summon 1 Rock monster local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) @@ -30,7 +30,7 @@ function s.initial_effect(c) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) - -- Register damage events + --Register damage events aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -41,7 +41,7 @@ function s.initial_effect(c) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if r&REASON_EFFECT==REASON_EFFECT then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) end end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c79059098.lua b/official/c79059098.lua index d951ca01ff..6632784be4 100644 --- a/official/c79059098.lua +++ b/official/c79059098.lua @@ -3,12 +3,12 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x120),nil,nil,nil,nil,s.stage2) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_PRANK_KIDS),nil,nil,nil,nil,s.stage2) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(s.condition) c:RegisterEffect(e1) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} function s.stage2(e,tc,tp,sg,chk) if chk==2 then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then @@ -18,7 +18,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -31,5 +31,5 @@ function s.condition() return Duel.IsMainPhase() end function s.splimit(e,c) - return not c:IsSetCard(0x120) -end + return not c:IsSetCard(SET_PRANK_KIDS) +end \ No newline at end of file diff --git a/official/c79068663.lua b/official/c79068663.lua index 48f4a0ef6b..b677292547 100644 --- a/official/c79068663.lua +++ b/official/c79068663.lua @@ -1,4 +1,5 @@ --ジャンク・アタック +--Junk Barrage local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -34,4 +35,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if dam<0 then dam=0 end Duel.Damage(p,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79072916.lua b/official/c79072916.lua index d2ead778a6..4167a08fbd 100644 --- a/official/c79072916.lua +++ b/official/c79072916.lua @@ -1,7 +1,6 @@ -- --Myutant Blast --Scripted by senpaizuri - local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,0,s.filter) @@ -29,16 +28,15 @@ function s.initial_effect(c) e2:SetCountLimit(1,id) c:RegisterEffect(e2) end -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} function s.filter(c) - return c:IsSetCard(0x159) and c:IsLevelAbove(8) + return c:IsSetCard(SET_MYUTANT) and c:IsLevelAbove(8) end function s.bancon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetEquipTarget() local bc=c:GetBattleTarget() return Duel.GetAttacker()==c and bc and bc:IsControler(1-tp) - and bc:IsSummonType(SUMMON_TYPE_SPECIAL) and bc:IsAbleToRemove() + and bc:IsSpecialSummoned() and bc:IsAbleToRemove() end function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -59,17 +57,17 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp,att) - return c:IsSetCard(0x159) and c:IsLevel(8) and not c:IsOriginalAttribute(att) + return c:IsSetCard(SET_MYUTANT) and c:IsLevel(8) and not c:IsOriginalAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetLabelObject() local att=c:GetOriginalAttribute() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToGrave() - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,att) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,att) end Duel.SetTargetCard(c) e:SetLabel(c:GetOriginalAttribute()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -77,7 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not tc or not tc:IsRelateToEffect(e) then return end if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end end \ No newline at end of file diff --git a/official/c79080761.lua b/official/c79080761.lua index d2c4b2695f..0cd46a5b08 100644 --- a/official/c79080761.lua +++ b/official/c79080761.lua @@ -32,14 +32,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,2,2,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -61,10 +61,10 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79086452.lua b/official/c79086452.lua index 3fd0b084ca..328cdc2bce 100644 --- a/official/c79086452.lua +++ b/official/c79086452.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(function(e,tp) return not Duel.HasFlagEffect(tp,id) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.effop) c:RegisterEffect(e2) end diff --git a/official/c79094383.lua b/official/c79094383.lua index 5dfdd36312..ee5ffd332b 100644 --- a/official/c79094383.lua +++ b/official/c79094383.lua @@ -1,4 +1,5 @@ --光波異邦臣 +--Cipher Etranger local s,id=GetID() function s.initial_effect(c) --material @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_GRAVE+LOCATION_HAND) + e1:SetRange(LOCATION_GRAVE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) @@ -23,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.matfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe5) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_CIPHER) and c:IsType(TYPE_XYZ) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.matfilter(chkc) end @@ -41,7 +42,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xe5) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_CIPHER) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79106360.lua b/official/c79106360.lua index 4e83a47d70..efc33fc640 100644 --- a/official/c79106360.lua +++ b/official/c79106360.lua @@ -23,7 +23,7 @@ function s.filter2(c) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local rg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SendtoDeck(rg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(rg,nil,SEQ_DECKTOP,REASON_EFFECT) rg=Duel.GetOperatedGroup():Match(s.filter2,nil) local ct1=rg:FilterCount(Card.IsControler,nil,tp) local ct2=#rg-ct1 diff --git a/official/c79109599.lua b/official/c79109599.lua index bec498c3b0..792960e168 100644 --- a/official/c79109599.lua +++ b/official/c79109599.lua @@ -1,4 +1,5 @@ --沼地の魔神王 +--King of the Swamp local s,id=GetID() function s.initial_effect(c) --search @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -20,12 +21,7 @@ function s.initial_effect(c) end s.listed_names={CARD_POLYMERIZATION} function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) + return e:GetHandler():IsLocation(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) end function s.filter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() @@ -41,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79126789.lua b/official/c79126789.lua index 3c36598a4f..64e63b221d 100644 --- a/official/c79126789.lua +++ b/official/c79126789.lua @@ -1,4 +1,5 @@ --暗黒界の狩人 ブラウ +--Broww, Huntsman of Dark World local s,id=GetID() function s.initial_effect(c) --spsummon @@ -15,7 +16,7 @@ function s.initial_effect(c) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetPreviousControler()) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&0x4040)==0x4040 + return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and r&(REASON_DISCARD|REASON_EFFECT)==REASON_DISCARD|REASON_EFFECT end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,4 +32,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79130389.lua b/official/c79130389.lua index 11574cb161..83171cb903 100644 --- a/official/c79130389.lua +++ b/official/c79130389.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.spfilter(c,e,tp,zone) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAttackBelow(1500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return zone~=0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -46,8 +46,8 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:GetLinkedZone(tp)&0x1f~=0 then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,c:GetLinkedZone(tp)&0x1f) + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:GetLinkedZone(tp)&ZONES_MMZ~=0 then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,c:GetLinkedZone(tp)&ZONES_MMZ) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) end @@ -66,7 +66,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x12b) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c7913375.lua b/official/c7913375.lua index 43e94a0eb4..855c16d938 100644 --- a/official/c7913375.lua +++ b/official/c7913375.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return ft>-1 and Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,nil,nil,ft,tp) end @@ -25,15 +25,15 @@ function s.cfilter(c,ft,tp) return ft>0 or (c:IsControler(tp) and c:GetSequence()<5) end function s.filter(c,e,tp) - return (c:IsSetCard(0xbd) or (c:IsRace(RACE_DRAGON) and c:IsLevel(5))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_GAIA_THE_FIERCE_KNIGHT) or (c:IsRace(RACE_DRAGON) and c:IsLevel(5))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c7914843.lua b/official/c7914843.lua index c8ef8b9ce6..a442fd640e 100644 --- a/official/c7914843.lua +++ b/official/c7914843.lua @@ -1,4 +1,5 @@ --電磁ミノ虫 +--Electromagnetic Bagworm local s,id=GetID() function s.initial_effect(c) --flip @@ -33,8 +34,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsRace(RACE_MACHINE) then local tct=1 - if Duel.GetTurnPlayer()~=tp then tct=2 - elseif Duel.GetCurrentPhase()==PHASE_END then tct=3 end + if Duel.IsTurnPlayer(1-tp) then tct=2 + elseif Duel.IsPhase(PHASE_END) then tct=3 end Duel.GetControl(tc,tp,PHASE_END,tct) end end @@ -46,10 +47,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) bc:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c79155167.lua b/official/c79155167.lua index 4e4cfb821c..8a551e5b65 100644 --- a/official/c79155167.lua +++ b/official/c79155167.lua @@ -1,4 +1,5 @@ --アーマーブラスト +--Armor Blast local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.filter1(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79161790.lua b/official/c79161790.lua index a4fcbfc26b..5e4759849b 100644 --- a/official/c79161790.lua +++ b/official/c79161790.lua @@ -1,4 +1,5 @@ --反転世界 +--Inverse Universe local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsDefenseAbove(0) end @@ -25,21 +23,20 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local c=e:GetHandler() - local tc=sg:GetFirst() - for tc in aux.Next(sg) do + for tc in sg:Iter() do local atk=tc:GetAttack() local def=tc:GetDefense() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(def) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c79169622.lua b/official/c79169622.lua index cdbb2344f5..8e00d03a91 100644 --- a/official/c79169622.lua +++ b/official/c79169622.lua @@ -54,4 +54,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79176962.lua b/official/c79176962.lua index 7bdcff6456..491359abfd 100644 --- a/official/c79176962.lua +++ b/official/c79176962.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c,g) return c:IsAbleToHand() and g:IsContains(c) @@ -60,7 +60,7 @@ function s.valcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_HAND) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c79178930.lua b/official/c79178930.lua index 2b7177291f..ad38a0e652 100644 --- a/official/c79178930.lua +++ b/official/c79178930.lua @@ -1,4 +1,5 @@ --時限カラクリ爆弾 +--Karakuri Klock local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsFaceup() and tc:IsDefensePos() and tc:IsSetCard(0x11) + return tc:IsFaceup() and tc:IsDefensePos() and tc:IsSetCard(SET_KARAKURI) end function s.filter(c) return c:IsFaceup() @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79185500.lua b/official/c79185500.lua index 06eab529f3..5cab9c1604 100644 --- a/official/c79185500.lua +++ b/official/c79185500.lua @@ -1,6 +1,5 @@ --鉄巨人アイアンハンマー --Ironhammer the Giant - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -55,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c79194594.lua b/official/c79194594.lua index 7d5e6399fc..32b96a8d65 100644 --- a/official/c79194594.lua +++ b/official/c79194594.lua @@ -1,8 +1,6 @@ ---JP name +--シンセシス・ミュートリアス --Myutant Synthesis ---Logical Nonsense - ---Substitute ID +--scripted by Logical Nonsense local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -45,16 +43,14 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end - --Lists "Myutant" archetype -s.listed_series={0x159} - +s.listed_series={SET_MYUTANT} --2 "Myutant" monsters with different attributes function s.ffilter(c,fc,sumtype,sp,sub,mg,sg) - return c:IsSetCard(0x159,fc,sumtype,sp) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(),fc,sumtype,sp)) + return c:IsSetCard(SET_MYUTANT,fc,sumtype,sp) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or not sg:IsExists(Card.IsAttribute,1,c,c:GetAttribute(),fc,sumtype,sp)) end --If fusion summoned function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end --Activation legality function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -88,7 +84,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.imfilter1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) elseif rtype&TYPE_SPELL~=0 then --Unaffected by opponent's spell effects @@ -99,7 +95,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.imfilter2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) elseif rtype&TYPE_TRAP~=0 then --Unaffected by opponent's trap effects @@ -110,29 +106,29 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.imfilter3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end --Unaffected by the respective card types function s.imfilter1(e,te) - return te:IsActiveType(TYPE_MONSTER) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() + return te:IsMonsterEffect() and te:GetOwnerPlayer()~=e:GetHandlerPlayer() end function s.imfilter2(e,te) - return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() + return te:IsSpellEffect() and te:GetOwnerPlayer()~=e:GetHandlerPlayer() end function s.imfilter3(e,te) - return te:IsActiveType(TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer() + return te:IsTrapEffect() and te:GetOwnerPlayer()~=e:GetHandlerPlayer() end --If this fusion summoned card was destroyed by opponent's card function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_FUSION) and (c:IsReason(REASON_BATTLE) + return c:IsFusionSummoned() and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)) and c:GetPreviousControler()==tp) end --Check for face-up banished "Myutant" card function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x159) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MYUTANT) and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -147,4 +143,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79205581.lua b/official/c79205581.lua index 63a4482734..d78aae3719 100644 --- a/official/c79205581.lua +++ b/official/c79205581.lua @@ -27,9 +27,9 @@ function s.bpcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESET_CHAIN,0,1) end function s.bpop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end \ No newline at end of file diff --git a/official/c79206750.lua b/official/c79206750.lua index af6b22a065..6c2fa6f53a 100644 --- a/official/c79206750.lua +++ b/official/c79206750.lua @@ -1,4 +1,5 @@ --アビスコーン +--Abyss-scorn local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -23,12 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x74} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_MERMAIL} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x74) + return c:IsFaceup() and c:IsSetCard(SET_MERMAIL) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -42,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) end @@ -62,4 +60,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoGrave(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79206925.lua b/official/c79206925.lua index 4e042a1782..76a087817d 100644 --- a/official/c79206925.lua +++ b/official/c79206925.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --Fusion procedure - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2e),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GRAVEKEEPERS),2) --Increase ATK/DEF local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -33,9 +33,9 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0x2e,0x91} +s.listed_series={SET_GRAVEKEEPERS,SET_NECROVALLEY} s.listed_names={CARD_NECROVALLEY} -s.material_setcode=0x2e +s.material_setcode=SET_GRAVEKEEPERS function s.matcheck(e,c) local lv=c:GetMaterial():GetSum(Card.GetOriginalLevel) if lv==0 then return end @@ -46,7 +46,7 @@ function s.matcheck(e,c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -69,11 +69,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return ((c:IsSetCard(0x2e) and c:IsMonster()) or c:IsSetCard(0x91)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_GRAVEKEEPERS) and c:IsMonster()) or c:IsSetCard(SET_NECROVALLEY)) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) diff --git a/official/c7922915.lua b/official/c7922915.lua index c50cbee060..e0dd98aee8 100644 --- a/official/c7922915.lua +++ b/official/c7922915.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -71,7 +71,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -83,4 +83,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e3) end end -end +end \ No newline at end of file diff --git a/official/c79229522.lua b/official/c79229522.lua index a93a1321f0..3eaab49bf8 100644 --- a/official/c79229522.lua +++ b/official/c79229522.lua @@ -1,4 +1,5 @@ --キメラテック・フォートレス・ドラゴン +--Chimeratech Fortress Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -13,7 +14,7 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.fil(c,fc,sumtype,tp,sub,mg,sg,contact) if contact then sumtype=0 end return c:IsRace(RACE_MACHINE,fc,sumtype,tp) and (not contact or c:IsType(TYPE_MONSTER,fc,sumtype,tp)) @@ -28,12 +29,12 @@ function s.cfilter(c,tp) return c:IsAbleToGraveAsCost() and (c:IsControler(tp) or c:IsFaceup()) end function s.contactop(g,tp,c) - Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetValue(#g*1000) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c79234734.lua b/official/c79234734.lua index 9050325d20..7cb8fbac00 100644 --- a/official/c79234734.lua +++ b/official/c79234734.lua @@ -1,4 +1,5 @@ --超戦士の魂 +--Super Soldier Soul local s,id=GetID() function s.initial_effect(c) --atk @@ -16,14 +17,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x10cf} +s.listed_series={SET_BLACK_LUSTER_SOLDIER} function s.cfilter(c) - return c:IsSetCard(0x10cf) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BLACK_LUSTER_SOLDIER) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -36,13 +37,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(5405694) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetValue(3000) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e2) end end @@ -60,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c7925734.lua b/official/c7925734.lua index 0632622db9..3c266712d1 100644 --- a/official/c7925734.lua +++ b/official/c7925734.lua @@ -45,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) else Duel.BreakEffect() - if Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)>0 then + if Duel.SendtoGrave(c,REASON_EFFECT|REASON_DISCARD)>0 then Duel.Draw(tp,1,REASON_EFFECT) end end diff --git a/official/c79266769.lua b/official/c79266769.lua index f7990ddd52..afd1b7605a 100644 --- a/official/c79266769.lua +++ b/official/c79266769.lua @@ -27,30 +27,30 @@ function s.filter(c,e,tp,zone) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp,zone) end + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,zone) end + and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,zone) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,zone) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,zone) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - local zone=c:GetLinkedZone(tp)&0x1f + local zone=c:GetLinkedZone(tp)&ZONES_MMZ if tc and tc:IsRelateToEffect(e) and zone~=0 and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE,zone) then --Negate its effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e2) --Place on bottom of deck if it leaves the field local e3=Effect.CreateEffect(c) @@ -58,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_REDIRECT) + e3:SetReset(RESET_EVENT|RESETS_REDIRECT) e3:SetValue(LOCATION_DECKBOT) tc:RegisterEffect(e3) --Cannot special summon link monsters for rest of turn @@ -69,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e4:SetTargetRange(1,0) e4:SetTarget(s.splimit) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end Duel.SpecialSummonComplete() diff --git a/official/c79279397.lua b/official/c79279397.lua index c9c26f084f..f60faeed05 100644 --- a/official/c79279397.lua +++ b/official/c79279397.lua @@ -1,4 +1,5 @@ --Dボーイズ +--D-Boyz local s,id=GetID() function s.initial_effect(c) --spsummon @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,1000*amount,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c79306385.lua b/official/c79306385.lua index bceefe6428..8dfbcc3441 100644 --- a/official/c79306385.lua +++ b/official/c79306385.lua @@ -1,4 +1,5 @@ --宣告者の神託 +--Oracle of the Herald local s,id=GetID() function s.initial_effect(c) local e1=Ritual.AddProcGreaterCode(c,12,nil,48546368) diff --git a/official/c79323590.lua b/official/c79323590.lua index 8d599e6803..e1373fdd87 100644 --- a/official/c79323590.lua +++ b/official/c79323590.lua @@ -56,4 +56,4 @@ end function s.costop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.PayLPCost(tp,500) -end +end \ No newline at end of file diff --git a/official/c79324191.lua b/official/c79324191.lua index c102b815f4..94b852db5e 100644 --- a/official/c79324191.lua +++ b/official/c79324191.lua @@ -1,4 +1,5 @@ --Ninjitsu Art Notebook +--Ninjitsu Art Notebook local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,10 +18,10 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x2b,0x61} +s.listed_series={SET_NINJA,SET_NINJITSU_ART} s.listed_names={id} function s.costfilter(c) - return c:IsSetCard(0x2b) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_NINJA) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -29,7 +30,7 @@ function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.setfilter(c) - return c:IsSetCard(0x61) and c:IsSpellTrap() and not c:IsCode(id) and c:IsSSetable() + return c:IsSetCard(SET_NINJITSU_ART) and c:IsSpellTrap() and not c:IsCode(id) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -41,4 +42,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c79333300.lua b/official/c79333300.lua index 7516b4ab8e..c040e20918 100644 --- a/official/c79333300.lua +++ b/official/c79333300.lua @@ -1,4 +1,5 @@ --風霊術-「雅」 +--Spiritual Wind Art - Miyabi local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,6 +36,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79337169.lua b/official/c79337169.lua index 690dbb0915..125054a815 100644 --- a/official/c79337169.lua +++ b/official/c79337169.lua @@ -1,4 +1,5 @@ --ガントレット・ウォリアー +--Gauntlet Warrior local s,id=GetID() function s.initial_effect(c) --atkup @@ -10,32 +11,24 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_WARRIOR),tp,LOCATION_MZONE,0,1,e:GetHandler()) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_WARRIOR),tp,LOCATION_MZONE,0,e:GetHandler()) - local tc=g:GetFirst() local c=e:GetHandler() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -45,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_DAMAGE_STEP_END) e3:SetOperation(s.resetop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetLabelObject(e2) tc:RegisterEffect(e3) end @@ -56,4 +49,4 @@ function s.resetop(e,tp,eg,ep,ev,re,r,rp) e1:Reset() e2:Reset() e:Reset() -end +end \ No newline at end of file diff --git a/official/c79339613.lua b/official/c79339613.lua index 8146b0f127..4b6637d882 100644 --- a/official/c79339613.lua +++ b/official/c79339613.lua @@ -1,5 +1,5 @@ --ソウルエナジーMAX!! ---Soul Energy MAX!! +--Soul Energy MAX!!! --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -22,17 +22,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_names={10000000} +s.listed_names={CARD_OBELISK} function s.cfilter(c) - return c:IsFaceup() and c:IsCode(10000000) and c:IsOriginalAttribute(ATTRIBUTE_DIVINE) + return c:IsFaceup() and c:IsCode(CARD_OBELISK) and c:IsOriginalAttribute(ATTRIBUTE_DIVINE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) @@ -63,18 +63,18 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() or Duel.IsBattlePhase() end function s.thfilter(c) - return c:IsCode(10000000) and c:IsAbleToHand() + return c:IsCode(CARD_OBELISK) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.sumfilter(c) - return c:IsCode(10000000) and c:IsSummonable(true,nil) + return c:IsCode(CARD_OBELISK) and c:IsSummonable(true,nil) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst() if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,tc) local g=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND,0,nil) diff --git a/official/c7935043.lua b/official/c7935043.lua index 43aaa9cdfa..c73aeb77c4 100644 --- a/official/c7935043.lua +++ b/official/c7935043.lua @@ -1,4 +1,5 @@ --海竜神の加護 +--Aegis of the Ocean Dragon Lord local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTarget(s.tg) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) @@ -22,10 +23,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetTarget(s.tg) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) end function s.tg(e,c) return c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c79371769.lua b/official/c79371769.lua index 9f79401ae6..8cce76ea90 100644 --- a/official/c79371769.lua +++ b/official/c79371769.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON) + e1:SetHintTiming(0,TIMING_SUMMON|TIMING_SPSUMMON) c:RegisterEffect(e1) --Send the top card in the Deck to the GY local e2=Effect.CreateEffect(c) @@ -78,9 +78,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(s.aclimit) e1:SetLabelObject(tc) if Duel.IsTurnPlayer(tp) then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) end @@ -88,4 +88,4 @@ end function s.aclimit(e,re,tp) local tc=e:GetLabelObject() return re:GetHandler():IsCode(tc:GetCode()) -end +end \ No newline at end of file diff --git a/official/c79371897.lua b/official/c79371897.lua index 9341ce15a6..7c927dc321 100644 --- a/official/c79371897.lua +++ b/official/c79371897.lua @@ -1,4 +1,5 @@ --Reinforcement of the Army's Troops +--Reinforcement of the Army's Troops local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end - function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79383919.lua b/official/c79383919.lua index d2f33db50f..6653e90bfe 100644 --- a/official/c79383919.lua +++ b/official/c79383919.lua @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={CARD_EVIL_EYE_SELENE} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x129) + return c:IsFaceup() and c:IsSetCard(SET_EVIL_EYE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) @@ -34,10 +34,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end - end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79387392.lua b/official/c79387392.lua index 04ba4b13ba..b252bf44cd 100644 --- a/official/c79387392.lua +++ b/official/c79387392.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function() return Duel.IsBattlePhase() end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c79402185.lua b/official/c79402185.lua index 3b9ad577c2..80a1d5e382 100644 --- a/official/c79402185.lua +++ b/official/c79402185.lua @@ -1,4 +1,5 @@ --ボンディング-D2O +--Bonding - D2O local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,14 +43,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=-1 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) g:GetFirst():CompleteProcedure() @@ -70,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79407975.lua b/official/c79407975.lua index 1ac2500e44..6b3e5b358e 100644 --- a/official/c79407975.lua +++ b/official/c79407975.lua @@ -38,11 +38,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return aux.SelectUnselectGroup(rg,e,tp,7,7,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,7,7,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -61,7 +61,7 @@ function s.cfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and aux.SpElimFilter(c,true,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return #g>0 and g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==#g end e:SetLabel(#g) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -74,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c79409334.lua b/official/c79409334.lua index 50b13eaa3e..73bc03d390 100644 --- a/official/c79409334.lua +++ b/official/c79409334.lua @@ -1,4 +1,5 @@ --暗黒ステゴ +--Black Stego local s,id=GetID() function s.initial_effect(c) --destroy @@ -20,4 +21,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c79418928.lua b/official/c79418928.lua index 81a8ac0acf..b404ca7876 100644 --- a/official/c79418928.lua +++ b/official/c79418928.lua @@ -1,4 +1,5 @@ --電磁石の戦士β +--Beta The Electromagnet Warrior local s,id=GetID() function s.initial_effect(c) --to hand @@ -24,15 +25,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(0,TIMING_END_PHASE) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x2066} +s.listed_series={SET_MAGNET_WARRIOR} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0x2066) and not c:IsCode(id) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_MAGNET_WARRIOR) and not c:IsCode(id) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -47,14 +48,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2066) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MAGNET_WARRIOR) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -70,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c79441381.lua b/official/c79441381.lua index 8b70080542..67489e9ead 100644 --- a/official/c79441381.lua +++ b/official/c79441381.lua @@ -1,4 +1,5 @@ --黄昏の忍者-ジョウゲン +--Twilight Ninja Jogen local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_PIERCE) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2b)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_NINJA)) c:RegisterEffect(e1) --special summon local e2=Effect.CreateEffect(c) @@ -27,9 +28,9 @@ function s.initial_effect(c) e3:SetCode(EFFECT_PIERCE) c:RegisterEffect(e3) end -s.listed_series={0x61,0x2b} +s.listed_series={SET_NINJITSU_ART,SET_NINJA} function s.costfilter(c) - return c:IsSetCard(0x61) and not c:IsPublic() + return c:IsSetCard(SET_NINJITSU_ART) and not c:IsPublic() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -48,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79444933.lua b/official/c79444933.lua index 71277e8094..03f2d75bd9 100644 --- a/official/c79444933.lua +++ b/official/c79444933.lua @@ -1,4 +1,5 @@ --炎の魔精イグニス +--Flame Spirit Ignis local s,id=GetID() function s.initial_effect(c) --damage @@ -32,4 +33,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local dam=Duel.GetMatchingGroupCount(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_FIRE)*100 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79447365.lua b/official/c79447365.lua index a91f234413..eaec47b92c 100644 --- a/official/c79447365.lua +++ b/official/c79447365.lua @@ -1,4 +1,5 @@ --トゥーン・マスク +--Toon Mask local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,7 +27,7 @@ function s.filter(c,e,tp) else lv=c:GetLevel() end - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,lv) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp,lv) end function s.spfilter(c,e,tp,lv) return c:IsLevelBelow(lv) and c:IsType(TYPE_TOON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) @@ -37,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -50,8 +51,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) lv=tc:GetLevel() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,lv) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,lv) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79473793.lua b/official/c79473793.lua index ddc14be408..976cd5c03a 100644 --- a/official/c79473793.lua +++ b/official/c79473793.lua @@ -68,4 +68,4 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and not Duel.GetAttacker():IsImmuneToEffect(e) then Duel.ChangeAttackTarget(c) end -end +end \ No newline at end of file diff --git a/official/c79491903.lua b/official/c79491903.lua index 5d0508dbee..5510f4af09 100644 --- a/official/c79491903.lua +++ b/official/c79491903.lua @@ -1,4 +1,5 @@ --レプティレス・ナージャ +--Reptilianne Naga local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -11,7 +12,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.atktg) @@ -43,12 +44,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetTurnPlayer()==tp and e:GetHandler():IsDefensePos() end + if chk==0 then return Duel.IsTurnPlayer(tp) and e:GetHandler():IsDefensePos() end Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -56,4 +57,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsDefensePos() then Duel.ChangePosition(c,0,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c79509511.lua b/official/c79509511.lua index c6d2a47b0a..20145f83ad 100644 --- a/official/c79509511.lua +++ b/official/c79509511.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CUSTOM+id) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.xyzsptg) e2:SetOperation(s.xyzspop) c:RegisterEffect(e2) diff --git a/official/c79514956.lua b/official/c79514956.lua index 87c9fcf1dd..74d3ded329 100644 --- a/official/c79514956.lua +++ b/official/c79514956.lua @@ -1,4 +1,5 @@ --幻奏の音女エレジー +--Elegy the Melodious Diva local s,id=GetID() function s.initial_effect(c) --indes @@ -21,10 +22,10 @@ function s.initial_effect(c) e2:SetCondition(s.tgcon) c:RegisterEffect(e2) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} function s.indtg(e,c) - return c:IsSetCard(0x9b) and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSetCard(SET_MELODIOUS) and c:IsSpecialSummoned() end function s.tgcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) -end + return e:GetHandler():IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c79523365.lua b/official/c79523365.lua index 7243855d10..551234c54a 100644 --- a/official/c79523365.lua +++ b/official/c79523365.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1) @@ -29,7 +29,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) @@ -39,10 +39,6 @@ function s.initial_effect(c) end s.listed_names={id} s.listed_series={SET_VAMPIRE} -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.spfilter1(c,e,tp) return c:IsSetCard(SET_VAMPIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c79531196.lua b/official/c79531196.lua index c0f60b0e5b..b03557ce69 100644 --- a/official/c79531196.lua +++ b/official/c79531196.lua @@ -2,8 +2,9 @@ --Crystal Rose local s,id=GetID() function s.initial_effect(c) - --to grave + --Send 1 "Gem-Knight" or "Melodious" monster from your hand or Deck to the Graveyard, and if you do, this card's name becomes the sent monster's name, until the End Phase local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) @@ -11,8 +12,9 @@ function s.initial_effect(c) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) - --spsummon + --Special Summon this card in Defense Position local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) @@ -22,46 +24,47 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x1047,0x9b} -function s.filter(c) - return (c:IsSetCard(0x1047) or c:IsSetCard(0x9b)) and c:IsMonster() and c:IsAbleToGrave() +s.listed_series={SET_GEM_KNIGHT,SET_MELODIOUS} +function s.tgfilter(c) + return c:IsSetCard({SET_GEM_KNIGHT,SET_MELODIOUS}) and c:IsMonster() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) - local tc=g:GetFirst() - if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) + local sc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil):GetFirst() + if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) and c:IsFaceup() then + --This card's name becomes the sent monster's name, until the End Phase local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(tc:GetCode()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetValue(sc:GetCode()) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end -function s.cfilter(c,tp) - return c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) - and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) +function s.spcostfilter(c,tp) + return c:IsType(TYPE_FUSION) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) + local c=e:GetHandler() + if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - if e:GetHandler():IsRelateToEffect(e) then - Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end diff --git a/official/c7953868.lua b/official/c7953868.lua index 6d3d772fcd..656c183682 100644 --- a/official/c7953868.lua +++ b/official/c7953868.lua @@ -1,4 +1,5 @@ --蒼血鬼 +--Blue-Blooded Oni local s,id=GetID() function s.initial_effect(c) --to defense @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsRace(RACE_ZOMBIE) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79538761.lua b/official/c79538761.lua index 578ccaea3c..bf0adfe6ab 100644 --- a/official/c79538761.lua +++ b/official/c79538761.lua @@ -1,4 +1,5 @@ --トルクチューン・ギア +--Torque Tune Gear local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,nil) diff --git a/official/c79544790.lua b/official/c79544790.lua index 0f52d12f2b..066317b9d6 100644 --- a/official/c79544790.lua +++ b/official/c79544790.lua @@ -1,4 +1,5 @@ --リグレット・リボーン +--Regretful Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,14 +35,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetCountLimit(1) tc:RegisterEffect(e1,true) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79555535.lua b/official/c79555535.lua index 6704002ed8..1c97359ab6 100644 --- a/official/c79555535.lua +++ b/official/c79555535.lua @@ -1,4 +1,5 @@ --イグニッションP +--Ignition Phoenix local s,id=GetID() function s.initial_effect(c) --activate @@ -13,7 +14,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetValue(300) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc8)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_IGKNIGHT)) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) @@ -29,12 +30,12 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc8) + return c:IsFaceup() and c:IsSetCard(SET_IGKNIGHT) end function s.thfilter(c) - return c:IsSetCard(0xc8) and c:IsAbleToHand() + return c:IsSetCard(SET_IGKNIGHT) and c:IsAbleToHand() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc) end @@ -56,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c79559912.lua b/official/c79559912.lua index 0f8d7c73a3..ef0164ef84 100644 --- a/official/c79559912.lua +++ b/official/c79559912.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.negcon) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,10 +31,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xaf,0xae} +s.listed_series={SET_DD,SET_DARK_CONTRACT} function s.negcon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end - if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -46,7 +46,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) + return c:IsFaceup() and c:IsSetCard(SET_DD) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -65,7 +65,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() tc:RegisterEffect(e2) @@ -75,7 +75,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xae) and c:IsAbleToHand() + return c:IsSetCard(SET_DARK_CONTRACT) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79569173.lua b/official/c79569173.lua index b0bfb335c9..01552464c8 100644 --- a/official/c79569173.lua +++ b/official/c79569173.lua @@ -35,12 +35,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local dis=Duel.SelectDisableField(tp,3,0,LOCATION_SZONE,0) Duel.Hint(HINT_ZONE,tp,dis) @@ -55,7 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetOperation(s.disop) e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e:GetHandler():RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -89,4 +89,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c79571449.lua b/official/c79571449.lua index 52531ac0c0..290a41350d 100644 --- a/official/c79571449.lua +++ b/official/c79571449.lua @@ -1,4 +1,5 @@ --天使の施し +--Graceful Charity local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,6 +24,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)==3 then Duel.ShuffleHand(p) Duel.BreakEffect() - Duel.DiscardHand(p,nil,2,2,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(p,nil,2,2,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c79575620.lua b/official/c79575620.lua index 4429c36fab..c2cd8c671d 100644 --- a/official/c79575620.lua +++ b/official/c79575620.lua @@ -1,4 +1,5 @@ --お注射天使リリー +--Injection Fairy Lily local s,id=GetID() function s.initial_effect(c) --attack up @@ -20,14 +21,14 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,2000) end Duel.PayLPCost(tp,2000) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.op(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(3000) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c79580323.lua b/official/c79580323.lua index 64a6df1924..56bfa80ae0 100644 --- a/official/c79580323.lua +++ b/official/c79580323.lua @@ -16,10 +16,10 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToDeck) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -32,12 +32,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x4d,0x19} +s.listed_series={SET_BEASTS_BATTLE,SET_GLADIATOR} function s.splimit(e,se,sp,st) return st==(SUMMON_TYPE_SPECIAL+101) or st&SUMMON_TYPE_PENDULUM==SUMMON_TYPE_PENDULUM end function s.sfilter(c) - return c:IsSetCard(0x4d) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand() + return c:IsSetCard(SET_BEASTS_BATTLE) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand() end function s.stg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,18 +54,12 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,110,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,110,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -73,6 +67,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,110,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c79582540.lua b/official/c79582540.lua index ce71016ab5..527ebe07f6 100644 --- a/official/c79582540.lua +++ b/official/c79582540.lua @@ -1,5 +1,5 @@ --戦華の暴-董穎 ---Ancient Warriors – Cruel Dong Zhong +--Ancient Warriors - Savage Don Ying --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -50,9 +50,9 @@ function s.initial_effect(c) e5:SetOperation(s.rmop) c:RegisterEffect(e5) end -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.thfilter(c) - return c:IsSetCard(0x137) and (c:IsLevelAbove(7) or c:IsType(TYPE_CONTINUOUS)) and c:IsAbleToHand() + return c:IsSetCard(SET_ANCIENT_WARRIORS) and (c:IsLevelAbove(7) or c:IsType(TYPE_CONTINUOUS)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -67,7 +67,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x137) and c:IsLevelAbove(7) and c:IsFaceup() + return c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsLevelAbove(7) and c:IsFaceup() end function s.costcon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -89,11 +89,11 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) and Duel.IsPlayerCanDraw(tp,1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end diff --git a/official/c79606837.lua b/official/c79606837.lua index 4911c84a4e..06f662e65e 100644 --- a/official/c79606837.lua +++ b/official/c79606837.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetRange(LOCATION_MZONE) e1:SetTarget(s.rmtarget) - e1:SetTargetRange(LOCATION_HAND+LOCATION_DECK,LOCATION_HAND+LOCATION_DECK) + e1:SetTargetRange(LOCATION_HAND|LOCATION_DECK,LOCATION_HAND|LOCATION_DECK) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) --Negate activation @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.discon) - e2:SetCost(s.discost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -46,11 +46,7 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -78,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79613121.lua b/official/c79613121.lua index 0e47126abf..bc26488689 100644 --- a/official/c79613121.lua +++ b/official/c79613121.lua @@ -42,11 +42,11 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.thfilter(c) return c:IsSpell() and c:IsAbleToHand() diff --git a/official/c79625003.lua b/official/c79625003.lua index 90d2ac8bda..b693e8b278 100644 --- a/official/c79625003.lua +++ b/official/c79625003.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1)) + e1:SetCost(Cost.Detach(1,1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c79636594.lua b/official/c79636594.lua index dd1624acda..0db87f82f3 100644 --- a/official/c79636594.lua +++ b/official/c79636594.lua @@ -1,4 +1,5 @@ --ブロック・スパイダー +--Block Spider local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -40,4 +41,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79649195.lua b/official/c79649195.lua index 73f24fd473..982078aeaf 100644 --- a/official/c79649195.lua +++ b/official/c79649195.lua @@ -1,4 +1,5 @@ --アーマーブレイク +--Armor Break local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79656239.lua b/official/c79656239.lua index e4bda8281b..d9e16b93af 100644 --- a/official/c79656239.lua +++ b/official/c79656239.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) end s.listed_names={28265983,92266279,15177750} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.thfilter(c) return c:IsCode(28265983,92266279,15177750) and c:IsAbleToHand() @@ -80,4 +80,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79663524.lua b/official/c79663524.lua index d0d59faf86..411e9f09da 100644 --- a/official/c79663524.lua +++ b/official/c79663524.lua @@ -47,7 +47,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -56,13 +56,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c7969770.lua b/official/c7969770.lua index f6978ea078..65a3eb05f6 100644 --- a/official/c7969770.lua +++ b/official/c7969770.lua @@ -1,5 +1,5 @@ --トランスファミリア ---Transfamiliar +--Trancefamiliar -- local s,id=GetID() function s.initial_effect(c) @@ -26,5 +26,4 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2)) -end - +end \ No newline at end of file diff --git a/official/c79698395.lua b/official/c79698395.lua index c26676caae..2718b46391 100644 --- a/official/c79698395.lua +++ b/official/c79698395.lua @@ -28,12 +28,12 @@ function s.initial_effect(c) e3:SetOperation(s.daop) c:RegisterEffect(e3) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} function s.target(e,c) - return c:IsSetCard(0x11e) and c:IsStatus(STATUS_SPSUMMON_TURN) + return c:IsSetCard(SET_DANGER) and c:IsStatus(STATUS_SPSUMMON_TURN) end function s.dafilter(c) - return c:IsFaceup() and c:IsSetCard(0x11e) + return c:IsFaceup() and c:IsSetCard(SET_DANGER) end function s.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.dafilter(chkc) end @@ -51,7 +51,7 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -61,4 +61,4 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) end function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c79703905.lua b/official/c79703905.lua index 3e4511b103..a5585087a4 100644 --- a/official/c79703905.lua +++ b/official/c79703905.lua @@ -35,23 +35,23 @@ function s.initial_effect(c) e4:SetOperation(s.hdop) c:RegisterEffect(e4) end -s.listed_series={0x18} -s.counter_place_list={0x1019} +s.listed_series={SET_CLOUDIAN} +s.counter_place_list={COUNTER_FOG} function s.sdcon(e) return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x18) + return c:IsFaceup() and c:IsSetCard(SET_CLOUDIAN) end function s.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+0x1019,ct) + e:GetHandler():AddCounter(COUNTER_NEED_ENABLE+COUNTER_FOG,ct) end end function s.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x1019,3,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x1019,3,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_FOG,3,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_FOG,3,REASON_COST) end function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end @@ -59,5 +59,5 @@ function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) -end + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c79707116.lua b/official/c79707116.lua index 6a5ca899b7..72a7ef4223 100644 --- a/official/c79707116.lua +++ b/official/c79707116.lua @@ -1,4 +1,5 @@ --パラライズ・チェーン +--Paralyzing Chain local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -33,4 +34,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79724755.lua b/official/c79724755.lua index 131ca3f1fa..f402713d65 100644 --- a/official/c79724755.lua +++ b/official/c79724755.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,2}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3) @@ -66,7 +66,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(tc:GetOriginalLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -88,7 +88,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) g:GetFirst():RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c79747096.lua b/official/c79747096.lua index 7454fec8c1..3b859a02c5 100644 --- a/official/c79747096.lua +++ b/official/c79747096.lua @@ -30,7 +30,7 @@ function s.ovfilter(c,tp,lc) return c:IsFaceup() and c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,15232745) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,23 +44,23 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.op(e,tp,eg,ep,ev,re,r,rp) - local res=(Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp) and 2 or 1 - local turn_asc=(Duel.GetCurrentPhase()0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79757784.lua b/official/c79757784.lua index 1b4ee2f9ef..bc39bcd7c2 100644 --- a/official/c79757784.lua +++ b/official/c79757784.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x9b} +s.listed_series={SET_MELODIOUS} s.listed_names={CARD_POLYMERIZATION} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9b) + return c:IsFaceup() and c:IsSetCard(SET_MELODIOUS) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) @@ -35,12 +35,12 @@ function s.thfilter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -62,7 +62,7 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) - and tc:IsAttackAbove(500) and tc:UpdateAttack(-500,RESET_EVENT+RESETS_STANDARD,e:GetHandler())==-500 then + and tc:IsAttackAbove(500) and tc:UpdateAttack(-500,RESET_EVENT|RESETS_STANDARD,e:GetHandler())==-500 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79759367.lua b/official/c79759367.lua index 6d51ec4a46..b2ede12f70 100644 --- a/official/c79759367.lua +++ b/official/c79759367.lua @@ -1,4 +1,5 @@ --魔導人形の夜 +--Madolche Nights local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end s.listed_names={74641045} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) and not Duel.IsExistingMatchingCard(Card.IsMonster,tp,LOCATION_GRAVE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c79759861.lua b/official/c79759861.lua index 056643fa17..161d426c34 100644 --- a/official/c79759861.lua +++ b/official/c79759861.lua @@ -1,4 +1,5 @@ --死者への手向け +--Tribute to The Doomed local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79766336.lua b/official/c79766336.lua index e77362b84b..d5cc324553 100644 --- a/official/c79766336.lua +++ b/official/c79766336.lua @@ -1,13 +1,14 @@ --闇よりの罠 +--Trap of Darkness local s,id=GetID() function s.initial_effect(c) --copy trap local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER_E,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(TIMING_DRAW_PHASE|TIMINGS_CHECK_MONSTER_E,TIMING_DRAW_PHASE|TIMINGS_CHECK_MONSTER_E) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -16,12 +17,8 @@ s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(tp)<=3000 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) - return c:GetType()==0x4 and not c:IsCode(id) and c:IsAbleToRemove() and c:CheckActivateEffect(false,true,false)~=nil + return c:IsNormalTrap() and not c:IsCode(id) and c:IsAbleToRemove() and c:CheckActivateEffect(false,true,false)~=nil end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -51,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local op=te:GetOperation() if op then op(e,tp,eg,ep,ev,re,r,rp) end Duel.Remove(te:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79775821.lua b/official/c79775821.lua index 8df920d010..2df39d0020 100644 --- a/official/c79775821.lua +++ b/official/c79775821.lua @@ -1,5 +1,5 @@ --セリオンズ・スタンダップ ---Therions' Standup +--Therion Stand Up! --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -23,17 +23,17 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,id) e2:SetCondition(function() return Duel.IsMainPhase() end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.spfilter(c,e,tp) - return c:IsSetCard(0x17b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THERION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -44,25 +44,25 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.eqfilter(c) - return c:IsSetCard(0x17b) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_THERION) and c:IsMonster() and not c:IsForbidden() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then - local eg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) + local eg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) if #eg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local ec=eg:Select(tp,1,1,nil):GetFirst() - if Duel.Equip(tp,ec,tc) then + if Duel.Equip(tp,ec,tc) then --Equip limit local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabelObject(tc) ec:RegisterEffect(e1) end @@ -71,7 +71,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - local f1=aux.FaceupFilter(Card.IsSetCard,0x17b) + local f1=aux.FaceupFilter(Card.IsSetCard,SET_THERION) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if e:GetHandler():IsLocation(LOCATION_HAND) then ft=ft-1 end if chk==0 then return ft>0 and Duel.IsExistingTarget(f1,tp,LOCATION_MZONE,0,1,nil) @@ -92,14 +92,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local oc=g:GetNext() if oc==e:GetLabelObject() then tc,oc=oc,tc end if not (tc:IsFaceup() and tc:IsControler(tp)) then return end - if Duel.Equip(tp,oc,tc) then + if Duel.Equip(tp,oc,tc) then --Equip limit local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabelObject(tc) oc:RegisterEffect(e1) end diff --git a/official/c79777187.lua b/official/c79777187.lua index 1548486789..7685413251 100644 --- a/official/c79777187.lua +++ b/official/c79777187.lua @@ -1,4 +1,5 @@ --バリア・バブル +--Bubble Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,12 +26,12 @@ function s.initial_effect(c) e3:SetValue(s.indct) c:RegisterEffect(e3) end -s.listed_series={0xc6,0x9f} +s.listed_series={SET_PERFORMAGE,SET_PERFORMAPAL} function s.target(e,c) - return c:IsSetCard(0xc6) or c:IsSetCard(0x9f) + return c:IsSetCard({SET_PERFORMAGE,SET_PERFORMAPAL}) end function s.indct(e,re,r,rp) if (r&REASON_BATTLE+REASON_EFFECT)~=0 then return 1 else return 0 end -end +end \ No newline at end of file diff --git a/official/c79783880.lua b/official/c79783880.lua index 336dd51997..549aa89a0e 100644 --- a/official/c79783880.lua +++ b/official/c79783880.lua @@ -11,19 +11,15 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0xd9} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_SHIRANUI} function s.rescon(sg,e,tp,mg) - return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(Card.IsSetCard,1,nil,0xd9) + return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:IsExists(Card.IsSetCard,1,nil,SET_SHIRANUI) end function s.filter(c,e,tp) return c:IsRace(RACE_ZOMBIE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -46,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) @@ -58,12 +54,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end end @@ -71,5 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,tp,sumtp,sumpos) return not c:IsRace(RACE_ZOMBIE) -end - +end \ No newline at end of file diff --git a/official/c79785958.lua b/official/c79785958.lua index 3161ee876b..40962c63cd 100644 --- a/official/c79785958.lua +++ b/official/c79785958.lua @@ -9,16 +9,16 @@ function s.initial_effect(c) e1:SetOperation(s.sumop) c:RegisterEffect(e1) end -s.listed_series={0xa} +s.listed_series={SET_LSWARM} function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetDescription(aux.Stringid(id,0)) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_LSWARM)) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) -end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) +end \ No newline at end of file diff --git a/official/c79794767.lua b/official/c79794767.lua index 1976f09bbf..33f84cd825 100644 --- a/official/c79794767.lua +++ b/official/c79794767.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.descon) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -43,12 +43,12 @@ function s.initial_effect(c) --Lizard check aux.addContinuousLizardCheck(c,LOCATION_MZONE,s.lizfilter,0xff,0xff) end -s.listed_series={0xe0} +s.listed_series={SET_AMORPHAGE} function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -61,15 +61,15 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) - return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) - and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id)~=0) + return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMORPHAGE) + and (e:GetHandler():IsPendulumSummoned() or e:GetHandler():GetFlagEffect(id)~=0) end function s.relcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe0),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AMORPHAGE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.rellimit(e,c,tp,sumtp) - return not c:IsSetCard(0xe0) + return not c:IsSetCard(SET_AMORPHAGE) end function s.lizfilter(e,c) - return not c:IsOriginalSetCard(0xe0) + return not c:IsOriginalSetCard(SET_AMORPHAGE) end \ No newline at end of file diff --git a/official/c79796561.lua b/official/c79796561.lua index 3ea9644a47..3be7438f51 100644 --- a/official/c79796561.lua +++ b/official/c79796561.lua @@ -1,4 +1,5 @@ --シンクロ・ガンナー +--Synchro Soldier local s,id=GetID() function s.initial_effect(c) --remove @@ -26,11 +27,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -40,8 +41,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c79814787.lua b/official/c79814787.lua index 1b4f0f1737..fded344430 100644 --- a/official/c79814787.lua +++ b/official/c79814787.lua @@ -1,4 +1,5 @@ --伝説の白石 +--The White Stone of Legend local s,id=GetID() function s.initial_effect(c) --to hand @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c79816536.lua b/official/c79816536.lua index 298f8998d7..7694002667 100644 --- a/official/c79816536.lua +++ b/official/c79816536.lua @@ -1,4 +1,5 @@ --召喚師のスキル +--Summoner's Art local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79844764.lua b/official/c79844764.lua index 39a9d1c546..9b7bce78b6 100644 --- a/official/c79844764.lua +++ b/official/c79844764.lua @@ -22,7 +22,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -31,7 +31,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -45,6 +45,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c7984540.lua b/official/c7984540.lua index f7bd137403..5e9161b4eb 100644 --- a/official/c7984540.lua +++ b/official/c7984540.lua @@ -1,7 +1,6 @@ --聖天樹の月桂精 --Sunavalon Daphne --Scripted by Eerie Code, based on the anime version - local s,id=GetID() function s.initial_effect(c) --Link summon procedure @@ -47,6 +46,6 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79850798.lua b/official/c79850798.lua index e17e2beb72..9e8980bc07 100644 --- a/official/c79850798.lua +++ b/official/c79850798.lua @@ -49,7 +49,7 @@ function s.initial_effect(c) local e8=Effect.CreateEffect(c) e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e8:SetCode(EVENT_PHASE+PHASE_STANDBY) + e8:SetCode(EVENT_PHASE|PHASE_STANDBY) e8:SetRange(LOCATION_MZONE) e8:SetCountLimit(1) e8:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c79852326.lua b/official/c79852326.lua index 2e6e9d4fdd..878a51099f 100644 --- a/official/c79852326.lua +++ b/official/c79852326.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1800,500,4,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE) c:AddMonsterAttributeComplete() @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_CANNOT_ACT-RESET_TOGRAVE-RESET_REMOVE) + e1:SetReset(RESET_EVENT|RESETS_CANNOT_ACT-RESET_TOGRAVE-RESET_REMOVE) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end @@ -53,4 +53,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79853073.lua b/official/c79853073.lua index c119b66673..157e0d9022 100644 --- a/official/c79853073.lua +++ b/official/c79853073.lua @@ -1,4 +1,5 @@ --サイファー・スカウター +--Cipher Soldier local s,id=GetID() function s.initial_effect(c) --atkdef up @@ -22,11 +23,11 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(2000) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c79856792.lua b/official/c79856792.lua index d31ae62d0d..b412e42f4e 100644 --- a/official/c79856792.lua +++ b/official/c79856792.lua @@ -61,7 +61,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():HasFlagEffect(id) then return false end - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() + return aux.StatChangeDamageStepCondition() end function s.atkfilter(c) return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToGraveAsCost() @@ -101,4 +101,4 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79858629.lua b/official/c79858629.lua index 80dd040806..7b0c82be47 100644 --- a/official/c79858629.lua +++ b/official/c79858629.lua @@ -1,9 +1,9 @@ --- エクソシスター・イレーヌ --- Exorsister Elaine --- Scripted by Hatter +--エクソシスター・イレーヌ +--Exosister Irene +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Draw + --Draw local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.drtg) e1:SetOperation(s.drop) c:RegisterEffect(e1) - -- Special Summon Xyz + --Special Summon Xyz local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={5352328} -s.listed_series={0x174} +s.listed_series={SET_EXOSISTER} function s.drcostfilter(c) - return c:IsSetCard(0x174) and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_EXOSISTER) and c:IsAbleToDeckAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.drcostfilter,tp,LOCATION_HAND,0,1,nil) end @@ -55,7 +55,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp,mc) - return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(0x174) and mc:IsCanBeXyzMaterial(c,tp) + return c:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsSetCard(SET_EXOSISTER) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c79861914.lua b/official/c79861914.lua index daabb35961..e42180b4c1 100644 --- a/official/c79861914.lua +++ b/official/c79861914.lua @@ -1,11 +1,12 @@ --妖仙大旋風 +--Yosen Whirlwind local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) c:RegisterEffect(e1) --tohand local e2=Effect.CreateEffect(c) @@ -31,13 +32,9 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xb3} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end +s.listed_series={SET_YOSENJU} function s.cfilter(c,tp) - return c:IsSetCard(0xb3) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_YOSENJU) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -56,11 +53,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(id)==0 + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetFlagEffect(id)==0 end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c7986397.lua b/official/c7986397.lua index 5c9ee79f79..a379f3c2d5 100644 --- a/official/c7986397.lua +++ b/official/c7986397.lua @@ -3,17 +3,17 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,0x106),extrafil=s.extragroup, + local e1=Ritual.CreateProc({handler=c,lvtype=RITPROC_EQUAL,filter=aux.FilterBoolFunction(Card.IsSetCard,SET_VENDREAD),extrafil=s.extragroup, extraop=s.extraop,stage2=s.stage2,location=LOCATION_HAND|LOCATION_GRAVE,forcedselection=s.ritcheck,extratg=s.extratg}) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} function s.extragroup(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.GetMatchingGroup(s.matfilter1,tp,LOCATION_DECK,0,nil) end function s.matfilter1(c) - return c:IsSetCard(0x106) and c:IsAbleToGrave() and c:IsLevelAbove(1) + return c:IsSetCard(SET_VENDREAD) and c:IsAbleToGrave() and c:IsLevelAbove(1) end function s.extraop(mat,e,tp,eg,ep,ev,re,r,rp,tc) local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_DECK) @@ -26,7 +26,7 @@ function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -34,7 +34,7 @@ function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,tc) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetLabel(Duel.GetTurnCount()) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) e1:SetCondition(s.descon) e1:SetOperation(s.desop) Duel.RegisterEffect(e1,tp) diff --git a/official/c79864860.lua b/official/c79864860.lua index f50a6c08ce..03c351171f 100644 --- a/official/c79864860.lua +++ b/official/c79864860.lua @@ -52,7 +52,7 @@ function s.disfilter(c) return c:GetSummonLocation()==LOCATION_EXTRA end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return tp~=ep and Duel.GetCurrentChain()==0 and eg:IsExists(s.disfilter,1,nil) and e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return tp~=ep and Duel.GetCurrentChain()==0 and eg:IsExists(s.disfilter,1,nil) and e:GetHandler():IsFusionSummoned() end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c79867938.lua b/official/c79867938.lua index 1fe09b9770..7508d190e0 100644 --- a/official/c79867938.lua +++ b/official/c79867938.lua @@ -1,4 +1,5 @@ --BK ヘッドギア +--Battlin' Boxer Headgeared local s,id=GetID() function s.initial_effect(c) --send to grave @@ -21,9 +22,9 @@ function s.initial_effect(c) e1:SetValue(s.valcon) c:RegisterEffect(e1) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x84) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_BATTLIN_BOXER) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.valcon(e,re,r,rp) return e:GetHandler():IsAttackPos() and (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c79868386.lua b/official/c79868386.lua index 48a530ce41..4f956c0ddb 100644 --- a/official/c79868386.lua +++ b/official/c79868386.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={10000000} +s.listed_names={CARD_OBELISK} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalCodeRule,10000000),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOriginalCodeRule,CARD_OBELISK),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTarget(s.distg) e3:SetLabel(tc:GetOriginalCodeRule()) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -58,10 +58,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetCondition(s.discon) e4:SetOperation(s.disop) e4:SetLabel(tc:GetOriginalCodeRule()) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) --Destroy all Spells/Traps the opponent controls - local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local sg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if Duel.IsMainPhase() and Duel.IsTurnPlayer(tp) and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Destroy(sg,REASON_EFFECT) @@ -77,9 +77,9 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() local code1,code2=re:GetHandler():GetOriginalCodeRule() - return re:IsActiveType(TYPE_MONSTER) and (code1==code or code2==code) + return re:IsMonsterEffect() and (code1==code or code2==code) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c79870141.lua b/official/c79870141.lua index 3beac7af66..16e23969f7 100644 --- a/official/c79870141.lua +++ b/official/c79870141.lua @@ -1,4 +1,5 @@ --猛進する剣角獣 +--Mad Sword Beast local s,id=GetID() function s.initial_effect(c) --pierce @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c7987191.lua b/official/c7987191.lua index cada0c748d..2eebd96228 100644 --- a/official/c7987191.lua +++ b/official/c7987191.lua @@ -29,12 +29,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={20071842} -s.listed_series={0x102,0x10f} +s.listed_series={SET_ROKKET,SET_BORREL} function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp~=ep and Duel.GetCurrentChain()==0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x102),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ROKKET),tp,LOCATION_MZONE,0,nil) g:AddCard(e:GetHandler()) if chk==0 then return #g>0 end g:Merge(eg) @@ -44,7 +44,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x102),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ROKKET),tp,LOCATION_MZONE,0,nil) local c=e:GetHandler() if c:IsRelateToEffect(e) then g:AddCard(c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) @@ -56,23 +56,23 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.thfilter(c) - return (c:IsSetCard(0x102) or c:IsSetCard(0x10f)) and c:IsMonster() and c:IsAbleToHand() + return (c:IsSetCard(SET_ROKKET) or c:IsSetCard(SET_BORREL)) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c79875176.lua b/official/c79875176.lua index 1df97ea467..63ad2cad50 100644 --- a/official/c79875176.lua +++ b/official/c79875176.lua @@ -46,7 +46,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.sfilter(c) @@ -82,4 +82,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79875526.lua b/official/c79875526.lua index c8327e4bc9..d1a38c4d3f 100644 --- a/official/c79875526.lua +++ b/official/c79875526.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -31,9 +31,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x93} +s.listed_series={SET_CYBER} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x93) and c:IsRace(RACE_DRAGON+RACE_MACHINE) + return c:IsFaceup() and c:IsSetCard(SET_CYBER) and c:IsRace(RACE_DRAGON|RACE_MACHINE) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -55,19 +55,19 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end function s.eqlimit(e,c) - return c:IsSetCard(0x93) and c:IsRace(RACE_DRAGON+RACE_MACHINE) + return c:IsSetCard(SET_CYBER) and c:IsRace(RACE_DRAGON|RACE_MACHINE) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and not c:IsReason(REASON_LOST_TARGET) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x93) and c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CYBER) and c:IsRace(RACE_DRAGON|RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -83,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79905468.lua b/official/c79905468.lua index 7a50238ff1..b9a9017b56 100644 --- a/official/c79905468.lua +++ b/official/c79905468.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE|LOCATION_HAND) - e1:SetCost(s.atkdefcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.atkdeftg) e1:SetOperation(s.atkdefop) c:RegisterEffect(e1) @@ -28,11 +28,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.atkdefcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsRace(RACE_DRAGON) end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -81,4 +76,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c79912449.lua b/official/c79912449.lua index 5718fc6659..529d78b0e8 100644 --- a/official/c79912449.lua +++ b/official/c79912449.lua @@ -1,5 +1,5 @@ --御巫の誘い輪舞 ---Inviting Rondo of the Mikanko +--Mikanko Reflection Rondo --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -27,12 +27,12 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.eqlimit(e,c) return e:GetHandler():GetEquipTarget()==c or e:GetHandlerPlayer()~=c:GetControler() end function s.contcond(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x18e),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MIKANKO),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.actcond(e) local ec=e:GetHandler():GetEquipTarget() diff --git a/official/c799183.lua b/official/c799183.lua index 61dd010017..e9d1abb77f 100644 --- a/official/c799183.lua +++ b/official/c799183.lua @@ -1,6 +1,5 @@ --超戦士の盾 --Super Soldier Shield - local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,15 +22,14 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x10cf} +s.listed_series={SET_BLACK_LUSTER_SOLDIER} s.counter_list={COUNTER_SPELL} - function s.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x10cf) then return false end + if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,SET_BLACK_LUSTER_SOLDIER) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) - and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -62,7 +60,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c79922118.lua b/official/c79922118.lua index 586876a04b..60da249d5c 100644 --- a/official/c79922118.lua +++ b/official/c79922118.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.descon) @@ -22,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.desfilter(c) return c:IsFaceup() and c:GetAttack()+600>=2500 @@ -52,4 +52,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c79928401.lua b/official/c79928401.lua index 84df1e5ebc..75108f00a6 100644 --- a/official/c79928401.lua +++ b/official/c79928401.lua @@ -1,5 +1,5 @@ --勇気の天使ヴィクトリカ ---Victorika the Angel of Courage +--Victorica, Angel of Bravery --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -47,7 +47,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) end @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c79965360.lua b/official/c79965360.lua index 115b5427e2..00ba2f4e0a 100644 --- a/official/c79965360.lua +++ b/official/c79965360.lua @@ -1,7 +1,8 @@ --アマゾネスの秘宝 +--Amazoness Heirloom local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x4)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_AMAZONESS)) --destroy rep local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) @@ -21,7 +22,7 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.valcon(e,re,r,rp) return r==REASON_BATTLE end @@ -37,4 +38,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c79967395.lua b/official/c79967395.lua index 0a9368ab6f..815ce44c85 100644 --- a/official/c79967395.lua +++ b/official/c79967395.lua @@ -1,4 +1,5 @@ --EMウィップ・バイパー +--Performapal Whip Snake local s,id=GetID() function s.initial_effect(c) --swap @@ -17,7 +18,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.filter(c) return c:IsFaceup() and c:IsDefenseAbove(0) @@ -38,11 +39,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SWAP_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(def) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SWAP_DEFENSE_FINAL) e2:SetValue(atk) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c79968632.lua b/official/c79968632.lua index ef50d0173e..9e44b9ba16 100644 --- a/official/c79968632.lua +++ b/official/c79968632.lua @@ -1,5 +1,5 @@ --六武衆の影忍術 ---Shadow Art of the Six Samurai +--Secret Skills of the Six Samurai local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.cfilter(c,ft) return c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) end @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc,e,tp) end @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c79972330.lua b/official/c79972330.lua index afb0792a84..3130091cfb 100644 --- a/official/c79972330.lua +++ b/official/c79972330.lua @@ -1,4 +1,5 @@ --幻蝶の刺客アゲハ +--Swallowtail Butterspy local s,id=GetID() function s.initial_effect(c) --atk @@ -31,7 +32,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c79979666.lua b/official/c79979666.lua index 45f6c020ce..3e17af537b 100644 --- a/official/c79979666.lua +++ b/official/c79979666.lua @@ -1,4 +1,5 @@ --E・HERO バブルマン +--Elemental HERO Bubbleman local s,id=GetID() function s.initial_effect(c) --special summon @@ -36,7 +37,7 @@ function s.filter(c) return not c:IsStatus(STATUS_LEAVE_CONFIRMED) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) + return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,e:GetHandler()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -45,7 +46,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) then return end + if Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,e:GetHandler()) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c79985120.lua b/official/c79985120.lua index 60d186d38a..a50237d6fe 100644 --- a/official/c79985120.lua +++ b/official/c79985120.lua @@ -1,5 +1,5 @@ --RR-レヴォリューション・ファルコン-エアレイド ---Raidraptor - Revolution Falcon - Airraid +--Raidraptor - Revolution Falcon - Air Raid local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -28,25 +28,25 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x95,0xba} +s.listed_series={SET_RANK_UP_MAGIC,SET_RAIDRAPTOR} s.listed_names={81927732} function s.cfilter(c) - return c:IsSetCard(0x95) and c:IsSpell() and c:IsDiscardable() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() and c:IsDiscardable() end function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0xba,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRankBelow(5) + return c:IsFaceup() and c:IsSetCard(SET_RAIDRAPTOR,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsRankBelow(5) end function s.xyzop(e,tp,chk,mc) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local tc=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil):SelectUnselect(Group.CreateGroup(),tp,false,Xyz.ProcCancellable) if tc then - Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST) + Duel.SendtoGrave(tc,REASON_DISCARD|REASON_COST) return true else return false end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -84,4 +84,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then Duel.Overlay(g:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c79997591.lua b/official/c79997591.lua index 1e2bbab5f3..8299a20d31 100644 --- a/official/c79997591.lua +++ b/official/c79997591.lua @@ -1,4 +1,5 @@ --ドゥーブルパッセ +--Doble Passe local s,id=GetID() function s.initial_effect(c) --change battle target @@ -28,6 +29,6 @@ function s.cbop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN) bt:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c80019195.lua b/official/c80019195.lua index 3fd9d8dc62..1d9bfd84d8 100644 --- a/official/c80019195.lua +++ b/official/c80019195.lua @@ -1,4 +1,5 @@ --伝説の騎士 ティマイオス +--Legendary Knight Timaeus local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -61,4 +62,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c80032567.lua b/official/c80032567.lua index 34fd49fdd6..1351274d31 100644 --- a/official/c80032567.lua +++ b/official/c80032567.lua @@ -1,4 +1,5 @@ --ジュラック・ギガノト +--Jurrac Giganoto local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -10,14 +11,14 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x22)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_JURRAC)) e1:SetValue(s.val) c:RegisterEffect(e1) end -s.listed_series={0x22} +s.listed_series={SET_JURRAC} function s.filter(c) - return c:IsSetCard(0x22) and c:IsMonster() + return c:IsSetCard(SET_JURRAC) and c:IsMonster() end function s.val(e,c) return Duel.GetMatchingGroupCount(s.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*200 -end +end \ No newline at end of file diff --git a/official/c80033124.lua b/official/c80033124.lua index 9177e482f4..fe2cd7ca06 100644 --- a/official/c80033124.lua +++ b/official/c80033124.lua @@ -23,10 +23,10 @@ function s.fcheck(tp,sg,fc,mg) return #sg==3 and sg:IsExists(s.frec,1,nil,tp,sg,Group.CreateGroup(),41230939,77625948,3019642) end function s.fextra(e,tp,mg) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) return g,s.fcheck end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c80036543.lua b/official/c80036543.lua index f04451e10b..fd6c8ebe35 100644 --- a/official/c80036543.lua +++ b/official/c80036543.lua @@ -1,4 +1,5 @@ --活路への希望 +--Hope for Escape local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -15,10 +16,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-1000 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) @@ -30,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if s<0 then s=p1-p2 end local d=math.floor(s/2000) Duel.Draw(tp,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80040886.lua b/official/c80040886.lua index 9a7f8d7e8b..58f1ec9bce 100644 --- a/official/c80040886.lua +++ b/official/c80040886.lua @@ -49,21 +49,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -72,7 +72,7 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) - and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.thfilter(c) return c:IsType(TYPE_TUNER) and c:IsAbleToHand() @@ -89,4 +89,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80044027.lua b/official/c80044027.lua index ebae880d83..a87a9ab6ba 100644 --- a/official/c80044027.lua +++ b/official/c80044027.lua @@ -1,5 +1,5 @@ --御巫の火叢舞 ---Blazing Dance of the Mikanko +--Mikanko Fire Dance --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -20,14 +20,14 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x18e} +s.listed_series={SET_MIKANKO} function s.spfilter(c,e,tp) - return c:IsSetCard(0x18e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MIKANKO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0) end function s.spfilter2(c,e,tp) @@ -36,7 +36,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if not tc then return end local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.Equip(tp,c,tc) then @@ -45,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(e,c) return e:GetOwner()==c end) c:RegisterEffect(e1) --Special Summon 1 monster from the opponent's GY @@ -60,13 +60,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() diff --git a/official/c80045583.lua b/official/c80045583.lua index c8f872f288..03dd3ba75d 100644 --- a/official/c80045583.lua +++ b/official/c80045583.lua @@ -1,4 +1,5 @@ --古代の機械砲台 +--Ancient Gear Cannon local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.damcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) @@ -29,12 +26,12 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,1) e1:SetCondition(s.accon) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.accon(e) - return (Duel.GetCurrentPhase()&0x38)~=0 + return Duel.IsBattlePhase() end function s.aclimit(e,re,tp) return re:GetHandler():IsTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c80071763.lua b/official/c80071763.lua index 0efc5910a2..fdd6a5ede7 100644 --- a/official/c80071763.lua +++ b/official/c80071763.lua @@ -1,4 +1,5 @@ --魔人 ダーク・バルター +--Dark Balter the Terrible local s,id=GetID() function s.initial_effect(c) --fusion material @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -29,10 +30,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_SPELL and Duel.IsChainDisablable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) @@ -47,12 +44,12 @@ function s.disop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c80075749.lua b/official/c80075749.lua index 3681245cd1..6ed7efdd49 100644 --- a/official/c80075749.lua +++ b/official/c80075749.lua @@ -26,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,id) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c80086070.lua b/official/c80086070.lua index 172d3eb1e4..0477c5dcd8 100644 --- a/official/c80086070.lua +++ b/official/c80086070.lua @@ -1,5 +1,5 @@ --- ベアルクティ-グラン=シャリオ --- Ursarctic Grand Chariot +--ベアルクティ-グラン=シャリオ +--Ursarctic Grand Chariot local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -45,7 +45,7 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} function s.sprfilter(c) return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:HasLevel() end @@ -56,7 +56,7 @@ function s.sprfilter1(c,tp,g,sc) end function s.sprfilter2(c,tp,mc,sc) local sg=Group.FromCards(c,mc) - return (math.abs((c:GetLevel()-mc:GetLevel()))==7) and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0 + return math.abs(c:GetLevel()-mc:GetLevel())==7 and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0 end function s.sprcon(e,c) if c==nil then return true end @@ -87,8 +87,6 @@ function s.sprop(e,tp,eg,ep,ev,re,r,rp,c) if not g then return end Duel.SendtoGrave(g,REASON_COST) end - ---destroy function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end @@ -103,9 +101,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g,REASON_EFFECT) end end ---negate function s.disfilter(c,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and c:IsSetCard(0x165) + return c:IsFaceup() and c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) and c:IsSetCard(SET_URSARCTIC) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end diff --git a/official/c80088625.lua b/official/c80088625.lua index d7f16e58fd..def0696ce9 100644 --- a/official/c80088625.lua +++ b/official/c80088625.lua @@ -1,11 +1,10 @@ --バイナル・ブレーダー --Binary Blader --Anime version scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving - c:EnableReviveLimit() + c:EnableReviveLimit() --Link summon procedure Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_NORMAL),2,2) --Make itself be able to make a second attack @@ -46,7 +45,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Opponent's monsters cannot be destroyed by battle with this card local e2=Effect.CreateEffect(c) @@ -56,7 +55,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetTarget(s.indestg) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end diff --git a/official/c80102359.lua b/official/c80102359.lua index 8cdc5871cb..70bdb2dfe2 100644 --- a/official/c80102359.lua +++ b/official/c80102359.lua @@ -1,4 +1,5 @@ --強化人類サイコ +--Reinforced Human Psychic Borg local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,9 +17,9 @@ function s.cfilter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -29,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c80108118.lua b/official/c80108118.lua index ae4e5eb6fb..a1fd460d73 100644 --- a/official/c80108118.lua +++ b/official/c80108118.lua @@ -1,4 +1,5 @@ --X-セイバー ウルベルム +--X-Saber Urbellum local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -26,5 +27,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c80117527.lua b/official/c80117527.lua index 3ef34a94d9..346eaa7cb2 100644 --- a/official/c80117527.lua +++ b/official/c80117527.lua @@ -1,4 +1,5 @@ --No.11 ビッグ・アイ +--Number 11: Big Eye local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -26,11 +27,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c80141055.lua b/official/c80141055.lua index b224aeeff1..7000342c87 100644 --- a/official/c80141055.lua +++ b/official/c80141055.lua @@ -1,5 +1,5 @@ --クマモール ---Bearrier +--Bearblocker --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -43,9 +43,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(800) c:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c80143954.lua b/official/c80143954.lua index c5accd3bf1..3d1b51e003 100644 --- a/official/c80143954.lua +++ b/official/c80143954.lua @@ -1,4 +1,5 @@ --オルターガイスト・カモフラージュ +--Altergeist Camouflage local s,id=GetID() function s.initial_effect(c) --activate @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x103) + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -43,13 +44,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_IGNORE_BATTLE_TARGET) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --negate local e4=Effect.CreateEffect(c) @@ -59,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetLabelObject(tc) e4:SetCondition(s.negcon) e4:SetOperation(s.negop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e4) else c:CancelToGrave(false) @@ -71,14 +72,14 @@ end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) - return rp~=tp and re:IsActiveType(TYPE_MONSTER) and g and g:IsContains(e:GetLabelObject()) + return rp~=tp and re:IsMonsterEffect() and g and g:IsContains(e:GetLabelObject()) end function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x103) and c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) and c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -89,4 +90,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80159717.lua b/official/c80159717.lua index c910fe1944..0e530f53aa 100644 --- a/official/c80159717.lua +++ b/official/c80159717.lua @@ -34,4 +34,4 @@ function s.exop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,ct,ct,nil) Duel.SendtoGrave(sg,REASON_EFFECT) Duel.ShuffleExtra(1-tp) -end +end \ No newline at end of file diff --git a/official/c80161395.lua b/official/c80161395.lua index 076441beb5..8bc75828e3 100644 --- a/official/c80161395.lua +++ b/official/c80161395.lua @@ -50,4 +50,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80163754.lua b/official/c80163754.lua index 875ca0a90d..259afb5fc2 100644 --- a/official/c80163754.lua +++ b/official/c80163754.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_END_PHASE|TIMINGS_CHECK_MONSTER) e1:SetLabel(1) e1:SetCost(s.cost) e1:SetTarget(s.target) @@ -38,4 +38,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsDefenseBelow,e:GetLabel()),tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80168720.lua b/official/c80168720.lua index a8214290cb..0a14744cd7 100644 --- a/official/c80168720.lua +++ b/official/c80168720.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsCanTurnSet() @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c80170678.lua b/official/c80170678.lua index c5a4b548ae..dc5fb5fe38 100644 --- a/official/c80170678.lua +++ b/official/c80170678.lua @@ -16,26 +16,26 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end s.listed_names={CARD_NEOS,CARD_POLYMERIZATION} -s.listed_series={0x3008,0x1f} +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} function s.counterfilter(c) return c:IsType(TYPE_FUSION) or c:GetSummonLocation()~=LOCATION_EXTRA end function s.cfilter(c) - return c:IsMonster() and (c:IsSetCard(0x1f) or c:IsSetCard(0x3008)) and c:IsAbleToGraveAsCost() + return c:IsMonster() and (c:IsSetCard(SET_NEO_SPACIAN) or c:IsSetCard(SET_ELEMENTAL_HERO)) and c:IsAbleToGraveAsCost() end function s.rescon(sg,e,tp,mg) - return sg:GetClassCount(Card.GetLocation)==2 and sg:IsExists(Card.IsSetCard,1,nil,0x1f) and sg:IsExists(Card.IsSetCard,1,nil,0x3008) + return sg:GetClassCount(Card.GetLocation)==2 and sg:IsExists(Card.IsSetCard,1,nil,SET_NEO_SPACIAN) and sg:IsExists(Card.IsSetCard,1,nil,SET_ELEMENTAL_HERO) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,sg,e,tp) - and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,sg,e,tp) + and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,sg,e,tp) end function s.spfilter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsSetCard(0x1f) or (c:IsSetCard(0x3008) and c:IsLevelAbove(5))) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsSetCard(SET_NEO_SPACIAN) or (c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsLevelAbove(5))) end function s.thfilter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_TOGRAVE) @@ -47,7 +47,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -63,7 +63,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end @@ -76,11 +76,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #tg>0 then Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) diff --git a/official/c80186010.lua b/official/c80186010.lua index fd7deca431..a08d880b26 100644 --- a/official/c80186010.lua +++ b/official/c80186010.lua @@ -1,4 +1,5 @@ --キラーザウルス +--Destroyersaurus local s,id=GetID() function s.initial_effect(c) --search @@ -7,17 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={10080320} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(10080320) and c:IsAbleToHand() end @@ -31,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c80190753.lua b/official/c80190753.lua index 982c686c2f..360137f99f 100644 --- a/official/c80190753.lua +++ b/official/c80190753.lua @@ -1,4 +1,5 @@ --桜姫タレイア +--Talaya, Princess of Cherry Blossoms local s,id=GetID() function s.initial_effect(c) --atk @@ -24,4 +25,4 @@ function s.val(e,c) end function s.target(e,c) return c~=e:GetHandler() and c:IsRace(RACE_PLANT) -end +end \ No newline at end of file diff --git a/official/c80193355.lua b/official/c80193355.lua index 410e205519..c584bde7aa 100644 --- a/official/c80193355.lua +++ b/official/c80193355.lua @@ -1,4 +1,5 @@ --救出劇 +--Dramatic Rescue local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.cfilter(c,ft) - return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0x4) and (ft>0 or c:GetSequence()<5) + return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and (ft>0 or c:GetSequence()<5) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,Duel.GetLocationCount(tp,LOCATION_MZONE)) @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,g) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c80196387.lua b/official/c80196387.lua index cfb49038f9..6c028c4e0d 100644 --- a/official/c80196387.lua +++ b/official/c80196387.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c80204957.lua b/official/c80204957.lua index 3923c6ea1b..3019930a9b 100644 --- a/official/c80204957.lua +++ b/official/c80204957.lua @@ -1,4 +1,5 @@ --借カラクリ蔵 +--Karakuri Cash Cache local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} function s.filter1(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x11) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsSetCard(SET_KARAKURI) and c:IsAbleToHand() end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x11) and c:IsCanChangePosition() + return c:IsFaceup() and c:IsSetCard(SET_KARAKURI) and c:IsCanChangePosition() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter2(chkc) end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c80208158.lua b/official/c80208158.lua index 423303eeb9..c1eccc04d1 100644 --- a/official/c80208158.lua +++ b/official/c80208158.lua @@ -1,6 +1,5 @@ --異次元エスパー・スター・ロビン --D.D. Esper Star Sparrow - local s,id=GetID() function s.initial_effect(c) --Can only be 1 copy of this card on the field @@ -57,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c80208323.lua b/official/c80208323.lua index a49e3192a7..3a3438937d 100644 --- a/official/c80208323.lua +++ b/official/c80208323.lua @@ -1,6 +1,5 @@ --異界の棘紫獣 --Interplanetarypurplythorny Beast - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -36,7 +35,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c80230510.lua b/official/c80230510.lua index a63c9253a2..018604b2b9 100644 --- a/official/c80230510.lua +++ b/official/c80230510.lua @@ -25,18 +25,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.otop) e1:SetCountLimit(1) e1:SetValue(SUMMON_TYPE_TRIBUTE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_SET_PROC) Duel.RegisterEffect(e2,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -47,16 +47,16 @@ function s.otcon(e,c,minc) if c==nil then return true end local tp=c:GetControler() return minc<=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end function s.ottg(e,c) local mi,ma=c:GetTributeRequirement() return mi<=2 and ma>=2 end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,c) - local mg1=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - local mg2=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil) + local mg1=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + local mg2=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil) ::restart:: Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g1=mg1:Select(tp,1,1,true,nil) @@ -77,4 +77,4 @@ function s.otop(e,tp,eg,ep,ev,re,r,rp,c) Duel.Remove(sg,POS_FACEUP,REASON_COST) sg:DeleteGroup() Duel.ResetFlagEffect(tp,id) -end +end \ No newline at end of file diff --git a/official/c80233946.lua b/official/c80233946.lua index bbf4b18316..ef0f27b9cf 100644 --- a/official/c80233946.lua +++ b/official/c80233946.lua @@ -1,4 +1,5 @@ --ゴラ・タートル +--Gora Turtle local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.atktarget(e,c) return c:IsAttackAbove(1900) -end +end \ No newline at end of file diff --git a/official/c80237445.lua b/official/c80237445.lua index 1142db40ee..d9efb35992 100644 --- a/official/c80237445.lua +++ b/official/c80237445.lua @@ -1,5 +1,5 @@ --アーティファクト-ミョルニル ---Artifact Mjolnir +--Artifact Mjollnir local s,id=GetID() function s.initial_effect(c) --Set itself to the S/T zone @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) @@ -50,7 +50,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x97) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_ARTIFACT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -70,15 +70,15 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x97) -end + return not c:IsSetCard(SET_ARTIFACT) +end \ No newline at end of file diff --git a/official/c80244114.lua b/official/c80244114.lua index be95a39060..cb14d88d07 100644 --- a/official/c80244114.lua +++ b/official/c80244114.lua @@ -1,4 +1,5 @@ --スターダスト・ファントム +--Stardust Phantom local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.indtg) e2:SetOperation(s.indop) c:RegisterEffect(e2) @@ -62,19 +63,19 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetOperation(s.addown) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end function s.valcon(e,re,r,rp) if (r&REASON_BATTLE)~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) return true else return false end end @@ -84,9 +85,9 @@ function s.addown(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e:GetHandler():RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) e:GetHandler():RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c80250185.lua b/official/c80250185.lua index 5022fef43d..eb976545d5 100644 --- a/official/c80250185.lua +++ b/official/c80250185.lua @@ -1,5 +1,5 @@ --オートヴァレット・ドラゴン ---Autovullet Dragon +--Autorokket Dragon local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -32,14 +32,14 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if chk==0 then return c:IsDestructable() and #g>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and Duel.Destroy(e:GetHandler(),REASON_EFFECT)>0 then - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if #g==0 then return end Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -49,7 +49,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -59,12 +59,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -78,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80250319.lua b/official/c80250319.lua index 3e266cc19e..f4ef6a01c0 100644 --- a/official/c80250319.lua +++ b/official/c80250319.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xd1} +s.listed_series={SET_GRAYDLE} function s.spfilter1(c,e,tp) - return c:IsSetCard(0xd1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GRAYDLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter1(chkc,e,tp) end @@ -58,7 +58,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) @@ -79,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8025950.lua b/official/c8025950.lua index f8ed3ad80b..7b6bc71f2c 100644 --- a/official/c8025950.lua +++ b/official/c8025950.lua @@ -32,7 +32,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(tp,1,0,0x8,1,REASON_EFFECT) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x51,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_GADGET,TYPES_TOKEN,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH,POS_FACEUP) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() diff --git a/official/c80275707.lua b/official/c80275707.lua index ee0220c182..4f264efd36 100644 --- a/official/c80275707.lua +++ b/official/c80275707.lua @@ -1,5 +1,5 @@ --道化鳥ラフィンパフィン ---Laughing Puffin the Jester Bird +--Laughing Puffin --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -81,7 +81,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabel(og:GetFirst():GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c80280737.lua b/official/c80280737.lua index 7368b4a753..b095c8812a 100644 --- a/official/c80280737.lua +++ b/official/c80280737.lua @@ -1,4 +1,5 @@ --バスター・モード +--Assault Mode Activate local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x104f} +s.listed_series={SET_ASSAULT_MODE} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true @@ -22,7 +23,7 @@ function s.filter1(c,e,tp,ft) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil,c:GetCode(),e,tp) end function s.filter2(c,tcode,e,tp) - return c:IsSetCard(0x104f) and c.assault_mode and c.assault_mode==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_ASSAULT_MODE) and c.assault_mode and c.assault_mode==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -44,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_ATTACK)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c80280944.lua b/official/c80280944.lua index e52c2b65b3..9e374a0f13 100644 --- a/official/c80280944.lua +++ b/official/c80280944.lua @@ -1,4 +1,5 @@ --ジャイアント・レックス +--Giant Rex local s,id=GetID() function s.initial_effect(c) --cannot direct attack @@ -34,9 +35,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(#g*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c80304126.lua b/official/c80304126.lua index 9b1525b2cf..744e115c56 100644 --- a/official/c80304126.lua +++ b/official/c80304126.lua @@ -1,4 +1,5 @@ --マジシャンズ・ヴァルキリア +--Magician's Valkyria local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.tg(e,c) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) -end +end \ No newline at end of file diff --git a/official/c80312545.lua b/official/c80312545.lua index d4db609327..3ee557dd96 100644 --- a/official/c80312545.lua +++ b/official/c80312545.lua @@ -57,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.spfilter(c,e,tp) return c:IsRace(RACE_FIEND) and c:IsAttack(0) and c:IsDefense(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -93,4 +93,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c80316585.lua b/official/c80316585.lua index 21e1da12e3..f670ed2713 100644 --- a/official/c80316585.lua +++ b/official/c80316585.lua @@ -1,4 +1,5 @@ --ハーピィ・レディ・SB +--Cyber Harpie Lady local s,id=GetID() function s.initial_effect(c) end diff --git a/official/c80321197.lua b/official/c80321197.lua index 39690c3959..de41c6e914 100644 --- a/official/c80321197.lua +++ b/official/c80321197.lua @@ -1,4 +1,5 @@ --クリムゾン・ブレーダー +--Crimson Blader local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -22,10 +23,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.sumcon) e1:SetTarget(s.sumlimit) e1:SetLabel(Duel.GetTurnCount()) - if Duel.GetTurnPlayer()==tp then - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + if Duel.IsTurnPlayer(tp) then + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,2) end Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -37,4 +38,4 @@ function s.sumcon(e) end function s.sumlimit(e,c) return c:IsLevelAbove(5) -end +end \ No newline at end of file diff --git a/official/c80326401.lua b/official/c80326401.lua index 5952fe9349..79a5d8672a 100644 --- a/official/c80326401.lua +++ b/official/c80326401.lua @@ -1,5 +1,5 @@ --青き眼の祈り ---Prayers with Eyes of Blue +--Wishes for Eyes of Blue --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) diff --git a/official/c80335817.lua b/official/c80335817.lua index 83f3ebf608..5230a92c63 100644 --- a/official/c80335817.lua +++ b/official/c80335817.lua @@ -1,4 +1,5 @@ --刻剣の魔術師 +--Timebreaker Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -43,7 +44,7 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return #eg==1 and eg:GetFirst()==c - and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsPreviousLocation(LOCATION_HAND) + and c:IsPendulumSummoned() and c:IsPreviousLocation(LOCATION_HAND) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -70,21 +71,21 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end local g=Group.FromCards(c,tc) - if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if Duel.Remove(g,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local og=Duel.GetOperatedGroup() local oc=og:GetFirst() for oc in aux.Next(og) do if oc:IsControler(tp) then - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + oc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) else - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,1) + oc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_OPPO_TURN,0,1) end end og:KeepAlive() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) e1:SetCountLimit(1) e1:SetLabelObject(og) e1:SetCondition(s.retcon) @@ -96,7 +97,7 @@ function s.retfilter(c) return c:GetFlagEffect(id)~=0 end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() @@ -114,4 +115,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(sg) do Duel.ReturnToField(tc) end -end +end \ No newline at end of file diff --git a/official/c80344569.lua b/official/c80344569.lua index 833a044aaf..f33fc3d008 100644 --- a/official/c80344569.lua +++ b/official/c80344569.lua @@ -1,4 +1,5 @@ --N・グラン・モール +--Neo-Spacian Grand Mole local s,id=GetID() function s.initial_effect(c) --return to hand @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g, nil, REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8034697.lua b/official/c8034697.lua index ce3406e1ce..718ef5a80c 100644 --- a/official/c8034697.lua +++ b/official/c8034697.lua @@ -2,7 +2,7 @@ --Magical Marionette local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x1) + c:EnableCounterPermit(COUNTER_SPELL) --add counter local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) @@ -38,7 +38,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -61,4 +61,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80352158.lua b/official/c80352158.lua index 1f167ddcc3..ffbb404610 100644 --- a/official/c80352158.lua +++ b/official/c80352158.lua @@ -13,15 +13,15 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsRace(RACE_MACHINE+RACE_ROCK) and not c:IsSummonableCard() + return c:IsFaceup() and c:IsRace(RACE_MACHINE|RACE_ROCK) and not c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.filter(chkc,e,tp) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -29,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80367387.lua b/official/c80367387.lua index 763ff42b42..12473a6f31 100644 --- a/official/c80367387.lua +++ b/official/c80367387.lua @@ -1,4 +1,5 @@ --コアキメイル・ベルグザーク +--Koa'ki Meiru Bergzak local s,id=GetID() function s.initial_effect(c) --cost @@ -22,7 +23,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -66,4 +67,4 @@ function s.atcon(e,tp,eg,ep,ev,re,r,rp) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() -end +end \ No newline at end of file diff --git a/official/c80368942.lua b/official/c80368942.lua index db9b641e69..a66e5efff4 100644 --- a/official/c80368942.lua +++ b/official/c80368942.lua @@ -1,4 +1,5 @@ --コクーン・パーティ +--Cocoon Party local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,12 +11,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1f,0x1e} +s.listed_series={SET_NEO_SPACIAN,SET_CHRYSALIS} function s.gfilter(c) - return c:IsSetCard(0x1f) and c:IsMonster() + return c:IsSetCard(SET_NEO_SPACIAN) and c:IsMonster() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CHRYSALIS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -50,4 +51,4 @@ function s.count_unique_code(g) end end return count -end +end \ No newline at end of file diff --git a/official/c8038143.lua b/official/c8038143.lua index e1355ee7d8..d9968597ce 100644 --- a/official/c8038143.lua +++ b/official/c8038143.lua @@ -60,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end function s.handcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GALAXY_EYES_TACHYON_DRAGON),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) diff --git a/official/c80402389.lua b/official/c80402389.lua index 656ba15678..664c4e6898 100644 --- a/official/c80402389.lua +++ b/official/c80402389.lua @@ -48,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c8041569.lua b/official/c8041569.lua index 26d9b0b2f9..07ea9baeba 100644 --- a/official/c8041569.lua +++ b/official/c8041569.lua @@ -1,4 +1,5 @@ --ラヴァル炎湖畔の淑女 +--Laval Lakeside Lady local s,id=GetID() function s.initial_effect(c) --destroy @@ -15,10 +16,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 + return Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,SET_LAVAL):GetClassCount(Card.GetCode)>=3 end function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) @@ -40,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80433039.lua b/official/c80433039.lua index ea54499be2..67884db306 100644 --- a/official/c80433039.lua +++ b/official/c80433039.lua @@ -1,5 +1,5 @@ --ふわんだりぃず×すとりー ---Flundereeze x Strich +--Floowandereeze & Stri --Logical Nonsense --Substitute ID local s,id=GetID() @@ -46,13 +46,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -62,10 +62,10 @@ function s.rmfilter(c) end --Activation legality function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.sumfilter(c) @@ -77,7 +77,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<=0 then return end --Normal summon 1 winged beast monster - local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local sg1=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if #sg1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.BreakEffect() Duel.ShuffleHand(tp) @@ -103,4 +103,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80441106.lua b/official/c80441106.lua index b968aa0487..c4e7d998e0 100644 --- a/official/c80441106.lua +++ b/official/c80441106.lua @@ -1,4 +1,5 @@ --ケルドウ +--Keldo local s,id=GetID() function s.initial_effect(c) --todeck @@ -34,5 +35,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not g then return end local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c80453041.lua b/official/c80453041.lua index 9f0670aebc..1bd44942fd 100644 --- a/official/c80453041.lua +++ b/official/c80453041.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,id) e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsMonsterEffect() end) - e4:SetCost(aux.SelfTributeCost) + e4:SetCost(Cost.SelfTribute) e4:SetTarget(s.chngtg) e4:SetOperation(s.chngop) c:RegisterEffect(e4) @@ -70,4 +70,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT,LOCATION_GRAVE,1-tp) end -end +end \ No newline at end of file diff --git a/official/c80457744.lua b/official/c80457744.lua index 62c69e7c70..eb407e4e9c 100644 --- a/official/c80457744.lua +++ b/official/c80457744.lua @@ -1,4 +1,5 @@ --ブースト・ウォリアー +--Boost Warrior local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,4 +28,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c80476891.lua b/official/c80476891.lua index bffe74e273..06c22e55f3 100644 --- a/official/c80476891.lua +++ b/official/c80476891.lua @@ -38,7 +38,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -72,5 +72,5 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c80485722.lua b/official/c80485722.lua index 9bdd99e964..ecb220d62e 100644 --- a/official/c80485722.lua +++ b/official/c80485722.lua @@ -1,4 +1,5 @@ --ヴァンパイア・キラー +--Vampire Hunter local s,id=GetID() function s.initial_effect(c) --destroy @@ -23,4 +24,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80495985.lua b/official/c80495985.lua index 277762bc7b..299de96c9f 100644 --- a/official/c80495985.lua +++ b/official/c80495985.lua @@ -1,4 +1,5 @@ --フォトン・サーベルタイガー +--Photon Sabre Tiger local s,id=GetID() function s.initial_effect(c) --search @@ -42,4 +43,4 @@ function s.atfilter(c) end function s.atcon(e) return not Duel.IsExistingMatchingCard(s.atfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c80513550.lua b/official/c80513550.lua index b24ed70dce..982357f826 100644 --- a/official/c80513550.lua +++ b/official/c80513550.lua @@ -1,4 +1,5 @@ --バッド・エンド・クイーン・ドラゴン +--Dragon Queen of Tragic Endings local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -25,7 +26,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -35,7 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.hspfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS + return c:IsFaceup() and c:IsContinuousSpell() end function s.hspcon(e,c) if c==nil then return true end @@ -57,10 +58,10 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsContinuousSpell() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -77,4 +78,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80516007.lua b/official/c80516007.lua index ba18b3991d..4618b5d964 100644 --- a/official/c80516007.lua +++ b/official/c80516007.lua @@ -1,7 +1,8 @@ --レア・フィッシュ +--Rare Fish local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,1641882,75376965) -end +end \ No newline at end of file diff --git a/official/c80529459.lua b/official/c80529459.lua index 00e7338c9d..dc080ea2bc 100644 --- a/official/c80529459.lua +++ b/official/c80529459.lua @@ -44,7 +44,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,2)) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SCRAP)) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) @@ -68,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c80532587.lua b/official/c80532587.lua index 79e4dfa6b3..699e79b269 100644 --- a/official/c80532587.lua +++ b/official/c80532587.lua @@ -32,7 +32,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil) end function s.contactop(g) - Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) end function s.spfilter(c,e,tp) return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -62,4 +62,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80534031.lua b/official/c80534031.lua index 48840e4d5e..2ce700d8d8 100644 --- a/official/c80534031.lua +++ b/official/c80534031.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.efftg) e2:SetOperation(s.effop) c:RegisterEffect(e2) diff --git a/official/c80538728.lua b/official/c80538728.lua index 1248ca68c6..ecb488b62b 100644 --- a/official/c80538728.lua +++ b/official/c80538728.lua @@ -1,4 +1,5 @@ --ゼンマイナイト +--Wind-Up Knight local s,id=GetID() function s.initial_effect(c) --negate attack @@ -13,11 +14,11 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x58) + return d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SET_WIND_UP) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c80549379.lua b/official/c80549379.lua index b7ada2db9c..bac3f7cfc7 100644 --- a/official/c80549379.lua +++ b/official/c80549379.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.repop) c:RegisterEffect(e1) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsRace(RACE_WINGEDBEAST) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_WINGEDBEAST) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -33,7 +33,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -41,4 +41,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c80551130.lua b/official/c80551130.lua index e8e276a37e..0de6a11ac0 100644 --- a/official/c80551130.lua +++ b/official/c80551130.lua @@ -1,4 +1,5 @@ --奇跡の光臨 +--Miraculous Descent local s,id=GetID() function s.initial_effect(c) --Activate @@ -58,4 +59,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80555062.lua b/official/c80555062.lua index 00da58d386..5af2211aca 100644 --- a/official/c80555062.lua +++ b/official/c80555062.lua @@ -1,4 +1,5 @@ --武神器-チカヘシ +--Bujingi Warg local s,id=GetID() function s.initial_effect(c) -- @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetValue(1) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.con(e) return e:GetHandler():IsDefensePos() end function s.target(e,c) - return c~=e:GetHandler() and c:IsSetCard(0x88) -end + return c~=e:GetHandler() and c:IsSetCard(SET_BUJIN) +end \ No newline at end of file diff --git a/official/c80555116.lua b/official/c80555116.lua index c371bc3209..70e5ed884d 100644 --- a/official/c80555116.lua +++ b/official/c80555116.lua @@ -1,4 +1,5 @@ --ナチュル・ガーディアン +--Naturia Guardian local s,id=GetID() function s.initial_effect(c) --atk up @@ -22,7 +23,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c80559548.lua b/official/c80559548.lua index 0489704ccc..f34abc34bb 100644 --- a/official/c80559548.lua +++ b/official/c80559548.lua @@ -1,4 +1,5 @@ --SRシェイブー・メラン +--Speedroid Razorang local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -24,7 +25,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -45,9 +46,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-800) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c80560728.lua b/official/c80560728.lua index b665539fa8..77f522ba15 100644 --- a/official/c80560728.lua +++ b/official/c80560728.lua @@ -1,4 +1,5 @@ --ディメンション・ミラージュ +--Dimension Mirage local s,id=GetID() function s.initial_effect(c) aux.AddPersistentProcedure(c,1,aux.FilterBoolFunction(Card.IsPosition,POS_FACEUP_ATTACK)) @@ -45,7 +46,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_FIRST_ATTACK) @@ -59,4 +60,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80566312.lua b/official/c80566312.lua index 786d1c1a29..c8914b6618 100644 --- a/official/c80566312.lua +++ b/official/c80566312.lua @@ -1,4 +1,5 @@ --祝祷の聖歌 +--Hymn of Light local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,56350972) @@ -14,7 +15,7 @@ function s.initial_effect(c) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsType(TYPE_RITUAL) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -25,4 +26,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8057630.lua b/official/c8057630.lua index e9267c7923..2abac1b96c 100644 --- a/official/c8057630.lua +++ b/official/c8057630.lua @@ -1,4 +1,5 @@ --コアの再練成 +--Core Reinforcement local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.filter(c,e,tp) - return c:IsSetCard(0x1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOAKI_MEIRU) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -51,7 +52,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() if not tc then return end if tc:IsLocation(LOCATION_MZONE) and Duel.Destroy(tc,REASON_EFFECT)==0 then return end - if re~=e:GetLabelObject() and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then + if re~=e:GetLabelObject() and Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_END) then local atk=tc:GetBaseAttack() if atk<0 then atk=0 end Duel.Damage(tp,atk,REASON_EFFECT) @@ -63,10 +64,10 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetFirstCardTarget() - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_END) then local atk=tc:GetBaseAttack() if atk<0 then atk=0 end Duel.Damage(tp,atk,REASON_EFFECT) end Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80577258.lua b/official/c80577258.lua index 72b153a098..8a384098a8 100644 --- a/official/c80577258.lua +++ b/official/c80577258.lua @@ -26,13 +26,13 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.thfilter(c) - return c:IsSetCard(0x109) and c:IsAbleToHand() + return c:IsSetCard(SET_THE_WEATHER) and c:IsAbleToHand() end function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) end @@ -54,12 +54,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TO_HAND) e1:SetTargetRange(LOCATION_DECK,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end \ No newline at end of file diff --git a/official/c80584548.lua b/official/c80584548.lua index 5319fd4666..b6a12d7333 100644 --- a/official/c80584548.lua +++ b/official/c80584548.lua @@ -52,5 +52,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c80604091.lua b/official/c80604091.lua index 9b064947a3..ee23db6b05 100644 --- a/official/c80604091.lua +++ b/official/c80604091.lua @@ -27,14 +27,14 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,500) end if e:GetHandler():GetFlagEffect(id)==0 then - e:GetHandler():RegisterFlagEffect(id,RESET_CHAIN,0,1,Duel.GetMatchingGroupCount(Card.CanSummonOrSet,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,true,nil)) + e:GetHandler():RegisterFlagEffect(id,RESET_CHAIN,0,1,Duel.GetMatchingGroupCount(Card.CanSummonOrSet,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,true,nil)) end Duel.PayLPCost(tp,500) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetHandler():GetFlagEffect(id)==0 then - return Duel.GetMatchingGroupCount(Card.CanSummonOrSet,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,true,nil)>0 + return Duel.GetMatchingGroupCount(Card.CanSummonOrSet,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,true,nil)>0 else return e:GetHandler():GetFlagEffectLabel(id)>0 end end e:GetHandler():SetFlagEffectLabel(id,e:GetHandler():GetFlagEffectLabel(id)-1) @@ -43,8 +43,8 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,Card.CanSummonOrSet,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,true,nil):GetFirst() if tc then Duel.SummonOrSet(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c80611581.lua b/official/c80611581.lua index 4e100fddeb..9eec83294c 100644 --- a/official/c80611581.lua +++ b/official/c80611581.lua @@ -1,5 +1,5 @@ --ふわんだりぃず×えんぺん ---Flundereeze x Empen +--Floowandereeze & Empen --scripted by XyLeN local s,id=GetID() function s.initial_effect(c) @@ -36,12 +36,12 @@ function s.initial_effect(c) e3:SetOperation(s.adop) c:RegisterEffect(e3) end -s.listed_series={0x16f} +s.listed_series={SET_FLOOWANDEREEZE} function s.trsumcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.thfilter(c) - return c:IsSetCard(0x16f) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_FLOOWANDEREEZE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -57,7 +57,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) if not g:GetFirst():IsLocation(LOCATION_HAND) then return end - local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil) + local sg=Duel.GetMatchingGroup(s.sumfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.ShuffleHand(tp) @@ -69,8 +69,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.actlmtval(e,re,rp) local rc=re:GetHandler() - return rc:IsSummonType(SUMMON_TYPE_SPECIAL) and rc:IsAttackPos() and rc:IsLocation(LOCATION_MZONE) - and re:IsActiveType(TYPE_MONSTER) + return rc:IsSpecialSummoned() and rc:IsAttackPos() and rc:IsLocation(LOCATION_MZONE) + and re:IsMonsterEffect() end function s.adcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattleTarget()~=nil @@ -91,11 +91,11 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(bc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetValue(bc:GetDefense()/2) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c8062132.lua b/official/c8062132.lua index 9a339dc6e0..237e99bc92 100644 --- a/official/c8062132.lua +++ b/official/c8062132.lua @@ -78,9 +78,9 @@ function s.cfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -104,4 +104,4 @@ function s.winop(e,tp,eg,ep,ev,re,r,rp) if c:GetCounter(0x11)==3 then Duel.Win(tp,WIN_REASON_VENNOMINAGA) end -end +end \ No newline at end of file diff --git a/official/c80621422.lua b/official/c80621422.lua index 426f0dac83..16faf6fb77 100644 --- a/official/c80621422.lua +++ b/official/c80621422.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x13f)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_PLUNDER_PATROLL)) --Equipped monster gains 500 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -25,19 +25,14 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x13f} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end +s.listed_series={SET_PLUNDER_PATROLL} function s.filter(c,e,tp,att) - return c:IsSetCard(0x13f) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.cfilter(c) @@ -45,7 +40,7 @@ function s.cfilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if chk==0 then return att>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -57,7 +52,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local att=0 - for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)) do + for gc in aux.Next(Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil)) do att=att|gc:GetAttribute() end if att==0 then return end @@ -78,7 +73,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -86,9 +81,9 @@ function s.equipop(c,e,tp,tc) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetLabelObject(c) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c80627281.lua b/official/c80627281.lua index 574a546f38..2ccfbdac1f 100644 --- a/official/c80627281.lua +++ b/official/c80627281.lua @@ -1,7 +1,6 @@ --海晶乙女雪花 --Marincess Snow --Credit to Larry126 - local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,16 +14,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x12b} - +s.listed_series={SET_MARINCESS} function s.filter(c,e,tp) return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsPreviousSetCard(0x12b) and c:GetPreviousTypeOnField()&TYPE_LINK==TYPE_LINK - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsCanBeEffectTarget(e) and c:GetLink() + and c:IsPreviousSetCard(SET_MARINCESS) and c:GetPreviousTypeOnField()&TYPE_LINK==TYPE_LINK + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsCanBeEffectTarget(e) and c:GetLink() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetLink()) end function s.spfilter(c,e,tp,lk) - return c:IsSetCard(0x12b) and c:IsLinkMonster() and c:GetLink()=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c80701178.lua b/official/c80701178.lua index ce544492d4..2cb10b9ded 100644 --- a/official/c80701178.lua +++ b/official/c80701178.lua @@ -1,4 +1,4 @@ --- 魔神儀-タリスマンドラ +--魔神儀-タリスマンドラ --Impcantation Talismandra local s,id=GetID() function s.initial_effect(c) @@ -37,9 +37,9 @@ function s.initial_effect(c) --clock lizard aux.addContinuousLizardCheck(c,LOCATION_MZONE) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} function s.filter(c,e,tp) - return c:IsSetCard(0x117) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.costfilter(c) return c:IsRitualMonster() and not c:IsPublic() @@ -56,7 +56,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -89,4 +89,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c80722024.lua b/official/c80722024.lua index c08a54f76f..66867da4b6 100644 --- a/official/c80722024.lua +++ b/official/c80722024.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.pdtg) e2:SetOperation(s.pdop) c:RegisterEffect(e2) diff --git a/official/c80723580.lua b/official/c80723580.lua index 46201e8269..db7297ca77 100644 --- a/official/c80723580.lua +++ b/official/c80723580.lua @@ -1,4 +1,5 @@ --大落とし穴 +--Giant Trap Hole local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80727036.lua b/official/c80727036.lua index c680a8d5ff..f30fe12ef2 100644 --- a/official/c80727036.lua +++ b/official/c80727036.lua @@ -1,7 +1,8 @@ --黒き人食い鮫 +--Man-eating Black Shark local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,71746462,65623423,17968114) -end +end \ No newline at end of file diff --git a/official/c80727721.lua b/official/c80727721.lua index e7f652a707..7c1d549e3e 100644 --- a/official/c80727721.lua +++ b/official/c80727721.lua @@ -1,4 +1,5 @@ --ジュラック・アウロ +--Jurrac Aeolo local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,18 +9,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x22} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_JURRAC} function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x22) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_JURRAC) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -35,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80741828.lua b/official/c80741828.lua index f03a964517..5c6a2501f4 100644 --- a/official/c80741828.lua +++ b/official/c80741828.lua @@ -1,4 +1,5 @@ --見習い魔女 +--Witch's Apprentice local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -19,4 +20,4 @@ function s.tg1(e,c) end function s.tg2(e,c) return c:IsAttribute(ATTRIBUTE_LIGHT) -end +end \ No newline at end of file diff --git a/official/c80744121.lua b/official/c80744121.lua index 69b14a51fa..51fc97b9aa 100644 --- a/official/c80744121.lua +++ b/official/c80744121.lua @@ -1,4 +1,5 @@ --D-HERO ドゥームガイ +--Destiny HERO - Fear Monger local s,id=GetID() function s.initial_effect(c) --reg @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetOperation(s.regop) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) then @@ -20,19 +21,19 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,1) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc008) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESTINY_HERO) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -46,4 +47,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80758812.lua b/official/c80758812.lua index cc7eaa6101..886054d624 100644 --- a/official/c80758812.lua +++ b/official/c80758812.lua @@ -1,7 +1,6 @@ --デュアル・アブレーション --Gemini Ablation --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -9,7 +8,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) c:RegisterEffect(e1) --Special Summon 1 Gemini monster from the Deck local e2=Effect.CreateEffect(c) @@ -19,7 +18,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCondition(function() return Duel.IsMainPhase() end) e2:SetCost(s.discost) e2:SetTarget(s.sptg) @@ -92,7 +91,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end @@ -108,7 +107,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local gemini_chk=tc:IsFaceup() and tc:IsGeminiStatus() if Duel.Release(tc,REASON_EFFECT)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #sg==0 or Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)==0 or not gemini_chk then return end local dg1=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) if #dg1==0 or not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then return end @@ -119,4 +118,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Destroy(dg2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80764541.lua b/official/c80764541.lua index fa2011d912..71d49b9986 100644 --- a/official/c80764541.lua +++ b/official/c80764541.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c80769747.lua b/official/c80769747.lua index 6306e3412e..559ff6eb73 100644 --- a/official/c80769747.lua +++ b/official/c80769747.lua @@ -43,20 +43,20 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-800) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-800) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end end @@ -80,4 +80,4 @@ end function s.ddesop(e,tp,eg,ep,ev,re,r,rp) local dp,dc=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.DiscardDeck(dp,dc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80773359.lua b/official/c80773359.lua index 6535a15d7f..5f807feb58 100644 --- a/official/c80773359.lua +++ b/official/c80773359.lua @@ -1,5 +1,5 @@ --A BF-神立のオニマル ---Assault Blacwing - Onimaru the Divine Thunder +--Assault Blackwing - Onimaru the Divine Thunder local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -48,10 +48,10 @@ function s.initial_effect(c) e5:SetValue(3000) c:RegisterEffect(e5) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x33) then + if g:IsExists(Card.IsSetCard,1,nil,SET_BLACKWING) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) @@ -67,11 +67,11 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.lvfilter(c,lv) - return c:IsSetCard(0x33) and c:HasLevel() and c:GetLevel()~=lv + return c:IsSetCard(SET_BLACKWING) and c:HasLevel() and c:GetLevel()~=lv end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.lvfilter(chkc,e:GetHandler():GetLevel()) end @@ -87,7 +87,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -100,4 +100,4 @@ function s.condtion(e) local ph=Duel.GetCurrentPhase() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==c and c:GetSummonType()==SUMMON_TYPE_SYNCHRO and #mg>0 and not mg:IsExists(s.mfilter,1,nil) -end +end \ No newline at end of file diff --git a/official/c80776622.lua b/official/c80776622.lua index 21e7c88336..59f033d50f 100644 --- a/official/c80776622.lua +++ b/official/c80776622.lua @@ -1,5 +1,5 @@ --ドドレミコード・クーリア ---Dodoremichord Coeuria +--DoSolfachord Coolia --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -45,9 +45,9 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.sucfilter(c,tp) - return c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsPendulumSummoned() end function s.sucop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.sucfilter,1,nil,tp) then @@ -55,7 +55,7 @@ function s.sucop(e,tp,eg,ep,ev,re,r,rp) end end function s.chainlm(e,rp,tp) - return tp==rp or (e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)) + return tp==rp or (e:IsSpellTrapEffect() and not e:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.spcon(e,c) if c==nil then return true end @@ -98,21 +98,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end end @@ -123,7 +123,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_PZONE,0,nil) local _,sc=g:GetMaxGroup(function(c) return c:GetScale() end) - return sc and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER) and rc:IsAttackBelow(sc*300) + return sc and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsMonsterEffect() and rc:IsAttackBelow(sc*300) and rc:IsOnField() and rc:IsDestructable() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -134,4 +134,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8078366.lua b/official/c8078366.lua index e8835a42f3..ac80a93382 100644 --- a/official/c8078366.lua +++ b/official/c8078366.lua @@ -1,4 +1,5 @@ --海皇の突撃兵 +--Atlantean Attack Squad local s,id=GetID() function s.initial_effect(c) --ayk @@ -12,5 +13,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.atkcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FISH+RACE_SEASERPENT+RACE_AQUA),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FISH|RACE_SEASERPENT|RACE_AQUA),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) +end \ No newline at end of file diff --git a/official/c80794697.lua b/official/c80794697.lua index 7441b22f8c..2d062e1e6f 100644 --- a/official/c80794697.lua +++ b/official/c80794697.lua @@ -1,4 +1,5 @@ --フレイム・バッファロー +--Flame Bufferlo local s,id=GetID() function s.initial_effect(c) --draw @@ -27,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then + if Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_EFFECT|REASON_DISCARD)~=0 then Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80796456.lua b/official/c80796456.lua index d8dc3d4e48..ca3ca83f8b 100644 --- a/official/c80796456.lua +++ b/official/c80796456.lua @@ -1,4 +1,5 @@ --No.70 デッドリー・シン +--Number 70: Malevolent Sin local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,10 +29,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=70 -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end @@ -41,21 +38,21 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,0,1) + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_OPPO_TURN,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and e:GetLabelObject():GetFlagEffect(id)~=0 + return Duel.IsTurnPlayer(1-tp) and e:GetLabelObject():GetFlagEffect(id)~=0 end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) @@ -70,13 +67,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_RANK) e2:SetValue(3) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c80801743.lua b/official/c80801743.lua index f3212dc379..2d8acd4d4e 100644 --- a/official/c80801743.lua +++ b/official/c80801743.lua @@ -1,5 +1,5 @@ --破械雙極 ---Hakai Dual Dirge +--Abominable Chamber of the Unchained --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -27,19 +27,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x130} +s.listed_series={SET_UNCHAINED} function s.spfilter(c,e,tp) - return c:IsSetCard(0x130) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_UNCHAINED) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -60,4 +60,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80802524.lua b/official/c80802524.lua index e1b3361f9a..473f7813a4 100644 --- a/official/c80802524.lua +++ b/official/c80802524.lua @@ -1,4 +1,5 @@ --ゴーストリック・ブレイク +--Ghostrick Break local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,17 +13,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - if rp~=tp and #eg==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE+REASON_EFFECT) - and tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousControler(tp) and tc:IsSetCard(0x8d) and tc:IsPreviousPosition(POS_FACEUP) then + if rp~=tp and #eg==1 and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE|REASON_EFFECT) + and tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousControler(tp) and tc:IsSetCard(SET_GHOSTRICK) and tc:IsPreviousPosition(POS_FACEUP) then e:SetLabel(tc:GetCode()) return true else return false end end function s.filter(c,e,tp,code) - return c:IsSetCard(0x8d) and c:GetCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GHOSTRICK) and c:GetCode()~=code and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp,e:GetLabel()) end @@ -46,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c80811661.lua b/official/c80811661.lua index c5f7d151d5..8428cd0337 100644 --- a/official/c80811661.lua +++ b/official/c80811661.lua @@ -1,5 +1,6 @@ --ハンバーガーのレシピ +--Hamburger Recipe local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,30243636) -end +end \ No newline at end of file diff --git a/official/c80831552.lua b/official/c80831552.lua index d396714208..d64ece71e1 100644 --- a/official/c80831552.lua +++ b/official/c80831552.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetValue(s.efilter) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 @@ -30,11 +30,11 @@ function s.spcon(e,c) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.ecfilter(c) - return c:IsFaceup() and c:IsSetCard(0x11a) and c:IsLinkAbove(3) + return c:IsFaceup() and c:IsSetCard(SET_DINOWRESTLER) and c:IsLinkAbove(3) end function s.econ(e) return Duel.IsExistingMatchingCard(s.ecfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.efilter(e,te) - return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and te:GetHandler():IsLinkBelow(3) -end + return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsMonsterEffect() and te:IsActivated() and te:GetHandler():IsLinkBelow(3) +end \ No newline at end of file diff --git a/official/c80831721.lua b/official/c80831721.lua index c9619534b5..de9ec07341 100644 --- a/official/c80831721.lua +++ b/official/c80831721.lua @@ -1,4 +1,5 @@ --賢者の石-サバティエル +--Sabatiel - The Philosopher's Stone local s,id=GetID() function s.initial_effect(c) --search @@ -24,17 +25,17 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x46,0x10a4} +s.listed_series={SET_FUSION,SET_WINGED_KURIBOH} s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x10a4) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,SET_WINGED_KURIBOH) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) end function s.filter(c) - return c:IsSetCard(0x46) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -71,8 +72,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(matk) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c80839052.lua b/official/c80839052.lua index b5379e3e25..bd4639cbbf 100644 --- a/official/c80839052.lua +++ b/official/c80839052.lua @@ -61,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c8083925.lua b/official/c8083925.lua index 38b1a0e4ee..bc2de444c4 100644 --- a/official/c8083925.lua +++ b/official/c8083925.lua @@ -1,7 +1,6 @@ --Live☆Twin エントランス ---Live☆Twin Entrance +--Live☆Twin Home --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -19,17 +18,17 @@ function s.initial_effect(c) c:RegisterEffect(e1) end --Lists “Kisikil” and "Lilla" archetype -s.listed_series={0x153,0x154} +s.listed_series={SET_KI_SIKIL,SET_LIL_LA} --Specifically lists itself s.listed_names={id} --Discard 1 card as cost function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end --Check “Kisikil” or “Lilla” monster function s.filter(c,e,tp) - return (c:IsSetCard(0x153) or c:IsSetCard(0x154)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return (c:IsSetCard(SET_KI_SIKIL) or c:IsSetCard(SET_LIL_LA)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -52,11 +51,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end --Locked into "Evil★Twin" monsters for extra deck function s.splimit(e,c) - return not c:IsSetCard(0x155) and c:IsLocation(LOCATION_EXTRA) -end + return not c:IsSetCard(SET_EVIL_TWIN) and c:IsLocation(LOCATION_EXTRA) +end \ No newline at end of file diff --git a/official/c80845034.lua b/official/c80845034.lua index e0ef9159f3..6e5afaaff1 100644 --- a/official/c80845034.lua +++ b/official/c80845034.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c8085950.lua b/official/c8085950.lua index 011a87bdd0..e32e64f1d5 100644 --- a/official/c8085950.lua +++ b/official/c8085950.lua @@ -57,4 +57,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80863132.lua b/official/c80863132.lua index 89a69ceb1f..0aa00c3f41 100644 --- a/official/c80863132.lua +++ b/official/c80863132.lua @@ -1,4 +1,5 @@ --無効 +--Muko local s,id=GetID() function s.initial_effect(c) --change effect @@ -23,4 +24,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) if cp<2 then Duel.DiscardDeck(cp,cv,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80870883.lua b/official/c80870883.lua index 806501ae25..b4ebfa7809 100644 --- a/official/c80870883.lua +++ b/official/c80870883.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfRevealCost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1) diff --git a/official/c80885284.lua b/official/c80885284.lua index c86b2200d0..5a9dee9fee 100644 --- a/official/c80885284.lua +++ b/official/c80885284.lua @@ -1,4 +1,5 @@ --ゴーストリック・キョンシー +--Ghostrick Jiangshi local s,id=GetID() function s.initial_effect(c) --summon limit @@ -28,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sfilter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -38,7 +39,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -48,7 +49,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0x8d) and c:IsMonster() and c:IsAbleToHand() + return c:IsLevelBelow(lv) and c:IsSetCard(SET_GHOSTRICK) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -65,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c80885324.lua b/official/c80885324.lua index 0ae2ebb4df..8737ab0267 100644 --- a/official/c80885324.lua +++ b/official/c80885324.lua @@ -1,4 +1,5 @@ --サーチ・ストライカー +--Search Striker local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -33,7 +34,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.poscon(e,tp,eg,ep,ev,re,r,rp) @@ -48,6 +49,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c80887714.lua b/official/c80887714.lua index 460c199e44..00623fb32b 100644 --- a/official/c80887714.lua +++ b/official/c80887714.lua @@ -1,4 +1,5 @@ --ギャラクシー・ストーム +--Galaxy Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c80887952.lua b/official/c80887952.lua index 8c8a417af4..aab2a2e137 100644 --- a/official/c80887952.lua +++ b/official/c80887952.lua @@ -85,11 +85,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c80889750.lua b/official/c80889750.lua index acf65ad063..36cf48ccd2 100644 --- a/official/c80889750.lua +++ b/official/c80889750.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xad)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_FRIGHTFUR)) e3:SetValue(400) c:RegisterEffect(e3) --Cannot be destroyed @@ -32,19 +32,19 @@ function s.initial_effect(c) e4:SetValue(s.valcheck) c:RegisterEffect(e4) end -s.listed_series={0xad} -s.material_setcode={0xa9,0xc3,0xad} +s.listed_series={SET_FRIGHTFUR} +s.material_setcode={SET_FLUFFAL,SET_EDGE_IMP,SET_FRIGHTFUR} function s.mfilter1(c,fc,sumtype,tp) - return c:IsSetCard(0xad,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) + return c:IsSetCard(SET_FRIGHTFUR,fc,sumtype,tp) and c:IsType(TYPE_FUSION,fc,sumtype,tp) end function s.mfilter2(c,fc,sumtype,tp) - return c:IsSetCard(0xa9,fc,sumtype,tp) or c:IsSetCard(0xc3,fc,sumtype,tp) + return c:IsSetCard(SET_FLUFFAL,fc,sumtype,tp) or c:IsSetCard(SET_EDGE_IMP,fc,sumtype,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (e:GetHandler():GetSummonType()&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.spfilter(c,e,tp) - return c:IsSetCard(0xad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FRIGHTFUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -67,7 +67,7 @@ function s.valcheck(e,c) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) e1:SetCondition(s.indcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetDescription(aux.Stringid(id,1)) @@ -77,5 +77,5 @@ function s.valcheck(e,c) end end function s.indcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) -end + return e:GetHandler():IsFusionSummoned() +end \ No newline at end of file diff --git a/official/c80893872.lua b/official/c80893872.lua index f3a15d26c7..c5ab7aabd5 100644 --- a/official/c80893872.lua +++ b/official/c80893872.lua @@ -1,9 +1,9 @@ --- ロイヤル・ペンギンズ・ガーデン --- Royal Penguins Garden --- Scripted by Hatter +--ロイヤル・ペンギンズ・ガーデン +--Royal Penguins Garden +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetOperation(s.activate) c:RegisterEffect(e1) - -- Reduce level then discard + --Reduce level then discard local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_LVCHANGE+CATEGORY_HANDES) e2:SetType(EFFECT_TYPE_IGNITION) @@ -55,7 +55,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) end - -- Reduce level + --Reduce level local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) diff --git a/official/c80896940.lua b/official/c80896940.lua index fe6e48f85b..036ef7b2f4 100644 --- a/official/c80896940.lua +++ b/official/c80896940.lua @@ -1,4 +1,5 @@ --涅槃の超魔導剣士 +--Nirvana High Paladin local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -61,7 +62,7 @@ function s.initial_effect(c) end s.synchro_nt_required=1 function s.matfilter(c,scard,sumtype,tp) - return c:IsType(TYPE_PENDULUM,scard,sumtype,tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsType(TYPE_PENDULUM,scard,sumtype,tp) and c:IsPendulumSummoned() end function s.indcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -73,13 +74,13 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -96,12 +97,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==1 end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end @@ -118,7 +119,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.mfilter(c,sc) return c:IsType(TYPE_PENDULUM,sc,SUMMON_TYPE_SYNCHRO) and c:IsType(TYPE_TUNER,sc,SUMMON_TYPE_SYNCHRO) - and c:IsSummonType(SUMMON_TYPE_PENDULUM) + and c:IsPendulumSummoned() end function s.valcheck(e,c) local g=c:GetMaterial() diff --git a/official/c80908502.lua b/official/c80908502.lua index 90ffb0f6b4..a9ac2ca41a 100644 --- a/official/c80908502.lua +++ b/official/c80908502.lua @@ -1,4 +1,5 @@ --E・HERO キャプテン・ゴールド +--Elemental HERO Captain Gold local s,id=GetID() function s.initial_effect(c) --search @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,11 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={63035430} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsCode(63035430) and c:IsAbleToHand() end @@ -42,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.descon(e) return not Duel.IsEnvironment(63035430) -end +end \ No newline at end of file diff --git a/official/c8091563.lua b/official/c8091563.lua index 1e20bceb0f..953b8c06e3 100644 --- a/official/c8091563.lua +++ b/official/c8091563.lua @@ -1,4 +1,5 @@ --SDロボ・ライオ +--Super Defense Robot Lio local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,7 +26,7 @@ function s.initial_effect(c) end s.listed_names={71071546} function s.filter(c,e,tp) - return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_SUPER_DEFENSE_ROBOT) or c:IsCode(71071546)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -42,7 +43,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return #eg==1 and (tc:IsSetCard(0x85) or tc:IsCode(71071546)) + return #eg==1 and (tc:IsSetCard(SET_SUPER_DEFENSE_ROBOT) or tc:IsCode(71071546)) and tc:IsControler(tp) and tc:IsPreviousControler(tp) and tc:IsPreviousLocation(LOCATION_GRAVE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -56,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c80921533.lua b/official/c80921533.lua index 1678cedab1..8fe962dc00 100644 --- a/official/c80921533.lua +++ b/official/c80921533.lua @@ -50,4 +50,4 @@ function s.sumeffop(e,tp,eg,ep,ev,re,r,rp) if sc then Duel.SummonOrSet(tp,sc,false,se) end -end +end \ No newline at end of file diff --git a/official/c80925836.lua b/official/c80925836.lua index 0816b3d294..7285626887 100644 --- a/official/c80925836.lua +++ b/official/c80925836.lua @@ -1,4 +1,5 @@ --コアキメイル・デビル +--Koa'ki Meiru Doom local s,id=GetID() function s.initial_effect(c) --cost @@ -21,7 +22,7 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -62,8 +63,8 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - if (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and re:IsActiveType(TYPE_MONSTER) + if (Duel.IsMainPhase()) and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c80949182.lua b/official/c80949182.lua index 0922b3991e..8a6ad324f5 100644 --- a/official/c80949182.lua +++ b/official/c80949182.lua @@ -1,6 +1,5 @@ --B・F-降魔弓のハマ ---Battlewasp – Hama the Conquering Bow - +--Battlewasp - Hama the Conquering Bow local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -39,7 +38,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,{id,1}) e4:SetCondition(s.damcon) @@ -62,8 +61,7 @@ function s.initial_effect(c) Duel.RegisterEffect(ge2,0) end) end -s.listed_series={0x12f} - +s.listed_series={SET_BATTLEWASP} function s.valcheck(e,c) local g=c:GetMaterial() if g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) then @@ -73,7 +71,7 @@ function s.valcheck(e,c) end end function s.tncon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 + return e:GetHandler():IsSynchroSummoned() and e:GetLabel()==1 end function s.tnop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -84,7 +82,7 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.atcon(e,tp,eg,ep,ev,re,r,rp) @@ -100,7 +98,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1000) sc:RegisterEffect(e1) local e2=e1:Clone() @@ -109,10 +107,10 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.GetTurnPlayer()==tp and s[0] + return Duel.IsTurnPlayer(tp) and s[0] end function s.filter(c) - return c:IsSetCard(0x12f) and c:IsMonster() + return c:IsSetCard(SET_BATTLEWASP) and c:IsMonster() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end diff --git a/official/c80955168.lua b/official/c80955168.lua index 8131b00546..ed6c95eab6 100644 --- a/official/c80955168.lua +++ b/official/c80955168.lua @@ -1,4 +1,5 @@ --王墓の罠 +--Trap of the Imperial Tomb local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c80959027.lua b/official/c80959027.lua index c1f7f6e42a..a6ec42373b 100644 --- a/official/c80959027.lua +++ b/official/c80959027.lua @@ -1,5 +1,5 @@ --魔導獣 バジリスク ---Mythical Beast Basilisk +--Mythical Beast Bashilisk local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -44,7 +44,7 @@ function s.initial_effect(c) end s.listed_names={id} s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x10d} +s.listed_series={SET_MYTHICAL_BEAST} function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0) == 1 end @@ -73,12 +73,12 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10d) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MYTHICAL_BEAST) and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -86,15 +86,14 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveCounter(tp,1,0,COUNTER_SPELL,3,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_PZONE+LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_PZONE+LOCATION_EXTRA) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_PZONE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_PZONE|LOCATION_EXTRA) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_PZONE+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_PZONE|LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c80965043.lua b/official/c80965043.lua index d7a88a7955..8585cbf2e1 100644 --- a/official/c80965043.lua +++ b/official/c80965043.lua @@ -1,7 +1,6 @@ --斬機アディオン --Mathmech Addition --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -32,7 +31,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_FIELD) e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) e0:SetDescription(aux.Stringid(id,1)) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) @@ -45,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) --Cannot attack this turn @@ -54,7 +53,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end diff --git a/official/c80978111.lua b/official/c80978111.lua index ac555a6034..5106b50fff 100644 --- a/official/c80978111.lua +++ b/official/c80978111.lua @@ -1,4 +1,5 @@ --飛翔するG +--Flying "C" local s,id=GetID() function s.initial_effect(c) --spsummon @@ -41,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,tp,sumtp,sumpos) return (sumtp&SUMMON_TYPE_XYZ)==SUMMON_TYPE_XYZ -end +end \ No newline at end of file diff --git a/official/c80987696.lua b/official/c80987696.lua index c64453f495..5f8d4e9079 100644 --- a/official/c80987696.lua +++ b/official/c80987696.lua @@ -1,4 +1,5 @@ --時の機械-タイム・マシーン +--Time Machine local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tc:GetPreviousControler(),false,false,tc:GetPreviousPosition()) end -end +end \ No newline at end of file diff --git a/official/c80993256.lua b/official/c80993256.lua index 65978c4cae..dc041d8c64 100644 --- a/official/c80993256.lua +++ b/official/c80993256.lua @@ -1,5 +1,5 @@ --亜種羅王 ---Subspecies King Asura-Oh +--Ashura King --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) e3:SetCondition(s.negcond) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.negtg) e3:SetOperation(s.negop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -47,14 +47,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.negcond(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() return re:GetHandler()~=c and not c:IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c81003500.lua b/official/c81003500.lua index a961df4e6e..876771f854 100644 --- a/official/c81003500.lua +++ b/official/c81003500.lua @@ -46,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,1-tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c81019803.lua b/official/c81019803.lua index b1e4b368f5..cd99bf1421 100644 --- a/official/c81019803.lua +++ b/official/c81019803.lua @@ -1,5 +1,5 @@ --うきうきメルフィーズ ---Cheerful Melffys +--Merry Melffys --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -38,7 +38,7 @@ function s.initial_effect(c) e4:SetCondition(s.tedcond2) c:RegisterEffect(e4) end -s.listed_series={0x147} +s.listed_series={SET_MELFFY} function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsFaceup,Card.IsAbleToHand),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -64,7 +64,7 @@ function s.tedtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) end function s.spfilter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0x147) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_MELFFY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.tedop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c81020140.lua b/official/c81020140.lua index 82185644e3..04e6b71e70 100644 --- a/official/c81020140.lua +++ b/official/c81020140.lua @@ -1,4 +1,5 @@ --ヴォルカニック・リボルバー +--Volcanic Blaster local s,id=GetID() function s.initial_effect(c) --search @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x32} +s.listed_series={SET_VOLCANIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c) - return c:IsSetCard(0x32) and c:IsMonster() + return c:IsSetCard(SET_VOLCANIC) and c:IsMonster() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(g:GetFirst(),0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c81020646.lua b/official/c81020646.lua index 6096814d35..3535f72da2 100644 --- a/official/c81020646.lua +++ b/official/c81020646.lua @@ -35,4 +35,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8102334.lua b/official/c8102334.lua index a440427068..002527efba 100644 --- a/official/c8102334.lua +++ b/official/c8102334.lua @@ -1,4 +1,5 @@ --ゲート・ブロッカー +--Gate Blocker local s,id=GetID() function s.initial_effect(c) --disable @@ -46,4 +47,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.tglimit(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c81028112.lua b/official/c81028112.lua index cdcb303750..d7cf65143d 100644 --- a/official/c81028112.lua +++ b/official/c81028112.lua @@ -1,4 +1,5 @@ --エレキック・ファイター +--Wattsychic Fighter local s,id=GetID() function s.initial_effect(c) --to deck @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local opt=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) Duel.SendtoDeck(tc,nil,opt,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81034083.lua b/official/c81034083.lua index ac4f9b88d9..74aa9b4573 100644 --- a/official/c81034083.lua +++ b/official/c81034083.lua @@ -38,4 +38,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81055000.lua b/official/c81055000.lua index 18c71b8e92..9ba42cff6f 100644 --- a/official/c81055000.lua +++ b/official/c81055000.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop2) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -48,7 +48,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetLabelObject(tc) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c81057455.lua b/official/c81057455.lua index 1efa4adca8..b447a086e3 100644 --- a/official/c81057455.lua +++ b/official/c81057455.lua @@ -2,8 +2,8 @@ --Kaiju Capture Mission local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x37) - c:SetCounterLimit(0x37,3) + c:EnableCounterPermit(COUNTER_KAIJU) + c:SetCounterLimit(COUNTER_KAIJU,3) --activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -35,13 +35,13 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.counter_place_list={0x37} -s.listed_series={0xd3} +s.counter_place_list={COUNTER_KAIJU} +s.listed_series={SET_KAIJU} function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetCounter(0x37)<3 + return e:GetHandler():GetCounter(COUNTER_KAIJU)<3 end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xd3) and c:IsCanTurnSet() + return c:IsFaceup() and c:IsSetCard(SET_KAIJU) and c:IsCanTurnSet() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -54,12 +54,12 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)~=0 then - e:GetHandler():AddCounter(0x37,1) + e:GetHandler():AddCounter(COUNTER_KAIJU,1) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousControler(tp) and rp==1-tp and (r&0x41)==0x41 + return c:IsPreviousControler(tp) and rp==1-tp and (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end @@ -70,4 +70,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81059524.lua b/official/c81059524.lua index 9b145fa3ff..f30b31c4fd 100644 --- a/official/c81059524.lua +++ b/official/c81059524.lua @@ -1,4 +1,5 @@ --デス・ヴォルストガルフ +--Des Volstgalph local s,id=GetID() function s.initial_effect(c) --damage @@ -52,6 +53,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c81066751.lua b/official/c81066751.lua index 71d589aa7c..9b2fa87344 100644 --- a/official/c81066751.lua +++ b/official/c81066751.lua @@ -19,7 +19,7 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return false end if not Duel.IsChainNegatable(ev) then return false end - return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81078880.lua b/official/c81078880.lua index e70ae2abd0..83a3ded7ec 100644 --- a/official/c81078880.lua +++ b/official/c81078880.lua @@ -1,7 +1,6 @@ --Live☆Twin リィラ・トリート ---Live☆Twin Lilla Treat +--Live☆Twin Lil-la Treat --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -22,22 +21,21 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.condition) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x153,0x155} - +s.listed_series={SET_KI_SIKIL,SET_EVIL_TWIN} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x153),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_KI_SIKIL),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return (Duel.GetBattleDamage(tp)>0 or Duel.GetBattleDamage(1-tp)) and (tc:IsSetCard(0x155) or (at and at:IsSetCard(0x155))) + return (Duel.GetBattleDamage(tp)>0 or Duel.GetBattleDamage(1-tp)) and (tc:IsSetCard(SET_EVIL_TWIN) or (at and at:IsSetCard(SET_EVIL_TWIN))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -57,7 +55,7 @@ local c=e:GetHandler() else e1:SetValue(-Duel.GetBattleDamage(1-tp)) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c81096431.lua b/official/c81096431.lua index d65c8ee54e..e77c3d3128 100644 --- a/official/c81096431.lua +++ b/official/c81096431.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) e3:SetCondition(function(e) return e:GetHandler():IsSetCard(SET_SHARK_DRAKE) end) - e3:SetCost(aux.dxmcostgen(2,2,nil)) + e3:SetCost(Cost.Detach(2,2,nil)) e3:SetTarget(s.attachtg) e3:SetOperation(s.attachop) c:RegisterEffect(e3) diff --git a/official/c81105204.lua b/official/c81105204.lua index 97e708170d..19a82d91df 100644 --- a/official/c81105204.lua +++ b/official/c81105204.lua @@ -21,10 +21,10 @@ function s.initial_effect(c) e2:SetValue(s.valcon) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} s.listed_names={id} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and not c:IsCode(id) end function s.spcon(e,c) if c==nil then return true end @@ -32,5 +32,5 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.valcon(e,re,r,rp) - return (r&REASON_EFFECT)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end + return (r&REASON_EFFECT)~=0 and re:IsSpellTrapEffect() +end \ No newline at end of file diff --git a/official/c81108658.lua b/official/c81108658.lua index 8848c8edd5..2842b2904d 100644 --- a/official/c81108658.lua +++ b/official/c81108658.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} --Banish function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x165) + return c:IsFaceup() and c:IsSetCard(SET_URSARCTIC) end function s.bfilter(c) return c:IsAbleToRemove() @@ -38,8 +38,8 @@ function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,tp,LOCATION_GRAVE) end function s.banop(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81109178.lua b/official/c81109178.lua index 5a87012303..046bb54878 100644 --- a/official/c81109178.lua +++ b/official/c81109178.lua @@ -1,4 +1,5 @@ --ファイヤークラッカー +--Fire Cracker local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x42) @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.damcost1) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.damtg1) e1:SetOperation(s.damop1) c:RegisterEffect(e1) @@ -35,10 +36,6 @@ function s.initial_effect(c) e3:SetOperation(s.damop2) c:RegisterEffect(e3) end -function s.damcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -53,10 +50,10 @@ function s.damop1(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_DP) e1:SetTargetRange(1,0) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_DRAW) then + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN) end Duel.RegisterEffect(e1,tp) end @@ -81,4 +78,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) if c:RemoveCounter(tp,0x42,ct,REASON_EFFECT) then Duel.Damage(p,ct*300,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81119816.lua b/official/c81119816.lua index 5b8ba967d8..ab520aa2dd 100644 --- a/official/c81119816.lua +++ b/official/c81119816.lua @@ -1,5 +1,5 @@ --- プランキッズ・パルス --- Prank-Kids Fansies +--プランキッズ・パルス +--Prank-Kids Fansies local s,id=GetID() function s.initial_effect(c) --indes @@ -14,27 +14,27 @@ function s.initial_effect(c) e1:SetOperation(s.tgop) c:RegisterEffect(e1) end -s.listed_series={0x120} +s.listed_series={SET_PRANK_KIDS} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() - return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(0x120) and r & REASON_FUSION+REASON_LINK ~=0 + return c:IsLocation(LOCATION_GRAVE) and rc:IsSetCard(SET_PRANK_KIDS) and r & REASON_FUSION+REASON_LINK ~=0 end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.tgfilter(c) - return c:IsSetCard(0x120) and c:IsAbleToGrave() and not c:IsCode(id) + return c:IsSetCard(SET_PRANK_KIDS) and c:IsAbleToGrave() and not c:IsCode(id) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x120) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_PRANK_KIDS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,g:GetFirst(),e,tp) + local g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,g:GetFirst(),e,tp) if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) and #g2>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -43,5 +43,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local sg=g2:Select(tp,1,1,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c81122844.lua b/official/c81122844.lua index 7c28ef64aa..6c0cf8f61a 100644 --- a/official/c81122844.lua +++ b/official/c81122844.lua @@ -1,4 +1,5 @@ --発条空母ゼンマイティ +--Wind-Up Carrier Zenmaity local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -24,35 +25,31 @@ function s.initial_effect(c) e2:SetCode(EVENT_TO_GRAVE) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.thcon) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x58} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_WIND_UP} function s.spfilter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WIND_UP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.tgfilter(c,e,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(tp) - and c:IsReason(REASON_DESTROY) and c:IsSetCard(0x58) and c:IsMonster() and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) + and c:IsReason(REASON_DESTROY) and c:IsSetCard(SET_WIND_UP) and c:IsMonster() and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.tgfilter,1,nil,e,tp) @@ -71,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c81128478.lua b/official/c81128478.lua index 3859efb035..11a8af5d35 100644 --- a/official/c81128478.lua +++ b/official/c81128478.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81167171.lua b/official/c81167171.lua index b77fa59373..13e9f68b00 100644 --- a/official/c81167171.lua +++ b/official/c81167171.lua @@ -1,4 +1,5 @@ --ヒーロースピリッツ +--Hero Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,26 +27,26 @@ end function s.checkop1(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - if tc:IsPreviousSetCard(0x3008) then + if tc:IsPreviousSetCard(SET_ELEMENTAL_HERO) then s[tc:GetPreviousControler()]=true end end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return s[tp] and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return s[tp] and Duel.IsBattlePhase() end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_NO_BATTLE_DAMAGE) e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e2:SetReset(RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c81171949.lua b/official/c81171949.lua index 9c28089389..12226f7ab4 100644 --- a/official/c81171949.lua +++ b/official/c81171949.lua @@ -29,7 +29,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then c:CancelToGrave() - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c811734.lua b/official/c811734.lua index 6cb8c038c0..2b7b3d1807 100644 --- a/official/c811734.lua +++ b/official/c811734.lua @@ -11,18 +11,18 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10af,0xaf} +s.listed_series={SET_DDD,SET_DD} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end function s.atkfilter(c) - return c:IsSetCard(0x10af) and c:GetAttack()>0 and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_DDD) and c:GetAttack()>0 and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.thfilter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsLevelBelow(4) and c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + local b1=Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return b1 or b2 end local op=0 @@ -36,7 +36,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(op) if op==0 then e:SetCategory(CATEGORY_REMOVE) - if Duel.IsPlayerAffectedByEffect(tp,69832741) then + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE) else Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) @@ -49,7 +49,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) if e:GetLabel()==0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) if #g==0 then return end local atk=g:GetFirst():GetAttack() local tc=Duel.GetAttacker() @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end else @@ -69,4 +69,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c81191584.lua b/official/c81191584.lua index ad54427b32..3efb0a5015 100644 --- a/official/c81191584.lua +++ b/official/c81191584.lua @@ -1,4 +1,5 @@ --悪夢再び +--Recurring Nightmare local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81192859.lua b/official/c81192859.lua index cf5e414549..0e280bc501 100644 --- a/official/c81192859.lua +++ b/official/c81192859.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetOperation(s.pop) c:RegisterEffect(e3) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} --Pop on attack function s.descon(e,tp,eg,ep,ev,re,r,rp) local a,at=Duel.GetAttacker(),Duel.GetAttackTarget() if a:IsControler(1-tp) then a,at=at,a end - return a and at and a:IsSetCard(0x173) and a:IsFaceup() and at:IsControler(1-tp) + return a and at and a:IsSetCard(SET_PUNK) and a:IsFaceup() and at:IsControler(1-tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -62,8 +62,8 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x173)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_PUNK)) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c81193865.lua b/official/c81193865.lua index 07b87c173c..3cbea8f096 100644 --- a/official/c81193865.lua +++ b/official/c81193865.lua @@ -54,12 +54,12 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x1093} +s.listed_series={SET_CYBER_DRAGON} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 then s[ep]=s[ep]+1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.eqlimit(e,c) @@ -83,13 +83,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.actcon(e) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()==e:GetHandler():GetControler() and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.GetTurnPlayer()==e:GetHandler():GetControler() and Duel.IsBattlePhase() end function s.cacon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() and Duel.GetAttackTarget()~=nil end function s.cafilter(c) - return c:IsSetCard(0x1093) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_CYBER_DRAGON) and c:IsAbleToRemoveAsCost() end function s.cacost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -102,7 +102,7 @@ function s.cacost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(c:GetEquipTarget():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.cafilter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -123,6 +123,6 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE|PHASE_DAMAGE_CAL) ec:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c81197327.lua b/official/c81197327.lua index cb6b4b72b9..c9fd702e8e 100644 --- a/official/c81197327.lua +++ b/official/c81197327.lua @@ -1,4 +1,5 @@ --E・HERO スチーム・ヒーラー +--Elemental HERO Steam Healer local s,id=GetID() function s.initial_effect(c) --fusion material @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.recop) c:RegisterEffect(e2) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.reccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -42,4 +43,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81210420.lua b/official/c81210420.lua index fc23a15c42..1a84e05304 100644 --- a/official/c81210420.lua +++ b/official/c81210420.lua @@ -7,20 +7,20 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp and Duel.IsBattlePhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() end function s.filter(c) return c:GetSequence()<5 and not c:IsType(TYPE_TOKEN+TYPE_LINK) end function s.spfilter(c,e,tp) - return c:IsSpellTrap() and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,0x11,0,0,0,0,0,POS_FACEDOWN) + return c:IsSpellTrap() and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),nil,TYPE_MONSTER|TYPE_NORMAL,0,0,0,0,0,POS_FACEDOWN) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) @@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_NORMAL+TYPE_MONSTER) - e1:SetReset(RESET_EVENT+0x47c0000) + e1:SetReset(RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY) tg:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_REMOVE_RACE) @@ -72,7 +72,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetCode(EFFECT_SET_BASE_DEFENSE) e5:SetValue(0) tg:RegisterEffect(e5,true) - tg:RegisterFlagEffect(id,RESET_EVENT+0x47c0000+RESET_PHASE+PHASE_BATTLE,0,1,fid) + tg:RegisterFlagEffect(id,RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_OVERLAY|RESET_PHASE|PHASE_BATTLE,0,1,fid) tg:SetStatus(STATUS_NO_LEVEL,true) end Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) @@ -83,8 +83,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) sg:KeepAlive() local de=Effect.CreateEffect(e:GetHandler()) de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - de:SetCode(EVENT_PHASE+PHASE_BATTLE) - de:SetReset(RESET_PHASE+PHASE_BATTLE) + de:SetCode(EVENT_PHASE|PHASE_BATTLE) + de:SetReset(RESET_PHASE|PHASE_BATTLE) de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) de:SetCountLimit(1) de:SetLabel(fid) @@ -103,4 +103,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tg,REASON_EFFECT) local tg2=tg:Filter(s.desfilter,nil,fid) Duel.SendtoGrave(tg2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81218874.lua b/official/c81218874.lua index 52c37794cd..00068e5ecb 100644 --- a/official/c81218874.lua +++ b/official/c81218874.lua @@ -1,4 +1,5 @@ --侵略の波紋 +--Infestation Ripples local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,18 +9,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x100a} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end +s.listed_series={SET_STEELSWARM} function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x100a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_STEELSWARM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -34,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81223446.lua b/official/c81223446.lua index 8f2cc1ec84..b75dd1dd77 100644 --- a/official/c81223446.lua +++ b/official/c81223446.lua @@ -10,7 +10,7 @@ function s.matfilter(c,e,tp,check_or_run) return aux.SpElimFilter(c) and c:IsAbleToRemove(tp,POS_FACEDOWN) end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end return nil @@ -27,7 +27,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end end diff --git a/official/c81231742.lua b/official/c81231742.lua index 7dc1b591b2..fa9fedc948 100644 --- a/official/c81231742.lua +++ b/official/c81231742.lua @@ -1,4 +1,5 @@ --破邪の魔法壁 +--Sorcerous Spell Wall local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.atkcon(e) end function s.defcon(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c81254059.lua b/official/c81254059.lua index 052b786a18..f30027939d 100644 --- a/official/c81254059.lua +++ b/official/c81254059.lua @@ -16,17 +16,17 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x3e} +s.listed_series={SET_WORM} function s.otfilter(c,tp) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup()) end function s.costfilter(c,e,tp,ft) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetLevel()) end function s.spfilter(c,e,tp,lv) - return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and c:IsLevelBelow(lv) + return c:IsSetCard(SET_WORM) and c:IsRace(RACE_REPTILE) and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel()) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c81260679.lua b/official/c81260679.lua index 0a5f7a7d7d..33378faa09 100644 --- a/official/c81260679.lua +++ b/official/c81260679.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_HAND) e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfRevealCost) + e3:SetCost(Cost.SelfReveal) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -81,4 +81,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Equip(tp,ec,tc) end -end +end \ No newline at end of file diff --git a/official/c81263643.lua b/official/c81263643.lua index f87c8d9c40..068affea11 100644 --- a/official/c81263643.lua +++ b/official/c81263643.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) end function s.cfilter(c,tp) if not c:IsDiscardable() then return false end - local ty=c:GetType() & (TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) + local ty=c:GetMainCardType() local log=math.log(ty)/math.log(2) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,2 ^ ((log+2) % 3)) end @@ -31,10 +31,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp) - local ty=g:GetFirst():GetType() & (TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) + local ty=g:GetFirst():GetMainCardType() local log=math.log(ty)/math.log(2) e:SetLabel(2 ^ ((log+2) % 3)) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81269231.lua b/official/c81269231.lua index c8d6474fa9..ac2e0b2027 100644 --- a/official/c81269231.lua +++ b/official/c81269231.lua @@ -28,19 +28,19 @@ function s.initial_effect(c) e3:SetCondition(s.actcon) c:RegisterEffect(e3) end -s.listed_series={0x7,0x51} +s.listed_series={SET_ANCIENT_GEAR,SET_GADGET} function s.valcheck(e,c) local g=c:GetMaterial() local flag=0 local tc=g:GetFirst() for tc in aux.Next(g) do - if tc:IsSetCard(0x7) then flag=(flag|0x1) end - if tc:IsSetCard(0x51) then flag=(flag|0x2) end + if tc:IsSetCard(SET_ANCIENT_GEAR) then flag=(flag|SET_ALLY_OF_JUSTICE) end + if tc:IsSetCard(SET_GADGET) then flag=(flag|SET_GENEX) end end e:SetLabel(flag) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local flag=e:GetLabelObject():GetLabel() @@ -50,7 +50,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_BATTLED) e1:SetOperation(s.atkregop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x2)~=0 then @@ -58,7 +58,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end end @@ -72,7 +72,7 @@ function s.atkregop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.rmcon) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) @@ -93,10 +93,10 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end end function s.aclimit(e,re,tp) - return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) + return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect()) end function s.actcon(e) local tp=e:GetHandlerPlayer() local a=Duel.GetAttacker() - return a and a:IsSetCard(0x7) and a:IsControler(tp) + return a and a:IsSetCard(SET_ANCIENT_GEAR) and a:IsControler(tp) end \ No newline at end of file diff --git a/official/c81275020.lua b/official/c81275020.lua index ced9882cad..b7e0d8a504 100644 --- a/official/c81275020.lua +++ b/official/c81275020.lua @@ -1,4 +1,5 @@ --SRベイゴマックス +--Speedroid Terrortop local s,id=GetID() function s.initial_effect(c) --special summon @@ -24,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} s.listed_names={id} function s.spcon(e,c) if c==nil then return true end @@ -32,7 +33,7 @@ function s.spcon(e,c) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.thfilter(c) - return c:IsSetCard(0x2016) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -45,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81278754.lua b/official/c81278754.lua index cde76828a6..59076627b1 100644 --- a/official/c81278754.lua +++ b/official/c81278754.lua @@ -1,4 +1,5 @@ --裏ガエル +--Flip Flop Frog local s,id=GetID() function s.initial_effect(c) --turn set @@ -21,11 +22,11 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -35,15 +36,15 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x12),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_FROG),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) end function s.retop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x12),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_FROG),tp,LOCATION_MZONE,0,nil) if ct==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,ct,nil) Duel.HintSelection(g) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8129306.lua b/official/c8129306.lua index af79a2f93d..511340763d 100644 --- a/official/c8129306.lua +++ b/official/c8129306.lua @@ -61,7 +61,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c81306186.lua b/official/c81306186.lua index 297cdce87f..9eddcc0a82 100644 --- a/official/c81306186.lua +++ b/official/c81306186.lua @@ -36,7 +36,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) e:SetLabelObject(tc) end end @@ -51,12 +51,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if not tc or tc:IsFacedown() or tc:GetFlagEffect(id)==0 then return false end local b1=tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) - and Duel.IsExistingMatchingCard(s.relfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,tc,e,tp,tc,ft) + and Duel.IsExistingMatchingCard(s.relfilter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,tc,e,tp,tc,ft) local b2=tc:IsAbleToHand() return b1 or b2 end local b1=tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) - and Duel.IsExistingMatchingCard(s.relfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,tc,e,tp,tc,ft) + and Duel.IsExistingMatchingCard(s.relfilter,tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,tc,e,tp,tc,ft) local b2=tc:IsAbleToHand() local sel=0 if b1 and b2 then @@ -96,11 +96,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not rc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.relfilter),tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,1,rc,e,tp,rc,ft):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.relfilter),tp,LOCATION_MZONE|LOCATION_HAND|LOCATION_GRAVE,0,1,1,rc,e,tp,rc,ft):GetFirst() if tc then rc:SetMaterial(Group.FromCards(tc)) if tc:IsLocation(LOCATION_GRAVE) then - if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)==0 then return end + if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)==0 then return end else if Duel.Release(tc,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)==0 then return end end diff --git a/official/c81306586.lua b/official/c81306586.lua index b9afac336c..2d9b998862 100644 --- a/official/c81306586.lua +++ b/official/c81306586.lua @@ -1,4 +1,5 @@ --ペンギン・ナイトメア +--Nightmare Penguin local s,id=GetID() function s.initial_effect(c) --return @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8131171.lua b/official/c8131171.lua index d0c794b31b..f59bf0244b 100644 --- a/official/c8131171.lua +++ b/official/c8131171.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(tp) end) @@ -34,18 +34,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end function s.rmfilter(c) return c:IsCode(id) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) + return Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) if #g==0 then return end Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c81321206.lua b/official/c81321206.lua index e118185d16..a61200745f 100644 --- a/official/c81321206.lua +++ b/official/c81321206.lua @@ -1,5 +1,5 @@ --ベアルクティ-ミクビリス ---Ursarctic Micbilis +--Ursarctic Mikbilis local s,id=GetID() function s.initial_effect(c) --special summon @@ -16,9 +16,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x165} +s.listed_series={SET_URSARCTIC} function s.spfilter(c,e,tp) - return c:IsSetCard(0x165) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_URSARCTIC) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81325903.lua b/official/c81325903.lua index c7ec85d120..72331ef626 100644 --- a/official/c81325903.lua +++ b/official/c81325903.lua @@ -1,4 +1,5 @@ --アマゾネスの呪詛師 +--Amazoness Spellcaster local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x4),tp,LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_AMAZONESS),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x4),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_AMAZONESS),tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) end @@ -32,13 +33,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(atk2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc1:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_ATTACK) e2:SetValue(atk1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc2:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c81330115.lua b/official/c81330115.lua index e71b9f8369..1136be5ca6 100644 --- a/official/c81330115.lua +++ b/official/c81330115.lua @@ -1,4 +1,5 @@ --No.30 破滅のアシッド・ゴーレム +--Number 30: Acid Golem of Destruction local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.rmcon) @@ -36,7 +37,7 @@ function s.atcon(e) return e:GetHandler():GetOverlayCount()==0 end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -50,4 +51,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) else Duel.Damage(tp,2000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81332143.lua b/official/c81332143.lua index 5d4c650a67..38f33d4316 100644 --- a/official/c81332143.lua +++ b/official/c81332143.lua @@ -1,4 +1,5 @@ --友情 YU-JYO +--Yu-Jo Friendship local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(tp,lp) Duel.SetLP(1-tp,lp) end -end +end \ No newline at end of file diff --git a/official/c81336148.lua b/official/c81336148.lua index bbc326e20d..75c96e7bdd 100644 --- a/official/c81336148.lua +++ b/official/c81336148.lua @@ -1,4 +1,5 @@ --ソード・マスター +--Sword Master local s,id=GetID() function s.initial_effect(c) --spsummon @@ -21,7 +22,7 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return d and Duel.GetTurnPlayer()==tp and a:IsRace(RACE_WARRIOR) and (d:IsRelateToBattle() or not d:IsReason(REASON_BATTLE)) + return d and Duel.IsTurnPlayer(tp) and a:IsRace(RACE_WARRIOR) and (d:IsRelateToBattle() or not d:IsReason(REASON_BATTLE)) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c81344070.lua b/official/c81344070.lua index b9f269b696..8639af50c8 100644 --- a/official/c81344070.lua +++ b/official/c81344070.lua @@ -1,7 +1,6 @@ --海造賊-金髪の訓練生 --Goldenhair, the Newest Plunder Patroll --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -27,16 +26,15 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.spcfilter(c,tp) - return c:IsSetCard(0x13f) and c:IsOriginalType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsOriginalType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and Duel.GetMZoneCount(tp,c)>0 end function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp) + local tc=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp) Duel.SendtoGrave(tc,REASON_COST) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,7 +48,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -68,9 +66,9 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x13f) + return not c:IsSetCard(SET_PLUNDER_PATROLL) end \ No newline at end of file diff --git a/official/c81344637.lua b/official/c81344637.lua index 317b5bfd83..76594c118c 100644 --- a/official/c81344637.lua +++ b/official/c81344637.lua @@ -1,5 +1,5 @@ --呪眼の眷属 バジリウス ---Basilius, Retainer of the Evil Eye +--Basilius, Familiar of the Evil Eye --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -23,15 +23,15 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x129),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_EVIL_EYE),tp,LOCATION_MZONE,0,1,nil) end function s.tgfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x129) and c:IsAbleToGrave() + return c:IsSpellTrap() and c:IsSetCard(SET_EVIL_EYE) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -43,4 +43,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81354330.lua b/official/c81354330.lua index 087c66c057..ad8d04e865 100644 --- a/official/c81354330.lua +++ b/official/c81354330.lua @@ -1,4 +1,5 @@ --朱雀の召喚士 +--Red Sparrow Summoner local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c81380218.lua b/official/c81380218.lua index f83b9a4478..d0988522b1 100644 --- a/official/c81380218.lua +++ b/official/c81380218.lua @@ -1,4 +1,5 @@ --聖域の歌声 +--Chorus of Sanctuary local s,id=GetID() function s.initial_effect(c) --activate @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetTarget(aux.TargetBoolFunction(Card.IsDefensePos)) e2:SetValue(500) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c81383947.lua b/official/c81383947.lua index b0b1993f81..ead1c4d37f 100644 --- a/official/c81383947.lua +++ b/official/c81383947.lua @@ -1,4 +1,5 @@ --白魔導士ピケル +--White Magician Pikeru local s,id=GetID() function s.initial_effect(c) --recover @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) Duel.Recover(p,ct*400,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81384993.lua b/official/c81384993.lua index baac00359d..9b3d745c70 100644 --- a/official/c81384993.lua +++ b/official/c81384993.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x23} +s.listed_series={SET_MALEFIC} function s.filter(c,e,tp) - return c:IsSetCard(0x23) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_MALEFIC) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -33,15 +33,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END) @@ -67,4 +67,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81385346.lua b/official/c81385346.lua index 137aa53047..ea52f60cba 100644 --- a/official/c81385346.lua +++ b/official/c81385346.lua @@ -1,4 +1,5 @@ --スタンピング・クラッシュ +--Stamping Destruction local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),tp,LOCATION_MZONE,0,1,nil) end function s.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter2(chkc) and chkc~=e:GetHandler() end @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.Destroy(tc,REASON_EFFECT)==0 then return end Duel.Damage(p,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81418467.lua b/official/c81418467.lua index 80bb99f95c..845f866cd9 100644 --- a/official/c81418467.lua +++ b/official/c81418467.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCountLimit(1,id) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end) - e1:SetCost(aux.SelfRevealCost) + e1:SetCost(Cost.SelfReveal) e1:SetTarget(s.sumtg) e1:SetOperation(s.sumop) c:RegisterEffect(e1) diff --git a/official/c81426505.lua b/official/c81426505.lua index 502252c115..7942e85c2b 100644 --- a/official/c81426505.lua +++ b/official/c81426505.lua @@ -12,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x3d),tp,LOCATION_MZONE,0,3,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SIX_SAMURAI),tp,LOCATION_MZONE,0,3,nil) end function s.filter2(c) return c:IsFaceup() and c:IsSpellTrap() @@ -51,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil) end Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81439173.lua b/official/c81439173.lua index 6e19237579..6785137ded 100644 --- a/official/c81439173.lua +++ b/official/c81439173.lua @@ -25,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81443745.lua b/official/c81443745.lua index df235ee321..35f57fbaee 100644 --- a/official/c81443745.lua +++ b/official/c81443745.lua @@ -36,10 +36,10 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(cg,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -48,4 +48,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81470373.lua b/official/c81470373.lua index 4c7b94e8e3..99ca5af668 100644 --- a/official/c81470373.lua +++ b/official/c81470373.lua @@ -102,4 +102,4 @@ end function s.gyop(ag,e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(ag,REASON_EFFECT) Duel.Damage(tp,1000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81471108.lua b/official/c81471108.lua index 83a7a93f40..616f558b6e 100644 --- a/official/c81471108.lua +++ b/official/c81471108.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.eqcon) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetValue(s.repval) c:RegisterEffect(e3) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.eqcon(e) return e:GetHandler():CheckUniqueOnField(e:GetHandlerPlayer()) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -62,9 +62,9 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.repval(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c81481818.lua b/official/c81481818.lua index b5da5279ad..ce940c0b2a 100644 --- a/official/c81481818.lua +++ b/official/c81481818.lua @@ -1,4 +1,5 @@ --パッチワーク・ファーニマル +--Patchwork Fluffal local s,id=GetID() function s.initial_effect(c) --setcode @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_ADD_SETCODE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetValue(0xad) + e1:SetValue(SET_FRIGHTFUR) c:RegisterEffect(e1) --fusion substitute local e2=Effect.CreateEffect(c) @@ -18,7 +19,7 @@ function s.initial_effect(c) e2:SetValue(s.subval) c:RegisterEffect(e2) end -s.listed_series={0xad} +s.listed_series={SET_FRIGHTFUR} function s.subval(e,c) - return c:IsSetCard(0xad) -end + return c:IsSetCard(SET_FRIGHTFUR) +end \ No newline at end of file diff --git a/official/c8148322.lua b/official/c8148322.lua index 1031dcc049..50f808cab0 100644 --- a/official/c8148322.lua +++ b/official/c8148322.lua @@ -10,13 +10,13 @@ function s.initial_effect(c) e1:SetCondition(s.condition) c:RegisterEffect(e1) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x10f3),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PREDAPLANT),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.checkextra(tp,sg,fc) return sg:IsExists(aux.AND(aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.FilterBoolFunction(Card.IsControler,tp)),2,nil) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsFaceup),tp,0,LOCATION_ONFIELD,nil),s.checkextra -end +end \ No newline at end of file diff --git a/official/c81489939.lua b/official/c81489939.lua index f959db192e..caa6c67975 100644 --- a/official/c81489939.lua +++ b/official/c81489939.lua @@ -16,4 +16,4 @@ function s.initial_effect(c) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetValue(-1) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c81497285.lua b/official/c81497285.lua index 41890defa8..1b9a63e1cf 100644 --- a/official/c81497285.lua +++ b/official/c81497285.lua @@ -80,4 +80,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c81510157.lua b/official/c81510157.lua index cb801df7bf..0ec0d8de16 100644 --- a/official/c81510157.lua +++ b/official/c81510157.lua @@ -1,4 +1,5 @@ --ソウルテイカー +--Soul Taker local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81519836.lua b/official/c81519836.lua index 998b695014..32af864682 100644 --- a/official/c81519836.lua +++ b/official/c81519836.lua @@ -1,22 +1,22 @@ --- 苗と霞の春化精 --- Vernalizer Fairy of Seedlings and Haze --- Scripted by Hatter +--苗と霞の春化精 +--Vernusylph of the Misting Seedlings +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Reduce ATK of non-"Vernalizer" monsters + --Reduce ATK of non-"Vernalizer" monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetTarget(function(_,c) return not c:IsSetCard(0x183) end) + e1:SetTarget(function(_,c) return not c:IsSetCard(SET_VERNUSYLPH) end) e1:SetValue(-600) c:RegisterEffect(e1) - -- Search 1 EARTH Fairy monster + --Search 1 EARTH Fairy monster c:RegisterEffect(Effect.CreateVernalizerSPEffect(c,id,0,CATEGORY_TOHAND+CATEGORY_SEARCH,s.thtg,s.thop)) end s.listed_names={id} -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.thfilter(c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_FAIRY) and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c81524756.lua b/official/c81524756.lua index 683ee846ad..758a78095a 100644 --- a/official/c81524756.lua +++ b/official/c81524756.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.dbop) c:RegisterEffect(e2) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} function s.spval(e,c) return 0,aux.GetMMZonesPointedTo(c:GetControler()) end @@ -33,7 +33,7 @@ function s.dbcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end function s.dbfilter(c) - return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(0x116) + return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_CRUSADIA) end function s.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.dbfilter(chkc) end @@ -53,7 +53,7 @@ function s.dbop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e1:SetCondition(s.damcon) e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Your other monsters cannot attack local e2=Effect.CreateEffect(c) @@ -62,7 +62,7 @@ function s.dbop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(tc:GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end diff --git a/official/c81524977.lua b/official/c81524977.lua index a743eb53ec..ce5020ce98 100644 --- a/official/c81524977.lua +++ b/official/c81524977.lua @@ -57,4 +57,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81549048.lua b/official/c81549048.lua index 6a09fec649..1a1ce2de31 100644 --- a/official/c81549048.lua +++ b/official/c81549048.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c81555617.lua b/official/c81555617.lua index f987a30d61..851a443af5 100644 --- a/official/c81555617.lua +++ b/official/c81555617.lua @@ -1,9 +1,9 @@ --- デスピアの凶劇 --- Ad Libitum of Despia --- Scripted by Hatter +--デスピアの凶劇 +--Ad Libitum of Despia +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Monsters on the field gain ATK + --Monsters on the field gain ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x166} +s.listed_series={SET_DESPIA} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasLevel),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end end @@ -39,7 +39,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(sc:GetLevel()*100) sc:RegisterEffect(e1) end @@ -47,19 +47,19 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&REASON_FUSION)==REASON_FUSION and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) - and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceup() + return (r&REASON_FUSION)==REASON_FUSION and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) + and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and c:IsFaceup() end function s.spfilter(c,e,tp) - return not c:IsCode(id) and (c:IsSetCard(0x166) or (c:IsLevelAbove(8) and c:IsType(TYPE_FUSION))) + return not c:IsCode(id) and (c:IsSetCard(SET_DESPIA) or (c:IsLevelAbove(8) and c:IsType(TYPE_FUSION))) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -67,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81560239.lua b/official/c81560239.lua index 98f40bf538..8cbe38931b 100644 --- a/official/c81560239.lua +++ b/official/c81560239.lua @@ -1,4 +1,4 @@ ---Japanese name +--巳剣降臨 --Mitsurugi Ritual --scripted by Naim local s,id=GetID() diff --git a/official/c81566151.lua b/official/c81566151.lua index 49abb74bd9..a6684e84ed 100644 --- a/official/c81566151.lua +++ b/official/c81566151.lua @@ -1,4 +1,5 @@ --E・HERO フレア・ネオス +--Elemental HERO Flare Neos local s,id=GetID() function s.initial_effect(c) --fusion material @@ -16,17 +17,17 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*400 -end + return Duel.GetMatchingGroupCount(Card.IsSpellTrap,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*400 +end \ No newline at end of file diff --git a/official/c81570454.lua b/official/c81570454.lua index fa54b6b26a..e2d48487ac 100644 --- a/official/c81570454.lua +++ b/official/c81570454.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) end s.listed_names={id} --Part of "Noble Knight" archetype -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} --Activation legality function s.equiptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end @@ -62,7 +62,7 @@ function s.equipop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -71,7 +71,7 @@ function s.equipop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) @@ -80,7 +80,7 @@ end --If sent to GY this turn, flag function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end --Check for FIRE warrior or equip spell function s.thfilter(c) @@ -104,4 +104,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81571633.lua b/official/c81571633.lua index fc19b0de81..578067711d 100644 --- a/official/c81571633.lua +++ b/official/c81571633.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_PZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -37,13 +37,9 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0xaf} -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end +s.listed_series={SET_DD} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0xaf) + return c:IsFaceup() and c:IsSetCard(SET_DD) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end @@ -59,12 +55,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.sccon(e) - return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0xaf) + return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),SET_DD) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK) @@ -85,12 +81,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() end @@ -101,9 +97,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,1)) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xaf) -end + return not c:IsSetCard(SET_DD) +end \ No newline at end of file diff --git a/official/c81587028.lua b/official/c81587028.lua index 5c2854d854..9c0153a73d 100644 --- a/official/c81587028.lua +++ b/official/c81587028.lua @@ -1,6 +1,5 @@ --おもちゃ箱 --Box of Friends - local s,id=GetID() function s.initial_effect(c) --Special summon 2 normal monsters, with 0 ATK or DEF and different names, from deck @@ -41,8 +40,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc2=sg:GetNext() Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc1:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) + tc2:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Cannot be used as synchro material local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3310) @@ -50,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) @@ -64,12 +63,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) de:SetLabelObject(sg) de:SetCondition(s.descon) de:SetOperation(s.desop) - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_END then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_END) then de:SetLabel(Duel.GetTurnCount()) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + de:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else de:SetLabel(0) - de:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN) + de:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN) end Duel.RegisterEffect(de,tp) end @@ -81,7 +80,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) e:Reset() return false end - return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() + return Duel.IsTurnPlayer(tp) and Duel.GetTurnCount()~=e:GetLabel() end function s.desfilter(c) return c:GetFlagEffect(id)>0 diff --git a/official/c81599449.lua b/official/c81599449.lua index 21cd92e6b4..2b298bec06 100644 --- a/official/c81599449.lua +++ b/official/c81599449.lua @@ -40,4 +40,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c81601517.lua b/official/c81601517.lua index 15095225ea..1ca985accb 100644 --- a/official/c81601517.lua +++ b/official/c81601517.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end s.listed_card_types={TYPE_GEMINI} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return rp~=tp and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_GEMINI) and c:IsCanTurnSet() @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c81612598.lua b/official/c81612598.lua index 15a9c0629a..6373fccdff 100644 --- a/official/c81612598.lua +++ b/official/c81612598.lua @@ -1,9 +1,10 @@ --メタルフォーゼ・アダマンテ +--Metalfoes Adamante local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xe1),aux.FilterBoolFunction(Card.IsAttackBelow,2500)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_METALFOES),aux.FilterBoolFunction(Card.IsAttackBelow,2500)) end -s.listed_series={0xe1} -s.material_setcode=0xe1 +s.listed_series={SET_METALFOES} +s.material_setcode=SET_METALFOES \ No newline at end of file diff --git a/official/c81613061.lua b/official/c81613061.lua index b338e05cb6..27603dc986 100644 --- a/official/c81613061.lua +++ b/official/c81613061.lua @@ -1,14 +1,14 @@ --- ウォークライ・ミーディアム --- War Rock Medium --- Scripted by Hatter +--ウォークライ・ミーディアム +--War Rock Medium +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Cannot activate monster effects on the field + --Cannot activate monster effects on the field local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetCondition(s.limcon) e2:SetValue(s.limval) c:RegisterEffect(e2) - -- Set 1 "War Rock" Spell/Trap from your Deck + --Set 1 "War Rock" Spell/Trap from your Deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_IGNITION) @@ -28,21 +28,21 @@ function s.initial_effect(c) e3:SetOperation(s.setop) c:RegisterEffect(e3) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} s.listed_names={id} function s.wrfilter(c) - return c:IsFaceup() and c:IsLevelAbove(7) and c:IsSetCard(0x161) + return c:IsFaceup() and c:IsLevelAbove(7) and c:IsSetCard(SET_WAR_ROCK) end function s.limcon(e) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) and Duel.IsExistingMatchingCard(s.wrfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsSummonType,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL) end function s.limval(e,re,tp) - return re:GetActivateLocation()==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) + return re:GetActivateLocation()==LOCATION_MZONE and re:IsMonsterEffect() end function s.setfilter(c) - return c:IsSetCard(0x161) and not c:IsCode(id) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_WAR_ROCK) and not c:IsCode(id) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -55,7 +55,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end - -- Cannot Special Summon, except Warrior monsters + --Cannot Special Summon, except Warrior monsters local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) @@ -63,6 +63,6 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c) return not c:IsRace(RACE_WARRIOR) end) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end \ No newline at end of file diff --git a/official/c81615450.lua b/official/c81615450.lua index 60dcf01f8e..0662a7c5e9 100644 --- a/official/c81615450.lua +++ b/official/c81615450.lua @@ -1,9 +1,9 @@ --- レプティレス・ラミフィケーション --- Reptilianne Lamification --- Scripted by Hatter +--レプティレス・ラミフィケーション +--Reptilianne Ramifications +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -14,20 +14,20 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3c} +s.listed_series={SET_REPTILIANNE} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) end function s.mfilter(c) - return c:IsMonster() and c:IsSetCard(0x3c) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_REPTILIANNE) and c:IsAbleToHand() end function s.mthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.stfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x3c) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_REPTILIANNE) and not c:IsCode(id) and c:IsAbleToHand() end function s.stthtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_DECK,0,1,nil) end @@ -88,12 +88,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,1,nil) if #g>0 then Duel.HintSelection(g,true) - -- ATK becomes 0 + --ATK becomes 0 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end @@ -110,4 +110,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ct==0 then Duel.BreakEffect() end end if (sel&0x4==0x4) then s.atkop(e,tp,eg,ep,ev,re,r,rp) end -end +end \ No newline at end of file diff --git a/official/c81616639.lua b/official/c81616639.lua index 1dad85ab79..d0c0aa18b7 100644 --- a/official/c81616639.lua +++ b/official/c81616639.lua @@ -1,4 +1,5 @@ --ゾンビーナ +--Zombina local s,id=GetID() function s.initial_effect(c) --special summon @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c816427.lua b/official/c816427.lua index 44907ede52..68cf95ed4c 100644 --- a/official/c816427.lua +++ b/official/c816427.lua @@ -70,5 +70,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c8165596.lua b/official/c8165596.lua index dd31e420cb..551e6339d1 100644 --- a/official/c8165596.lua +++ b/official/c8165596.lua @@ -1,94 +1,79 @@ ---No.90 銀河眼の光子卿 +--No.90 銀河眼の光子卿 --Number 90: Galaxy-Eyes Photon Lord local s,id=GetID() function s.initial_effect(c) - --Xyz Summon - Xyz.AddProcedure(c,nil,8,2) c:EnableReviveLimit() - --Cannot be destroyed by card effects + --Xyz Summon procedure: 2 Level 8 monsters + Xyz.AddProcedure(c,nil,8,2) + --If this card has a "Photon" card as material, it cannot be destroyed by card effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetRange(LOCATION_MZONE) - e1:SetCondition(s.indcon) + e1:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_PHOTON) end) e1:SetValue(1) c:RegisterEffect(e1) - --Negate monster's effect + --Negate an opponent's monster effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCode(EVENT_CHAINING) - e2:SetCondition(s.negcon) - e2:SetCost(aux.dxmcostgen(1,1,s.slwc)) - e2:SetTarget(s.negtg) - e2:SetOperation(s.negop) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp,chk) return rp==1-tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end) + e2:SetCost(Cost.Detach(1,1,function(e,og) e:SetLabel(og:GetFirst():IsSetCard(SET_GALAXY) and 1 or 0) end)) + e2:SetTarget(s.distg) + e2:SetOperation(s.disop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) - --Search or attach + --Take 1 "Photon" or "Galaxy" card from your Deck, and either add it to your hand or attach it to this card as material local e3=Effect.CreateEffect(c) - e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetCountLimit(1,{id,1}) e3:SetRange(LOCATION_MZONE) - e3:SetHintTiming(0,TIMING_END_PHASE) - e3:SetCondition(s.condition) - e3:SetTarget(s.target) - e3:SetOperation(s.operation) + e3:SetCountLimit(1,{id,1}) + e3:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) + e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) + e3:SetTarget(s.thmattg) + e3:SetOperation(s.thmatop) c:RegisterEffect(e3) end -s.listed_series={0x7b,0x55} s.xyz_number=90 -function s.indcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x55) -end -function s.negcon(e,tp,eg,ep,ev,re,r,rp,chk) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) -end -function s.slwc(e,og) - e:SetLabel(og:GetFirst():IsSetCard(0x7b) and 1 or 0) -end -function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) +s.listed_series={SET_PHOTON,SET_GALAXY} +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) local rc=re:GetHandler() + Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) if rc:IsDestructable() and rc:IsRelateToEffect(re) and e:GetLabel()==1 then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0) end end -function s.negop(e,tp,eg,ep,ev,re,r,rp) +function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and e:GetLabel()==1 then + Duel.BreakEffect() Duel.Destroy(eg,REASON_EFFECT) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return Duel.GetTurnPlayer()~=tp -end -function s.filter(c) - return c:IsSetCard(0x55) or c:IsSetCard(0x7b) +function s.thmatfilter(c,hc,tp,relation_chk) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and (c:IsAbleToHand() or (relation_chk and c:IsCanBeXyzMaterial(hc,tp,REASON_EFFECT))) end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then - return e:GetHandler():IsType(TYPE_XYZ) and - Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) - end +function s.thmattg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thmatfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler(),tp,true) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) +function s.thmatop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() - if not c:IsRelateToEffect(e) then - Duel.SendtoHand(g,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,g) - else - aux.ToHandOrElse(tc,tp,aux.TRUE,function()Duel.Overlay(c,tc)end,aux.Stringid(id,3)) - end + local relation_chk=c:IsRelateToEffect(e) + local desc=relation_chk and aux.Stringid(id,2) or HINTMSG_ATOHAND + Duel.Hint(HINT_SELECTMSG,tp,desc) + local sc=Duel.SelectMatchingCard(tp,s.thmatfilter,tp,LOCATION_DECK,0,1,1,nil,c,tp,relation_chk):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + function() return relation_chk and sc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) end, + function() Duel.Overlay(c,sc) end, + aux.Stringid(id,3) + ) end diff --git a/official/c81661951.lua b/official/c81661951.lua index 4caacc2282..1e6a0283f6 100644 --- a/official/c81661951.lua +++ b/official/c81661951.lua @@ -1,4 +1,5 @@ --ドラグニティ-ミリトゥム +--Dragunity Militum local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and s.filter(chkc,e,tp) end @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81665333.lua b/official/c81665333.lua index 209d70954e..16ab4bd4c4 100644 --- a/official/c81665333.lua +++ b/official/c81665333.lua @@ -1,4 +1,5 @@ --撤収命令 +--Sound the Retreat! local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,4 +19,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,0,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81670445.lua b/official/c81670445.lua index 1bf5af1e36..08b4802c25 100644 --- a/official/c81670445.lua +++ b/official/c81670445.lua @@ -1,7 +1,6 @@ --クロノダイバー・ハック --Time Thief Hack --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Activate @@ -61,14 +60,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or not tc then return end local value=tc:GetOverlayCount()*300 - if tc:UpdateAttack(value,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,c)==value and tc:GetOverlayGroup():IsExists(s.ownerfil,1,nil,e) then + if tc:UpdateAttack(value,RESETS_STANDARD_PHASE_END,c)==value and tc:GetOverlayGroup():IsExists(s.ownerfil,1,nil,e) then --Can attack directly local e1=Effect.CreateEffect(c) e1:SetDescription(3205) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c81674782.lua b/official/c81674782.lua index eb475e3e2f..f3b5063cfa 100644 --- a/official/c81674782.lua +++ b/official/c81674782.lua @@ -1,4 +1,5 @@ --次元の裂け目 +--Dimensional Fissure local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,8 +28,8 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.rmtarget(e,c) - return not c:IsLocation(0x80) and not c:IsSpellTrap() + return not c:IsLocation(LOCATION_OVERLAY) and not c:IsSpellTrap() end function s.checktg(e,c) return not c:IsPublic() -end +end \ No newline at end of file diff --git a/official/c8173184.lua b/official/c8173184.lua index b826cd3ccc..12bc52a128 100644 --- a/official/c8173184.lua +++ b/official/c8173184.lua @@ -98,4 +98,4 @@ function s.gtfilter(c,sc,tp) end function s.synop(e,tg,ntg,sg,lv,sc,tp) return e:GetHandlerPlayer()==1-tp or tg:IsExists(Card.IsSetCard,1,nil,SET_GENEX,sc,SUMMON_TYPE_SYNCHRO,tp) or ntg:IsExists(s.gtfilter,1,nil,sc,tp) -end +end \ No newline at end of file diff --git a/official/c81752019.lua b/official/c81752019.lua index edec390e4e..694e55c13e 100644 --- a/official/c81752019.lua +++ b/official/c81752019.lua @@ -1,4 +1,5 @@ --花札衛-松- +--Flower Cardian Pine local s,id=GetID() function s.initial_effect(c) --draw (summon) @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.drop2) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -33,7 +34,7 @@ function s.drop1(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)==0 then return end local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if not (tc:IsSetCard(0xe6) and tc:IsMonster()) then + if not (tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsMonster()) then Duel.SendtoGrave(tc,REASON_EFFECT) end Duel.ShuffleHand(tp) @@ -46,4 +47,4 @@ end function s.drop2(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8175346.lua b/official/c8175346.lua index bc6b020632..a912d8e00d 100644 --- a/official/c8175346.lua +++ b/official/c8175346.lua @@ -1,4 +1,5 @@ --ポケ・ドラ +--Poki Draco local s,id=GetID() function s.initial_effect(c) --search @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c81755371.lua b/official/c81755371.lua index 0107688650..3f7a910c78 100644 --- a/official/c81755371.lua +++ b/official/c81755371.lua @@ -1,4 +1,5 @@ --ダークフレーム +--Dark Effigy local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c81756619.lua b/official/c81756619.lua index 7d8ecc7ed5..6321891cec 100644 --- a/official/c81756619.lua +++ b/official/c81756619.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c81756897.lua b/official/c81756897.lua index 44c4da515d..f4a57e2eda 100644 --- a/official/c81756897.lua +++ b/official/c81756897.lua @@ -1,5 +1,6 @@ --ゼラの儀式 +--Zera Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,69123138) -end +end \ No newline at end of file diff --git a/official/c81759748.lua b/official/c81759748.lua index 72332b7e93..27123c1b89 100644 --- a/official/c81759748.lua +++ b/official/c81759748.lua @@ -1,4 +1,5 @@ --ダーク・スパイダー +--Dark Spider local s,id=GetID() function s.initial_effect(c) --lv up @@ -30,8 +31,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c81767888.lua b/official/c81767888.lua index 262d4f2de2..5605d37a2c 100644 --- a/official/c81767888.lua +++ b/official/c81767888.lua @@ -1,5 +1,5 @@ --烙印の剣 ---Branded Blade +--Branded Sword --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -25,15 +25,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={CARD_ALBAZ,id+1} -s.listed_series={0x160} +s.listed_series={SET_BRANDED} function s.cfilter(c) - return c:IsSetCard(0x160) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_BRANDED) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) @@ -85,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c81769387.lua b/official/c81769387.lua index 0057c9a55b..fb7751a8ce 100644 --- a/official/c81769387.lua +++ b/official/c81769387.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x14a),1) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_APPLIANCER),1) --Cannot be Link Material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -36,7 +36,7 @@ function s.initial_effect(c) end function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -45,7 +45,7 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) if a:IsControler(1-tp) then a,b=b,a end if e:GetHandler():GetMutualLinkedGroupCount()>0 and a:IsControler(tp) and b:IsControler(1-tp) - and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL then + and Duel.IsPhase(PHASE_DAMAGE_CAL) then return true else return false end end @@ -56,7 +56,7 @@ function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) if not b then return false end if a:IsControler(1-tp) then a,b=b,a end if c:GetMutualLinkedGroupCount()==0 and a==c and b:IsControler(1-tp) - and Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL then + and Duel.IsPhase(PHASE_DAMAGE_CAL) then return true else return false end end @@ -68,8 +68,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c81777047.lua b/official/c81777047.lua index 92dee34fb0..3f8b82281f 100644 --- a/official/c81777047.lua +++ b/official/c81777047.lua @@ -1,4 +1,5 @@ --シャインスパーク +--Luminous Spark local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c81782101.lua b/official/c81782101.lua index be2bbe3703..da7c44156c 100644 --- a/official/c81782101.lua +++ b/official/c81782101.lua @@ -20,9 +20,9 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e2) @@ -30,27 +30,23 @@ function s.initial_effect(c) end function s.nsreg(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetLabelObject():GetLabel()~=Duel.GetTurnCount() and Duel.IsTurnPlayer(tp) and e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsRace(RACE_ROCK+RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsRace(RACE_ROCK|RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.rescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetCode)==1 @@ -60,13 +56,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if ft<=0 then return end if ft>3 then ft=3 end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,nil,e,tp) local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon,1,tp,HINTMSG_SPSUMMON) if #sg>0 then local fid=e:GetHandler():GetFieldID() for tc in aux.Next(sg) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() sg:KeepAlive() diff --git a/official/c81782376.lua b/official/c81782376.lua index adee3c41d7..ec3165adba 100644 --- a/official/c81782376.lua +++ b/official/c81782376.lua @@ -1,4 +1,5 @@ --運命の発掘 +--Dig of Destiny local s,id=GetID() function s.initial_effect(c) --Activate @@ -51,4 +52,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local ct=Duel.GetMatchingGroupCount(Card.IsCode,p,LOCATION_GRAVE,0,nil,id) Duel.Draw(p,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81788994.lua b/official/c81788994.lua index ea7ce3003d..26ded59210 100644 --- a/official/c81788994.lua +++ b/official/c81788994.lua @@ -37,16 +37,16 @@ function s.initial_effect(c) e4:SetCondition(s.chcon) e4:SetTarget(s.chtg) e4:SetOperation(s.chop) - e4:SetValue(aux.FilterBoolFunction(Card.IsSetCard,0x9d)) + e4:SetValue(aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL)) c:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetOperation(s.chk) e4:SetLabelObject(e5) end s.counter_place_list={0x16} -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.cfilter(c) - return c:IsSetCard(0x9d) and c:IsMonster() and c:IsReason(REASON_EFFECT) + return c:IsSetCard(SET_SHADDOLL) and c:IsMonster() and c:IsReason(REASON_EFFECT) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -69,7 +69,7 @@ function s.chfilter(c,e,tp) end function s.chtg(e,te,tp,value) if value&SUMMON_TYPE_FUSION==0 then return Group.CreateGroup() end - return Duel.GetMatchingGroup(s.chfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,nil,te,tp) + return Duel.GetMatchingGroup(s.chfilter,tp,LOCATION_MZONE|LOCATION_HAND,LOCATION_MZONE,nil,te,tp) end function s.chop(e,te,tp,tc,mat,sumtype,sg,sumpos) if not sumtype then sumtype=SUMMON_TYPE_FUSION end @@ -87,4 +87,4 @@ function s.chop(e,te,tp,tc,mat,sumtype,sg,sumpos) end function s.chk(tp,sg,fc) return sg:FilterCount(Card.IsControler,nil,1-tp)<=1 -end +end \ No newline at end of file diff --git a/official/c81791932.lua b/official/c81791932.lua index 8b97743d7e..d19df3d25d 100644 --- a/official/c81791932.lua +++ b/official/c81791932.lua @@ -1,4 +1,5 @@ --スネーク・ホイッスル +--Snake Whistle local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81810441.lua b/official/c81810441.lua index dd484e0ece..355ea7f63c 100644 --- a/official/c81810441.lua +++ b/official/c81810441.lua @@ -1,7 +1,8 @@ --星輝士の因子 +--Stellarknight Alpha local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,0,aux.FilterBoolFunction(Card.IsSetCard,0x9c),s.eqlimit) + aux.AddEquipProcedure(c,0,aux.FilterBoolFunction(Card.IsSetCard,SET_TELLARKNIGHT),s.eqlimit) --atk/def local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) @@ -26,16 +27,16 @@ function s.initial_effect(c) e6:SetCondition(s.descon) c:RegisterEffect(e6) end -s.listed_series={0x9c} +s.listed_series={SET_TELLARKNIGHT} function s.eqlimit(e,c) - return c:IsSetCard(0x9c) and c:GetControler()==e:GetHandler():GetControler() + return c:IsSetCard(SET_TELLARKNIGHT) and c:GetControler()==e:GetHandler():GetControler() end function s.efilter(e,re) return e:GetHandlerPlayer()~=re:GetOwnerPlayer() end function s.cfilter(c) - return c:IsFaceup() and not c:IsSetCard(0x9c) + return c:IsFaceup() and not c:IsSetCard(SET_TELLARKNIGHT) end function s.descon(e) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c81816475.lua b/official/c81816475.lua index 50a333052b..3b3efea754 100644 --- a/official/c81816475.lua +++ b/official/c81816475.lua @@ -1,4 +1,5 @@ --オーバーレイ・イーター +--Overlay Eater local s,id=GetID() function s.initial_effect(c) -- @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local oc=mg:GetFirst():GetOverlayTarget() Duel.Overlay(tc,mg) Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0) -end +end \ No newline at end of file diff --git a/official/c81820689.lua b/official/c81820689.lua index c31ffaa3b6..9118b7d201 100644 --- a/official/c81820689.lua +++ b/official/c81820689.lua @@ -1,4 +1,5 @@ --未熟な密偵 +--The Inexperienced Spy local s,id=GetID() function s.initial_effect(c) --confirm @@ -22,4 +23,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(p,g) Duel.ShuffleHand(1-p) end -end +end \ No newline at end of file diff --git a/official/c81825063.lua b/official/c81825063.lua index 0849ed9cb7..069bffa821 100644 --- a/official/c81825063.lua +++ b/official/c81825063.lua @@ -39,12 +39,12 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.rmtg(e,c) return c:GetOwner()~=e:GetHandlerPlayer() and c:IsOriginalType(TYPE_SPELL+TYPE_TRAP) and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) end function s.spfilter(c) - return c:IsSetCard(0x2f) and c:IsFaceup() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_MZONE,0,nil)>0 @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.thfilter(c) - return c:IsSetCard(0x2f) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -73,4 +73,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81843628.lua b/official/c81843628.lua index d6c1eed8b9..df41b539ae 100644 --- a/official/c81843628.lua +++ b/official/c81843628.lua @@ -1,4 +1,5 @@ --ニードルワーム +--Needle Worm local s,id=GetID() function s.initial_effect(c) --flip @@ -16,4 +17,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,5,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81846453.lua b/official/c81846453.lua index dbd5e798f1..fd33a409ac 100644 --- a/official/c81846453.lua +++ b/official/c81846453.lua @@ -1,5 +1,5 @@ --武力の軍奏 ---Tin Musical Battlemech +--Martial Metal Marcher -- local s,id=GetID() function s.initial_effect(c) @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -47,12 +47,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -67,6 +67,6 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c81846636.lua b/official/c81846636.lua index c3076f5e07..eec986e9d7 100644 --- a/official/c81846636.lua +++ b/official/c81846636.lua @@ -1,4 +1,5 @@ --ジェムナイト・ラズリー +--Gem-Knight Lazuli local s,id=GetID() function s.initial_effect(c) --salvage @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81863068.lua b/official/c81863068.lua index 18fab84510..c1c114b042 100644 --- a/official/c81863068.lua +++ b/official/c81863068.lua @@ -1,4 +1,5 @@ --悪魔の偵察者 +--Hiro's Shadow Scout local s,id=GetID() function s.initial_effect(c) --flip @@ -24,6 +25,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetOperatedGroup() Duel.ConfirmCards(1-p,g) local dg=g:Filter(Card.IsSpell,nil) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) Duel.ShuffleHand(p) -end +end \ No newline at end of file diff --git a/official/c81866673.lua b/official/c81866673.lua index 33fc874925..04be4bf5f9 100644 --- a/official/c81866673.lua +++ b/official/c81866673.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) --Change it to Defense Position local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -49,7 +49,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) @@ -62,7 +62,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetCurrentPhase()==PHASE_DRAW and Duel.IsTurnPlayer(tp) + return ep==tp and Duel.IsPhase(PHASE_DRAW) and Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp) return c:IsLocation(LOCATION_HAND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c81873903.lua b/official/c81873903.lua index 1c3ac2e5af..db3d590a6a 100644 --- a/official/c81873903.lua +++ b/official/c81873903.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,151,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,151,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -26,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,151,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81878201.lua b/official/c81878201.lua index 7c67389bf5..9d294f5450 100644 --- a/official/c81878201.lua +++ b/official/c81878201.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.tdtg) e3:SetOperation(s.tdop) c:RegisterEffect(e3) diff --git a/official/c81881839.lua b/official/c81881839.lua index 8234b6af8c..3bd2047453 100644 --- a/official/c81881839.lua +++ b/official/c81881839.lua @@ -21,15 +21,15 @@ function s.initial_effect(c) --name change local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.nmtg) e3:SetOperation(s.nmop) - c:RegisterEffect(e3) + c:RegisterEffect(e3) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.lvfilter(c,e) return c:IsFaceup() and c:IsLevelBelow(6) and c:IsCanBeEffectTarget(e) end @@ -53,7 +53,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(tc:GetLevel()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -61,7 +61,7 @@ function s.nmfilter2(c,cd) return c:IsFaceup() and not c:IsCode(cd) end function s.nmfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe5) + return c:IsFaceup() and c:IsSetCard(SET_CIPHER) and Duel.IsExistingMatchingCard(s.nmfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode()) end function s.nmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -82,8 +82,8 @@ function s.nmop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetCode()) sg:GetFirst():RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c81896370.lua b/official/c81896370.lua index f5925e31d7..57a6bd4def 100644 --- a/official/c81896370.lua +++ b/official/c81896370.lua @@ -1,4 +1,5 @@ --疾風鳥人ジョー +--Swift Birdman Joe local s,id=GetID() function s.initial_effect(c) --summon success @@ -28,7 +29,7 @@ function s.valcheck(e,c) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.filter(c) return c:IsSpellTrap() and c:IsAbleToHand() @@ -41,4 +42,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c81896771.lua b/official/c81896771.lua index 01d8d8efdd..e11ae64e73 100644 --- a/official/c81896771.lua +++ b/official/c81896771.lua @@ -1,4 +1,5 @@ --エレキジ +--Wattpheasant local s,id=GetID() function s.initial_effect(c) --direct attack @@ -33,11 +34,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Remove(tc,tc:GetPosition(),REASON_EFFECT|REASON_TEMPORARY)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetOperation(s.retop) diff --git a/official/c81907872.lua b/official/c81907872.lua index 9ad487ffee..2a7d8cc4c7 100644 --- a/official/c81907872.lua +++ b/official/c81907872.lua @@ -1,4 +1,5 @@ --ゴーストリック・スペクター +--Ghostrick Specter local s,id=GetID() function s.initial_effect(c) --summon limit @@ -29,14 +30,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sumcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -47,7 +48,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end function s.cfilter(c,tp) return c:IsControler(tp) and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp - and c:IsSetCard(0x8d) and c:IsMonster() and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and c==Duel.GetAttackTarget())) + and c:IsSetCard(SET_GHOSTRICK) and c:IsMonster() and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and c==Duel.GetAttackTarget())) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -66,4 +67,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,c) Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81913510.lua b/official/c81913510.lua index 10d48e6d6d..25ff0e0dcf 100644 --- a/official/c81913510.lua +++ b/official/c81913510.lua @@ -12,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1f} +s.listed_series={SET_NEO_SPACIAN} function s.filter1(c,e,tp) local code=c:GetCode() - return c:IsFaceup() and c:IsSetCard(0x1f) + return c:IsFaceup() and c:IsSetCard(SET_NEO_SPACIAN) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,code,e,tp,c) end function s.filter2(c,code,e,tp,mc) @@ -38,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) tc2:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c81914447.lua b/official/c81914447.lua index 85d87d9084..df0a1babb1 100644 --- a/official/c81914447.lua +++ b/official/c81914447.lua @@ -1,9 +1,9 @@ --- No-P.U.N.K.オーガ・ナンバー --- Noh P.U.N.K. Numeral Ogre --- Scripted by Hatter +--No-P.U.N.K.オーガ・ナンバー +--Noh-P.U.N.K. Ogre Dance +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Gain ATK + --Gain ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Special Summon self + --Special Summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -25,40 +25,40 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Search + --Search local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x173} +s.listed_series={SET_PUNK} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetBaseAttack()>0 + return rp==1-tp and re:IsMonsterEffect() and re:GetHandler():GetBaseAttack()>0 end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local atk=re:GetHandler():GetBaseAttack() if c:IsFaceup() and c:IsRelateToEffect(e) and atk>0 and re:GetHandler():IsControler(1-tp) then - -- Update ATK + --Update ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckMMZ,nil,0x173) end + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,aux.ReleaseCheckMMZ,nil,SET_PUNK) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckMMZ,nil,0x173) + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,aux.ReleaseCheckMMZ,nil,SET_PUNK) Duel.Release(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -71,12 +71,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x173) and not c:IsLevel(8) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_PUNK) and not c:IsLevel(8) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -89,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c81919143.lua b/official/c81919143.lua index 67a17e39b3..7a02186384 100644 --- a/official/c81919143.lua +++ b/official/c81919143.lua @@ -1,4 +1,5 @@ --ブレイン・クラッシャー +--Brain Crusher local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -43,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8192327.lua b/official/c8192327.lua index 4eb47a206d..655995059e 100644 --- a/official/c8192327.lua +++ b/official/c8192327.lua @@ -1,5 +1,5 @@ --光霊神フォスオラージュ ---Forceaurage the Elemental Lord +--Phosphorage the Elemental Lord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -60,13 +60,12 @@ function s.leaveop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetTurnPlayer()==effp then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.skipcon) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,2) else - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,1) end Duel.RegisterEffect(e1,effp) end function s.skipcon(e) return Duel.GetTurnCount()~=e:GetLabel() -end - +end \ No newline at end of file diff --git a/official/c81927732.lua b/official/c81927732.lua index c2fab5f90f..96945522f5 100644 --- a/official/c81927732.lua +++ b/official/c81927732.lua @@ -1,4 +1,5 @@ --RR-レヴォリューション・ファルコン +--Raidraptor - Revolution Falcon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --atk/def @@ -34,14 +35,10 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() and not e:GetHandler():IsHasEffect(EFFECT_ATTACK_ALL) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then @@ -49,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ATTACK_ALL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -65,7 +62,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -73,7 +70,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(s.filter,1,nil) @@ -95,4 +92,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c81933259.lua b/official/c81933259.lua index f44872c457..c69ba3dd70 100644 --- a/official/c81933259.lua +++ b/official/c81933259.lua @@ -1,5 +1,6 @@ --悪魔鏡の儀式 +--Beastly Mirror Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,6,nil,31890399) -end +end \ No newline at end of file diff --git a/official/c81945676.lua b/official/c81945676.lua index 5f6255a752..c9f9670967 100644 --- a/official/c81945676.lua +++ b/official/c81945676.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(s.ctcon) - e1:SetCost(s.ctcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) @@ -35,11 +35,6 @@ function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() and Duel.IsTurnPlayer(1-tp) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_MEMENTOAL_TECUHTLICA),tp,LOCATION_ONFIELD,0,1,nil) end -function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) end diff --git a/official/c81945678.lua b/official/c81945678.lua index 792bb12cf6..98aff1bcb6 100644 --- a/official/c81945678.lua +++ b/official/c81945678.lua @@ -1,6 +1,5 @@ +--ジョーカーズ・ワイルド --Joker's Wild ---Scripted by fiftyfour - local s,id=GetID() function s.initial_effect(c) --Copy face card spell @@ -8,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) e1:SetCost(s.cost) @@ -31,7 +30,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_JACK_KNIGHT,CARD_KING_KNIGHT,CARD_QUEEN_KNIGHT} - function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() or Duel.IsBattlePhase() end @@ -74,7 +72,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.tdfilter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR) and c:IsAbleToDeck() @@ -91,8 +89,8 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 + and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81951640.lua b/official/c81951640.lua index bf5cd9c057..9a565fc6af 100644 --- a/official/c81951640.lua +++ b/official/c81951640.lua @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c81954378.lua b/official/c81954378.lua index a92d8db19b..db2f2787ad 100644 --- a/official/c81954378.lua +++ b/official/c81954378.lua @@ -1,4 +1,5 @@ --死神の大鎌-デスサイス +--Reaper Scythe - Dreadscythe local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,18175965)) @@ -12,4 +13,4 @@ end s.listed_names={18175965} function s.value(e,c) return Duel.GetMatchingGroupCount(Card.IsMonster,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 -end +end \ No newline at end of file diff --git a/official/c81962318.lua b/official/c81962318.lua index 69f23ba895..2e319bf906 100644 --- a/official/c81962318.lua +++ b/official/c81962318.lua @@ -1,4 +1,5 @@ --ドラグニティ-トリブル +--Dragunity Tribus local s,id=GetID() function s.initial_effect(c) --send to grave @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81974607.lua b/official/c81974607.lua index b32b3d4092..d468c63691 100644 --- a/official/c81974607.lua +++ b/official/c81974607.lua @@ -16,23 +16,19 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_LVCHANGE) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.lvcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe5),c:GetControler(),LOCATION_MZONE,0,1,nil) -end -function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CIPHER),c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe5) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_CIPHER) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -45,7 +41,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c81977953.lua b/official/c81977953.lua index 68d359150a..c52ee20de6 100644 --- a/official/c81977953.lua +++ b/official/c81977953.lua @@ -45,15 +45,15 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_WIND) local rg=rg1:Clone() rg:Merge(rg2) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-3 and #rg1>0 and #rg2>1 and aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH+ATTRIBUTE_WIND) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_EARTH+ATTRIBUTE_WIND) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -70,10 +70,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -87,4 +87,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81978611.lua b/official/c81978611.lua index 461853db8e..a71d26196d 100644 --- a/official/c81978611.lua +++ b/official/c81978611.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c81983656.lua b/official/c81983656.lua index cbb9d3966f..134cc3d36f 100644 --- a/official/c81983656.lua +++ b/official/c81983656.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x33),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x33),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_BLACKWING),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_BLACKWING),1,99) c:EnableReviveLimit() --special summon local e1=Effect.CreateEffect(c) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.ceop) c:RegisterEffect(e3) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.spfilter(c,e,tp) return c:IsLevelAbove(5) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -61,7 +61,7 @@ function s.cbcon(e,tp,eg,ep,ev,re,r,rp) return r~=REASON_REPLACE end function s.cbfilter(c,at) - return c:IsFaceup() and c:IsSetCard(0x33) and at:IsContains(c) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and at:IsContains(c) end function s.cbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local at=Duel.GetAttacker():GetAttackableTarget() @@ -82,7 +82,7 @@ function s.cecon(e,tp,eg,ep,ev,re,r,rp) return g and #g==1 and g:GetFirst()==e:GetHandler() end function s.cefilter(c,ct) - return c:IsFaceup() and c:IsSetCard(0x33) and Duel.CheckChainTarget(ct,c) + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and Duel.CheckChainTarget(ct,c) end function s.cetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cefilter(chkc,ev) end @@ -95,4 +95,4 @@ function s.ceop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangeTargetCard(ev,Group.FromCards(tc)) end -end +end \ No newline at end of file diff --git a/official/c81985784.lua b/official/c81985784.lua index b04ed48ea9..8cc8856e07 100644 --- a/official/c81985784.lua +++ b/official/c81985784.lua @@ -1,4 +1,5 @@ --デスグレムリン +--Des Feral Imp local s,id=GetID() function s.initial_effect(c) --flip @@ -24,6 +25,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c81992475.lua b/official/c81992475.lua index 26f2997f75..b939508f08 100644 --- a/official/c81992475.lua +++ b/official/c81992475.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 バルバリッチャ +--Barbar, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -32,16 +33,16 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} s.listed_names={id} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -58,13 +59,13 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) end end function s.rmfilter(c) - return c:IsSetCard(0xb1) and not c:IsCode(id) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_BURNING_ABYSS) and not c:IsCode(id) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,3,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,3,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*300) end @@ -77,4 +78,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,ct*300,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c81994591.lua b/official/c81994591.lua index 8f163d0335..5b5382252c 100644 --- a/official/c81994591.lua +++ b/official/c81994591.lua @@ -1,4 +1,5 @@ --コアキメイルの金剛核 +--Diamond Core of Koa'ki Meiru local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,13 +16,13 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.indop) c:RegisterEffect(e2) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} function s.filter(c) - return c:IsSetCard(0x1d) and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_KOAKI_MEIRU) and c:GetCode()~=id and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -40,8 +41,8 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1d)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_KOAKI_MEIRU)) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c81997228.lua b/official/c81997228.lua index f556487ff7..904df04bf6 100644 --- a/official/c81997228.lua +++ b/official/c81997228.lua @@ -19,8 +19,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) - e1:SetCost(aux.CostWithReplace(s.descost,CARD_PRANKKIDS_MEOWMU)) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) + e1:SetCost(aux.CostWithReplace(Cost.SelfTribute,CARD_PRANKKIDS_MEOWMU)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -37,11 +37,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) if chk==0 then return #g>0 end @@ -70,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82003859.lua b/official/c82003859.lua index a00046a349..7b762a3212 100644 --- a/official/c82003859.lua +++ b/official/c82003859.lua @@ -35,4 +35,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,500) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c82005435.lua b/official/c82005435.lua index 03a4defc18..4d8579f719 100644 --- a/official/c82005435.lua +++ b/official/c82005435.lua @@ -1,4 +1,5 @@ --女忍者ヤエ +--Lady Ninja Yae local s,id=GetID() function s.initial_effect(c) --to hand @@ -19,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(cg,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsSpellTrap() and c:IsAbleToHand() @@ -32,4 +33,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8200556.lua b/official/c8200556.lua index a76b590013..4efa3f4b57 100644 --- a/official/c8200556.lua +++ b/official/c8200556.lua @@ -1,9 +1,9 @@ --- 被検体ミュートリアST-46 --- Myutant ST-46 --- Scripted by Hatter +--被検体ミュートリアST-46 +--Myutant ST-46 +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- If Normal or Special Summoned, add 1 "Myutant" Spell/Trap + --If Normal or Special Summoned, add 1 "Myutant" Spell/Trap local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon 1 monster from hand or deck + --Special Summon 1 monster from hand or deck local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x159} +s.listed_series={SET_MYUTANT} s.listed_names={CARD_MYUTANT_BEAST,CARD_MYUTANT_MIST,CARD_MYUTANT_ARSENAL} function s.thfilter(c) - return c:IsSetCard(0x159) and (c:IsSpell() or c:IsTrap()) and c:IsAbleToHand() + return c:IsSetCard(SET_MYUTANT) and (c:IsSpell() or c:IsTrap()) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -57,16 +57,16 @@ function s.getspcode(c) end function s.spcostfilter(c,e,tp,ft) return (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToRemoveAsCost() and (ft>0 or Duel.GetMZoneCount(tp,c)>0) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,c,e,tp,s.getspcode(c)) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,c,e,tp,s.getspcode(c)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local ft=Duel.GetMZoneCount(tp,c) if chk==0 then return c:IsReleasable() - and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,e,tp,ft) end + and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,e,tp,ft) end Duel.Release(c,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,e,tp,ft) + local rg=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,e,tp,ft) e:SetLabel(s.getspcode(rg:GetFirst())) Duel.Remove(rg,POS_FACEUP,REASON_COST) end @@ -78,7 +78,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local code=e:GetLabel() if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 or not code then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,code) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp,code) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c82012319.lua b/official/c82012319.lua index 17dda9d9ec..4b5d12d574 100644 --- a/official/c82012319.lua +++ b/official/c82012319.lua @@ -46,4 +46,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) else Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82016179.lua b/official/c82016179.lua index ff07fe3cdd..483b0c0321 100644 --- a/official/c82016179.lua +++ b/official/c82016179.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x90} +s.listed_series={SET_SYLVAN} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end Duel.SetTargetPlayer(tp) @@ -27,9 +27,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(p) Duel.BreakEffect() local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) - if #g>1 and g:IsExists(Card.IsSetCard,1,nil,0x90) then + if #g>1 and g:IsExists(Card.IsSetCard,1,nil,SET_SYLVAN) then Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) - local sg1=g:FilterSelect(p,Card.IsSetCard,1,1,nil,0x90) + local sg1=g:FilterSelect(p,Card.IsSetCard,1,1,nil,SET_SYLVAN) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg2=g:Select(p,1,1,sg1:GetFirst()) sg1:Merge(sg2) @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SortDecktop(p,p,ct) end end -end +end \ No newline at end of file diff --git a/official/c8201910.lua b/official/c8201910.lua index dde69cecfc..f8269f1371 100644 --- a/official/c8201910.lua +++ b/official/c8201910.lua @@ -1,4 +1,5 @@ --スター・ボーイ +--Star Boy local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -19,4 +20,4 @@ function s.tg1(e,c) end function s.tg2(e,c) return c:IsAttribute(ATTRIBUTE_FIRE) -end +end \ No newline at end of file diff --git a/official/c82035781.lua b/official/c82035781.lua index 22ceaaf9f2..e1053a80a0 100644 --- a/official/c82035781.lua +++ b/official/c82035781.lua @@ -1,4 +1,5 @@ --ツインヘデッド・ビースト +--Twinheaded Beast local s,id=GetID() function s.initial_effect(c) --multi attack @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c82041999.lua b/official/c82041999.lua index 292224d306..84811cd963 100644 --- a/official/c82041999.lua +++ b/official/c82041999.lua @@ -1,20 +1,20 @@ --- Jo-P.U.N.K.Mme.スパイダー --- Joururi P.U.N.K. Madame Spider --- Scripted by Hatter +--Jo-P.U.N.K.Mme.スパイダー +--Joruri-P.U.N.K. Madame Spider +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search "P.U.N.K." Trap + --Search "P.U.N.K." Trap local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Halve opponent monster's ATK + --Halve opponent monster's ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) @@ -28,13 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x173} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end +s.listed_series={SET_PUNK} function s.thfilter(c) - return c:IsSetCard(0x173) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_PUNK) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -52,7 +48,7 @@ function s.atkconfilter(c,tp) return c:IsControler(1-tp) and c:IsOnField() end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return rp==tp and re:GetHandler():IsSetCard(0x173) and eg:IsExists(s.atkconfilter,1,nil,tp) + return rp==tp and re:GetHandler():IsSetCard(SET_PUNK) and eg:IsExists(s.atkconfilter,1,nil,tp) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end @@ -63,12 +59,12 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then - -- Halve ATK until end of turn + --Halve ATK until end of turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c82044279.lua b/official/c82044279.lua index 05329d1d8c..cf850566f7 100644 --- a/official/c82044279.lua +++ b/official/c82044279.lua @@ -35,7 +35,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsLevelAbove(5) and loc==LOCATION_MZONE + return re:IsMonsterEffect() and rc~=c and rc:IsLevelAbove(5) and loc==LOCATION_MZONE and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) @@ -44,7 +44,7 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp) if not g or #g~=1 then return false end local tc=g:GetFirst() local c=e:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and tc:IsFaceup() and tc:IsLevelAbove(5) and tc:IsLocation(LOCATION_MZONE) + return re:IsMonsterEffect() and tc:IsFaceup() and tc:IsLevelAbove(5) and tc:IsLocation(LOCATION_MZONE) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c82045034.lua b/official/c82045034.lua index 516ef710ea..10c69b596f 100644 --- a/official/c82045034.lua +++ b/official/c82045034.lua @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) @@ -50,7 +50,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetAbsoluteRange(tp,1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) local ct=Duel.SpecialSummonComplete() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -69,7 +69,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e3:SetValue(LOCATION_REMOVED) - e3:SetReset(RESET_EVENT+RESETS_REDIRECT) + e3:SetReset(RESET_EVENT|RESETS_REDIRECT) dg:RegisterEffect(e3,true) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetType(EFFECT_TYPE_FIELD) @@ -78,7 +78,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetAbsoluteRange(tp,1,0) e4:SetTarget(s.splimit) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) dg:RegisterEffect(e4,true) end Duel.SpecialSummonComplete() diff --git a/official/c82050203.lua b/official/c82050203.lua index a5233b42f5..1ec1618050 100644 --- a/official/c82050203.lua +++ b/official/c82050203.lua @@ -1,4 +1,5 @@ --ドテドテング +--Dotedotengu local s,id=GetID() function s.initial_effect(c) --return @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return (r&0x41)==0x41 and rp~=tp and e:GetHandler():IsPreviousControler(tp) + return (r&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) and rp~=tp and e:GetHandler():IsPreviousControler(tp) end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end @@ -28,4 +29,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82052602.lua b/official/c82052602.lua index d365883428..89af7fae05 100644 --- a/official/c82052602.lua +++ b/official/c82052602.lua @@ -1,4 +1,5 @@ --ガガガバック +--Gagagaback local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,12 +26,12 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do local pos=tc:GetPosition() - if tc:IsSetCard(0x54) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) + if tc:IsSetCard(SET_GAGAGA) and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE) and tc:GetControler()==tc:GetPreviousControler() then s[tc:GetControler()]=true end @@ -46,7 +47,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,Duel.GetTurnCount(),e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,4 +60,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(tp,#g*600,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82085295.lua b/official/c82085295.lua index e079be0244..c0fc639653 100644 --- a/official/c82085295.lua +++ b/official/c82085295.lua @@ -1,5 +1,5 @@ --魔神儀-ペンシルベル ---Impcantation Pensilver +--Impcantation Penciplume local s,id=GetID() function s.initial_effect(c) --spsummon @@ -38,9 +38,9 @@ function s.initial_effect(c) aux.addContinuousLizardCheck(c,LOCATION_MZONE) end s.listed_names={id} -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} function s.filter(c,e,tp) - return c:IsSetCard(0x117) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.costfilter(c) return c:IsRitualMonster() and not c:IsPublic() @@ -57,7 +57,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -91,5 +91,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) -end - +end \ No newline at end of file diff --git a/official/c82099401.lua b/official/c82099401.lua index fc9d708758..2de3a48df5 100644 --- a/official/c82099401.lua +++ b/official/c82099401.lua @@ -1,4 +1,5 @@ --水晶の占い師 +--Crystal Seer local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local back=Duel.GetDecktopGroup(tp,1) Duel.MoveSequence(back:GetFirst(),1) end -end +end \ No newline at end of file diff --git a/official/c82103466.lua b/official/c82103466.lua index 05d02e736c..9dd10c7860 100644 --- a/official/c82103466.lua +++ b/official/c82103466.lua @@ -1,4 +1,5 @@ --蛇神ゲー +--Divine Serpent Geh local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -83,7 +84,7 @@ end function s.adcon(e) local c=e:GetHandler() return Duel.GetAttacker()==c and c:GetBattleTarget() - and (Duel.GetCurrentPhase()==PHASE_DAMAGE or Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL) + and (Duel.IsPhase(PHASE_DAMAGE) or Duel.IsPhase(PHASE_DAMAGE_CAL)) end function s.adtg(e,c) return c==e:GetHandler():GetBattleTarget() @@ -114,8 +115,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(atk) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c82105704.lua b/official/c82105704.lua index 630dba9185..9fe460630d 100644 --- a/official/c82105704.lua +++ b/official/c82105704.lua @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)>0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then @@ -67,4 +67,4 @@ function s.indesval(e,re,r,rp) return true end return false -end +end \ No newline at end of file diff --git a/official/c82108372.lua b/official/c82108372.lua index 6ea7356d13..89f5f69ba3 100644 --- a/official/c82108372.lua +++ b/official/c82108372.lua @@ -1,4 +1,5 @@ --ムドラ +--Mudora local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_FAIRY)*200 -end +end \ No newline at end of file diff --git a/official/c82112494.lua b/official/c82112494.lua index d7a29dcfb6..a4b1916e6f 100644 --- a/official/c82112494.lua +++ b/official/c82112494.lua @@ -77,7 +77,7 @@ function s.spfilter(c,e,tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp) + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,nil,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end diff --git a/official/c82112775.lua b/official/c82112775.lua index a67272d96e..a4aa2b22ca 100644 --- a/official/c82112775.lua +++ b/official/c82112775.lua @@ -1,4 +1,5 @@ --D・D・M +--D.D.M. - Different Dimension Master local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,7 +20,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82114013.lua b/official/c82114013.lua index e1c81b0a8e..21fe69e39f 100644 --- a/official/c82114013.lua +++ b/official/c82114013.lua @@ -1,4 +1,5 @@ --ドラコニアの海竜騎兵 +--Sea Dragoons of Draconia local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82116191.lua b/official/c82116191.lua index d7da2c7548..4d8aa20f68 100644 --- a/official/c82116191.lua +++ b/official/c82116191.lua @@ -1,4 +1,5 @@ --ギガント・セファロタス +--Gigantic Cephalotus local s,id=GetID() function s.initial_effect(c) --atkup @@ -29,7 +30,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c82128978.lua b/official/c82128978.lua index f65bba9bb3..3266fd56c5 100644 --- a/official/c82128978.lua +++ b/official/c82128978.lua @@ -1,9 +1,9 @@ -- --- Libromancer Magigirl --- Scripted by Hatter +--Libromancer Magigirl +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,8 +14,8 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Ritual Summon 1 "Libromancer" monster - local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,0x17d),nil,aux.Stringid(id,1)) + --Ritual Summon 1 "Libromancer" monster + local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,SET_LIBROMANCER),nil,aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) c:RegisterEffect(e2) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.spcostfilter(c) return c:IsRitualMonster() and not c:IsPublic() end diff --git a/official/c82140600.lua b/official/c82140600.lua index bfb98f95c6..ccf26aa3c2 100644 --- a/official/c82140600.lua +++ b/official/c82140600.lua @@ -13,21 +13,21 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107a,0xa7,0xa8} +s.listed_series={SET_NOBLE_KNIGHT,SET_ARTORIGUS,SET_LAUNDSALLYN} function s.filter(c,e) - return c:IsSetCard(0x107a) and c:IsMonster() and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster() and c:IsAbleToRemove() and c:IsCanBeEffectTarget(e) and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e) if chk==0 then return #g>4 - and g:IsExists(Card.IsSetCard,1,nil,0xa7) and g:IsExists(Card.IsSetCard,1,nil,0xa8) + and g:IsExists(Card.IsSetCard,1,nil,SET_ARTORIGUS) and g:IsExists(Card.IsSetCard,1,nil,SET_LAUNDSALLYN) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xa7) + local g1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,SET_ARTORIGUS) g:Sub(g1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xa8) + local g2=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,SET_LAUNDSALLYN) g:Sub(g2) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g3=g:Select(tp,3,3,nil) @@ -45,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82162616.lua b/official/c82162616.lua index 479085d449..ae99072a5c 100644 --- a/official/c82162616.lua +++ b/official/c82162616.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} function s.cfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) + return c:IsFaceup() and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -31,7 +31,7 @@ function s.filter1(c,e,tp) end function s.filter2(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return c:IsRank(rk) and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 + return c:IsRank(rk) and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and mc:IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -54,5 +54,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end - +end \ No newline at end of file diff --git a/official/c82176812.lua b/official/c82176812.lua index f08052dbe3..986f307483 100644 --- a/official/c82176812.lua +++ b/official/c82176812.lua @@ -1,4 +1,5 @@ --魔装戦士 ハイドロータス +--Hydrotortoise, the Empowered Warrior local s,id=GetID() function s.initial_effect(c) --flip @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -25,4 +26,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82184400.lua b/official/c82184400.lua index d866a91c3e..1705097db7 100644 --- a/official/c82184400.lua +++ b/official/c82184400.lua @@ -1,12 +1,12 @@ -- --- Abyss Keeper --- Scripted by Hatter +--Abyss Keeper +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 WATER monsters + --2 WATER monsters Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),2,2) - -- Cannot be used as Link Material + --Cannot be used as Link Material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetCondition(s.lkcon) e1:SetValue(1) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -22,11 +22,11 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,id) - e2:SetCondition(function(e)return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e2:SetCondition(function(e)return e:GetHandler():IsLinkSummoned() end) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- Banish + --Banish local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_REMOVE) @@ -40,7 +40,7 @@ function s.initial_effect(c) end function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.spfilter(c,e,tp,zone) return c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) @@ -66,7 +66,7 @@ function s.rmfilter(c,e,tp) and (c:IsControler(1-tp) or (c:IsFaceup() and c:IsRace(RACE_FISH))) end function s.rmrescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -81,4 +81,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82197831.lua b/official/c82197831.lua index 6f273f6bb6..551dbe6bac 100644 --- a/official/c82197831.lua +++ b/official/c82197831.lua @@ -1,5 +1,5 @@ --驀進装甲ライノセイバー ---Rhynosaber, the Mad-Dash Armory +--Rampaging Smashtank Rhynosaber --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -21,18 +21,18 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetCountLimit(1,{id,1}) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,60,REASON_COST+REASON_DISCARD) + local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,60,REASON_COST|REASON_DISCARD) e:SetLabel(ct) end function s.atop(e,tp,eg,ep,ev,re,r,rp) @@ -42,7 +42,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(700*ct) c:RegisterEffect(e1) end @@ -50,10 +50,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter1(c,e,tp) local lv=c:GetLevel() return lv>0 and lv<7 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -83,14 +79,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c82199284.lua b/official/c82199284.lua index 55ee6c2267..e2dd2b8a49 100644 --- a/official/c82199284.lua +++ b/official/c82199284.lua @@ -1,4 +1,5 @@ --霞の谷のファルコン +--Mist Valley Falcon local s,id=GetID() function s.initial_effect(c) --attack cost @@ -23,4 +24,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.AttackCostPaid(2) end end -end +end \ No newline at end of file diff --git a/official/c82213171.lua b/official/c82213171.lua index 917c806f9e..951453b653 100644 --- a/official/c82213171.lua +++ b/official/c82213171.lua @@ -1,4 +1,5 @@ --闇王プロメティス +--Prometheus, King of the Shadows local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,14 +17,14 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,63,nil) + local cg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,63,nil) local ct=Duel.Remove(cg,POS_FACEUP,REASON_EFFECT) if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,1) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,1) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c82224646.lua b/official/c82224646.lua index 301b0f102f..65bda25d89 100644 --- a/official/c82224646.lua +++ b/official/c82224646.lua @@ -43,9 +43,9 @@ function s.initial_effect(c) e4:SetOperation(s.scop) c:RegisterEffect(e4) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.tnfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:HasLevel() and (not c:IsType(TYPE_TUNER) or c:IsLevelAbove(2)) + return c:IsFaceup() and (c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES)) and c:HasLevel() and (not c:IsType(TYPE_TUNER) or c:IsLevelAbove(2)) end function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tnfilter(chkc) end @@ -61,13 +61,13 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -76,7 +76,7 @@ function s.rmcon(e) return c:IsSummonLocation(LOCATION_EXTRA) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(3) and (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsCanBeSpecialSummoned(e,182,tp,false,false) + return c:IsLevelBelow(3) and (c:IsSetCard(SET_PERFORMAPAL) or c:IsSetCard(SET_ODD_EYES)) and c:IsCanBeSpecialSummoned(e,182,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -93,12 +93,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -129,7 +129,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -143,4 +143,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) end -end +end \ No newline at end of file diff --git a/official/c82243738.lua b/official/c82243738.lua index 98aae6f185..a13b7002bc 100644 --- a/official/c82243738.lua +++ b/official/c82243738.lua @@ -35,6 +35,7 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,true,nil) if g then g:KeepAlive() @@ -51,5 +52,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.con(e) - return Duel.IsMainPhase() and e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) -end + return Duel.IsMainPhase() and e:GetHandler():IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c82255872.lua b/official/c82255872.lua index 7fc065a3b8..fbdd5eb15d 100644 --- a/official/c82255872.lua +++ b/official/c82255872.lua @@ -1,7 +1,6 @@ --戦華史略-大丈夫之義 --Ancient Warriors Saga - Chivalrous Path --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,24 +38,24 @@ function s.initial_effect(c) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,1}) e4:SetCondition(s.discon) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.distg) e4:SetOperation(function(_,_,_,_,ev)Duel.NegateActivation(ev)end) c:RegisterEffect(e4) end s.listed_names={82255873} -s.listed_series={0x137} +s.listed_series={SET_ANCIENT_WARRIORS} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and - c:IsSetCard(0x137) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) + and c:IsSetCard(SET_ANCIENT_WARRIORS) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) end return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) end function s.cansstk(tp) - return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x137,TYPES_TOKEN,500,500,1,RACE_BEAST_WARRIOR,ATTRIBUTE_WIND) + return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_ANCIENT_WARRIORS,TYPES_TOKEN,500,500,1,RACE_BEAST_WARRIOR,ATTRIBUTE_WIND) end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return rp~=tp and s.cansstk(tp) end @@ -70,7 +69,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x137) + return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_ANCIENT_WARRIORS) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -80,4 +79,4 @@ end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) -end +end \ No newline at end of file diff --git a/official/c82257671.lua b/official/c82257671.lua index 7810e968d7..94ed7423c3 100644 --- a/official/c82257671.lua +++ b/official/c82257671.lua @@ -1,7 +1,6 @@ --ガッチリ@イグニスター --Gatchiri @Ignister --Scripted by Eerie Code, anime version by Larry126 - local s,id=GetID() function s.initial_effect(c) --Each cyberse monster get protected once, each turn @@ -61,12 +60,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) if tc:IsImmuneToEffect(e1) or tc:IsImmuneToEffect(e2) or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.AdjustInstantly(tc) @@ -92,7 +91,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) e1:SetOwnerPlayer(tp) tc:RegisterEffect(e1) end diff --git a/official/c82260502.lua b/official/c82260502.lua index 063e1b4841..8855f806f9 100644 --- a/official/c82260502.lua +++ b/official/c82260502.lua @@ -1,4 +1,5 @@ --ヒエラコスフィンクス +--Hieracosphinx local s,id=GetID() function s.initial_effect(c) --at limit @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.atlimit(e,c) return c:IsPosition(POS_FACEDOWN_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c82263578.lua b/official/c82263578.lua index 6cab7d33d8..6a1752b187 100644 --- a/official/c82263578.lua +++ b/official/c82263578.lua @@ -1,4 +1,5 @@ --戦火の残滓 +--After the Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c8226374.lua b/official/c8226374.lua index 01a2e3ef67..894c8d90e2 100644 --- a/official/c8226374.lua +++ b/official/c8226374.lua @@ -1,4 +1,5 @@ --ギミック・パペット-ハンプティ・ダンプティ +--Gimmick Puppet Humpty Dumpty local s,id=GetID() function s.initial_effect(c) --spsummon @@ -17,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c,e,tp) - return c:IsSetCard(0x1083) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82270047.lua b/official/c82270047.lua index 3592895dff..73f8e99003 100644 --- a/official/c82270047.lua +++ b/official/c82270047.lua @@ -1,4 +1,5 @@ --Kozmo Lightsword +--Kozmo Lightsword local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -31,14 +32,14 @@ function s.initial_effect(c) e8:SetProperty(EFFECT_FLAG_DELAY) e8:SetCountLimit(1,id) e8:SetCondition(s.thcon) - e8:SetCost(s.thcost) + e8:SetCost(Cost.PayLP(800)) e8:SetTarget(s.thtg) e8:SetOperation(s.thop) c:RegisterEffect(e8) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.filter(c) - return c:IsSetCard(0xd2) and c:IsRace(RACE_PSYCHIC) + return c:IsSetCard(SET_KOZMO) and c:IsRace(RACE_PSYCHIC) end function s.dircon(e) return e:GetHandler():GetEquipTarget():GetAttackAnnouncedCount()>0 @@ -46,10 +47,6 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToHand() end Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) @@ -59,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82293134.lua b/official/c82293134.lua index 757e0ac1c7..6a3b2d4610 100644 --- a/official/c82293134.lua +++ b/official/c82293134.lua @@ -1,4 +1,5 @@ --紋章獣レオ +--Heraldic Beast Leo local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -23,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:GetTurnID()==Duel.GetTurnCount() + return c:IsNormalSummoned() and c:GetTurnID()==Duel.GetTurnCount() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -39,7 +40,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x76) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_HERALDIC_BEAST) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -52,4 +53,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c82301904.lua b/official/c82301904.lua index 626a8bef7e..2b3eb7a6fa 100644 --- a/official/c82301904.lua +++ b/official/c82301904.lua @@ -45,8 +45,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -55,7 +55,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -79,12 +79,12 @@ function s.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(aux.TRUE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -93,7 +93,7 @@ function s.damfilter(c,p) end function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local g=Duel.GetFieldGroup(tp,0xe,0xe) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD) local dc=g:FilterCount(s.damfilter,nil,1-tp) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,dc*300) @@ -102,7 +102,7 @@ function s.sgfilter(c,p) return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p) end function s.sgop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetFieldGroup(tp,0xe,0xe) + local g=Duel.GetFieldGroup(tp,LOCATION_HAND|LOCATION_ONFIELD,LOCATION_HAND|LOCATION_ONFIELD) Duel.SendtoGrave(g,REASON_EFFECT) local og=Duel.GetOperatedGroup() local ct=og:FilterCount(s.sgfilter,nil,1-tp) @@ -110,4 +110,4 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,ct*300,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82308875.lua b/official/c82308875.lua index a175aa81b1..bc6150a44d 100644 --- a/official/c82308875.lua +++ b/official/c82308875.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_HANDES) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c82315403.lua b/official/c82315403.lua index 7f0dff847a..0e9b02bca7 100644 --- a/official/c82315403.lua +++ b/official/c82315403.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1093),1,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CYBER_DRAGON),1,aux.FilterBoolFunctionEx(Card.IsRace,RACE_MACHINE),2) --Cannot be target local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) @@ -40,13 +40,13 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1093} +s.listed_series={SET_CYBER_DRAGON} s.listed_names={CARD_CYBER_DRAGON} -s.material_setcode={0x93,0x1093} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.imunecond(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end @@ -55,7 +55,7 @@ function s.filter(c) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and c:IsPreviousControler(tp) and rp==1-tp end function s.spfilter(c,e,tp) @@ -63,13 +63,13 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) end @@ -81,7 +81,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.tg) e1:SetValue(s.tgvalue) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) @@ -94,4 +94,4 @@ function s.tgvalue(e,re,rp) end function s.tg(e,c) return c:IsFaceup() and c:IsType(TYPE_FUSION) -end +end \ No newline at end of file diff --git a/official/c82315772.lua b/official/c82315772.lua index 8cca401a97..6f99b00d92 100644 --- a/official/c82315772.lua +++ b/official/c82315772.lua @@ -1,4 +1,5 @@ --紋章獣エアレー +--Heraldic Beast Eale local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and - Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x76),c:GetControler(),LOCATION_MZONE,0,2,nil) -end + Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_HERALDIC_BEAST),c:GetControler(),LOCATION_MZONE,0,2,nil) +end \ No newline at end of file diff --git a/official/c82319644.lua b/official/c82319644.lua index 606dd5c0d8..1547088038 100644 --- a/official/c82319644.lua +++ b/official/c82319644.lua @@ -1,5 +1,5 @@ --邪王トラカレル ---Trakarele, the Evil King +--Tlakalel, His Malevolent Majesty --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -28,7 +28,7 @@ function s.check(atk) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttackBelow,e:GetLabel()),tp,0,LOCATION_MZONE,1,nil) end @@ -47,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82321037.lua b/official/c82321037.lua index 262ce74139..a2c1120028 100644 --- a/official/c82321037.lua +++ b/official/c82321037.lua @@ -92,4 +92,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c82324105.lua b/official/c82324105.lua index a04bb12b67..227b3b21f6 100644 --- a/official/c82324105.lua +++ b/official/c82324105.lua @@ -37,9 +37,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UNRELEASABLE_NONSUM) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c82324312.lua b/official/c82324312.lua index 335e4057e9..f2745dab80 100644 --- a/official/c82324312.lua +++ b/official/c82324312.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) --Switch to defense position after attacking local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -50,6 +50,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c8233522.lua b/official/c8233522.lua index 8b2e88e326..5bc079247a 100644 --- a/official/c8233522.lua +++ b/official/c8233522.lua @@ -1,4 +1,5 @@ --A・O・J サイクルリーダー +--Ally of Justice Cycle Reader local s,id=GetID() function s.initial_effect(c) --remove @@ -9,27 +10,22 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscardToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.filter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetTargetCards(e) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82361206.lua b/official/c82361206.lua index f0b5be757a..13988130da 100644 --- a/official/c82361206.lua +++ b/official/c82361206.lua @@ -1,4 +1,5 @@ --霊滅独鈷杵 +--Tokkosho of Ghost Destroying local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -22,13 +23,13 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82361809.lua b/official/c82361809.lua index aa612c541e..a0be1a27aa 100644 --- a/official/c82361809.lua +++ b/official/c82361809.lua @@ -1,9 +1,9 @@ --- スケアクロー・トライヒハート --- Scareclaw Reich Heart --- Scripted by Hatter +--スケアクロー・トライヒハート +--Scareclaw Reichheart +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon procedure + --Special Summon procedure local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetValue(s.hspval) c:RegisterEffect(e1) - -- Search + --Search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW) @@ -27,8 +27,8 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x17c} -s.sclawfilter=aux.FaceupFilter(Card.IsSetCard,0x17c) +s.listed_series={SET_SCARECLAW} +s.sclawfilter=aux.FaceupFilter(Card.IsSetCard,SET_SCARECLAW) function s.hspval(e,c) local zone=0 local left_right=0 @@ -38,10 +38,10 @@ function s.hspval(e,c) left_right=tc:IsInMainMZone() and 1 or 0 zone=(zone|tc:GetColumnZone(LOCATION_MZONE,left_right,left_right,tp)) end - return 0,zone&0x1f + return 0,zone&ZONES_MMZ end function s.thfilter(c) - return c:IsSetCard(0x17c) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SCARECLAW) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c82377606.lua b/official/c82377606.lua index af4bece26a..fafd810622 100644 --- a/official/c82377606.lua +++ b/official/c82377606.lua @@ -9,16 +9,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end s.listed_series={SET_ALLY_OF_JUSTICE} -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_ALLY_OF_JUSTICE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_ALLY_OF_JUSTICE),tp,LOCATION_MZONE,0,1,e:GetHandler()) end @@ -33,7 +29,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetTextAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c82382815.lua b/official/c82382815.lua index a9f295eef7..89d6300509 100644 --- a/official/c82382815.lua +++ b/official/c82382815.lua @@ -57,4 +57,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82385847.lua b/official/c82385847.lua index 571cb6a6ae..549e6c47f4 100644 --- a/official/c82385847.lua +++ b/official/c82385847.lua @@ -55,4 +55,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82386016.lua b/official/c82386016.lua index cb5f435238..ffa9adb0e0 100644 --- a/official/c82386016.lua +++ b/official/c82386016.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end function s.chainfilter(re,tp,cid) - return not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return not re:IsSpellTrapEffect() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 end @@ -25,17 +25,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACES_BEAST_BWARRIOR_WINGB),tp,LOCATION_MZONE,0,nil) @@ -50,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ct=g:GetClassCount(Card.GetRace) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Draw(p,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8240199.lua b/official/c8240199.lua index 3a6e04735c..2928d364e7 100644 --- a/official/c8240199.lua +++ b/official/c8240199.lua @@ -1,4 +1,5 @@ --青き眼の賢士 +--Sage with Eyes of Blue local s,id=GetID() function s.initial_effect(c) --To hand @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.gvcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.gvtg) e2:SetOperation(s.gvop) c:RegisterEffect(e2) @@ -36,15 +37,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.gvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.gvfilter(c,ft) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave() and (ft>0 or c:GetSequence()<5) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BLUE_EYES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -69,4 +66,4 @@ function s.gvop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c82404868.lua b/official/c82404868.lua index fe43a5727f..37595d2aa7 100644 --- a/official/c82404868.lua +++ b/official/c82404868.lua @@ -1,4 +1,5 @@ --黒魔術のヴェール +--Dark Magic Veil local s,id=GetID() function s.initial_effect(c) --Activate @@ -6,28 +7,24 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82419869.lua b/official/c82419869.lua index 2cc1665b02..e8df3051d7 100644 --- a/official/c82419869.lua +++ b/official/c82419869.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xb2} +s.listed_series={SET_UA} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -67,7 +67,7 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -80,4 +80,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82422049.lua b/official/c82422049.lua index f697299e9e..4ec59a51ea 100644 --- a/official/c82422049.lua +++ b/official/c82422049.lua @@ -1,4 +1,5 @@ --ガスタへの祈り +--Blessings for Gusto local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.filter1(c) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToDeck() end function s.filter2(c,e,tp) - return c:IsSetCard(0x10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.filter1,tp,LOCATION_GRAVE,0,2,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -35,10 +36,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) if g1:GetFirst():IsRelateToEffect(e) and g1:GetNext():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) + Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if g2:GetFirst():IsRelateToEffect(e) then Duel.BreakEffect() Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c82428674.lua b/official/c82428674.lua index 01bdc57a3a..d5f341c829 100644 --- a/official/c82428674.lua +++ b/official/c82428674.lua @@ -3,8 +3,9 @@ --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --activate + --Banish "Cyber Dragon(s)" then destroy an equal number of cards your opponent controls local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,8 +13,9 @@ function s.initial_effect(c) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) - --search + --Add 1 "Cyber" Spell/Trap from your Deck to your hand local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_DESTROYED) @@ -24,21 +26,21 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x94,0x93} +s.listed_series={SET_CYBERNETIC,SET_CYBER} s.listed_names={CARD_CYBER_DRAGON} function s.rmfilter(c) return (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsCode(CARD_CYBER_DRAGON) and c:IsLevelAbove(1) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) and #dg>0 end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,1-tp,LOCATION_ONFIELD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,nil) if #dg==0 or #g==0 then return end local rg=aux.SelectUnselectGroup(g,e,tp,1,#dg,aux.dpcheck(Card.GetLevel),1,tp,HINTMSG_REMOVE) local rc=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) @@ -53,7 +55,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_ONFIELD) and r&REASON_EFFECT~=0 end function s.thfilter(c) - return c:IsSpellTrap() and (c:IsSetCard(0x94) or c:IsSetCard(0x93)) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard({SET_CYBERNETIC,SET_CYBER}) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -66,5 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c8243121.lua b/official/c8243121.lua index 9ca31e2f63..7da6e40fe9 100644 --- a/official/c8243121.lua +++ b/official/c8243121.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetCondition(s.atkcon1) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg1) e1:SetOperation(s.atkop1) c:RegisterEffect(e1) @@ -23,17 +23,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcon2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg2) e2:SetOperation(s.atkop2) c:RegisterEffect(e2) end -s.listed_series={0xf7} -function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_LYRILUSC} function s.atkfilter1(c) - return c:IsFaceup() and c:IsSetCard(0xf7) + return c:IsFaceup() and c:IsSetCard(SET_LYRILUSC) end function s.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter1(chkc) end @@ -47,19 +44,19 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) - for oc in aux.Next(g) do + for oc in g:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e1) if oc:HasLevel() then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_LEVEL) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e2) end if oc:IsType(TYPE_XYZ) then @@ -67,7 +64,7 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_RANK) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e3) end end @@ -75,7 +72,7 @@ end function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return a:IsControler(1-tp) and d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0xf7) + return a:IsControler(1-tp) and d and d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SET_LYRILUSC) end function s.atktg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -91,7 +88,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(a:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) d:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c82432018.lua b/official/c82432018.lua index bff38025d4..b4fc4b8da8 100644 --- a/official/c82432018.lua +++ b/official/c82432018.lua @@ -1,4 +1,5 @@ --凶暴化の仮面 +--Mask of Brutality local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -17,7 +18,7 @@ function s.initial_effect(c) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetRange(LOCATION_SZONE) e5:SetCountLimit(1) e5:SetCondition(s.mtcon) @@ -25,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,1000) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -33,4 +34,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c82434071.lua b/official/c82434071.lua index 1cd64764c2..d7aa7db9e5 100644 --- a/official/c82434071.lua +++ b/official/c82434071.lua @@ -1,7 +1,6 @@ --インフェルニティ・ポーン --Infernity Pawn --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -11,15 +10,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_PREDRAW) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end --Lists "Infernity" and "Void" archetype -s.listed_series={0xb,0xc5} - +s.listed_series={SET_INFERNITY,SET_VOID} --During your draw phase, if you have no cards in hand function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 @@ -27,11 +25,11 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end --Check for a "Void" spell/trap function s.filter(c) - return c:IsSetCard(0xc5) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_VOID) and c:IsSpellTrap() and c:IsSSetable() end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local b1=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xb) + local b1=Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,SET_INFERNITY) local b2=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return b1 or b2 end if b1 and b2 then @@ -57,7 +55,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -80,14 +78,14 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) end --Activation legality function s.toptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xb) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,SET_INFERNITY) end end --Place 1 "Infernity" monster on top of deck function s.topop(e,tp,eg,ep,ev,re,r,rp) _replace_count=_replace_count+1 if _replace_count<=_replace_max then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3)) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0xb) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,SET_INFERNITY) local tc=g:GetFirst() if tc then Duel.ShuffleDeck(tp) diff --git a/official/c82452993.lua b/official/c82452993.lua index 109edc91eb..a18d1d5298 100644 --- a/official/c82452993.lua +++ b/official/c82452993.lua @@ -1,4 +1,5 @@ --孤高の格闘家 +--Lone Wolf local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCondition(s.rcon) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_IMMUNE_EFFECT) @@ -43,5 +44,5 @@ function s.rcon(e) return e:GetOwner():IsHasCardTarget(e:GetHandler()) end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) and re:GetOwnerPlayer()~=e:GetOwnerPlayer() -end + return re:IsMonsterEffect() and re:GetOwnerPlayer()~=e:GetOwnerPlayer() +end \ No newline at end of file diff --git a/official/c82458280.lua b/official/c82458280.lua index 07224d0fbb..0b522953bd 100644 --- a/official/c82458280.lua +++ b/official/c82458280.lua @@ -1,4 +1,5 @@ --マジック・ホール・ゴーレム +--Magic Hole Golem local s,id=GetID() function s.initial_effect(c) --direct attack @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -42,14 +43,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DIRECT_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c82466274.lua b/official/c82466274.lua index 45de068f64..28ea8134a9 100644 --- a/official/c82466274.lua +++ b/official/c82466274.lua @@ -33,17 +33,17 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.discond) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) end -s.listed_series={0x129} +s.listed_series={SET_EVIL_EYE} s.listed_names={CARD_EVIL_EYE_SELENE} function s.filter(c) - return c:IsSetCard(0x129) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_EVIL_EYE) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -63,17 +63,17 @@ function s.descond(e) return #eg>0 and eg:IsExists(Card.IsCode,1,nil,CARD_EVIL_EYE_SELENE) end function s.destfilt(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.destfilt(chkc) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(s.destfilt,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.destfilt,tp,0,LOCATION_MZONE,1,1,nil) - if Duel.GetCurrentPhase()==PHASE_STANDBY then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,EFFECT_FLAG_OATH,2,Duel.GetTurnCount()) + if Duel.IsPhase(PHASE_STANDBY) then + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,EFFECT_FLAG_OATH,2,Duel.GetTurnCount()) else - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,EFFECT_FLAG_OATH,1) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end @@ -99,4 +99,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82482194.lua b/official/c82482194.lua index 6c11bf6438..e8d0278893 100644 --- a/official/c82482194.lua +++ b/official/c82482194.lua @@ -1,4 +1,5 @@ --ミレニアム・スコーピオン +--Millennium Scorpion local s,id=GetID() function s.initial_effect(c) --atkup @@ -25,7 +26,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c82489470.lua b/official/c82489470.lua index 73a86e9a9f..4feffcd97a 100644 --- a/official/c82489470.lua +++ b/official/c82489470.lua @@ -1,5 +1,5 @@ --軒轅の相剣師 ---Unlikely Swordsoul Allies +--The Golden Swordsoul --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -20,10 +20,10 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_REMOVE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -58,14 +58,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82496097.lua b/official/c82496097.lua index f742169500..b569271e47 100644 --- a/official/c82496097.lua +++ b/official/c82496097.lua @@ -1,7 +1,6 @@ --クロノダイバー・ベゼルシップ --Time Thief Bezel Ship --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Attach 1 card from opponent's GY to 1 "Time Thief" Xyz monster as material @@ -13,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCost(s.matcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) c:RegisterEffect(e1) @@ -29,14 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x126} - -function s.matcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_TIME_THIEF} function s.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x126) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_TIME_THIEF) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end @@ -81,7 +75,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c82498947.lua b/official/c82498947.lua index 7d0ab91921..1cbdbe6f67 100644 --- a/official/c82498947.lua +++ b/official/c82498947.lua @@ -1,4 +1,5 @@ --氷結界の守護陣 +--Defender of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetCondition(s.con) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.con(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x2f),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ICE_BARRIER),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.tg(e,c) return c:GetAttack()>=e:GetHandler():GetDefense() -end +end \ No newline at end of file diff --git a/official/c8251996.lua b/official/c8251996.lua index bd678fa376..fb00f66093 100644 --- a/official/c8251996.lua +++ b/official/c8251996.lua @@ -29,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82529174.lua b/official/c82529174.lua index 9b9d7cb6cc..5bb921aa58 100644 --- a/official/c82529174.lua +++ b/official/c82529174.lua @@ -1,4 +1,5 @@ --希望の光 +--Ray of Hope local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,5 +25,5 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c82542267.lua b/official/c82542267.lua index 9667f21897..26ba9c1188 100644 --- a/official/c82542267.lua +++ b/official/c82542267.lua @@ -1,4 +1,5 @@ --墓掘りグール +--Gravedigger Ghoul local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,14 +16,14 @@ function s.filter(c) return c:IsAbleToRemove() and c:IsMonster() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82556058.lua b/official/c82556058.lua index 382da92b76..954307f937 100644 --- a/official/c82556058.lua +++ b/official/c82556058.lua @@ -66,7 +66,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end function s.selfdestg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c82562802.lua b/official/c82562802.lua index 83f2e1226e..07021f74ef 100644 --- a/official/c82562802.lua +++ b/official/c82562802.lua @@ -1,4 +1,5 @@ --サイバー・ダーク・クロー +--Cyberdark Claw local s,id=GetID() function s.initial_effect(c) --search S/T @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -36,14 +37,9 @@ function s.initial_effect(c) e3:SetOperation(s.op) c:RegisterEffect(e3) end -s.listed_series={0x4093} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_CYBERDARK} function s.filter2(c) - return c:IsSetCard(0x4093) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_CYBERDARK) and c:IsSpellTrap() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil) end @@ -76,7 +72,7 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter1(c) - return c:IsSetCard(0x4093) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CYBERDARK) and c:IsMonster() and c:IsAbleToHand() end function s.con(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -95,4 +91,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c82566662.lua b/official/c82566662.lua index 938dd0349d..2956fc6afa 100644 --- a/official/c82566662.lua +++ b/official/c82566662.lua @@ -1,7 +1,6 @@ --トウテツドラゴン --Taotie Dragon --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -37,7 +36,7 @@ function s.valcheck(e,c) e:SetLabel(typ) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabelObject():GetLabel()~=0 + return e:GetHandler():IsLinkSummoned() and e:GetLabelObject():GetLabel()~=0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) local typ=e:GetLabelObject():GetLabel() @@ -51,9 +50,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.fuscond) e1:SetValue(s.fuslimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) end if (typ&TYPE_SYNCHRO)~=0 then local e2=Effect.CreateEffect(c) @@ -64,9 +63,9 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,1) e2:SetCondition(s.syncond) e2:SetValue(s.synlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end if (typ&TYPE_XYZ)~=0 then local e3=Effect.CreateEffect(c) @@ -77,22 +76,22 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(0,1) e3:SetCondition(s.xyzcond) e3:SetValue(s.xyzlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end end function s.fuscond(e) return Duel.IsBattlePhase() end function s.fuslimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.syncond(e) return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and Duel.IsMainPhase() end function s.synlimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.xyzcond(e) local ph=Duel.GetCurrentPhase() diff --git a/official/c82579942.lua b/official/c82579942.lua index d448464501..8a8e02da5e 100644 --- a/official/c82579942.lua +++ b/official/c82579942.lua @@ -1,4 +1,5 @@ --ライトレイ マドール +--Lightray Madoor local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.spcon(e,c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c82593786.lua b/official/c82593786.lua index dfb03f9126..68c16af0c4 100644 --- a/official/c82593786.lua +++ b/official/c82593786.lua @@ -1,4 +1,5 @@ --タスケルトン +--Bacon Saver local s,id=GetID() function s.initial_effect(c) --disable attack @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_DUEL) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -19,4 +20,4 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c82627406.lua b/official/c82627406.lua index e21f6d98e8..09030468da 100644 --- a/official/c82627406.lua +++ b/official/c82627406.lua @@ -1,4 +1,5 @@ --キウイ・マジシャン・ガール +--Kiwi Magician Girl local s,id=GetID() function s.initial_effect(c) --atk up @@ -10,8 +11,8 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -31,32 +32,23 @@ function s.initial_effect(c) e3:SetValue(aux.tgoval) c:RegisterEffect(e3) end -s.listed_series={0x20a2} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_MAGICIAN_GIRL} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x20a2),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MAGICIAN_GIRL),tp,LOCATION_MZONE,0,1,nil) end end function s.ctfilter(c) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsMonster() and c:IsSetCard(0x20a2) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsMonster() and c:IsSetCard(SET_MAGICIAN_GIRL) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x20a2),tp,LOCATION_MZONE,0,nil) - local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil) + local tg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_MAGICIAN_GIRL),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) if #tg>0 and #g>0 then local d=g:GetClassCount(Card.GetCode)*300 - local sc=tg:GetFirst() - for sc in aux.Next(tg) do + for sc in tg:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(d) sc:RegisterEffect(e1) local e2=e1:Clone() @@ -64,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) sc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c82633039.lua b/official/c82633039.lua index 6d732e82c6..75e31e32e7 100644 --- a/official/c82633039.lua +++ b/official/c82633039.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -60,6 +60,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82633308.lua b/official/c82633308.lua index cff90d45ae..c2a0ab8f66 100644 --- a/official/c82633308.lua +++ b/official/c82633308.lua @@ -1,4 +1,5 @@ --サイコ・チャージ +--Psychic Overload local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,12 +27,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8264361.lua b/official/c8264361.lua index 3bb3baf424..f2d8b5c5d0 100644 --- a/official/c8264361.lua +++ b/official/c8264361.lua @@ -1,5 +1,5 @@ --暗影の闇霊使いダルク ---Dharc the Dark Charmer, Umbral +--Dharc the Dark Charmer, Gloomy local s,id=GetID() function s.initial_effect(c) --Link Summon @@ -37,7 +37,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end @@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp==1-tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp==1-tp and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsMonster() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand() @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c82661461.lua b/official/c82661461.lua index 0f2d448c83..970351320d 100644 --- a/official/c82661461.lua +++ b/official/c82661461.lua @@ -1,11 +1,11 @@ --- EMオッドアイズ・バレット --- Performapal Odd-Eyes Valet --- Scripted by Nellag +--EMオッドアイズ・バレット +--Performapal Odd-Eyes Valet +--Scripted by Nellag local s,id=GetID() function s.initial_effect(c) - -- Enable Pendulum Summon + --Enable Pendulum Summon Pendulum.AddProcedure(c) - -- Decrease ATK + --Decrease ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Send 1 "Performapal" or "Odd-Eyes" monster from your Deck to the GY + --Send 1 "Performapal" or "Odd-Eyes" monster from your Deck to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_LVCHANGE) @@ -31,7 +31,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - -- Place itself in your Pendulum Zone + --Place itself in your Pendulum Zone local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,2)) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -42,7 +42,7 @@ function s.initial_effect(c) e4:SetOperation(s.penop) c:RegisterEffect(e4) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} s.listed_names={id} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local tg=Duel.GetAttacker() @@ -55,18 +55,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() local pc=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_PENDULUM),tp,LOCATION_EXTRA,0,nil) if pc>0 and at and at:IsRelateToBattle() and at:IsFaceup() then - -- Decrease ATK + --Decrease ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-pc*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) at:RegisterEffect(e1) end end function s.tgfilter(c) - return c:IsAbleToGrave() and (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsMonster() - and not c:IsCode(id) + return c:IsAbleToGrave() and c:IsSetCard({SET_PERFORMAPAL,SET_ODD_EYES}) and c:IsMonster() and not c:IsCode(id) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -75,16 +74,15 @@ end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then - -- Change this card's Level + --Change this card's Level local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -100,4 +98,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.CheckPendulumZones(tp) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c82670878.lua b/official/c82670878.lua index 4534c571fc..e0681b8489 100644 --- a/official/c82670878.lua +++ b/official/c82670878.lua @@ -1,4 +1,5 @@ --血涙のオーガ +--Ogre of the Scarlet Sorrow local s,id=GetID() function s.initial_effect(c) --spsummon @@ -46,7 +47,7 @@ function s.check(e,tp,eg,ep,ev,re,r,rp) s[1-tc:GetControler()]=s[1-tc:GetControler()]+1 if s[1-tc:GetControler()]==1 then s[2]=tc - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) elseif s[1-tc:GetControler()]==2 then Duel.RaiseEvent(tc,EVENT_CUSTOM+id,e,0,0,0,0) end @@ -59,7 +60,7 @@ function s.check2(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil and s[tp]==2 + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil and s[tp]==2 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -83,7 +84,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(tc:GetAttack()) c:RegisterEffect(e1) local e2=e1:Clone() @@ -98,10 +99,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(0,LOCATION_MZONE) e3:SetValue(s.atlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e3) end end function s.atlimit(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c8267140.lua b/official/c8267140.lua index 000f576d50..15193a14e3 100644 --- a/official/c8267140.lua +++ b/official/c8267140.lua @@ -1,4 +1,5 @@ --コズミック・サイクロン +--Cosmic Cyclone local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_END_PHASE) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) return c:IsSpellTrap() and c:IsAbleToRemove() end @@ -32,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82685480.lua b/official/c82685480.lua index 8fbcac2dfb..53dc36907d 100644 --- a/official/c82685480.lua +++ b/official/c82685480.lua @@ -1,4 +1,5 @@ --海竜神の怒り +--Rage of Kairyu-Shin local s,id=GetID() function s.initial_effect(c) --activate @@ -44,9 +45,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetLabel(seq*0x10000) e1:SetOperation(s.disop) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.disop(e,tp) return e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c82693042.lua b/official/c82693042.lua index f3ea7babe7..a8b16c0a8c 100644 --- a/official/c82693042.lua +++ b/official/c82693042.lua @@ -1,4 +1,5 @@ --混沌球体 +--Sphere of Chaos local s,id=GetID() function s.initial_effect(c) --attribute @@ -33,7 +34,7 @@ function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c) return c:GetLevel()==3 and c:IsAbleToHand() @@ -49,4 +50,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c82693917.lua b/official/c82693917.lua index c9a378cc8d..78e108be93 100644 --- a/official/c82693917.lua +++ b/official/c82693917.lua @@ -1,4 +1,5 @@ --フォーチュンレディ・ウインディー +--Fortune Lady Wind local s,id=GetID() function s.initial_effect(c) --atk,def @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -32,12 +33,12 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.value(e,c) return c:GetLevel()*300 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -46,15 +47,15 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x31),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_FORTUNE_LADY),tp,LOCATION_MZONE,0,nil) local dt=Duel.GetMatchingGroupCount(s.filter,tp,0,LOCATION_ONFIELD,nil) e:SetLabel(ct) return dt>=ct @@ -63,11 +64,11 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x31),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_FORTUNE_LADY),tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) if ct>#g then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local sg=g:Select(tp,ct,ct,nil) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82697249.lua b/official/c82697249.lua index 3389a219d0..4137fc4ce4 100644 --- a/official/c82697249.lua +++ b/official/c82697249.lua @@ -1,4 +1,5 @@ --No.59 背反の料理人 +--Number 59: Crooked Cook local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -33,10 +34,6 @@ end function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,e:GetHandler()) @@ -57,8 +54,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(ct*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c82697428.lua b/official/c82697428.lua index 3dc383cbb1..582f88146b 100644 --- a/official/c82697428.lua +++ b/official/c82697428.lua @@ -1,6 +1,5 @@ --V・HEROウィッチ・レイド --Vision HERO Witch Raider - local s,id=GetID() function s.initial_effect(c) --Can also tribute trap cards for its tribute summon @@ -24,10 +23,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x8} - +s.listed_series={SET_HERO} function s.counterfilter(c) - return c:IsSetCard(0x8) + return c:IsSetCard(SET_HERO) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -35,7 +33,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -43,15 +41,15 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x8) + return not c:IsSetCard(SET_HERO) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end diff --git a/official/c82699999.lua b/official/c82699999.lua index e572482721..a077e25a15 100644 --- a/official/c82699999.lua +++ b/official/c82699999.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.discon) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.distg) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end) c:RegisterEffect(e1) diff --git a/official/c82732705.lua b/official/c82732705.lua index a129df00da..628f43b06a 100644 --- a/official/c82732705.lua +++ b/official/c82732705.lua @@ -1,11 +1,12 @@ --スキルドレイン +--Skill Drain local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) c:RegisterEffect(e1) --disable local e2=Effect.CreateEffect(c) @@ -19,7 +20,3 @@ end function s.disable(e,c) return c:IsType(TYPE_EFFECT) or (c:GetOriginalType()&TYPE_EFFECT)==TYPE_EFFECT end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end diff --git a/official/c82734805.lua b/official/c82734805.lua index 27aa10278f..e3450e2b0b 100644 --- a/official/c82734805.lua +++ b/official/c82734805.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xbb),1,99,14799437,23440231) + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_INFERNOID),1,99,14799437,23440231) --spsummon success local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -21,8 +21,8 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0xbb} -s.material_setcode=0xbb +s.listed_series={SET_INFERNOID} +s.material_setcode=SET_INFERNOID function s.valcheck(e,c) local hc=e:GetHandler() local ct=hc:GetMaterial():GetClassCount(Card.GetCode,hc,SUMMON_TYPE_FUSION,hc:GetControler()) @@ -84,7 +84,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local g2=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_REMOVED,0,1,3,nil) g1:Merge(g2) if #g1>0 then - Duel.SendtoGrave(g1,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g1,REASON_EFFECT|REASON_RETURN) end end if ct>=10 then @@ -92,4 +92,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND) Duel.SendtoGrave(g1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82735249.lua b/official/c82735249.lua index ab5f3e3a6c..a7be869b14 100644 --- a/official/c82735249.lua +++ b/official/c82735249.lua @@ -1,5 +1,5 @@ --ゲネラールプローベ ---Dress Rehearsal +--Generalprobe --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -46,10 +46,10 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={75304793} -s.listed_series={0x1066} +s.listed_series={SET_SYMPHONIC_WARRIOR} s.counter_place_list={0x35} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x1066) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re and re:GetHandler():IsSetCard(SET_SYMPHONIC_WARRIOR) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x35,1) @@ -59,7 +59,7 @@ function s.thcost1(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveCounter(tp,1,0,0x35,3,REASON_COST) end function s.thfilter1(c) - return c:IsSetCard(0x1066) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end @@ -75,7 +75,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x1066) and c:IsSummonPlayer(tp) + return c:IsFaceup() and c:IsSetCard(SET_SYMPHONIC_WARRIOR) and c:IsSummonPlayer(tp) end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) diff --git a/official/c82738008.lua b/official/c82738008.lua index 2cc8cf1d95..0ed8f0f084 100644 --- a/official/c82738008.lua +++ b/official/c82738008.lua @@ -17,10 +17,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={CARD_ALBAZ} -s.listed_series={0x166} +s.listed_series={SET_DESPIA} --To hand + potential Fusion Summon function s.thfilter(c) - return c:IsAbleToHand() and ((c:IsSetCard(0x166) and c:IsMonster()) or c:IsCode(CARD_ALBAZ)) + return c:IsAbleToHand() and ((c:IsSetCard(SET_DESPIA) and c:IsMonster()) or c:IsCode(CARD_ALBAZ)) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_MZONE,0,nil) @@ -52,7 +52,7 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c82738277.lua b/official/c82738277.lua index 0f4bd23d6c..b6f07ea96d 100644 --- a/official/c82738277.lua +++ b/official/c82738277.lua @@ -33,13 +33,13 @@ function s.initial_effect(c) e3:SetOperation(s.retop) c:RegisterEffect(e3) end -s.listed_series={0x4c,0x89,0x108a} +s.listed_series={SET_TRAP_HOLE,SET_HOLE,SET_TRAPTRIX} function s.efilter(e,te) local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end function s.filter(c) - return c:IsMonster() and c:IsSetCard(0x108a) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_TRAPTRIX) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -75,4 +75,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,sg:GetFirst(),tp,false) end end -end +end \ No newline at end of file diff --git a/official/c82744076.lua b/official/c82744076.lua index 710beeb5b5..63772975bb 100644 --- a/official/c82744076.lua +++ b/official/c82744076.lua @@ -1,4 +1,5 @@ --チューニングガム +--Tuning Gum local s,id=GetID() function s.initial_effect(c) --tuner @@ -21,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -38,7 +39,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetTarget(s.atklimit) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.atklimit(e,c) @@ -61,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end @@ -84,4 +85,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8275702.lua b/official/c8275702.lua index 4d76edb483..040da0145d 100644 --- a/official/c8275702.lua +++ b/official/c8275702.lua @@ -1,4 +1,5 @@ --宝玉の契約 +--Crystal Promise local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,sp) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,sp,true,false) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,sp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82760689.lua b/official/c82760689.lua index 5aeca8b563..a6ecd8968c 100644 --- a/official/c82760689.lua +++ b/official/c82760689.lua @@ -1,4 +1,5 @@ --宝札雲 +--Lucky Cloud local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,11 +34,11 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x18} +s.listed_series={SET_CLOUDIAN} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - if not s[0] and tc:IsFaceup() and tc:IsSetCard(0x18) then + if not s[0] and tc:IsFaceup() and tc:IsSetCard(SET_CLOUDIAN) then if s[1]:IsContains(tc) then s[0]=true else s[1]:AddCard(tc) end end @@ -50,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.drcon) e1:SetOperation(s.drop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c,g) @@ -61,4 +62,4 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82768499.lua b/official/c82768499.lua index 6505cee81f..46c9d66c1e 100644 --- a/official/c82768499.lua +++ b/official/c82768499.lua @@ -1,4 +1,5 @@ --螺旋のストライクバースト +--Spiral Flame Strike local s,id=GetID() function s.initial_effect(c) --activate @@ -9,15 +10,15 @@ function s.initial_effect(c) e1:SetTarget(s.target) c:RegisterEffect(e1) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.thfilter(c) - return c:IsSetCard(0x99) and c:GetLevel()==7 and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand() + return c:IsSetCard(SET_ODD_EYES) and c:GetLevel()==7 and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end - local b1=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x99),tp,LOCATION_ONFIELD,0,1,nil) + local b1=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ODD_EYES),tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) if chk==0 then return b1 or b2 end local op=0 if b1 and b2 then @@ -37,9 +38,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) else e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e:SetProperty(0) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,nil) e:SetOperation(s.thop) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -48,9 +49,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c82773292.lua b/official/c82773292.lua index 1e3822b83e..8b550e5790 100644 --- a/official/c82773292.lua +++ b/official/c82773292.lua @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(function(_,re) return re:IsMonsterEffect() and not re:GetHandler():IsRace(RACE_FAIRY) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c82777208.lua b/official/c82777208.lua index 22ad5bb113..a2914fdbcf 100644 --- a/official/c82777208.lua +++ b/official/c82777208.lua @@ -1,9 +1,9 @@ --- 氷水のアクティ --- Acty of the Icejade --- Scripted by Hatter +--氷水のアクティ +--Icejade Acti +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Draw 1 card + --Draw 1 card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DRAW) @@ -18,7 +18,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon + --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -28,12 +28,12 @@ function s.initial_effect(c) e3:SetCode(EVENT_DESTROYED) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x16e} +s.listed_series={SET_ICEJADE} function s.drcostfilter(c) return c:IsMonster() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() end @@ -54,25 +54,25 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(p,d,REASON_EFFECT) end function s.spconfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.spconfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x16e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ICEJADE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82782870.lua b/official/c82782870.lua index ff7fa76574..3f947b18d6 100644 --- a/official/c82782870.lua +++ b/official/c82782870.lua @@ -1,4 +1,4 @@ ---Japanese name +--巳剣之尊 草那藝 --Mitsurugi no Mikoto, Kusanagi --scripted by Naim local s,id=GetID() diff --git a/official/c82791472.lua b/official/c82791472.lua index be0c3bf6e3..72dfa35924 100644 --- a/official/c82791472.lua +++ b/official/c82791472.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e3:SetCondition(s.descon) e3:SetCost(s.descost) e3:SetTarget(s.destg) @@ -49,16 +49,15 @@ function s.initial_effect(c) e4:SetOperation(s.ctop) c:RegisterEffect(e4) end -s.listed_series={0x137} - +s.listed_series={SET_ANCIENT_WARRIORS} function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x137),tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ANCIENT_WARRIORS),tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g and g:IsExists(Card.IsControler,1,nil,tp) end function s.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x137)) + return not (re:IsMonsterEffect() and not re:GetHandler():IsSetCard(SET_ANCIENT_WARRIORS)) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() @@ -73,11 +72,11 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x137) + return re:IsMonsterEffect() and not re:GetHandler():IsSetCard(SET_ANCIENT_WARRIORS) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -105,4 +104,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.GetControl(c,1-tp) end -end +end \ No newline at end of file diff --git a/official/c8279188.lua b/official/c8279188.lua index 681f01f71b..f23c82a5d6 100644 --- a/official/c8279188.lua +++ b/official/c8279188.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -38,9 +38,9 @@ function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,3) e:GetHandler():RegisterEffect(e1) - if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and tp~=Duel.GetTurnPlayer() and tg:IsOnField() and tg:IsCanBeEffectTarget(e) + if Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.IsTurnPlayer(1-tp) and tg:IsOnField() and tg:IsCanBeEffectTarget(e) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then e:SetProperty(EFFECT_FLAG_CARD_TARGET) Duel.SetTargetCard(tg) @@ -57,12 +57,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD) Duel.NegateAttack() end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -72,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if ct==3 then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82821760.lua b/official/c82821760.lua index b79455567a..b7f8c99111 100644 --- a/official/c82821760.lua +++ b/official/c82821760.lua @@ -1,4 +1,5 @@ --巨大戦艦 ビッグ・コアMk-Ⅲ +--B.E.S. Big Core MK-3 local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x1f) @@ -44,12 +45,12 @@ function s.initial_effect(c) e6:SetCategory(CATEGORY_TODECK) e6:SetType(EFFECT_TYPE_IGNITION) e6:SetRange(LOCATION_GRAVE) - e6:SetCost(aux.bfgcost) + e6:SetCost(Cost.SelfBanish) e6:SetTarget(s.tdtg) e6:SetOperation(s.tdop) c:RegisterEffect(e6) end -s.listed_series={0x15} +s.listed_series={SET_BES} function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() @@ -83,7 +84,7 @@ function s.rctop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSetCard(0x15) and c:IsAbleToDeck() + return c:IsSetCard(SET_BES) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end @@ -93,4 +94,4 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82828051.lua b/official/c82828051.lua index d324055833..2e1be55b29 100644 --- a/official/c82828051.lua +++ b/official/c82828051.lua @@ -1,4 +1,5 @@ --アースクエイク +--Earthquake local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) -end +end \ No newline at end of file diff --git a/official/c82832464.lua b/official/c82832464.lua index 1a238ffab5..798a9bee3c 100644 --- a/official/c82832464.lua +++ b/official/c82832464.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x11f)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_NEPHTHYS)) e2:SetValue(300) c:RegisterEffect(e2) --spaw @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) @@ -36,20 +36,20 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_NEPHTHYS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -71,5 +71,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetLabelObject(),REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c8284390.lua b/official/c8284390.lua index 35889bf3b3..56e78ddfb4 100644 --- a/official/c8284390.lua +++ b/official/c8284390.lua @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,tp,sumtp,sumpos) @@ -69,7 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-600) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c82878489.lua b/official/c82878489.lua index 3ea674fa0c..10a968f72c 100644 --- a/official/c82878489.lua +++ b/official/c82878489.lua @@ -1,4 +1,5 @@ --シャイン・キャッスル +--Shine Palace local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT)) @@ -8,4 +9,4 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(700) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c82886276.lua b/official/c82886276.lua index 25ab26bbe5..229aff0eda 100644 --- a/official/c82886276.lua +++ b/official/c82886276.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp) return Duel.GetLP(tp)<=2000 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) diff --git a/official/c82888408.lua b/official/c82888408.lua index 623be1e0f2..7eae2bf1a5 100644 --- a/official/c82888408.lua +++ b/official/c82888408.lua @@ -24,4 +24,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82896870.lua b/official/c82896870.lua index c60c5a449e..d6d5835042 100644 --- a/official/c82896870.lua +++ b/official/c82896870.lua @@ -28,12 +28,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={30068120,70245411} -s.listed_series={0xa9,0x46} +s.listed_series={SET_FLUFFAL,SET_FUSION} function s.setfilter(c) return c:IsCode(70245411) and c:IsSSetable() end function s.gyfilter(c) - return c:IsMonster() and (c:IsCode(30068120) or c:IsSetCard(0xa9)) and c:IsAbleToGrave() + return c:IsMonster() and (c:IsCode(30068120) or c:IsSetCard(SET_FLUFFAL)) and c:IsAbleToGrave() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.setfilter(chkc) end @@ -56,16 +56,16 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_FUSION end function s.tdfilter(c) - return c:IsSetCard(0x46) and c:IsSpell() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsAbleToDeck() + return c:IsSetCard(SET_FUSION) and c:IsSpell() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED|LOCATION_GRAVE) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82913020.lua b/official/c82913020.lua index 21e44465d3..c28eae6871 100644 --- a/official/c82913020.lua +++ b/official/c82913020.lua @@ -1,7 +1,6 @@ --セイクリッド・カドケウス --Constellar Caduceus --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -37,11 +36,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Constellar" archetype -s.listed_series={0x53} - +s.listed_series={SET_CONSTELLAR} --Check for a "Constellar" monster, except "Constellar Caduceus" function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x53) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_CONSTELLAR) and not c:IsCode(id) end --If it exists function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -61,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for "Constellar" spell/trap function s.thfilter(c) - return c:IsSpellTrap() and c:IsSetCard(0x53) and c:IsAbleToHand() + return c:IsSpellTrap() and c:IsSetCard(SET_CONSTELLAR) and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -79,7 +77,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end --Check if attached to "Constellar" Xyz monster function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSetCard(0x53) + return e:GetHandler():IsSetCard(SET_CONSTELLAR) end --Activation legality function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -97,4 +95,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if bc and bc:IsRelateToBattle() then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82944432.lua b/official/c82944432.lua index aa42575036..13d9366581 100644 --- a/official/c82944432.lua +++ b/official/c82944432.lua @@ -1,6 +1,5 @@ --機甲忍者ブレード・ハート --Blade Armor Ninja - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,22 +14,17 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x2b} - +s.listed_series={SET_NINJA} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x2b) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) + return c:IsFaceup() and c:IsSetCard(SET_NINJA) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -47,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c82946847.lua b/official/c82946847.lua index 4b7ab45054..a0c047f5d5 100644 --- a/official/c82946847.lua +++ b/official/c82946847.lua @@ -1,6 +1,5 @@ --プチラノドン --Petiteranodon - local s,id=GetID() function s.initial_effect(c) --If destroyed by card effect, special summon 1 level 4+ dinosaur monster @@ -37,7 +36,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c82956492.lua b/official/c82956492.lua index 082de2e385..e6244033d9 100644 --- a/official/c82956492.lua +++ b/official/c82956492.lua @@ -1,8 +1,9 @@ --DDD神託王ダルク +--D/D/D Oracle King d'Arc local s,id=GetID() function s.initial_effect(c) --fusion material - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) c:EnableReviveLimit() --damage conversion local e2=Effect.CreateEffect(c) @@ -14,8 +15,8 @@ function s.initial_effect(c) e2:SetValue(s.rev) c:RegisterEffect(e2) end -s.listed_series={0xaf} -s.material_setcode=0xaf +s.listed_series={SET_DD} +s.material_setcode=SET_DD function s.rev(e,re,r,rp,rc) return (r&REASON_EFFECT)~=0 -end +end \ No newline at end of file diff --git a/official/c82962242.lua b/official/c82962242.lua index e83da6e3ef..28f507e768 100644 --- a/official/c82962242.lua +++ b/official/c82962242.lua @@ -46,12 +46,12 @@ function s.initial_effect(c) c:RegisterEffect(e4) e3:SetLabelObject(e4) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:GetAttack()>c:GetAttack() end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x8e) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_VAMPIRE) and c:IsControler(tp) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) @@ -75,7 +75,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -108,4 +108,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c82971335.lua b/official/c82971335.lua index 1c7f32dfa3..3f7f5af971 100644 --- a/official/c82971335.lua +++ b/official/c82971335.lua @@ -1,4 +1,5 @@ --フォーチュンレディ・アーシー +--Fortune Lady Earth local s,id=GetID() function s.initial_effect(c) --atk,def @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.lvcon) e3:SetOperation(s.lvop) c:RegisterEffect(e3) @@ -37,7 +38,7 @@ function s.value(e,c) return c:GetLevel()*400 end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) + return Duel.IsTurnPlayer(tp) and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -46,7 +47,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -58,4 +59,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c82977464.lua b/official/c82977464.lua index 0574202536..9bce9638ac 100644 --- a/official/c82977464.lua +++ b/official/c82977464.lua @@ -1,7 +1,6 @@ --S-Force スペシメン --S-Force Specimen --Scripted by edo9300 - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Security Force" monster, that is banished or in your GY @@ -23,19 +22,18 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.seqtg) e2:SetOperation(s.seqop) e2:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e2) end -s.listed_series={0x15a} - +s.listed_series={SET_S_FORCE} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end function s.filter(c,e,tp,zone) - return c:IsSetCard(0x15a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsFaceup() + return c:IsSetCard(SET_S_FORCE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsFaceup() end local function getzones(tp) local lg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) @@ -43,14 +41,14 @@ local function getzones(tp) for tc in aux.Next(lg) do zone=(zone|tc:GetColumnZone(LOCATION_MZONE,0,0,tp)) end - return zone&0x1f + return zone&ZONES_MMZ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp,getzones(tp)) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp,getzones(tp)) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,getzones(tp)) end + and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp,getzones(tp)) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,getzones(tp)) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp,getzones(tp)) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -62,13 +60,13 @@ end function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x15a),tp,LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x15a),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_S_FORCE),tp,LOCATION_MZONE,0,1,1,nil) end function s.seqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsImmuneToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2)) -end +end \ No newline at end of file diff --git a/official/c82983267.lua b/official/c82983267.lua index 18e87d3f0e..920cb399e4 100644 --- a/official/c82983267.lua +++ b/official/c82983267.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -78,4 +78,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c82994509.lua b/official/c82994509.lua index eed2d573a5..991830b207 100644 --- a/official/c82994509.lua +++ b/official/c82994509.lua @@ -43,4 +43,4 @@ function s.handop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardHand(c:GetPreviousControler(),nil,1,1,REASON_EFFECT) end e:Reset() -end +end \ No newline at end of file diff --git a/official/c82999629.lua b/official/c82999629.lua index 1fd956aca9..bb7f11105e 100644 --- a/official/c82999629.lua +++ b/official/c82999629.lua @@ -1,4 +1,5 @@ --ウォーターワールド +--Umiiruka local s,id=GetID() function s.initial_effect(c) --activate @@ -20,4 +21,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-400) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c83011277.lua b/official/c83011277.lua index 2a7f16d6ea..f1fed97ed6 100644 --- a/official/c83011277.lua +++ b/official/c83011277.lua @@ -1,4 +1,5 @@ --キラー・トマト +--Mystic Tomato local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c83021423.lua b/official/c83021423.lua index 9b407badd0..8a9debc53d 100644 --- a/official/c83021423.lua +++ b/official/c83021423.lua @@ -1,4 +1,5 @@ --チャッチャカアーチャー +--Chachaka Archer local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -28,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83027236.lua b/official/c83027236.lua index 6dd13cf15d..3239e36538 100644 --- a/official/c83027236.lua +++ b/official/c83027236.lua @@ -33,4 +33,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83032858.lua b/official/c83032858.lua index 062da6b161..cc3bdffbf4 100644 --- a/official/c83032858.lua +++ b/official/c83032858.lua @@ -24,9 +24,9 @@ function s.initial_effect(c) e2:SetOperation(s.attop) c:RegisterEffect(e2) end -s.listed_series={0x400d,0x113} +s.listed_series={SET_ELEMENTSABER,SET_ELEMENTAL_LORD} function s.costfilter(c) - return c:IsSetCard(0x400d) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_ELEMENTSABER) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local fg=Group.CreateGroup() @@ -34,7 +34,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) fg:AddCard(pe:GetHandler()) end local loc=LOCATION_HAND - if #fg>0 then loc=LOCATION_HAND+LOCATION_DECK end + if #fg>0 then loc=LOCATION_HAND|LOCATION_DECK end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,loc,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.costfilter,tp,loc,0,1,1,nil):GetFirst() @@ -46,12 +46,12 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) fc=fg:Select(tp,1,1,nil) end Duel.Hint(HINT_CARD,0,fc:GetCode()) - fc:RegisterFlagEffect(61557074,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + fc:RegisterFlagEffect(61557074,RESETS_STANDARD_PHASE_END,0,0) end Duel.SendtoGrave(tc,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsMonster() and not c:IsCode(id) and (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsMonster() and not c:IsCode(id) and (c:IsSetCard(SET_ELEMENTSABER) or c:IsSetCard(SET_ELEMENTAL_LORD)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -83,6 +83,6 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c83035296.lua b/official/c83035296.lua index c6d6a6eda8..2181a6692a 100644 --- a/official/c83035296.lua +++ b/official/c83035296.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -63,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SendtoHand(h,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,h) end -end +end \ No newline at end of file diff --git a/official/c83039608.lua b/official/c83039608.lua index 80e8fb080a..03b79d6a77 100644 --- a/official/c83039608.lua +++ b/official/c83039608.lua @@ -1,7 +1,6 @@ --魔轟神獣アバンク ---The Fabled Afanc +--The Fabled Abanc --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -15,10 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x35} - +s.listed_series={SET_FABLED} function s.cfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsDiscardable() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,14 +27,14 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then + if Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD|REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c83039729.lua b/official/c83039729.lua index da8ab13e5c..d2df9a1b44 100644 --- a/official/c83039729.lua +++ b/official/c83039729.lua @@ -1,4 +1,5 @@ --六武衆の師範 +--Grandmaster of the Six Samurai local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -22,18 +23,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x3d),c:GetControler(),LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SIX_SAMURAI),c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return not c:IsReason(REASON_BATTLE) and rp==1-tp and c:IsPreviousControler(tp) end function s.filter(c) - return c:IsSetCard(0x3d) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -48,4 +49,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c83048208.lua b/official/c83048208.lua index f6f314b4ad..e7ff32cb0e 100644 --- a/official/c83048208.lua +++ b/official/c83048208.lua @@ -1,4 +1,5 @@ --電子光虫-LEDバグ +--Digital Bug LEDybug local s,id=GetID() function s.initial_effect(c) --xyzlimit @@ -62,18 +63,18 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetOperation(s.drop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Draw(tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83054225.lua b/official/c83054225.lua index 9958da9597..c85f916d36 100644 --- a/official/c83054225.lua +++ b/official/c83054225.lua @@ -1,4 +1,5 @@ --緊急発進 +--Scramble!! Scramble!! local s,id=GetID() function s.initial_effect(c) --activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x101b} +s.listed_series={SET_MECHA_PHANTOM_BEAST} s.listed_names={TOKEN_MECHA_PHANTOM_BEAST} function s.cfilter(c) return not c:IsType(TYPE_TOKEN) @@ -20,7 +21,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,0,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x101b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MECHA_PHANTOM_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) @@ -32,7 +33,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectReleaseGroupCost(tp,Card.IsCode,1,ct,false,nil,nil,TOKEN_MECHA_PHANTOM_BEAST) Duel.Release(g,REASON_COST) e:SetLabel(#g) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,#g,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -49,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=sg:GetFirst() for tc in aux.Next(sg) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end Duel.SpecialSummonComplete() sg:KeepAlive() @@ -79,4 +80,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.retfilter,nil,e:GetLabel()) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83061014.lua b/official/c83061014.lua index 597b269402..89bab968c2 100644 --- a/official/c83061014.lua +++ b/official/c83061014.lua @@ -1,4 +1,5 @@ --後に亀と呼ばれる神 +--Numen erat Testudo local s,id=GetID() function s.initial_effect(c) --disable spsummon @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsAttackBelow(1800) -end +end \ No newline at end of file diff --git a/official/c8310162.lua b/official/c8310162.lua index dd1b0427a3..6c910fdb09 100644 --- a/official/c8310162.lua +++ b/official/c8310162.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterSummonCode(74509280),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x23),1,1) + Synchro.AddProcedure(c,aux.FilterSummonCode(74509280),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_MALEFIC),1,1) c:EnableReviveLimit() c:SetUniqueOnField(1,1,id) --special summon @@ -32,7 +32,7 @@ function s.descon(e) return not Duel.IsEnvironment(27564031) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c83102080.lua b/official/c83102080.lua index 1c131f586e..0c60dcd7b0 100644 --- a/official/c83102080.lua +++ b/official/c83102080.lua @@ -1,4 +1,5 @@ --パラレル・ツイスター +--Parallel Twister local s,id=GetID() function s.initial_effect(c) --Activate @@ -49,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83104731.lua b/official/c83104731.lua index 25b0178366..e8ca962c6b 100644 --- a/official/c83104731.lua +++ b/official/c83104731.lua @@ -1,4 +1,5 @@ --古代の機械巨人 +--Ancient Gear Golem local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -28,4 +29,4 @@ function s.aclimit(e,re,tp) end function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c83107873.lua b/official/c83107873.lua index b0f5e60228..3369250cb0 100644 --- a/official/c83107873.lua +++ b/official/c83107873.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_THUNDRA) @@ -31,23 +31,19 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x11c} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_THUNDER_DRAGON} function s.spfilter(c,e,tp) - return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x11c) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(SET_THUNDER_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) @@ -71,5 +67,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,#g,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c83108603.lua b/official/c83108603.lua index 0cf8b7ccb5..bfd3746712 100644 --- a/official/c83108603.lua +++ b/official/c83108603.lua @@ -1,4 +1,5 @@ --陽炎柱 +--Hazy Pillar local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_DECREASE_TRIBUTE) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_HAND,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x107d)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_HAZY_FLAME)) e2:SetValue(0x1) c:RegisterEffect(e2) --material @@ -26,13 +27,13 @@ function s.initial_effect(c) e3:SetOperation(s.matop) c:RegisterEffect(e3) end -s.listed_series={0x107d} +s.listed_series={SET_HAZY_FLAME} function s.xyzfilter(c,tp) return c:IsFaceup() and c:IsType(TYPE_XYZ) - and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,c) + and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,c) end function s.matfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x107d) and c:IsMonster() and not c:IsType(TYPE_TOKEN) + return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(SET_HAZY_FLAME) and c:IsMonster() and not c:IsType(TYPE_TOKEN) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc,tp) end @@ -45,9 +46,9 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,tc) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,tc) if #g>0 then Duel.Overlay(tc,g,true) end end -end +end \ No newline at end of file diff --git a/official/c83121692.lua b/official/c83121692.lua index dd11167071..f41213fbc7 100644 --- a/official/c83121692.lua +++ b/official/c83121692.lua @@ -1,4 +1,5 @@ --E・HERO テンペスター +--Elemental HERO Tempest local s,id=GetID() function s.initial_effect(c) --fusion material @@ -22,7 +23,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.material_setcode={0x8,0x3008} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -41,12 +42,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsFacedown() or not c:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end if c==tc then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) else c:SetCardTarget(tc) end if c:GetFlagEffect(id+1)==0 then - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -54,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.indtg) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -64,4 +65,4 @@ function s.indtg(e,c) else return e:GetHandler():IsHasCardTarget(c) end -end +end \ No newline at end of file diff --git a/official/c83133491.lua b/official/c83133491.lua index 12f306cb63..b9d3a254f9 100644 --- a/official/c83133491.lua +++ b/official/c83133491.lua @@ -1,4 +1,5 @@ --重力解除 +--Zero Gravity local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.ChangePosition(sg,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c83135907.lua b/official/c83135907.lua index 43d3bfb185..85dda3b069 100644 --- a/official/c83135907.lua +++ b/official/c83135907.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.destg) @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c83152482.lua b/official/c83152482.lua index a1b45cb919..dcf36b6c7e 100644 --- a/official/c83152482.lua +++ b/official/c83152482.lua @@ -28,13 +28,13 @@ function s.initial_effect(c) end function s.lkcon(e) local c=e:GetHandler() - return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsLinkSummoned() end function s.spcheck(g,lc,sumtype,tp) return g:CheckSameProperty(Card.GetRace,lc,sumtype,tp) or g:CheckSameProperty(Card.GetAttribute,lc,sumtype,tp) end function s.filter(c,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp,c) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,tp,c) end function s.eqfilter(c,tp,oc) return (c:IsOriginalRace(oc:GetOriginalRace()) or c:IsOriginalAttribute(oc:GetOriginalAttribute())) and c:CheckUniqueOnField(tp) and c:IsMonster() and not c:IsForbidden() @@ -46,13 +46,13 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp,tc):GetFirst() + local ec=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,tp,tc):GetFirst() if not ec then return end local loc=ec:GetLocation() if s.equipop(tc,e,tp,ec) and loc==LOCATION_DECK then @@ -64,7 +64,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetLabel(ec:GetCode()) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -75,18 +75,17 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(true) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) return true end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsCode(e:GetLabel()) -end - +end \ No newline at end of file diff --git a/official/c8316565.lua b/official/c8316565.lua index ac3e7f7e6e..c910c0b230 100644 --- a/official/c8316565.lua +++ b/official/c8316565.lua @@ -1,4 +1,5 @@ --ジョルト・カウンター +--Jolt Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,9 +14,9 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x84),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_BATTLIN_BOXER),tp,LOCATION_MZONE,0,1,nil) and ph>PHASE_MAIN1 and ph0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c83225447.lua b/official/c83225447.lua index d4f2a9e94e..46f0298290 100644 --- a/official/c83225447.lua +++ b/official/c83225447.lua @@ -1,4 +1,5 @@ --ドーピング +--Stim-Pack local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -20,7 +21,7 @@ function s.initial_effect(c) --atkdown local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetLabelObject(e2) @@ -34,10 +35,10 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) pe:SetValue(700) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local pe=e:GetLabelObject() local atk=pe:GetValue() pe:SetValue(atk-200) -end +end \ No newline at end of file diff --git a/official/c83228073.lua b/official/c83228073.lua index 2777be4f4f..da5da556cd 100644 --- a/official/c83228073.lua +++ b/official/c83228073.lua @@ -26,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() if not a:IsRelateToBattle() then return end Duel.Destroy(a,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83235263.lua b/official/c83235263.lua index 1e92808579..80add363f8 100644 --- a/official/c83235263.lua +++ b/official/c83235263.lua @@ -1,4 +1,5 @@ --ディノインフィニティ +--Tyranno Infinity local s,id=GetID() function s.initial_effect(c) --base attack @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.atkval(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_DINOSAUR),c:GetControler(),LOCATION_REMOVED,0,nil)*1000 -end +end \ No newline at end of file diff --git a/official/c8323633.lua b/official/c8323633.lua index ae87c99a12..9b00d119bd 100644 --- a/official/c8323633.lua +++ b/official/c8323633.lua @@ -1,4 +1,5 @@ --夜霧のスナイパー +--Cloak and Dagger local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) e1:SetLabel(ac) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -54,4 +55,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) g:AddCard(c) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83236601.lua b/official/c83236601.lua index 02f612de2e..6419ed9e59 100644 --- a/official/c83236601.lua +++ b/official/c83236601.lua @@ -44,12 +44,12 @@ function s.initial_effect(c) Duel.RegisterEffect(ge2,0) end) end -s.listed_series={0xba,0x95} +s.listed_series={SET_RAIDRAPTOR,SET_RANK_UP_MAGIC} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.tgfilter(c) - return c:IsSetCard(0xba) and c:IsAbleToGrave() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,13 +64,13 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id+1,RESETS_STANDARD_PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id+1)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2 + return e:GetHandler():GetFlagEffect(id+1)>0 and DDuel.IsPhase(PHASE_MAIN2) end function s.filter(c) - return c:IsSetCard(0x95) and c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsAbleToHand() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsQuickPlaySpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -91,9 +91,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xba) -end + return not c:IsSetCard(SET_RAIDRAPTOR) +end \ No newline at end of file diff --git a/official/c83239739.lua b/official/c83239739.lua index 2c0360ba0c..7013565bf4 100644 --- a/official/c83239739.lua +++ b/official/c83239739.lua @@ -29,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c83241722.lua b/official/c83241722.lua index 86423e9759..217cc3e1ba 100644 --- a/official/c83241722.lua +++ b/official/c83241722.lua @@ -1,4 +1,5 @@ --リバースダイス +--Dice Re-Roll local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_TOSS_DICE_NEGATE) e1:SetCondition(s.coincon) e1:SetOperation(s.coinop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.coincon(e,tp,eg,ep,ev,re,r,rp) @@ -24,9 +25,9 @@ function s.coinop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end if Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_CARD,0,id) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local ct1=(ev&0xff) local ct2=(ev>>16) Duel.TossDice(ep,ct1,ct2) end -end +end \ No newline at end of file diff --git a/official/c83257450.lua b/official/c83257450.lua index 4679f5d602..ae10ba021d 100644 --- a/official/c83257450.lua +++ b/official/c83257450.lua @@ -53,7 +53,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,3)) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e5:SetCode(EVENT_PHASE+PHASE_STANDBY) + e5:SetCode(EVENT_PHASE|PHASE_STANDBY) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c83258273.lua b/official/c83258273.lua index 2df07b6b59..8050b0fc4d 100644 --- a/official/c83258273.lua +++ b/official/c83258273.lua @@ -1,4 +1,5 @@ --追い剥ぎゾンビ +--Robbin' Zombie local s,id=GetID() function s.initial_effect(c) --activate @@ -19,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp + return ep~=tp and eg:GetFirst():IsControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -28,4 +29,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83266006.lua b/official/c83266006.lua index ca96b3a8ce..af9a2f36da 100644 --- a/official/c83266006.lua +++ b/official/c83266006.lua @@ -1,5 +1,5 @@ --逢華妖麗譚-魔妖語 ---Ghost Meets Girl - A Mayakashi's Story +--Ghost Meets Girl - A Mayakashi's Manuscript --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -21,7 +21,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.filter(c,e,tp) return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttribute()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,1,nil,e,tp,c:GetAttribute()) end function s.spfilter(c,e,tp,att) return c:IsRace(RACE_ZOMBIE) and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) @@ -33,16 +33,16 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetAttribute()):GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetAttribute()):GetFirst() if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 then - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_PHASE+PHASE_END) @@ -61,7 +61,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,0)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) @@ -79,4 +79,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_ZOMBIE) -end +end \ No newline at end of file diff --git a/official/c83272895.lua b/official/c83272895.lua index 58dc164c6e..611df81817 100644 --- a/official/c83272895.lua +++ b/official/c83272895.lua @@ -1,4 +1,5 @@ --バチバチバチ +--Bachibachibachi local s,id=GetID() function s.initial_effect(c) --effect gain @@ -20,14 +21,14 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end -end +end \ No newline at end of file diff --git a/official/c83274244.lua b/official/c83274244.lua index 7889b037d3..c7fd0d60ab 100644 --- a/official/c83274244.lua +++ b/official/c83274244.lua @@ -1,4 +1,5 @@ --ドドドウォリアー +--Dododo Warrior local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -38,7 +39,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.negop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE) e:GetHandler():RegisterEffect(e1) end function s.negop(e,tp,eg,ep,ev,re,r,rp) @@ -46,4 +47,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if ep~=tp and loc==LOCATION_GRAVE then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c8327462.lua b/official/c8327462.lua index 75bd612542..9313348ed2 100644 --- a/official/c8327462.lua +++ b/official/c8327462.lua @@ -1,7 +1,8 @@ --デス・バード +--Skullbird local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,3170832,732302) -end +end \ No newline at end of file diff --git a/official/c83283063.lua b/official/c83283063.lua index e35d70c6df..895a8ece69 100644 --- a/official/c83283063.lua +++ b/official/c83283063.lua @@ -1,4 +1,5 @@ --戦神-不知火 +--Shiranui Shogunsaga local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -29,9 +30,9 @@ function s.cfilter(c) return c:IsRace(RACE_ZOMBIE) and c:GetBaseAttack()>0 and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) e:SetLabel(g:GetFirst():GetBaseAttack()) end @@ -42,13 +43,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefenseBelow(0) @@ -63,6 +64,6 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c83286340.lua b/official/c83286340.lua index f6e2599aa0..4af22c91c6 100644 --- a/official/c83286340.lua +++ b/official/c83286340.lua @@ -30,17 +30,17 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_names={0x161} +s.listed_series={SET_WAR_ROCK} --Search and increase ATK function s.thcon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) return bc and bc:IsAttribute(ATTRIBUTE_EARTH) and bc:IsRace(RACE_WARRIOR) end function s.thfilter(c) - return c:IsSetCard(0x161) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_WAR_ROCK) and c:IsAbleToHand() and not c:IsCode(id) end function s.atkfilter(c) - return c:IsSetCard(0x161) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_WAR_ROCK) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) @@ -62,7 +62,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(200) tc:RegisterEffect(e1) end @@ -75,17 +75,17 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x161) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WAR_ROCK) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #sg==0 then return end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end \ No newline at end of file diff --git a/official/c83289866.lua b/official/c83289866.lua index 1cd4df12f4..1dfcabce16 100644 --- a/official/c83289866.lua +++ b/official/c83289866.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x128)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_WITCHCRAFTER)) e2:SetValue(s.indct) c:RegisterEffect(e2) --replace discard effect @@ -33,7 +33,7 @@ function s.initial_effect(c) e4:SetOperation(s.tfop) c:RegisterEffect(e4) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.indct(e,re,r,rp) if (r&REASON_BATTLE+REASON_EFFECT)~=0 then return 1 @@ -42,7 +42,7 @@ function s.indct(e,re,r,rp) end end function s.tfcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()==tp + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end @@ -55,4 +55,4 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c83293307.lua b/official/c83293307.lua index cbf3e2b857..7b721a46d0 100644 --- a/official/c83293307.lua +++ b/official/c83293307.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.filter(c) - return c:IsSetCard(0x104) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_KRAWLER) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -47,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c83295594.lua b/official/c83295594.lua index d1bf6d6aad..c102f59120 100644 --- a/official/c83295594.lua +++ b/official/c83295594.lua @@ -1,4 +1,5 @@ --スチーム・シンクロン +--Steam Synchron local s,id=GetID() function s.initial_effect(c) --synchro effect @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.sccon) e1:SetTarget(s.sctarg) @@ -16,7 +17,7 @@ function s.initial_effect(c) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp - and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + and (Duel.IsMainPhase()) end function s.sctarg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end @@ -31,4 +32,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),c) end -end +end \ No newline at end of file diff --git a/official/c83301414.lua b/official/c83301414.lua index a045919700..39a1c134a1 100644 --- a/official/c83301414.lua +++ b/official/c83301414.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.spfilter(c,e,tp) - return c:IsSetCard(0x128) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x128),tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()==tp + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_WITCHCRAFTER),tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(tp) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,tp,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83303851.lua b/official/c83303851.lua index 50ff2b6469..e8ce645ee3 100644 --- a/official/c83303851.lua +++ b/official/c83303851.lua @@ -22,20 +22,20 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1,id) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.cfilter(c) - return c:IsSetCard(0xaf) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_DD) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsFaceup() and c:IsSpellTrap() @@ -86,12 +86,12 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local g=Duel.GetTargetCards(e) @@ -104,4 +104,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c) return c:GetRace()~=RACE_FIEND -end +end \ No newline at end of file diff --git a/official/c83315222.lua b/official/c83315222.lua index 5812f2d72a..4ef9605acd 100644 --- a/official/c83315222.lua +++ b/official/c83315222.lua @@ -3,54 +3,54 @@ --scripted by Naim local s,id=GetID() function s.initial_effect(c) - --Special Summon this card + --Special Summon this card from your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCondition(function(_,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) + e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end) e1:SetCost(s.sumlimitcost) e1:SetTarget(s.selfsptg) e1:SetOperation(s.selfspop) c:RegisterEffect(e1) - --Special Summon up to 2 "Battlin' Boxer" monsters from the Deck + --Special Summon up to 2 "Battlin' Boxer" monsters with different names from your Deck, except "Battlin' Boxer Promoter" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.combined_costs(s.sumlimitcost,aux.SelfTributeCost)) - e2:SetTarget(s.sptg) - e2:SetOperation(s.spop) + e2:SetCost(Cost.AND(s.sumlimitcost,Cost.SelfTribute)) + e2:SetTarget(s.decksptg) + e2:SetOperation(s.deckspop) c:RegisterEffect(e2) - --Increase or decrease the Level of all "Battlin' Boxer" monsters you control + --Increase or decrease the Levels of all "Battlin' Boxer" monsters you currently control by 1 local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_LVCHANGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,2}) - e3:SetCost(s.combined_costs(s.sumlimitcost,aux.bfgcost)) + e3:SetCost(Cost.AND(s.sumlimitcost,Cost.SelfBanish)) e3:SetTarget(s.lvtg) e3:SetOperation(s.lvop) c:RegisterEffect(e3) - Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(_c) return _c:IsSetCard(SET_BATTLIN_BOXER) end) + Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,function(c) return c:IsSetCard(SET_BATTLIN_BOXER) end) end s.listed_names={id} s.listed_series={SET_BATTLIN_BOXER} function s.sumlimitcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end - --Cannot Special Summon, except "Battlin' Boxer" monsters + --You cannot Special Summon monsters during the turn you activate any of this card's effects, except "Battlin' Boxer" monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,3)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetTarget(function(_,c) return not c:IsSetCard(SET_BATTLIN_BOXER) end) + e1:SetTarget(function(e,c) return not c:IsSetCard(SET_BATTLIN_BOXER) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end @@ -58,7 +58,7 @@ function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.selfspop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -66,24 +66,18 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -function s.combined_costs(cost1,cost2) - return function(...) - local b1,b2=cost1(...),cost2(...) - return b1 and b2 - end -end -function s.spfilter(c,e,tp) +function s.deckspfilter(c,e,tp) return c:IsSetCard(SET_BATTLIN_BOXER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end -function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end -function s.spop(e,tp,eg,ep,ev,re,r,rp) +function s.deckspop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft==0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.deckspfilter,tp,LOCATION_DECK,0,nil,e,tp) if #g==0 then return end ft=math.min(ft,#g,2) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end @@ -93,12 +87,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(SET_BATTLIN_BOXER) and c:HasLevel() + return c:IsSetCard(SET_BATTLIN_BOXER) and c:HasLevel() and c:IsFaceup() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil) if chk==0 then return #g>0 end - Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,0) + Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,#g,tp,1) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil) @@ -108,10 +102,10 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,4)}, {b2,aux.Stringid(id,5)}) - local value=(op==1 and op) or -1 + local value=(op==1 and 1) or -1 local c=e:GetHandler() for tc in g:Iter() do - ---Increase or decrease the Level by 1 + ---Increase or decrease the Levels of all "Battlin' Boxer" monsters you currently control by 1 local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) @@ -120,4 +114,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end \ No newline at end of file +end diff --git a/official/c83326048.lua b/official/c83326048.lua index bb6999a1ae..e274fa23e5 100644 --- a/official/c83326048.lua +++ b/official/c83326048.lua @@ -36,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,1) e1:SetTarget(s.sumlimit) e1:SetLabel(ct) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Negate the effects of monsters of that type while on the field local e2=Effect.CreateEffect(c) @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTarget(function(e,c) return c:IsType(e:GetLabel()) end) e2:SetLabel(ct) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) diff --git a/official/c83334932.lua b/official/c83334932.lua index 32515c3609..e997f8734a 100644 --- a/official/c83334932.lua +++ b/official/c83334932.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.thcon) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -32,11 +32,6 @@ s.listed_names={id} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.thfilter(c) return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c83340560.lua b/official/c83340560.lua index b404caec0d..6cd7e8f5ce 100644 --- a/official/c83340560.lua +++ b/official/c83340560.lua @@ -1,4 +1,4 @@ --- +--偉大なるダブルキャスター --The Great Double Casted Caster --Scripted by Eerie Code local s,id=GetID() @@ -47,7 +47,7 @@ function s.valcheck(e,c) e:SetLabel(atk) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -58,22 +58,22 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return r&(REASON_EFFECT+REASON_BATTLE)~=0 + return r&(REASON_EFFECT|REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) return c:IsNonEffectMonster() and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c83347294.lua b/official/c83347294.lua index 8e23a154a5..bb491feb00 100644 --- a/official/c83347294.lua +++ b/official/c83347294.lua @@ -1,4 +1,5 @@ --オッドアイズ・ランサー・ドラゴン +--Odd-Eyes Lancer Dragon local s,id=GetID() function s.initial_effect(c) --spsummon @@ -34,9 +35,9 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:GetPreviousTypeOnField()&TYPE_PENDULUM)~=0 + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and (c:GetPreviousTypeOnField()&TYPE_PENDULUM)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -69,19 +70,19 @@ function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x99) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_ODD_EYES) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE) and c:IsSetCard(0x99) + return c:IsControler(tp) and c:IsLocation(LOCATION_HAND|LOCATION_MZONE|LOCATION_PZONE) and c:IsSetCard(SET_ODD_EYES) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) - and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_PZONE,0,1,nil,e,tp) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) - local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_PZONE,0,1,1,nil,e,tp) e:SetLabelObject(g:GetFirst()) g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true) return true @@ -94,5 +95,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c83370323.lua b/official/c83370323.lua index bebe835a12..fed4df40c5 100644 --- a/official/c83370323.lua +++ b/official/c83370323.lua @@ -1,4 +1,5 @@ --トラパート +--Torapart local s,id=GetID() function s.initial_effect(c) --effect gain @@ -26,7 +27,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sync:RegisterEffect(e1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -36,7 +37,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) @@ -45,4 +46,4 @@ end function s.synlimit(e,c) if not c then return false end return not c:IsRace(RACE_WARRIOR) -end +end \ No newline at end of file diff --git a/official/c83392426.lua b/official/c83392426.lua index ed452d928d..d082a69f58 100644 --- a/official/c83392426.lua +++ b/official/c83392426.lua @@ -1,4 +1,5 @@ --ヴィークラー +--Bicular local s,id=GetID() function s.initial_effect(c) --special summon @@ -21,14 +22,14 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8339504.lua b/official/c8339504.lua index 45adb6d1e4..e2f366e2a5 100644 --- a/official/c8339504.lua +++ b/official/c8339504.lua @@ -1,4 +1,5 @@ --エクシーズ・シフト +--Xyz Shift local s,id=GetID() function s.initial_effect(c) --Activate @@ -53,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(sc,c) end local fid=c:GetFieldID() - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -75,4 +76,4 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetLabelObject(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83404468.lua b/official/c83404468.lua index 20af4a0bf1..2668dc89a9 100644 --- a/official/c83404468.lua +++ b/official/c83404468.lua @@ -1,4 +1,4 @@ ---Japanese name +--一色万骨 --The Toil of the Normal --scripted by Naim local s,id=GetID() diff --git a/official/c83407038.lua b/official/c83407038.lua index c5927a8a4f..5ce3ccbf2d 100644 --- a/official/c83407038.lua +++ b/official/c83407038.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCondition(s.condition) e2:SetTarget(s.target) e2:SetOperation(s.operation) @@ -42,13 +42,13 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AMAZONESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -66,13 +66,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() end function s.check(c,tp) - return c and c:IsControler(tp) and c:IsSetCard(0x4) + return c and c:IsControler(tp) and c:IsSetCard(SET_AMAZONESS) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttackTarget()~=nil @@ -105,4 +105,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c83414006.lua b/official/c83414006.lua index a2ec1600a5..451c2fbb68 100644 --- a/official/c83414006.lua +++ b/official/c83414006.lua @@ -97,4 +97,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c83438826.lua b/official/c83438826.lua index d168e0fbd4..3b0298e83e 100644 --- a/official/c83438826.lua +++ b/official/c83438826.lua @@ -1,4 +1,5 @@ --聖剣アロンダイト +--Noble Arms - Arfeudutyr local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -27,7 +28,7 @@ function s.initial_effect(c) e5:SetOperation(s.operation) c:RegisterEffect(e5) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() @@ -61,7 +62,7 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:CheckUniqueOnField(tp) end function s.eqfilter2(c) - return c:IsFaceup() and c:IsSetCard(0x107a) and c:IsRace(RACE_WARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsRace(RACE_WARRIOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter2(chkc) end @@ -71,4 +72,4 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SelectTarget(tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) -end +end \ No newline at end of file diff --git a/official/c83443619.lua b/official/c83443619.lua index 39f10ecf40..9e4ec598d9 100644 --- a/official/c83443619.lua +++ b/official/c83443619.lua @@ -20,17 +20,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} function s.desfilter(c,ft) return c:IsFaceup() and (ft>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xea) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTRON) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -71,7 +71,7 @@ function s.lizfilter(e,c) return not (c:IsOriginalRace(RACE_MACHINE) and c:IsOriginalType(TYPE_SYNCHRO)) end function s.thfilter(c) - return c:IsSetCard(0xea) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_CRYSTRON) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -84,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c83446909.lua b/official/c83446909.lua index f5eeeca1d8..98b34f660a 100644 --- a/official/c83446909.lua +++ b/official/c83446909.lua @@ -1,4 +1,5 @@ --充電池メン +--Batteryman Charger local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,23 +23,23 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0x28} +s.listed_series={SET_BATTERYMAN} function s.spfilter(c,e,tp) - return c:GetCode()~=id and c:IsSetCard(0x28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetCode()~=id and c:IsSetCard(SET_BATTERYMAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_THUNDER),c:GetControler(),LOCATION_MZONE,0,nil)*300 -end +end \ No newline at end of file diff --git a/official/c83461421.lua b/official/c83461421.lua index f0a4c63d48..ed26d0b9c0 100644 --- a/official/c83461421.lua +++ b/official/c83461421.lua @@ -1,4 +1,5 @@ --ペンデュラム・ストーム +--Pendulum Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,LOCATION_PZONE)>0 end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c83467607.lua b/official/c83467607.lua index 9ddd949ac2..8208424623 100644 --- a/official/c83467607.lua +++ b/official/c83467607.lua @@ -16,9 +16,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.refcon) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.refcon(e,re,val,r,rp,rc) return re and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and rp==1-e:GetOwnerPlayer() -end +end \ No newline at end of file diff --git a/official/c83477829.lua b/official/c83477829.lua index 809043350e..a185282d59 100644 --- a/official/c83477829.lua +++ b/official/c83477829.lua @@ -1,4 +1,5 @@ --星遺物-『星鎧』 +--World Legacy - "World Armor" local s,id=GetID() function s.initial_effect(c) --spsummon @@ -41,7 +42,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xfe} +s.listed_series={SET_WORLD_LEGACY} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -53,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.filter(c) - return c:IsSetCard(0xfe) and c:IsAbleToHand() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -89,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local rg=Group.FromCards(c,tc) Duel.SendtoHand(rg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83488497.lua b/official/c83488497.lua index 3d2cf097a4..a856eb6517 100644 --- a/official/c83488497.lua +++ b/official/c83488497.lua @@ -1,9 +1,9 @@ --- スケアクロー・アストラ --- Scareclaw Astra --- Scripted by Hatter +--スケアクロー・アストラ +--Scareclaw Astra +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon procedure + --Special Summon procedure local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetValue(s.hspval) c:RegisterEffect(e1) - -- Multiple attack + --Multiple attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_EXTRA_ATTACK) diff --git a/official/c83500096.lua b/official/c83500096.lua index 3403b166c6..567946b201 100644 --- a/official/c83500096.lua +++ b/official/c83500096.lua @@ -1,4 +1,5 @@ --A・ジェネクス・ソリッド +--Genex Ally Solid local s,id=GetID() function s.initial_effect(c) --draw @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.drop) c:RegisterEffect(e1) end -s.listed_series={0x2} +s.listed_series={SET_GENEX} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_GENEX) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -33,4 +34,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83512285.lua b/official/c83512285.lua index e094333f9a..dbea1bce3a 100644 --- a/official/c83512285.lua +++ b/official/c83512285.lua @@ -1,7 +1,6 @@ --ハイパー・ギャラクシー --Hyper Galaxy --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -20,7 +19,6 @@ function s.initial_effect(c) end --Contains "Galaxy-Eyes Photon Dragon" in text s.listed_names={CARD_GALAXYEYES_P_DRAGON} - --Check for a monster with 2000+ ATK, besides "Galaxy-Eyes Photon Dragon" function s.costfilter(c,ft,tp) return (c:IsControler(tp) or c:IsFaceup()) and c:IsAttackAbove(2000) and not c:IsCode(CARD_GALAXYEYES_P_DRAGON) and (ft>0 or c:GetSequence()<5) @@ -45,11 +43,11 @@ end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc,e) end - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,e) Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end --Tribute opponent's monster, special summon "Galaxy-Eyes Photon Dragon" function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -57,9 +55,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c83519853.lua b/official/c83519853.lua index faa7dfc6f8..fa22359d58 100644 --- a/official/c83519853.lua +++ b/official/c83519853.lua @@ -1,9 +1,10 @@ --魔聖騎士皇ランスロット +--Ignoble Knight of High Laundsallyn local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x107a),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_NOBLE_KNIGHT),1,99) c:EnableReviveLimit() --equip local e1=Effect.CreateEffect(c) @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.thcon) @@ -35,12 +36,12 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x207a,0x107a} +s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO end function s.filter(c,ec) - return c:IsSetCard(0x207a) and c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) + return c:IsSetCard(SET_NOBLE_ARMS) and c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -64,13 +65,13 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.thfilter(c) - return (c:IsSetCard(0x107a) or c:IsSetCard(0x207a)) and c:IsAbleToHand() + return (c:IsSetCard(SET_NOBLE_KNIGHT) or c:IsSetCard(SET_NOBLE_ARMS)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -83,4 +84,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c83531441.lua b/official/c83531441.lua index 0accbc05bf..e79de849a4 100644 --- a/official/c83531441.lua +++ b/official/c83531441.lua @@ -1,4 +1,5 @@ --彼岸の旅人 ダンテ +--Dante, Traveler of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -17,7 +18,7 @@ function s.initial_effect(c) --to defense local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) @@ -34,7 +35,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) @@ -61,7 +62,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct*500) c:RegisterEffect(e1) end @@ -76,7 +77,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0xb1) and c:IsAbleToHand() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -90,4 +91,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83544697.lua b/official/c83544697.lua index 007639e3c8..6bd78c1a0e 100644 --- a/official/c83544697.lua +++ b/official/c83544697.lua @@ -1,4 +1,5 @@ --ガスタの交信 +--Contact with Gusto local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.filter1(c) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -30,10 +31,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_DESTROY) if g1:GetFirst():IsRelateToEffect(e) and g1:GetNext():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) + Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if g2:GetFirst():IsRelateToEffect(e) then Duel.BreakEffect() Duel.Destroy(g2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c83546647.lua b/official/c83546647.lua index b6688154e8..be4e80d1d4 100644 --- a/official/c83546647.lua +++ b/official/c83546647.lua @@ -1,4 +1,5 @@ --無抵抗の真相 +--Wolf in Sheep's Clothing local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,19 +43,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetRange(LOCATION_HAND) e2:SetOperation(s.clearop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CHAIN) e2:SetLabel(Duel.GetCurrentChain()) e2:SetLabelObject(e1) tc:RegisterEffect(e2) Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end @@ -72,4 +73,4 @@ function s.clearop(e,tp,eg,ep,ev,re,r,rp) if ev~=e:GetLabel() then return end e:GetLabelObject():Reset() e:Reset() -end +end \ No newline at end of file diff --git a/official/c83550869.lua b/official/c83550869.lua index a30d51b4f4..51bc64eeff 100644 --- a/official/c83550869.lua +++ b/official/c83550869.lua @@ -30,14 +30,14 @@ function s.initial_effect(c) e3:SetOperation(s.ddop) c:RegisterEffect(e3) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x38) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) + return c:IsMonster() and c:IsSetCard(SET_LIGHTSWORN) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -55,8 +55,8 @@ end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c - and rc:IsSetCard(0x38) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c + and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsControler(tp) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -64,4 +64,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83554231.lua b/official/c83554231.lua index 3e424513d0..91dfc3bd28 100644 --- a/official/c83554231.lua +++ b/official/c83554231.lua @@ -1,5 +1,5 @@ --転生炎獣の再起 ---Salamangreat Recurrence +--Salamangreat Recureance --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -25,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.filter(c,e) - return c:IsSetCard(0x119) and c:IsMonster() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsMonster() and c:IsCanBeEffectTarget(e) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -50,7 +50,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and (e:GetHandler():GetPreviousPosition()&POS_FACEDOWN)~=0 end function s.thfilter(c) - return c:IsSetCard(0x119) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -63,5 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c83555666.lua b/official/c83555666.lua index 3ddddfc49f..9e9ae3985a 100644 --- a/official/c83555666.lua +++ b/official/c83555666.lua @@ -1,4 +1,5 @@ --破壊輪 +--Ring of Destruction local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,lp) return c:IsFaceup() and c:IsAttackBelow(lp) @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,val,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c83555667.lua b/official/c83555667.lua deleted file mode 100644 index fd63ecf1c9..0000000000 --- a/official/c83555667.lua +++ /dev/null @@ -1,44 +0,0 @@ ---破壊輪 ---Ring of Destruction -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.filter(c,lp) - return c:IsFaceup() and c:IsAttackBelow(lp) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local lp=Duel.GetLP(1-tp) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc,lp) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,lp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,lp) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then - local atk=tc:GetTextAttack() - if atk<0 then atk=0 end - local val=Duel.Damage(tp,atk,REASON_EFFECT) - if val>0 and Duel.GetLP(tp)>0 then - Duel.BreakEffect() - Duel.Damage(1-tp,val,REASON_EFFECT) - end - end -end diff --git a/official/c83558891.lua b/official/c83558891.lua index 438f9ccc69..0b7bd52f06 100644 --- a/official/c83558891.lua +++ b/official/c83558891.lua @@ -1,5 +1,5 @@ --肆世壊の新星 ---Scareclaw Nova +--Scareclaw Arrival --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x17c} +s.listed_series={SET_SCARECLAW} s.listed_names={CARD_VISAS_STARFROST} function s.spfilter(c,e,tp) - return (c:IsSetCard(0x17c) or c:IsCode(CARD_VISAS_STARFROST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return (c:IsSetCard(SET_SCARECLAW) or c:IsCode(CARD_VISAS_STARFROST)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -43,8 +43,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,tp) - return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x17c) and c:IsControler(tp) and c:IsType(TYPE_LINK) - and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + return c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_SCARECLAW) and c:IsControler(tp) and c:IsType(TYPE_LINK) + and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c83575471.lua b/official/c83575471.lua index 9b3b507cd4..6871465c1e 100644 --- a/official/c83575471.lua +++ b/official/c83575471.lua @@ -50,7 +50,7 @@ function s.replaceop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD&~RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsContinuousSpell() diff --git a/official/c83584898.lua b/official/c83584898.lua index d41d086b78..4516397c37 100644 --- a/official/c83584898.lua +++ b/official/c83584898.lua @@ -1,4 +1,5 @@ --魔界の足枷 +--Darkworld Shackles local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -22,7 +23,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,0)) e6:SetCategory(CATEGORY_DAMAGE) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_STANDBY) + e6:SetCode(EVENT_PHASE|PHASE_STANDBY) e6:SetRange(LOCATION_SZONE) e6:SetCountLimit(1) e6:SetCondition(s.damcon) @@ -45,4 +46,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=e:GetHandler():GetEquipTarget():GetControler() local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83589191.lua b/official/c83589191.lua index c84595b6cc..027599efc1 100644 --- a/official/c83589191.lua +++ b/official/c83589191.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) e1:SetLabel(1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetLabel(2) c:RegisterEffect(e2) end diff --git a/official/c83602069.lua b/official/c83602069.lua index 74a30c4e49..1bdeda52e3 100644 --- a/official/c83602069.lua +++ b/official/c83602069.lua @@ -1,4 +1,5 @@ --共闘するランドスターの剣士 +--Comrade Swordsman of Landstar local s,id=GetID() function s.initial_effect(c) --atk @@ -10,4 +11,4 @@ function s.initial_effect(c) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR)) e1:SetValue(400) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c83604828.lua b/official/c83604828.lua index a1870c2ea0..562993a383 100644 --- a/official/c83604828.lua +++ b/official/c83604828.lua @@ -1,5 +1,5 @@ --雲魔物-ゴースト・フォッグ ---Cloudian - Ghost Frog +--Cloudian - Ghost Fog local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -26,7 +26,7 @@ function s.initial_effect(c) e4:SetOperation(s.ctop) c:RegisterEffect(e4) end -s.counter_list={0x1019} +s.counter_list={COUNTER_FOG} function s.ctop(e,tp,eg,ep,ev,re,r,rp) local lv=e:GetHandler():GetBattleTarget():GetLevel() local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) @@ -34,6 +34,6 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) for i=1,lv do Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) local tc=g:Select(tp,1,1,nil):GetFirst() - tc:AddCounter(0x1019,1) + tc:AddCounter(COUNTER_FOG,1) end -end +end \ No newline at end of file diff --git a/official/c83610035.lua b/official/c83610035.lua index 80ae7b7178..3481240484 100644 --- a/official/c83610035.lua +++ b/official/c83610035.lua @@ -1,9 +1,9 @@ --- セリオンズ“リリー”ボレア --- Therions' "Lily" Borea --- Scripted by Hatter +--セリオンズ“リリー”ボレア +--Therion "Lily" Borea +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) - -- Search 1 "Therions" Spell/Trap + --Search 1 "Therions" Spell/Trap local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -26,25 +26,25 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Equipped monster gains ATK + --Equipped monster gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x17b) end) + e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_THERION) end) e3:SetValue(700) c:RegisterEffect(e3) - -- Equipped monster gains effect + --Equipped monster gains effect local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x17b) end) + e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(SET_THERION) end) e4:SetLabelObject(e2) c:RegisterEffect(e4) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.eqfilter(c) - return c:IsMonster() and (c:IsSetCard(0x17b) or c:IsRace(RACE_PLANT)) + return c:IsMonster() and (c:IsSetCard(SET_THERION) or c:IsRace(RACE_PLANT)) end function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) @@ -73,14 +73,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x17b) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_THERION) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c83626916.lua b/official/c83626916.lua index b9891b0b73..6fd5217057 100644 --- a/official/c83626916.lua +++ b/official/c83626916.lua @@ -1,4 +1,4 @@ ---Japanese name +--異次元ポスト --D.D. Post --scripted by Naim local s,id=GetID() diff --git a/official/c83629030.lua b/official/c83629030.lua index b3422aa74f..3fb0f1d1bd 100644 --- a/official/c83629030.lua +++ b/official/c83629030.lua @@ -41,7 +41,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.cfilter1(c) @@ -54,4 +54,4 @@ function s.dircon(e) local tp=e:GetHandlerPlayer() return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) and not Duel.IsExistingMatchingCard(s.cfilter2,tp,0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c83656563.lua b/official/c83656563.lua index 5d8ae829f4..dcfd246929 100644 --- a/official/c83656563.lua +++ b/official/c83656563.lua @@ -1,8 +1,6 @@ --中生代化石マシン スカルワゴン --Fossil Machine Skull Wagon --Logical Nonsense - ---Substitute ID local s,id=GetID() function s.initial_effect(c) --Susion summon procedure @@ -46,47 +44,39 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.destg) e3:SetOperation(s.desop) c:RegisterEffect(e3) end ---Specifically lists "Fossil Fusion" s.listed_names={CARD_FOSSIL_FUSION} - - --Check for a rock monster in your GY function s.ffilter(c,fc,sumtype,tp) return c:IsRace(RACE_ROCK) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) end - --Check for a level 5 or 6 monster function s.matfilter(c) local lv=c:GetLevel() return c:HasLevel() and (lv==5 or lv==6) end - --Activation legality function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) end - --Inflict 800 damage after destroying a monster by battle function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end - --Activation legality function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end - --Destroy 1 spell/trap on the field function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83670388.lua b/official/c83670388.lua index 3a598d46a0..e0a5d5c535 100644 --- a/official/c83670388.lua +++ b/official/c83670388.lua @@ -1,14 +1,14 @@ --- 氷水呪縛 --- Icejade Curse --- Scripted by Hatter +--氷水呪縛 +--Icejade Curse +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Prevent the activation of monster's effects + --Prevent the activation of monster's effects local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetCondition(s.accon) e2:SetValue(s.aclim) c:RegisterEffect(e2) - -- Inflict damage + --Inflict damage local e3=Effect.CreateEffect(c) e3:SetCategory(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_DAMAGE) diff --git a/official/c83675475.lua b/official/c83675475.lua index b1854a9e50..ed5d535a07 100644 --- a/official/c83675475.lua +++ b/official/c83675475.lua @@ -1,4 +1,5 @@ --トークン謝肉祭 +--Token Feastevil local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN) local ct=Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,ct*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83682209.lua b/official/c83682209.lua index 9db8d1f4d5..28379b59f8 100644 --- a/official/c83682209.lua +++ b/official/c83682209.lua @@ -1,7 +1,6 @@ --海霊賊 --Piwraithe the Ghost Pirate --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -19,9 +18,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end s.listed_names={id} - function s.confilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and not c:IsCode(id) and c:IsPreviousPosition(POS_FACEUP) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_WATER)==ATTRIBUTE_WATER end @@ -41,7 +39,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -51,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) e2:SetValue(ct*100) c:RegisterEffect(e2) end diff --git a/official/c83682725.lua b/official/c83682725.lua index 6401daa1fc..b3e53aa358 100644 --- a/official/c83682725.lua +++ b/official/c83682725.lua @@ -1,4 +1,5 @@ --テールスイング +--Tail Swipe local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,s.dfilter,tp,0,LOCATION_MZONE,1,2,nil,tc:GetLevel()) Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83705073.lua b/official/c83705073.lua index 04494e7d95..987fc2d8f0 100644 --- a/official/c83705073.lua +++ b/official/c83705073.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetTarget(s.rmtg) c:RegisterEffect(e2) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x122) + return re and re:GetHandler():IsSetCard(SET_VALKYRIE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -36,11 +36,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.rmtg(e,c) local tp=e:GetHandlerPlayer() return c:GetOwner()~=tp and Duel.IsPlayerCanRemove(tp,c) - and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end + and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c83715234.lua b/official/c83715234.lua index c3749fa19f..c8403285fc 100644 --- a/official/c83715234.lua +++ b/official/c83715234.lua @@ -1,4 +1,5 @@ --ムーン・スクレイパー +--Attack the Moon! local s,id=GetID() function s.initial_effect(c) --activate @@ -29,7 +30,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and s.desfilter(chkc) end @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8372133.lua b/official/c8372133.lua index a79aba7c4c..e91f9ea651 100644 --- a/official/c8372133.lua +++ b/official/c8372133.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -52,12 +52,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end @@ -82,7 +82,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c83723605.lua b/official/c83723605.lua index 5e773a41ae..f79669a173 100644 --- a/official/c83723605.lua +++ b/official/c83723605.lua @@ -42,7 +42,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_EXTRA) then return end + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_EXTRA) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) if #g>0 and Duel.SpecialSummon(g,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then diff --git a/official/c83725008.lua b/official/c83725008.lua index ec9205ce31..c164eccc98 100644 --- a/official/c83725008.lua +++ b/official/c83725008.lua @@ -1,4 +1,5 @@ --ライトロード・プリースト ジェニス +--Jenis, Lightsworn Mender local s,id=GetID() function s.initial_effect(c) --recover&damage @@ -19,7 +20,7 @@ function s.initial_effect(c) s[1]=false local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) - e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) + e2:SetCode(EVENT_PHASE_START|PHASE_DRAW) e2:SetOperation(s.reset) Duel.RegisterEffect(e2,0) local e3=Effect.CreateEffect(c) @@ -29,7 +30,7 @@ function s.initial_effect(c) Duel.RegisterEffect(e3,0) end end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.reset(e,tp,eg,ep,ev,re,r,rp) s[0]=false s[1]=false @@ -40,7 +41,7 @@ end function s.set(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - if (r&REASON_EFFECT)>0 and rc:IsSetCard(0x38) and eg:IsExists(s.cfilter,1,nil) then + if (r&REASON_EFFECT)>0 and rc:IsSetCard(SET_LIGHTSWORN) and eg:IsExists(s.cfilter,1,nil) then s[rp]=true end end @@ -57,4 +58,4 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) if c:GetControler()~=tp or not c:IsRelateToEffect(e) or c:IsFacedown() then return end Duel.Recover(tp,500,REASON_EFFECT) Duel.Damage(1-tp,500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c83743222.lua b/official/c83743222.lua index 714cea122f..f0874d263d 100644 --- a/official/c83743222.lua +++ b/official/c83743222.lua @@ -1,4 +1,5 @@ --女神の聖弓-アルテミス +--Goddess Bow local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -41,7 +42,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --negate local e2=Effect.CreateEffect(c) @@ -51,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.negcon) e2:SetOperation(s.negop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) @@ -68,7 +69,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c83746708.lua b/official/c83746708.lua index 81f3c49108..0c3bdf61d5 100644 --- a/official/c83746708.lua +++ b/official/c83746708.lua @@ -1,4 +1,5 @@ --魔導師の力 +--Mage Power local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -15,5 +16,5 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil,TYPE_SPELL+TYPE_TRAP)*500 -end + return Duel.GetMatchingGroupCount(Card.IsSpellTrap,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*500 +end \ No newline at end of file diff --git a/official/c83747250.lua b/official/c83747250.lua index f6024f5c2e..a6f8827f2c 100644 --- a/official/c83747250.lua +++ b/official/c83747250.lua @@ -1,5 +1,5 @@ --黄昏の交衣 ---Twilight Clothes +--Twilight Cloth --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -23,18 +23,15 @@ function s.initial_effect(c) e2:SetOperation(s.indop) c:RegisterEffect(e2) end -s.listed_series={0x38} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_LIGHTSWORN} function s.filter(c) - return c:IsSetCard(0x38) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LIGHTSWORN) and c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.filter2(c,g) return c:IsFaceup() and not g:IsContains(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter2(chkc,g) end if chk==0 then return Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,0,1,nil,g) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) @@ -42,15 +39,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and #g>0 then + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) + if tc:IsRelateToEffect(e) and tc:IsFaceup() and #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local sg=g:Select(tp,1,#g,nil) local rc=Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(200*rc) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -59,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.indcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x38) + return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_LIGHTSWORN) and (r&REASON_EFFECT)~=0 end function s.indop(e,tp,eg,ep,ev,re,r,rp) @@ -67,11 +64,11 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x38)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_LIGHTSWORN)) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c83755611.lua b/official/c83755611.lua index 8c6287d0a4..bd84f02ba4 100644 --- a/official/c83755611.lua +++ b/official/c83755611.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e2:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) e2:SetLabelObject(e1) diff --git a/official/c83764718.lua b/official/c83764718.lua index 96ab42b298..4baa50fdce 100644 --- a/official/c83764718.lua +++ b/official/c83764718.lua @@ -28,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,SUMMON_WITH_MONSTER_REBORN,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c83764719.lua b/official/c83764719.lua deleted file mode 100644 index 4881467dfe..0000000000 --- a/official/c83764719.lua +++ /dev/null @@ -1,30 +0,0 @@ ---死者蘇生(EU) -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.filter(c,e,tp) - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) - end -end diff --git a/official/c83778600.lua b/official/c83778600.lua index c12f1ff5df..ac71f49b1e 100644 --- a/official/c83778600.lua +++ b/official/c83778600.lua @@ -1,4 +1,5 @@ --ミス・リバイブ +--Foolish Revival local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c83810690.lua b/official/c83810690.lua index 4d115e1082..b937fccc1c 100644 --- a/official/c83810690.lua +++ b/official/c83810690.lua @@ -1,4 +1,5 @@ --X-セイバー ウェイン +--X-Saber Wayne local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -33,4 +34,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c83812099.lua b/official/c83812099.lua index ed011f8fe6..8db51c8447 100644 --- a/official/c83812099.lua +++ b/official/c83812099.lua @@ -70,4 +70,4 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp) if eqc then Duel.Equip(tp,eqc,tc) end -end +end \ No newline at end of file diff --git a/official/c83827392.lua b/official/c83827392.lua index dccb6cc4d1..94dc837451 100644 --- a/official/c83827392.lua +++ b/official/c83827392.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.tdcon) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -44,7 +44,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return e:IsHasType(EFFECT_TYPE_QUICK_O)==e:GetHandler():GetOverlayGroup():IsExists(s.tdconfilter,1,nil) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local loc=LOCATION_ONFIELD+LOCATION_GRAVE + local loc=LOCATION_ONFIELD|LOCATION_GRAVE if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(loc) and chkc:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,loc,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) diff --git a/official/c83828288.lua b/official/c83828288.lua index eeeeb5ab6c..478d51a339 100644 --- a/official/c83828288.lua +++ b/official/c83828288.lua @@ -31,11 +31,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local lv=tc:GetLevel() if tc:IsRelateToEffect(e) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=lv then - local ct=Duel.DiscardHand(tp,aux.TRUE,lv,lv,REASON_EFFECT+REASON_DISCARD) + local ct=Duel.DiscardHand(tp,aux.TRUE,lv,lv,REASON_EFFECT|REASON_DISCARD) if ct>0 and Duel.Draw(tp,lv,REASON_EFFECT)~=0 then Duel.BreakEffect() Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -end - +end \ No newline at end of file diff --git a/official/c83831356.lua b/official/c83831356.lua index 122c2cceb3..1458a79420 100644 --- a/official/c83831356.lua +++ b/official/c83831356.lua @@ -6,20 +6,17 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x11} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_KARAKURI} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x11) + return c:IsFaceup() and c:IsSetCard(SET_KARAKURI) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -31,22 +28,22 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c8384771.lua b/official/c8384771.lua index beb174a41a..b01e8b869c 100644 --- a/official/c8384771.lua +++ b/official/c8384771.lua @@ -1,4 +1,5 @@ --EMゴムゴムートン +--Performapal Gumgumouton local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -36,7 +37,7 @@ function s.operation1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end end @@ -47,7 +48,7 @@ function s.operation2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c83866861.lua b/official/c83866861.lua index ce6516e361..e9b5aa197b 100644 --- a/official/c83866861.lua +++ b/official/c83866861.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xad),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FRIGHTFUR),3) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -41,8 +41,8 @@ function s.initial_effect(c) e4:SetValue(s.atkval) c:RegisterEffect(e4) end -s.listed_series={0xad} -s.material_setcode=0xad +s.listed_series={SET_FRIGHTFUR} +s.material_setcode=SET_FRIGHTFUR function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() end @@ -67,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() diff --git a/official/c8387138.lua b/official/c8387138.lua index 7b7517e053..8e40f85f72 100644 --- a/official/c8387138.lua +++ b/official/c8387138.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) @@ -35,7 +35,7 @@ function s.initial_effect(c) end s.xyz_number=27 function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -69,4 +69,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) return true else return false end -end +end \ No newline at end of file diff --git a/official/c83880087.lua b/official/c83880087.lua index 0879360618..adf4047c0b 100644 --- a/official/c83880087.lua +++ b/official/c83880087.lua @@ -18,9 +18,9 @@ function s.initial_effect(c) e2:SetOperation(s.rop) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_UTOPIA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -45,15 +45,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.endop(e,tp,eg,ep,ev,re,r,rp) local turnp=Duel.GetTurnPlayer() - Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE|PHASE_END,1) + Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1,1) + Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,turnp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -63,16 +63,16 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.rcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_COST)~=0 and re:IsActivated() - and re:IsActiveType(TYPE_XYZ) and re:GetHandler():IsSetCard(0x107f) + and re:IsActiveType(TYPE_XYZ) and re:GetHandler():IsSetCard(SET_UTOPIA) and e:GetHandler():IsAbleToRemoveAsCost() and ep==e:GetOwnerPlayer() and ev==1 end function s.rop(e,tp,eg,ep,ev,re,r,rp) return Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c83880473.lua b/official/c83880473.lua index 1de67bc3fb..d041873a4f 100644 --- a/official/c83880473.lua +++ b/official/c83880473.lua @@ -1,5 +1,5 @@ --War Rock Spirit ---Scripted by Rundas +--War Rock Spirit local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} --Special Summon function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsBattlePhase() and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.filter(c,e,tp,pos) - return c:IsSetCard(0x161) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) + return c:IsSetCard(SET_WAR_ROCK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,pos) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -55,19 +55,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) --Cannot attack directly local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) --Defense Position elseif choice==1 then @@ -76,9 +76,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x161)) + e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_WAR_ROCK)) e4:SetValue(s.indct) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end end @@ -87,4 +87,4 @@ function s.indct(e,re,r) if (r&REASON_BATTLE)>0 then return 1 else return 0 end -end +end \ No newline at end of file diff --git a/official/c83887306.lua b/official/c83887306.lua index 537bdb0d2f..b5c27dd5c1 100644 --- a/official/c83887306.lua +++ b/official/c83887306.lua @@ -1,4 +1,5 @@ --はさみ撃ち +--Two-Pronged Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #tg==3 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83888009.lua b/official/c83888009.lua index ce24426af8..58661da841 100644 --- a/official/c83888009.lua +++ b/official/c83888009.lua @@ -1,5 +1,5 @@ --七皇再生 ---Rebirth of the Seven Emperors +--Rebirth of the Seventh Emperors --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_XYZ) @@ -40,7 +40,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_REMOVED) end function s.atfilter(c) - if not c:IsType(TYPE_XYZ) or not c:IsSetCard(0x48) then return false end + if not c:IsType(TYPE_XYZ) or not c:IsSetCard(SET_NUMBER) then return false end local no=c.xyz_number return no and no>=101 and no<=107 and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) then return end local ct=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.atfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,tc) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.atfilter),tp,LOCATION_REMOVED|LOCATION_GRAVE,0,tc) if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and ct>0 and #g>0 and not tc:IsImmuneToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -66,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(s.damop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.damop(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +74,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*300,REASON_EFFECT,true) Duel.Damage(1-tp,Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)*300,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c83903521.lua b/official/c83903521.lua index f25d5c2a5c..3260a6b905 100644 --- a/official/c83903521.lua +++ b/official/c83903521.lua @@ -1,4 +1,5 @@ --ファラオの化身 +--Beast of the Pharaoh local s,id=GetID() function s.initial_effect(c) --spsummon diff --git a/official/c83928661.lua b/official/c83928661.lua index c24af9610e..2537999e34 100644 --- a/official/c83928661.lua +++ b/official/c83928661.lua @@ -3,7 +3,7 @@ --Scripted by Naim local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x11e)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_DANGER)) --Atk Up local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -27,4 +27,4 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_series={0x11e} +s.listed_series={SET_DANGER} \ No newline at end of file diff --git a/official/c83957459.lua b/official/c83957459.lua index e5989c7bfc..282d91741e 100644 --- a/official/c83957459.lua +++ b/official/c83957459.lua @@ -31,4 +31,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) end function s.macon(e) return s[e:GetHandlerPlayer()]>=2 -end +end \ No newline at end of file diff --git a/official/c83962752.lua b/official/c83962752.lua index 3b836483ca..875c671203 100644 --- a/official/c83962752.lua +++ b/official/c83962752.lua @@ -92,7 +92,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c83965310.lua b/official/c83965310.lua index c74d725c0b..02dd5897a7 100644 --- a/official/c83965310.lua +++ b/official/c83965310.lua @@ -86,7 +86,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -97,4 +97,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then s.equipop(c,e,tp,tc) end -end +end \ No newline at end of file diff --git a/official/c83968380.lua b/official/c83968380.lua index 51cab25a55..ba4fad25fd 100644 --- a/official/c83968380.lua +++ b/official/c83968380.lua @@ -1,4 +1,5 @@ --強欲な瓶 +--Jar of Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,4 +21,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8396952.lua b/official/c8396952.lua index 6f7d43cd7e..b87aa13df0 100644 --- a/official/c8396952.lua +++ b/official/c8396952.lua @@ -48,7 +48,7 @@ function s.speop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) elseif val==COIN_TAILS then Duel.Recover(1-tp,500,REASON_EFFECT) diff --git a/official/c83980492.lua b/official/c83980492.lua index 6cd35affef..e3a9b21a9a 100644 --- a/official/c83980492.lua +++ b/official/c83980492.lua @@ -1,6 +1,7 @@ --銅鑼ドラゴン +--Dragong local s,id=GetID() function s.initial_effect(c) --pendulum summon Pendulum.AddProcedure(c) -end +end \ No newline at end of file diff --git a/official/c83982270.lua b/official/c83982270.lua index 41ccfe528a..efa4312b70 100644 --- a/official/c83982270.lua +++ b/official/c83982270.lua @@ -1,4 +1,5 @@ --雲魔物-ポイズン・クラウド +--Cloudian - Poison Cloud local s,id=GetID() function s.initial_effect(c) --destroy&damage @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsFaceup() and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,800,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83986578.lua b/official/c83986578.lua index ddbdabb4af..20fa33ec6a 100644 --- a/official/c83986578.lua +++ b/official/c83986578.lua @@ -1,4 +1,5 @@ --王虎ワンフー +--King Tiger Wanghu local s,id = GetID() function s.initial_effect(c) --destroy @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c83991690.lua b/official/c83991690.lua index 918f4c70ac..f684291ea7 100644 --- a/official/c83991690.lua +++ b/official/c83991690.lua @@ -1,4 +1,5 @@ --ブーテン +--Buten local s,id=GetID() function s.initial_effect(c) --tuner @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -28,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c83994433.lua b/official/c83994433.lua index 6dc339006f..2382314224 100644 --- a/official/c83994433.lua +++ b/official/c83994433.lua @@ -1,4 +1,5 @@ --閃珖竜 スターダスト +--Stardust Spark Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -31,10 +32,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 -end +end \ No newline at end of file diff --git a/official/c83994646.lua b/official/c83994646.lua index 23ef856b41..9b9634fb1e 100644 --- a/official/c83994646.lua +++ b/official/c83994646.lua @@ -1,4 +1,5 @@ --死の4つ星てんとう虫 +--4-Starred Ladybug of Doom local s,id=GetID() function s.initial_effect(c) --flip @@ -21,4 +22,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8400623.lua b/official/c8400623.lua index 292707023d..58a39e322a 100644 --- a/official/c8400623.lua +++ b/official/c8400623.lua @@ -1,4 +1,5 @@ --邪龍アナンタ +--Evil Dragon Ananta local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -43,7 +44,7 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) - local gg=not Duel.IsPlayerAffectedByEffect(tp,69832741) and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) + local gg=not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) or Group.CreateGroup() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return (#mg>0 and (ft>0 or (mg:IsExists(s.mzfilter,1,nil) and ft>-1))) @@ -51,16 +52,16 @@ function s.spcon(e,c) end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local g - if Duel.IsPlayerAffectedByEffect(tp,69832741) then + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) else - g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) end Duel.Remove(g,POS_FACEUP,REASON_COST) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE) e1:SetValue(#g*600) c:RegisterEffect(e1) local e2=e1:Clone() @@ -68,7 +69,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) c:RegisterEffect(e2) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -82,4 +83,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84013237.lua b/official/c84013237.lua index c76308df76..fe76882a43 100644 --- a/official/c84013237.lua +++ b/official/c84013237.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetOperation(function() Duel.NegateAttack() end) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) --Self destroy @@ -39,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84025439.lua b/official/c84025439.lua index 0d7035e250..a6a5f24397 100644 --- a/official/c84025439.lua +++ b/official/c84025439.lua @@ -11,11 +11,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.tdcon) - e1:SetCost(s.tdcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.tdtg) e1:SetOperation(s.tdop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -54,14 +54,10 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0xdc,0x20dc} +s.listed_series={SET_SUPER_QUANT,SET_SUPER_QUANTAL_MECH_BEAST} function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=2 and Duel.IsMainPhase() end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) @@ -72,20 +68,20 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) if #sg>0 then Duel.HintSelection(sg) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.imcon(e) return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=4 end function s.efilter(e,te) - return not te:GetOwner():IsSetCard(0xdc) + return not te:GetOwner():IsSetCard(SET_SUPER_QUANT) end function s.drcon(e) return e:GetHandler():GetOverlayGroup():GetClassCount(Card.GetCode)>=6 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x20dc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPER_QUANTAL_MECH_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -103,4 +99,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.dncheck,1,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84040113.lua b/official/c84040113.lua index a45f1460a2..1cfe32ba6c 100644 --- a/official/c84040113.lua +++ b/official/c84040113.lua @@ -25,8 +25,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) + return e:GetHandler():IsLocation(LOCATION_ONFIELD|LOCATION_GRAVE) end function s.spcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) -end + return e:GetHandler():IsSynchroSummoned() +end \ No newline at end of file diff --git a/official/c84046493.lua b/official/c84046493.lua index 42d90967e1..57cd02f8ac 100644 --- a/official/c84046493.lua +++ b/official/c84046493.lua @@ -29,9 +29,9 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LSCALE) e1:SetValue(sch) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_RSCALE) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c84055227.lua b/official/c84055227.lua index f14d693044..988c96a281 100644 --- a/official/c84055227.lua +++ b/official/c84055227.lua @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.attackup(e,c) return c:GetCounter(COUNTER_SPELL)*200 -end +end \ No newline at end of file diff --git a/official/c84058253.lua b/official/c84058253.lua index 95b290e28b..8b30844324 100644 --- a/official/c84058253.lua +++ b/official/c84058253.lua @@ -1,9 +1,10 @@ --キメラテック・ランページ・ドラゴン +--Chimeratech Rampage Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --fusion material - Fusion.AddProcMixRep(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1093),2,99) + Fusion.AddProcMixRep(c,false,false,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CYBER_DRAGON),2,99) --destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) @@ -24,17 +25,17 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x1093} -s.material_setcode={0x93,0x1093} +s.listed_series={SET_CYBER_DRAGON} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.descon(e,tp,eg,ep,ev,re,r,rp) return (e:GetHandler():GetSummonType()&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end local ct=e:GetHandler():GetMaterialCount() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp, Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp, Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -61,7 +62,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c84080938.lua b/official/c84080938.lua index 19518916d9..487227da6f 100644 --- a/official/c84080938.lua +++ b/official/c84080938.lua @@ -1,4 +1,5 @@ --慈悲深き修道女 +--The Forgiving Maiden local s,id=GetID() function s.initial_effect(c) --to hand @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,tid) return c:IsMonster() and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToHand() end @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c84080939.lua b/official/c84080939.lua deleted file mode 100644 index 1ba3083d26..0000000000 --- a/official/c84080939.lua +++ /dev/null @@ -1,36 +0,0 @@ ---慈悲深き修道女(EU) -local s,id=GetID() -function s.initial_effect(c) - --to hand - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_TOHAND) - e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) - e1:SetTarget(s.target) - e1:SetOperation(s.operation) - c:RegisterEffect(e1) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end -function s.filter(c,tid) - return c:IsMonster() and c:GetTurnID()==tid and c:IsReason(REASON_BATTLE) and c:IsAbleToHand() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local tid=Duel.GetTurnCount() - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,tid) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,tid) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,tid) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) -end -function s.operation(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then - Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) - end -end diff --git a/official/c84117021.lua b/official/c84117021.lua index a709e18d74..abe492abe5 100644 --- a/official/c84117021.lua +++ b/official/c84117021.lua @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCondition(s.sumcon) e4:SetOperation(s.sumsuc) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) local e5=e4:Clone() e5:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e7:SetCode(EVENT_CHAIN_END) e7:SetOperation(s.cedop) - e7:SetReset(RESET_PHASE+PHASE_END) + e7:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e7,tp) else local tc=Duel.GetFirstTarget() @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -78,11 +78,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end @@ -109,6 +109,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c84121193.lua b/official/c84121193.lua index 5d39d68f92..fd32d571ce 100644 --- a/official/c84121193.lua +++ b/official/c84121193.lua @@ -1,7 +1,6 @@ --コードブレイカー・ウイルスソードマン --Codebreaker Virus Swordsman --Scripted by Larry126 - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -39,9 +38,8 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x13c} +s.listed_series={SET_CODEBREAKER} s.listed_names={8662794} - function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetMutualLinkedGroupCount()>0 end @@ -51,16 +49,16 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local zones_tp=aux.GetMMZonesPointedTo(tp) local zones_opp=aux.GetMMZonesPointedTo(1-tp) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,tp,zones_tp) - or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,1-tp,zones_opp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,tp,zones_tp) + or Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,1-tp,zones_opp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local zones={} zones[tp]=aux.GetMMZonesPointedTo(tp) zones[1-tp]=aux.GetMMZonesPointedTo(1-tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=(Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,tp,zones[tp])+Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,1-tp,zones[1-tp])):Select(tp,1,1,nil):GetFirst() + local tc=(Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,tp,zones[tp])+Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp,1-tp,zones[1-tp])):Select(tp,1,1,nil):GetFirst() if tc then local p if s.spfilter(tc,e,tp,tp,zones[tp]) and s.spfilter(tc,e,tp,1-tp,zones[1-tp]) then @@ -75,7 +73,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsReason(REASON_DESTROY) and rp~=tp then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -95,7 +93,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c84124261.lua b/official/c84124261.lua index 73e3813690..c80ce25f77 100644 --- a/official/c84124261.lua +++ b/official/c84124261.lua @@ -1,4 +1,5 @@ --No.39 希望皇ホープ・ルーツ +--Number 39: Utopia Roots local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,16 +11,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=39 -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetCard(Duel.GetAttacker()) @@ -33,7 +30,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetRank()*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c84125619.lua b/official/c84125619.lua index bed894dce9..80e08557ac 100644 --- a/official/c84125619.lua +++ b/official/c84125619.lua @@ -1,4 +1,5 @@ --Expendable Dai +--Expendable Dai local s,id=GetID() function s.initial_effect(c) --Activate @@ -56,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84133008.lua b/official/c84133008.lua index e9a3ba502a..2f1fdfc5a8 100644 --- a/official/c84133008.lua +++ b/official/c84133008.lua @@ -1,4 +1,5 @@ --モンスター・アイ +--Monster Eye local s,id=GetID() function s.initial_effect(c) --salvage @@ -8,16 +9,12 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end s.listed_names={CARD_POLYMERIZATION} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end @@ -34,4 +31,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c84136000.lua b/official/c84136000.lua index dc4c5f7962..c27f594d51 100644 --- a/official/c84136000.lua +++ b/official/c84136000.lua @@ -1,4 +1,5 @@ --復活の墓穴 +--The Grave of Enkindling local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,9 +43,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c8414337.lua b/official/c8414337.lua index 03ec65bd82..7a639bfae8 100644 --- a/official/c8414337.lua +++ b/official/c8414337.lua @@ -1,4 +1,5 @@ --ガスタの風塵 +--Dust Storm of Gusto local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_BATTLE + return Duel.IsTurnPlayer(tp) and Duel.GetCurrentPhase()<=PHASE_BATTLE end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) end @@ -24,9 +25,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.actcon) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actcon(e) - return Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsSetCard(0x10) -end + return Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsSetCard(SET_GUSTO) +end \ No newline at end of file diff --git a/official/c84171830.lua b/official/c84171830.lua index 3da38e1da8..378fd61e68 100644 --- a/official/c84171830.lua +++ b/official/c84171830.lua @@ -53,7 +53,7 @@ function s.splimit(e,c) return c:IsLocation(LOCATION_EXTRA) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.discon(e) local tp=e:GetHandlerPlayer() @@ -64,10 +64,10 @@ end function s.atkcon(e) local d=Duel.GetAttackTarget() local tp=e:GetHandlerPlayer() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and d and d:IsControler(1-tp) + return Duel.IsPhase(PHASE_DAMAGE_CAL) and d and d:IsControler(1-tp) end function s.atktg(e,c) - return c==Duel.GetAttacker() and c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c==Duel.GetAttacker() and c:IsTributeSummoned() end function s.filter(c) return c:GetAttack()==2800 and c:GetDefense()==1000 @@ -87,12 +87,12 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) g:GetFirst():RegisterEffect(e1) end end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return eg and eg:IsExists(function(c) return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return eg and eg:IsExists(function(c) return c:IsTributeSummoned() and c:IsReason(REASON_FUSION) end,1,nil) end function s.effop2(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c84173492.lua b/official/c84173492.lua index af7312ca41..fbd3552ef9 100644 --- a/official/c84173492.lua +++ b/official/c84173492.lua @@ -1,10 +1,11 @@ --不屈闘士 レイレイ +--Indomitable Fighter Lei Lei local s,id=GetID() function s.initial_effect(c) --to defense local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.poscon) @@ -23,6 +24,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c84177693.lua b/official/c84177693.lua index b9086f6485..6643b2dc8e 100644 --- a/official/c84177693.lua +++ b/official/c84177693.lua @@ -30,4 +30,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84206435.lua b/official/c84206435.lua index cc6d84df8f..e6de3ccaa4 100644 --- a/official/c84206435.lua +++ b/official/c84206435.lua @@ -1,4 +1,5 @@ --氷結界の紋章 +--Medallion of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} function s.filter(c) - return c:IsSetCard(0x2f) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ICE_BARRIER) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c84211599.lua b/official/c84211599.lua index f5dba560ce..3b7b27cbeb 100644 --- a/official/c84211599.lua +++ b/official/c84211599.lua @@ -22,18 +22,18 @@ function s.initial_effect(c) end) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) - if r&REASON_EFFECT>0 then Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) end + if r&REASON_EFFECT>0 then Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) end end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - -- cannot draw + --cannot draw local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DRAW) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -77,17 +77,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sc,REASON_RULE) end end - -- halve battle damage + --halve battle damage local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.damval(e,re,val,r,rp,rc) return math.floor(val/2) -end +end \ No newline at end of file diff --git a/official/c84218527.lua b/official/c84218527.lua index 0ccb9df838..faa8c5c2ee 100644 --- a/official/c84218527.lua +++ b/official/c84218527.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.filter(c,e,tp) - return c:IsSetCard(0x31) and c:IsFaceup() + return c:IsSetCard(SET_FORTUNE_LADY) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -37,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() for tc in aux.Next(g) do Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1,fid) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -69,4 +69,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.tdfilter,nil,e:GetLabel()) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84220251.lua b/official/c84220251.lua index b637c49582..c9687e4af5 100644 --- a/official/c84220251.lua +++ b/official/c84220251.lua @@ -1,4 +1,5 @@ --蘇生紋章 +--Heraldry Reborn local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.filter(c,e,tp) - return c:IsSetCard(0x76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84224627.lua b/official/c84224627.lua index 91730fad18..518f70c56c 100644 --- a/official/c84224627.lua +++ b/official/c84224627.lua @@ -1,4 +1,5 @@ --キャット・シャーク +--Cat Shark local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -19,8 +20,8 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) - e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,13 +29,6 @@ end function s.indcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsRankBelow(4) end @@ -50,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetBaseAttack()*2) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -58,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetValue(tc:GetBaseDefense()*2) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c84243274.lua b/official/c84243274.lua index 5a9574f2c7..2b2fdc893e 100644 --- a/official/c84243274.lua +++ b/official/c84243274.lua @@ -1,4 +1,5 @@ --VWXYZ-ドラゴン・カタパルトキャノン +--VWXYZ-Dragon Catapult Cannon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -34,7 +35,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end @@ -61,4 +62,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true) end -end +end \ No newline at end of file diff --git a/official/c84257639.lua b/official/c84257639.lua index 0cf8916503..6f9b75d6f5 100644 --- a/official/c84257639.lua +++ b/official/c84257639.lua @@ -1,4 +1,5 @@ --治療の神 ディアン・ケト +--Dian Keto the Cure Master local s,id=GetID() function s.initial_effect(c) --recover @@ -20,4 +21,4 @@ end function s.op(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84257640.lua b/official/c84257640.lua deleted file mode 100644 index ee6c980d25..0000000000 --- a/official/c84257640.lua +++ /dev/null @@ -1,23 +0,0 @@ ---治療の神 ディアン·ケト(EU) -local s,id=GetID() -function s.initial_effect(c) - --recover - local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCategory(CATEGORY_RECOVER) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.tg) - e1:SetOperation(s.op) - c:RegisterEffect(e1) -end -function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetTargetPlayer(tp) - Duel.SetTargetParam(1000) - Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) -end -function s.op(e,tp,eg,ep,ev,re,r,rp) - local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) - Duel.Recover(p,d,REASON_EFFECT) -end diff --git a/official/c84257883.lua b/official/c84257883.lua index d36cf143f4..c8212db49c 100644 --- a/official/c84257883.lua +++ b/official/c84257883.lua @@ -70,4 +70,4 @@ function s.rctop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c84268896.lua b/official/c84268896.lua index 7481a7c0b7..484ee38d8e 100644 --- a/official/c84268896.lua +++ b/official/c84268896.lua @@ -1,4 +1,5 @@ --アーティファクト-カドケウス +--Artifact Caduceus local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -30,7 +31,7 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) @@ -46,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and not eg:IsContains(e:GetHandler()) and eg:IsExists(aux.FaceupFilter(Card.IsSetCard,0x97),1,nil) + return Duel.IsTurnPlayer(1-tp) and not eg:IsContains(e:GetHandler()) and eg:IsExists(aux.FaceupFilter(Card.IsSetCard,SET_ARTIFACT),1,nil) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end @@ -58,4 +59,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84271823.lua b/official/c84271823.lua index d891d96bcc..cef9b449f5 100644 --- a/official/c84271823.lua +++ b/official/c84271823.lua @@ -67,7 +67,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -88,4 +88,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if g then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84274024.lua b/official/c84274024.lua index 6df9594eb3..ffd89ff7b8 100644 --- a/official/c84274024.lua +++ b/official/c84274024.lua @@ -46,13 +46,8 @@ function s.initial_effect(c) end s.listed_names={CARD_POLYMERIZATION} function s.valcheck(e,c) - local g=c:GetMaterial() - if c:IsType(TYPE_FUSION) and g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) then - c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1) - elseif c:IsType(TYPE_SYNCHRO) and g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) then - c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1) - elseif c:IsType(TYPE_XYZ) and g:IsExists(Card.IsType,1,nil,TYPE_PENDULUM) then - c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000+RESET_PHASE+PHASE_END,0,1) + if c:IsType(TYPE_FUSION|TYPE_SYNCHRO|TYPE_XYZ) and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_PENDULUM) then + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END&~(RESET_LEAVE|RESET_TOFIELD),0,1) end end function s.cfilter(c,e,tp) @@ -75,23 +70,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFlagEffect(tp,id)~=0 then return end local c=e:GetHandler() if eg:GetFirst():IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg:GetFirst():GetOriginalLevel()) - local tc=g:GetFirst() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg:GetFirst():GetOriginalLevel()):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.thfilter1(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() @@ -109,7 +104,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end - Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.thfilter2(c,e,tp,ft,rk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -134,5 +129,5 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) aux.Stringid(id,0) ) end - Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id+2,RESET_PHASE|PHASE_END,0,1) end diff --git a/official/c8428836.lua b/official/c8428836.lua index d659283da2..a08cac2b47 100644 --- a/official/c8428836.lua +++ b/official/c8428836.lua @@ -1,36 +1,36 @@ --冥占術の儀式 ---Nether Prediction Ritual +--Underworld Ritual of Prediction --scripted by Naim local s,id=GetID() function s.initial_effect(c) --Ritual Summon - Ritual.AddProcGreater({handler=c,filter=s.ritualfil,lvtype=RITPROC_GREATER,sumpos=POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE,location=LOCATION_HAND+LOCATION_GRAVE}) + Ritual.AddProcGreater({handler=c,filter=s.ritualfil,lvtype=RITPROC_GREATER,sumpos=POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE,location=LOCATION_HAND|LOCATION_GRAVE}) --Special Summon 1 non-Ritual "Prediction Princess" from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1) e1:SetCondition(s.spcond) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xcc} +s.listed_series={SET_PREDICTION_PRINCESS} function s.ritualfil(c) - return c:IsSetCard(0xcc) and c:IsRitualMonster() + return c:IsSetCard(SET_PREDICTION_PRINCESS) and c:IsRitualMonster() end function s.cfilter(c) - return c:IsRitualMonster() and c:IsSetCard(0xcc) and c:IsFaceup() + return c:IsRitualMonster() and c:IsSetCard(SET_PREDICTION_PRINCESS) and c:IsFaceup() end function s.spcond(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xcc) and not c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_PREDICTION_PRINCESS) and not c:IsRitualMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c84290642.lua b/official/c84290642.lua index 131f5f50f9..79325daec6 100644 --- a/official/c84290642.lua +++ b/official/c84290642.lua @@ -17,7 +17,7 @@ end s.roll_dice=true function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c84298614.lua b/official/c84298614.lua index 68b3716d06..2d45c63450 100644 --- a/official/c84298614.lua +++ b/official/c84298614.lua @@ -1,4 +1,5 @@ --強化蘇生 +--Powerful Rebirth local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -64,4 +65,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84305651.lua b/official/c84305651.lua index a23e09eb7d..7dd50ffa92 100644 --- a/official/c84305651.lua +++ b/official/c84305651.lua @@ -1,4 +1,5 @@ --ゴヨウ・キング +--Goyo King local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -34,7 +35,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end @@ -80,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.GetControl(tc,tp) end end -end +end \ No newline at end of file diff --git a/official/c84313685.lua b/official/c84313685.lua index 0dd3a02fc9..4b98110547 100644 --- a/official/c84313685.lua +++ b/official/c84313685.lua @@ -1,7 +1,8 @@ --ヴァイロン・テセラクト +--Vylon Tesseract local s,id=GetID() function s.initial_effect(c) - aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x30),true,false) + aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_VYLON),true,false) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) @@ -15,12 +16,12 @@ function s.initial_effect(c) e1:SetOperation(s.gspop) c:RegisterEffect(e1) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.gspcon(e,tp,eg,ep,ev,re,r,rp) return aux.IsUnionState(e) and e:GetHandler():GetEquipTarget()==eg:GetFirst() end function s.gfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x30) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_VYLON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.gfilter(chkc,e,tp) end @@ -36,4 +37,4 @@ function s.gspop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84330567.lua b/official/c84330567.lua index 4498920472..e174a30129 100644 --- a/official/c84330567.lua +++ b/official/c84330567.lua @@ -1,12 +1,12 @@ --- ティアラメンツ・ルルカルス --- Tearalaments Lulucaros --- Scripted by Hatter +--ティアラメンツ・ルルカルス +--Tearlaments Rulkallos +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- "Tearalaments Chaetocaros" + 1 "Tearalaments" monster - Fusion.AddProcMix(c,true,true,92731385,aux.FilterBoolFunctionEx(Card.IsSetCard,0x182)) - -- Battle protection + --"Tearalaments Chaetocaros" + 1 "Tearalaments" monster + Fusion.AddProcMix(c,true,true,92731385,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TEARLAMENTS)) + --Battle protection local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(function(e,c) return c~=e:GetHandler() and c:IsRace(RACE_AQUA) end) e1:SetValue(1) c:RegisterEffect(e1) - -- Negate effect activation + --Negate effect activation local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOGRAVE) @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) - -- Special Summon this card + --Special Summon this card local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -41,27 +41,27 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.negcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and Duel.IsChainNegatable(ev) end function s.tgfilter(c) - return c:IsSetCard(0x182) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGrave() + return c:IsSetCard(SET_TEARLAMENTS) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsAbleToGrave() end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) local rc=re:GetHandler() if rc:IsDestructable() and rc:IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_ONFIELD) end end function s.negop(e,tp,eg,ep,ev,re,r,rp) if not (Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)) or Duel.Destroy(eg,REASON_EFFECT)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) if #g>0 then Duel.BreakEffect() Duel.SendtoGrave(g,REASON_EFFECT) @@ -69,7 +69,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsReason(REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and c:IsReason(REASON_EFFECT) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c84332527.lua b/official/c84332527.lua index 50948993b2..4411d6d342 100644 --- a/official/c84332527.lua +++ b/official/c84332527.lua @@ -1,9 +1,9 @@ --- セリオンズ“ブルズ”アイン --- Therions’ "Bulls" Ein --- Scripted by Hatter +--セリオンズ“ブルズ”アイン +--Therion "Bull" Ain +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e1) - -- Destroy + --Destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -26,25 +26,25 @@ function s.initial_effect(c) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) - -- Equipped monster gains ATK + --Equipped monster gains ATK local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_UPDATE_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x17b) end) + e3:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_THERION) end) e3:SetValue(700) c:RegisterEffect(e3) - -- Equipped monster gains effect + --Equipped monster gains effect local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e4:SetRange(LOCATION_SZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(0x17b) end) + e4:SetTarget(function(e,c) return c==e:GetHandler():GetEquipTarget() and c:IsSetCard(SET_THERION) end) e4:SetLabelObject(e2) c:RegisterEffect(e4) end -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.eqfilter(c) - return c:IsMonster() and (c:IsSetCard(0x17b) or c:IsRace(RACE_WARRIOR)) + return c:IsMonster() and (c:IsSetCard(SET_THERION) or c:IsRace(RACE_WARRIOR)) end function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) @@ -74,10 +74,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.desfilter(c,e,tp) return c:IsCanBeEffectTarget(e) and (c:IsControler(1-tp) - or (c:IsFaceup() and c:IsSetCard(0x17b))) + or (c:IsFaceup() and c:IsSetCard(SET_THERION))) end function s.desrescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end diff --git a/official/c84335863.lua b/official/c84335863.lua index 1859c553ff..7a4c1c0bb9 100644 --- a/official/c84335863.lua +++ b/official/c84335863.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1123} +s.listed_series={SET_ROSE_DRAGON} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x1123) or c:IsRace(RACE_PLANT)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_ROSE_DRAGON) or c:IsRace(RACE_PLANT)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -79,10 +79,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) e1:SetValue(1000) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.atktg(e,c) return c:IsLevelAbove(7) and c:IsType(TYPE_SYNCHRO) -end +end \ No newline at end of file diff --git a/official/c84339249.lua b/official/c84339249.lua index bd04d6c730..4412e61dbd 100644 --- a/official/c84339249.lua +++ b/official/c84339249.lua @@ -41,7 +41,7 @@ end function s.indestg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(aux.NOT(Card.IsHasEffect),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,EFFECT_INDESTRUCTABLE_BATTLE) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_APPLYTO) - Duel.SelectTarget(tp,aux.NOT(Card.IsHasEffect),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,EFFECT_INDESTRUCTABLE_BATTLE) + Duel.SelectTarget(tp,aux.NOT(Card.IsHasEffect),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,EFFECT_INDESTRUCTABLE_BATTLE) end function s.indesop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -100,4 +100,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(pos_tc,POS_FACEUP_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c84341431.lua b/official/c84341431.lua index b66acdc2ec..c5e1db08b5 100644 --- a/official/c84341431.lua +++ b/official/c84341431.lua @@ -1,4 +1,5 @@ --デーモンの巨神 +--Archfiend Giant local s,id=GetID() function s.initial_effect(c) --destroy replace @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) @@ -33,10 +34,10 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) else return false end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (e:GetHandler():GetReason()&0x41)==0x41 + return (e:GetHandler():GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.filter(c,e,tp) - return c:IsSetCard(0x45) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ARCHFIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84343351.lua b/official/c84343351.lua index fdad0fd455..fbd4ca89aa 100644 --- a/official/c84343351.lua +++ b/official/c84343351.lua @@ -66,7 +66,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c84361420.lua b/official/c84361420.lua index ec15809d93..40b5f370aa 100644 --- a/official/c84361420.lua +++ b/official/c84361420.lua @@ -1,4 +1,5 @@ --エッジ・ハンマー +--Edge Hammer local s,id=GetID() function s.initial_effect(c) --Activate @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c84366728.lua b/official/c84366728.lua index 8f2858f6bf..4777a6ecfc 100644 --- a/official/c84366728.lua +++ b/official/c84366728.lua @@ -1,9 +1,9 @@ -- --- Vanguard of the Underground Emperor --- Scripted by Hatter +--Vanguard of the Underground Emperor +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon this card + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -32,14 +32,14 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Return to the bottom of the Deck if it leaves the field + --Return to the bottom of the Deck if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3301) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_DECKBOT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c8437145.lua b/official/c8437145.lua index 6afd9ae606..0e4ff8c801 100644 --- a/official/c8437145.lua +++ b/official/c8437145.lua @@ -1,6 +1,5 @@ --煉獄の死徒 --Void Seer - local s,id=GetID() function s.initial_effect(c) --Targeted "Infernoid" monster becomes unaffected by opponent's card effects @@ -21,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xbb) + return c:IsFaceup() and c:IsSetCard(SET_INFERNOID) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -40,7 +39,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(s.efilter) e1:SetOwnerPlayer(tp) tc:RegisterEffect(e1) @@ -51,7 +50,7 @@ function s.efilter(e,re) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsSetCard(0xbb) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) + and c:IsSetCard(SET_INFERNOID) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end diff --git a/official/c84385264.lua b/official/c84385264.lua index dcf394f55d..cef81c8020 100644 --- a/official/c84385264.lua +++ b/official/c84385264.lua @@ -1,4 +1,5 @@ --ライカン・スロープ +--Lycanthrope local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -29,4 +30,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_NORMAL)*200 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84388461.lua b/official/c84388461.lua index 8f4bda6928..ce1b225208 100644 --- a/official/c84388461.lua +++ b/official/c84388461.lua @@ -5,11 +5,11 @@ function s.initial_effect(c) --pendulum summon Pendulum.AddProcedure(c) --Ritual Summon - local e1=Ritual.CreateProc(c,RITPROC_EQUAL,aux.FilterBoolFunction(Card.IsSetCard,0xb4),nil,aux.Stringid(id,1)) + local e1=Ritual.CreateProc(c,RITPROC_EQUAL,aux.FilterBoolFunction(Card.IsSetCard,SET_NEKROZ),nil,aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) c:RegisterEffect(e1) --splimit local e2=Effect.CreateEffect(c) @@ -21,13 +21,9 @@ function s.initial_effect(c) e2:SetTarget(s.splimit) c:RegisterEffect(e2) end -s.listed_series={0xb4,0xc4} +s.listed_series={SET_NEKROZ,SET_ZEFRA} s.listed_names={21105106} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0xb4) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard(SET_NEKROZ) or c:IsSetCard(SET_ZEFRA) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM -end +end \ No newline at end of file diff --git a/official/c84389640.lua b/official/c84389640.lua index dcf17c03e5..74654021ea 100644 --- a/official/c84389640.lua +++ b/official/c84389640.lua @@ -53,7 +53,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local pay=Duel.AnnounceNumber(tp,table.unpack(t)) Duel.PayLPCost(tp,pay) e:SetLabel(-pay) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tc=e:GetLabelObject() @@ -68,7 +68,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) bc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c84397023.lua b/official/c84397023.lua index 6a7be01975..a7f6666fa5 100644 --- a/official/c84397023.lua +++ b/official/c84397023.lua @@ -26,9 +26,9 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) g:GetFirst():RegisterEffect(e1) Duel.ShuffleHand(tp) end end -end +end \ No newline at end of file diff --git a/official/c84401683.lua b/official/c84401683.lua index 661a506925..b5bc6862dd 100644 --- a/official/c84401683.lua +++ b/official/c84401683.lua @@ -12,11 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,13 +32,6 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:GetAttack()>0 end @@ -53,24 +46,24 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then + if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -86,7 +79,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84404797.lua b/official/c84404797.lua index 32331ea821..fa4d74be85 100644 --- a/official/c84404797.lua +++ b/official/c84404797.lua @@ -48,4 +48,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c84417082.lua b/official/c84417082.lua index 4caa1687f7..f6162836f6 100644 --- a/official/c84417082.lua +++ b/official/c84417082.lua @@ -1,4 +1,5 @@ --No.91 サンダー・スパーク・ドラゴン +--Number 91: Thunder Spark Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -55,4 +56,4 @@ end function s.operation2(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84425220.lua b/official/c84425220.lua index 3997fc0dd4..987d7848a2 100644 --- a/official/c84425220.lua +++ b/official/c84425220.lua @@ -1,5 +1,5 @@ --アームド・ドラゴン LV10-ホワイト ---Armed Dragon LV10 - White +--Armed Dragon LV10 White --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -57,7 +57,7 @@ function s.cfilter(c) return c:IsAbleToRemoveAsCost() and c:HasLevel() and c:IsSetCard(SET_ARMED_DRAGON) and aux.SpElimFilter(c,true,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon,0) end local rg=aux.SelectUnselectGroup(g,e,tp,1,#g,s.rescon,1,tp,HINTMSG_REMOVE,s.rescon,nil,false) Duel.Remove(rg,POS_FACEUP,REASON_COST) diff --git a/official/c84428023.lua b/official/c84428023.lua index eb1a05abbf..21892ca4c1 100644 --- a/official/c84428023.lua +++ b/official/c84428023.lua @@ -1,4 +1,5 @@ --エレキャッシュ +--Wattjustment local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,s.filter) @@ -41,4 +42,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84430950.lua b/official/c84430950.lua index a96a87bb86..97a130e4e2 100644 --- a/official/c84430950.lua +++ b/official/c84430950.lua @@ -1,4 +1,5 @@ --重装武者-ベン・ケイ +--Armed Samurai - Ben Kei local s,id=GetID() function s.initial_effect(c) --multi attack @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.val(e,c) return c:GetEquipCount() -end +end \ No newline at end of file diff --git a/official/c84433295.lua b/official/c84433295.lua index 7f37ad8f44..1fc5f5df1c 100644 --- a/official/c84433295.lua +++ b/official/c84433295.lua @@ -54,7 +54,7 @@ function s.valcheck(e,c) if g:GetClassCount(Card.GetCode)==5 then e:GetLabelObject():SetLabel(1) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and e:GetLabel()==1 + return e:GetHandler():IsFusionSummoned() and e:GetLabel()==1 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84442536.lua b/official/c84442536.lua index 69c12fd9d1..94ce326489 100644 --- a/official/c84442536.lua +++ b/official/c84442536.lua @@ -61,4 +61,4 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) if e:IsHasType(EFFECT_TYPE_ACTIVATE) then e:GetHandler():CancelToGrave(false) end -end +end \ No newline at end of file diff --git a/official/c84451804.lua b/official/c84451804.lua index df5bc79de5..5aed2d6917 100644 --- a/official/c84451804.lua +++ b/official/c84451804.lua @@ -1,4 +1,5 @@ --デスガエル +--Des Frog local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -14,7 +15,7 @@ function s.initial_effect(c) end s.listed_names={10456559} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -22,8 +23,8 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,10456559) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -31,6 +32,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if ft1 or (c:IsControler(tp) and c:GetSequence()<5 and ft>0) @@ -31,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end --Check for "Heraldic Beast" monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -48,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -61,9 +59,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end --Locked into machine and psychic monsters for extra deck function s.splimit(e,c) - return not c:IsRace(RACE_MACHINE+RACE_PSYCHIC) and c:IsLocation(LOCATION_EXTRA) + return not c:IsRace(RACE_MACHINE|RACE_PSYCHIC) and c:IsLocation(LOCATION_EXTRA) end function s.lizfilter(e,c) - return not c:IsOriginalRace(RACE_MACHINE+RACE_PSYCHIC) -end - + return not c:IsOriginalRace(RACE_MACHINE|RACE_PSYCHIC) +end \ No newline at end of file diff --git a/official/c84488827.lua b/official/c84488827.lua index 6196b289b9..ef6cee976e 100644 --- a/official/c84488827.lua +++ b/official/c84488827.lua @@ -1,4 +1,5 @@ --インヴェルズ・ガザス +--Steelswarm Caucastag local s,id=GetID() function s.initial_effect(c) --summon success @@ -19,21 +20,21 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} s.listed_names={62729173} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,2,nil,0x100a) or g:IsExists(Card.IsCode,1,nil,62729173) then + if g:IsExists(Card.IsSetCard,2,nil,SET_STEELSWARM) or g:IsExists(Card.IsCode,1,nil,62729173) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.sfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -63,4 +64,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84491298.lua b/official/c84491298.lua index 1e39015b80..9701c6a9b5 100644 --- a/official/c84491298.lua +++ b/official/c84491298.lua @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84504242.lua b/official/c84504242.lua index 58c1445b48..75b6347f5a 100644 --- a/official/c84504242.lua +++ b/official/c84504242.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x138} +s.listed_series={SET_MEGALITH} function s.indct(e,re,r,rp) if (r&REASON_BATTLE)~=0 then return 1 @@ -39,7 +39,7 @@ function s.indct(e,re,r,rp) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return eg:IsExists(Card.IsSetCard,1,nil,0x138) + return eg:IsExists(Card.IsSetCard,1,nil,SET_MEGALITH) end function s.thfilter(c) return c:IsRitualMonster() and c:IsAbleToHand() @@ -56,5 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c84523092.lua b/official/c84523092.lua index 1016c51521..38b74bad6a 100644 --- a/official/c84523092.lua +++ b/official/c84523092.lua @@ -43,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84530620.lua b/official/c84530620.lua index eca3d11cf4..1670822d00 100644 --- a/official/c84530620.lua +++ b/official/c84530620.lua @@ -1,4 +1,5 @@ --OToサンダー +--Pahunder local s,id=GetID() function s.initial_effect(c) --summon @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Summon(tp,tc,true,nil) end -end +end \ No newline at end of file diff --git a/official/c84536654.lua b/official/c84536654.lua index e09214dcc5..2174718b23 100644 --- a/official/c84536654.lua +++ b/official/c84536654.lua @@ -1,4 +1,5 @@ --フォーム・チェンジ +--Form Change local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa008,0x8} +s.listed_series={SET_MASKED_HERO,SET_HERO} function s.spfilter(c,code,lv,e,tp,mc) - return c:GetLevel()==lv and c:IsSetCard(0xa008) and not c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:GetLevel()==lv and c:IsSetCard(SET_MASKED_HERO) and not c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x8) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() + return c:IsFaceup() and c:IsSetCard(SET_HERO) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetCode(),c:GetOriginalLevel(),e,tp,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -32,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if not tc:IsRelateToEffect(e) then return end local code=tc:GetCode() local lv=tc:GetOriginalLevel() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 then return end + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,code,lv,e,tp) if #g>0 then @@ -40,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c84539520.lua b/official/c84539520.lua index c5e8895e78..42aea6e600 100644 --- a/official/c84539520.lua +++ b/official/c84539520.lua @@ -1,4 +1,5 @@ --アマゾネス王女 +--Amazoness Princess local s,id=GetID() function s.initial_effect(c) --code @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(15951532) c:RegisterEffect(e1) --search @@ -34,10 +35,10 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0x4) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_AMAZONESS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -57,18 +58,18 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,ft) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,c,ft) end local g=nil Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if ft<=0 then g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE,0,1,1,c,ft) else - g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,ft) + g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,c,ft) end Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_AMAZONESS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -82,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c8454126.lua b/official/c8454126.lua index 6e4c0f9555..1c6b9c2277 100644 --- a/official/c8454126.lua +++ b/official/c8454126.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) end) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -34,51 +34,51 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={23459650,id} -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} function s.spfilter(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,c,nil,REASON_RITUAL) - return #pg<=0 and c:IsSetCard(0x11f) and c:IsRitualMonster() and not c:IsCode(id) + return #pg<=0 and c:IsSetCard(SET_NEPHTHYS) and c:IsRitualMonster() and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)>0 then tc:CompleteProcedure() end end function s.regcond(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x11f) and r&REASON_EFFECT>0 + return re and re:GetHandler():IsSetCard(SET_NEPHTHYS) and r&REASON_EFFECT>0 end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD) + Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetCurrentPhase()==PHASE_STANDBY and 2 or 1 + local ct=Duel.IsPhase(PHASE_STANDBY) and 2 or 1 --Destroy up to 3 "Nephthys" cards from your hand/Deck/field local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.descond) e1:SetOperation(s.desop) e1:SetLabel(ct,Duel.GetTurnCount()) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,ct) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,ct) Duel.RegisterEffect(e1,tp) end function s.desfilter(c,e) - return c:IsSetCard(0x11f) and c:IsDestructable(e) and not c:IsRitualMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD)) + return c:IsSetCard(SET_NEPHTHYS) and c:IsDestructable(e) and not c:IsRitualMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD)) end function s.descond(e,tp,eg,ep,ev,re,r,rp) local sp_label,turn=e:GetLabel() - return (sp_label==1 or turn~=Duel.GetTurnCount()) and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,nil,e) + return (sp_label==1 or turn~=Duel.GetTurnCount()) and Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD,0,1,nil,e) end function s.descheck(sg,e,tp,mg) local res=sg:GetClassCount(Card.GetLocation)==#sg @@ -86,7 +86,7 @@ function s.descheck(sg,e,tp,mg) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) - local sg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,nil,e) + local sg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD,0,nil,e) if #sg==0 then return end local rg=aux.SelectUnselectGroup(sg,e,tp,1,3,s.descheck,1,tp,HINTMSG_DESTROY) Duel.Destroy(rg,REASON_EFFECT) diff --git a/official/c84544192.lua b/official/c84544192.lua index 99df5332c3..9032a5520b 100644 --- a/official/c84544192.lua +++ b/official/c84544192.lua @@ -1,13 +1,13 @@ --- 究極宝玉神 レインボー・ドラゴン オーバー・ドライブ --- Rainbow Dragon Overdrive --- Scripted by Hatter +--究極宝玉神 レインボー・ドラゴン オーバー・ドライブ +--Ultimate Crystal Rainbow Dragon Overdrive +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 1 "Ultimate Crystal" Monster + 7 "Crystal Beast" Monsters - Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1034),7,7,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2034)) + --1 "Ultimate Crystal" Monster + 7 "Crystal Beast" Monsters + Fusion.AddProcMixRep(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CRYSTAL_BEAST),7,7,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ULTIMATE_CRYSTAL)) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.contactlim,s.contactcon) - -- Register "Ultimate Crystal" Special Summon + --Register "Ultimate Crystal" Special Summon aux.GlobalCheck(s,function() local ge1=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -15,13 +15,13 @@ function s.initial_effect(c) ge1:SetOperation(s.regop) Duel.RegisterEffect(ge1,0) end) - -- Cannot be Special Summoned by other ways + --Cannot be Special Summoned by other ways local e0=Effect.CreateEffect(c) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) c:RegisterEffect(e0) - -- Gain ATK + --Gains 700 ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) @@ -30,28 +30,28 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetValue(7000) c:RegisterEffect(e1) - -- Shuffle cards to Deck + --Shuffle as many cards into the Deck as possible and Special Summon "Crystal Beast" monsters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e2:SetCondition(function(e) return e:GetHandler():GetBattledGroupCount()==0 end) - e2:SetCost(s.tdcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x2034,0x1034} -s.listed_materials={0x2034,0x1034} +s.listed_series={SET_ULTIMATE_CRYSTAL,SET_CRYSTAL_BEAST} +s.material_setcode={SET_ULTIMATE_CRYSTAL,SET_CRYSTAL_BEAST} function s.contactfil(tp) - local loc=Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and LOCATION_MZONE or LOCATION_MZONE+LOCATION_GRAVE + local loc=Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and LOCATION_MZONE or LOCATION_MZONE|LOCATION_GRAVE return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.contactlim(e) return e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -60,21 +60,18 @@ function s.contactcon(tp) return Duel.GetFlagEffect(tp,id)>0 end function s.regop(e,tp,eg,ep,ev,re,r,rp) - for ec in aux.Next(eg) do - if ec:IsSetCard(0x2034) and ec:IsFaceup() then Duel.RegisterFlagEffect(ec:GetSummonPlayer(),id,0,0,0) end + for ec in eg:Iter() do + if ec:IsSetCard(SET_ULTIMATE_CRYSTAL) and ec:IsFaceup() then + Duel.RegisterFlagEffect(ec:GetSummonPlayer(),id,0,0,0) + end end end function s.cbfilter(c) - return c:IsFaceup() and c:IsSetCard(0x1034) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) end function s.atkcon(e) return Duel.GetMatchingGroup(s.cbfilter,e:GetHandlerPlayer(),LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=7 end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter(c,e,tp) return s.cbfilter(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -97,4 +94,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84546257.lua b/official/c84546257.lua index 80290a6b25..b99bf00738 100644 --- a/official/c84546257.lua +++ b/official/c84546257.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x12b),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MARINCESS),2) --Search 1 "Marincess" Trap local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -30,7 +30,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.counterfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) end @@ -43,7 +43,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) @@ -58,7 +58,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) s.cost(e,tp,eg,ep,ev,re,r,rp,1) end function s.thfilter(c) - return c:IsSetCard(0x12b) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -104,4 +104,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84550200.lua b/official/c84550200.lua index 44127df8cc..f3ee2e10e3 100644 --- a/official/c84550200.lua +++ b/official/c84550200.lua @@ -17,9 +17,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) -end + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c84565800.lua b/official/c84565800.lua index 53c34f9c74..31de691df9 100644 --- a/official/c84565800.lua +++ b/official/c84565800.lua @@ -42,7 +42,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_SPELL+TYPE_TRAP) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsSpellTrap() then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end @@ -64,8 +64,8 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN) + c:CopyEffect(code,RESETS_STANDARD_PHASE_END|RESET_SELF_TURN) end -end +end \ No newline at end of file diff --git a/official/c84569017.lua b/official/c84569017.lua index b3159c34ec..4f0e6cd704 100644 --- a/official/c84569017.lua +++ b/official/c84569017.lua @@ -1,4 +1,5 @@ --スピアフィッシュソルジャー +--Spearfish Soldier local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,8 +12,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.atkfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_AQUA|RACE_SEASERPENT) end function s.atkup(e,c) return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_REMOVED,0,nil)*100 -end +end \ No newline at end of file diff --git a/official/c84569886.lua b/official/c84569886.lua index baa5bca3e3..ca49a28590 100644 --- a/official/c84569886.lua +++ b/official/c84569886.lua @@ -1,10 +1,10 @@ --DDD超死偉王パープリッシュ・ヘル・アーマゲドン ---D/D/D Super Doom King Purplish Armageddon +--D/D/D Super Doom King Purple Armageddon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() Pendulum.AddProcedure(c,false) - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10af),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DDD),2) --atk local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -48,13 +48,13 @@ function s.initial_effect(c) e6:SetOperation(s.penop) c:RegisterEffect(e6) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=a:GetBattleTarget() if not a or not d then return false end if a:IsControler(1-tp) then a,d=d,a end - return a:IsFaceup() and a:IsRelateToBattle() and a:IsSetCard(0x10af) and a:IsType(TYPE_FUSION) + return a:IsFaceup() and a:IsRelateToBattle() and a:IsSetCard(SET_DDD) and a:IsType(TYPE_FUSION) and d and d:IsFaceup() and d:IsRelateToBattle() and d:GetAttack()>0 and a:GetControler()~=d:GetControler() end function s.atkop1(e,tp,ep,ev,re,r,rp) @@ -67,7 +67,7 @@ function s.atkop1(e,tp,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) d:RegisterEffect(e1) end end @@ -105,7 +105,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tc:RegisterEffect(e1) end end @@ -122,4 +122,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c84592800.lua b/official/c84592800.lua index 31b298df44..3e7f6c310d 100644 --- a/official/c84592800.lua +++ b/official/c84592800.lua @@ -1,4 +1,5 @@ --D・ビデオン +--Morphtronic Videon local s,id=GetID() function s.initial_effect(c) --atk @@ -24,4 +25,4 @@ function s.cond(e) end function s.val(e,c) return c:GetEquipCount()*800 -end +end \ No newline at end of file diff --git a/official/c84613836.lua b/official/c84613836.lua index 261c6da3d3..29e92131fd 100644 --- a/official/c84613836.lua +++ b/official/c84613836.lua @@ -21,12 +21,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return ep==tp and Duel.GetCurrentPhase()==PHASE_DRAW + return ep==tp and Duel.IsPhase(PHASE_DRAW) end function s.filter(c,e,tp) - return c:IsSetCard(0x3d) and c:IsMonster() and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SIX_SAMURAI) and c:IsMonster() and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(s.filter,1,nil,e,tp) end @@ -51,4 +51,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84636823.lua b/official/c84636823.lua index d5c528161b..595ebcfbfb 100644 --- a/official/c84636823.lua +++ b/official/c84636823.lua @@ -28,14 +28,14 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL) and (re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return re:IsSpellEffect() and (re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.distg(e,c) return c:IsSpell() end function s.disop(e,tp,eg,ep,ev,re,r,rp) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if (tl&LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL) then + if (tl&LOCATION_SZONE)~=0 and re:IsSpellEffect() then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c8463720.lua b/official/c8463720.lua index 7d5d02f685..51a8b8fb21 100644 --- a/official/c8463720.lua +++ b/official/c8463720.lua @@ -1,16 +1,17 @@ --DDD剋竜王ベオウルフ +--D/D/D Dragonbane King Beowulf local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10af),aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DDD),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD)) --pierce local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_PIERCE) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaf)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DD)) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) @@ -18,16 +19,16 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_MZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.material_setcode={0xaf,0x10af} +s.material_setcode={SET_DD,SET_DDD} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) return c:GetSequence()<5 @@ -40,4 +41,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84640866.lua b/official/c84640866.lua index 9e60034476..26b6dccb98 100644 --- a/official/c84640866.lua +++ b/official/c84640866.lua @@ -27,5 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c84650463.lua b/official/c84650463.lua index e94d0ae798..3d21510ddf 100644 --- a/official/c84650463.lua +++ b/official/c84650463.lua @@ -1,4 +1,5 @@ --フラッピィ +--Slushy local s,id=GetID() function s.initial_effect(c) --send to grave @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -42,7 +43,7 @@ function s.cfilter(c) return c:IsCode(id) and c:IsFaceup() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)==3 + return Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil)==3 end function s.filter(c,e,tp) return c:IsLevelAbove(5) and c:IsRace(RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -60,4 +61,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84653834.lua b/official/c84653834.lua index 4ae8d60fde..a80d7afc9a 100644 --- a/official/c84653834.lua +++ b/official/c84653834.lua @@ -1,4 +1,5 @@ --超能力増幅器 +--ESP Amplifier local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.IsDamageCalculated() then return false end + if Duel.IsPhase(PHASE_DAMAGE) and Duel.IsDamageCalculated() then return false end return true end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -29,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) @@ -37,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetRange(LOCATION_MZONE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetCountLimit(1) e2:SetOperation(s.rmop) tc:RegisterEffect(e2) @@ -45,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84664085.lua b/official/c84664085.lua index 3e61c488c5..6ee618d1cc 100644 --- a/official/c84664085.lua +++ b/official/c84664085.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -58,7 +58,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.spfilter(c,e,tp) return c:IsLevelBelow(8) and c:IsSetCard({SET_WARRIOR,SET_SYNCHRON,SET_STARDUST}) and c:IsType(TYPE_SYNCHRO) @@ -80,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c84673417.lua b/official/c84673417.lua index c942bf979b..8a83365945 100644 --- a/official/c84673417.lua +++ b/official/c84673417.lua @@ -27,15 +27,15 @@ function s.initial_effect(c) e2:SetOperation(s.ddop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.atkcfilter(c) - return c:IsSetCard(0x38) and c:IsLevelAbove(1) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) + return c:IsSetCard(SET_LIGHTSWORN) and c:IsLevelAbove(1) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) and Duel.IsExistingTarget(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) e:SetLabel(g:GetFirst():GetLevel()) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -53,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-lv*300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -63,8 +63,8 @@ end function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc~=c - and rc:IsSetCard(0x38) and rc:IsControler(tp) + return re:IsMonsterEffect() and rc~=c + and rc:IsSetCard(SET_LIGHTSWORN) and rc:IsControler(tp) end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -72,4 +72,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84687358.lua b/official/c84687358.lua index 1523291d47..b7be98c612 100644 --- a/official/c84687358.lua +++ b/official/c84687358.lua @@ -43,4 +43,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84731222.lua b/official/c84731222.lua index 626149c1b8..3ce79dfc43 100644 --- a/official/c84731222.lua +++ b/official/c84731222.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) local ct=g:GetClassCount(Card.GetCode) Duel.Draw(p,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84740193.lua b/official/c84740193.lua index a8283956e1..753686c529 100644 --- a/official/c84740193.lua +++ b/official/c84740193.lua @@ -1,4 +1,5 @@ --バスターランチャー +--Buster Rancher local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttackBelow,1000),s.eqlimit) @@ -11,12 +12,12 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.eqlimit(e,c) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL or c:IsAttackBelow(1000) + return Duel.IsPhase(PHASE_DAMAGE_CAL) or c:IsAttackBelow(1000) end function s.atkcon(e) local ec=e:GetHandler():GetEquipTarget() if not ec:IsRelateToBattle() then return end local bc=ec:GetBattleTarget() - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and bc + return Duel.IsPhase(PHASE_DAMAGE_CAL) and bc and ((bc:IsAttackPos() and bc:IsAttackAbove(2500)) or (bc:IsDefensePos() and bc:IsDefenseAbove(2500))) -end +end \ No newline at end of file diff --git a/official/c84747429.lua b/official/c84747429.lua index 8122985943..71633a7f79 100644 --- a/official/c84747429.lua +++ b/official/c84747429.lua @@ -1,4 +1,5 @@ --エアジャチ +--Airorca local s,id=GetID() function s.initial_effect(c) --destroy @@ -15,7 +16,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToRemoveAsCost() + return c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsAbleToRemoveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -35,21 +36,21 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then Duel.BreakEffect() - if Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)==0 then return end + if Duel.Remove(c,0,REASON_EFFECT|REASON_TEMPORARY)==0 then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetLabelObject(c) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) Duel.RegisterEffect(e1,tp) end end function s.retcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c84749824.lua b/official/c84749824.lua index 8f8b7ad8df..2fac6fdc3c 100644 --- a/official/c84749824.lua +++ b/official/c84749824.lua @@ -48,7 +48,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsChainNegatable(ev) then return false end - if not re or (not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end + if not re or (not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,4 +66,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84764038.lua b/official/c84764038.lua index fbd085c328..9df6545f78 100644 --- a/official/c84764038.lua +++ b/official/c84764038.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 スカラマリオン +--Scarm, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -40,16 +41,16 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xb1} +s.listed_series={SET_BURNING_ABYSS} s.listed_names={id} function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -66,7 +67,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thfilter(c) return c:GetLevel()==3 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND) @@ -86,4 +87,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c84766279.lua b/official/c84766279.lua index c8ded16255..2d6330ca80 100644 --- a/official/c84766279.lua +++ b/official/c84766279.lua @@ -1,8 +1,9 @@ --ダイガスタ・ガルドス +--Daigusto Gulldos local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x10),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_GUSTO),1,99) c:EnableReviveLimit() --destroy local e1=Effect.CreateEffect(c) @@ -17,9 +18,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.costfilter(c) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,2,nil) end @@ -39,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84769941.lua b/official/c84769941.lua index bec354d38a..7a2eecb62a 100644 --- a/official/c84769941.lua +++ b/official/c84769941.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,0xd3),LOCATION_MZONE) + c:SetUniqueOnField(1,0,aux.FilterBoolFunction(Card.IsSetCard,SET_KAIJU),LOCATION_MZONE) --special summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -33,8 +33,8 @@ function s.initial_effect(c) e3:SetValue(s.atkval) c:RegisterEffect(e3) end -s.counter_list={0x37} -s.listed_series={0xd3} +s.counter_list={COUNTER_KAIJU} +s.listed_series={SET_KAIJU} function s.eqval(ec,c,tp) return ec:IsControler(tp) and s.eqfilter(ec) end @@ -42,19 +42,19 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xd3),tp,0,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_KAIJU),tp,0,LOCATION_MZONE,1,nil) end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,2,REASON_COST) end - Duel.RemoveCounter(tp,1,1,0x37,2,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,2,REASON_COST) end function s.eqfilter(c) - return c:IsSetCard(0xd3) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.equipop(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,id,true) @@ -64,16 +64,16 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) end end function s.atkfilter(c) - return c:IsSetCard(0xd3) and c:GetAttack()>=0 and c:GetFlagEffect(id)~=0 + return c:IsSetCard(SET_KAIJU) and c:GetAttack()>=0 and c:GetFlagEffect(id)~=0 end function s.atkval(e,c) local g=e:GetHandler():GetEquipGroup():Filter(s.atkfilter,nil) return g:GetSum(Card.GetAttack) -end +end \ No newline at end of file diff --git a/official/c84778110.lua b/official/c84778110.lua index 5a1ff92324..b7fd065bff 100644 --- a/official/c84778110.lua +++ b/official/c84778110.lua @@ -1,7 +1,6 @@ --フリント・クラッガー --Flint Cragger --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -24,30 +23,24 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.damcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) c:RegisterEffect(e2) end - --Lists "Fossil" archetype -s.listed_series={0x14c} - --Specifically lists itself and "Fossil Fusion" +s.listed_series={SET_FOSSIL} s.listed_names={id,CARD_FOSSIL_FUSION} - - --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA) end - --Check for a "Fossil" fusion monster function s.tgfilter(c) - return c:IsType(TYPE_FUSION) and c:IsSetCard(0x14c) and c:IsAbleToGrave() + return c:IsType(TYPE_FUSION) and c:IsSetCard(SET_FOSSIL) and c:IsAbleToGrave() end - --Send 1 "Fossil" fusion monster from extra deck to GY function s.tgop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_EFFECT)~=0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD|REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil) if #g>0 then @@ -55,24 +48,15 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end end - --If this card was sent from field -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end - --Activation legality function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) end - --Check for "Fossil Fusion" or a card that specifically lists "Fossil Fusion" function s.rmfilter(c) return c:IsFaceup() and (c:IsCode(CARD_FOSSIL_FUSION) or c:ListsCode(CARD_FOSSIL_FUSION)) end - --Inflict 500 damage function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Damage(p,d,REASON_EFFECT)~=0 then @@ -83,7 +67,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local sg=g:Select(tp,1,1,nil) Duel.HintSelection(sg) - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end end end \ No newline at end of file diff --git a/official/c847915.lua b/official/c847915.lua index 6a8c9dcbf5..5a8ab47ed3 100644 --- a/official/c847915.lua +++ b/official/c847915.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x48)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER)) e2:SetValue(s.indval) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetRange(LOCATION_SZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x48)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_NUMBER)) e3:SetValue(1) c:RegisterEffect(e3) --destroy @@ -34,19 +34,19 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.indval(e,c) - return not c:IsSetCard(0x48) + return not c:IsSetCard(SET_NUMBER) end function s.actcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x48),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_NUMBER),tp,LOCATION_MZONE,0,1,nil) end function s.dfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x48) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_NUMBER) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.dfilter,1,nil,tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84792926.lua b/official/c84792926.lua index 0f5bf666fa..1dd84b9b0a 100644 --- a/official/c84792926.lua +++ b/official/c84792926.lua @@ -1,5 +1,5 @@ --円盤闘技場セリオンズ・リング ---Therions' Ring, the Colosseum Saucer +--Therion Discolosseum --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -35,9 +35,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_ARGYRO_SYSTEM} -s.listed_series={0x17b} +s.listed_series={SET_THERION} function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x17b) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_THERION) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -53,7 +53,7 @@ function s.dfilter(c,tp) return c:IsControler(tp) and c:IsReason(REASON_BATTLE) end function s.repfilter(c) - return (c:IsSetCard(0x17b) or c:IsCode(CARD_ARGYRO_SYSTEM)) and c:IsAbleToGrave() + return (c:IsSetCard(SET_THERION) or c:IsCode(CARD_ARGYRO_SYSTEM)) and c:IsAbleToGrave() end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.dfilter,1,nil,tp) diff --git a/official/c84797028.lua b/official/c84797028.lua index eddf46556a..8f14cce341 100644 --- a/official/c84797028.lua +++ b/official/c84797028.lua @@ -45,7 +45,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end Duel.Remove(c,POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_MACHINE) and c:IsAbleToHand() diff --git a/official/c84808313.lua b/official/c84808313.lua index a585fc8c77..8a312b819f 100644 --- a/official/c84808313.lua +++ b/official/c84808313.lua @@ -1,4 +1,5 @@ --大進化薬 +--Big Evolution Pill local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,7 +42,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) @@ -50,14 +51,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetLabelObject(e1) e3:SetOwnerPlayer(tp) e3:SetOperation(s.reset) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.reset(e,tp,eg,ep,ev,re,r,rp) s.desop(e:GetLabelObject(),tp,eg,ep,ev,e,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -72,4 +73,4 @@ end function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c84812868.lua b/official/c84812868.lua index 7ea88065f9..c42b96ba4b 100644 --- a/official/c84812868.lua +++ b/official/c84812868.lua @@ -1,4 +1,5 @@ --月光白兎 +--Lunalight White Rabbit local s,id=GetID() function s.initial_effect(c) --spsummon @@ -22,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} s.listed_names={id} function s.spfilter(c,e,tp) - return c:IsSetCard(0xdf) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_LUNALIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -46,9 +47,9 @@ function s.filter2(c) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter2(chkc) end - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xdf),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_LUNALIGHT),tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_ONFIELD,1,nil) end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0xdf),tp,LOCATION_ONFIELD,0,e:GetHandler()) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_LUNALIGHT),tp,LOCATION_ONFIELD,0,e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) @@ -58,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84813516.lua b/official/c84813516.lua index 95c112b0f2..6b8ec7ef9d 100644 --- a/official/c84813516.lua +++ b/official/c84813516.lua @@ -55,9 +55,9 @@ function s.cstfilter(c) return c:IsTrap() and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFacedown()) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cstfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cstfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cstfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cstfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -75,7 +75,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.thcond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end @@ -89,4 +89,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if res==6 and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84814897.lua b/official/c84814897.lua index 5606f7e8b8..fe2c2ab7cd 100644 --- a/official/c84814897.lua +++ b/official/c84814897.lua @@ -1,4 +1,5 @@ --騎竜 +--Kiryu local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,11321183),true) @@ -39,7 +40,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c84815190.lua b/official/c84815190.lua index 0cf6bd9e36..9dec03e8ee 100644 --- a/official/c84815190.lua +++ b/official/c84815190.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetTarget(s.sptg) diff --git a/official/c84816244.lua b/official/c84816244.lua index d3858125c8..574e1e3ed5 100644 --- a/official/c84816244.lua +++ b/official/c84816244.lua @@ -27,5 +27,4 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c84824601.lua b/official/c84824601.lua index 3dd35cc2cb..d57777b9db 100644 --- a/official/c84824601.lua +++ b/official/c84824601.lua @@ -1,4 +1,5 @@ --ボタニティ・ガール +--Botanical Girl local s,id=GetID() function s.initial_effect(c) --search @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c8483333.lua b/official/c8483333.lua index 23fe061987..564d8d1796 100644 --- a/official/c8483333.lua +++ b/official/c8483333.lua @@ -1,4 +1,5 @@ --モザイク・マンティコア +--Mosaic Manticore local s,id=GetID() function s.initial_effect(c) --remove @@ -10,7 +11,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -20,15 +21,15 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) c:RegisterEffect(e1) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp,rc) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_SUMMON) and c:GetReasonCard()==rc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -55,19 +56,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c84834865.lua b/official/c84834865.lua index 389799d6a9..a8fdd58b5f 100644 --- a/official/c84834865.lua +++ b/official/c84834865.lua @@ -1,4 +1,5 @@ --ドラゴンフライ +--Flying Kamakiri #1 local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c84845628.lua b/official/c84845628.lua index c727af8d48..1ed272cb62 100644 --- a/official/c84845628.lua +++ b/official/c84845628.lua @@ -1,4 +1,5 @@ --獄落鳥 +--Bird of Paradise Lost local s,id=GetID() function s.initial_effect(c) --atk & def @@ -47,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c84847656.lua b/official/c84847656.lua index 3245c9fc6f..7881b0521e 100644 --- a/official/c84847656.lua +++ b/official/c84847656.lua @@ -1,4 +1,5 @@ --テレキアタッカー +--Telekinetic Shocker local s,id=GetID() function s.initial_effect(c) --destroy replace @@ -26,5 +27,5 @@ function s.value(e,c) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHIC) and not c:IsReason(REASON_REPLACE) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c84851250.lua b/official/c84851250.lua index 7ce9ac2b16..269a1cf0ad 100644 --- a/official/c84851250.lua +++ b/official/c84851250.lua @@ -1,7 +1,6 @@ --WW-ブリザード・ベル --Windwitch - Blizzard Bell --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -20,23 +19,19 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) + e2:SetCost(Cost.SelfToGrave) e2:SetCondition(s.condition) e2:SetTarget(s.target) e2:SetOperation(s.operation) e2:SetCountLimit(1,id) c:RegisterEffect(e2) end - --Lists “Windwitch" archetype -s.listed_series={0xf0} - --Specifically lists itself +s.listed_series={SET_WINDWITCH} s.listed_names={id} - - --Check for non-"Windwitch" monster function s.filter(c) - return c:IsFacedown() or not c:IsSetCard(0xf0) + return c:IsFacedown() or not c:IsSetCard(SET_WINDWITCH) end function s.ntcon(e,c,minc,zone) if c==nil then return true end @@ -44,19 +39,12 @@ function s.ntcon(e,c,minc,zone) return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)) end - --Send itself as cost -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end - --Check if player controls a "Windwitch" monster other than this card's name function s.cfilter(c) - return c:IsSetCard(0xf0) and c:IsFaceup() and not c:IsCode(id) + return c:IsSetCard(SET_WINDWITCH) and c:IsFaceup() and not c:IsCode(id) end --Check if it's opponent's main phase and player controls a "Windwitch" monster other than this card's name function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetTurnPlayer()~=tp and Duel.IsMainPhase() + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c84869738.lua b/official/c84869738.lua index 8d654c47e9..e3b89c29c3 100644 --- a/official/c84869738.lua +++ b/official/c84869738.lua @@ -17,31 +17,31 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) end -s.listed_series={0x20f8} -s.listed_names={13331639} +s.listed_series={SET_SUPREME_KING_DRAGON} +s.listed_names={CARD_ZARC} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,13331639),tp,LOCATION_ONFIELD,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ZARC),tp,LOCATION_ONFIELD,0,1,nil) end function s.spfilter(c,e,tp) - if not (c:IsSetCard(0x20f8) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end + if not (c:IsSetCard(SET_SUPREME_KING_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end if c:IsLocation(LOCATION_EXTRA) then - local g=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsCode,13331639)),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsCode,CARD_ZARC)),tp,LOCATION_MZONE,0,nil) return Duel.GetLocationCountFromEx(tp,tp,g,c)>0 else return Duel.GetMZoneCount(tp,g)>0 end end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsCode,13331639)),tp,LOCATION_MZONE,0,nil) - if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsCode,13331639)),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end + local g=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsCode,CARD_ZARC)),tp,LOCATION_MZONE,0,nil) + if chk==0 then return Duel.IsExistingMatchingCard(aux.NOT(aux.FaceupFilter(Card.IsCode,CARD_ZARC)),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_EXTRA) end function s.exfilter1(c) return c:IsLocation(LOCATION_EXTRA) and c:IsFacedown() and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) @@ -62,7 +62,7 @@ function s.rescon(ft1,ft2,ft3,ft4,ft) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local dg=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsCode,13331639)),tp,LOCATION_MZONE,0,nil) + local dg=Duel.GetMatchingGroup(aux.NOT(aux.FaceupFilter(Card.IsCode,CARD_ZARC)),tp,LOCATION_MZONE,0,nil) if Duel.Destroy(dg,REASON_EFFECT)==0 then return end local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft2=Duel.GetLocationCountFromEx(tp) @@ -84,8 +84,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ft4 = math.min(ect, ft4) end local loc=0 - if ft1>0 then loc=loc+LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE end - if ft2>0 or ft3>0 or ft4>0 then loc=loc+LOCATION_EXTRA end + if ft1>0 then loc=loc|LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE end + if ft2>0 or ft3>0 or ft4>0 then loc=loc|LOCATION_EXTRA end if loc==0 then return end local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,loc,0,nil,e,tp) if #sg==0 then return end @@ -93,15 +93,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(rg,0,tp,tp,true,false,POS_FACEUP) end function s.xyzfilter(c) - return c:IsFaceup() and c:IsSetCard(0x20f8) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_SUPREME_KING_DRAGON) and c:IsType(TYPE_XYZ) end function s.matfilter(c) - return c:IsSetCard(0x20f8) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) + return c:IsSetCard(SET_SUPREME_KING_DRAGON) and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.xyzfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.xyzfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,2,nil) end + and Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil) end @@ -109,9 +109,9 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,2,2,nil) if #g>0 then Duel.Overlay(tc,g) end end -end +end \ No newline at end of file diff --git a/official/c8487449.lua b/official/c8487449.lua index f4c80a584f..49bba84dd9 100644 --- a/official/c8487449.lua +++ b/official/c8487449.lua @@ -1,4 +1,5 @@ --ジェスター・コンフィ +--Jester Confit local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -39,7 +40,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.thcon) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+0x16a0000+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_EVENT|RESET_TOFIELD|RESET_PHASE|PHASE_END,2) e1:SetLabel(Duel.GetTurnCount()) c:RegisterEffect(e1) end @@ -68,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(c,tc) Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84877802.lua b/official/c84877802.lua index 1459c4df97..0e32d37382 100644 --- a/official/c84877802.lua +++ b/official/c84877802.lua @@ -1,4 +1,5 @@ --最強の盾 +--Magnum Shield local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)) @@ -19,4 +20,4 @@ function s.atkval(e,c) end function s.defval(e,c) if c:IsAttackPos() then return 0 else return c:GetBaseAttack() end -end +end \ No newline at end of file diff --git a/official/c84899094.lua b/official/c84899094.lua index 4698cafc70..6c80d36f25 100644 --- a/official/c84899094.lua +++ b/official/c84899094.lua @@ -9,9 +9,9 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_CHAINING) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -36,11 +36,6 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g:IsExists(s.cfilter,1,nil,tp) and Duel.IsChainNegatable(ev) end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) diff --git a/official/c84900597.lua b/official/c84900597.lua index e7ba5a3a88..516a4995f2 100644 --- a/official/c84900597.lua +++ b/official/c84900597.lua @@ -63,7 +63,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c84903021.lua b/official/c84903021.lua index 72c3c98997..e00be2ccb6 100644 --- a/official/c84903021.lua +++ b/official/c84903021.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x161} +s.listed_series={SET_WAR_ROCK} function s.cfilter(c) return c:IsFacedown() or not c:IsRace(RACE_WARRIOR) end @@ -41,30 +41,30 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) return bc and bc:IsAttribute(ATTRIBUTE_EARTH) and bc:IsRace(RACE_WARRIOR) end function s.atkfilter(c) - return c:IsSetCard(0x161) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) + return c:IsSetCard(SET_WAR_ROCK) and c:IsFaceup() and not c:IsStatus(STATUS_BATTLE_DESTROYED) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then + if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then local atkg=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil) if #atkg==0 then return end Duel.BreakEffect() local c=e:GetHandler() - for tc in aux.Next(atkg) do + for tc in atkg:Iter() do --Increase ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) e1:SetValue(200) tc:RegisterEffect(e1) end diff --git a/official/c84905691.lua b/official/c84905691.lua index 5bcd13d9e4..3412bb6864 100644 --- a/official/c84905691.lua +++ b/official/c84905691.lua @@ -14,11 +14,11 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.CheckReleaseGroupCost(tp,aux.FaceupFilter(Card.IsSetCard,0x2a),1,false,nil,c) end - local g=Duel.SelectReleaseGroupCost(tp,aux.FaceupFilter(Card.IsSetCard,0x2a),1,1,false,nil,c) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),1,false,nil,c) end + local g=Duel.SelectReleaseGroupCost(tp,aux.FaceupFilter(Card.IsSetCard,SET_NATURIA),1,1,false,nil,c) Duel.Release(g,REASON_COST) end function s.desfilter(c,e,tp) @@ -36,4 +36,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84914462.lua b/official/c84914462.lua index af8cfaf2f4..4990099417 100644 --- a/official/c84914462.lua +++ b/official/c84914462.lua @@ -1,4 +1,5 @@ --アックス・ドラゴニュート +--Axe Dragonute local s,id=GetID() function s.initial_effect(c) --to defense @@ -17,4 +18,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c8491961.lua b/official/c8491961.lua index cbdf50b700..aece475e21 100644 --- a/official/c8491961.lua +++ b/official/c8491961.lua @@ -28,13 +28,13 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) - e3:SetCost(s.thcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetHandler():GetOverlayCount()>0 + return e:GetHandler():IsXyzSummoned() and e:GetHandler():GetOverlayCount()>0 end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -52,7 +52,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300*oc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -60,11 +60,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) -end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return e:GetHandler():IsXyzSummoned() end function s.thfilter(c) return c:GetLevel()==1 and c:IsRace(RACE_WINGEDBEAST) and c:IsAbleToHand() @@ -80,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c84932271.lua b/official/c84932271.lua index cc0f639b96..f68c2f4a25 100644 --- a/official/c84932271.lua +++ b/official/c84932271.lua @@ -1,4 +1,5 @@ --ワーム・ジェートリクプス +--Worm Jetelikpse local s,id=GetID() function s.initial_effect(c) --flip effect @@ -20,8 +21,8 @@ function s.initial_effect(c) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END,0,1) + if c:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) then + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c8495780.lua b/official/c8495780.lua index 85f9c0187a..6b94814525 100644 --- a/official/c8495780.lua +++ b/official/c8495780.lua @@ -31,7 +31,7 @@ end s.listed_names={id} function s.rvcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE) and re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) + return c:IsPreviousLocation(LOCATION_DECK|LOCATION_GRAVE) and re and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) end function s.rvcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -71,14 +71,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end -end - +end \ No newline at end of file diff --git a/official/c84965420.lua b/official/c84965420.lua index 6053570b39..ccd6f35952 100644 --- a/official/c84965420.lua +++ b/official/c84965420.lua @@ -1,5 +1,5 @@ --ドライトロン流星群 ---Draitron Meteor Shower +--Drytron Meteor Shower --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -35,5 +35,5 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(Card.IsSummonPlayer,nil,1-tp) Duel.NegateSummon(g) - Duel.SendtoDeck(g,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c84968490.lua b/official/c84968490.lua index 9257f418c1..3002631bc8 100644 --- a/official/c84968490.lua +++ b/official/c84968490.lua @@ -1,4 +1,5 @@ --針虫の巣窟 +--Needlebug Nest local s,id=GetID() function s.initial_effect(c) --discard deck @@ -20,4 +21,4 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.DiscardDeck(p,val,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c84970821.lua b/official/c84970821.lua index 92c712153e..09d605d7fd 100644 --- a/official/c84970821.lua +++ b/official/c84970821.lua @@ -1,4 +1,5 @@ --暗黒の呪縛 +--Curse of Darkness local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,7 +24,7 @@ function s.initial_effect(c) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local c=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then Duel.Damage(rp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c84976088.lua b/official/c84976088.lua index ec5268cd2a..6a120dc1a0 100644 --- a/official/c84976088.lua +++ b/official/c84976088.lua @@ -1,6 +1,5 @@ --バックグランド・ドラゴン --Background Dragon - local s,id=GetID() function s.initial_effect(c) --Special summon itself (GY) and 1 level 4 or lower dragon monster (hand) @@ -26,7 +25,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),2,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),2,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,9 +43,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) - end + end end end \ No newline at end of file diff --git a/official/c84988419.lua b/official/c84988419.lua index fe95dc2b55..d0983f0f99 100644 --- a/official/c84988419.lua +++ b/official/c84988419.lua @@ -1,9 +1,10 @@ --幻奏の華歌聖ブルーム・ディーヴァ +--Bloom Diva the Melodious Choir local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x109b),aux.FilterBoolFunctionEx(Card.IsSetCard,0x9b)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELODIOUS_MAESTRA),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MELODIOUS)) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -29,8 +30,8 @@ function s.initial_effect(c) e4:SetOperation(s.operation) c:RegisterEffect(e4) end -s.listed_series={0x109b,0x9b} -s.material_setcode={0x9b,0x109b} +s.listed_series={SET_MELODIOUS_MAESTRA,SET_MELODIOUS} +s.material_setcode={SET_MELODIOUS,SET_MELODIOUS_MAESTRA} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() @@ -51,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToEffect(e) and bc:IsFaceup() and Duel.Damage(1-tp,atk,REASON_EFFECT)~=0 then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85004150.lua b/official/c85004150.lua index ab3c389471..7f5db49926 100644 --- a/official/c85004150.lua +++ b/official/c85004150.lua @@ -1,4 +1,5 @@ --電子光虫-ライノセバス +--Digital Bug Rhinosebus local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -11,7 +12,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -35,10 +36,6 @@ end function s.desfilter(c) return c:IsFaceup() and c:IsDefenseAbove(0) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil) @@ -51,4 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=g:GetMaxGroup(Card.GetDefense) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85008676.lua b/official/c85008676.lua index 62da2e0f23..de126eb7a5 100644 --- a/official/c85008676.lua +++ b/official/c85008676.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCondition(s.damcon) - e1:SetCost(s.damcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.damop) c:RegisterEffect(e1) --Halve damage @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCondition(aux.damcon1) - e2:SetCost(s.damcost) + e2:SetCost(Cost.SelfDiscard) e2:SetOperation(s.operation) c:RegisterEffect(e2) --Add to hand @@ -36,14 +36,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.damcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetBattleDamage(tp)>0 and Duel.GetAttacker()~=tp end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.damop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -51,7 +47,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -76,7 +72,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -89,4 +85,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c85028288.lua b/official/c85028288.lua index 5142c51da0..dc27e74a32 100644 --- a/official/c85028288.lua +++ b/official/c85028288.lua @@ -1,4 +1,5 @@ --ジュラック・タイタン +--Jurrac Titano local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -26,17 +27,17 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x22} +s.listed_series={SET_JURRAC} function s.efilter(e,re,rp) return re:GetHandler():IsType(TYPE_TRAP+TYPE_MONSTER) end function s.cfilter(c) - return c:IsAttackBelow(1700) and c:IsSetCard(0x22) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsAttackBelow(1700) and c:IsSetCard(SET_JURRAC) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -46,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c85034450.lua b/official/c85034450.lua index 94fa6db66d..b24ac45ae8 100644 --- a/official/c85034450.lua +++ b/official/c85034450.lua @@ -1,4 +1,5 @@ --SRパチンゴーカート +--Speedroid Pachingo-Kart local s,id=GetID() function s.initial_effect(c) --destroy @@ -18,7 +19,7 @@ function s.cfilter(c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -32,4 +33,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85055821.lua b/official/c85055821.lua index cf9926ceb2..9d5cfa7921 100644 --- a/official/c85055821.lua +++ b/official/c85055821.lua @@ -30,13 +30,13 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x1169,0x2169} +s.listed_series={SET_MYSTICAL_BEAST_OF_THE_FOREST,SET_MYSTICAL_SPIRIT_OF_THE_FOREST} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) end function s.tdfilter(c,e) - return c:IsAbleToDeck() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB+RACE_INSECT+RACE_PLANT) and c:IsCanBeEffectTarget(e) + return c:IsAbleToDeck() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB|RACE_INSECT|RACE_PLANT) and c:IsCanBeEffectTarget(e) end function s.rescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetRace)==#sg @@ -58,14 +58,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)==0 then return end if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 - and Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) + and Duel.GetOperatedGroup():IsExists(Card.IsLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function s.thfilter(c) - return (c:IsSetCard(0x1169) or c:IsSetCard(0x2169)) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard({SET_MYSTICAL_BEAST_OF_THE_FOREST,SET_MYSTICAL_SPIRIT_OF_THE_FOREST}) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -78,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c8505920.lua b/official/c8505920.lua index eca1a989b2..e9064dd5c7 100644 --- a/official/c8505920.lua +++ b/official/c8505920.lua @@ -40,7 +40,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,loc,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.tfilter(c,tp) return c:IsOnField() and c:IsControler(tp) diff --git a/official/c85059922.lua b/official/c85059922.lua index 9d29230adc..f36feaef9a 100644 --- a/official/c85059922.lua +++ b/official/c85059922.lua @@ -1,12 +1,12 @@ --- 超魔導戦士-マスター・オブ・カオス --- Master of Chaos --- Scripted by Hatter +--超魔導戦士-マスター・オブ・カオス +--Master of Chaos +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- Fusion Materials + --Fusion Materials Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,s.ffilter) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,11 +14,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) end) + e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Banish all opponent monsters + --Banish all opponent monsters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_REMOVE) @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) - -- Add Spell to hand + --Add Spell to hand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND) @@ -44,10 +44,10 @@ function s.initial_effect(c) end s.material={CARD_DARK_MAGICIAN} s.listed_names={CARD_DARK_MAGICIAN} -s.listed_series={0xcf} -s.material_setcode={0xcf} +s.listed_series={SET_CHAOS} +s.material_setcode={SET_CHAOS} function s.ffilter(c,fc,sumtype,tp) - return c:IsType(TYPE_RITUAL,fc,sumtype,tp) and (c:IsSetCard(0xcf,fc,sumtype,tp) or c:IsSetCard(0x1048,fc,sumtype,tp)) + return c:IsType(TYPE_RITUAL,fc,sumtype,tp) and (c:IsSetCard(SET_CHAOS,fc,sumtype,tp) or c:IsSetCard(SET_NUMBER_C,fc,sumtype,tp)) end function s.attfilter(c) return c:IsAttribute(ATTRIBUTE_LIGHT) or c:IsAttribute(ATTRIBUTE_DARK) @@ -92,7 +92,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFusionSummoned() and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.thfilter(c) return c:IsSpell() and c:IsAbleToHand() diff --git a/official/c85060248.lua b/official/c85060248.lua index a89d38f335..2ac5e344e3 100644 --- a/official/c85060248.lua +++ b/official/c85060248.lua @@ -1,4 +1,5 @@ --メンタルプロテクター +--Mind Protector local s,id=GetID() function s.initial_effect(c) --cannot attack @@ -13,7 +14,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.mtcon) @@ -24,7 +25,7 @@ function s.atktarget(e,c) return not c:IsRace(RACE_PSYCHIC) and c:IsAttackBelow(2000) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,500) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then @@ -32,4 +33,4 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c85066822.lua b/official/c85066822.lua index d41e9e71be..f04130a372 100644 --- a/official/c85066822.lua +++ b/official/c85066822.lua @@ -1,4 +1,5 @@ --ウォーター・ドラゴン +--Water Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -57,4 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) if #g==0 or #g>ft then return end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c85080048.lua b/official/c85080048.lua index 1c9a36be2a..498c1af229 100644 --- a/official/c85080048.lua +++ b/official/c85080048.lua @@ -1,4 +1,5 @@ --雷の裁き +--Judgment of Thunder local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85080444.lua b/official/c85080444.lua index db259238aa..601194edc2 100644 --- a/official/c85080444.lua +++ b/official/c85080444.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e3:SetOperation(s.indop) c:RegisterEffect(e3) end -s.listed_series={0x97} +s.listed_series={SET_ARTIFACT} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) @@ -46,7 +46,7 @@ function s.indcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsTurnPlayer(1-tp) end function s.tg(e,c) - return c:IsFaceup() and c:IsSetCard(0x97) + return c:IsFaceup() and c:IsSetCard(SET_ARTIFACT) end function s.indop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -55,11 +55,11 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.tg) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(aux.indoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetValue(aux.tgoval) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c85087012.lua b/official/c85087012.lua index 65a77b5ea1..3f47acb710 100644 --- a/official/c85087012.lua +++ b/official/c85087012.lua @@ -1,4 +1,5 @@ --カードガンナー +--Card Trooper local s,id=GetID() function s.initial_effect(c) --atkup @@ -47,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(ct*500) c:RegisterEffect(e1) end @@ -65,4 +66,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85101097.lua b/official/c85101097.lua index 7ab54c8ab7..455d2366da 100644 --- a/official/c85101097.lua +++ b/official/c85101097.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,1)) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e7:SetCategory(CATEGORY_DAMAGE) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetRange(LOCATION_MZONE) e7:SetCountLimit(1) e7:SetCondition(s.damcon) @@ -52,7 +52,7 @@ function s.initial_effect(c) c:RegisterEffect(e7) end function s.ctlcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.ctltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) end @@ -72,7 +72,7 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end diff --git a/official/c85101228.lua b/official/c85101228.lua index 1d9f3c15da..dac92c75de 100644 --- a/official/c85101228.lua +++ b/official/c85101228.lua @@ -1,4 +1,5 @@ --D・バインド +--Morphtronic Bind local s,id=GetID() function s.initial_effect(c) --activate @@ -20,10 +21,10 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) c:RegisterEffect(e3) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.con(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x26),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MORPHTRONIC),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) end function s.tg(e,c) return c:GetLevel()>=4 -end +end \ No newline at end of file diff --git a/official/c85103922.lua b/official/c85103922.lua index cea58f10f8..d7e79684fc 100644 --- a/official/c85103922.lua +++ b/official/c85103922.lua @@ -1,4 +1,5 @@ --アーティファクト-モラルタ +--Artifact Moralltach local s,id=GetID() function s.initial_effect(c) --set @@ -44,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end @@ -58,4 +59,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85115440.lua b/official/c85115440.lua index ed99c17953..bebd614c8c 100644 --- a/official/c85115440.lua +++ b/official/c85115440.lua @@ -1,4 +1,5 @@ --十二獣ブルホーン +--Zoodiac Broadbull local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -23,38 +24,34 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.ovfilter(c,tp,lc) - return c:IsFaceup() and c:IsSetCard(0xf1,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) + return c:IsFaceup() and c:IsSetCard(SET_ZOODIAC,lc,SUMMON_TYPE_XYZ,tp) and not c:IsSummonCode(lc,SUMMON_TYPE_XYZ,tp,id) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.atkfilter(c) - return c:IsSetCard(0xf1) and c:GetAttack()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetAttack()>=0 end function s.atkval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.atkfilter,nil) return g:GetSum(Card.GetAttack) end function s.deffilter(c) - return c:IsSetCard(0xf1) and c:GetDefense()>=0 + return c:IsSetCard(SET_ZOODIAC) and c:GetDefense()>=0 end function s.defval(e,c) local g=e:GetHandler():GetOverlayGroup():Filter(s.deffilter,nil) return g:GetSum(Card.GetDefense) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsRace(RACE_BEASTWARRIOR) and c:IsSummonableCard() and c:IsAbleToHand() end @@ -70,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c85119159.lua b/official/c85119159.lua index 2d21b69c0b..34f5320759 100644 --- a/official/c85119159.lua +++ b/official/c85119159.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={} -s.listed_series={0x139,0x54,0x59,0x82,0x8f} +s.listed_series={SET_ONOMAT,SET_GAGAGA,SET_GOGOGO,SET_DODODO,SET_ZUBABA} function s.filter(c) - return c:IsSetCard(0x139) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_ONOMAT) and not c:IsCode(id) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter1(c,tp) - return c:IsFaceup() and c:HasLevel() and (c:IsSetCard(0x54) or c:IsSetCard(0x59) or c:IsSetCard(0x82) or c:IsSetCard(0x8f)) + return c:IsFaceup() and c:HasLevel() and (c:IsSetCard(SET_GAGAGA) or c:IsSetCard(SET_GOGOGO) or c:IsSetCard(SET_DODODO) or c:IsSetCard(SET_ZUBABA)) and Duel.IsExistingMatchingCard(s.lvfilter2,tp,LOCATION_MZONE,0,1,c,c:GetLevel()) end function s.lvfilter2(c,lv) @@ -61,9 +61,8 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) lc:RegisterEffect(e1) end end -end - +end \ No newline at end of file diff --git a/official/c85121942.lua b/official/c85121942.lua index 33ea7bf423..48d93db8b0 100644 --- a/official/c85121942.lua +++ b/official/c85121942.lua @@ -1,4 +1,5 @@ --CNo.105 BK 彗星のカエストス +--Number C105: Battlin' Boxer Comet Cestus local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.descon) - e2:SetCost(s.descost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -53,10 +54,6 @@ end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,59627393) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end @@ -74,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c8512558.lua b/official/c8512558.lua index 96cc95f105..d7e120c25e 100644 --- a/official/c8512558.lua +++ b/official/c8512558.lua @@ -1,25 +1,25 @@ --希望皇オノマトピア ---Utopic Onomatopeia ---Scripted by Logical Nonsense and AlphaKretin, revised handling of archetype check by edo9300 +--Utopic Onomatopoeia +--Scripted by Logical Nonsense, AlphaKretin, and edo9300 local s,id=GetID() function s.initial_effect(c) - c:AddSetcodesRule(id,true,0x8f) --required due to current cdb limitations - --Special summon + --This card is always treated as a "Zubaba" card (required due to current cdb limitations) + c:AddSetcodesRule(id,true,SET_ZUBABA) + --Special Summon up to 1 each "Zubaba", "Gagaga", "Gogogo", and/or "Dododo" monster(s) from your hand in Defense Position, except "Utopic Onomatopoeia" local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetCountLimit(1,id) e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={id} -s.listed_series={0x54,0x59,0x82,0x8f} +s.listed_series={SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO} function s.spfilter(c,e,tp) - return c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) - and (c:IsSetCard(0x54) or c:IsSetCard(0x59) or c:IsSetCard(0x82) or c:IsSetCard(0x8f)) and not c:IsCode(id) + return c:IsSetCard({SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO}) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.rescon(checkfunc) return function(sg,e,tp,mg) @@ -29,33 +29,29 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if chk==0 then return ft>0 and aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(aux.PropertyTableFilter(Card.GetSetCard,0x54,0x59,0x82,0x8f)),0) end + if chk==0 then return ft>0 and aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(aux.PropertyTableFilter(Card.GetSetCard,SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO)),0) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),4) if #g>0 and ft>0 then - local checkfunc=aux.PropertyTableFilter(Card.GetSetCard,0x54,0x59,0x82,0x8f) + local checkfunc=aux.PropertyTableFilter(Card.GetSetCard,SET_ZUBABA,SET_GAGAGA,SET_GOGOGO,SET_DODODO) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.rescon(checkfunc),1,tp,HINTMSG_SPSUMMON,s.rescon(checkfunc)) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) - end - local ge1=Effect.CreateEffect(e:GetHandler()) - ge1:SetType(EFFECT_TYPE_FIELD) - ge1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - ge1:SetTargetRange(1,0) - ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) - Duel.RegisterEffect(ge1,tp) - aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,5),nil) - --lizard check - aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) -end -function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) + end + local c=e:GetHandler() + --You cannot Special Summon from the Extra Deck for the rest of this turn, except Xyz Monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --"Clock Lizard" check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_XYZ) end) end -function s.lizfilter(e,c) - return not c:IsOriginalType(TYPE_XYZ) -end \ No newline at end of file diff --git a/official/c85136114.lua b/official/c85136114.lua index d3fd4d229a..17ccd08e93 100644 --- a/official/c85136114.lua +++ b/official/c85136114.lua @@ -1,7 +1,6 @@ --マシンナーズ・パゼストレージ --Machina Possesstorage --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --If normal or special summoned, special summon 1 "Machina" monster from GY @@ -31,10 +30,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x36} - +s.listed_series={SET_MACHINA} function s.spfilter(c,e,tp) - return c:IsSetCard(0x36) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) + return c:IsSetCard(SET_MACHINA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -53,13 +51,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() end function s.thfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x36) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MACHINA) and c:IsAbleToHand() end function s.thfilter2(c) return c:IsAbleToHand() and (c:IsSpell() or c:IsTrap()) diff --git a/official/c85138716.lua b/official/c85138716.lua index 93114cc8ff..c1766fb359 100644 --- a/official/c85138716.lua +++ b/official/c85138716.lua @@ -1,4 +1,5 @@ --レスキューラビット +--Rescue Rabbit local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -15,7 +16,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -48,8 +49,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc2=dg:Filter(Card.IsCode,nil,tc1:GetCode()):GetFirst() Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP) - tc1:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) - tc2:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc1:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) + tc2:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) Duel.SpecialSummonComplete() sg:AddCard(tc2) sg:KeepAlive() @@ -80,4 +81,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85166216.lua b/official/c85166216.lua index d03e4e7841..72e25fe709 100644 --- a/official/c85166216.lua +++ b/official/c85166216.lua @@ -1,4 +1,5 @@ --恵みの像 +--Elephant Statue of Blessing local s,id=GetID() function s.initial_effect(c) --recover @@ -25,4 +26,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85182315.lua b/official/c85182315.lua index c3783c52ed..30f00d34cb 100644 --- a/official/c85182315.lua +++ b/official/c85182315.lua @@ -25,24 +25,24 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.rmcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -s.listed_names={10000000} +s.listed_names={CARD_OBELISK} function s.spfilter(c,e,tp) - return c:IsCode(10000000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsCode(CARD_OBELISK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then --Unaffected by your opponent's card effects this turn local e1=Effect.CreateEffect(e:GetHandler()) @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetValue(function(e,re) return e:GetOwnerPlayer()==1-re:GetOwnerPlayer() end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -60,12 +60,12 @@ function s.rmcfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.oblskfilter(c,tp) - return s.rmcfilter(c,tp) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==10000000 + return s.rmcfilter(c,tp) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==CARD_OBELISK end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) return rp==tp and r&REASON_COST==REASON_COST and re and re:IsActivated() and eg:IsExists(s.rmcfilter,2,nil,tp) - and (Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,10000000),tp,LOCATION_ONFIELD,0,1,nil) + and (Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_OBELISK),tp,LOCATION_ONFIELD,0,1,nil) or eg:IsExists(s.oblskfilter,1,nil,tp)) end function s.rmfilter(c) @@ -83,4 +83,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED) Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85215458.lua b/official/c85215458.lua index 29f2b326f7..3c6367eae9 100644 --- a/official/c85215458.lua +++ b/official/c85215458.lua @@ -1,4 +1,5 @@ --BF-月影のカルート +--Blackwing - Kalut the Moon Shadow local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,31 +12,27 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) local phase=Duel.GetCurrentPhase() if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() - return (a:GetControler()==tp and a:IsSetCard(0x33) and a:IsRelateToBattle()) - or (d and d:GetControler()==tp and d:IsSetCard(0x33) and d:IsRelateToBattle()) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return (a:IsControler(tp) and a:IsSetCard(SET_BLACKWING) and a:IsRelateToBattle()) + or (d and d:IsControler(tp) and d:IsSetCard(SET_BLACKWING) and d:IsRelateToBattle()) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end + if Duel.IsTurnPlayer(1-tp) then a=Duel.GetAttackTarget() end if not a:IsRelateToBattle() then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1400) a:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c85216896.lua b/official/c85216896.lua index 8bd804e277..d4d6c32121 100644 --- a/official/c85216896.lua +++ b/official/c85216896.lua @@ -51,7 +51,7 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thcfilter,1,c,c,tp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 @@ -61,12 +61,12 @@ function s.thfilter(c) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.HintSelection(g,true) Duel.SendtoHand(g,nil,REASON_EFFECT) @@ -77,7 +77,7 @@ function s.rmfilter(c,e) return c:IsCanBeEffectTarget(e) and c:IsSummonLocation(LOCATION_EXTRA) and c:IsAbleToRemove() end function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -91,15 +91,15 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) if #g~=2 then return end for tc in aux.Next(g) do - if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end g:KeepAlive() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(g) e1:SetCountLimit(1) e1:SetCondition(s.retcon) diff --git a/official/c8522996.lua b/official/c8522996.lua index 63bd313452..8f40d28413 100644 --- a/official/c8522996.lua +++ b/official/c8522996.lua @@ -1,5 +1,5 @@ --始源の帝王 ---The first monarch +--The First Monarch local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,14 +34,14 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -52,7 +52,7 @@ function s.chcon(e,tp,eg,ep,ev,re,r,rp) end function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -68,19 +68,19 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(att) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --double tribute local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DOUBLE_TRIBUTE) e2:SetValue(s.condition) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.condition(e,c) return c:IsAttribute(e:GetHandler():GetAttribute()) end function s.splimit(e,c,tp,sumtp,sumpos) - return c:IsAttribute(0xff-e:GetHandler():GetAttribute()) -end + return c:IsAttribute(ATTRIBUTE_ALL&~(e:GetHandler():GetAttribute())) +end \ No newline at end of file diff --git a/official/c85239662.lua b/official/c85239662.lua index 264d6d3af8..bc195fe64d 100644 --- a/official/c85239662.lua +++ b/official/c85239662.lua @@ -31,16 +31,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.target) e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) e1:SetValue(1) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) e2:SetTargetRange(1,1) Duel.RegisterEffect(e2,tp) end function s.target(e,c) return c:GetLevel()~=e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c85243784.lua b/official/c85243784.lua index 2f1db029ec..17fd58567f 100644 --- a/official/c85243784.lua +++ b/official/c85243784.lua @@ -30,7 +30,7 @@ function s.matfilter(c,lc,sumtype,tp) return c:IsLinkAbove(2) and c:IsType(TYPE_LINK,lc,sumtype,tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0xff,0xff) e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,TOKEN_LINK)) e1:SetValue(s.lklimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),e:GetLabel()) if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_LINK,0,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_LIGHT) then return end @@ -72,4 +72,4 @@ function s.lklimit(e,c) end function s.valcheck(e,c) e:GetLabelObject():SetLabel(c:GetMaterial():GetFirst():GetLink()) -end +end \ No newline at end of file diff --git a/official/c85250352.lua b/official/c85250352.lua index 9908cbb5be..0ed1423d35 100644 --- a/official/c85250352.lua +++ b/official/c85250352.lua @@ -80,4 +80,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c85252081.lua b/official/c85252081.lua index b3dfc43a5b..b817120fab 100644 --- a/official/c85252081.lua +++ b/official/c85252081.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP) + e3:SetHintTiming(0,TIMING_END_PHASE|TIMING_EQUIP) e3:SetCondition(s.quickeffcond) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) --Attach 1 "Super Quantum" monster from your hand or field to this card diff --git a/official/c85255550.lua b/official/c85255550.lua index b1cab51318..b06ceb1f13 100644 --- a/official/c85255550.lua +++ b/official/c85255550.lua @@ -1,4 +1,5 @@ --異国の剣士 +--Swordsman from a Distant Land local s,id=GetID() function s.initial_effect(c) -- @@ -47,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(e) e1:SetLabel(0) e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) e:GetLabelObject():AddCard(bc) end @@ -93,4 +94,4 @@ function s.desop(tc,e,c) end end end -end +end \ No newline at end of file diff --git a/official/c85277313.lua b/official/c85277313.lua index 5f2e5f3c70..015dbd15a8 100644 --- a/official/c85277313.lua +++ b/official/c85277313.lua @@ -1,4 +1,4 @@ --- +--ティスティナの胎動 --Signs of the Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c85289965.lua b/official/c85289965.lua index 9d411a63c1..030c6b5f96 100644 --- a/official/c85289965.lua +++ b/official/c85289965.lua @@ -1,5 +1,5 @@ --ヴァレルソード・ドラゴン ---BorrelSword Dragon +--Borrelsword Dragon local s,id=GetID() function s.initial_effect(c) --Link Summon @@ -64,7 +64,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end end @@ -86,16 +86,16 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(math.ceil(atk/2)) c:RegisterEffect(e2) if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(atk/2)) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c8529136.lua b/official/c8529136.lua index 5927d54614..1099093c65 100644 --- a/official/c8529136.lua +++ b/official/c8529136.lua @@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then if tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -39,27 +39,27 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.actcon) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) e2:SetCondition(s.effcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e3:SetCondition(s.damcon) e3:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCondition(s.effcon) e4:SetValue(1) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) end local e5=Effect.CreateEffect(c) @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e5:SetCode(EVENT_DAMAGE_STEP_END) e5:SetCondition(s.descon) e5:SetOperation(s.desop) - e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e5:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e5) end end diff --git a/official/c85306040.lua b/official/c85306040.lua index ce74ceb123..4a577c0d56 100644 --- a/official/c85306040.lua +++ b/official/c85306040.lua @@ -1,10 +1,11 @@ --ゴブリンエリート部隊 +--Goblin Elite Attack Force local s,id=GetID() function s.initial_effect(c) --to defense local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.poscon) @@ -23,6 +24,6 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,3) + e1:SetReset(RESETS_STANDARD_PHASE_END,3) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c85310252.lua b/official/c85310252.lua index dd1ebe684e..08da566e55 100644 --- a/official/c85310252.lua +++ b/official/c85310252.lua @@ -1,4 +1,5 @@ --ドドドドライバー +--Dododo Driver local s,id=GetID() function s.initial_effect(c) --lv change @@ -20,18 +21,18 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x82} +s.listed_series={SET_DODODO} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0x82) + return re and re:GetHandler():IsSetCard(SET_DODODO) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x82) and c:IsLevelAbove(1) + return c:IsFaceup() and c:IsSetCard(SET_DODODO) and c:IsLevelAbove(1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,10 +53,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) if e:GetLabel()==0 then e1:SetValue(1) else e1:SetValue(-1) end tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c85313220.lua b/official/c85313220.lua index 3eead52a94..a7ec284892 100644 --- a/official/c85313220.lua +++ b/official/c85313220.lua @@ -21,16 +21,16 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_MZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end s.listed_names={12817939} s.LVnum=4 -s.LVset=0x4f +s.LVset=SET_DARK_LUCIUS function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local d=Duel.GetAttackTarget() @@ -39,35 +39,31 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) d:RegisterEffect(e1) end end function s.btop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,0,2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and e:GetHandler():GetFlagEffect(id)~=0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(12817939) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TEMP_REMOVE),0,0) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c85325774.lua b/official/c85325774.lua index 3ef491d0d7..20be94d5ec 100644 --- a/official/c85325774.lua +++ b/official/c85325774.lua @@ -1,5 +1,5 @@ --暗黒界の援軍 ---Dark World Reinforcements +--Charge Into a Dark World --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_FIEND) if #tg>0 then Duel.BreakEffect() - Duel.SendtoGrave(tg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(tg,REASON_EFFECT|REASON_DISCARD) end end -end +end \ No newline at end of file diff --git a/official/c85327820.lua b/official/c85327820.lua index 49288271c6..9bcd95a31a 100644 --- a/official/c85327820.lua +++ b/official/c85327820.lua @@ -4,11 +4,11 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),nil,nil,s.extrafil,nil,aux.FilterBoolFunction(Card.IsSetCard,0x135)) + local e1=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsRace,RACE_CYBERSE),nil,nil,s.extrafil,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_IGNISTER)) local tg=e1:GetTarget() e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,...) if chk==0 then - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x135),tp,LOCATION_MZONE,0,1,nil) then + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,1,nil) then e:SetLabel(1) else e:SetLabel(0) @@ -29,10 +29,10 @@ function s.initial_effect(c) end) c:RegisterEffect(e1) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.mfilter(c) - return not Duel.IsPlayerAffectedByEffect(c:GetControler(),69832741) - and c:IsSetCard(0x135) and c:IsLevelAbove(1) and c:IsAbleToRemove() + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),CARD_SPIRIT_ELIMINATION) + and c:IsSetCard(SET_IGNISTER) and c:IsLevelAbove(1) and c:IsAbleToRemove() end function s.extrafil(e,tp,eg,ep,ev,re,r,rp,chk) if e:GetLabel()==1 then diff --git a/official/c85346853.lua b/official/c85346853.lua index ab31a2d200..776e2d5cac 100644 --- a/official/c85346853.lua +++ b/official/c85346853.lua @@ -1,4 +1,5 @@ --光子竜の聖騎士 +--Paladin of Photon Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -25,23 +26,19 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={34834619,CARD_GALAXYEYES_P_DRAGON} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(CARD_GALAXYEYES_P_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -61,4 +58,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85352446.lua b/official/c85352446.lua index 6e6b0eda8c..21316f3a32 100644 --- a/official/c85352446.lua +++ b/official/c85352446.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e1:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.GetMatchingGroup(s.filter2,0,LOCATION_MZONE,LOCATION_MZONE,tc,tc:GetLevel()) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85359414.lua b/official/c85359414.lua index af200bafda..5118634f2a 100644 --- a/official/c85359414.lua +++ b/official/c85359414.lua @@ -1,4 +1,5 @@ --氷岩魔獣 +--Freezing Beast local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsCode,59364406),true) @@ -34,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFacedown() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85360035.lua b/official/c85360035.lua index 0fddb12891..4afefd280f 100644 --- a/official/c85360035.lua +++ b/official/c85360035.lua @@ -1,5 +1,5 @@ --双天拳の熊羆 ---Yuuhi of the Souten Fists +--Dual Avatar Fists - Yuhi --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -28,13 +28,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x14e} +s.listed_series={SET_DUAL_AVATAR} s.listed_names={id} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0x14e) + return c:IsFaceup() and c:IsSetCard(SET_DUAL_AVATAR) end function s.thfilter(c) - return c:IsSetCard(0x14e) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_DUAL_AVATAR) and c:IsSpell() and c:IsAbleToHand() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.desfilter(chkc) end @@ -58,8 +58,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.cfilter(c,tp,rp) return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and rp==1-tp)) and c:IsReason(REASON_DESTROY) - and c:IsSetCard(0x14e) and c:IsMonster() and c:IsType(TYPE_FUSION) - and c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_EFFECT) + and c:IsSetCard(SET_DUAL_AVATAR) and c:IsMonster() and c:IsType(TYPE_FUSION) + and c:IsFusionSummoned() and c:GetMaterial():IsExists(Card.IsType,1,nil,TYPE_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85374678.lua b/official/c85374678.lua index 4f3fca5013..90f402a600 100644 --- a/official/c85374678.lua +++ b/official/c85374678.lua @@ -1,4 +1,5 @@ --超量士グリーンレイヤー +--Super Quantum Green Layer local s,id=GetID() function s.initial_effect(c) --spsummon @@ -27,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0xdc} +s.listed_series={SET_SUPER_QUANT} function s.filter(c,e,tp) - return c:IsSetCard(0xdc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,11 +46,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.drcfilter(c) - return c:IsSetCard(0xdc) and c:IsDiscardable() + return c:IsSetCard(SET_SUPER_QUANT) and c:IsDiscardable() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.drcfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.drcfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.drcfilter,1,1,REASON_DISCARD|REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end @@ -60,4 +61,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85399281.lua b/official/c85399281.lua index 255f4b940a..9a7458bdd8 100644 --- a/official/c85399281.lua +++ b/official/c85399281.lua @@ -1,4 +1,5 @@ --智天使ハーヴェスト +--Harvest Angel of Wisdom local s,id=GetID() function s.initial_effect(c) --to hand @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c85407683.lua b/official/c85407683.lua index ff776c0505..a9b44888e9 100644 --- a/official/c85407683.lua +++ b/official/c85407683.lua @@ -79,4 +79,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) else Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85431040.lua b/official/c85431040.lua index 3f79633415..9c231a8276 100644 --- a/official/c85431040.lua +++ b/official/c85431040.lua @@ -8,15 +8,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) @@ -43,10 +39,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c85442146.lua b/official/c85442146.lua index 66c9915da1..24f00e7fd0 100644 --- a/official/c85442146.lua +++ b/official/c85442146.lua @@ -3,7 +3,7 @@ --scripted by Naim local s,id=GetID() function s.initial_effect(c) - --Negate the activation of a Spell/Trap Card, or monster effect, and if you do, destroy that card. + --Negate the activation of a Spell/Trap Card, or monster effect, and if you do, destroy that card. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(TIMING_END_PHASE,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.PayLPCost(2500)) + e2:SetCost(Cost.PayLP(2500)) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c85446833.lua b/official/c85446833.lua index 44a30e00c9..a701529970 100644 --- a/official/c85446833.lua +++ b/official/c85446833.lua @@ -1,4 +1,5 @@ --ゼロゼロック +--Zerozerock local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsPosition(POS_FACEUP_ATTACK) and c:GetAttack()==0 -end +end \ No newline at end of file diff --git a/official/c85457355.lua b/official/c85457355.lua index 9a39683535..f1a2c3b567 100644 --- a/official/c85457355.lua +++ b/official/c85457355.lua @@ -49,7 +49,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) if (c:IsLevel(lv)) then Duel.Recover(tp,lv*200,REASON_EFFECT) @@ -60,7 +60,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTarget(s.splimit) Duel.RegisterEffect(e2,tp) --lizard check @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c85463083.lua b/official/c85463083.lua index cb79662704..a989ca0617 100644 --- a/official/c85463083.lua +++ b/official/c85463083.lua @@ -1,4 +1,5 @@ --ゴーストリック・グール +--Ghostrick Ghoul local s,id=GetID() function s.initial_effect(c) --summon limit @@ -29,9 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x8d) + return c:IsFaceup() and c:IsSetCard(SET_GHOSTRICK) end function s.sumcon(e) return not Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) @@ -39,7 +40,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -49,7 +50,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -63,7 +64,7 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -81,10 +82,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c85475641.lua b/official/c85475641.lua index 0f2539a3e8..194dde2123 100644 --- a/official/c85475641.lua +++ b/official/c85475641.lua @@ -40,7 +40,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c85489096.lua b/official/c85489096.lua index 7a8ef433ee..d0884fc0b2 100644 --- a/official/c85489096.lua +++ b/official/c85489096.lua @@ -1,4 +1,5 @@ --ウェポンサモナー +--Arsenal Summoner local s,id=GetID() function s.initial_effect(c) --flip @@ -10,13 +11,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x52} +s.listed_series={SET_GUARDIAN} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return c:IsSetCard(0x52) and c:IsAbleToHand() + return c:IsSetCard(SET_GUARDIAN) and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c85497611.lua b/official/c85497611.lua index 9057e98629..2461864bb8 100644 --- a/official/c85497611.lua +++ b/official/c85497611.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={53025096,id,82768499} -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.spcheck(sg,tp) local mzone_chk=Duel.GetMZoneCount(tp,sg)>0 - return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_DECK,0,1,sg,tp,mzone_chk) + return Duel.IsExistingMatchingCard(s.gyfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_DECK,0,1,sg,tp,mzone_chk) end function s.gyfilter(c,tp,mzone_chk) return c:IsCode(53025096) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGrave() @@ -43,25 +43,25 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_MZONE) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local gc=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp,false):GetFirst() + local gc=Duel.SelectMatchingCard(tp,s.gyfilter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp,false):GetFirst() if gc and Duel.SendtoGrave(gc,REASON_EFFECT)>0 and gc:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x99) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ODD_EYES) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) @@ -71,7 +71,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) @@ -79,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c85505315.lua b/official/c85505315.lua index 95f962fe82..685dda3eb1 100644 --- a/official/c85505315.lua +++ b/official/c85505315.lua @@ -1,4 +1,5 @@ --インヴェルズ・マディス +--Steelswarm Mantis local s,id=GetID() function s.initial_effect(c) --summon success @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -21,24 +22,20 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x100a) then + if g:IsExists(Card.IsSetCard,1,nil,SET_STEELSWARM) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.filter(c,e,tp) - return c:IsSetCard(0x100a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STEELSWARM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,4 +50,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c85507811.lua b/official/c85507811.lua index f4ce368e69..05ead2e603 100644 --- a/official/c85507811.lua +++ b/official/c85507811.lua @@ -1,6 +1,5 @@ --E・HERO グロー・ネオス --Elemental HERO Glow Neos - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -24,20 +23,19 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} - +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -59,7 +57,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Can attack directly this turn elseif tc:IsSpell() then @@ -68,7 +66,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) --Change itself to defense position else diff --git a/official/c85519211.lua b/official/c85519211.lua index be9357c9a7..174d762e62 100644 --- a/official/c85519211.lua +++ b/official/c85519211.lua @@ -1,4 +1,5 @@ --岩盤爆破 +--Minefield Eruption local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) Duel.Damage(1-tp,#g*1000,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85520851.lua b/official/c85520851.lua index 29783c36e9..a83469d3d5 100644 --- a/official/c85520851.lua +++ b/official/c85520851.lua @@ -1,4 +1,5 @@ --超伝導恐獣 +--Super Conductor Tyranno local s,id=GetID() function s.initial_effect(c) --damage @@ -22,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -34,4 +35,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85528209.lua b/official/c85528209.lua index 4acbd2a445..df0435b4e9 100644 --- a/official/c85528209.lua +++ b/official/c85528209.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,0x9a),1,99) + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_SUPERHEAVY_SAMURAI),1,99) c:EnableReviveLimit() --defense attack local e1=Effect.CreateEffect(c) @@ -21,13 +21,13 @@ function s.initial_effect(c) e2:SetValue(s.adval) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.sccon(e) - return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return not Duel.IsExistingMatchingCard(Card.IsSpellTrap,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) end function s.adval(e,c) return Duel.GetMatchingGroupCount(s.ctfilter,c:GetControler(),0,LOCATION_MZONE,nil)*900 end function s.ctfilter(c) return (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL -end +end \ No newline at end of file diff --git a/official/c85541675.lua b/official/c85541675.lua index 7ef5c8c6e6..d9e1802d58 100644 --- a/official/c85541675.lua +++ b/official/c85541675.lua @@ -28,12 +28,12 @@ function s.initial_effect(c) e3:SetOperation(s.drop) c:RegisterEffect(e3) end -s.listed_series={0x11} +s.listed_series={SET_KARAKURI} s.counter_place_list={0x12} function s.cfilter(c) local np=c:GetPosition() local pp=c:GetPreviousPosition() - return c:IsSetCard(0x11) and ((pp==0x1 and np==0x4) or (pp==0x4 and np==0x1) or (pp==0x8 and np==0x1)) + return c:IsSetCard(SET_KARAKURI) and ((pp==SET_ALLY_OF_JUSTICE and np==SET_AMAZONESS) or (pp==SET_AMAZONESS and np==SET_ALLY_OF_JUSTICE) or (pp==SET_HERO and np==SET_ALLY_OF_JUSTICE)) end function s.accon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -58,4 +58,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85545073.lua b/official/c85545073.lua index b1d335c8f2..91b20638bd 100644 --- a/official/c85545073.lua +++ b/official/c85545073.lua @@ -1,4 +1,5 @@ --デストーイ・シザー・ベアー +--Frightfur Bear local s,id=GetID() function s.initial_effect(c) --fusion material @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) aux.AddEREquipLimit(c,nil,aux.FilterBoolFunction(Card.IsMonster),s.equipop,e1) end -s.material_setcode={0xc3,0xa9} +s.material_setcode={SET_EDGE_IMP,SET_FLUFFAL} function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=c:GetBattleTarget() @@ -34,7 +35,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(1000) tc:RegisterEffect(e2) end diff --git a/official/c85555787.lua b/official/c85555787.lua index 86251faef8..07d5bde3b1 100644 --- a/official/c85555787.lua +++ b/official/c85555787.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_TOHAND+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(0,TIMING_TOHAND|TIMINGS_CHECK_MONSTER) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) @@ -18,7 +18,7 @@ function s.costfilter(c,matk) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackBelow(matk) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local dc=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_DECK) + local dc=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND|LOCATION_DECK) local matk=math.min(3000,dc*500) if chk==0 then return matk>0 and Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil,matk) end local g=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil,matk) @@ -28,13 +28,13 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local ct=math.floor(e:GetLabel()/500) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,ct,1-tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,ct,1-tp,LOCATION_DECK|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local atk=e:GetLabel() local ct=math.floor(atk/500) - local g=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_DECK+LOCATION_HAND,0,ct,ct,nil) + local g=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_DECK|LOCATION_HAND,0,ct,ct,nil) if #g~=0 and Duel.Destroy(g,REASON_EFFECT)~=0 then local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE) for oc in aux.Next(og) do @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_GRAVE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END) oc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_ACTIVATE) @@ -56,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DRAW) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -64,15 +64,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCountLimit(1) e2:SetCondition(s.turncon) e2:SetOperation(s.turnop) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) Duel.RegisterEffect(e2,tp) e2:SetLabelObject(e1) - c:RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3) + c:RegisterFlagEffect(1082946,RESET_PHASE|PHASE_END|RESET_OPPO_TURN,0,3) s[c]=e2 local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,2)) - e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) + e4:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,3) e4:SetTargetRange(0,1) Duel.RegisterEffect(e4,tp) end @@ -92,7 +92,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_GRAVE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END) oc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_ACTIVATE) @@ -102,7 +102,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(ep) end function s.turncon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.turnop(e,tp,eg,ep,ev,re,r,rp) local ct=e:GetLabel() @@ -113,4 +113,4 @@ function s.turnop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():Reset() e:GetOwner():ResetFlagEffect(1082946) end -end +end \ No newline at end of file diff --git a/official/c85562745.lua b/official/c85562745.lua index 37d40bb102..d324285c23 100644 --- a/official/c85562745.lua +++ b/official/c85562745.lua @@ -1,4 +1,5 @@ --悪夢の拷問部屋 +--Dark Room of Nightmare local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85590798.lua b/official/c85590798.lua index e73b68eabb..39efb2b0a6 100644 --- a/official/c85590798.lua +++ b/official/c85590798.lua @@ -1,7 +1,6 @@ --聖なる降誕 ---Holy Night Nativity +--Starry Knight Ceremony --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) diff --git a/official/c8559524.lua b/official/c8559524.lua index 4b0568bd29..8a7a19be1b 100644 --- a/official/c8559524.lua +++ b/official/c8559524.lua @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x57} +s.listed_series={SET_RESONATOR} function s.costfilter(c) - return c:IsSetCard(0x57) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_RESONATOR) and c:IsMonster() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD,nil) end function s.filter(c) return c:IsRace(RACE_FIEND) and c:IsLevelBelow(4) and c:IsAbleToHand() @@ -36,5 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c8559793.lua b/official/c8559793.lua index c45795a013..6847d4b199 100644 --- a/official/c8559793.lua +++ b/official/c8559793.lua @@ -1,6 +1,5 @@ --RR-ネスト --Raidraptor - Nest - local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,24 +18,23 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xba} - +s.listed_series={SET_RAIDRAPTOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xba),tp,LOCATION_MZONE,0,2,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_RAIDRAPTOR),tp,LOCATION_MZONE,0,2,nil) end function s.filter(c) - return c:IsSetCard(0xba) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c85602018.lua b/official/c85602018.lua index 7f90b0fb60..cc39f9c32d 100644 --- a/official/c85602018.lua +++ b/official/c85602018.lua @@ -23,7 +23,7 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) for p=0,1 do if eg:IsExists(s.cfilter,1,nil,p) then - Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(p,id,RESET_PHASE|PHASE_END,0,1) end end end @@ -53,7 +53,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.spcon) e1:SetOperation(s.spop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c85605684.lua b/official/c85605684.lua index ac387fc83b..9261d3e7c3 100644 --- a/official/c85605684.lua +++ b/official/c85605684.lua @@ -1,4 +1,5 @@ --バーサーク・デッド・ドラゴン +--Berserk Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -36,6 +37,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c8561192.lua b/official/c8561192.lua index 2a18132787..bb024b68a7 100644 --- a/official/c8561192.lua +++ b/official/c8561192.lua @@ -1,4 +1,5 @@ --神樹の守護獣-牙王 +--Leo, the Keeper of the Sacred Tree local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.tgcon(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() or Duel.GetCurrentPhase()~=PHASE_MAIN2 -end +end \ No newline at end of file diff --git a/official/c85636437.lua b/official/c85636437.lua index df45cdad41..6ba7e59211 100644 --- a/official/c85636437.lua +++ b/official/c85636437.lua @@ -1,5 +1,5 @@ --土俵間際 ---On the Edge of the Ring +--Edge of the Ring --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -39,12 +39,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) end -end - +end \ No newline at end of file diff --git a/official/c85638822.lua b/official/c85638822.lua index 5e0b8fc26c..380e8b5032 100644 --- a/official/c85638822.lua +++ b/official/c85638822.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_FZONE) e3:SetCountLimit(1) e3:SetCondition(s.spcon) @@ -33,7 +33,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanAddCounter(tp,0x46,3,e:GetHandler()) end Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,3,0,0x146) @@ -48,13 +48,13 @@ function s.rccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=eg:GetFirst() return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE) - and rc:IsFaceup() and rc:IsSetCard(0xfc) and rc:IsControler(tp) + and rc:IsFaceup() and rc:IsSetCard(SET_GOUKI) and rc:IsControler(tp) end function s.rcop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then c:RemoveCounter(tp,0x46,1,REASON_EFFECT) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -62,18 +62,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:GetCounter(0x46)==0 and c:GetFlagEffect(id)>2 end function s.spfilter(c,e,sp) - return c:IsSetCard(0xfc) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsSetCard(SET_GOUKI) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local tg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) if #tg==0 or ft<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end local g=aux.SelectUnselectGroup(tg,e,tp,1,ft,aux.dncheck,1,tp,HINTMSG_SPSUMMON) @@ -81,5 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) c:AddCounter(0x46,3) c:ResetFlagEffect(id) end -end - +end \ No newline at end of file diff --git a/official/c85646474.lua b/official/c85646474.lua index 53299db754..8a3d093b1c 100644 --- a/official/c85646474.lua +++ b/official/c85646474.lua @@ -1,4 +1,5 @@ --墓守の使徒 +--Gravekeeper's Nobleman local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -20,7 +21,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousControler(tp) and c==Duel.GetAttackTarget() and Duel.GetAttacker():IsControler(1-tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x2e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GRAVEKEEPERS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c85651167.lua b/official/c85651167.lua index 7ffd8cb201..d6a6c5e457 100644 --- a/official/c85651167.lua +++ b/official/c85651167.lua @@ -1,4 +1,5 @@ --真紅眼の鉄騎士-ギア・フリード +--Gearfried the Red-Eyes Iron Knight local s,id=GetID() function s.initial_effect(c) --destroy equip @@ -25,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.filter1(c,ec) return c:GetEquipTarget()==ec end @@ -36,7 +37,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(s.filter1,nil,e:GetHandler()) - local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local sg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if Duel.Destroy(g,REASON_EFFECT)~=0 and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() @@ -53,7 +54,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x3b) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RED_EYES) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -68,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c85668449.lua b/official/c85668449.lua index 72cd249fa6..4b227296fc 100644 --- a/official/c85668449.lua +++ b/official/c85668449.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetRange(LOCATION_FZONE) e2:SetDescription(aux.Stringid(id,0)) - e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,LOCATION_HAND+LOCATION_MZONE) + e2:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,LOCATION_HAND|LOCATION_MZONE) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHIC)) e2:SetOperation(s.esop) @@ -49,7 +49,7 @@ function s.initial_effect(c) end s.counter_list={0x4} function s.esop(e,tp,eg,ep,ev,re,r,rp,c) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst():GetFlagEffect(id)~=0 @@ -78,4 +78,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if ct>0 then Duel.Damage(tp,ct*1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85673903.lua b/official/c85673903.lua index 2315e9d15b..17b757842b 100644 --- a/official/c85673903.lua +++ b/official/c85673903.lua @@ -17,15 +17,15 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsSetCard(0x103) and c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsControler(tp) and c:IsSetCard(SET_ALTERGEIST) and c:IsType(TYPE_LINK) and c:IsLinkSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsType(TYPE_LINK) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,c:GetLinkedZone(tp)&0x1f) + return c:IsType(TYPE_LINK) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,c:GetLinkedZone(tp)&ZONES_MMZ) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end @@ -38,7 +38,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - local zone=tc:GetLinkedZone(tp)&0x1f + local zone=tc:GetLinkedZone(tp)&ZONES_MMZ if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and zone>0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone) end @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_SETCODE) - e1:SetValue(0x103) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetValue(SET_ALTERGEIST) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c856784.lua b/official/c856784.lua index 388b163f0d..6ecae763a5 100644 --- a/official/c856784.lua +++ b/official/c856784.lua @@ -50,19 +50,19 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SSET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetCode(EVENT_CHAINING) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetOperation(s.aclimit1) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetCode(EVENT_CHAIN_NEGATED) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetOperation(s.aclimit2) Duel.RegisterEffect(e3,tp) local e4=Effect.CreateEffect(e:GetHandler()) @@ -70,20 +70,20 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp,chk) e4:SetCode(EFFECT_CANNOT_ACTIVATE) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetTargetRange(1,0) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetCondition(s.econ) e4:SetValue(1) Duel.RegisterEffect(e4,tp) local e5=Effect.CreateEffect(e:GetHandler()) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e5:SetDescription(aux.Stringid(id,1)) - e5:SetReset(RESET_PHASE+PHASE_END) + e5:SetReset(RESET_PHASE|PHASE_END) e5:SetTargetRange(1,0) Duel.RegisterEffect(e5,tp) end function s.aclimit1(e,tp,eg,ep,ev,re,r,rp) if ep~=tp then return end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.aclimit2(e,tp,eg,ep,ev,re,r,rp) if ep~=tp then return end @@ -91,5 +91,4 @@ function s.aclimit2(e,tp,eg,ep,ev,re,r,rp) end function s.econ(e) return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)~=0 -end - +end \ No newline at end of file diff --git a/official/c85679527.lua b/official/c85679527.lua index 942091aba4..f6bc1d81dc 100644 --- a/official/c85679527.lua +++ b/official/c85679527.lua @@ -33,13 +33,13 @@ function s.spcon1(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_HAND,0,nil,tp) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_HAND,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_TOGRAVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -57,7 +57,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(lv*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_DISABLE) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() end @@ -73,14 +73,14 @@ function s.spfilter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8567955.lua b/official/c8567955.lua index edd570d823..66856b19d3 100644 --- a/official/c8567955.lua +++ b/official/c8567955.lua @@ -1,5 +1,5 @@ --バランサーロード --- Balancer Lord +--Balancer Lord local s,id=GetID() function s.initial_effect(c) --extra summon @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.sumcon) - e1:SetCost(s.sumcost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.sumtg) e1:SetOperation(s.sumop) c:RegisterEffect(e1) @@ -28,10 +28,6 @@ end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerCanAdditionalSummon(tp) end -function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSummon(tp) end end @@ -40,9 +36,9 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_CYBERSE)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c,e,tp) @@ -60,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c85682655.lua b/official/c85682655.lua index 1afd6c9a99..ba1ebd53fe 100644 --- a/official/c85682655.lua +++ b/official/c85682655.lua @@ -1,4 +1,5 @@ --ゼンマイジャグラー +--Wind-Up Juggler local s,id=GetID() function s.initial_effect(c) --destroy @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85684223.lua b/official/c85684223.lua index cbb45b01e5..8e59a239bb 100644 --- a/official/c85684223.lua +++ b/official/c85684223.lua @@ -62,7 +62,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) end function s.sdcon(e) return e:GetHandler():GetOwnerTargetCount()>0 @@ -90,4 +90,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if c:GetFlagEffect(id)>0 and not c:IsHasEffect(EFFECT_DISABLE) and not c:IsDisabled() then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85692042.lua b/official/c85692042.lua index 90102469a0..d021caae1c 100644 --- a/official/c85692042.lua +++ b/official/c85692042.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -105,7 +105,7 @@ function s.op(filter) end end function s.mmfilter(c) - return c:IsSetCard(0x132) and c:IsAbleToHand() + return c:IsSetCard(SET_MATHMECH) and c:IsAbleToHand() end s.mmtg=s.tg(s.mmfilter) s.mmop=s.op(s.mmfilter) @@ -129,17 +129,17 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x132) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MATHMECH) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c85696777.lua b/official/c85696777.lua index d71aa2a5b2..a1d5921f39 100644 --- a/official/c85696777.lua +++ b/official/c85696777.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e0:SetCode(EFFECT_CHANGE_CODE) - e0:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e0:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e0:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e0) --destroy replace @@ -38,9 +38,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x64) and c:IsMonster() + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_HARPIE) and c:IsMonster() and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) @@ -65,17 +65,17 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) end function s.rtfilter(c,e,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousSetCard(0x64) and c:IsPreviousControler(tp) and c:IsControler(tp) and c~=e:GetHandler() + and c:IsPreviousSetCard(SET_HARPIE) and c:IsPreviousControler(tp) and c:IsControler(tp) and c~=e:GetHandler() end function s.thcond(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.rtfilter,1,nil,e,tp) end function s.rttgfilter(c) - return c:IsFaceup() and c:IsAbleToHand() and c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsFaceup() and c:IsAbleToHand() and c:IsSpecialSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -89,5 +89,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c85698115.lua b/official/c85698115.lua index 22708b125a..fe139bac00 100644 --- a/official/c85698115.lua +++ b/official/c85698115.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -90,4 +90,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c85704698.lua b/official/c85704698.lua index 30cce3ec57..6ec4c68518 100644 --- a/official/c85704698.lua +++ b/official/c85704698.lua @@ -18,15 +18,15 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.syntg) e2:SetOperation(s.synop) c:RegisterEffect(e2) end s.roll_dice=true -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.filter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -40,16 +40,16 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then + if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) Duel.SpecialSummonComplete() local lv=Duel.TossDice(tp,1) @@ -57,12 +57,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetValue(lv) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end function s.mfilter(c) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) end function s.cfilter(c,syn) return syn:IsSynchroSummonable(c) @@ -87,4 +87,4 @@ function s.synop(e,tp,eg,ep,ev,re,r,rp) local tg=mg:FilterSelect(tp,s.cfilter,1,1,nil,sg:GetFirst()) Duel.SynchroSummon(tp,sg:GetFirst(),tg:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c85709845.lua b/official/c85709845.lua index bfcaef639b..89c39e4e6f 100644 --- a/official/c85709845.lua +++ b/official/c85709845.lua @@ -1,4 +1,5 @@ --ガムシャラ +--Gamushara local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end end @@ -46,4 +47,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8571567.lua b/official/c8571567.lua index b12ad03247..cfbb4254cd 100644 --- a/official/c8571567.lua +++ b/official/c8571567.lua @@ -7,9 +7,9 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.tfcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tftg) e1:SetOperation(s.tfop) c:RegisterEffect(e1) @@ -23,18 +23,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} s.listed_names={7602800,CARD_BLACK_WINGED_DRAGON} -function s.tfcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.tffilter(c,tp) return c:IsCode(7602800) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end @@ -51,13 +46,13 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return ((c:IsSetCard(0x33) and c:IsType(TYPE_SYNCHRO)) or c:IsCode(CARD_BLACK_WINGED_DRAGON)) and c:IsControler(tp) and c:IsFaceup() + return ((c:IsSetCard(SET_BLACKWING) and c:IsType(TYPE_SYNCHRO)) or c:IsCode(CARD_BLACK_WINGED_DRAGON)) and c:IsControler(tp) and c:IsFaceup() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0x33) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end diff --git a/official/c85718645.lua b/official/c85718645.lua index 7e5ca100bd..c9e725fd35 100644 --- a/official/c85718645.lua +++ b/official/c85718645.lua @@ -1,4 +1,5 @@ --闇帝ディルグ +--Delg the Dark Monarch local s,id=GetID() function s.initial_effect(c) --remove @@ -28,10 +29,10 @@ function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -45,6 +46,6 @@ function s.disatt(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c85742772.lua b/official/c85742772.lua index b0ee11bfaf..5cc57a213c 100644 --- a/official/c85742772.lua +++ b/official/c85742772.lua @@ -1,4 +1,5 @@ --グラヴィティ・バインド-超重力の網- +--Gravity Bind local s,id=GetID() function s.initial_effect(c) --activate @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.atktarget(e,c) return c:GetLevel()>=4 -end +end \ No newline at end of file diff --git a/official/c85747929.lua b/official/c85747929.lua index ff85c9bf4b..da4ecc0972 100644 --- a/official/c85747929.lua +++ b/official/c85747929.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -53,7 +53,7 @@ function s.initial_effect(c) end s.listed_series={SET_PHOTON,SET_GALAXY} function s.filter(c) - return (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c85754829.lua b/official/c85754829.lua index 26816e6669..14535f8ff4 100644 --- a/official/c85754829.lua +++ b/official/c85754829.lua @@ -32,4 +32,4 @@ function s.accon(e,tp,eg,ep,ev,re,r,rp) end function s.acop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0xf,1) -end +end \ No newline at end of file diff --git a/official/c85758066.lua b/official/c85758066.lua index b665689831..5243301deb 100644 --- a/official/c85758066.lua +++ b/official/c85758066.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_names={CARD_MONSTER_REBORN,10000000} +s.listed_names={CARD_MONSTER_REBORN,CARD_OBELISK} function s.setcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() return at:IsControler(1-tp) @@ -54,14 +54,14 @@ function s.spcfilter(c,tp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) - and Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end + and Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsCode(10000000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsCode(CARD_OBELISK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end @@ -81,7 +81,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetCondition(s.effcon) e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) @@ -95,4 +95,4 @@ function s.effcon(e) end function s.atklimit(e,c) return c==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c85763457.lua b/official/c85763457.lua index 9ba68db8a1..bdee44baff 100644 --- a/official/c85763457.lua +++ b/official/c85763457.lua @@ -1,5 +1,5 @@ --星遺物に響く残叫 ---Echo in the World Legacy +--World Legacy's Sorrow local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +18,7 @@ function s.cfilter(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,5 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c85766789.lua b/official/c85766789.lua index 6ed8704d07..e4c400d755 100644 --- a/official/c85766789.lua +++ b/official/c85766789.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.exctg) e2:SetOperation(s.excop) c:RegisterEffect(e2) diff --git a/official/c8576764.lua b/official/c8576764.lua index a54d051880..d570dd1e29 100644 --- a/official/c8576764.lua +++ b/official/c8576764.lua @@ -1,7 +1,6 @@ --貪食魚グリーディス ---Gluttonous Greedfish +--Gluttonous Reptolphin Greethys --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special Summon 1 aqua, fish, or sea serpent monster from GY @@ -27,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spfilter(c,e,tp,lv) - return c:IsMonster() and c:IsRace(RACE_AQUA+RACE_FISH+RACE_SEASERPENT) + return c:IsMonster() and c:IsRace(RACE_AQUA|RACE_FISH|RACE_SEASERPENT) and c:HasLevel() and c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -49,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() @@ -67,7 +66,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200*ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sync:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) diff --git a/official/c85771019.lua b/official/c85771019.lua index 801b3bee2b..fb4c28fb3f 100644 --- a/official/c85771019.lua +++ b/official/c85771019.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) e1:SetType(EFFECT_TYPE_SINGLE) - e1:SetRange(LOCATION_DECK+LOCATION_GRAVE) + e1:SetRange(LOCATION_DECK|LOCATION_GRAVE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) @@ -70,7 +70,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) asmo_token:RegisterEffect(e1) end local deus_token=Duel.CreateToken(tp,id+2) @@ -81,8 +81,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) deus_token:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c85775486.lua b/official/c85775486.lua index 23405a5873..99e1cf132a 100644 --- a/official/c85775486.lua +++ b/official/c85775486.lua @@ -1,4 +1,5 @@ --再機動 +--Reboot local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x13} +s.listed_series={SET_MEKLORD} function s.cfilter(c) - return c:IsSetCard(0x13) and c:IsMonster() and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_MEKLORD) and c:IsMonster() and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -23,7 +24,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x13) and c:IsAbleToHand() + return c:IsSetCard(SET_MEKLORD) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c85787173.lua b/official/c85787173.lua index 5aa7f19d88..27192a4aa3 100644 --- a/official/c85787173.lua +++ b/official/c85787173.lua @@ -14,24 +14,25 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3008,0x1f,0xa4} +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN,SET_KURIBOH} function s.filter(c,e,tp,lc,lp) - return (c:IsSetCard(0x3008) or c:IsSetCard(0x1f) or c:IsSetCard(0xa4)) + return (c:IsSetCard(SET_ELEMENTAL_HERO) or c:IsSetCard(SET_NEO_SPACIAN) or c:IsSetCard(SET_KURIBOH)) and c:IsMonster() and c:IsAttackBelow(lp) and (c:IsAbleToHand() or (lc>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local lp=Duel.GetLP(1-tp)-Duel.GetLP(tp) - return lp>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE),lp) + return lp>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE),lp) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local lp=Duel.GetLP(1-tp)-Duel.GetLP(tp) if lp<=0 then return end - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE),lp):GetFirst() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE),lp):GetFirst() if tc then aux.ToHandOrElse(tc,tp, function() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) end, @@ -46,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c85802526.lua b/official/c85802526.lua index 5453d80031..117774ed95 100644 --- a/official/c85802526.lua +++ b/official/c85802526.lua @@ -1,4 +1,5 @@ --プリンセス人魚 +--Cure Mermaid local s,id=GetID() function s.initial_effect(c) --recover @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) diff --git a/official/c8581705.lua b/official/c8581705.lua index 060ca62d1b..5749e1e2f0 100644 --- a/official/c8581705.lua +++ b/official/c8581705.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) diff --git a/official/c85821180.lua b/official/c85821180.lua index c2044fe0a5..426dec3bf3 100644 --- a/official/c85821180.lua +++ b/official/c85821180.lua @@ -1,4 +1,5 @@ --チューナーズ・ハイ +--Tuner's High local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(tc:GetRace()) e:SetValue(tc:GetAttribute()) Duel.SetTargetParam(tc:GetLevel()) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -47,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c85827713.lua b/official/c85827713.lua index 1a95196b27..45747a0e23 100644 --- a/official/c85827713.lua +++ b/official/c85827713.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e3:SetOperation(s.limop) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sumcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.limcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -41,6 +41,6 @@ function s.limop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c85839825.lua b/official/c85839825.lua index 9f36284497..67b101c096 100644 --- a/official/c85839825.lua +++ b/official/c85839825.lua @@ -1,4 +1,5 @@ --エクシーズエナジー +--Xyz Energy local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85840608.lua b/official/c85840608.lua index c0e715e62b..29d4818b3a 100644 --- a/official/c85840608.lua +++ b/official/c85840608.lua @@ -20,33 +20,29 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x1f} +s.listed_series={SET_NEO_SPACIAN} s.listed_names={CARD_NEOS} function s.spfilter(c,e,tp) - return (c:IsCode(CARD_NEOS) or c:IsSetCard(0x1f)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return (c:IsCode(CARD_NEOS) or c:IsSetCard(SET_NEO_SPACIAN)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 @@ -61,5 +57,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c85847157.lua b/official/c85847157.lua index 5c86e8cfbb..8a5e004a3f 100644 --- a/official/c85847157.lua +++ b/official/c85847157.lua @@ -1,5 +1,5 @@ --Proof of Pruflas ---Scripted by Rundas +--Proof of Pruflas local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -49,7 +49,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) end @@ -68,4 +68,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Summon(tp,tc,true,nil,1) end -end +end \ No newline at end of file diff --git a/official/c85852291.lua b/official/c85852291.lua index aafdb2c7e6..ca0d419a50 100644 --- a/official/c85852291.lua +++ b/official/c85852291.lua @@ -1,4 +1,5 @@ --打ち出の小槌 +--Magical Mallet local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(p) Duel.BreakEffect() Duel.Draw(p,#g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85854214.lua b/official/c85854214.lua index d014d9fa1c..dbd82a19a9 100644 --- a/official/c85854214.lua +++ b/official/c85854214.lua @@ -1,4 +1,5 @@ --ヒーローズルール2 +--Hero's Rule 2 local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) - and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85862791.lua b/official/c85862791.lua index 36f6eac0f9..751500d086 100644 --- a/official/c85862791.lua +++ b/official/c85862791.lua @@ -1,5 +1,5 @@ --泥仕合 ---This Match Is A Draw +--Fighting Dirty --scripted by andré local s,id=GetID() function s.initial_effect(c) @@ -24,4 +24,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(1-tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c85876417.lua b/official/c85876417.lua index 395ad8d93c..c3905f1146 100644 --- a/official/c85876417.lua +++ b/official/c85876417.lua @@ -32,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85888377.lua b/official/c85888377.lua index 09fda94cc9..55e85c742d 100644 --- a/official/c85888377.lua +++ b/official/c85888377.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,2000,2200,6,RACE_REPTILE,ATTRIBUTE_EARTH) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,2000,2200,6,RACE_REPTILE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,nil,0,1-tp,LOCATION_ONFIELD) end @@ -28,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,2000,2200,6,RACE_REPTILE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,2000,2200,6,RACE_REPTILE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -48,23 +48,23 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end end -end +end \ No newline at end of file diff --git a/official/c85893201.lua b/official/c85893201.lua index 16ad11232c..11cf5d0290 100644 --- a/official/c85893201.lua +++ b/official/c85893201.lua @@ -41,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85908279.lua b/official/c85908279.lua index 46fcada18b..04ce5799a9 100644 --- a/official/c85908279.lua +++ b/official/c85908279.lua @@ -1,4 +1,5 @@ --召喚獣コキュートス +--Invoked Cocytus local s,id=GetID() function s.initial_effect(c) --fusion material @@ -28,4 +29,4 @@ function s.initial_effect(c) end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c85909450.lua b/official/c85909450.lua index 98e4fb03d2..6ada2a891a 100644 --- a/official/c85909450.lua +++ b/official/c85909450.lua @@ -40,18 +40,18 @@ function s.initial_effect(c) e4:SetOperation(s.rmop) c:RegisterEffect(e4) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} function s.effcon(e) return e:GetHandler():GetOverlayCount()>0 end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x64) + return c:IsFaceup() and c:IsSetCard(SET_HARPIE) end function s.efftg(e,c) - return c:IsSetCard(0x64) and c:IsMonster() + return c:IsSetCard(SET_HARPIE) and c:IsMonster() end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c85914562.lua b/official/c85914562.lua index c7bf021a14..9f068473d2 100644 --- a/official/c85914562.lua +++ b/official/c85914562.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} function s.cfilter(c) return c:IsFaceup() and c:IsRace(RACE_ROCK) and not c:IsCode(id) end diff --git a/official/c8594079.lua b/official/c8594079.lua index 6874fb379a..b084d034f4 100644 --- a/official/c8594079.lua +++ b/official/c8594079.lua @@ -1,4 +1,5 @@ --ジュラック・ブラキス +--Jurrac Brachis local s,id=GetID() function s.initial_effect(c) --battle indestructable @@ -10,5 +11,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.indcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x22),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_JURRAC),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) +end \ No newline at end of file diff --git a/official/c85967160.lua b/official/c85967160.lua index 0ee633f7ff..375c3651c2 100644 --- a/official/c85967160.lua +++ b/official/c85967160.lua @@ -1,4 +1,5 @@ --アロマージ-ベルガモット +--Aromage Bergamot local s,id=GetID() function s.initial_effect(c) --pierce @@ -39,10 +40,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c85970321.lua b/official/c85970321.lua index 34f74cff34..4437c16b62 100644 --- a/official/c85970321.lua +++ b/official/c85970321.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.crcost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.crop) c:RegisterEffect(e1) --draw @@ -32,11 +32,7 @@ function s.initial_effect(c) e3:SetOperation(s.regop) c:RegisterEffect(e3) end -s.listed_series={0xb3} -function s.crcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_YOSENJU} function s.crop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() --activate limit @@ -44,7 +40,7 @@ function s.crop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetOperation(s.cedop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -53,10 +49,10 @@ function s.crop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_CHAIN_END) e3:SetOperation(s.cedop2) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end -s.cfilter=aux.FaceupFilter(Card.IsSetCard,0xb3) +s.cfilter=aux.FaceupFilter(Card.IsSetCard,SET_YOSENJU) function s.cedop(e,tp,eg,ep,ev,re,r,rp) if eg and eg:IsExists(s.cfilter,1,nil) then Duel.SetChainLimitTillChainEnd(s.chlimit) @@ -95,7 +91,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -107,4 +103,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c85991529.lua b/official/c85991529.lua index 1ed9b90cc3..5b0194e82b 100644 --- a/official/c85991529.lua +++ b/official/c85991529.lua @@ -53,13 +53,13 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.rescon(sg,e,tp,mg) Duel.SetSelectedCard(sg) return (sg:CheckWithSumGreater(Card.GetLevel,10)) end function s.spfilter(c) - return c:IsSetCard(0xd2) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_KOZMO) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -85,7 +85,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -107,14 +107,14 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and e:GetHandler():IsLocation(LOCATION_GRAVE) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xd2) and c:IsLevelBelow(9) and c:IsAbleToHand() + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(9) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -127,4 +127,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c86013171.lua b/official/c86013171.lua index 609e576b93..17aba92114 100644 --- a/official/c86013171.lua +++ b/official/c86013171.lua @@ -1,4 +1,5 @@ --Kozmo-パーヴィッド +--Kozmo Scaredy Lion local s,id=GetID() function s.initial_effect(c) --spsummon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -21,14 +22,14 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -45,11 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsMonster() and c:IsSetCard(0xd2) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return c:IsFaceup() and c:IsMonster() and c:IsSetCard(SET_KOZMO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -62,7 +59,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) - if #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)~=0 then + if #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN)~=0 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86016245.lua b/official/c86016245.lua index 013884cf76..1e1b862314 100644 --- a/official/c86016245.lua +++ b/official/c86016245.lua @@ -1,4 +1,5 @@ --弱者の意地 +--Pride of the Weak local s,id=GetID() function s.initial_effect(c) --Activate @@ -36,4 +37,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8602351.lua b/official/c8602351.lua index 64921e18dc..a939e087fa 100644 --- a/official/c8602351.lua +++ b/official/c8602351.lua @@ -32,7 +32,7 @@ function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsRace,1,nil,RACE_REPTILE,lc,sumtype,tp) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end @@ -47,7 +47,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) end @@ -72,7 +72,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) diff --git a/official/c86028783.lua b/official/c86028783.lua index 8e537049ec..483e091b67 100644 --- a/official/c86028783.lua +++ b/official/c86028783.lua @@ -1,21 +1,21 @@ --- 新鋭の女戦士 --- Propitious Warrior Lady --- Scripted by Hatter +--新鋭の女戦士 +--Rookie Warrior Lady +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Reduce ATK + --Reduce ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Add to hand + --Add to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -35,21 +35,17 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return a and b and a~=e:GetHandler() and a:IsControler(tp) and a:IsFaceup() and a:IsRace(RACE_WARRIOR) and b:IsFaceup() and b:IsControler(1-tp) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() local b=Duel.GetAttackTarget() if a:IsControler(1-tp) then a,b=b,a end if a and b and b:IsRelateToBattle() and b:IsFaceup() and b:IsControler(1-tp) then - -- Update ATK + --Update ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-b:GetBaseAttack()) b:RegisterEffect(e1) end @@ -69,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86039057.lua b/official/c86039057.lua index f74ec31d84..5aa82b7090 100644 --- a/official/c86039057.lua +++ b/official/c86039057.lua @@ -27,6 +27,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end \ No newline at end of file diff --git a/official/c86049351.lua b/official/c86049351.lua index b2ab73f69c..3cf1973784 100644 --- a/official/c86049351.lua +++ b/official/c86049351.lua @@ -12,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.cfilter(c,pos) - return c:IsPosition(pos) and c:IsSetCard(0x84) + return c:IsPosition(pos) and c:IsSetCard(SET_BATTLIN_BOXER) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local bc1,bc2=Duel.GetBattleMonster(tp) - if not (bc1 and bc1:IsFaceup() and bc1:IsSetCard(0x84)) then return false end + if not (bc1 and bc1:IsFaceup() and bc1:IsSetCard(SET_BATTLIN_BOXER)) then return false end if not (bc2 and bc2:IsFaceup()) then return false end local pos=POS_FACEUP if bc1==Duel.GetAttacker() then pos=POS_FACEUP_ATTACK end @@ -48,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) if bc==Duel.GetAttackTarget() then bc,sc=sc,bc end if sc:IsCanBeBattleTarget(bc) and not bc:IsImmuneToEffect(e) and not sc:IsImmuneToEffect(e) then diff --git a/official/c86060749.lua b/official/c86060749.lua index 1e9aabd82a..f11a7479f7 100644 --- a/official/c86060749.lua +++ b/official/c86060749.lua @@ -15,20 +15,20 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsChainNegatable(ev) or not (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end + if not Duel.IsChainNegatable(ev) or not (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end if re:IsHasCategory(CATEGORY_DISABLE_SUMMON) then return true end local ex,tg,ct=Duel.GetOperationInfo(ev,CATEGORY_NEGATE) if not ex then return false end if ct>1 then for i=1,ev-1 do local ce=Duel.GetChainInfo(ev-i,CHAININFO_TRIGGERING_EFFECT) - if ce and ce:IsActiveType(TYPE_SPELL+TYPE_TRAP) and ce:IsHasType(EFFECT_TYPE_ACTIVATE) then + if ce and ce:IsSpellTrapEffect() and ce:IsHasType(EFFECT_TYPE_ACTIVATE) then return true end end elseif ct==1 then local ce=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT) - return ce and ce:IsActiveType(TYPE_SPELL+TYPE_TRAP) and ce:IsHasType(EFFECT_TYPE_ACTIVATE) + return ce and ce:IsSpellTrapEffect() and ce:IsHasType(EFFECT_TYPE_ACTIVATE) end end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -46,6 +46,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.SendtoDeck(eg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c86062400.lua b/official/c86062400.lua index dc086ee1eb..29d7d51573 100644 --- a/official/c86062400.lua +++ b/official/c86062400.lua @@ -68,4 +68,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleExtra(1-tp) end end -end +end \ No newline at end of file diff --git a/official/c86066372.lua b/official/c86066372.lua index 4eca3cd340..0e095e15f7 100644 --- a/official/c86066372.lua +++ b/official/c86066372.lua @@ -60,7 +60,7 @@ function s.resetop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_LINK) and e:GetLabelObject():GetLabel()==1 + return c:IsLinkSummoned() and e:GetLabelObject():GetLabel()==1 end function s.atkfilter(c,e) return c:IsType(TYPE_LINK) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup())) and c:IsCanBeEffectTarget(e) diff --git a/official/c8608979.lua b/official/c8608979.lua index 1b6a6e55e6..a2b889139c 100644 --- a/official/c8608979.lua +++ b/official/c8608979.lua @@ -1,5 +1,5 @@ --Super Team Buddy Force Unite! ---Scripted by Eerie Code +--Super Team Buddy Force Unite! local s,id=GetID() function s.initial_effect(c) --activate @@ -24,7 +24,7 @@ function s.initial_effect(c) end s.listed_names={id} function s.filter(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) return c:GetOriginalRace()==tc:GetOriginalRace() and c:GetOriginalCode()~=tc:GetOriginalCode() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -41,7 +41,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,tc) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -67,5 +67,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end - +end \ No newline at end of file diff --git a/official/c86099788.lua b/official/c86099788.lua index 69eba780e0..efa0275313 100644 --- a/official/c86099788.lua +++ b/official/c86099788.lua @@ -1,4 +1,5 @@ --異星の最終戦士 +--The Last Warrior from Another Planet local s,id=GetID() function s.initial_effect(c) --fusion material @@ -36,4 +37,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86100785.lua b/official/c86100785.lua index a42136a014..d90359cc96 100644 --- a/official/c86100785.lua +++ b/official/c86100785.lua @@ -1,4 +1,5 @@ --ゾーン・イーター +--Zone Eater local s,id=GetID() function s.initial_effect(c) -- @@ -47,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(e) e1:SetLabel(0) e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) e:GetLabelObject():AddCard(bc) end @@ -93,4 +94,4 @@ function s.desop(tc,e,c) end end end -end +end \ No newline at end of file diff --git a/official/c8611007.lua b/official/c8611007.lua index c846f7f5de..742c95fefb 100644 --- a/official/c8611007.lua +++ b/official/c8611007.lua @@ -1,4 +1,5 @@ --ラヴァルバル・ドラグーン +--Lavalval Dragun local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsSetCard(0x39) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_LAVAL) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -24,7 +25,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND) end function s.tgfilter(c) - return c:IsSetCard(0x39) and c:IsMonster() + return c:IsSetCard(SET_LAVAL) and c:IsMonster() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local dg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86111442.lua b/official/c86111442.lua index eb2471277c..1059d635ce 100644 --- a/official/c86111442.lua +++ b/official/c86111442.lua @@ -1,4 +1,4 @@ --- +--ティスティナの歩哨 --Sentinel of the Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c86120751.lua b/official/c86120751.lua index 62379573ea..74996191ea 100644 --- a/official/c86120751.lua +++ b/official/c86120751.lua @@ -10,9 +10,9 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) - e1:SetCondition(s.adcon) - e1:SetCost(s.adcost) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) + e1:SetCondition(aux.StatChangeDamageStepCondition) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.adtg) e1:SetOperation(s.adop) c:RegisterEffect(e1) @@ -31,13 +31,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={74063034} -function s.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) end @@ -49,13 +42,13 @@ function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.adop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -70,9 +63,10 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local tc=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil) if tc then Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c86124104.lua b/official/c86124104.lua index 7716d69ad7..436d8d31b8 100644 --- a/official/c86124104.lua +++ b/official/c86124104.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_HAND) + e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetValue(72426662) c:RegisterEffect(e1) --destroy @@ -37,7 +37,7 @@ end s.listed_names={32828635,72426662} function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsRitualSummoned() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -73,7 +73,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(s.actop) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CONTROL,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.actcon(e,tp,eg,ep,ev,re,r,rp) @@ -85,10 +85,10 @@ function s.actcon(e,tp,eg,ep,ev,re,r,rp) return tc:GetFlagEffect(id)>0 end function s.actop(e,tp,eg,ep,ev,re,r,rp) - if re:IsActiveType(TYPE_RITUAL) and re:IsActiveType(TYPE_MONSTER) and ep==tp then + if re:IsActiveType(TYPE_RITUAL) and re:IsMonsterEffect() and ep==tp then Duel.SetChainLimit(s.chainlm) end end function s.chainlm(e,rp,tp) return tp==rp -end +end \ No newline at end of file diff --git a/official/c86133013.lua b/official/c86133013.lua index 4a8a43cef4..2256a03ee9 100644 --- a/official/c86133013.lua +++ b/official/c86133013.lua @@ -61,4 +61,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c86137485.lua b/official/c86137485.lua index 2812c37c9c..91d0e3b1bf 100644 --- a/official/c86137485.lua +++ b/official/c86137485.lua @@ -1,4 +1,5 @@ --ヘル・ツイン・コップ +--Stygian Sergeants local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -23,7 +24,7 @@ end function s.atcon1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return Duel.GetTurnPlayer()==tp and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() + return Duel.IsTurnPlayer(tp) and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() and c:CanChainAttack() and c:IsStatus(STATUS_OPPO_BATTLE) end function s.atop1(e,tp,eg,ep,ev,re,r,rp) @@ -33,14 +34,14 @@ function s.atop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) Duel.ChainAttack() end function s.atcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return Duel.GetTurnPlayer()~=tp and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) + return Duel.IsTurnPlayer(1-tp) and c:IsRelateToBattle() and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsLocation(LOCATION_GRAVE) and bc:IsMonster() end function s.atop2(e,tp,eg,ep,ev,re,r,rp) @@ -50,6 +51,6 @@ function s.atop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c86148577.lua b/official/c86148577.lua index d4e62272ec..c1d74d74fc 100644 --- a/official/c86148577.lua +++ b/official/c86148577.lua @@ -1,5 +1,5 @@ --守護竜エルピィ ---Elpy the Guardragon +--Guardragon Elpy --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -37,15 +37,15 @@ function s.filter(c,e,tp,zone) return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local zone=Duel.GetZoneWithLinkedCount(2,tp)&0x1f - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,zone) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + local zone=Duel.GetZoneWithLinkedCount(2,tp)&ZONES_MMZ + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,zone) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=Duel.GetZoneWithLinkedCount(2,tp)&0x1f + local zone=Duel.GetZoneWithLinkedCount(2,tp)&ZONES_MMZ Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,zone) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,zone) if #g>0 and zone~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) end -end +end \ No newline at end of file diff --git a/official/c86154370.lua b/official/c86154370.lua index 33839c194e..bdb89e4994 100644 --- a/official/c86154370.lua +++ b/official/c86154370.lua @@ -20,11 +20,11 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER_E) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -48,7 +48,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE,0,1,d,nil) if #g>0 then - local dc=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) + local dc=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if not (dc>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) @@ -60,20 +60,16 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(oc*500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and Duel.IsTurnPlayer(1-tp) + return e:GetHandler():IsSynchroSummoned() and Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsLevel(7) and c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 @@ -93,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c86157908.lua b/official/c86157908.lua index 36b6fdbe5e..87fe522db9 100644 --- a/official/c86157908.lua +++ b/official/c86157908.lua @@ -1,4 +1,5 @@ --EMオッドアイズ・ユニコーン +--Performapal Odd-Eyes Unicorn local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,13 +29,13 @@ function s.initial_effect(c) e4:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e4) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) + return c:IsFaceup() and c:IsSetCard(SET_PERFORMAPAL) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:IsControler(tp) and at:IsSetCard(0x99) + return at:IsControler(tp) and at:IsSetCard(SET_ODD_EYES) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local at=Duel.GetAttacker() @@ -54,12 +55,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) at:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x9f) and c:GetAttack()>0 + return c:IsSetCard(SET_PERFORMAPAL) and c:GetAttack()>0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -74,4 +75,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86164529.lua b/official/c86164529.lua index 212d451eda..de8f9ab606 100644 --- a/official/c86164529.lua +++ b/official/c86164529.lua @@ -1,7 +1,8 @@ --アクア・ドラゴン +--Aqua Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,20315854,17968114,86100785) -end +end \ No newline at end of file diff --git a/official/c86165817.lua b/official/c86165817.lua index f2515df8f6..babecfb074 100644 --- a/official/c86165817.lua +++ b/official/c86165817.lua @@ -75,4 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c86170989.lua b/official/c86170989.lua index 27a7b1cea8..31760fe7e6 100644 --- a/official/c86170989.lua +++ b/official/c86170989.lua @@ -1,4 +1,5 @@ --ファルシオンβ +--Falchionβ local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -62,4 +63,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c86174055.lua b/official/c86174055.lua index b666d2b61d..e2de2675fb 100644 --- a/official/c86174055.lua +++ b/official/c86174055.lua @@ -1,4 +1,5 @@ --スピッド・バード +--Speed Bird local s,id=GetID() function s.initial_effect(c) --special summon @@ -39,14 +40,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c8617563.lua b/official/c8617563.lua index 4f6918b887..677ede23ab 100644 --- a/official/c8617563.lua +++ b/official/c8617563.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.settg) e1:SetOperation(s.setop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsRace,1,nil,RACE_WINGEDBEAST) end) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c86188410.lua b/official/c86188410.lua index 3e8cadba1f..68802b226e 100644 --- a/official/c86188410.lua +++ b/official/c86188410.lua @@ -1,4 +1,5 @@ --E・HERO ワイルドマン +--Elemental HERO Wildheart local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -10,5 +11,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.efilter(e,te) - return te:IsActiveType(TYPE_TRAP) -end + return te:IsTrapEffect() +end \ No newline at end of file diff --git a/official/c86196216.lua b/official/c86196216.lua index 4af82ca7e4..e9f5716401 100644 --- a/official/c86196216.lua +++ b/official/c86196216.lua @@ -1,4 +1,5 @@ --RUM-デス・ダブル・フォース +--Rank-Up-Magic Doom Double Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(0,TIMING_DESTROY+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_DESTROY|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -19,18 +20,18 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - if tc:IsSetCard(0xba) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if tc:IsSetCard(SET_RAIDRAPTOR) and tc:IsType(TYPE_XYZ) and tc:IsReason(REASON_DESTROY) and tc:IsReason(REASON_BATTLE) then + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end end function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetFlagEffect(id)~=0 + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsSetCard(SET_RAIDRAPTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetFlagEffect(id)~=0 and c:IsType(TYPE_XYZ) and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()*2,pg) end @@ -63,4 +64,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c86197239.lua b/official/c86197239.lua index 0da27015e8..471cec3276 100644 --- a/official/c86197239.lua +++ b/official/c86197239.lua @@ -1,4 +1,5 @@ --インフェルニティ・ミラージュ +--Infernity Mirage local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -17,21 +18,17 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xb} +s.listed_series={SET_INFERNITY} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) - return c:IsSetCard(0xb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INFERNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -52,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c86198326.lua b/official/c86198326.lua index e78d5071e5..edee4f6786 100644 --- a/official/c86198326.lua +++ b/official/c86198326.lua @@ -1,4 +1,5 @@ --7カード +--7 Completed local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),nil,nil,nil,s.operation) @@ -16,7 +17,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_DEFENSE) end e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c86209650.lua b/official/c86209650.lua index 13d01c2e04..7265f816d6 100644 --- a/official/c86209650.lua +++ b/official/c86209650.lua @@ -1,4 +1,5 @@ --迷走悪魔 +--Stray Asmodian local s,id=GetID() function s.initial_effect(c) --battle destroyed @@ -22,4 +23,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,800,REASON_EFFECT) Duel.Recover(1-tp,800,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86221741.lua b/official/c86221741.lua index 8a6d6618c8..3a596207cd 100644 --- a/official/c86221741.lua +++ b/official/c86221741.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) --Minus 1000 ATK for opp cards, optionally inflict damage @@ -31,14 +31,10 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.efilter(e,te) return te:GetOwner()~=e:GetOwner() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() --All monsters your opponent controls will lose 1000 ATK @@ -47,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(-1000) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Your opponent's cards and effects cannot be activated local e2=Effect.CreateEffect(c) @@ -56,11 +52,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetTargetRange(0,1) e2:SetValue(1) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xba) + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_RAIDRAPTOR) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -76,11 +72,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1000) sc:RegisterEffect(e1) end else Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86223870.lua b/official/c86223870.lua index 8119ea1a63..3bea0a7653 100644 --- a/official/c86223870.lua +++ b/official/c86223870.lua @@ -1,4 +1,5 @@ --レベル・リチューナー +--Level Retuner local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,8 +32,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-dlv) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c86229493.lua b/official/c86229493.lua index 8ef7d0eba2..375e550da5 100644 --- a/official/c86229493.lua +++ b/official/c86229493.lua @@ -1,4 +1,5 @@ --ダークネスソウル +--Umbral Soul local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86238081.lua b/official/c86238081.lua index a99f6d6c0d..006562df9d 100644 --- a/official/c86238081.lua +++ b/official/c86238081.lua @@ -1,6 +1,5 @@ --覇王烈竜オッドアイズ・レイジング・ドラゴン --Odd-Eyes Raging Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -47,7 +46,7 @@ function s.initial_effect(c) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(s.effcon) - e5:SetCost(s.descost) + e5:SetCost(Cost.Detach(1)) e5:SetTarget(s.destg) e5:SetOperation(s.desop) c:RegisterEffect(e5,false,REGISTER_FLAG_DETACH_XMAT) @@ -63,7 +62,6 @@ function s.initial_effect(c) c:RegisterEffect(e6) end s.pendulum_level=7 - function s.pcfilter(c) return c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end @@ -81,20 +79,16 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()==1 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()==1 end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) end function s.effcon(e) return e:GetHandler():GetFlagEffect(id)>0 end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end local sg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) @@ -109,7 +103,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c86240887.lua b/official/c86240887.lua index 9b5a4f440c..9c531cfbc0 100644 --- a/official/c86240887.lua +++ b/official/c86240887.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,78193831,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) + Fusion.AddProcMix(c,true,true,CARD_BUSTER_BLADER,aux.FilterBoolFunctionEx(Card.IsRace,RACE_DRAGON)) --cannot direct attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -52,9 +52,9 @@ function s.initial_effect(c) e7:SetCode(EFFECT_PIERCE) c:RegisterEffect(e7) end -s.material_setcode=0xd7 +s.material_setcode=SET_BUSTER_BLADER function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE+LOCATION_MZONE,nil)*1000 + return Duel.GetMatchingGroupCount(s.filter,c:GetControler(),0,LOCATION_GRAVE|LOCATION_MZONE,nil)*1000 end function s.filter(c) return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) @@ -63,5 +63,5 @@ function s.target(e,c) return c:IsRace(RACE_DRAGON) end function s.aclimit(e,re,tp) - return re:GetHandler():IsRace(RACE_DRAGON) and re:IsActiveType(TYPE_MONSTER) + return re:GetHandler():IsRace(RACE_DRAGON) and re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c86271510.lua b/official/c86271510.lua index 32492c612a..292365a02b 100644 --- a/official/c86271510.lua +++ b/official/c86271510.lua @@ -1,9 +1,9 @@ --- 機怪獣ダレトン --- Mechabeast Dareton --- Scripted by Hatter +--機怪獣ダレトン +--Darton the Mechanical Monstrosity +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Change original ATK + --Change original ATK local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) @@ -28,11 +28,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do sum=sum+(math.abs(tc:GetBaseAttack()-tc:GetAttack())) end - -- Change original ATK + --Change original ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(sum) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN,1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c86274272.lua b/official/c86274272.lua index 7adb594d67..ece7a100c1 100644 --- a/official/c86274272.lua +++ b/official/c86274272.lua @@ -1,9 +1,10 @@ --聖霊獣騎 アペライオ +--Ritual Beast Ulti-Apelio local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10b5),aux.FilterBoolFunctionEx(Card.IsSetCard,0x20b5)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RITUAL_BEAST_TAMER),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SPIRITUAL_BEAST)) Fusion.AddContactProc(c,s.contactfil,s.contactop,true) --immune local e3=Effect.CreateEffect(c) @@ -24,13 +25,13 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10b5,0x20b5} -s.material_setcode={0xb5,0x10b5,0x20b5} +s.listed_series={SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} +s.material_setcode={SET_RITUAL_BEAST,SET_RITUAL_BEAST_TAMER,SET_SPIRITUAL_BEAST} function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_MZONE,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -40,7 +41,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end function s.efilter(e,te) @@ -48,14 +49,14 @@ function s.efilter(e,te) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_COST) end function s.filter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_RITUAL_BEAST_TAMER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp) end function s.filter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_SPIRITUAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -85,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g:Sub(sg) Duel.SendtoGrave(g,REASON_RULE) end -end +end \ No newline at end of file diff --git a/official/c86277379.lua b/official/c86277379.lua index 715917461a..351e500195 100644 --- a/official/c86277379.lua +++ b/official/c86277379.lua @@ -87,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c86282581.lua b/official/c86282581.lua index 2ed1d78929..108ca378b0 100644 --- a/official/c86282581.lua +++ b/official/c86282581.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - c:RegisterEffect(e3) + c:RegisterEffect(e3) end s.listed_names={CARD_DARK_FUSION} function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c8628798.lua b/official/c8628798.lua index 8fb7980546..d3201e6284 100644 --- a/official/c8628798.lua +++ b/official/c8628798.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DRAW_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_DRAW_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetFieldGroupCount(1-tp,LOCATION_REMOVED,0)*300 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86308219.lua b/official/c86308219.lua index 0dc65687a3..1bd08fb370 100644 --- a/official/c86308219.lua +++ b/official/c86308219.lua @@ -1,4 +1,5 @@ --ハーピィ・レディ -鳳凰の陣- +--Harpie Lady Phoenix Formation local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.initial_effect(c) end s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} function s.counterfilter(c) - return (c:GetSummonLocation()&LOCATION_DECK+LOCATION_EXTRA)==0 + return (c:GetSummonLocation()&LOCATION_DECK|LOCATION_EXTRA)==0 end function s.cfilter(c) return c:IsFaceup() and c:IsCode(CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS) @@ -26,31 +27,31 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 - and Duel.GetCurrentPhase()==PHASE_MAIN1 end + and Duel.IsPhase(PHASE_MAIN1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_BP) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) - return c:IsLocation(LOCATION_DECK+LOCATION_EXTRA) + return c:IsLocation(LOCATION_DECK|LOCATION_EXTRA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end @@ -70,4 +71,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,matk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c86318356.lua b/official/c86318356.lua index f8140dcb45..5ff675b2c6 100644 --- a/official/c86318356.lua +++ b/official/c86318356.lua @@ -1,4 +1,5 @@ --草原 +--Sogen local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,11 +13,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR+RACE_BEASTWARRIOR)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WARRIOR|RACE_BEASTWARRIOR)) e2:SetValue(200) c:RegisterEffect(e2) --Def local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c86321248.lua b/official/c86321248.lua index a9df19f7a8..e605ebc696 100644 --- a/official/c86321248.lua +++ b/official/c86321248.lua @@ -35,7 +35,7 @@ function s.valcheck(e,c) e:SetLabel(flag) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local flag=e:GetLabelObject():GetLabel() @@ -45,7 +45,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x2)~=0 then @@ -58,7 +58,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon1) e1:SetTarget(s.damtg1) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end if (flag&0x4)~=0 then @@ -69,7 +69,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetTarget(s.damtg2) e1:SetOperation(s.damop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end diff --git a/official/c86325573.lua b/official/c86325573.lua index 43f1f780c8..221730ab26 100644 --- a/official/c86325573.lua +++ b/official/c86325573.lua @@ -22,22 +22,22 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x84} +s.listed_series={SET_BATTLIN_BOXER} function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 end function s.filter(c) - return c:HasLevel() and c:IsSetCard(0x84) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) + return c:HasLevel() and c:IsSetCard(SET_BATTLIN_BOXER) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(0x84) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_BATTLIN_BOXER) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -51,7 +51,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) lc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c86327225.lua b/official/c86327225.lua index 61f93769c4..9775294a30 100644 --- a/official/c86327225.lua +++ b/official/c86327225.lua @@ -1,4 +1,5 @@ --天界王 シナト +--Shinato, King of a Higher Plane local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -34,4 +35,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8632967.lua b/official/c8632967.lua index 32cf6122ca..8c66c50c7f 100644 --- a/official/c8632967.lua +++ b/official/c8632967.lua @@ -1,4 +1,5 @@ --進化の宿命 +--Evo-Karma local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,7 +27,7 @@ function s.chainlm(e,rp,tp) end function s.sucfilter(c) local st=c:GetSummonType() - return c:IsSetCard(0x304e) and st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) + return c:IsSetCard(SET_EVOLTILE) and st>=(SUMMON_TYPE_SPECIAL+150) and st<(SUMMON_TYPE_SPECIAL+180) end function s.sucop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.sucfilter,1,nil) then @@ -37,4 +38,4 @@ function s.cedop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then Duel.SetChainLimitTillChainEnd(s.chainlm) end -end +end \ No newline at end of file diff --git a/official/c86331741.lua b/official/c86331741.lua index ee6e5e7cc6..df0b279d8e 100644 --- a/official/c86331741.lua +++ b/official/c86331741.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -25,17 +25,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.ngcon) - e2:SetCost(s.ngcost) + e2:SetCost(Cost.Detach(2)) e2:SetTarget(s.ngtg) e2:SetOperation(s.ngop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x207f} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_UTOPIC_FUTURE} function s.spfilter(c,e,tp) return c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end @@ -54,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -63,11 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.ngcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSetCard(0x207f) -end -function s.ngcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) + return e:GetHandler():IsSetCard(SET_UTOPIC_FUTURE) end function s.ngtgfilter(c,e,tp) return c:IsType(TYPE_XYZ) and c:IsFaceup() and c:IsControler(tp) @@ -88,20 +80,20 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(4000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c8634636.lua b/official/c8634636.lua index 1f34774447..ac36069773 100644 --- a/official/c8634636.lua +++ b/official/c8634636.lua @@ -1,4 +1,5 @@ --尾も白い黒猫 +--Dark Cat with White Tail local s,id=GetID() function s.initial_effect(c) --flip @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86346643.lua b/official/c86346643.lua index 69764ff5ba..39009c4c8a 100644 --- a/official/c86346643.lua +++ b/official/c86346643.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,CARD_NEOS,aux.FilterBoolFunctionEx(Card.IsSetCard,0x2034)) + Fusion.AddProcMix(c,false,false,CARD_NEOS,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ULTIMATE_CRYSTAL)) --special summon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -46,9 +46,9 @@ function s.initial_effect(c) e4:SetOperation(s.tdop3) c:RegisterEffect(e4) end -s.listed_series={0x2034} +s.listed_series={SET_ULTIMATE_CRYSTAL} s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x34,0x2034} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_CRYSTAL,SET_ULTIMATE_CRYSTAL} function s.tdcost1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) @@ -100,4 +100,4 @@ end function s.tdop3(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86361354.lua b/official/c86361354.lua index 3a7313ccce..dbec3beaa9 100644 --- a/official/c86361354.lua +++ b/official/c86361354.lua @@ -1,4 +1,5 @@ --同族感電ウィルス +--Tribe-Shocking Virus local s,id=GetID() function s.initial_effect(c) --destroy @@ -36,4 +37,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetLabel()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86377375.lua b/official/c86377375.lua index 21c136326d..c62045ab6a 100644 --- a/official/c86377375.lua +++ b/official/c86377375.lua @@ -1,5 +1,5 @@ --悪王アフリマ ---Ahrima, King of Wickedness +--Ahrima, the Wicked Warden -- local s,id=GetID() function s.initial_effect(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -26,11 +26,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={59160188} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.thfilter1(c) return c:IsCode(59160188) and c:IsAbleToHand() end @@ -83,4 +78,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86379342.lua b/official/c86379342.lua index 94a4c49491..2fccd32fca 100644 --- a/official/c86379342.lua +++ b/official/c86379342.lua @@ -1,5 +1,5 @@ --鉄獣の血盟 ---Tri-brigade Oath +--Tri-Brigade Oath --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCountLimit(1,id) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) diff --git a/official/c863795.lua b/official/c863795.lua index 6098d93857..2715fd9f27 100644 --- a/official/c863795.lua +++ b/official/c863795.lua @@ -32,7 +32,7 @@ end s.listed_names={id} s.listed_series={SET_PHOTON,SET_GALAXY} function s.spfilter(c,e,tp) - return (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and not c:IsCode(id) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c86395581.lua b/official/c86395581.lua index 5381465a06..cff3d0e393 100644 --- a/official/c86395581.lua +++ b/official/c86395581.lua @@ -38,7 +38,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local g=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND,0,1,1,c) g:AddCard(c) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsAttribute(ATTRIBUTE_WIND) and not c:IsCode(id) and c:IsAbleToHand() diff --git a/official/c86396750.lua b/official/c86396750.lua index 22ae1ac990..6f914aed7d 100644 --- a/official/c86396750.lua +++ b/official/c86396750.lua @@ -11,24 +11,21 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -s.listed_series={0xb5} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_RITUAL_BEAST} function s.cfilter(c) - return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -38,12 +35,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) e1:SetValue(500) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) Duel.RegisterEffect(e2,tp) end function s.atktg(e,c) - return c:IsSetCard(0xb5) -end + return c:IsSetCard(SET_RITUAL_BEAST) +end \ No newline at end of file diff --git a/official/c86401517.lua b/official/c86401517.lua index b9ce343026..a9e5342113 100644 --- a/official/c86401517.lua +++ b/official/c86401517.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -39,31 +39,26 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end - +end \ No newline at end of file diff --git a/official/c8643186.lua b/official/c8643186.lua index c8e7b07522..76600622e2 100644 --- a/official/c8643186.lua +++ b/official/c8643186.lua @@ -1,4 +1,5 @@ --DDリクルート +--D/D Recruits local s,id=GetID() function s.initial_effect(c) --activate @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end function s.filter(c) - return ((c:IsSetCard(0xaf) and c:IsMonster()) or c:IsSetCard(0xae)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_DD) and c:IsMonster()) or c:IsSetCard(SET_DARK_CONTRACT)) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86442081.lua b/official/c86442081.lua index 4ace16ffec..820344e2b2 100644 --- a/official/c86442081.lua +++ b/official/c86442081.lua @@ -1,4 +1,5 @@ --サイレントアビス +--Silent Abyss local s,id=GetID() function s.initial_effect(c) --destroy @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86445415.lua b/official/c86445415.lua index 61fd93c073..6d0d0802d9 100644 --- a/official/c86445415.lua +++ b/official/c86445415.lua @@ -1,4 +1,5 @@ --レッド・ガジェット +--Red Gadget local s,id=GetID() function s.initial_effect(c) --search @@ -29,4 +30,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c86449372.lua b/official/c86449372.lua index 40c958b9dd..f4ec97a3e7 100644 --- a/official/c86449372.lua +++ b/official/c86449372.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.condition(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetAttackTarget() if not bc then return false end @@ -40,14 +40,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(bc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetOperation(s.damop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end end @@ -61,7 +61,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) s.damage(Duel.GetAttackTarget()) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x135) and c:IsLocation(LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_IGNISTER) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsReason(REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -73,5 +73,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c86469231.lua b/official/c86469231.lua index 295c5887a3..684351f21a 100644 --- a/official/c86469231.lua +++ b/official/c86469231.lua @@ -53,4 +53,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end end -end +end \ No newline at end of file diff --git a/official/c86474024.lua b/official/c86474024.lua index 5f36d08352..c1c7145c35 100644 --- a/official/c86474024.lua +++ b/official/c86474024.lua @@ -1,4 +1,5 @@ --共同戦線 +--United Front local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,7 +20,7 @@ function s.filter2(c,lv1) return c:IsFaceup() and c:GetLevel()==lv1 end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86483512.lua b/official/c86483512.lua index 7c63690765..15fae5e9bc 100644 --- a/official/c86483512.lua +++ b/official/c86483512.lua @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x150} +s.listed_series={SET_VIRTUAL_WORLD} local key=TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP function s.togravefilter(c,ctype) - return c:IsSetCard(0x150) and not c:IsType(ctype&key) and c:IsAbleToGrave() + return c:IsSetCard(SET_VIRTUAL_WORLD) and not c:IsType(ctype&key) and c:IsAbleToGrave() end function s.tgfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x150) and Duel.IsExistingMatchingCard(s.togravefilter,tp,LOCATION_DECK,0,1,nil,c:GetType()) + return c:IsFaceup() and c:IsSetCard(SET_VIRTUAL_WORLD) and Duel.IsExistingMatchingCard(s.togravefilter,tp,LOCATION_DECK,0,1,nil,c:GetType()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.tgfilter(chkc,tp) end @@ -33,7 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.ssummonfilter(c,tgid,e,tp) - return c:IsSetCard(0x150) and c:IsMonster() and not c:IsCode(tgid) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_VIRTUAL_WORLD) and c:IsMonster() and not c:IsCode(tgid) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -45,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) --Send to GY and Special Summon @@ -66,12 +66,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sg:GetFirst():RegisterEffect(e2,true) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) sg:GetFirst():RegisterEffect(e3,true) Duel.SpecialSummonComplete() end @@ -82,4 +82,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not (c:IsLevelAbove(3) or c:IsRankAbove(3)) -end +end \ No newline at end of file diff --git a/official/c86489182.lua b/official/c86489182.lua index 0be4881da8..f15eee1187 100644 --- a/official/c86489182.lua +++ b/official/c86489182.lua @@ -1,4 +1,5 @@ --始祖神鳥シムルグ +--Simorgh, Bird of Ancestry local s,id=GetID() function s.initial_effect(c) --normal monster @@ -53,7 +54,7 @@ function s.valcheck(e,c) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end @@ -68,4 +69,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8649148.lua b/official/c8649148.lua index 66f4e50f4b..9bb7851d0e 100644 --- a/official/c8649148.lua +++ b/official/c8649148.lua @@ -1,4 +1,5 @@ --ディープ・スィーパー +--Deep Sweeper local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,17 +9,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -32,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86509711.lua b/official/c86509711.lua index 04c37b62c3..456016a9fb 100644 --- a/official/c86509711.lua +++ b/official/c86509711.lua @@ -39,7 +39,7 @@ function s.negcon(e,tp,eg,ep,ev,re,r,rp) end function s.cfilter(c,e,tp) return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) return c:IsCode(CARD_DARK_MAGICIAN,CARD_DARK_MAGICIAN_GIRL) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -52,14 +52,14 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local code=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,code) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,code) if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then Duel.NegateEffect(ev) end diff --git a/official/c86516889.lua b/official/c86516889.lua index adf3c20bd6..5b994bbbd7 100644 --- a/official/c86516889.lua +++ b/official/c86516889.lua @@ -1,4 +1,5 @@ --ゴーストリック・パニック +--Ghostrick Scare local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFacedown() end if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil) end @@ -26,7 +27,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(s.filter,nil,e) Duel.ChangePosition(g,POS_FACEUP_DEFENSE) - local ct=g:FilterCount(Card.IsSetCard,nil,0x8d) + local ct=g:FilterCount(Card.IsSetCard,nil,SET_GHOSTRICK) if ct>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) local sg=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,ct,nil) @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE) end end -end +end \ No newline at end of file diff --git a/official/c86520461.lua b/official/c86520461.lua index 0a2620ddc1..f71c5af374 100644 --- a/official/c86520461.lua +++ b/official/c86520461.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -56,4 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c8653757.lua b/official/c8653757.lua index 9cff2a1f5b..3d22fcd8a1 100644 --- a/official/c8653757.lua +++ b/official/c8653757.lua @@ -27,7 +27,7 @@ end s.listed_names={CARD_GALAXYEYES_P_DRAGON} s.listed_series={SET_PHOTON,SET_GALAXY} function s.filter(c,ft,tp) - return (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and c:IsSpellTrap() and c:IsType(TYPE_CONTINUOUS) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsContinuousSpellTrap() and (c:IsAbleToHand() or (ft>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp))) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c86541496.lua b/official/c86541496.lua index 3f46f98d2d..2621114541 100644 --- a/official/c86541496.lua +++ b/official/c86541496.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) end) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(rp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler()) @@ -32,7 +32,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SSET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c86547356.lua b/official/c86547356.lua index d59e0ff656..50217e80aa 100644 --- a/official/c86547356.lua +++ b/official/c86547356.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c86553594.lua b/official/c86553594.lua index 12d3beddf3..5fa4ec1229 100644 --- a/official/c86553594.lua +++ b/official/c86553594.lua @@ -1,4 +1,4 @@ --- +--ティスティナの変晶 --Discordance of the Tistina --Scripted by Hatter local s,id=GetID() @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c86555018.lua b/official/c86555018.lua index ee46d4ee23..41bfd83029 100644 --- a/official/c86555018.lua +++ b/official/c86555018.lua @@ -1,6 +1,5 @@ --ストーンヘンジ・メソッド --Stonehenge Methods - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Chronomaly" monster from deck @@ -14,17 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x70} - +s.listed_series={SET_CHRONOMALY} function s.cfilter(c,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) - and c:IsSetCard(0x70) and c:IsMonster() + and c:IsSetCard(SET_CHRONOMALY) and c:IsMonster() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x70) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsLevelBelow(4) and c:IsSetCard(SET_CHRONOMALY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -43,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() diff --git a/official/c86559484.lua b/official/c86559484.lua index 536fabc272..6b22fb0a80 100644 --- a/official/c86559484.lua +++ b/official/c86559484.lua @@ -1,4 +1,5 @@ --X-レイ・ピアース +--Xyz-Raypierce local s,id=GetID() function s.initial_effect(c) --special summon @@ -35,8 +36,8 @@ function s.atchk1(c,sg) return c:IsRace(RACE_DRAGON) and sg:FilterCount(Card.IsRace,c,RACE_WYRM)==1 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg1=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_DRAGON) - local rg2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,RACE_WYRM) + local rg1=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,RACE_DRAGON) + local rg2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,RACE_WYRM) local rg=rg1:Clone() rg:Merge(rg2) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg1>0 and #rg2>0 @@ -48,13 +49,13 @@ function s.spfilter(c,e,tp) return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -71,4 +72,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86578200.lua b/official/c86578200.lua index 124679c95b..6bec453f8e 100644 --- a/official/c86578200.lua +++ b/official/c86578200.lua @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86585274.lua b/official/c86585274.lua index c7050ec858..656e43ee0d 100644 --- a/official/c86585274.lua +++ b/official/c86585274.lua @@ -1,4 +1,5 @@ --魔導法士 ジュノン +--High Priestess of Prophecy local s,id=GetID() function s.initial_effect(c) --special summon @@ -24,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cffilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and not c:IsPublic() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and not c:IsPublic() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_HAND,0,3,nil) end @@ -46,12 +47,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.cfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToRemoveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -66,4 +67,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8660395.lua b/official/c8660395.lua index 522a69164c..fb1b0ac998 100644 --- a/official/c8660395.lua +++ b/official/c8660395.lua @@ -1,5 +1,5 @@ --結晶の女神ニンアルル ---Magistus Goddess Ninaruru +--Ninaruru, the Magistus Glass Goddess --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.thcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -37,11 +37,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x152} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_MAGISTUS} function s.thfilter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(4) and c:IsAbleToHand() end @@ -54,22 +50,21 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget() end -s.desfilter=aux.FaceupFilter(Card.IsSetCard,0x152) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end - if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_SZONE,0,1,nil) - and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_MAGISTUS),tp,LOCATION_SZONE,0,1,nil) + and Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g1=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_SZONE,0,1,1,nil) + local g1=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_MAGISTUS),tp,LOCATION_SZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g2=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g2=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0) end @@ -79,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86605184.lua b/official/c86605184.lua index dc5eca3201..171323f511 100644 --- a/official/c86605184.lua +++ b/official/c86605184.lua @@ -1,7 +1,6 @@ --ファイアウォール・ガーディアン --Firewall Guardian --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -23,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -45,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -68,7 +67,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Unaffected by other card effects local e2=Effect.CreateEffect(e:GetHandler()) @@ -78,7 +77,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetValue(s.efilter) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c86607583.lua b/official/c86607583.lua index ccc0d0d870..990a2490ae 100644 --- a/official/c86607583.lua +++ b/official/c86607583.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetOperation(s.rcop) c:RegisterEffect(e3) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local c=e:GetHandler() @@ -55,7 +55,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e:GetOwner():CancelToGrave(false) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x101) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsSetCard(SET_CODE_TALKER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end function s.cfilter(c) return c:IsRace(RACE_CYBERSE) and c:IsLinkMonster() @@ -87,7 +87,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -104,7 +104,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.rccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rcop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -115,4 +115,4 @@ function s.rcop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c86613346.lua b/official/c86613346.lua index 76d4c4263c..02f77b92c4 100644 --- a/official/c86613346.lua +++ b/official/c86613346.lua @@ -1,78 +1,65 @@ --ホーリーナイツ・フラムエル ---Holy Night Flamel +--Starry Knight Flamel --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) - --Send itself to GY; Special Summon from hand + --Special Summon 1 Level 7 LIGHT Dragon monster from your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) - e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_ATTACK_ANNOUNCE) - e1:SetRange(LOCATION_MZONE|LOCATION_HAND) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCondition(s.sscon) - e1:SetCost(s.sscost) - e1:SetTarget(s.sstg) - e1:SetOperation(s.ssop) + e1:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) + e1:SetCost(Cost.SelfToGrave) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Banish itself from GY; Recover 1 Level 7 LIGHT Dragon from GY or MZONE + --Return 1 Level 7 LIGHT Dragon monster you control or in your GY to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_QUICK_O) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetCountLimit(1,id) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCountLimit(1,id) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -function s.ldlv7filter(c) - return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsLevel(7) +function s.spfilter(c,e,tp) + return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end -function s.sscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetAttacker():IsControler(1-tp) -end -function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end -function s.ssfilter(c,e,tp) - return s.ldlv7filter(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) -end -function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.ssfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end -function s.ssop(e,tp,eg,ep,ev,re,r,rp) +function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.ssfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end --- Check for Level 7 LIGHT Dragon, making sure that its face-up if on MZONE function s.thfilter(c) - return s.ldlv7filter(c) and c:IsAbleToHand() and - ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE)) + return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand() and c:IsFaceup() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local tg=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,1,0,0) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) and tc:IsMonster() then Duel.SendtoHand(tc,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,tc) end -end \ No newline at end of file +end diff --git a/official/c8662794.lua b/official/c8662794.lua index f5e3a1da88..7b94b4dd86 100644 --- a/official/c8662794.lua +++ b/official/c8662794.lua @@ -36,13 +36,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x13c} +s.listed_series={SET_CODEBREAKER} function s.atktg(e,c) local lg=c:GetLinkedGroup() - return not c:IsSetCard(0x13c) and lg and lg:IsContains(e:GetHandler()) + return not c:IsSetCard(SET_CODEBREAKER) and lg and lg:IsContains(e:GetHandler()) end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousSetCard(0x13c) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousSetCard(SET_CODEBREAKER) and c:GetPreviousTypeOnField()&(TYPE_MONSTER+TYPE_LINK)==(TYPE_MONSTER+TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end @@ -75,5 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c86643777.lua b/official/c86643777.lua index 0f9381731d..8e0d05c1ed 100644 --- a/official/c86643777.lua +++ b/official/c86643777.lua @@ -1,4 +1,5 @@ --光虫基盤 +--Bug Matrix local s,id=GetID() function s.initial_effect(c) --Activate @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,g) end end -end +end \ No newline at end of file diff --git a/official/c86676862.lua b/official/c86676862.lua index 7020e24786..bb8344b4cc 100644 --- a/official/c86676862.lua +++ b/official/c86676862.lua @@ -43,7 +43,7 @@ function s.initial_effect(c) e4:SetValue(s.atklimit) c:RegisterEffect(e4) end -s.material_setcode={0x8,0x6008} +s.material_setcode={SET_HERO,SET_EVIL_HERO} s.dark_calling=true s.listed_names={CARD_DARK_FUSION,58554959} function s.lizcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c86690572.lua b/official/c86690572.lua index 93c7e4536a..d68419bc27 100644 --- a/official/c86690572.lua +++ b/official/c86690572.lua @@ -1,4 +1,5 @@ --炎渦の胎動 +--Burgeoning Whirlflame local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_LAVAL) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -52,9 +53,9 @@ function s.thfilter(c) return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,2,2,nil) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,2,2,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -67,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c86742443.lua b/official/c86742443.lua index 4eaae6812e..13a9f70cc6 100644 --- a/official/c86742443.lua +++ b/official/c86742443.lua @@ -1,4 +1,5 @@ --王宮の重税 +--Royal Writ of Taxation local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()~=tp + return Duel.IsPhase(PHASE_STANDBY) and Duel.GetTurnPlayer()~=tp end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end @@ -31,7 +32,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.damcon) e1:SetOperation(s.damop) e1:SetLabel(0) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -39,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetOperation(s.damop2) e2:SetLabelObject(e1) e2:SetLabel(code) - e2:SetReset(RESET_PHASE+PHASE_END,2) + e2:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -48,11 +49,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetOperation(s.damop3) e3:SetLabelObject(e1) e3:SetLabel(code) - e3:SetReset(RESET_PHASE+PHASE_END,2) + e3:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e3,tp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetLabel()==0 + return Duel.IsTurnPlayer(tp) and e:GetLabel()==0 end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) @@ -68,4 +69,4 @@ function s.damop3(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,1000,REASON_EFFECT) e:GetLabelObject():SetLabel(1) end -end +end \ No newline at end of file diff --git a/official/c86750474.lua b/official/c86750474.lua index 2ef374086e..6180f602eb 100644 --- a/official/c86750474.lua +++ b/official/c86750474.lua @@ -1,5 +1,5 @@ --トリックスター・フォクシーウィッチ ---Trickstar Foxy Witch +--Trickstar Foxglove Witch local s,id=GetID() function s.initial_effect(c) --link summon @@ -29,7 +29,7 @@ function s.initial_effect(c) e2:SetOperation(s.damop2) c:RegisterEffect(e2) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 end Duel.SetTargetPlayer(1-tp) @@ -42,10 +42,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&REASON_EFFECT+REASON_BATTLE)~=0 and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return (r&REASON_EFFECT+REASON_BATTLE)~=0 and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.damfilter(c,e,tp) - return c:IsSetCard(0xfb) and c:IsLinkBelow(2) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TRICKSTAR) and c:IsLinkBelow(2) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end diff --git a/official/c86758746.lua b/official/c86758746.lua index 29e47b77e7..3cafa649ce 100644 --- a/official/c86758746.lua +++ b/official/c86758746.lua @@ -1,44 +1,44 @@ --- アマゾネスの秘術 --- Amazoness Secret Technique --- Scripted by Hatter +--アマゾネスの秘術 +--Amazoness Secret Arts +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Fusion Summon 1 "Amazoness" monster - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x4)) + --Fusion Summon 1 "Amazoness" monster + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_AMAZONESS)) e1:SetDescription(aux.Stringid(id,0)) e1:SetCountLimit(1,id) c:RegisterEffect(e1) - -- Allow Fusion material from the Extra Deck + --Allow Fusion material from the Extra Deck local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.fexop) c:RegisterEffect(e2) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.fexop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - -- Extra Fusion Material + --Extra Fusion Material local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_FUSION_MATERIAL) e1:SetCountLimit(1) e1:SetTargetRange(LOCATION_EXTRA,0) - e1:SetTarget(function(e,c) return c:IsSetCard(0x4) and c:IsAbleToGrave() end) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_AMAZONESS) and c:IsAbleToGrave() end) e1:SetValue(s.matval) e1:SetLabelObject({s.extrafil_replacement}) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,2)) end function s.matval(e,c) - return c and c:IsSetCard(0x4) and c:IsControler(e:GetHandlerPlayer()) + return c and c:IsSetCard(SET_AMAZONESS) and c:IsControler(e:GetHandlerPlayer()) end function s.extrafil_repl_filter(c) - return c:IsMonster() and c:IsAbleToGrave() and c:IsSetCard(0x4) + return c:IsMonster() and c:IsAbleToGrave() and c:IsSetCard(SET_AMAZONESS) end function s.extrafil_replacement(e,tp,mg) local g=Duel.GetMatchingGroup(s.extrafil_repl_filter,tp,LOCATION_EXTRA,0,nil) diff --git a/official/c86758915.lua b/official/c86758915.lua index 1725b9a547..8ceb8d4c3a 100644 --- a/official/c86758915.lua +++ b/official/c86758915.lua @@ -1,5 +1,5 @@ --魔神儀の祝誕 ---Impcantation Celebration +--Impcantation Inception --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -15,22 +15,22 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} function s.matfil(c) - return c:IsSetCard(0x117) + return c:IsSetCard(SET_IMPCANTATION) end function s.spcfilter(c,tp) - return c:IsSetCard(0x117) and not c:IsCode(id) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_IMPCANTATION) and not c:IsCode(id) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x117) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -47,4 +47,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86778566.lua b/official/c86778566.lua index e86f7224f1..6b605aae35 100644 --- a/official/c86778566.lua +++ b/official/c86778566.lua @@ -1,4 +1,5 @@ --攻撃の無敵化 +--Impenetrable Attack local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -35,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -48,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/official/c86780027.lua b/official/c86780027.lua index 17a574f473..aa92cae160 100644 --- a/official/c86780027.lua +++ b/official/c86780027.lua @@ -1,4 +1,5 @@ --一族の結束 +--Solidarity local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c86784733.lua b/official/c86784733.lua index 48a6f8f7d9..71829fd659 100644 --- a/official/c86784733.lua +++ b/official/c86784733.lua @@ -52,7 +52,7 @@ end --Check for your monster in EMZ function s.repfilter(c,tp) return c:IsLocation(LOCATION_MZONE) and c:IsInExtraMZone(tp) - and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) + and c:IsReason(REASON_EFFECT|REASON_BATTLE) and not c:IsReason(REASON_REPLACE) end --Activation legality function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,5 +65,5 @@ function s.repval(e,c) end --Substutite destruction function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c86801871.lua b/official/c86801871.lua index c2937b36ce..64926f144e 100644 --- a/official/c86801871.lua +++ b/official/c86801871.lua @@ -44,4 +44,4 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86804246.lua b/official/c86804246.lua index 681a80d1f7..60911692f7 100644 --- a/official/c86804246.lua +++ b/official/c86804246.lua @@ -43,9 +43,9 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,87526784) - local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,23915499) - local rg3=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,50319138) + local rg1=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,87526784) + local rg2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,23915499) + local rg3=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,50319138) local rg=rg1:Clone() rg:Merge(rg2) rg:Merge(rg3) @@ -53,7 +53,7 @@ function s.spcon(e,c) and aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,87526784,23915499,50319138) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,87526784,23915499,50319138) local g=aux.SelectUnselectGroup(rg,e,tp,3,3,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -70,4 +70,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.adfilter(e,c) return c:IsPosition(POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c86805855.lua b/official/c86805855.lua index 45cb14da08..466a3c30ff 100644 --- a/official/c86805855.lua +++ b/official/c86805855.lua @@ -1,4 +1,5 @@ --闇魔界の竜騎士 ダークソード +--Dark Blade the Dragon Knight local s,id=GetID() function s.initial_effect(c) --fusion material @@ -23,14 +24,14 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,3,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,3,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86821010.lua b/official/c86821010.lua index 6e925f415f..15d53d3d5d 100644 --- a/official/c86821010.lua +++ b/official/c86821010.lua @@ -1,4 +1,5 @@ --パワー・ブレイク +--Power Break local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,10 +24,10 @@ function s.filter(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_SZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_SZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,3,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_SZONE|LOCATION_GRAVE,0,1,3,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500) end @@ -34,8 +35,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local g=Duel.GetOperatedGroup() - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86825114.lua b/official/c86825114.lua index 8d781b62e7..e4f1580a1a 100644 --- a/official/c86825114.lua +++ b/official/c86825114.lua @@ -1,6 +1,5 @@ --トリックスター・ヒヨス --Trickstar Nightshade - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -16,11 +15,10 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xfb} - +s.listed_series={SET_TRICKSTAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0xfb) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK and c:GetReasonCard():IsSetCard(SET_TRICKSTAR) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -37,7 +35,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c86825483.lua b/official/c86825483.lua index 5d3ea72f49..0846f30496 100644 --- a/official/c86825483.lua +++ b/official/c86825483.lua @@ -1,4 +1,5 @@ --神星なる領域 +--Constellar Belt local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -16,5 +17,5 @@ end function s.efilter(e,ct) local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) local tc=te:GetHandler() - return te:IsActiveType(TYPE_MONSTER) and tc:IsAttribute(ATTRIBUTE_LIGHT) -end + return te:IsMonsterEffect() and tc:IsAttribute(ATTRIBUTE_LIGHT) +end \ No newline at end of file diff --git a/official/c86827882.lua b/official/c86827882.lua index 514feff41e..bcba8e5b6d 100644 --- a/official/c86827882.lua +++ b/official/c86827882.lua @@ -1,6 +1,5 @@ --極星宝メギンギョルズ --Nordic Relic Megingjord - local s,id=GetID() function s.initial_effect(c) --Targeted "Aesir" or "Nordic" monster has its ATK/DEF doubled, but cannot attack directly @@ -10,23 +9,19 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x42,0x4b} - -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_NORDIC,SET_AESIR} function s.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b)) + return c:IsFaceup() and c:IsSetCard({SET_NORDIC,SET_AESIR}) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end local exc=nil - if Duel.GetCurrentPhase()==PHASE_DAMAGE and Duel.GetAttackTarget()==nil then exc=Duel.GetAttacker() end + if Duel.IsPhase(PHASE_DAMAGE) and Duel.GetAttackTarget()==nil then exc=Duel.GetAttacker() end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,exc) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,exc) @@ -38,13 +33,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetBaseAttack()*2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(tc:GetBaseDefense()*2) tc:RegisterEffect(e2) --Cannot attack directly this turn @@ -53,7 +48,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end \ No newline at end of file diff --git a/official/c86840720.lua b/official/c86840720.lua index 323e918cfa..ae1c375052 100644 --- a/official/c86840720.lua +++ b/official/c86840720.lua @@ -10,18 +10,14 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_TO_GRAVE) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x35} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_FABLED} function s.filter(c,e,tp) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsPreviousLocation(LOCATION_HAND) and c:IsControler(tp) + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsPreviousLocation(LOCATION_HAND) and c:IsControler(tp) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -39,4 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c86848580.lua b/official/c86848580.lua index 93a01d92c0..35dab939df 100644 --- a/official/c86848580.lua +++ b/official/c86848580.lua @@ -1,4 +1,5 @@ --零鳥獣シルフィーネ +--Ice Beast Zerofyne local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,15 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.discost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end end @@ -32,18 +29,18 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,2) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) + e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,2) tc:RegisterEffect(e3) end end @@ -54,7 +51,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY,2) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c86852702.lua b/official/c86852702.lua index b6aa2c3b1a..eb735dec46 100644 --- a/official/c86852702.lua +++ b/official/c86852702.lua @@ -1,5 +1,5 @@ --機甲部隊の再編制 ---Machina Reformation +--Machina Redeployment --Scripted by Eerie code local s,id=GetID() function s.initial_effect(c) @@ -23,23 +23,23 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x36} +s.listed_series={SET_MACHINA} function s.cfilter1(c) return c:IsDiscardable() end function s.cfilter2(c) - return s.cfilter1(c) and c:IsSetCard(0x36) + return s.cfilter1(c) and c:IsSetCard(SET_MACHINA) end function s.filter1(c) - return c:IsSetCard(0x36) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_MACHINA) and c:IsMonster() and c:IsAbleToHand() end function s.filter2(c) - return c:IsSetCard(0x36) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MACHINA) and not c:IsCode(id) and c:IsAbleToHand() end function s.cost(cfil) return function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cfil,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,cfil,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,cfil,1,1,REASON_COST|REASON_DISCARD) end end function s.target(fil) @@ -58,4 +58,4 @@ function s.activate(fil) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c86868952.lua b/official/c86868952.lua index fc2d4c305e..6bab170012 100644 --- a/official/c86868952.lua +++ b/official/c86868952.lua @@ -1,6 +1,5 @@ --武神器-ヤツカ --Bujingi Swallow - local s,id=GetID() function s.initial_effect(c) --Targeted "Bujin" monster can make a second attack @@ -10,22 +9,17 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} - +s.listed_series={SET_BUJIN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -39,7 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(g:GetFirst():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -54,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c86871614.lua b/official/c86871614.lua index e4b0d17751..20d4b34897 100644 --- a/official/c86871614.lua +++ b/official/c86871614.lua @@ -35,13 +35,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,ec:GetBaseAttack(),ec:GetBaseDefense(), ec:GetOriginalLevel(),ec:GetOriginalRace(),ec:GetOriginalAttribute()) then return end - ec:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE,0,0) + ec:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE,0,0) local token=Duel.CreateToken(tp,id+1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(ec:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -66,7 +66,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) de:SetCode(EVENT_TO_GRAVE) de:SetCondition(s.descon) de:SetOperation(s.desop) - de:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + de:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(de) end function s.dfilter(c) @@ -77,4 +77,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8687195.lua b/official/c8687195.lua index 7256a7eec8..2b504ea688 100644 --- a/official/c8687195.lua +++ b/official/c8687195.lua @@ -28,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and a:CanAttack() and not a:IsImmuneToEffect(e) then Duel.CalculateDamage(a,tc) end -end +end \ No newline at end of file diff --git a/official/c86885905.lua b/official/c86885905.lua index c2c3c3da69..7b95ff4538 100644 --- a/official/c86885905.lua +++ b/official/c86885905.lua @@ -1,5 +1,5 @@ --オルターガイスト・エミュレルフ ---Altergeist Emulelf +--Altergeist Emulatelf local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,17 +11,17 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x103,0x21,1400,1800,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ALTERGEIST,TYPE_MONSTER|TYPE_EFFECT,1400,1800,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x103,0x21,1400,1800,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ALTERGEIST,TYPE_MONSTER|TYPE_EFFECT,1400,1800,4,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_TRAP+TYPE_EFFECT) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -34,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_ONFIELD,0) e1:SetTarget(s.etarget) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -43,11 +43,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTarget(s.etarget) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end function s.etarget(e,c) - return c:IsSetCard(0x103) and c:IsTrap() and c~=e:GetHandler() -end - + return c:IsSetCard(SET_ALTERGEIST) and c:IsTrap() and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c86889202.lua b/official/c86889202.lua index 05247465f1..a55f158310 100644 --- a/official/c86889202.lua +++ b/official/c86889202.lua @@ -21,10 +21,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetFlagEffect(id)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN2 + return e:GetHandler():GetFlagEffect(id)~=0 and Duel.IsPhase(PHASE_MAIN2) end function s.cfilter(c) return c:IsSpell() and c:IsAbleToGraveAsCost() @@ -37,18 +37,18 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable() + return c:IsContinuousSpell() and c:IsSSetable() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -61,4 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g:GetFirst()) end -end +end \ No newline at end of file diff --git a/official/c86915847.lua b/official/c86915847.lua index 536de6184d..d5470395ef 100644 --- a/official/c86915847.lua +++ b/official/c86915847.lua @@ -1,4 +1,5 @@ --アーマード・ビー +--Armored Bee local s,id=GetID() function s.initial_effect(c) --atk down @@ -25,8 +26,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c8692301.lua b/official/c8692301.lua index 393e8c9fd1..5eaea2500f 100644 --- a/official/c8692301.lua +++ b/official/c8692301.lua @@ -1,8 +1,9 @@ --ジェムナイト・ジルコニア +--Gem-Knight Zirconia local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),aux.FilterBoolFunctionEx(Card.IsRace,RACE_ROCK)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),aux.FilterBoolFunctionEx(Card.IsRace,RACE_ROCK)) end -s.material_setcode={0x47,0x1047} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} \ No newline at end of file diff --git a/official/c86926989.lua b/official/c86926989.lua index 7416a06d28..09adeafe9e 100644 --- a/official/c86926989.lua +++ b/official/c86926989.lua @@ -1,5 +1,5 @@ --麗神-不知火 ---Shiranui Splendidsaga +--Shiranui Skillsaga Supremacy --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -40,13 +40,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,e,tp,zone) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local zone=e:GetHandler():GetLinkedZone(tp)&0x1f + local zone=e:GetHandler():GetLinkedZone(tp)&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp,zone) end @@ -57,8 +57,8 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - local zone=c:GetLinkedZone(tp)&0x1f + local zone=c:GetLinkedZone(tp)&ZONES_MMZ if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) end -end +end \ No newline at end of file diff --git a/official/c86937530.lua b/official/c86937530.lua index 7963efe9ef..2dd5c3cd5a 100644 --- a/official/c86937530.lua +++ b/official/c86937530.lua @@ -50,7 +50,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=Duel.SelectTarget(tp,s.thfilter,tp,0,LOCATION_MZONE,1,1,nil) g:AddCard(e:GetHandler()) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,g,2,0,LOCATION_MZONE) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK|LOCATION_EXTRA) end function s.cfilter(c,code) return c:IsCode(code) and c:IsAbleToGraveAsCost() @@ -60,7 +60,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if Duel.IsChainDisablable(0) then - local g=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_DECK+LOCATION_EXTRA,nil,tc:GetCode()) + local g=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_DECK|LOCATION_EXTRA,nil,tc:GetCode()) if #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) local sg=g:Select(1-tp,1,1,nil) @@ -73,4 +73,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local rg=Group.FromCards(c,tc) Duel.SendtoHand(rg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86938484.lua b/official/c86938484.lua index 966047ac77..ef4a35c2fb 100644 --- a/official/c86938484.lua +++ b/official/c86938484.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) c:EnableReviveLimit() Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsType,TYPE_FLIP),2,2) --Fusion summon - local params = {aux.FilterBoolFunction(Card.IsSetCard,0x9d)} + local params = {aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL)} local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -27,16 +27,16 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.cfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x9d) and c:IsAbleToGraveAsCost() + return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(SET_SHADDOLL) and c:IsAbleToGraveAsCost() end function s.mzfilter(c) return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and #sg>=1 and (ft>0 or sg:IsExists(s.mzfilter,1,nil)) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) @@ -45,7 +45,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) local g=nil if ft<=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c86943389.lua b/official/c86943389.lua index 84f3900b15..6beb7f0d85 100644 --- a/official/c86943389.lua +++ b/official/c86943389.lua @@ -1,4 +1,5 @@ --HSR快刀乱破ズール +--Hi-Speedroid Puzzle local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -33,7 +34,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} s.listed_names={id} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -47,7 +48,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end @@ -57,13 +58,13 @@ function s.regcon(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end function s.thfilter(c) - return c:IsSetCard(0x2016) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -77,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86952477.lua b/official/c86952477.lua index 5a42405618..c9fe5cfe63 100644 --- a/official/c86952477.lua +++ b/official/c86952477.lua @@ -1,4 +1,5 @@ --シャインナイト +--Shine Knight local s,id=GetID() function s.initial_effect(c) --lvchange @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.lvcon(e) return e:GetHandler():IsDefensePos() -end +end \ No newline at end of file diff --git a/official/c86962245.lua b/official/c86962245.lua index 6c53c268bb..b47b3a0bac 100644 --- a/official/c86962245.lua +++ b/official/c86962245.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,22 +30,18 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.cfilter(c) - return c:IsMonster() and c:IsSetCard(0x119) + return c:IsMonster() and c:IsSetCard(SET_SALAMANGREAT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,3,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:GetSequence()<5 end function s.tdfilter(c) - return c:IsMonster() and c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsAbleToExtra() + return c:IsMonster() and c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsAbleToExtra() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -64,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local lc=g:GetFirst() if lc==sc then lc=g:GetNext() end - if lc and lc:IsRelateToEffect(e) and Duel.SendtoDeck(lc,nil,2,REASON_EFFECT)>0 and sc and sc:IsRelateToEffect(e) then + if lc and lc:IsRelateToEffect(e) and Duel.SendtoDeck(lc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc and sc:IsRelateToEffect(e) then Duel.Destroy(sc,REASON_EFFECT) end end @@ -84,5 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c8696773.lua b/official/c8696773.lua index d7a4be6c67..7d9e68ea11 100644 --- a/official/c8696773.lua +++ b/official/c8696773.lua @@ -1,4 +1,5 @@ --陽炎獣 ヒュドラー +--Hazy Flame Hydra local s,id=GetID() function s.initial_effect(c) --cannot be target @@ -43,22 +44,22 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.matcon) e1:SetTarget(s.mattg) e1:SetOperation(s.matop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.matcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.matfilter(c) - return c:IsSetCard(0x107d) and c:IsMonster() + return c:IsSetCard(SET_HAZY_FLAME) and c:IsMonster() end function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.matfilter(chkc) end @@ -73,4 +74,4 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then Duel.Overlay(c,tc) end -end +end \ No newline at end of file diff --git a/official/c86976918.lua b/official/c86976918.lua index 122da53918..5e1992165e 100644 --- a/official/c86976918.lua +++ b/official/c86976918.lua @@ -1,9 +1,9 @@ --- SRマジックハウンド --- Speedroid Magic Hound --- scripted by Hatter +--SRマジックハウンド +--Speedroid Ultra Hound +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- send to grave + --send to grave local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) - -- send to deck and special summon + --send to deck and special summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) @@ -21,14 +21,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.tgfilter(c) - return c:IsSetCard(0x2016) and c:IsAbleToGrave() + return c:IsSetCard(SET_SPEEDROID) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -42,10 +42,10 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.exfilter(c,lv,code,e,tp) - return c:IsSetCard(0x2016) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and not c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv) and not c:IsCode(code) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter(c,e,tp) - return c:HasLevel() and c:IsSetCard(0x2016) and c:IsAbleToDeck() + return c:HasLevel() and c:IsSetCard(SET_SPEEDROID) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetLevel(),c:GetCode(),e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) then return end - if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then + if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.exfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetLevel(),tc:GetCode(),e,tp) local sc=sg:GetFirst() @@ -69,13 +69,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c8698851.lua b/official/c8698851.lua index a6c5f31d3d..66bcc9d3ed 100644 --- a/official/c8698851.lua +++ b/official/c8698851.lua @@ -1,4 +1,5 @@ --D-カウンター +--D - Counter local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() - return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP) and tc:IsSetCard(0xc008) + return tc:IsControler(tp) and tc:IsPosition(POS_FACEUP) and tc:IsSetCard(SET_DESTINY_HERO) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:CanAttack() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c86988864.lua b/official/c86988864.lua index 84fbe9a217..7e7449817d 100644 --- a/official/c86988864.lua +++ b/official/c86988864.lua @@ -1,4 +1,5 @@ --みつこぶラクーダ +--3-Hump Lacooda local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -33,4 +34,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c86993168.lua b/official/c86993168.lua index 5627c3b9a7..37d83a067f 100644 --- a/official/c86993168.lua +++ b/official/c86993168.lua @@ -1,9 +1,9 @@ --- マッド・ハッカー --- Mad Hacker --- Scripted by Hatter +--マッド・ハッカー +--Mad Hacker +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Take control + --Take control local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_CONTROL) @@ -68,7 +68,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetControl(g,tp) then local c=e:GetHandler() local tc=g:GetFirst() - -- Cannot activate its effects + --Cannot activate its effects local e1=Effect.CreateEffect(c) e1:SetDescription(3302) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) @@ -76,7 +76,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CONTROL) tc:RegisterEffect(e1,true) - -- Cannot Special Summon non-Link monsters from Extra Deck + --Cannot Special Summon non-Link monsters from Extra Deck local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -86,7 +86,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) e2:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_LINK) end) e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CONTROL) tc:RegisterEffect(e2,true) - -- Lizard check + --Lizard check local e3=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return c:IsOriginalType(TYPE_LINK) end) e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_CONTROL) tc:RegisterEffect(e3,true) diff --git a/official/c86997073.lua b/official/c86997073.lua index b2812354cb..44b76f28be 100644 --- a/official/c86997073.lua +++ b/official/c86997073.lua @@ -1,4 +1,5 @@ --機動要塞フォルテシモ +--Fortissimo the Mobile Fortress local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,9 +18,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x6013} +s.listed_series={SET_MEKLORD_ARMY} function s.filter(c,e,sp) - return c:IsSetCard(0x6013) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) + return c:IsSetCard(SET_MEKLORD_ARMY) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c86999951.lua b/official/c86999951.lua index 1eb8e0435e..bcffe801d6 100644 --- a/official/c86999951.lua +++ b/official/c86999951.lua @@ -1,4 +1,4 @@ --- +--結晶神ティスティナ --Crystal God Tistina --Scripted by Hatter local s,id=GetID() diff --git a/official/c8700633.lua b/official/c8700633.lua index f2e921cd0a..e7e57e816e 100644 --- a/official/c8700633.lua +++ b/official/c8700633.lua @@ -1,15 +1,15 @@ --不屈の獣僕 ---Indomitable Beast Servant +--Undaunted Bumpkin Beast --Scripted by Hel local s,id=GetID() function s.initial_effect(c) - --special summon - local e1=Effect.CreateEffect(c) + --Special Summon this card from your hand or GY + local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_SPSUMMON) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_SPSUMMON) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) e1:SetTarget(s.target) @@ -34,7 +34,7 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c87008374.lua b/official/c87008374.lua index f937ec1611..0ce4418e7c 100644 --- a/official/c87008374.lua +++ b/official/c87008374.lua @@ -57,7 +57,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -74,4 +74,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87010442.lua b/official/c87010442.lua index 0b78a96376..7ea35b10aa 100644 --- a/official/c87010442.lua +++ b/official/c87010442.lua @@ -1,4 +1,5 @@ --レガシーハンター +--Legacy Hunter local s,id=GetID() function s.initial_effect(c) --todeck @@ -25,5 +26,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c87043568.lua b/official/c87043568.lua index a826039919..f1e18fcdd4 100644 --- a/official/c87043568.lua +++ b/official/c87043568.lua @@ -1,4 +1,5 @@ --アサルト・スピリッツ +--Assault Spirits local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.atkcon) e1:SetCost(s.atkcost) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -47,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetLabelObject(tc) c:RegisterEffect(e2) else @@ -80,8 +81,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) a:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c87046457.lua b/official/c87046457.lua index e77af28f4c..16458b2b5a 100644 --- a/official/c87046457.lua +++ b/official/c87046457.lua @@ -1,4 +1,5 @@ --オーバー・デッド・ライン +--Overdoom Line local s,id=GetID() function s.initial_effect(c) --Activate @@ -42,12 +43,12 @@ function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,2) c:RegisterEffect(e1) c:SetTurnCounter(0) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -70,13 +71,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local atkg=e:GetLabelObject() if c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE,0,1) atkg:Clear() end local g=eg:Filter(s.filter,nil,e,tp) local tc=g:GetFirst() for tc in aux.Next(g) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) atkg:AddCard(tc) end end @@ -85,4 +86,4 @@ function s.atkcon(e) end function s.atktg(e,c) return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c87047074.lua b/official/c87047074.lua index 88136f681e..1e6cfbc2c9 100644 --- a/official/c87047074.lua +++ b/official/c87047074.lua @@ -1,7 +1,8 @@ --甲虫装機の魔弓 ゼクトアロー +--Inzektor Crossbow - Zektarrow local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x56)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_INZEKTOR)) --Atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -17,7 +18,7 @@ function s.initial_effect(c) e4:SetOperation(s.chop) c:RegisterEffect(e4) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.chcon(e,tp,eg,ep,ev,re,r,rp) return re:GetHandler()==e:GetHandler():GetEquipTarget() end @@ -26,4 +27,4 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) end function s.chlimit(e,ep,tp) return ep==tp -end +end \ No newline at end of file diff --git a/official/c87047161.lua b/official/c87047161.lua index 5949ecf7e1..25a94c2781 100644 --- a/official/c87047161.lua +++ b/official/c87047161.lua @@ -1,4 +1,5 @@ --マーメイド・シャーク +--Mermaid Shark local s,id=GetID() function s.initial_effect(c) --tohand @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87052196.lua b/official/c87052196.lua index d269b21a3e..6243209007 100644 --- a/official/c87052196.lua +++ b/official/c87052196.lua @@ -1,5 +1,5 @@ --天威龍-アーダラ ---Tenyi Dragon - Ajna +--Tenyi Spirit - Ashuna --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -19,15 +19,15 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon2) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x12c} +s.listed_series={SET_TENYI} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_EFFECT),tp,LOCATION_MZONE,0,1,nil) end @@ -46,7 +46,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsNonEffectMonster),tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x12c) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TENYI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -61,12 +61,12 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end diff --git a/official/c87054946.lua b/official/c87054946.lua index ace351a398..9a22c76f6a 100644 --- a/official/c87054946.lua +++ b/official/c87054946.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetValue(s.atlimit) c:RegisterEffect(e2) end -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsType,1,nil,TYPE_RITUAL,lc,sumtype,tp) end @@ -32,9 +32,9 @@ function s.matcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end if ct>=2 then local e2=Effect.CreateEffect(c) @@ -43,15 +43,15 @@ function s.matcheck(e,c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_MZONE) e2:SetValue(1200) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e3) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) end if ct==3 then local e4=Effect.CreateEffect(c) @@ -60,7 +60,7 @@ function s.matcheck(e,c) e4:SetCode(EFFECT_UPDATE_ATTACK) e4:SetRange(LOCATION_MZONE) e4:SetValue(1200) - e4:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) @@ -68,14 +68,14 @@ function s.matcheck(e,c) e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e5:SetRange(LOCATION_MZONE) e5:SetValue(1) - e5:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e5) - c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) + c:RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) end end function s.atcon(e) return e:GetHandler():GetSequence()>4 end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x11f) and c:GetSequence()<5 -end + return c:IsFaceup() and c:IsSetCard(SET_NEPHTHYS) and c:GetSequence()<5 +end \ No newline at end of file diff --git a/official/c8706701.lua b/official/c8706701.lua index ebeb498ba5..8b1995c6cb 100644 --- a/official/c8706701.lua +++ b/official/c8706701.lua @@ -1,4 +1,5 @@ --レッド・ミラー +--Red Mirror local s,id=GetID() function s.initial_effect(c) --to hand @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,10 +31,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():GetControler()~=tp end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsCode(id) and c:IsAbleToHand() end @@ -51,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsSummonPlayer(tp) + return c:IsSynchroSummoned() and c:IsSummonPlayer(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) and aux.exccon(e) @@ -65,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87074380.lua b/official/c87074380.lua index da9e736db1..d9e245631e 100644 --- a/official/c87074380.lua +++ b/official/c87074380.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) --destroy local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY) - e2:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START) + e2:SetHintTiming(TIMINGS_CHECK_MONSTER|TIMING_BATTLE_START) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) @@ -64,7 +64,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and (c:GetPreviousAttributeOnField()&ATTRIBUTE_EARTH)==ATTRIBUTE_EARTH and (c:GetPreviousRaceOnField()&RACE_MACHINE)==RACE_MACHINE and not c:IsCode(id) @@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87091930.lua b/official/c87091930.lua index f1e0611470..bd7093e69c 100644 --- a/official/c87091930.lua +++ b/official/c87091930.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) end s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR,SET_RANK_UP_MAGIC} function s.cfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsSummonPlayer(tp) and c:GetMaterial():IsExists(s.spcfilter,1,nil) + return c:IsXyzSummoned() and c:IsSummonPlayer(tp) and c:GetMaterial():IsExists(s.spcfilter,1,nil) end function s.spcfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ) @@ -72,4 +72,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c87102774.lua b/official/c87102774.lua index 266a7ffc6b..7243cc2c5e 100644 --- a/official/c87102774.lua +++ b/official/c87102774.lua @@ -1,4 +1,5 @@ --黄金の天道虫 +--Golden Ladybug local s,id=GetID() function s.initial_effect(c) --recover @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCategory(CATEGORY_RECOVER) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1) e1:SetCondition(s.reccon) @@ -17,14 +18,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.reccost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -36,4 +37,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87106146.lua b/official/c87106146.lua index 50fc57ddc9..36ba4c633c 100644 --- a/official/c87106146.lua +++ b/official/c87106146.lua @@ -1,4 +1,5 @@ --ダメージ・ゲート +--Damage Gate local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87112784.lua b/official/c87112784.lua index f1913d0577..29f7391578 100644 --- a/official/c87112784.lua +++ b/official/c87112784.lua @@ -1,4 +1,5 @@ --堕天使の追放 +--Banishment of the Darklords local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,10 +12,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xef) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_DARKLORD) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87116749.lua b/official/c87116749.lua index 4c803ea801..946be27ac6 100644 --- a/official/c87116749.lua +++ b/official/c87116749.lua @@ -1,9 +1,9 @@ --- 游覧艇サブマリード --- Submaleed the Sightseeing Ship --- Scripted by Hatter +--游覧艇サブマリード +--Submareed Tour Ride +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Battle protection + --Battle protection local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) @@ -43,4 +43,4 @@ end function s.indtg(e,c) local bt=c:GetBattleTarget() return c:IsType(TYPE_NORMAL) and bt and bt:IsType(TYPE_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87116928.lua b/official/c87116928.lua index 19bdcf74b7..9b76e405a3 100644 --- a/official/c87116928.lua +++ b/official/c87116928.lua @@ -1,9 +1,10 @@ --キメラテック・メガフリート・ドラゴン +--Chimeratech Megafleet Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixRep(c,true,true,s.matfilter,1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1093)) + Fusion.AddProcMixRep(c,true,true,s.matfilter,1,99,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_CYBER_DRAGON)) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) --cannot be fusion material local e1=Effect.CreateEffect(c) @@ -13,8 +14,8 @@ function s.initial_effect(c) e1:SetValue(1) c:RegisterEffect(e1) end -s.listed_series={0x1093} -s.material_setcode={0x93,0x1093} +s.listed_series={SET_CYBER_DRAGON} +s.material_setcode={SET_CYBER,SET_CYBER_DRAGON} function s.matfilter(c,fc,sumtype,tp) return c:GetSequence()>4 and c:IsLocation(LOCATION_MZONE) and (c:IsControler(tp) or c:IsFaceup()) end @@ -28,12 +29,12 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) end function s.contactop(g,tp,c) - Duel.SendtoGrave(g,REASON_COST+REASON_MATERIAL) + Duel.SendtoGrave(g,REASON_COST|REASON_MATERIAL) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e1:SetValue(#g*1200) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c87118301.lua b/official/c87118301.lua index 9924100e4e..0dda269b96 100644 --- a/official/c87118301.lua +++ b/official/c87118301.lua @@ -1,4 +1,5 @@ --霊獣使い レラ +--Ritual Beast Tamer Lara local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.filter(c,e,tp) - return c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87148330.lua b/official/c87148330.lua index a3919941f1..e3a2d8a1d4 100644 --- a/official/c87148330.lua +++ b/official/c87148330.lua @@ -1,4 +1,5 @@ --光神テテュス +--Tethys, Goddess of Light local s,id=GetID() function s.initial_effect(c) --draw @@ -39,4 +40,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsFacedown() or not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87170768.lua b/official/c87170768.lua index cfd07d991a..36cf7ec830 100644 --- a/official/c87170768.lua +++ b/official/c87170768.lua @@ -1,5 +1,5 @@ --Contacting "C" ---接触するG +--Contact "C" local s,id=GetID() function s.initial_effect(c) --spsummon @@ -39,5 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 then Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c87182127.lua b/official/c87182127.lua index 0e45f8261d..359e8f000f 100644 --- a/official/c87182127.lua +++ b/official/c87182127.lua @@ -1,9 +1,10 @@ --古代の機械魔神 +--Ancient Gear Howitzer local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x7),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ANCIENT_GEAR),2) --immune local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -35,8 +36,8 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x7} -s.material_setcode=0x7 +s.listed_series={SET_ANCIENT_GEAR} +s.material_setcode=SET_ANCIENT_GEAR function s.econ(e) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end @@ -57,7 +58,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) end function s.filter(c,e,tp) - return c:IsSetCard(0x7) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_ANCIENT_GEAR) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -71,4 +72,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87188910.lua b/official/c87188910.lua index 390b6e6e56..cefa38b0b8 100644 --- a/official/c87188910.lua +++ b/official/c87188910.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetCode(EVENT_FREE_CHAIN) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_MZONE) - e4:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E+TIMING_ATTACK) + e4:SetHintTiming(TIMING_ATTACK,TIMINGS_CHECK_MONSTER_E|TIMING_ATTACK) e4:SetCountLimit(1,{id,1}) e4:SetCost(s.descost) e4:SetTarget(s.destg) @@ -45,7 +45,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=(e:GetHandler():GetMaterialCount())-1 @@ -63,7 +63,7 @@ function s.adval(e,c) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -77,5 +77,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c8719957.lua b/official/c8719957.lua index 5281b7c512..0fd244fc60 100644 --- a/official/c8719957.lua +++ b/official/c8719957.lua @@ -1,7 +1,8 @@ --アビスケイル-クラーケン +--Abyss-scale of the Kraken local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x74)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_MERMAIL)) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -19,10 +20,10 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) + and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87209160.lua b/official/c87209160.lua index fa55cfb048..2d7f3ea14a 100644 --- a/official/c87209160.lua +++ b/official/c87209160.lua @@ -1,5 +1,5 @@ --鉄獣戦線 フラクトール ---Tribrigade Fractaur +--Tri-Brigade Fraktall --Scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) @@ -8,9 +8,9 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_TOGRAVE) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.tgcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -26,14 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.tgfilter(c) return c:IsMonster() and c:IsLevelBelow(3) and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsAbleToGrave() end -function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) @@ -54,7 +50,7 @@ function s.spfilter(c,e,tp,ct,g) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) local nums={} for i=1,#g do if Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,i,g) then @@ -81,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(s.matlimit) e1:SetTargetRange(LOCATION_ALL,LOCATION_ALL) e1:SetValue(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --client hint aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) diff --git a/official/c87210505.lua b/official/c87210505.lua index c36e1f1153..2a97fc6ce0 100644 --- a/official/c87210505.lua +++ b/official/c87210505.lua @@ -1,4 +1,5 @@ --騎士の称号 +--Knight's Title local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,15 +30,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c87240371.lua b/official/c87240371.lua index e6617da42f..bef115362c 100644 --- a/official/c87240371.lua +++ b/official/c87240371.lua @@ -1,4 +1,4 @@ --- +--騎甲虫隊降下作戦 --Beetrooper Descent --Scripted by Zefile local s,id=GetID() @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={64213018} +s.listed_names={64213018} --Beetrooper Token function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,0x172,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,SET_BEETROOPER,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) end @@ -26,10 +26,10 @@ function s.cfilter(c) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,0x172,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then return end + if not Duel.IsPlayerCanSpecialSummonMonster(tp,64213018,SET_BEETROOPER,TYPES_TOKEN,1000,1000,3,RACE_INSECT,ATTRIBUTE_EARTH) then return end local token=Duel.CreateToken(tp,64213018) if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)==0 then return end - local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) + local dg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) if #dg>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg,true) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87246309.lua b/official/c87246309.lua index 8dd08e8c0d..5bfe73682e 100644 --- a/official/c87246309.lua +++ b/official/c87246309.lua @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0xa9,0xc3,0xad} +s.listed_series={SET_FLUFFAL,SET_EDGE_IMP,SET_FRIGHTFUR} function s.thfilter(c) - return (c:IsSetCard(0xa9) or c:IsSetCard(0xc3)) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard({SET_FLUFFAL,SET_EDGE_IMP}) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -48,7 +48,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and c:GetReasonCard():IsOriginalSetCard(0xad) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_FUSION and c:GetReasonCard():IsOriginalSetCard(SET_FRIGHTFUR) end function s.tgfilter(c) return c:IsFaceup() and c:IsMonster() @@ -64,6 +64,6 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end end \ No newline at end of file diff --git a/official/c87255382.lua b/official/c87255382.lua index f2bca98b79..760783c6b6 100644 --- a/official/c87255382.lua +++ b/official/c87255382.lua @@ -1,4 +1,5 @@ --紋章獣アンフィスバエナ +--Heraldic Beast Amphisbaena local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,13 +23,13 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x76} +s.listed_series={SET_HERALDIC_BEAST} function s.cfilter(c) - return c:IsSetCard(0x76) and c:IsDiscardable() + return c:IsSetCard(SET_HERALDIC_BEAST) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,8 +47,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(800) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c87257460.lua b/official/c87257460.lua index 6089741879..cce2645829 100644 --- a/official/c87257460.lua +++ b/official/c87257460.lua @@ -28,11 +28,11 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) and e:GetHandler():GetEquipGroup():IsExists(Card.HasFlagEffect,1,nil,id) end) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e1) @@ -84,11 +84,6 @@ end function s.eqval(ec,c,tp) return ec:IsControler(1-tp) and ec:IsLevelBelow(3) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(23756165) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c87259077.lua b/official/c87259077.lua index 0760540525..30c5a821e7 100644 --- a/official/c87259077.lua +++ b/official/c87259077.lua @@ -1,4 +1,5 @@ --ライトニング・ウォリアー +--Lightning Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -21,7 +22,7 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) local t=Duel.GetAttackTarget() if ev==1 then t=Duel.GetAttacker() end if not c:IsRelateToBattle() or c:IsFacedown() then return false end - return t:GetLocation()==LOCATION_GRAVE and t:IsMonster() + return t:IsLocation(LOCATION_GRAVE) and t:IsMonster() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -31,4 +32,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*300,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87259933.lua b/official/c87259933.lua index cee0943937..d33ac8b5ca 100644 --- a/official/c87259933.lua +++ b/official/c87259933.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_QUICK_O) - e3:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e3:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e3:SetCode(EVENT_FREE_CHAIN) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_SZONE) @@ -35,16 +35,16 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.cfilter(c,tp) - return c:IsSetCard(0x1034) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,7 +65,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(c,REASON_COST) end function s.thfilter1(c,rc) - return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsAbleToHand() and Duel.IsExistingTarget(s.thfilter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,rc) end function s.thfilter2(c,rc) diff --git a/official/c87263576.lua b/official/c87263576.lua index 0658a81cbc..1c2419355e 100644 --- a/official/c87263576.lua +++ b/official/c87263576.lua @@ -1,9 +1,9 @@ --- アウトバースト・ドラゴン --- Outburst Dragon --- Scripted by Hatter +--アウトバースト・ドラゴン +--Outburst Dragon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon and destroy + --Special Summon and destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Link Summon during opponent's Main Phase + --Link Summon during opponent's Main Phase local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp)return Duel.IsTurnPlayer(1-tp)end) @@ -44,14 +44,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Destroy(g,REASON_EFFECT) end - -- Cannot Special Summon non-DARK monsters + --Cannot Special Summon non-DARK monsters local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetRange(LOCATION_MZONE) e1:SetAbsoluteRange(tp,1,0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetTarget(function(_,c)return not c:IsAttribute(ATTRIBUTE_DARK)end) c:RegisterEffect(e1) end @@ -72,4 +72,4 @@ function s.lkop(e,tp,eg,ep,ev,re,r,rp) local sc=g:Select(tp,1,1,nil):GetFirst() if sc then Duel.LinkSummon(tp,sc,c) end end -end +end \ No newline at end of file diff --git a/official/c8728498.lua b/official/c8728498.lua index a25c16ad8c..0ddb4c4054 100644 --- a/official/c8728498.lua +++ b/official/c8728498.lua @@ -1,12 +1,12 @@ --- 空牙団の懐剣 ドナ --- Dona, Dagger Fur Hire --- Scripted by Hatter +--空牙団の懐剣 ドナ +--Donner, Dagger Fur Hire +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 monsters with different Types + --2 monsters with different Types Link.AddProcedure(c,nil,2,2,s.lcheck) - -- Destroy 1 monster on each field + --Destroy 1 monster on each field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) - -- Special Summon 1 monster "Fur Hire" + --Special Summon 1 monster "Fur Hire" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -29,12 +29,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) end function s.desfilter(c,e,tp) - return c:IsCanBeEffectTarget(e) and (c:IsControler(1-tp) or (c:IsFaceup() and c:IsSetCard(0x114))) + return c:IsCanBeEffectTarget(e) and (c:IsControler(1-tp) or (c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE))) end function s.desrescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetControler)==2 @@ -55,10 +55,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcostfilter(c,e,tp) return Duel.GetMZoneCount(tp,c)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalCode()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c:GetOriginalCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x114) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsOriginalCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.spcostfilter,1,false,nil,nil,e,tp) end @@ -68,19 +68,19 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local code,type=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,code) + local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,code) if #g1>0 and Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)>0 and type&TYPE_LINK==TYPE_LINK and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,code) + and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,code) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,code) + local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,code) if #g2==0 then return end Duel.BreakEffect() Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) diff --git a/official/c87288189.lua b/official/c87288189.lua index 2bd6d10316..45da5e2bb2 100644 --- a/official/c87288189.lua +++ b/official/c87288189.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e4:SetLabelObject(e3) c:RegisterEffect(e4) end -local LOCATION_HAND_DECK_EXTRA_GRAVE=LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE +local LOCATION_HAND_DECK_EXTRA_GRAVE=LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA|LOCATION_GRAVE function s.otfilter(c) return (c:GetSummonType()&SUMMON_TYPE_TRIBUTE)==SUMMON_TYPE_TRIBUTE end @@ -42,7 +42,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,g:GetFirst():GetControler(),LOCATION_HAND_DECK_EXTRA_GRAVE) end function s.rmfilter(c,code) - return c:IsCode(code) and (c:IsLocation(0x43) or aux.SpElimFilter(c,true)) + return c:IsCode(code) and (c:IsLocation(LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA) or aux.SpElimFilter(c,true)) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) diff --git a/official/c87292536.lua b/official/c87292536.lua index 0ab0de5546..15f9d51a1d 100644 --- a/official/c87292536.lua +++ b/official/c87292536.lua @@ -1,4 +1,5 @@ --XX-セイバー レイジグラ +--XX-Saber Ragigura local s,id=GetID() function s.initial_effect(c) --salvage @@ -15,9 +16,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x100d} +s.listed_series={SET_X_SABER} function s.filter(c) - return c:IsSetCard(0x100d) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_X_SABER) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87294988.lua b/official/c87294988.lua index 555e5f41c2..ac82059826 100644 --- a/official/c87294988.lua +++ b/official/c87294988.lua @@ -43,4 +43,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8730435.lua b/official/c8730435.lua index dfe6f24db9..d86fe36c77 100644 --- a/official/c8730435.lua +++ b/official/c8730435.lua @@ -2,7 +2,7 @@ --Gladiator Beast's Battle Archfiend Shield local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x19)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_GLADIATOR)) --Destroy instead local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.retcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local ec=c:GetPreviousEquipTarget() diff --git a/official/c87313164.lua b/official/c87313164.lua index bda2abf462..6b0a79edd2 100644 --- a/official/c87313164.lua +++ b/official/c87313164.lua @@ -1,4 +1,5 @@ --ギョッ! +--Oh F!sh! local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsAbleToDeckAsCost() + return c:IsFaceup() and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_REMOVED,0,1,nil) end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87319876.lua b/official/c87319876.lua index f447c07d0b..8b9fdee842 100644 --- a/official/c87319876.lua +++ b/official/c87319876.lua @@ -1,4 +1,5 @@ --トラスト・ガーディアン +--Trust Guardian local s,id=GetID() function s.initial_effect(c) --synchro @@ -32,7 +33,7 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -40,12 +41,12 @@ function s.cop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetCondition(s.adcon) e2:SetOperation(s.adop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2) end function s.valcon(e,re,r,rp) if r&REASON_BATTLE~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) return true else return false end end @@ -58,9 +59,9 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c87321742.lua b/official/c87321742.lua index 0392d507f6..2aa5f1f175 100644 --- a/official/c87321742.lua +++ b/official/c87321742.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_DARK),tp,LOCATION_MZONE,0,1,nil) end @@ -48,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -56,7 +56,7 @@ function s.splimit(e,c) return not c:IsAttribute(ATTRIBUTE_DARK) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xba) and c:HasLevel() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:HasLevel() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.xyzdarkfilter(c) return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) @@ -81,12 +81,12 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c87327776.lua b/official/c87327776.lua index 6ef7e06c09..1ecd971db6 100644 --- a/official/c87327776.lua +++ b/official/c87327776.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsLocation(LOCATION_GRAVE) and r&REASON_LINK>0 + return c:IsXyzSummoned() and c:IsLocation(LOCATION_GRAVE) and r&REASON_LINK>0 and c:GetReasonCard():IsSetCard(SET_SALAMANGREAT) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c87340664.lua b/official/c87340664.lua index 97aba99ca2..6c66ada9c5 100644 --- a/official/c87340664.lua +++ b/official/c87340664.lua @@ -1,4 +1,5 @@ --原子ホタル +--Atomic Firefly local s,id=GetID() function s.initial_effect(c) --damage @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87347365.lua b/official/c87347365.lua index 36cf5f825f..867c3af658 100644 --- a/official/c87347365.lua +++ b/official/c87347365.lua @@ -1,4 +1,5 @@ --リバイバルゴーレム +--Revival Golem local s,id=GetID() function s.initial_effect(c) --special summon @@ -51,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,c) end end -end +end \ No newline at end of file diff --git a/official/c87350908.lua b/official/c87350908.lua index 3834caaf95..f9608fdd94 100644 --- a/official/c87350908.lua +++ b/official/c87350908.lua @@ -1,4 +1,5 @@ --マスクド・チョッパー +--Masked Chopper local s,id=GetID() function s.initial_effect(c) --damage @@ -20,4 +21,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8736823.lua b/official/c8736823.lua index 45289b1f0b..be834f1179 100644 --- a/official/c8736823.lua +++ b/official/c8736823.lua @@ -1,7 +1,6 @@ --電脳堺姫-娘々 --Virtual World Hime - Nyannyan --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -59,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_ADD_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_TUNER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -67,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) end @@ -80,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end --Restricted to level/rank 3+ monsters diff --git a/official/c87390067.lua b/official/c87390067.lua index 31143a1622..96126c409b 100644 --- a/official/c87390067.lua +++ b/official/c87390067.lua @@ -1,4 +1,5 @@ --BF-蒼天のジェット +--Blackwing - Jetstream the Blue Sky local s,id=GetID() function s.initial_effect(c) --indes @@ -8,30 +9,26 @@ function s.initial_effect(c) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetRange(LOCATION_HAND) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfToGrave) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.condition(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if not d then return false end - return (a:GetControler()==tp and a:IsSetCard(0x33)) - or (d:GetControler()==tp and d:IsSetCard(0x33)) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return (a:IsControler(tp) and a:IsSetCard(SET_BLACKWING)) + or (d:IsControler(tp) and d:IsSetCard(SET_BLACKWING)) end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local a=Duel.GetAttacker() - if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end + if Duel.IsTurnPlayer(1-tp) then a=Duel.GetAttackTarget() end if not a:IsRelateToBattle() then return end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(1) a:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c87390798.lua b/official/c87390798.lua index 254876ac95..d0fe68d233 100644 --- a/official/c87390798.lua +++ b/official/c87390798.lua @@ -1,4 +1,5 @@ --魔界台本 「ファンタジー・マジック」 +--Abyss Script - Fantasy Magic local s,id=GetID() function s.initial_effect(c) --activate @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x10ec) + return c:IsFaceup() and c:IsSetCard(SET_ABYSS_ACTOR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -41,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabelObject(tc) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -56,7 +57,7 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter2(c) - return c:IsSetCard(0x10ec) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -74,6 +75,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87430304.lua b/official/c87430304.lua index 0432987bce..2bfafb60e0 100644 --- a/official/c87430304.lua +++ b/official/c87430304.lua @@ -1,4 +1,5 @@ --先史遺産モアイ +--Chronomaly Moai local s,id=GetID() function s.initial_effect(c) --special summon @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetCondition(s.hspcon) c:RegisterEffect(e1) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.hspcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x70),c:GetControler(),LOCATION_MZONE,0,1,nil) -end + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CHRONOMALY),c:GetControler(),LOCATION_MZONE,0,1,nil) +end \ No newline at end of file diff --git a/official/c87430998.lua b/official/c87430998.lua index 72033916f2..3fb61d75db 100644 --- a/official/c87430998.lua +++ b/official/c87430998.lua @@ -1,4 +1,5 @@ --森 +--Forest local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,11 +13,11 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_INSECT+RACE_BEAST+RACE_PLANT+RACE_BEASTWARRIOR)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_INSECT|RACE_BEAST|RACE_PLANT|RACE_BEASTWARRIOR)) e2:SetValue(200) c:RegisterEffect(e2) --Def local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c87460579.lua b/official/c87460579.lua index 6eafff734d..36d3db288a 100644 --- a/official/c87460579.lua +++ b/official/c87460579.lua @@ -1,5 +1,5 @@ --花札衛-五光- ---Flower Cardian Five Lights +--Flower Cardian Lightflare local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -38,7 +38,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end @@ -62,7 +62,7 @@ function s.discon2(e,tp,eg,ep,ev,re,r,rp) if not oc then return false end if oc:IsControler(tp) then tc,oc=oc,tc end e:SetLabelObject(oc) - return tc:IsSetCard(0xe6) and tc:IsControler(tp) and oc:IsControler(1-tp) + return tc:IsSetCard(SET_FLOWER_CARDIAN) and tc:IsControler(tp) and oc:IsControler(1-tp) end function s.disop2(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -70,21 +70,21 @@ function s.disop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) - and c:IsPreviousPosition(POS_FACEUP) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + and c:IsPreviousPosition(POS_FACEUP) and c:IsSynchroSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0xe6) and c:IsType(TYPE_SYNCHRO) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:IsType(TYPE_SYNCHRO) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -96,4 +96,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87462901.lua b/official/c87462901.lua index b868c4dbf2..40a1772169 100644 --- a/official/c87462901.lua +++ b/official/c87462901.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DISABLE) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) @@ -95,7 +95,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) --Reset the flags at the start of the opponent's next Battle Phase local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e5:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e5:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e5:SetCondition(function() return Duel.IsTurnPlayer(1-tp) end) e5:SetCountLimit(1) e5:SetOperation(s.reset) diff --git a/official/c87468732.lua b/official/c87468732.lua index 2f5f96fb51..48e3678124 100644 --- a/official/c87468732.lua +++ b/official/c87468732.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) diff --git a/official/c87473172.lua b/official/c87473172.lua index ce9feaa4a7..3031d118ae 100644 --- a/official/c87473172.lua +++ b/official/c87473172.lua @@ -1,4 +1,5 @@ --火炎鳥 +--Firebird local s,id=GetID() function s.initial_effect(c) --atkup @@ -30,8 +31,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c87475570.lua b/official/c87475570.lua index dab118c5f8..259f0560f2 100644 --- a/official/c87475570.lua +++ b/official/c87475570.lua @@ -1,4 +1,5 @@ --宝玉の先導者 +--Crystal Master local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -19,22 +20,18 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1034,0x2034,0x34} +s.listed_series={SET_CRYSTAL_BEAST,SET_ULTIMATE_CRYSTAL,SET_CRYSTAL} function s.tgtg(e,c) - return c:IsSetCard(0x1034) or (c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x2034)) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return c:IsSetCard(SET_CRYSTAL_BEAST) or (c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_ULTIMATE_CRYSTAL)) end function s.filter(c) - return (((c:IsSetCard(0x1034) or c:IsSetCard(0x2034)) and c:IsMonster()) - or (c:IsSetCard(0x34) and c:IsSpellTrap())) and c:IsAbleToHand() + return (((c:IsSetCard(SET_CRYSTAL_BEAST) or c:IsSetCard(SET_ULTIMATE_CRYSTAL)) and c:IsMonster()) + or (c:IsSetCard(SET_CRYSTAL) and c:IsSpellTrap())) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -47,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87481592.lua b/official/c87481592.lua index 7867d3140c..3b2c48f5c5 100644 --- a/official/c87481592.lua +++ b/official/c87481592.lua @@ -1,5 +1,5 @@ --教導神理 ---Dogmatikatism +--Dogmatikacism --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -23,15 +23,15 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x146} +s.listed_series={SET_DOGMATIKA} function s.value(e,c) local ec=e:GetHandler():GetEquipTarget() - if ec:IsSetCard(0x146) then + if ec:IsSetCard(SET_DOGMATIKA) then if c:HasLevel() then return 100*ec:GetLevel() end else - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x146),e:GetHandler():GetControler(),LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DOGMATIKA),e:GetHandler():GetControler(),LOCATION_MZONE,0,nil) return -200*ct end end diff --git a/official/c87483942.lua b/official/c87483942.lua index 280de08e16..b1c7a9162b 100644 --- a/official/c87483942.lua +++ b/official/c87483942.lua @@ -1,4 +1,5 @@ --渋い忍者 +--Senior Silver Ninja local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,1,id) @@ -13,23 +14,23 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} s.listed_names={id} function s.filter(c,e,tp) - return c:IsSetCard(0x2b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_NINJA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,ft,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87497553.lua b/official/c87497553.lua index 061c62b8fd..f3cbd7ffc5 100644 --- a/official/c87497553.lua +++ b/official/c87497553.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetOperation(s.drop) c:RegisterEffect(e2) end -s.listed_series={0x116} +s.listed_series={SET_CRUSADIA} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFlagEffect(tp,id)==0 end @@ -33,13 +33,13 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetOperation(s.actop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.actop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x116) and ep==tp then + if re:IsMonsterEffect() and rc:IsSetCard(SET_CRUSADIA) and ep==tp then Duel.SetChainLimit(s.chainlm) end end @@ -51,7 +51,7 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if not d then return false end if a:IsStatus(STATUS_OPPO_BATTLE) and d:IsControler(tp) then a,d=d,a end - if a:IsLinkMonster() and a:IsSetCard(0x116) and d:IsStatus(STATUS_BATTLE_DESTROYED) then + if a:IsLinkMonster() and a:IsSetCard(SET_CRUSADIA) and d:IsStatus(STATUS_BATTLE_DESTROYED) then e:SetLabelObject(a) return true else return false end @@ -70,4 +70,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if rc:IsFaceup() and rc:IsRelateToBattle() and rc:IsControler(tp) and ct>0 then Duel.Draw(p,ct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87498729.lua b/official/c87498729.lua index 273a2177b8..a4c8e1b8bf 100644 --- a/official/c87498729.lua +++ b/official/c87498729.lua @@ -1,4 +1,4 @@ --- +--ティスティナの落とし仔 --Fallen of the Tistina --Scripted by Hatter local s,id=GetID() @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.plcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.pltg) e1:SetOperation(s.plop) c:RegisterEffect(e1) @@ -23,18 +23,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={12397569} s.listed_series={SET_TISTINA} -function s.plcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToGraveAsCost() end - Duel.SendtoGrave(c,REASON_COST) -end function s.plfilter(c) return c:IsFieldSpell() and c:IsCode(12397569) and not c:IsForbidden() end diff --git a/official/c87514539.lua b/official/c87514539.lua index 81219d0e58..47e7d2a86a 100644 --- a/official/c87514539.lua +++ b/official/c87514539.lua @@ -1,4 +1,5 @@ --傀儡虫 +--Marionette Mite local s,id=GetID() function s.initial_effect(c) --control @@ -15,10 +16,10 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(e:GetHandler(),REASON_COST|REASON_DISCARD) end function s.filter(c) - return c:IsFaceup() and c:IsRace(RACE_ZOMBIE+RACE_FIEND) and c:IsControlerCanBeChanged() + return c:IsFaceup() and c:IsRace(RACE_ZOMBIE|RACE_FIEND) and c:IsControlerCanBeChanged() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -29,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_ZOMBIE+RACE_FIEND) then + if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_ZOMBIE|RACE_FIEND) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c87523462.lua b/official/c87523462.lua index 45da5ec0d9..6924f93cd3 100644 --- a/official/c87523462.lua +++ b/official/c87523462.lua @@ -30,4 +30,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87526784.lua b/official/c87526784.lua index 31caf1e392..551d2c1535 100644 --- a/official/c87526784.lua +++ b/official/c87526784.lua @@ -1,4 +1,5 @@ --バグマンX +--Crashbug X local s,id=GetID() function s.initial_effect(c) --spsummon @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87532344.lua b/official/c87532344.lua index f48b234671..eeb5327063 100644 --- a/official/c87532344.lua +++ b/official/c87532344.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER_E) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1) e2:SetTarget(s.target) e2:SetOperation(s.operation) diff --git a/official/c87535691.lua b/official/c87535691.lua index 9604025b35..a0faad9a3e 100644 --- a/official/c87535691.lua +++ b/official/c87535691.lua @@ -1,4 +1,5 @@ --超重武者ツヅ-3 +--Superheavy Samurai Drum local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9a) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -35,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87557188.lua b/official/c87557188.lua index 86b648f5b1..ffb0268e44 100644 --- a/official/c87557188.lua +++ b/official/c87557188.lua @@ -1,4 +1,5 @@ --厳格な老魔術師 +--The Stern Mystic local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,4 +17,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ConfirmCards(tp,g) end -end +end \ No newline at end of file diff --git a/official/c87564935.lua b/official/c87564935.lua index c1ef11f755..331aac774a 100644 --- a/official/c87564935.lua +++ b/official/c87564935.lua @@ -19,8 +19,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.efilter1(e,re,rp) - return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_MONSTER) + return rp==1-e:GetHandlerPlayer() and re:IsMonsterEffect() end function s.efilter2(e,te) - return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) -end + return te:GetHandlerPlayer()~=e:GetHandlerPlayer() and te:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c87567063.lua b/official/c87567063.lua index b981f6adad..7fbfd0efb6 100644 --- a/official/c87567063.lua +++ b/official/c87567063.lua @@ -1,4 +1,5 @@ --造反劇 +--Rebellion local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end @@ -34,9 +35,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(tc:GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() -end +end \ No newline at end of file diff --git a/official/c87588741.lua b/official/c87588741.lua index 55d361ecac..898070ffee 100644 --- a/official/c87588741.lua +++ b/official/c87588741.lua @@ -1,4 +1,5 @@ --クリフォート・アクセス +--Qliphort Cephalopod local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -66,9 +67,9 @@ function s.initial_effect(c) e9:SetLabelObject(e8) c:RegisterEffect(e9) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -106,7 +107,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -114,14 +115,14 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e2) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct1=Duel.GetMatchingGroupCount(Card.IsMonster,tp,LOCATION_GRAVE,0,nil) @@ -142,9 +143,9 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then + if g:IsExists(Card.IsSetCard,1,nil,SET_QLI) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c87602890.lua b/official/c87602890.lua index a79af06346..b25ad73e0b 100644 --- a/official/c87602890.lua +++ b/official/c87602890.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) c:RegisterEffect(e4) end function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -74,4 +74,4 @@ function s.valcheck(e,c) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c87608852.lua b/official/c87608852.lua index eb4131d9a4..2732892993 100644 --- a/official/c87608852.lua +++ b/official/c87608852.lua @@ -15,12 +15,12 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.counterfilter(c) return not c:IsLevelAbove(5) end function s.chainfilter(re,tp,cid) - return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e)) + return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:GetHandler():IsSetCard(SET_SPELLBOOK)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsReleasable() @@ -32,7 +32,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetLabelObject(e) @@ -40,7 +40,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -48,7 +48,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return e:GetLabelObject()~=se and c:IsLevelAbove(5) end function s.spfilter(c,e,tp) - return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(0x30) + return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK|ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c87609391.lua b/official/c87609391.lua index f39fc4fd9c..99995a75ad 100644 --- a/official/c87609391.lua +++ b/official/c87609391.lua @@ -1,8 +1,8 @@ --ラプターズ・アルティメット・メイス ---Raidraptor's Ultimate Mace +--Raptor's Ultimate Mace local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0xba)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_RAIDRAPTOR)) --atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -20,7 +20,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x95,0xba} +s.listed_series={SET_RANK_UP_MAGIC,SET_RAIDRAPTOR} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local ec=e:GetHandler():GetEquipTarget() @@ -28,7 +28,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return tc==ec and at and at:GetAttack()>ec:GetAttack() end function s.thfilter(c) - return c:IsSetCard(0x95) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_RANK_UP_MAGIC) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -50,7 +50,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetTargetRange(1,0) e1:SetCondition(s.damcon) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) end @@ -58,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.damcon(e) return e:GetLabelObject()==Duel.GetAttacker() -end +end \ No newline at end of file diff --git a/official/c87614611.lua b/official/c87614611.lua index 47c8c325d9..dd8acf93e9 100644 --- a/official/c87614611.lua +++ b/official/c87614611.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_names={70902743} +s.listed_names={CARD_RED_DRAGON_ARCHFIEND} function s.cfilter(c) - return c:IsFaceup() and c:IsCode(70902743) + return c:IsFaceup() and c:IsCode(CARD_RED_DRAGON_ARCHFIEND) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) @@ -28,20 +28,20 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e2:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e3:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -54,4 +54,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87621407.lua b/official/c87621407.lua index a79f350548..339ecc0646 100644 --- a/official/c87621407.lua +++ b/official/c87621407.lua @@ -1,4 +1,5 @@ --魔装機関車 デコイチ +--Dekoichi the Battlechanted Locomotive local s,id=GetID() function s.initial_effect(c) --flip @@ -24,4 +25,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87622767.lua b/official/c87622767.lua index 43a07bc646..8fc79b032c 100644 --- a/official/c87622767.lua +++ b/official/c87622767.lua @@ -1,4 +1,5 @@ --ファイナルサイコオーガ +--Final Psychic Ogre local s,id=GetID() function s.initial_effect(c) --salvage @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYING) - e1:SetCost(s.thcost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c) return c:IsRace(RACE_PSYCHIC) and c:IsAbleToHand() end @@ -33,4 +30,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c87624166.lua b/official/c87624166.lua index f562b59724..50693ca738 100644 --- a/official/c87624166.lua +++ b/official/c87624166.lua @@ -1,4 +1,5 @@ --古の森 +--Ancient Forest local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(s.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c876330.lua b/official/c876330.lua index ebf9fbc6f1..1457eed01a 100644 --- a/official/c876330.lua +++ b/official/c876330.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) aux.AddEREquipLimit(c,nil,s.eqval,Card.EquipByEffectAndLimitRegister,e3) end function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon1(e,c) if c==nil then return true end @@ -58,13 +58,13 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x29) and ec:IsRace(RACE_DRAGON) + return ec:IsControler(tp) and ec:IsSetCard(SET_DRAGUNITY) and ec:IsRace(RACE_DRAGON) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetPreviousLocation()==LOCATION_HAND end function s.filter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -81,4 +81,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then c:EquipByEffectAndLimitRegister(e,tp,tc) end -end +end \ No newline at end of file diff --git a/official/c8763963.lua b/official/c8763963.lua index 4e7043b6a9..f0657f4736 100644 --- a/official/c8763963.lua +++ b/official/c8763963.lua @@ -57,7 +57,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT) end @@ -68,7 +68,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE)) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c87640391.lua b/official/c87640391.lua index 7dccf99c22..b789a6ebb5 100644 --- a/official/c87640391.lua +++ b/official/c87640391.lua @@ -82,4 +82,4 @@ function s.xyzlv(e,c,rc) else return lv end -end +end \ No newline at end of file diff --git a/official/c87649699.lua b/official/c87649699.lua index 11ef583ee5..e03e09e9b5 100644 --- a/official/c87649699.lua +++ b/official/c87649699.lua @@ -1,4 +1,5 @@ --ナチュル・ラグウィード +--Naturia Ragweed local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_DRAW) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -17,10 +18,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.GetCurrentPhase()~=PHASE_DRAW end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) @@ -30,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87669904.lua b/official/c87669904.lua index 054dc4d846..c3a1078ce5 100644 --- a/official/c87669904.lua +++ b/official/c87669904.lua @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e4:SetOperation(s.desop) Duel.RegisterEffect(e4,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,1),nil) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_DUAL_AVATAR_SPIRIT,SET_DUAL_AVATAR,TYPES_TOKEN,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end diff --git a/official/c87676171.lua b/official/c87676171.lua index e63f0c03b2..1a65fd39fb 100644 --- a/official/c87676171.lua +++ b/official/c87676171.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,CARD_CRYSTAL_GOD_TISTINA) end) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetOperation(s.atkop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) --Special Summon 1 "Tistina" monster from the GY diff --git a/official/c87685879.lua b/official/c87685879.lua index fb1f97b186..da2e5cec51 100644 --- a/official/c87685879.lua +++ b/official/c87685879.lua @@ -1,4 +1,5 @@ --コアラッコ +--Sea Koala local s,id=GetID() function s.initial_effect(c) --atk down @@ -18,7 +19,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:GetLocation()==LOCATION_MZONE end + if chkc then return chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.HasNonZeroAttack,tp,0,LOCATION_MZONE,1,1,nil) @@ -30,7 +31,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) end diff --git a/official/c87742943.lua b/official/c87742943.lua index 9e48db26d2..5421ca489a 100644 --- a/official/c87742943.lua +++ b/official/c87742943.lua @@ -41,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g:GetFirst(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87746184.lua b/official/c87746184.lua index 0e745106c4..393c45095d 100644 --- a/official/c87746184.lua +++ b/official/c87746184.lua @@ -67,4 +67,4 @@ function s.thsetop(e,tp,eg,ep,ev,re,r,rp) function(sc) Duel.SSet(tp,sc) end, aux.Stringid(id,3) ) -end +end \ No newline at end of file diff --git a/official/c8775395.lua b/official/c8775395.lua index 2de789480d..c0593d1769 100644 --- a/official/c8775395.lua +++ b/official/c8775395.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.eqpcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.eqptg) e2:SetOperation(s.eqpop) c:RegisterEffect(e2) diff --git a/official/c87765315.lua b/official/c87765315.lua index f062bdb821..15058765e1 100644 --- a/official/c87765315.lua +++ b/official/c87765315.lua @@ -12,15 +12,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc7,0xda} +s.listed_series={SET_DRACOSLAYER,SET_DRACOVERLORD} function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0xc7) and not c:IsType(TYPE_PENDULUM) + return c:IsFaceup() and c:IsSetCard(SET_DRACOSLAYER) and not c:IsType(TYPE_PENDULUM) end function s.filter3(c,e,tp) - return (c:IsSetCard(0xda) or c:IsSetCard(0xc7)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return (c:IsSetCard(SET_DRACOVERLORD) or c:IsSetCard(SET_DRACOSLAYER)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xda),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DRACOVERLORD),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c87769556.lua b/official/c87769556.lua index e85ee7815a..cad95421f0 100644 --- a/official/c87769556.lua +++ b/official/c87769556.lua @@ -1,4 +1,5 @@ --魔術師の右手 +--Magician's Right Hand local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,11 +19,11 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) - and rp~=tp and re:IsActiveType(TYPE_SPELL) and Duel.IsChainDisablable(ev) + and rp~=tp and re:IsSpellEffect() and Duel.IsChainDisablable(ev) end function s.negop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then Duel.Destroy(rc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87772572.lua b/official/c87772572.lua index a0a72c0715..a2c5b97b54 100644 --- a/official/c87772572.lua +++ b/official/c87772572.lua @@ -19,7 +19,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) while RACE_ALL&crac~=0 do local catt=1 while ATTRIBUTE_ALL&catt~=0 do - if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,2200,4,crac,catt) then + if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,2200,4,crac,catt) then rac=rac+crac break end @@ -35,7 +35,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local att=0 local catt=1 while ATTRIBUTE_ALL&catt~=0 do - if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,2200,4,crac,catt) then + if Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,2200,4,crac,catt) then att=att+catt end catt=catt<<1 @@ -52,9 +52,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local rac=e:GetLabel() local att=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,2200,4,rac,att) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,SET_KARAKURI,0,2200,4,rac,att) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP,att,rac,0,0,0) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c87774234.lua b/official/c87774234.lua index 7f787306c3..b55dc32c14 100644 --- a/official/c87774234.lua +++ b/official/c87774234.lua @@ -1,4 +1,5 @@ --ワタポン +--Watapon local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c87798440.lua b/official/c87798440.lua index caa31173c8..4965474f54 100644 --- a/official/c87798440.lua +++ b/official/c87798440.lua @@ -1,4 +1,5 @@ --アーマー・ブレイカー +--Armor Breaker local s,id=GetID() function s.initial_effect(c) aux.AddUnionProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),true) @@ -31,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87800375.lua b/official/c87800375.lua index fb1d474ed9..138e325c87 100644 --- a/official/c87800375.lua +++ b/official/c87800375.lua @@ -19,14 +19,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x207a,0x107a} +s.listed_series={SET_NOBLE_ARMS,SET_NOBLE_KNIGHT} function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(0x207a) + return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(SET_NOBLE_ARMS) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -60,8 +60,8 @@ function s.eqfilter(c,cd) return c:IsCode(cd) and (c:IsFaceup() or not c:IsOnField()) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and not Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode()) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and not Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil,c:GetCode()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -74,5 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c87804365.lua b/official/c87804365.lua index 91b76131e7..f9ab212dd0 100644 --- a/official/c87804365.lua +++ b/official/c87804365.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation(TYPE_XYZ,Card.IsXyzSummonable,function(sc,g,tp) Duel.XyzSummon(tp,sc,nil,g) end)) c:RegisterEffect(e2) end -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) @@ -31,11 +31,11 @@ function s.relfilter(c,e,tp) return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.matfilter(c,e,tp) - return c:IsSetCard(0x132) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MATHMECH) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter(montype,chkfun) return function(c,mg,tp,chk) - return c:IsSetCard(0x132) and c:IsType(montype) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) and (not mg or chkfun(c,nil,mg,#mg,#mg)) + return c:IsSetCard(SET_MATHMECH) and c:IsType(montype) and (not chk or Duel.GetLocationCountFromEx(tp,tp,mg,c)>0) and (not mg or chkfun(c,nil,mg,#mg,#mg)) end end function s.rescon(exg,chkfun) @@ -48,7 +48,7 @@ function s.target(montype,chkfun) return function(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local exg=Duel.GetMatchingGroup(s.filter(montype,chkfun),tp,LOCATION_EXTRA,0,nil,nil,tp) local cancelcon=s.rescon(exg,chkfun) - if chkc then return chkc:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x132) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) and cancelcon(Group.FromCards(chkc)) end + if chkc then return chkc:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(SET_MATHMECH) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) and cancelcon(Group.FromCards(chkc)) end local mg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local min=math.min(math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and 1 or 99),1) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -70,7 +70,7 @@ function s.operation(montype,chkfun,fun) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -85,4 +85,4 @@ function s.operation(montype,chkfun,fun) fun(c,g,tp) end end -end +end \ No newline at end of file diff --git a/official/c87804747.lua b/official/c87804747.lua index 202773c53f..93d55a7a8c 100644 --- a/official/c87804747.lua +++ b/official/c87804747.lua @@ -75,7 +75,7 @@ end function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) local g=e:GetLabelObject() if not g then return end - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) g:DeleteGroup() end function s.descon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c87819421.lua b/official/c87819421.lua index 5bbb6173a8..7b630a77f7 100644 --- a/official/c87819421.lua +++ b/official/c87819421.lua @@ -1,4 +1,5 @@ --マスク・チャージ +--Mask Charge local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x8,0xa5} +s.listed_series={SET_HERO,SET_CHANGE} function s.filter1(c) - return c:IsSetCard(0x8) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_HERO) and c:IsMonster() and c:IsAbleToHand() end function s.filter2(c) - return c:IsSetCard(0xa5) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() + return c:IsSetCard(SET_CHANGE) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c87835759.lua b/official/c87835759.lua index 84f842012e..cb47735d2c 100644 --- a/official/c87835759.lua +++ b/official/c87835759.lua @@ -1,4 +1,5 @@ --創世の竜騎士 +--Dragon Knight of Creation local s,id=GetID() function s.initial_effect(c) --level @@ -76,4 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c87836938.lua b/official/c87836938.lua index 504281f513..744bdca58e 100644 --- a/official/c87836938.lua +++ b/official/c87836938.lua @@ -1,4 +1,5 @@ --ヴァイロン・ヴァンガード +--Vylon Vanguard local s,id=GetID() function s.initial_effect(c) --draw @@ -30,4 +31,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c87844926.lua b/official/c87844926.lua index dd76430015..c280208494 100644 --- a/official/c87844926.lua +++ b/official/c87844926.lua @@ -46,4 +46,4 @@ end function s.mill3(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,1-tp,id) Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c8785161.lua b/official/c8785161.lua index f3c8680b69..2088ba16f5 100644 --- a/official/c8785161.lua +++ b/official/c8785161.lua @@ -1,4 +1,5 @@ --RR-ワイルド・ヴァルチャー +--Raidraptor - Wild Vulture local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -28,32 +29,28 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)>0 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter1(c,e,tp) local lv=c:GetLevel() - return lv>0 and lv<6 and c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,c,e,tp,6-lv) + return lv>0 and lv<6 and c:IsSetCard(SET_RAIDRAPTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,e,tp,6-lv) end function s.spfilter2(c,e,tp,lv) - return c:IsSetCard(0xba) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>1 and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return ft>1 and Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter1),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc1=g1:GetFirst() if not tc1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc1,e,tp,6-tc1:GetLevel()) + local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,tc1,e,tp,6-tc1:GetLevel()) g1:Merge(g2) Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c87871125.lua b/official/c87871125.lua index 1657aec434..4d7db4bdea 100644 --- a/official/c87871125.lua +++ b/official/c87871125.lua @@ -88,4 +88,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87880531.lua b/official/c87880531.lua index b86b6b7236..f00ce70686 100644 --- a/official/c87880531.lua +++ b/official/c87880531.lua @@ -1,4 +1,5 @@ --拡散する波動 +--Diffusion Wave-Motion local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -15,10 +16,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(7) end @@ -37,24 +34,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ae:SetTargetRange(LOCATION_MZONE,0) ae:SetTarget(s.ftarget) ae:SetLabel(tc:GetFieldID()) - ae:SetReset(RESET_PHASE+PHASE_END) + ae:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ae,tp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_ATTACK_ALL) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_BATTLED) e4:SetOperation(s.disop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e4:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e4) end end @@ -68,10 +65,10 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetOwner()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD&~(RESET_LEAVE|RESET_TOGRAVE)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_LEAVE|RESET_TOGRAVE)) e1:SetCondition(s.con) bc:RegisterEffect(e1) end function s.con(e) return e:GetHandler():IsMonster() -end +end \ No newline at end of file diff --git a/official/c87890143.lua b/official/c87890143.lua index db251278f0..c094e02a0d 100644 --- a/official/c87890143.lua +++ b/official/c87890143.lua @@ -1,4 +1,5 @@ --ジェネレーション・フォース +--Generation Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x73} +s.listed_series={SET_XYZ} function s.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) end @@ -19,7 +20,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsSetCard(0x73) and c:IsAbleToHand() + return c:IsSetCard(SET_XYZ) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -32,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87897777.lua b/official/c87897777.lua index e478e27b73..5f2b65c4fb 100644 --- a/official/c87897777.lua +++ b/official/c87897777.lua @@ -1,10 +1,10 @@ --- ヴァリアンツM-マーキス --- Vaylantz Mad Marques --- Scripted by Hatter +--ヴァリアンツM-マーキス +--Vaylantz Mad Marquess +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Add 1 excavated "Vaylantz" card + --Add 1 excavated "Vaylantz" card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DICE+CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Special Summon from Spell/Trap Zone + --Special Summon from Spell/Trap Zone local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON) diff --git a/official/c87902575.lua b/official/c87902575.lua index 89b5a424ca..b56f0962d8 100644 --- a/official/c87902575.lua +++ b/official/c87902575.lua @@ -1,4 +1,5 @@ --フューチャー・ヴィジョン +--Future Visions local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetRange(LOCATION_FZONE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCountLimit(1) e3:SetCondition(s.retcon) e3:SetOperation(s.retop) @@ -35,7 +36,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE_START+PHASE_MAIN1) + e4:SetCode(EVENT_PHASE_START|PHASE_MAIN1) e4:SetRange(LOCATION_FZONE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetCountLimit(1) @@ -57,8 +58,8 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=eg:GetFirst() - if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then - tc:CreateRelation(e:GetHandler(),RESET_EVENT+RESETS_STANDARD) + if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT|REASON_TEMPORARY)~=0 then + tc:CreateRelation(e:GetHandler(),RESET_EVENT|RESETS_STANDARD) e:GetLabelObject():GetLabelObject():AddCard(tc) end end @@ -93,4 +94,4 @@ function s.clfilter(c,ec,tp) end function s.clearop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():GetLabelObject():Remove(s.clfilter,nil,e:GetHandler(),Duel.GetTurnPlayer()) -end +end \ No newline at end of file diff --git a/official/c87910978.lua b/official/c87910978.lua index fccfccc904..2ee604861f 100644 --- a/official/c87910978.lua +++ b/official/c87910978.lua @@ -1,6 +1,5 @@ --洗脳-ブレインコントロール --Brain Control - local s,id=GetID() function s.initial_effect(c) --Take control 1 of opponent's monsters @@ -9,15 +8,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(800)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.filter(c) return c:IsControlerCanBeChanged() and c:IsFaceup() and c:IsSummonableCard() end @@ -33,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c87911394.lua b/official/c87911394.lua index aae2d08a02..a5101c7240 100644 --- a/official/c87911394.lua +++ b/official/c87911394.lua @@ -1,4 +1,5 @@ --CNo.39 希望皇ホープレイ・ヴィクトリー +--Number C39: Utopia Ray Victory local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -20,12 +21,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} s.xyz_number=39 function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) @@ -35,11 +36,7 @@ function s.actcon(e) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return at and at:IsFaceup() and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x107f) -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return at and at:IsFaceup() and e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_UTOPIA) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -52,13 +49,13 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) Duel.AdjustInstantly(tc) local atk=tc:GetAttack() @@ -68,8 +65,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c87917187.lua b/official/c87917187.lua index 3707962b38..c9a8486b83 100644 --- a/official/c87917187.lua +++ b/official/c87917187.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -19,35 +19,31 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end s.listed_names={6007213,32491822,69890967} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(6007213,32491822,69890967) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end @@ -66,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c87931906.lua b/official/c87931906.lua index 64f484e5d4..4f307e2215 100644 --- a/official/c87931906.lua +++ b/official/c87931906.lua @@ -2,17 +2,17 @@ --Lunalight Fusion local s,id=GetID() function s.initial_effect(c) - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0xdf),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_LUNALIGHT),nil,s.fextra,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.fcheck(tp,sg,fc) - return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA+LOCATION_DECK)<=1 + return sg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA|LOCATION_DECK)<=1 end function s.fextra(e,tp,mg) if Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) then - local eg=Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,nil) + local eg=Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_EXTRA|LOCATION_DECK,0,nil) if eg and #eg>0 then return eg,s.fcheck end @@ -20,9 +20,9 @@ function s.fextra(e,tp,mg) return nil end function s.exfilter(c) - return c:IsMonster() and c:IsSetCard(0xdf) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_LUNALIGHT) and c:IsAbleToGrave() end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end \ No newline at end of file diff --git a/official/c8794055.lua b/official/c8794055.lua index fa555f3fe6..5f2773026a 100644 --- a/official/c8794055.lua +++ b/official/c8794055.lua @@ -52,9 +52,9 @@ function s.initial_effect(c) c:RegisterEffect(e5) local e6=e5:Clone() e6:SetCode(EVENT_SPSUMMON_SUCCESS) - c:RegisterEffect(e6) + c:RegisterEffect(e6) end -s.listed_series={0x18b} +s.listed_series={SET_GHOTI} function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_FISH) and c:IsType(TYPE_SYNCHRO) end @@ -65,13 +65,13 @@ function s.cfilter(c) return c:IsRace(RACE_FISH) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x18b) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GHOTI) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -110,4 +110,4 @@ function s.rtop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c8794435.lua b/official/c8794435.lua index 11fb456970..a77ba38fdd 100644 --- a/official/c8794435.lua +++ b/official/c8794435.lua @@ -1,4 +1,5 @@ --合成魔獣 ガーゼット +--Maju Garzett local s,id=GetID() function s.initial_effect(c) --tribute check @@ -29,10 +30,10 @@ function s.valcheck(e,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+0xff0000) + e1:SetReset(RESET_EVENT|RESET_DISABLE|RESET_TURN_SET|RESET_TOGRAVE|RESET_REMOVE|RESET_TEMP_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE) c:RegisterEffect(e1) end end function s.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) -end +end \ No newline at end of file diff --git a/official/c87955518.lua b/official/c87955518.lua index f7748be57d..6db7fb8ef8 100644 --- a/official/c87955518.lua +++ b/official/c87955518.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(s.tribtcond) e2:SetTarget(s.tribttg) e2:SetOperation(s.tribtop) diff --git a/official/c87973893.lua b/official/c87973893.lua index 1b860ed267..cb6a0f6526 100644 --- a/official/c87973893.lua +++ b/official/c87973893.lua @@ -1,7 +1,8 @@ --甲虫装機の魔斧 ゼクトホーク +--Inzektor Axe - Zektahawk local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x56)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_INZEKTOR)) --Atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -17,7 +18,7 @@ function s.initial_effect(c) e4:SetOperation(s.acop) c:RegisterEffect(e4) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.accon(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst()==e:GetHandler():GetEquipTarget() end @@ -28,9 +29,9 @@ function s.acop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c87978805.lua b/official/c87978805.lua index ce6dcbc5e9..d9edf15954 100644 --- a/official/c87978805.lua +++ b/official/c87978805.lua @@ -1,4 +1,5 @@ --寄生体ダニー +--Parasitic Ticky local s,id=GetID() function s.initial_effect(c) --atk/def @@ -15,4 +16,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_TOKEN)*500 -end +end \ No newline at end of file diff --git a/official/c87988305.lua b/official/c87988305.lua index 429d856e46..a8639a80b5 100644 --- a/official/c87988305.lua +++ b/official/c87988305.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE|LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsLevel(8) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c879958.lua b/official/c879958.lua index af9acbb0ae..d630f35410 100644 --- a/official/c879958.lua +++ b/official/c879958.lua @@ -1,6 +1,5 @@ --パラレルポート・アーマー --Parallel Port Armor - local s,id=GetID() function s.initial_effect(c) --Targeted link monster cannot be destroyed by battle, opponent cannot target it with card effects @@ -54,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Cannot be targeted by opponent's card effects local e2=e1:Clone() @@ -68,14 +67,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) else c:CancelToGrave(false) end end function s.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.cfilter(c) return c:IsLinkMonster() and c:IsAbleToRemoveAsCost() @@ -107,7 +106,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c87997872.lua b/official/c87997872.lua index 2943165130..37a6998793 100644 --- a/official/c87997872.lua +++ b/official/c87997872.lua @@ -1,4 +1,5 @@ --スフィンクス・アンドロジュネス +--Theinen the Great Sphinx local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCondition(s.spcon) - e2:SetCost(s.cost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -29,7 +30,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_SPSUMMON_SUCCESS) - e4:SetCost(s.cost) + e4:SetCost(Cost.PayLP(500)) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end @@ -40,10 +41,6 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp,15013468) and eg:IsExists(s.cfilter,1,nil,tp,51402177) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end @@ -66,7 +63,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88000953.lua b/official/c88000953.lua index acffab8859..f08df78648 100644 --- a/official/c88000953.lua +++ b/official/c88000953.lua @@ -1,23 +1,23 @@ --ラスタライガー ---Luster Liger +--Rasterliger --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - --link summon - Link.AddProcedure(c,aux.NOT(aux.FilterBoolFunctionEx(Card.IsType,TYPE_TOKEN)),2) c:EnableReviveLimit() - --atk up + --Link Summon procedure: 2+ monsters, except Tokens + Link.AddProcedure(c,aux.NOT(aux.FilterBoolFunctionEx(Card.IsType,TYPE_TOKEN)),2) + --This card gains ATK equal to the ATK of 1 Link Monster in either GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - --destroy + --Destroy a number of cards on the field equal to the number of cards Tributed local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -29,50 +29,56 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.atkfilter(c) - return c:IsLinkMonster() and c:GetAttack()>0 -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsLinkMonster() and chkc:HasNonZeroAttack() end + if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsLinkMonster,Card.HasNonZeroAttack),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,aux.AND(Card.IsLinkMonster,Card.HasNonZeroAttack),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then + --This card gains ATK equal to that target's ATK until the end of this turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end -function s.cfilter(c,e) - local g=e:GetHandler():GetLinkedGroup() - return g:IsContains(c) +function s.descostfilter(c,lg) + return lg:IsContains(c) +end +function s.rescon(sg,tp,exg) + return Duel.IsExistingMatchingCard(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,#sg,sg) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.cfilter,1,false,false,nil,e) end - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) - local cg=Duel.SelectReleaseGroupCost(tp,s.cfilter,1,#g,false,false,nil,e) - e:SetLabel(#cg) - Duel.Release(cg,REASON_COST) + e:SetLabel(-100) + local lg=e:GetHandler():GetLinkedGroup() + if chk==0 then return #lg>0 and Duel.CheckReleaseGroupCost(tp,s.descostfilter,1,false,s.rescon,nil,lg) end + local g=Duel.SelectReleaseGroupCost(tp,s.descostfilter,1,#lg,false,s.rescon,nil,lg) + e:SetLabel(#g) + Duel.Release(g,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0) + local label=e:GetLabel() + if chk==0 then + local res=label==-100 + e:SetLabel(0) + return res + end + local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,label,tp,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) - local n=e:GetLabel() - if n>#g then n=#g end + local ct=e:GetLabel() + if Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)0 then - Duel.Destroy(tg,REASON_EFFECT) + local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil) + if #g>0 then + Duel.HintSelection(g) + Duel.Destroy(g,REASON_EFFECT) end end diff --git a/official/c88021907.lua b/official/c88021907.lua index 53de522939..935136a9dd 100644 --- a/official/c88021907.lua +++ b/official/c88021907.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) end s.listed_series={SET_MATHMECH} function s.con(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c8802510.lua b/official/c8802510.lua index c5601fa26f..274b03aeed 100644 --- a/official/c8802510.lua +++ b/official/c8802510.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0xc1} +s.listed_series={SET_PSY_FRAME} function s.regcfilter(c,tp) return c:IsRace(RACE_PSYCHIC) and c:IsFaceup() and c:GetPreviousRaceOnField()&RACE_PSYCHIC~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) @@ -47,11 +47,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return c:IsSetCard(0xc1) and c:IsAbleToHand() + return c:IsSetCard(SET_PSY_FRAME) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) diff --git a/official/c88032368.lua b/official/c88032368.lua index 9ed03e3153..6ba699dcf2 100644 --- a/official/c88032368.lua +++ b/official/c88032368.lua @@ -1,4 +1,5 @@ --セカンド・ブースター +--Second Booster local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end if chk==0 then return Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,e:GetHandler(),POS_FACEUP_ATTACK) end @@ -30,7 +27,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88032456.lua b/official/c88032456.lua index 81a2116561..3c2301e5f9 100644 --- a/official/c88032456.lua +++ b/official/c88032456.lua @@ -1,4 +1,5 @@ --コピーキャット +--Mimicat local s,id=GetID() function s.initial_effect(c) --Activate @@ -52,4 +53,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) elseif (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then Duel.SSet(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c8806072.lua b/official/c8806072.lua index ed8cbfd06b..95912f8454 100644 --- a/official/c8806072.lua +++ b/official/c8806072.lua @@ -1,4 +1,5 @@ --コンボファイター +--Combo Fighter local s,id=GetID() function s.initial_effect(c) --chain @@ -18,11 +19,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.chop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()>1 + if Duel.IsPhase(PHASE_MAIN1) and Duel.IsTurnPlayer(tp) and Duel.GetCurrentChain()>1 and e:GetHandler():GetFlagEffect(id)==0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.atkcon(e) return e:GetHandler():GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c88069166.lua b/official/c88069166.lua index 9c728ebc6e..541c3a8804 100644 --- a/official/c88069166.lua +++ b/official/c88069166.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) @@ -27,9 +27,9 @@ function s.initial_effect(c) e3:SetOperation(s.ctarget) c:RegisterEffect(e3) end -s.listed_series={0x4b} +s.listed_series={SET_AESIR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) + return c:IsFaceup() and c:IsSetCard(SET_AESIR) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -52,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCondition(s.rcon) tc:RegisterEffect(e1) if tc:IsImmuneToEffect(e1) then return end @@ -71,4 +71,4 @@ function s.ctarget(e,tp,eg,ep,ev,re,r,rp) if tc then e:GetHandler():CancelCardTarget(tc) end -end +end \ No newline at end of file diff --git a/official/c88069597.lua b/official/c88069597.lua index d75da0a550..699bc67f30 100644 --- a/official/c88069597.lua +++ b/official/c88069597.lua @@ -1,4 +1,5 @@ --プレデター・プランター +--Predaponics local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,7 +11,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetCondition(s.mtcon) @@ -27,9 +28,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckLPCost(tp,800) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -39,31 +40,31 @@ function s.mtop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10f3) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PREDAPLANT) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c88071625.lua b/official/c88071625.lua index a3e1470a9c..8be64d8e3c 100644 --- a/official/c88071625.lua +++ b/official/c88071625.lua @@ -56,7 +56,7 @@ function s.valcheck(e,c) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+(RESET_EVENT|RESETS_STANDARD_DISABLE)&~RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD) c:RegisterEffect(e1) --def continuous effect local e2=e1:Clone() @@ -69,7 +69,7 @@ function s.facechk(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabel(1) end function s.copycon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.filter(c,e) return c:IsType(TYPE_EFFECT) and c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e) @@ -89,10 +89,10 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) c:RegisterEffect(e1) - c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1) + c:CopyEffect(code,RESET_EVENT|RESETS_STANDARD,1) end end diff --git a/official/c88078306.lua b/official/c88078306.lua index 8f7a1e0fc2..16df691ad0 100644 --- a/official/c88078306.lua +++ b/official/c88078306.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -64,4 +64,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c88086137.lua b/official/c88086137.lua index 8434cb13b8..ba85a1d829 100644 --- a/official/c88086137.lua +++ b/official/c88086137.lua @@ -16,7 +16,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local seq,p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION) if p==1-tp then seq=seq+16 end - return ((re:IsActiveType(TYPE_MONSTER) and loc&LOCATION_MZONE>0 and bit.extract(c:GetColumnZone(LOCATION_MZONE),seq)~=0) + return ((re:IsMonsterEffect() and loc&LOCATION_MZONE>0 and bit.extract(c:GetColumnZone(LOCATION_MZONE),seq)~=0) or (re:IsHasType(EFFECT_TYPE_ACTIVATE) and loc&LOCATION_SZONE>0 and bit.extract(c:GetColumnZone(LOCATION_SZONE)>>8,seq)~=0)) and Duel.IsChainNegatable(ev) end diff --git a/official/c88089103.lua b/official/c88089103.lua index 92ff526232..376123a67d 100644 --- a/official/c88089103.lua +++ b/official/c88089103.lua @@ -1,4 +1,5 @@ --四次元の墓 +--The Graveyard in the Fourth Dimension local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x41} +s.listed_series={SET_LV} function s.filter(c) - return c:IsSetCard(0x41) and c:IsAbleToDeck() + return c:IsSetCard(SET_LV) and c:IsAbleToDeck() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -26,7 +27,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c8809344.lua b/official/c8809344.lua index f8499382cd..e85eca2e06 100644 --- a/official/c8809344.lua +++ b/official/c8809344.lua @@ -1,4 +1,5 @@ --外神ナイアルラ +--Outer Entity Nyarla local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -26,11 +27,11 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.rkcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.rkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,60,REASON_COST+REASON_DISCARD) + local ct=Duel.DiscardHand(tp,Card.IsDiscardable,1,60,REASON_COST|REASON_DISCARD) e:SetLabel(ct) end function s.rkop(e,tp,eg,ep,ev,re,r,rp) @@ -39,7 +40,7 @@ function s.rkop(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_RANK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e2:SetValue(e:GetLabel()) c:RegisterEffect(e2) end @@ -68,7 +69,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(tc:GetOriginalAttribute()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RACE) diff --git a/official/c88093706.lua b/official/c88093706.lua index 2234349919..af42aa396d 100644 --- a/official/c88093706.lua +++ b/official/c88093706.lua @@ -1,7 +1,6 @@ --アップデートジャマー --Update Jammer --Scripted by Larry126 - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -46,28 +45,28 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTarget(s.distg) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetRange(LOCATION_MZONE) e2:SetOperation(s.disop) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetRange(LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetReset(RESET_PHASE+PHASE_DAMAGE) + e3:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e3,tp) --damage after destroying local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_BATTLE_DESTROYED) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e4:SetReset(RESET_PHASE+PHASE_DAMAGE) + e4:SetReset(RESET_PHASE|PHASE_DAMAGE) e4:SetCondition(s.damcon) e4:SetTarget(s.damtg) e4:SetOperation(s.damop) @@ -85,7 +84,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e4:SetRange(LOCATION_MZONE) e4:SetCode(EFFECT_SET_ATTACK_FINAL) - e4:SetReset(RESET_PHASE+PHASE_DAMAGE) + e4:SetReset(RESET_PHASE|PHASE_DAMAGE) e4:SetValue(aa) a:RegisterEffect(e4,true) local e5=Effect.CreateEffect(c) @@ -93,7 +92,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e5:SetRange(LOCATION_MZONE) e5:SetCode(EFFECT_SET_DEFENSE_FINAL) - e5:SetReset(RESET_PHASE+PHASE_DAMAGE) + e5:SetReset(RESET_PHASE|PHASE_DAMAGE) e5:SetValue(ad) a:RegisterEffect(e5,true) end @@ -111,7 +110,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e6:SetRange(LOCATION_MZONE) e6:SetCode(EFFECT_SET_ATTACK_FINAL) e6:SetValue(da) - e6:SetReset(RESET_PHASE+PHASE_DAMAGE) + e6:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e6,true) local e7=Effect.CreateEffect(c) e7:SetType(EFFECT_TYPE_SINGLE) @@ -119,7 +118,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e7:SetRange(LOCATION_MZONE) e7:SetCode(EFFECT_SET_DEFENSE_FINAL) e7:SetValue(dd) - e7:SetReset(RESET_PHASE+PHASE_DAMAGE) + e7:SetReset(RESET_PHASE|PHASE_DAMAGE) d:RegisterEffect(e7,true) end end @@ -159,7 +158,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c88095331.lua b/official/c88095331.lua index aae452602b..9abda57c6e 100644 --- a/official/c88095331.lua +++ b/official/c88095331.lua @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x604e} +s.listed_series={SET_EVOLSAUR} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsSetCard(0x604e) and c:IsCanBeSpecialSummoned(e,155,tp,false,false) + return c:IsSetCard(SET_EVOLSAUR) and c:IsCanBeSpecialSummoned(e,155,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,155,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c88106656.lua b/official/c88106656.lua index 5c4ab21c2a..1141a93e7e 100644 --- a/official/c88106656.lua +++ b/official/c88106656.lua @@ -45,25 +45,25 @@ function s.initial_effect(c) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end -s.listed_series={0x17d} +s.listed_series={SET_LIBROMANCER} function s.matcheck(e,c) if c:GetMaterial():IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD c:RegisterFlagEffect(id,reset,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,0)) end end function s.matcon(e) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)>0 + return c:IsRitualSummoned() and c:GetFlagEffect(id)>0 end function s.atkcfilter(c) - return c:IsRitualMonster() and c:IsSetCard(0x17d) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsRitualMonster() and c:IsSetCard(SET_LIBROMANCER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,c) + local g=Duel.SelectMatchingCard(tp,s.atkcfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,c) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) @@ -74,7 +74,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88120966.lua b/official/c88120966.lua index 76cbc362f2..992421ce79 100644 --- a/official/c88120966.lua +++ b/official/c88120966.lua @@ -1,4 +1,5 @@ --No.15 ギミック・パペット-ジャイアントキラー +--Number 15: Gimmick Puppet Giant Grinder local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,18 +14,14 @@ function s.initial_effect(c) e1:SetCountLimit(2) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=15 function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) return (c:GetSummonType()&SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL @@ -46,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c88123329.lua b/official/c88123329.lua index 95176971e6..a55b91228c 100644 --- a/official/c88123329.lua +++ b/official/c88123329.lua @@ -1,4 +1,5 @@ --精霊獣 ラムペンタ +--Spiritual Beast Rampengu local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xb5} +s.listed_series={SET_RITUAL_BEAST} function s.tgfilter(c,rac) - return c:IsSetCard(0xb5) and c:IsRace(rac) and c:IsAbleToGrave() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsRace(rac) and c:IsAbleToGrave() end function s.rmfilter(c,tp) - return c:IsSetCard(0xb5) and c:IsAbleToRemove() + return c:IsSetCard(SET_RITUAL_BEAST) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst():GetRace()) Duel.SendtoGrave(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88132637.lua b/official/c88132637.lua index a80c824e3a..8eddf5c4f3 100644 --- a/official/c88132637.lua +++ b/official/c88132637.lua @@ -1,4 +1,5 @@ --ツインヘッド・ケルベロス +--Twin-Headed Wolf local s,id=GetID() function s.initial_effect(c) --disable @@ -20,12 +21,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c8814959.lua b/official/c8814959.lua index a7ed04669f..5ebde563a0 100644 --- a/official/c8814959.lua +++ b/official/c8814959.lua @@ -1,4 +1,5 @@ --ヴェルズ・マンドラゴ +--Evilswarm Mandragora local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,4 +15,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)0 @@ -49,7 +49,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -65,17 +65,16 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,0x11f) end + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_HAND,0,1,nil,SET_NEPHTHYS) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,0x11f) + local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_HAND,0,1,1,nil,SET_NEPHTHYS) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c88177324.lua b/official/c88177324.lua index 9aaec2d1e9..eca497cf1d 100644 --- a/official/c88177324.lua +++ b/official/c88177324.lua @@ -1,6 +1,5 @@ --No.107 銀河眼の時空竜 --Number 107: Galaxy-Eyes Tachyon Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -11,11 +10,11 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.negcon) - e1:SetCost(s.negcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.negtg) e1:SetOperation(s.negop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,13 +28,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.xyz_number=107 - function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(tp) end function s.filter1(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() @@ -59,12 +53,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,c) @@ -75,7 +69,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetBaseAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end if tc:GetDefense()~=tc:GetBaseDefense() then @@ -83,12 +77,12 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(tc:GetBaseDefense()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end if c:IsFaceup() and c:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,0,1) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) @@ -101,7 +95,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) --Can make a second attack local e2=Effect.CreateEffect(c) @@ -110,6 +104,6 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e2) end \ No newline at end of file diff --git a/official/c88190453.lua b/official/c88190453.lua index 46dad9876a..4fb2223d69 100644 --- a/official/c88190453.lua +++ b/official/c88190453.lua @@ -1,4 +1,5 @@ --チェイン・スラッシャー +--Chain Thrasher local s,id=GetID() function s.initial_effect(c) --multiattack @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,id) -end +end \ No newline at end of file diff --git a/official/c88190790.lua b/official/c88190790.lua index e8814c4970..4cfd16b801 100644 --- a/official/c88190790.lua +++ b/official/c88190790.lua @@ -48,4 +48,4 @@ function s.maop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88197162.lua b/official/c88197162.lua index b93616bc73..bf341e25d7 100644 --- a/official/c88197162.lua +++ b/official/c88197162.lua @@ -16,13 +16,13 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsFaceup() and c:GetLevel()==4 and c:IsSummonType(SUMMON_TYPE_NORMAL) + return c:IsFaceup() and c:GetLevel()==4 and c:IsNormalSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 @@ -33,13 +33,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -52,4 +52,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c88204302.lua b/official/c88204302.lua index 1e35e96729..3d6ec38732 100644 --- a/official/c88204302.lua +++ b/official/c88204302.lua @@ -1,4 +1,5 @@ --スピードリバース +--Speed Recovery local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,14 +20,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.filter(c,e,tp) - return c:IsSetCard(0x2016) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPEEDROID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x2016) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -57,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8820526.lua b/official/c8820526.lua index 87f2cdc2e8..c1f0580cc2 100644 --- a/official/c8820526.lua +++ b/official/c8820526.lua @@ -29,7 +29,7 @@ end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() - return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and c:IsTributeSummoned() end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) @@ -43,12 +43,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) bc:RegisterEffect(e1) end end function s.cfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSummonPlayer(tp) and c:IsPendulumSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,2,nil,tp) @@ -63,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c88205593.lua b/official/c88205593.lua index 4e99212fc3..889df3eb05 100644 --- a/official/c88205593.lua +++ b/official/c88205593.lua @@ -1,4 +1,5 @@ --エレキングコブラ +--Wattcobra local s,id=GetID() function s.initial_effect(c) --direct attack @@ -17,12 +18,12 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and Duel.GetAttackTarget()==nil end function s.filter(c) - return c:IsSetCard(0xe) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_WATT) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c88210105.lua b/official/c88210105.lua index ed01ae820b..b79927cc7f 100644 --- a/official/c88210105.lua +++ b/official/c88210105.lua @@ -25,19 +25,19 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x18} -s.counter_place_list={0x1019} +s.listed_series={SET_CLOUDIAN} +s.counter_place_list={COUNTER_FOG} function s.ctcfilter(c) - return c:IsSetCard(0x18) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_CLOUDIAN) and c:IsMonster() and c:IsDiscardable() end function s.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.ctcfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local dc=Duel.SelectMatchingCard(tp,s.ctcfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoGrave(dc,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(dc,REASON_COST|REASON_DISCARD) end function s.cttfilter(c) - return c:IsFaceup() and c:IsLevelAbove(1) and c:IsCanAddCounter(0x1019,c:GetLevel()) + return c:IsFaceup() and c:IsLevelAbove(1) and c:IsCanAddCounter(COUNTER_FOG,c:GetLevel()) end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.cttfilter(chkc) end @@ -48,11 +48,11 @@ end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:AddCounter(0x1019,tc:GetLevel()) + tc:AddCounter(COUNTER_FOG,tc:GetLevel()) end end function s.cfilter(c) - return c:IsSetCard(0x18) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_CLOUDIAN) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() @@ -63,7 +63,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x18) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_CLOUDIAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -77,5 +77,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c88225269.lua b/official/c88225269.lua index a1e0fe5e89..7a01b1ef47 100644 --- a/official/c88225269.lua +++ b/official/c88225269.lua @@ -85,4 +85,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) tc:UpdateAttack(1000,RESET_EVENT|RESETS_STANDARD,c) end end -end +end \ No newline at end of file diff --git a/official/c8822710.lua b/official/c8822710.lua index f4420a3fd4..e76e3a6fe5 100644 --- a/official/c8822710.lua +++ b/official/c8822710.lua @@ -1,4 +1,5 @@ --A・O・J コズミック・クローザー +--Ally of Justice Cosmic Gateway local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>1 and Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c88232397.lua b/official/c88232397.lua index b5b814193a..354bc5ac54 100644 --- a/official/c88232397.lua +++ b/official/c88232397.lua @@ -1,5 +1,5 @@ --熟練の栗魔導士 ---Skilled Chestnut Magician +--Skilled Brown Magician --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -32,9 +32,9 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} s.listed_names={40703222} -s.listed_series={0xa4} +s.listed_series={SET_KURIBOH} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -43,11 +43,11 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,COUNTER_SPELL,1,REASON_COST) end function s.thfilter(c) - return (c:IsCode(40703222) or (c:IsSetCard(0xa4) and c:IsMonster())) and c:IsAbleToHand() + return (c:IsCode(40703222) or (c:IsSetCard(SET_KURIBOH) and c:IsMonster())) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) + local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) local op=Duel.SelectEffect(tp, {true,aux.Stringid(id,1)}, {b2,aux.Stringid(id,2)}) @@ -56,7 +56,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_LVCHANGE) else e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,tp,LOCATION_DECK|LOCATION_GRAVE) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -70,7 +70,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) --Increase ATK local e2=e1:Clone() @@ -79,10 +79,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) else Duel.Hint(HINT_SELECTMSG,tp, HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c88234365.lua b/official/c88234365.lua index db9d62c8dc..5214acbc4e 100644 --- a/official/c88234365.lua +++ b/official/c88234365.lua @@ -21,15 +21,15 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(s.cpcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.cptg) e2:SetOperation(s.cpop) c:RegisterEffect(e2) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xef) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + return c:IsFaceup() and c:IsSetCard(SET_DARKLORD) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsDiscardable() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -39,14 +39,10 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD) -end -function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT|REASON_DISCARD) end function s.cpfilter(c) - return c:IsSetCard(0xef) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil + return c:IsSetCard(SET_DARKLORD) and c:IsSpellTrap() and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil end function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.cpfilter(chkc) end @@ -76,5 +72,5 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) etc:ReleaseEffectRelation(te) end Duel.BreakEffect() - Duel.SendtoDeck(te:GetHandler(),nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c88234821.lua b/official/c88234821.lua index 32dc3ef18d..75096d18ca 100644 --- a/official/c88234821.lua +++ b/official/c88234821.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Synchro Summon - Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x29),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_DRAGUNITY),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --Negate activation local e1=Effect.CreateEffect(c) @@ -44,18 +44,18 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rp==1-tp and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) + return re:IsMonsterEffect() and rp==1-tp and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.cfilter(c) - return c:IsSetCard(0x29) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -100,14 +100,14 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and rp==1-tp and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local sg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if chk==0 then return #sg>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local sg=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(sg,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c88236094.lua b/official/c88236094.lua index 8d8ed6b283..1d08bca164 100644 --- a/official/c88236094.lua +++ b/official/c88236094.lua @@ -1,4 +1,5 @@ --アスワンの亡霊 +--Aswan Apparition local s,id=GetID() function s.initial_effect(c) --todeck @@ -29,6 +30,6 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88240808.lua b/official/c88240808.lua index 1a059f1043..4576d5ab45 100644 --- a/official/c88240808.lua +++ b/official/c88240808.lua @@ -1,4 +1,5 @@ --霊滅術師 カイク +--Kycoo the Ghost Destroyer local s,id=GetID() function s.initial_effect(c) --remove @@ -32,14 +33,14 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,2,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c88240999.lua b/official/c88240999.lua index abf8a97ab0..2102ccb90b 100644 --- a/official/c88240999.lua +++ b/official/c88240999.lua @@ -18,10 +18,10 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) - e2:SetCondition(s.adcon) - e2:SetCost(s.adcost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.adtg) e2:SetOperation(s.adop) c:RegisterEffect(e2) @@ -37,19 +37,12 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.mat_filter(c) return c:GetLevel()~=10 end -function s.adcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.adcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb4) + return c:IsFaceup() and c:IsSetCard(SET_NEKROZ) end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -59,13 +52,13 @@ function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.adop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -85,7 +78,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED) end -end +end \ No newline at end of file diff --git a/official/c88241506.lua b/official/c88241506.lua index dc423a9476..d4aec84c5c 100644 --- a/official/c88241506.lua +++ b/official/c88241506.lua @@ -32,14 +32,14 @@ end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.naop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.NegateAttack() and c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -53,13 +53,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c88264988.lua b/official/c88264988.lua index 9ef80d4624..08a23c0b68 100644 --- a/official/c88264988.lua +++ b/official/c88264988.lua @@ -56,14 +56,14 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c88279736.lua b/official/c88279736.lua index b603b34359..30d53c1556 100644 --- a/official/c88279736.lua +++ b/official/c88279736.lua @@ -1,4 +1,5 @@ --追い剥ぎゴブリン +--Robbin' Goblin local s,id=GetID() function s.initial_effect(c) --activate @@ -19,7 +20,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp + return ep~=tp and eg:GetFirst():IsControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -29,5 +30,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) local sg=g:RandomSelect(ep,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c88283496.lua b/official/c88283496.lua index ac14ffcae2..6266696304 100644 --- a/official/c88283496.lua +++ b/official/c88283496.lua @@ -1,4 +1,5 @@ --極星獣ガルム +--Garmr of the Nordic Beasts local s,id=GetID() function s.initial_effect(c) --destroy @@ -28,4 +29,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetLabelObject():IsRelateToBattle() then Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88284599.lua b/official/c88284599.lua index 98c465faf8..c87b13a507 100644 --- a/official/c88284599.lua +++ b/official/c88284599.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg,ep) return ep==1-tp end) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfToHand) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -58,11 +58,6 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) g:DeleteGroup() end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToHandAsCost() end - Duel.SendtoHand(c,nil,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRitualMonster() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_WARRIOR|RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) diff --git a/official/c88289295.lua b/official/c88289295.lua index 80f4eb20fc..0b1c7dfb4a 100644 --- a/official/c88289295.lua +++ b/official/c88289295.lua @@ -10,17 +10,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,TYPE_SYNCHRO) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,TYPE_SYNCHRO) end function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsControlerCanBeChanged() @@ -35,8 +31,8 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local ct=1 - if Duel.GetTurnPlayer()~=tp then ct=2 end + if Duel.IsTurnPlayer(1-tp) then ct=2 end if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,ct) end -end +end \ No newline at end of file diff --git a/official/c88301833.lua b/official/c88301833.lua index 2d181dea7e..0dcbc0436f 100644 --- a/official/c88301833.lua +++ b/official/c88301833.lua @@ -1,4 +1,5 @@ --昇華する魂 +--Ascending Soul local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.cfilter(c) - return c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsRitualSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) @@ -46,4 +47,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c88305705.lua b/official/c88305705.lua index 3c0cbdcd52..ba3ceedbbf 100644 --- a/official/c88305705.lua +++ b/official/c88305705.lua @@ -1,9 +1,10 @@ --ブレイブアイズ・ペンデュラム・ドラゴン +--Brave-Eyes Pendulum Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x10f2),aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_PENDULUM_DRAGON),aux.FilterBoolFunctionEx(Card.IsRace,RACE_WARRIOR)) --atk local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,8 +34,8 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0x10f2} -s.material_setcode={0xf2,0x10f2} +s.listed_series={SET_PENDULUM_DRAGON} +s.material_setcode={SET_PENDULUM,SET_PENDULUM_DRAGON} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION end @@ -53,7 +54,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -62,7 +63,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(s.ftarget) e2:SetLabel(c:GetFieldID()) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.ftarget(e,c) @@ -70,7 +71,7 @@ function s.ftarget(e,c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()==0 + return re:IsMonsterEffect() and re:GetHandler():GetAttack()==0 end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) @@ -90,4 +91,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() and bc:IsControler(1-tp) then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88305978.lua b/official/c88305978.lua index 864a80a026..8ec92be1c7 100644 --- a/official/c88305978.lua +++ b/official/c88305978.lua @@ -11,13 +11,13 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.filter(c,e,tp) @@ -37,16 +37,16 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.SpecialSummonComplete() end end function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c88307361.lua b/official/c88307361.lua index 7db2589c70..13821d5787 100644 --- a/official/c88307361.lua +++ b/official/c88307361.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) end function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,sp) return c:IsLevelBelow(4) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) @@ -52,17 +52,17 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end Duel.SpecialSummonComplete() @@ -90,4 +90,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88316955.lua b/official/c88316955.lua index 2aeaf33ad1..e41c883365 100644 --- a/official/c88316955.lua +++ b/official/c88316955.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -45,7 +45,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp) end function s.filter1(c,e,tp) - return c:IsSetCard(0x104) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KRAWLER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then diff --git a/official/c88332693.lua b/official/c88332693.lua index 77a6056a9f..00717ca5b0 100644 --- a/official/c88332693.lua +++ b/official/c88332693.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c88341502.lua b/official/c88341502.lua index 900c3d0b99..8a7db91e51 100644 --- a/official/c88341502.lua +++ b/official/c88341502.lua @@ -1,4 +1,5 @@ --ブラック・アロー +--Ebon Arrow local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -29,12 +27,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetDescription(aux.Stringid(id,0)) @@ -44,10 +42,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetCondition(s.damcon) e3:SetTarget(s.damtg) e3:SetOperation(s.damop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetLabelObject(tc) Duel.RegisterEffect(e3,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+0x1020000+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESET_CONTROL|RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -67,4 +65,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c88346805.lua b/official/c88346805.lua index f7da351214..17af837b3d 100644 --- a/official/c88346805.lua +++ b/official/c88346805.lua @@ -64,4 +64,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.SSet(tp,c,tp,false) end -end +end \ No newline at end of file diff --git a/official/c88358139.lua b/official/c88358139.lua index 2ae43e1a09..3df377d594 100644 --- a/official/c88358139.lua +++ b/official/c88358139.lua @@ -1,4 +1,5 @@ --EMヘルプリンセス +--Performapal Helpprincess local s,id=GetID() function s.initial_effect(c) --spsummon @@ -15,10 +16,10 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} s.listed_names={id} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0x9f) and not c:IsCode(id) + return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(SET_PERFORMAPAL) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -32,4 +33,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c88361177.lua b/official/c88361177.lua index 8d61b2f65a..dd06d84a27 100644 --- a/official/c88361177.lua +++ b/official/c88361177.lua @@ -1,4 +1,5 @@ --ドラグニティ-アングス +--Dragunity Angusticlavii local s,id=GetID() function s.initial_effect(c) --pierce @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCondition(s.pcon) c:RegisterEffect(e1) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.pcon(e) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x29) -end + return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_DRAGUNITY) +end \ No newline at end of file diff --git a/official/c8836329.lua b/official/c8836329.lua index 70f52f5217..f8cf963b11 100644 --- a/official/c8836329.lua +++ b/official/c8836329.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.nacon) - e1:SetCost(s.nacost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.natg) e1:SetOperation(s.naop) c:RegisterEffect(e1) @@ -34,10 +34,6 @@ s.listed_names={44221928} function s.nacon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil end -function s.nacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsOnField() end Duel.SetOperationInfo(0,CATEGORY_DISABLE,Duel.GetAttacker(),1,0,0) @@ -51,14 +47,14 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) a:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) a:RegisterEffect(e2) end end @@ -78,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local rg=Group.FromCards(c,tc) Duel.SendtoHand(rg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88369727.lua b/official/c88369727.lua index 1a1d6bb7e1..854d3fc646 100644 --- a/official/c88369727.lua +++ b/official/c88369727.lua @@ -1,4 +1,5 @@ --おろかな転生 +--Foolish Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,6 +22,6 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8837932.lua b/official/c8837932.lua index 899bcc7d8e..870555645c 100644 --- a/official/c8837932.lua +++ b/official/c8837932.lua @@ -30,9 +30,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.counter_place_list={0x1038} -s.listed_series={0xe3} +s.listed_series={SET_CUBIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xe3),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CUBIC),tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp,tid) return c:IsReason(REASON_DESTROY) and c:IsMonster() and c:GetTurnID()==tid @@ -68,7 +68,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) end end @@ -81,7 +81,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) e2:SetCondition(s.disable) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_DISABLE) @@ -96,7 +96,7 @@ function s.dfilter(c,g) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetCardTarget() - if re:IsActiveType(TYPE_MONSTER) and rp~=tp + if re:IsMonsterEffect() and rp~=tp and Duel.IsExistingMatchingCard(s.dfilter,tp,0,LOCATION_MZONE,1,nil,g) then Duel.NegateEffect(ev) end @@ -108,4 +108,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c88392300.lua b/official/c88392300.lua index 12caa62169..15040f2765 100644 --- a/official/c88392300.lua +++ b/official/c88392300.lua @@ -8,17 +8,13 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.seqcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.seqtg) e2:SetOperation(s.seqop) c:RegisterEffect(e2) end -function s.seqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) @@ -31,5 +27,4 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp) if not tc:IsRelateToEffect(e) or tc:IsControler(tp) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)>>16,2)) -end - +end \ No newline at end of file diff --git a/official/c88406570.lua b/official/c88406570.lua index e868240426..c1c992fd04 100644 --- a/official/c88406570.lua +++ b/official/c88406570.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2) c:EnableReviveLimit() --indes local e1=Effect.CreateEffect(c) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.indtg(e,c) return e:GetHandler():GetLinkedGroup():IsContains(c) end @@ -38,7 +38,7 @@ function s.spfilter1(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spfilter2(c,e,tp,zone) - return c:IsSetCard(0xfc) and not c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) + return c:IsSetCard(SET_GOUKI) and not c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -79,9 +79,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xfc) -end + return not c:IsSetCard(SET_GOUKI) +end \ No newline at end of file diff --git a/official/c88409165.lua b/official/c88409165.lua index e8e10f74a4..ad182aa039 100644 --- a/official/c88409165.lua +++ b/official/c88409165.lua @@ -1,4 +1,5 @@ --アビス・ウォリアー +--Abyss Warrior local s,id=GetID() function s.initial_effect(c) --to hand @@ -19,7 +20,7 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsMonster() and c:IsAbleToDeck() @@ -36,9 +37,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) or Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))==0 then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c88412339.lua b/official/c88412339.lua index 09be19a871..91e0903a70 100644 --- a/official/c88412339.lua +++ b/official/c88412339.lua @@ -21,12 +21,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.pencost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.pentg) e2:SetOperation(s.penop) c:RegisterEffect(e2) end -s.listed_series={0x10ec} +s.listed_series={SET_ABYSS_ACTOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end @@ -40,12 +40,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -function s.pencost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.penfilter(c) - return c:IsSetCard(0x10ec) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.penfilter,tp,LOCATION_DECK,0,1,nil) @@ -66,7 +62,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) @@ -74,17 +70,17 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,2)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x10ec) + return not c:IsSetCard(SET_ABYSS_ACTOR) end function s.aclimit(e,re,tp) local rc=re:GetHandler() diff --git a/official/c88413677.lua b/official/c88413677.lua index ee952d70f8..62740529a5 100644 --- a/official/c88413677.lua +++ b/official/c88413677.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --List "@Ignister" and "A.I." archetypes in the card text -s.listed_series={0x135,0x136} +s.listed_series={SET_IGNISTER,SET_AI} --Check for "@Ignister" monster function s.thfilter(c) - return c:IsSetCard(0x135) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_IGNISTER) and c:IsMonster() and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -60,7 +60,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) end --Check for "A.I." spell/trap function s.thfilter2(c) - return c:IsSetCard(0x136) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_AI) and c:IsSpellTrap() and c:IsAbleToHand() end --Activation legality function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -76,5 +76,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c8842266.lua b/official/c8842266.lua index 073c09523c..7acdeeab12 100644 --- a/official/c8842266.lua +++ b/official/c8842266.lua @@ -1,4 +1,5 @@ --ご隠居の猛毒薬 +--Poison of the Old Man local s,id=GetID() function s.initial_effect(c) --rec or dam @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetLabel()==0 then Duel.Recover(p,d,REASON_EFFECT) else Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8843569.lua b/official/c8843569.lua index 49906a2e2e..4da2d37878 100644 --- a/official/c8843569.lua +++ b/official/c8843569.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,10 +24,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_MZONE,0,nil) return g:GetClassCount(Card.GetOriginalCodeRule)>=2 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) diff --git a/official/c88438982.lua b/official/c88438982.lua index 2c4c7517c9..20b6b09afb 100644 --- a/official/c88438982.lua +++ b/official/c88438982.lua @@ -1,4 +1,5 @@ --ワーム・ディミクレス +--Worm Dimikles local s,id=GetID() function s.initial_effect(c) --flip @@ -15,10 +16,10 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c88453933.lua b/official/c88453933.lua index 6c754277d8..d47ee5ca0c 100644 --- a/official/c88453933.lua +++ b/official/c88453933.lua @@ -1,9 +1,9 @@ --ドラゴンメイド・パルラ ---Dragonmaid Parla +--Parlor Dragonmaid --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - -- mill + --mill local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) @@ -21,16 +21,16 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x133} +s.listed_series={SET_DRAGONMAID} function s.tgfilter(c) - return c:IsSetCard(0x133) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsSetCard(SET_DRAGONMAID) and not c:IsCode(id) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -44,21 +44,21 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:GetLevel()==8 and c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetLevel()==8 and c:IsSetCard(SET_DRAGONMAID) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c88472456.lua b/official/c88472456.lua index 9a38620b94..5e17d3aa72 100644 --- a/official/c88472456.lua +++ b/official/c88472456.lua @@ -1,4 +1,5 @@ --ダーク・ヒーロー ゾンバイア +--Zombyra the Dark local s,id=GetID() function s.initial_effect(c) --cannot direct attack @@ -19,6 +20,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c88477149.lua b/official/c88477149.lua index 55cadabba2..af62762024 100644 --- a/official/c88477149.lua +++ b/official/c88477149.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.nstg) e2:SetOperation(s.nsop) c:RegisterEffect(e2) diff --git a/official/c88482761.lua b/official/c88482761.lua index 61a0cdeff7..676940d2d4 100644 --- a/official/c88482761.lua +++ b/official/c88482761.lua @@ -1,4 +1,5 @@ --ダイスロール・バトル +--Dice Roll Battle local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,21 +20,21 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rmfilter1(c,e,tp) - return c:IsSetCard(0x2016) and c:IsAbleToRemove() + return c:IsSetCard(SET_SPEEDROID) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.rmfilter2,tp,LOCATION_HAND,0,1,nil,e,tp,c:GetOriginalLevel()) end function s.rmfilter2(c,e,tp,lv) - return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() + return c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetOriginalLevel()+lv) end function s.spfilter(c,e,tp,lv) @@ -64,7 +65,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE_STEP + return Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_BATTLE_STEP) end function s.atkfilter(c) return c:IsType(TYPE_SYNCHRO) and c:IsPosition(POS_FACEUP_ATTACK) @@ -90,4 +91,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(c1,c2,true) end end -end +end \ No newline at end of file diff --git a/official/c88494120.lua b/official/c88494120.lua index 776faa9e46..cdf02456c3 100644 --- a/official/c88494120.lua +++ b/official/c88494120.lua @@ -1,4 +1,5 @@ --不屈の闘志 +--Unbreakable Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return aux.StatChangeDamageStepCondition() and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -37,8 +38,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88494899.lua b/official/c88494899.lua index 9f59506c9c..0a432abebb 100644 --- a/official/c88494899.lua +++ b/official/c88494899.lua @@ -1,4 +1,5 @@ --氷結界の交霊師 +--Medium of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --special summon @@ -40,7 +41,7 @@ function s.spcon(e,c) end function s.aclimit1(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_CONTROL+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_CONTROL|RESET_PHASE|PHASE_END,0,1) end function s.aclimit2(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end @@ -51,4 +52,4 @@ function s.econ(e) end function s.elimit(e,te,tp) return te:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c88504133.lua b/official/c88504133.lua index 13ae8f4386..00e991bf7f 100644 --- a/official/c88504133.lua +++ b/official/c88504133.lua @@ -1,5 +1,5 @@ --RUM-ファントム・フォース ---Rank-Up-Magic Phantom Knights' Force +--Phantom Knights' Rank-Up-Magic Force --scripted by AlphaKretin and by edo9300 local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10db,0xba,0x2073} +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_RAIDRAPTOR,SET_XYZ_DRAGON} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end @@ -43,7 +43,7 @@ function s.rmfilter(c) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true,false) end function s.extrafil(c,e,tp) - return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and (c:IsSetCard(0x10db) or c:IsSetCard(0xba) or c:IsSetCard(0x2073)) + return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and (c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) or c:IsSetCard(SET_RAIDRAPTOR) or c:IsSetCard(SET_XYZ_DRAGON)) end function s.fieldfil(c,e) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) and (c:GetRank()>0 or c:IsStatus(STATUS_NO_LEVEL)) and c:IsCanBeEffectTarget(e) @@ -51,7 +51,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local exg=Duel.GetMatchingGroup(s.extrafil,tp,LOCATION_EXTRA,0,nil,e,tp) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.fieldfil(chkc,e) and s.filter1(chkc,e,tp,Group.FromCards(chkc),exg,e:GetLabel()) end - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil) local fg=Duel.GetMatchingGroup(s.fieldfil,tp,LOCATION_MZONE,0,nil,e) local _,maxrel1=fg:GetMinGroup(Card.GetRank) local _,maxrel2=exg:GetMaxGroup(Card.GetRank) @@ -80,7 +80,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ge1:SetDescription(aux.Stringid(id,1)) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -102,4 +102,4 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) end function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_XYZ) -end +end \ No newline at end of file diff --git a/official/c88540324.lua b/official/c88540324.lua index cea44acbc1..0560f2b825 100644 --- a/official/c88540324.lua +++ b/official/c88540324.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x119)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_SALAMANGREAT)) aux.EnableCheckReincarnation(c) --indes local e1=Effect.CreateEffect(c) @@ -26,9 +26,8 @@ function s.initial_effect(c) e4:SetValue(function(e,c) return c:GetLink()-1 end) c:RegisterEffect(e4) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.macon(e) local c=e:GetHandler():GetEquipTarget() - return c:IsSetCard(0x119) and c:IsLinkMonster() and c:IsReincarnationSummoned() -end - + return c:IsSetCard(SET_SALAMANGREAT) and c:IsLinkMonster() and c:IsReincarnationSummoned() +end \ No newline at end of file diff --git a/official/c88544390.lua b/official/c88544390.lua index 7112435c23..ebcc8e14b7 100644 --- a/official/c88544390.lua +++ b/official/c88544390.lua @@ -23,15 +23,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x10db} +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x10db) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -48,13 +48,13 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(1) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10db) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -71,8 +71,8 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88552992.lua b/official/c88552992.lua index 3ec5a5a04d..9442724314 100644 --- a/official/c88552992.lua +++ b/official/c88552992.lua @@ -1,4 +1,5 @@ --先史遺産ゴールデン・シャトル +--Chronomaly Golden Jet local s,id=GetID() function s.initial_effect(c) --lvup @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.lvop) c:RegisterEffect(e1) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.filter(c) - return c:IsFaceup() and c:IsLevelAbove(1) and c:IsSetCard(0x70) + return c:IsFaceup() and c:IsLevelAbove(1) and c:IsSetCard(SET_CHRONOMALY) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -27,7 +28,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88554436.lua b/official/c88554436.lua index a29a17fdae..2cf7f1dbac 100644 --- a/official/c88554436.lua +++ b/official/c88554436.lua @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88559132.lua b/official/c88559132.lua index 0eeb44a25c..7b665dabfb 100644 --- a/official/c88559132.lua +++ b/official/c88559132.lua @@ -36,7 +36,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) e:GetHandler():RegisterEffect(e1) g:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c88581108.lua b/official/c88581108.lua index e2fe97bc2e..6ee2d1dac4 100644 --- a/official/c88581108.lua +++ b/official/c88581108.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetHintTiming(0,TIMING_DRAW_PHASE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -40,7 +40,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetValue(attr) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --All monsters with that Attribute cannot activate their effects local e2=Effect.CreateEffect(c) @@ -50,7 +50,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,1) e2:SetLabel(attr) e2:SetValue(s.aclimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --All monsters with that Attribute cannot attack local e3=Effect.CreateEffect(c) @@ -59,13 +59,13 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e3:SetTargetRange(0,LOCATION_MZONE) e3:SetLabel(attr) e3:SetTarget(s.atktarget) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.aclimit(e,re,tp) local c=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and c:IsAttribute(e:GetLabel()) + return re:IsMonsterEffect() and c:IsAttribute(e:GetLabel()) end function s.atktarget(e,c) return c:IsAttribute(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c88610708.lua b/official/c88610708.lua index 5fb3f6f069..58cb7beb82 100644 --- a/official/c88610708.lua +++ b/official/c88610708.lua @@ -19,4 +19,4 @@ function s.initial_effect(c) end function s.damcon(e) return e:GetHandler():GetEquipTarget():GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c88616795.lua b/official/c88616795.lua index f2a618a03d..61e5c321df 100644 --- a/official/c88616795.lua +++ b/official/c88616795.lua @@ -1,6 +1,5 @@ --トーラの魔導書 --Spellbook of Wisdom - local s,id=GetID() function s.initial_effect(c) --Targeted spellcaster monster becomes unaffected by spells or traps @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.filter(c) @@ -42,13 +41,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(3103) e1:SetValue(s.efilter2) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.efilter1(e,te) - return te:IsActiveType(TYPE_SPELL) and te:GetOwner()~=e:GetOwner() + return te:IsSpellEffect() and te:GetOwner()~=e:GetOwner() end function s.efilter2(e,te) - return te:IsActiveType(TYPE_TRAP) + return te:IsTrapEffect() end \ No newline at end of file diff --git a/official/c88617904.lua b/official/c88617904.lua index 3ade949a7f..014ccaac96 100644 --- a/official/c88617904.lua +++ b/official/c88617904.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x83} +s.listed_series={SET_PUPPET} function s.tgfilter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(3) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) @@ -32,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x83) and c:IsOriginalAttribute(ATTRIBUTE_EARTH) and c:IsOriginalRace(RACE_WARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_PUPPET) and c:IsOriginalAttribute(ATTRIBUTE_EARTH) and c:IsOriginalRace(RACE_WARRIOR) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(ct*100) sc:RegisterEffect(e1) local e2=e1:Clone() @@ -57,4 +57,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) sc:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c88619463.lua b/official/c88619463.lua index 798a378e3d..8b30ea78ef 100644 --- a/official/c88619463.lua +++ b/official/c88619463.lua @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) and Duel.IsChainNegatable(ev) + and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() and Duel.IsChainNegatable(ev) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -74,4 +74,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88643579.lua b/official/c88643579.lua index 6a90a21eaa..1109d6ce47 100644 --- a/official/c88643579.lua +++ b/official/c88643579.lua @@ -1,4 +1,5 @@ --ダークエンド・ドラゴン +--Dark End Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) c:RegisterEffect(e1) @@ -43,4 +44,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c88650530.lua b/official/c88650530.lua index 7f0d2fddf4..7a0b874392 100644 --- a/official/c88650530.lua +++ b/official/c88650530.lua @@ -1,4 +1,5 @@ --ワーム・アポカリプス +--Worm Apocalypse local s,id=GetID() function s.initial_effect(c) --flip @@ -11,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -25,4 +26,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88667504.lua b/official/c88667504.lua index 7be4beeec4..07fe43eb4b 100644 --- a/official/c88667504.lua +++ b/official/c88667504.lua @@ -30,14 +30,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end s.listed_names={96462121,22866836} function s.desfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetPreviousAttributeOnField()==ATTRIBUTE_EARTH and c:GetPreviousRaceOnField()==RACE_MACHINE and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end @@ -66,12 +66,12 @@ function s.setfilter(c) end --Activation legality function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end end --Set "Outrigger Expansion" or "Spin Turn" from deck or GY to S/T zones function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SSet(tp,g) end diff --git a/official/c88671720.lua b/official/c88671720.lua index 6a1471ef90..6094ed1c8b 100644 --- a/official/c88671720.lua +++ b/official/c88671720.lua @@ -1,4 +1,5 @@ --ブラック・ボンバー +--Black Salvo local s,id=GetID() function s.initial_effect(c) --summon success @@ -31,13 +32,13 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c88685329.lua b/official/c88685329.lua index caaa2bf85f..5e6bc4ac53 100644 --- a/official/c88685329.lua +++ b/official/c88685329.lua @@ -1,5 +1,5 @@ --ダークアイ・ナイトメア ---Dark-Eye Nightmare +--Dark Eye Nightmare --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -63,7 +63,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) end elseif lbl==3 then - Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(p,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end end @@ -72,7 +72,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT|REASON_REPLACE) return true else return false end end \ No newline at end of file diff --git a/official/c88686573.lua b/official/c88686573.lua index 8ca7247b56..b4b7bb955b 100644 --- a/official/c88686573.lua +++ b/official/c88686573.lua @@ -1,4 +1,5 @@ --素早いアンコウ +--Nimble Angler local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x78} +s.listed_series={SET_NIMBLE} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_DECK) end function s.filter(c,e,tp) - return c:IsSetCard(0x78) and c:GetCode()~=id and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NIMBLE) and c:GetCode()~=id and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8868767.lua b/official/c8868767.lua index bf7dde9f2c..43378d475f 100644 --- a/official/c8868767.lua +++ b/official/c8868767.lua @@ -23,7 +23,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local res=false if turn_p==tp then - res=Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) + res=Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,nil) else res=Duel.IsPlayerCanDiscardDeck(tp,1) end @@ -43,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetLabel()==tp then --Activated during your turn Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,res,res,nil) + local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,res,res,nil) if #rg==0 then return end if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==res and res==1 then Duel.BreakEffect() @@ -55,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local og=Duel.GetOperatedGroup() if og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)~=res then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil) + local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,1,1,nil) if #rg==0 then return end Duel.BreakEffect() Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) diff --git a/official/c88693151.lua b/official/c88693151.lua index cedfb5df2d..8347f4c310 100644 --- a/official/c88693151.lua +++ b/official/c88693151.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -49,4 +49,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) Duel.RegisterEffect(e3,tp) end -end +end \ No newline at end of file diff --git a/official/c88695895.lua b/official/c88695895.lua index 8f8cbd2359..a35ad8143e 100644 --- a/official/c88695895.lua +++ b/official/c88695895.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCondition(s.atkcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c88696724.lua b/official/c88696724.lua index ba9efebc2f..386013645e 100644 --- a/official/c88696724.lua +++ b/official/c88696724.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.subcon(e) - return e:GetHandler():IsLocation(0x1e) + return e:GetHandler():IsLocation(LOCATION_GRAVE|LOCATION_SZONE|LOCATION_MZONE|LOCATION_HAND) end function s.filter(c,e,tp,m,gc,chkf) return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_EARTH) diff --git a/official/c88722973.lua b/official/c88722973.lua index 811e174a5f..7a1e0f0f4f 100644 --- a/official/c88722973.lua +++ b/official/c88722973.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) end) + e1:SetCondition(function(e) return e:GetHandler():IsXyzSummoned() end) e1:SetTarget(s.regtg) e1:SetOperation(s.regop) c:RegisterEffect(e1) @@ -22,12 +22,12 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0xc7} +s.listed_series={SET_DRACOSLAYER} function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) @@ -39,7 +39,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) @@ -58,7 +58,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 + return c:IsFaceup() and c:IsSetCard(SET_DRACOSLAYER) and c:IsType(TYPE_PENDULUM) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,7 +76,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_BE_MATERIAL) e1:SetValue(aux.cannotmatfilter(SUMMON_TYPE_XYZ)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c88724332.lua b/official/c88724332.lua index a27f3f15f6..cbb980200a 100644 --- a/official/c88724332.lua +++ b/official/c88724332.lua @@ -22,8 +22,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.target(e,c) - return c:IsFaceup() and not c:IsRace(RACE_WYRM) and c:IsSummonType(SUMMON_TYPE_SPECIAL) and (c:GetSummonLocation()&LOCATION_DECK+LOCATION_EXTRA)~=0 + return c:IsFaceup() and not c:IsRace(RACE_WYRM) and c:IsSpecialSummoned() and (c:GetSummonLocation()&LOCATION_DECK|LOCATION_EXTRA)~=0 end function s.defval(e,c) return -c:GetBaseDefense() -end +end \ No newline at end of file diff --git a/official/c88728507.lua b/official/c88728507.lua index 8b25e7631d..a3737d8c22 100644 --- a/official/c88728507.lua +++ b/official/c88728507.lua @@ -18,16 +18,16 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.sumop) c:RegisterEffect(e2) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():IsPreviousControler(tp) end function s.filter(c) - return c:IsSetCard(0x8e) and (c:IsSpellTrap() or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToHand() + return c:IsSetCard(SET_VAMPIRE) and (c:IsSpellTrap() or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -51,9 +51,9 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.ntcon) e1:SetTarget(aux.FieldSummonProcTg(s.nttg)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end end function s.ntcon(e,c,minc) @@ -61,5 +61,5 @@ function s.ntcon(e,c,minc) return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.nttg(e,c) - return c:IsLevelAbove(5) and c:IsSetCard(0x8e) and c:IsAttribute(ATTRIBUTE_DARK) -end + return c:IsLevelAbove(5) and c:IsSetCard(SET_VAMPIRE) and c:IsAttribute(ATTRIBUTE_DARK) +end \ No newline at end of file diff --git a/official/c8873112.lua b/official/c8873112.lua index 57f9aa711d..f5612e1930 100644 --- a/official/c8873112.lua +++ b/official/c8873112.lua @@ -1,4 +1,5 @@ --アーティファクト-チャクラム +--Artifact Chakram local s,id=GetID() function s.initial_effect(c) --set @@ -64,4 +65,4 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) -end +end \ No newline at end of file diff --git a/official/c88733579.lua b/official/c88733579.lua index 353ea5c127..82eeff38a7 100644 --- a/official/c88733579.lua +++ b/official/c88733579.lua @@ -16,10 +16,11 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end function s.operation(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) local tc=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,27911549):GetFirst() if tc then Duel.ShuffleDeck(tp) Duel.MoveToDeckTop(tc) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c88753594.lua b/official/c88753594.lua index 1decfbb260..9500616c52 100644 --- a/official/c88753594.lua +++ b/official/c88753594.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xdf),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT),3) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -36,19 +36,19 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_GRAVE) e4:SetCondition(aux.exccon) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.atktg) e4:SetOperation(s.atkop) e4:SetCountLimit(1,id) c:RegisterEffect(e4) end -s.listed_series={0xdf} -s.material_setcode=0xdf +s.listed_series={SET_LUNALIGHT} +s.material_setcode=SET_LUNALIGHT function s.atkfilter(c) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsRace(RACE_BEASTWARRIOR) end function s.atkval(e,c) - return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)*200 + return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_GRAVE|LOCATION_REMOVED,LOCATION_GRAVE|LOCATION_REMOVED,nil)*200 end function s.atkfilter2(c) return c:IsFaceup() and c:IsType(TYPE_FUSION) @@ -66,8 +66,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(3000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end - +end \ No newline at end of file diff --git a/official/c88753985.lua b/official/c88753985.lua index 942411808a..5b05557974 100644 --- a/official/c88753985.lua +++ b/official/c88753985.lua @@ -1,4 +1,5 @@ --きつね火 +--Fox Fire local s,id=GetID() function s.initial_effect(c) --register @@ -28,7 +29,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -41,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c88754763.lua b/official/c88754763.lua index c414122b2c..109cd29f59 100644 --- a/official/c88754763.lua +++ b/official/c88754763.lua @@ -1,4 +1,5 @@ --CX 熱血指導神アルティメットレーナー +--CXyz Coach Lord Ultimatrainer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.condition) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -28,10 +29,6 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_XYZ) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) @@ -45,4 +42,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Damage(1-tp,800,REASON_EFFECT) end Duel.ShuffleHand(tp) -end +end \ No newline at end of file diff --git a/official/c88757791.lua b/official/c88757791.lua index 56a2de5af7..79b1298659 100644 --- a/official/c88757791.lua +++ b/official/c88757791.lua @@ -32,13 +32,13 @@ function s.initial_effect(c) e4:SetValue(aux.indoval) c:RegisterEffect(e4) end -s.listed_series={0x98} +s.listed_series={SET_MAGICIAN} function s.cfilter(c,tp) return c:IsType(TYPE_PENDULUM) and not c:IsPublic() and Duel.IsExistingTarget(s.scfilter,tp,LOCATION_PZONE,0,1,nil,c) end function s.scfilter(c,pc) - return c:IsSetCard(0x98) and c:GetLeftScale()~=pc:GetLeftScale() + return c:IsSetCard(SET_MAGICIAN) and c:GetLeftScale()~=pc:GetLeftScale() end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and s.scfilter(chkc,e:GetLabelObject()) end @@ -60,7 +60,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(pc:GetLeftScale()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -69,12 +69,12 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) end end function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) end function s.indcon(e) local c=e:GetHandler() - return c:GetFlagEffect(id)~=0 and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:GetFlagEffect(id)~=0 and c:IsPendulumSummoned() end function s.indtg(e,c) - return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM) -end + return c:IsSetCard(SET_MAGICIAN) and c:IsType(TYPE_PENDULUM) +end \ No newline at end of file diff --git a/official/c8875971.lua b/official/c8875971.lua index 832b1902ed..92ca750c2f 100644 --- a/official/c8875971.lua +++ b/official/c8875971.lua @@ -1,4 +1,5 @@ --光天使ウィングス +--Star Seraph Scout local s,id=GetID() function s.initial_effect(c) --spsummon @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STAR_SERAPH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c88760522.lua b/official/c88760522.lua index b81b9ced0b..2d9b0861f1 100644 --- a/official/c88760522.lua +++ b/official/c88760522.lua @@ -1,8 +1,10 @@ --多様進化 +--Evo-Diversity local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -11,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x304e,0x604e} +s.listed_series={SET_EVOLTILE,SET_EVOLSAUR} function s.filter(c) - return c:IsMonster() and (c:IsSetCard(0x304e) or c:IsSetCard(0x604e)) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard({SET_EVOLTILE,SET_EVOLSAUR}) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c88774734.lua b/official/c88774734.lua index bdf9a2e350..750be2de5e 100644 --- a/official/c88774734.lua +++ b/official/c88774734.lua @@ -1,7 +1,6 @@ --螺旋竜バルジ --Galactic Spiral Dragon --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -51,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end @@ -72,7 +71,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(8) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c88789641.lua b/official/c88789641.lua index 9e84089a92..9fb7feeda6 100644 --- a/official/c88789641.lua +++ b/official/c88789641.lua @@ -1,4 +1,5 @@ --ホーリーライフバリアー +--Hallowed Life Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -20,14 +21,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.val) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) end @@ -35,4 +36,4 @@ function s.val(e,re,val,r,rp,rc) if e:GetHandlerPlayer()~=rp then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c88820235.lua b/official/c88820235.lua index 6abc3cdf0a..07aa8bc92b 100644 --- a/official/c88820235.lua +++ b/official/c88820235.lua @@ -1,4 +1,5 @@ --E・HERO シャイニング・フェニックスガイ +--Elemental HERO Shining Phoenix Enforcer local s,id=GetID() function s.initial_effect(c) --fusion material @@ -26,8 +27,8 @@ function s.initial_effect(c) e3:SetValue(s.atkup) c:RegisterEffect(e3) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkup(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3008)*300 -end + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_ELEMENTAL_HERO)*300 +end \ No newline at end of file diff --git a/official/c88836438.lua b/official/c88836438.lua index 95df988ead..2f18bc0493 100644 --- a/official/c88836438.lua +++ b/official/c88836438.lua @@ -1,22 +1,22 @@ --- スプライト・スマッシャーズ --- Splight Smashers --- Scripted by Hatter +--スプライト・スマッシャーズ +--Spright Smashers +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.actcost) e1:SetOperation(s.actop) c:RegisterEffect(e1) end -s.listed_series={0x158,0x17b,0x181} +s.listed_series={SET_SPRINGANS,SET_THERION,SET_SPRIGHT} function s.actcostfilter(c,tp,dsp,gg,rg) - if not ((c:IsSetCard(0x158) or c:IsSetCard(0x17b) or c:IsSetCard(0x181)) and c:IsAbleToRemoveAsCost() + if not ((c:IsSetCard(SET_SPRINGANS) or c:IsSetCard(SET_THERION) or c:IsSetCard(SET_SPRIGHT)) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true))) then return false end return (Duel.GetMZoneCount(tp,c)>0 and (dsp or #(gg-c)>0)) or (rg and #(rg-c)>0) end @@ -28,13 +28,13 @@ function s.rmfilter(c,tp) end function s.actcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - local dsp=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,0x158) - local gg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp,0x17b) + local dsp=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,SET_SPRINGANS) + local gg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp,SET_THERION) local rg=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE,0,nil) or nil - if chk==0 then return Duel.IsExistingMatchingCard(s.actcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,c,tp,dsp,gg,rg) end + if chk==0 then return Duel.IsExistingMatchingCard(s.actcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,c,tp,dsp,gg,rg) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.actcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,1,c,tp,dsp,gg,rg) + local cg=Duel.SelectMatchingCard(tp,s.actcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_MZONE,0,1,1,c,tp,dsp,gg,rg) Duel.Remove(cg,POS_FACEUP,REASON_COST) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local op=Duel.SelectEffect(tp, @@ -58,9 +58,9 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Group.CreateGroup() if op==1 then - g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,0x158) + g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,SET_SPRINGANS) else - g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,0x17b) + g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,SET_THERION) end if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) @@ -76,4 +76,4 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c88845345.lua b/official/c88845345.lua index 54ce34d908..48a75f0439 100644 --- a/official/c88845345.lua +++ b/official/c88845345.lua @@ -1,4 +1,5 @@ --エレファン +--Elephun local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,7 +18,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c) - return c:IsFaceup() and c:IsLevelBelow(3) and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINGEDBEAST) and c:IsAbleToHand() + return c:IsFaceup() and c:IsLevelBelow(3) and c:IsRace(RACE_BEAST|RACE_BEASTWARRIOR|RACE_WINGEDBEAST) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c88851326.lua b/official/c88851326.lua index 2eb1825e7f..95faa09067 100644 --- a/official/c88851326.lua +++ b/official/c88851326.lua @@ -65,8 +65,8 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_HAND) for tc in aux.Next(g) do if tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1) - Duel.RegisterFlagEffect(rp,id,RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET,0,1) + Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) end end end @@ -76,15 +76,14 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if Duel.NegateAttack() and tc and tc:IsRelateToEffect(e) then + if Duel.NegateAttack() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end @@ -121,7 +120,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) if _replace_count>_replace_max then return end @@ -131,4 +130,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88875132.lua b/official/c88875132.lua index 0969432dcd..eb4cf55a13 100644 --- a/official/c88875132.lua +++ b/official/c88875132.lua @@ -50,12 +50,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -71,12 +71,12 @@ function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.atktg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,3)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -106,8 +106,8 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(sg:GetFirst():GetLevel()) oc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c88890658.lua b/official/c88890658.lua index b06be3798b..d36fbcc1ef 100644 --- a/official/c88890658.lua +++ b/official/c88890658.lua @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,SUMMON_BY_NOUVELLES,tp,tp,false,true,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c88901771.lua b/official/c88901771.lua index 8f93ef7e5e..5569dc5087 100644 --- a/official/c88901771.lua +++ b/official/c88901771.lua @@ -34,15 +34,15 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.cttg) e3:SetOperation(s.ctop) c:RegisterEffect(e3) end -s.listed_series={0xbd} +s.listed_series={SET_GAIA_THE_FIERCE_KNIGHT} s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -51,18 +51,18 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(e:GetHandler(),REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0xbd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAIA_THE_FIERCE_KNIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -82,4 +82,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then tc:AddCounter(COUNTER_SPELL,1) end -end +end \ No newline at end of file diff --git a/official/c88919365.lua b/official/c88919365.lua index 153b923afd..de5a65480d 100644 --- a/official/c88919365.lua +++ b/official/c88919365.lua @@ -1,10 +1,10 @@ --- ヴァリアンツの武者-北条 --- Hojo, Warrior of the Valiants --- Scripted by Hatter +--ヴァリアンツの武者-北条 +--Hojo the Vaylantz Warrior +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Return 1 face-up Spell/Trap to hand + --Return 1 face-up Spell/Trap to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -26,8 +26,8 @@ function s.initial_effect(c) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) - -- Fusion Summon 1 "Valiants" monster - local fusparams={aux.FilterBoolFunction(Card.IsSetCard,0x17e),nil,s.fextra} + --Fusion Summon 1 "Valiants" monster + local fusparams={aux.FilterBoolFunction(Card.IsSetCard,SET_VAYLANTZ),nil,s.fextra} local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) @@ -41,9 +41,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_VALIANTS_SHINRABANSHO} -s.listed_series={0x17e} +s.listed_series={SET_VAYLANTZ} function s.spconfilter(c) - return c:IsFaceup() and c:IsSetCard(0x17e) and c:IsAttribute(ATTRIBUTE_WATER) + return c:IsFaceup() and c:IsSetCard(SET_VAYLANTZ) and c:IsAttribute(ATTRIBUTE_WATER) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsEnvironment(CARD_VALIANTS_SHINRABANSHO,PLAYER_ALL,LOCATION_FZONE) @@ -52,7 +52,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then - local zone=(1<0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x107a,TYPES_TOKEN,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_NOBLE_KNIGHT,TYPES_TOKEN,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x107a,TYPES_TOKEN,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_NOBLE_KNIGHT,TYPES_TOKEN,1000,1000,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end @@ -49,17 +49,17 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x107a) + return not c:IsSetCard(SET_NOBLE_KNIGHT) end function s.atkcon(e) local c=e:GetHandler() local eg=c:GetEquipGroup() - return #eg>0 and eg:IsExists(Card.IsSetCard,1,nil,0x207a) + return #eg>0 and eg:IsExists(Card.IsSetCard,1,nil,SET_NOBLE_ARMS) end function s.atktg(e,c) - return c:IsSetCard(0x107a) and c~=e:GetHandler() -end + return c:IsSetCard(SET_NOBLE_KNIGHT) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c88928798.lua b/official/c88928798.lua index ce2526a8bf..8bc32f3676 100644 --- a/official/c88928798.lua +++ b/official/c88928798.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if not (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) or + if not (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect()) or not Duel.IsChainNegatable(ev) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g~=1 then return false end @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88935103.lua b/official/c88935103.lua index ed97390053..c2a2551a9a 100644 --- a/official/c88935103.lua +++ b/official/c88935103.lua @@ -1,4 +1,5 @@ --貴竜の魔術師 +--Nobledragon Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -40,14 +41,14 @@ function s.initial_effect(c) e6:SetCategory(CATEGORY_SPECIAL_SUMMON) e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetType(EFFECT_TYPE_IGNITION) - e6:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e6:SetRange(LOCATION_HAND|LOCATION_GRAVE) e6:SetTarget(s.sptg) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x99,0x98} +s.listed_series={SET_ODD_EYES,SET_MAGICIAN} function s.descon(e) - return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),0x98) + return not Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),SET_MAGICIAN) end function s.synlimit(e,c) if not c then return false end @@ -57,7 +58,7 @@ function s.rdcon(e) return e:GetHandler():IsReason(REASON_MATERIAL) and e:GetHandler():IsReason(REASON_SYNCHRO) and e:GetLabel()==1 end function s.sfilter(c) - return not c:IsSetCard(0x99) + return not c:IsSetCard(SET_ODD_EYES) end function s.valcheck(e,c) if c:GetMaterial():IsExists(s.sfilter,1,e:GetHandler()) then @@ -67,7 +68,7 @@ function s.valcheck(e,c) end end function s.cfilter(c) - return c:IsFaceup() and c:GetLevel()>=7 and c:IsSetCard(0x99) + return c:IsFaceup() and c:GetLevel()>=7 and c:IsSetCard(SET_ODD_EYES) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc) end @@ -85,9 +86,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-3) tc:RegisterEffect(e1) if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c88940154.lua b/official/c88940154.lua index 3c19d60261..300c46910f 100644 --- a/official/c88940154.lua +++ b/official/c88940154.lua @@ -1,4 +1,5 @@ --武神器-ハチ +--Bujingi Centipede local s,id=GetID() function s.initial_effect(c) --destroy @@ -10,20 +11,20 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.descon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and c:IsRace(RACE_BEASTWARRIOR) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and c:IsRace(RACE_BEASTWARRIOR) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end @@ -37,4 +38,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c88942504.lua b/official/c88942504.lua index 288c5f7d44..e10b5fa541 100644 --- a/official/c88942504.lua +++ b/official/c88942504.lua @@ -1,6 +1,5 @@ --管魔人メロメロメロディ --Melomelody the Brass Djinn - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,22 +14,17 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x6d} - +s.listed_series={SET_DJINN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x6d) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_DJINN) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -47,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c88958576.lua b/official/c88958576.lua index 9bc5f6a6e4..8996d44b46 100644 --- a/official/c88958576.lua +++ b/official/c88958576.lua @@ -1,4 +1,5 @@ --ラヴァルバーナー +--Laval Burner local s,id=GetID() function s.initial_effect(c) --special summon @@ -10,11 +11,11 @@ function s.initial_effect(c) e1:SetCondition(s.spcon) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.spcon(e,c) if c==nil then return true end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end - local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39) + local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_LAVAL) local ct=g:GetClassCount(Card.GetCode) return ct>=3 -end +end \ No newline at end of file diff --git a/official/c88962829.lua b/official/c88962829.lua index aa68a38f02..cf2daa604d 100644 --- a/official/c88962829.lua +++ b/official/c88962829.lua @@ -1,4 +1,4 @@ --- +--騎甲虫ライト・フラッパー --Beetrooper Light Flapper --Scripted by Zefile local s,id=GetID() @@ -30,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x172} +s.listed_series={SET_BEETROOPER} function s.thfilter(c,e) - return c:IsSetCard(0x172) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_BEETROOPER) and c:IsMonster() and c:IsFaceup() and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) + local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e) if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_ATOHAND) Duel.SetTargetCard(tg) @@ -52,7 +52,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) @@ -62,7 +62,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(1,0) e2:SetValue(s.aclimit) e2:SetLabel(table.unpack(tg:GetClass(Card.GetCode))) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end end diff --git a/official/c88975532.lua b/official/c88975532.lua index 7beef78f28..f5fab19ae6 100644 --- a/official/c88975532.lua +++ b/official/c88975532.lua @@ -1,4 +1,5 @@ --漆黒の戦士 ワーウルフ +--Pitch-Black Warwolf local s,id=GetID() function s.initial_effect(c) --act limit @@ -14,8 +15,8 @@ function s.initial_effect(c) end function s.con(e) local ph=Duel.GetCurrentPhase() - return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return Duel.IsBattlePhase() end function s.aclimit(e,re,tp) return re:GetHandler():IsTrap() and re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c88989706.lua b/official/c88989706.lua index b06343ee6a..2f1b987702 100644 --- a/official/c88989706.lua +++ b/official/c88989706.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -39,7 +39,7 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToBattle() then - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -64,24 +64,20 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id+1)>=2 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(39711336) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)>0 then g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c88996322.lua b/official/c88996322.lua index 01b75c44e4..04b10d8675 100644 --- a/official/c88996322.lua +++ b/official/c88996322.lua @@ -1,5 +1,5 @@ --- 剣闘獣ウェスパシアス --- Gladiator Beast Vesperseus +--剣闘獣ウェスパシアス +--Gladiator Beast Vespasius local s,id=GetID() function s.initial_effect(c) --special summon @@ -28,21 +28,21 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.spcon2) - e3:SetCost(s.spcost2) + e3:SetCost(Cost.SelfToDeck) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=a:GetBattleTarget() if not d then return false end if a:IsControler(1-tp) then a,d=d,a end - return a:IsControler(tp) and a:IsFaceup() and a:IsSetCard(0x19) and a:GetControler()~=d:GetControler() + return a:IsControler(tp) and a:IsFaceup() and a:IsSetCard(SET_GLADIATOR) and a:GetControler()~=d:GetControler() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -53,36 +53,29 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - c:RegisterFlagEffect(c:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + c:RegisterFlagEffect(c:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end end - function s.atkcon(e) return e:GetHandler():GetFlagEffect(id)>0 end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattledGroupCount()>0 end -function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,2,REASON_COST) -end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,100,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 + if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) - local tc=g:GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,100,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end end \ No newline at end of file diff --git a/official/c89015998.lua b/official/c89015998.lua index 0785c2dab8..e142fdcd57 100644 --- a/official/c89015998.lua +++ b/official/c89015998.lua @@ -1,5 +1,5 @@ --異次元の探求者 ---D.D. Pursuer +--D.D. Seeker --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -27,13 +27,13 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local ct=2 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,ct) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,ct) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END,ct) + e1:SetReset(RESET_PHASE|PHASE_END,ct) e1:SetLabelObject(tc) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -47,5 +47,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end - +end \ No newline at end of file diff --git a/official/c89023486.lua b/official/c89023486.lua index a38c2cb123..c1208d8845 100644 --- a/official/c89023486.lua +++ b/official/c89023486.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c89040386.lua b/official/c89040386.lua index 1ba679d04b..cfa52316b4 100644 --- a/official/c89040386.lua +++ b/official/c89040386.lua @@ -1,4 +1,5 @@ --BF-バックフラッシュ +--Blackwing - Backlash local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.cfilter(c) - return c:IsSetCard(0x33) and c:IsMonster() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,5,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89041555.lua b/official/c89041555.lua index a199c573e5..8f3eaf511e 100644 --- a/official/c89041555.lua +++ b/official/c89041555.lua @@ -1,4 +1,5 @@ --生贄の抱く爆弾 +--Blast Held by a Tribute local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and eg:GetFirst():IsSummonType(SUMMON_TYPE_TRIBUTE) + return Duel.IsTurnPlayer(1-tp) and eg:GetFirst():IsTributeSummoned() end function s.filter(c) return c:IsAttackPos() @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89055154.lua b/official/c89055154.lua index ec86df00fe..01723c86bb 100644 --- a/official/c89055154.lua +++ b/official/c89055154.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_PLAYER) - return dp==tp and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return dp==tp and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.thfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() @@ -33,4 +33,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c89058026.lua b/official/c89058026.lua index 171d89cd2b..79ab783039 100644 --- a/official/c89058026.lua +++ b/official/c89058026.lua @@ -1,14 +1,14 @@ --- EN ウェーブ --- EN Wave --- Scripted by Hatter +--EN ウェーブ +--EN Wave +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - -- Special Summon from Deck + --Special Summon from Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -21,7 +21,7 @@ function s.initial_effect(c) e1:SetTarget(s.dsptg) e1:SetOperation(s.dspop) c:RegisterEffect(e1) - -- Special Summon from GY + --Special Summon from GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -36,16 +36,16 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_NEOS} -s.listed_series={0x3008,0x1f} +s.listed_series={SET_ELEMENTAL_HERO,SET_NEO_SPACIAN} function s.dspconfilter(c,tp) - return c:IsSetCard(0x3008) and c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and c:IsFaceup() and (c:IsMonster() or c:IsPreviousLocation(LOCATION_MZONE)) end function s.dspcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_FUSION)==REASON_FUSION and eg:IsExists(s.dspconfilter,1,nil,tp) end function s.dspfilter(c,e,tp) - return (c:IsSetCard(0x1f) or c:IsCode(CARD_NEOS)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_NEO_SPACIAN) or c:IsCode(CARD_NEOS)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.dsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -61,14 +61,14 @@ function s.dspop(e,tp,eg,ep,ev,re,r,rp) end end function s.gspconfilter(c,tp) - return ((c:IsMonster() and c:IsSetCard(0x1f)) or c:IsCode(CARD_NEOS)) - and c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE+LOCATION_GRAVE) + return ((c:IsMonster() and c:IsSetCard(SET_NEO_SPACIAN)) or c:IsCode(CARD_NEOS)) + and c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE|LOCATION_GRAVE) end function s.gspcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.gspconfilter,1,nil,tp) end function s.gspfilter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.gsptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c89086566.lua b/official/c89086566.lua index c03bbb6d9e..3779d20e61 100644 --- a/official/c89086566.lua +++ b/official/c89086566.lua @@ -33,4 +33,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg) Duel.Destroy(sg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89091772.lua b/official/c89091772.lua index 5bd329c2c5..aa12d7976f 100644 --- a/official/c89091772.lua +++ b/official/c89091772.lua @@ -1,4 +1,5 @@ --超重武者ジシャ-Q +--Superheavy Samurai Magnet local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,9 +20,9 @@ function s.initial_effect(c) e2:SetValue(s.atlimit) c:RegisterEffect(e2) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.filter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -42,4 +43,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) end function s.atlimit(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c8910240.lua b/official/c8910240.lua index f15e8bd02d..6525c173b7 100644 --- a/official/c8910240.lua +++ b/official/c8910240.lua @@ -22,4 +22,4 @@ function s.initial_effect(c) end function s.atkcond(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_INSECT),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c8910971.lua b/official/c8910971.lua index 20c76762bf..dbf36021fc 100644 --- a/official/c8910971.lua +++ b/official/c8910971.lua @@ -1,4 +1,5 @@ --暗黒騎士ガイアロード +--Lord Gaia the Fierce Knight local s,id=GetID() function s.initial_effect(c) --special summon @@ -42,7 +43,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89111398.lua b/official/c89111398.lua index f5ccf13e01..6790c11edb 100644 --- a/official/c89111398.lua +++ b/official/c89111398.lua @@ -32,4 +32,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89112729.lua b/official/c89112729.lua index 4ee498f12e..fb59c961ba 100644 --- a/official/c89112729.lua +++ b/official/c89112729.lua @@ -1,7 +1,8 @@ --メカ・ザウルス +--Cyber Saurus local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,70138455,94119974) -end +end \ No newline at end of file diff --git a/official/c89113320.lua b/official/c89113320.lua index c6cc55c965..be123240ce 100644 --- a/official/c89113320.lua +++ b/official/c89113320.lua @@ -1,4 +1,5 @@ --EMビッグバイトタートル +--Performapal Bit Bite Turtle local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -22,9 +23,9 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x9f,0x99} +s.listed_series={SET_PERFORMAPAL,SET_ODD_EYES} function s.filter(c) - return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and c:IsMonster() + return c:IsSetCard({SET_PERFORMAPAL,SET_ODD_EYES}) and c:IsMonster() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,e:GetHandler()) end @@ -43,7 +44,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) tc:RegisterEffect(e1) end end @@ -57,4 +58,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if bc:IsRelateToBattle() then Duel.Destroy(bc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89127526.lua b/official/c89127526.lua index 1d05a2040f..0a5f442a36 100644 --- a/official/c89127526.lua +++ b/official/c89127526.lua @@ -43,4 +43,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c89132148.lua b/official/c89132148.lua index 908ac5f732..9dc60adf5e 100644 --- a/official/c89132148.lua +++ b/official/c89132148.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -21,14 +21,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) e2:SetCondition(s.thcon) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} function s.filter(c) - return c:IsFaceup() and (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) + return c:IsFaceup() and (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -51,7 +51,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -60,14 +60,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Indes local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.eqlimit(e,c) @@ -76,12 +76,8 @@ end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetEquipTarget() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.thfilter(c) - return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return (c:IsSetCard(SET_PHOTON) or c:IsSetCard(SET_GALAXY)) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -94,5 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c89172051.lua b/official/c89172051.lua index a052cb9868..43ec62de2e 100644 --- a/official/c89172051.lua +++ b/official/c89172051.lua @@ -28,9 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={62265044} -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.spcfilter(c) - return c:IsFaceup() and ((c:IsMonster() and c:IsSetCard(0x29)) or c:IsCode(62265044)) + return c:IsFaceup() and ((c:IsMonster() and c:IsSetCard(SET_DRAGUNITY)) or c:IsCode(62265044)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_ONFIELD,0,1,nil) @@ -46,21 +46,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.descfilter(c) - return c:IsFaceup() and c:IsSetCard(0x29) and c:IsOriginalType(TYPE_MONSTER) + return c:IsFaceup() and c:IsSetCard(SET_DRAGUNITY) and c:IsOriginalType(TYPE_MONSTER) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_SZONE,0,1,nil) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89181134.lua b/official/c89181134.lua index 446a9c22b4..bdafb889c4 100644 --- a/official/c89181134.lua +++ b/official/c89181134.lua @@ -41,4 +41,4 @@ function s.filter(c) end function s.fextra(e,tp,mg) return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(s.filter),tp,0,LOCATION_MZONE,nil) -end +end \ No newline at end of file diff --git a/official/c89181369.lua b/official/c89181369.lua index 13e4199263..62ebd7b5e5 100644 --- a/official/c89181369.lua +++ b/official/c89181369.lua @@ -29,12 +29,12 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then - if not Duel.IsPlayerAffectedByEffect(tp,69832741) + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,rg) end - local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,rg) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) @@ -43,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc or not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end - local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) rg:RemoveCard(tc) if rg:CheckWithSumEqual(Card.GetLevel,tc:GetLevel(),1,99) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(rm,POS_FACEUP,REASON_EFFECT) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c89190953.lua b/official/c89190953.lua index 3f10587d61..e0d5cdf8de 100644 --- a/official/c89190953.lua +++ b/official/c89190953.lua @@ -4,16 +4,16 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.RegisterSummonEff{handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,0x145),extrafil=s.fextra, + local e1=Fusion.RegisterSummonEff{handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_PHANTASM),extrafil=s.fextra, chkf=FUSPROC_NOTFUSION|FUSPROC_LISTEDMATS,stage2=s.stage2,extraop=Fusion.BanishMaterial,extratg=s.extratg} end -s.listed_series={0x145} +s.listed_series={SET_PHANTASM} s.listed_names={6007213,32491822,69890967} function s.chlimit(e,ep,tp) return tp==ep end function s.fextra(e,tp,mg) - if not Duel.IsPlayerAffectedByEffect(tp,69832741) then + if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil) end end @@ -23,7 +23,7 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end @@ -33,5 +33,5 @@ function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,6007213,32491822,69890967),tp,LOCATION_MZONE,0,1,nil) then Duel.SetChainLimit(s.chlimit) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c89194033.lua b/official/c89194033.lua index 0f20fb38d1..e0dfc33e9e 100644 --- a/official/c89194033.lua +++ b/official/c89194033.lua @@ -1,4 +1,5 @@ --聖獣セルケト +--Mystical Beast of Serket local s,id=GetID() function s.initial_effect(c) --selfdestroy @@ -24,9 +25,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_names={29762407} +s.listed_names={CARD_TEMPLE_OF_THE_KINGS} function s.desfilter(c) - return c:IsFaceup() and c:IsCode(29762407) + return c:IsFaceup() and c:IsCode(CARD_TEMPLE_OF_THE_KINGS) end function s.descon(e) return not Duel.IsExistingMatchingCard(s.desfilter,e:GetHandler():GetControler(),LOCATION_SZONE,0,1,nil) @@ -41,6 +42,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c89194103.lua b/official/c89194103.lua index 03e3066835..7c5c9ec581 100644 --- a/official/c89194103.lua +++ b/official/c89194103.lua @@ -1,8 +1,9 @@ --魔轟神獣クダベ +--The Fabled Kudabbi local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x35),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FABLED),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --cannot destroy local e1=Effect.CreateEffect(c) @@ -28,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.indcon(e) return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_HAND,0)==0 end @@ -44,4 +45,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if c:IsFaceup() and c:IsRelateToEffect(e) then Duel.Destroy(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89208725.lua b/official/c89208725.lua index 81619284f6..8e6602b775 100644 --- a/official/c89208725.lua +++ b/official/c89208725.lua @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ActivateFieldSpell(tc,e,tp,eg,ep,ev,re,r,rp) end, aux.Stringid(id,2)) -end +end \ No newline at end of file diff --git a/official/c89211486.lua b/official/c89211486.lua index 43e3559ea9..ec006787fd 100644 --- a/official/c89211486.lua +++ b/official/c89211486.lua @@ -1,4 +1,5 @@ --ジェネクス・ドクター +--Genex Doctor local s,id=GetID() function s.initial_effect(c) --destroy @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89222931.lua b/official/c89222931.lua index fbbe86389f..bc06095b30 100644 --- a/official/c89222931.lua +++ b/official/c89222931.lua @@ -1,4 +1,5 @@ --機械王-プロトタイプ +--Machine King Prototype local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_MACHINE),c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())*100 -end +end \ No newline at end of file diff --git a/official/c89226534.lua b/official/c89226534.lua index a69a438eb0..da999b2642 100644 --- a/official/c89226534.lua +++ b/official/c89226534.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.cannotdestg) e2:SetOperation(s.cannotdesop) c:RegisterEffect(e2) diff --git a/official/c89235196.lua b/official/c89235196.lua index 50a0f0a690..eb9d41b0cd 100644 --- a/official/c89235196.lua +++ b/official/c89235196.lua @@ -1,4 +1,5 @@ --ビッグ・ワン・ウォリアー +--Big One Warrior local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c89238128.lua b/official/c89238128.lua index c2cd092c83..4c88bc3f9a 100644 --- a/official/c89238128.lua +++ b/official/c89238128.lua @@ -1,7 +1,6 @@ --サイバース・アクセラレーター --Cyberse Accelerator --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -36,8 +35,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end @@ -45,7 +43,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atkfilter(c,lg) @@ -67,11 +65,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(2000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end function s.excon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.exfilter(c,lg) return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:GetEffectCount(EFFECT_EXTRA_ATTACK_MONSTER)==0 and lg and lg:IsContains(c) @@ -94,6 +92,6 @@ function s.exop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c89252153.lua b/official/c89252153.lua index c1196e4a58..646a56da53 100644 --- a/official/c89252153.lua +++ b/official/c89252153.lua @@ -1,4 +1,5 @@ --E・HERO ネクロダークマン +--Elemental HERO Necroshade local s,id=GetID() function s.initial_effect(c) --summon with no tribute @@ -14,11 +15,11 @@ function s.initial_effect(c) e1:SetTarget(aux.FieldSummonProcTg(s.nttg)) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.ntcon(e,c,minc) if c==nil then return true end return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 end function s.nttg(e,c) - return c:IsLevelAbove(5) and c:IsSetCard(0x3008) -end + return c:IsLevelAbove(5) and c:IsSetCard(SET_ELEMENTAL_HERO) +end \ No newline at end of file diff --git a/official/c89252157.lua b/official/c89252157.lua index 9d0cfca63c..81348f1e8e 100644 --- a/official/c89252157.lua +++ b/official/c89252157.lua @@ -1,6 +1,5 @@ --薔薇恋人 --Rose Lover - local s,id=GetID() function s.initial_effect(c) --Special summon 1 plant monster from hand @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -37,11 +36,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) e1:SetOwnerPlayer(tp) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end function s.efilter(e,re) - return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActiveType(TYPE_TRAP) + return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsTrapEffect() end \ No newline at end of file diff --git a/official/c89258225.lua b/official/c89258225.lua index 66f890d7e5..80490edad0 100644 --- a/official/c89258225.lua +++ b/official/c89258225.lua @@ -1,4 +1,5 @@ --ハ・デスの使い魔 +--Winged Minion local s,id=GetID() function s.initial_effect(c) --destroy @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_FIEND) end @@ -33,10 +30,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c89258906.lua b/official/c89258906.lua index 4df3dee33e..0dda5844b8 100644 --- a/official/c89258906.lua +++ b/official/c89258906.lua @@ -1,4 +1,5 @@ --BF-そよ風のブリーズ +--Blackwing - Breeze the Zephyr local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,10 +21,10 @@ function s.initial_effect(c) e2:SetValue(s.synlimit) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x33) + return not c:IsSetCard(SET_BLACKWING) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousControler(tp) @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c89310929.lua b/official/c89310929.lua index 4c77ad3be8..e8ade07639 100644 --- a/official/c89310929.lua +++ b/official/c89310929.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -39,6 +39,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c89312388.lua b/official/c89312388.lua index 73b6b8a63e..9db3230e55 100644 --- a/official/c89312388.lua +++ b/official/c89312388.lua @@ -36,7 +36,7 @@ function s.cosoperation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c89320376.lua b/official/c89320376.lua index 56ff9a19de..d469d20f6e 100644 --- a/official/c89320376.lua +++ b/official/c89320376.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) e3:SetOperation(s.posop2) c:RegisterEffect(e3) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then @@ -91,7 +91,7 @@ function s.posop1(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x104) and c:IsMonster() and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_KRAWLER) and c:IsMonster() and c:IsAbleToDeckAsCost() end function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return s.cost(e,tp,eg,ep,ev,re,r,rp,0) @@ -118,4 +118,4 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c89326990.lua b/official/c89326990.lua index a66ed84a8b..00a958f41e 100644 --- a/official/c89326990.lua +++ b/official/c89326990.lua @@ -1,4 +1,5 @@ --SRオハジキッド +--Speedroid Ohajikid local s,id=GetID() function s.initial_effect(c) --special summon @@ -42,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) end -end +end \ No newline at end of file diff --git a/official/c89328238.lua b/official/c89328238.lua index bad9cfe80f..30c7a22d85 100644 --- a/official/c89328238.lua +++ b/official/c89328238.lua @@ -1,4 +1,4 @@ --- +--補強要員 --Backup Team --scripted by Naim local s,id=GetID() @@ -52,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) + return Duel.IsPhase(PHASE_END) and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -68,8 +68,8 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89333528.lua b/official/c89333528.lua index f789a2e067..347c35cfda 100644 --- a/official/c89333528.lua +++ b/official/c89333528.lua @@ -1,4 +1,5 @@ --ジェネクス・ガイア +--Genex Gaia local s,id=GetID() function s.initial_effect(c) --Destroy replace @@ -29,5 +30,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c89355716.lua b/official/c89355716.lua index a2f2155cc2..532bc6da9c 100644 --- a/official/c89355716.lua +++ b/official/c89355716.lua @@ -1,4 +1,5 @@ --晴れの天気模様 +--The Weather Sunny Canvas local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -26,17 +27,17 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.eftg(e,c) local g=e:GetHandler():GetColumnGroup(1,1) - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and c:GetSequence()<5 and g:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and c:GetSequence()<5 and g:IsContains(c) end function s.spcfilter(c,e,tp,ft) return c:IsReleasableByEffect() and (ft>0 or c:GetSequence()<5) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x109) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THE_WEATHER) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) end @@ -49,14 +50,14 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingTarget(s.spcfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.SelectTarget(tp,s.spcfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),e,tp,ft) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsControler(tp) and tc:IsRelateToEffect(e) and Duel.Release(tc,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp,tc:GetCode()) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c89357740.lua b/official/c89357740.lua index 2df9cd8cc0..2af6599575 100644 --- a/official/c89357740.lua +++ b/official/c89357740.lua @@ -59,4 +59,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c89362180.lua b/official/c89362180.lua index d49f214d93..adbbcfc6c0 100644 --- a/official/c89362180.lua +++ b/official/c89362180.lua @@ -49,7 +49,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_ZOMBIE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89397517.lua b/official/c89397517.lua index 04a893da9b..6c50597b99 100644 --- a/official/c89397517.lua +++ b/official/c89397517.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa1,0xa0} +s.listed_series={SET_LEGENDARY_DRAGON,SET_LEGENDARY_KNIGHT} function s.cfilter(c,tp) return c:IsRace(RACE_WARRIOR) and Duel.GetMZoneCount(tp,c)>0 end @@ -25,28 +25,28 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(sg,REASON_COST) end function s.rmfilter(c) - return c:IsSetCard(0xa1) and c:IsSpell() and c:IsAbleToRemove() + return c:IsSetCard(SET_LEGENDARY_DRAGON) and c:IsSpell() and c:IsAbleToRemove() end function s.spfilter(c,e,tp) - return c:IsSetCard(0xa0) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,true) + return c:IsSetCard(SET_LEGENDARY_KNIGHT) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<=0 then return end - local rmg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) + local rmg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,nil) if #rmg==0 then return end local rmct=rmg:GetClassCount(Card.GetCode) - local spg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp) + local spg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,nil,e,tp) if #spg==0 then return end local spct=spg:GetClassCount(Card.GetCode) local ct=math.min(3,ft,spct,rmct) diff --git a/official/c89405199.lua b/official/c89405199.lua index 8a87e8135c..3b98805602 100644 --- a/official/c89405199.lua +++ b/official/c89405199.lua @@ -1,4 +1,5 @@ --グリード +--Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,7 +38,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if ct then c:SetFlagEffectLabel(flag,ct+ev) else - c:RegisterFlagEffect(flag,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,ev) + c:RegisterFlagEffect(flag,RESETS_STANDARD_PHASE_END,0,1,ev) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -65,4 +66,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if ct1 then Duel.Damage(tp,ct1*500,REASON_EFFECT,true) end if ct2 then Duel.Damage(1-tp,ct2*500,REASON_EFFECT,true) end Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c89423971.lua b/official/c89423971.lua index 54644ecfde..1599bcce81 100644 --- a/official/c89423971.lua +++ b/official/c89423971.lua @@ -76,4 +76,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89448140.lua b/official/c89448140.lua index 8b49ddc7af..b3c93c6d79 100644 --- a/official/c89448140.lua +++ b/official/c89448140.lua @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c89450409.lua b/official/c89450409.lua index 511473b935..1c3130c48c 100644 --- a/official/c89450409.lua +++ b/official/c89450409.lua @@ -1,5 +1,5 @@ --疾風のドラグニティ ---Dragunity of the Hurricane +--Dragunity Whirlwind --Logical Nonsense --Substitute ID local s,id=GetID() @@ -18,7 +18,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end --Lists "Dragunity" archetype -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} --Specifically lists itself s.listed_names={id} --If only the opponent controls a monster @@ -28,11 +28,11 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end --Check for a tuner and winged beast among available "Dragunity" monsters function s.spfilter1(c,e,tp) - return c:IsSetCard(0x29) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_DRAGUNITY) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x29) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_WINGEDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -59,17 +59,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() --If opponent controls a monster from the extra deck, synchro summon - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x29),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,nil) local eg=Duel.GetMatchingGroup(s.scfilter,tp,LOCATION_EXTRA,0,nil,mg) if #mg>0 and #eg>0 and Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -85,7 +85,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end diff --git a/official/c89462956.lua b/official/c89462956.lua index 40b2e93dc7..c35bdc265e 100644 --- a/official/c89462956.lua +++ b/official/c89462956.lua @@ -25,10 +25,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if h1>0 or h2>0 then Duel.BreakEffect() end if h1>0 then Duel.ShuffleHand(tp) - Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end if h2>0 then Duel.ShuffleHand(1-tp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c89463537.lua b/official/c89463537.lua index 34466af0c2..e31ea05e33 100644 --- a/official/c89463537.lua +++ b/official/c89463537.lua @@ -1,4 +1,5 @@ --ユニコールの影霊衣 +--Nekroz of Unicore local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.cost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -30,14 +31,10 @@ function s.initial_effect(c) e3:SetTarget(s.distg) c:RegisterEffect(e3) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} s.listed_names={id} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c) - return c:IsSetCard(0xb4) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -54,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.distg(e,c) return c:IsSummonLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c89474727.lua b/official/c89474727.lua index cbefea04d2..2f5ef2bf0d 100644 --- a/official/c89474727.lua +++ b/official/c89474727.lua @@ -1,6 +1,5 @@ --真閃珖竜 スターダスト・クロニクル --Stardust Chronicle Spark Dragon - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -38,14 +37,13 @@ function s.initial_effect(c) end s.synchro_tuner_required=1 s.synchro_nt_required=1 - function s.cfilter(c) return c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.immcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.immop(e,tp,eg,ep,ev,re,r,rp) @@ -58,7 +56,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c89477759.lua b/official/c89477759.lua index 782501c3f7..8fd853d89c 100644 --- a/official/c89477759.lua +++ b/official/c89477759.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetTarget(s.bptg) e2:SetOperation(s.bpop) c:RegisterEffect(e2) @@ -44,10 +44,6 @@ function s.initial_effect(c) end s.listed_names={15862758} s.xyz_number=1000 -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) @@ -102,4 +98,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,0x53b,tp,tp,false,false,POS_FACEUP)>0 and e:GetHandler():IsRelateToEffect(e) then Duel.Overlay(tc,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c89484053.lua b/official/c89484053.lua index 6ebb8044a8..ba0a5d2ddb 100644 --- a/official/c89484053.lua +++ b/official/c89484053.lua @@ -23,15 +23,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(_,tp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.lkfilter) end -s.listed_series={0x119} +s.listed_series={SET_SALAMANGREAT} function s.lkfilter(c) - return not (c:IsLinkMonster() and c:IsSummonType(SUMMON_TYPE_LINK)) + return not (c:IsLinkMonster() and c:IsLinkSummoned()) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)>0 @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdfilter(c) - return c:IsSetCard(0x119) and c:IsAbleToDeck() + return c:IsSetCard(SET_SALAMANGREAT) and c:IsAbleToDeck() end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -64,7 +64,7 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 or Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end - local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if #og==0 then return end if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end Duel.BreakEffect() diff --git a/official/c89493368.lua b/official/c89493368.lua index 18279f43c1..1997f5ea0b 100644 --- a/official/c89493368.lua +++ b/official/c89493368.lua @@ -1,4 +1,5 @@ --サモン・リアクター・AI +--Summon Reactor ・SK local s,id=GetID() function s.initial_effect(c) --damage @@ -48,7 +49,7 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsRelateToEffect(e) end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) end function s.damop(e,tp,eg,ep,ev,re,r,rp) @@ -99,15 +100,15 @@ function s.spfilter(c,e,tp) return c:IsCode(16898077) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,0x13,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,0x13,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c8949584.lua b/official/c8949584.lua index ba24e55e7d..3c71ab520a 100644 --- a/official/c8949584.lua +++ b/official/c8949584.lua @@ -1,4 +1,5 @@ --ヒーローアライブ +--A Hero Lives local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) end function s.filter(c,e,tp) - return c:IsSetCard(0x3008) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c8951260.lua b/official/c8951260.lua index ece6d1ecc7..482672e264 100644 --- a/official/c8951260.lua +++ b/official/c8951260.lua @@ -1,4 +1,5 @@ --正々堂々 +--Respect Play local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.con1(e) end function s.con2(e) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c89516305.lua b/official/c89516305.lua index 0df681ed86..7377f3a1ca 100644 --- a/official/c89516305.lua +++ b/official/c89516305.lua @@ -1,4 +1,5 @@ --No.87 雪月花美神クイーン・オブ・ナイツ +--Number 87: Queen of the Night local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -37,7 +38,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetHintTiming(TIMING_DAMAGE_STEP) - e3:SetCondition(s.atkcon) + e3:SetCondition(aux.StatChangeDamageStepCondition) e3:SetCost(s.cost) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) @@ -65,7 +66,7 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -90,9 +91,6 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -107,7 +105,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89521713.lua b/official/c89521713.lua index e43112581a..b23ef0b36e 100644 --- a/official/c89521713.lua +++ b/official/c89521713.lua @@ -1,4 +1,5 @@ --マドルチェ・クロワンサン +--Madolche Cruffssant local s,id=GetID() function s.initial_effect(c) --to deck @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -34,11 +35,11 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MADOLCHE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.filter(chkc) end @@ -57,7 +58,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_ATTACK) @@ -65,4 +66,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c89529919.lua b/official/c89529919.lua index f33f49f902..3ce839aa68 100644 --- a/official/c89529919.lua +++ b/official/c89529919.lua @@ -1,4 +1,5 @@ --戦士ラーズ +--Field-Commander Rahz local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c8953369.lua b/official/c8953369.lua index 55362f98a7..a4c0c1d14f 100644 --- a/official/c8953369.lua +++ b/official/c8953369.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -29,9 +29,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_KASHTIRA} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.rmvfilter(c) return c:IsMonster() and c:IsAttack(1500) and c:IsDefense(2100) and c:IsAbleToRemove() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) diff --git a/official/c89538537.lua b/official/c89538537.lua index a1b47a7247..f5bce33aa2 100644 --- a/official/c89538537.lua +++ b/official/c89538537.lua @@ -1,4 +1,5 @@ --オルターガイスト・シルキタス +--Altergeist Silquitous local s,id=GetID() function s.initial_effect(c) --to hand @@ -27,9 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.rthcfilter(c) - return c:IsFaceup() and c:IsSetCard(0x103) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToHandAsCost() end function s.rthcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -55,7 +56,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x103) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_ALTERGEIST) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -69,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89544521.lua b/official/c89544521.lua index fb1e972341..d41d3862a1 100644 --- a/official/c89544521.lua +++ b/official/c89544521.lua @@ -1,4 +1,5 @@ --ブンボーグ・ジェット +--Deskbot Jet local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -38,15 +39,15 @@ function s.initial_effect(c) e4:SetOperation(s.desop) c:RegisterEffect(e4) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.val(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0xab),c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*500 + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_DESKBOT),c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*500 end function s.desfilter1(c) - return c:IsFaceup() and c:IsSetCard(0xab) + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xab) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESKBOT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) and s.desfilter1(chkc) end @@ -76,7 +77,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter2(c) - return c:IsFaceup() and c:IsSetCard(0xab) + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) and Duel.IsExistingTarget(Card.IsFaceup,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -94,4 +95,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89547299.lua b/official/c89547299.lua index 6c79136a17..90bc26b626 100644 --- a/official/c89547299.lua +++ b/official/c89547299.lua @@ -1,4 +1,5 @@ --パワー・インジェクター +--Power Injector local s,id=GetID() function s.initial_effect(c) --atkup @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.atkcost) + e1:SetCost(Cost.PayLP(600)) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,600) end - Duel.PayLPCost(tp,600) -end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_PSYCHIC),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end end @@ -29,7 +26,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c8955148.lua b/official/c8955148.lua index 3b00ca1230..cfbc8d7eec 100644 --- a/official/c8955148.lua +++ b/official/c8955148.lua @@ -1,5 +1,5 @@ --リトマスの死儀式 --- Litmus Doom Ritual +--Litmus Doom Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,72566043) @@ -14,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.tdop) c:RegisterEffect(e1) end -s.listed_names={72566043} +s.listed_names={72566043} --"Litmus Doom Swordsman" function s.costfilter(c) return c:IsCode(72566043) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() and chkc:IsControler(tp) and chkc~=e:GetHandler() and Duel.IsPlayerCanDraw(tp,1) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() and chkc:IsControler(tp) and chkc~=e:GetHandler() and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingTarget(s.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) @@ -33,7 +33,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then local g=Group.FromCards(c,tc) - Duel.SendtoDeck(g,nil,0,REASON_EFFECT) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT) Duel.ShuffleDeck(tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) diff --git a/official/c89552119.lua b/official/c89552119.lua index 782ac50da2..514290883f 100644 --- a/official/c89552119.lua +++ b/official/c89552119.lua @@ -1,5 +1,5 @@ --精霊冥騎-急還馬 ---Spirit Cucomeback Horse +--Cucumber Horse --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(s.spcost) @@ -30,9 +30,9 @@ function s.costfilter(c,tp) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,13 +65,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end local fid=c:GetFieldID() for tc in sg:Iter() do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end sg:KeepAlive() --Send the summoned monsters to the GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCountLimit(1) e1:SetLabel(fid) diff --git a/official/c89558743.lua b/official/c89558743.lua index 2c3b5e89bf..ea57525157 100644 --- a/official/c89558743.lua +++ b/official/c89558743.lua @@ -1,9 +1,9 @@ --- スモール・ワールド --- Small World --- Scripted by Hatter +--スモール・ワールド +--Small World +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Banish and search + --Banish and search local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -58,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c89563150.lua b/official/c89563150.lua index 557ce327d4..2e12812205 100644 --- a/official/c89563150.lua +++ b/official/c89563150.lua @@ -1,4 +1,5 @@ --白銀のバリア-シルバーフォース- +--Shining Silver Force local s,id=GetID() function s.initial_effect(c) --Negate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_TRAP) or not Duel.IsChainNegatable(ev) then return false end + if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsTrapEffect() or not Duel.IsChainNegatable(ev) then return false end local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE) if ex then return true end ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER) @@ -35,4 +36,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) g:Merge(eg) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89567993.lua b/official/c89567993.lua index 60973e0a67..501cb0c425 100644 --- a/official/c89567993.lua +++ b/official/c89567993.lua @@ -1,4 +1,5 @@ --アマゾネス訓練生 +--Amazoness Trainee local s,id=GetID() function s.initial_effect(c) --to deck @@ -29,7 +30,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89571015.lua b/official/c89571015.lua index 9e1b3a2342..563f49c5ea 100644 --- a/official/c89571015.lua +++ b/official/c89571015.lua @@ -1,4 +1,5 @@ --ストームサイファー +--Storm Cipher local s,id=GetID() function s.initial_effect(c) --cannot attack directly @@ -30,8 +31,8 @@ function s.immval(e,te) local tc=te:GetHandler() if not (tc:IsLocation(LOCATION_MZONE) or tc:IsPreviousLocation(LOCATION_MZONE)) then return end if tc:IsLocation(LOCATION_MZONE) then - return te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and tc:GetSequence()>4 + return te:IsMonsterEffect() and te:IsActivated() and tc:GetSequence()>4 elseif tc:IsPreviousLocation(LOCATION_MZONE) then - return te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and tc:GetPreviousSequence()>4 + return te:IsMonsterEffect() and te:IsActivated() and tc:GetPreviousSequence()>4 end -end +end \ No newline at end of file diff --git a/official/c89594399.lua b/official/c89594399.lua index 8ae38834a1..eb5ee2e5e6 100644 --- a/official/c89594399.lua +++ b/official/c89594399.lua @@ -1,9 +1,9 @@ --- レプティレス・コアトル --- Reptilianne Coatl --- Scripted by Hatter +--レプティレス・コアトル +--Reptilianne Coatl +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self from hand + --Special Summon self from hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Treat as non-tuner for the Synchro Summmon of a Reptile monster + --Treat as non-tuner for the Synchro Summmon of a Reptile monster local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) diff --git a/official/c89604813.lua b/official/c89604813.lua index 3b27698dac..39d88c84e8 100644 --- a/official/c89604813.lua +++ b/official/c89604813.lua @@ -1,5 +1,5 @@ --青眼の究極霊竜 ---Blue-Eyes Spirit Ultimate Dragon +--Blue-Eyes Ultimate Spirit Dragon --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -61,7 +61,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c89609515.lua b/official/c89609515.lua index bdad152362..d241045da0 100644 --- a/official/c89609515.lua +++ b/official/c89609515.lua @@ -1,4 +1,5 @@ --ラヴァル・フロギス +--Laval Phlogis local s,id=GetID() function s.initial_effect(c) --to grave @@ -10,16 +11,16 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x39} +s.listed_series={SET_LAVAL} function s.operation(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x39),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_LAVAL),tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() for tc in aux.Next(g) do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89617515.lua b/official/c89617515.lua index 71ee2e40ee..4db1f219b7 100644 --- a/official/c89617515.lua +++ b/official/c89617515.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetRange(LOCATION_GRAVE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.bfgcost) + e4:SetCost(Cost.SelfBanish) e4:SetTarget(s.drtg) e4:SetOperation(s.drop) c:RegisterEffect(e4) @@ -63,12 +63,12 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89621922.lua b/official/c89621922.lua index e9846e14de..da67ccac2b 100644 --- a/official/c89621922.lua +++ b/official/c89621922.lua @@ -1,4 +1,5 @@ --N・フレア・スカラベ +--Neo-Spacian Flare Scarab local s,id=GetID() function s.initial_effect(c) --atk up @@ -12,5 +13,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.val(e,c) - return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*400 -end + return Duel.GetMatchingGroupCount(Card.IsSpellTrap,c:GetControler(),0,LOCATION_ONFIELD,nil)*400 +end \ No newline at end of file diff --git a/official/c89628781.lua b/official/c89628781.lua index 9aed8d5f5d..1bf3d53363 100644 --- a/official/c89628781.lua +++ b/official/c89628781.lua @@ -1,7 +1,8 @@ --忍法 空蝉の術 +--Ninjitsu Art of Decoy local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,0x2b)) + aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,SET_NINJA)) --indes local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -12,4 +13,4 @@ function s.initial_effect(c) e1:SetValue(1) c:RegisterEffect(e1) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} \ No newline at end of file diff --git a/official/c8963089.lua b/official/c8963089.lua index 8e664828e3..323792f6db 100644 --- a/official/c8963089.lua +++ b/official/c8963089.lua @@ -48,7 +48,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(function() return Duel.GetTurnCount()~=turn_ct end) e1:SetOperation(s.thop) diff --git a/official/c89642993.lua b/official/c89642993.lua index e89ff0e8e2..fc6824d4df 100644 --- a/official/c89642993.lua +++ b/official/c89642993.lua @@ -1,4 +1,5 @@ --No.63 おしゃもじソルジャー +--Number 63: Shamoji Soldier local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,16 +11,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.efcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.eftg) e1:SetOperation(s.efop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end s.xyz_number=63 -function s.efcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2)) @@ -29,11 +26,11 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) if e:GetLabel()==0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE_START+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE_START|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.drcon) e1:SetOperation(s.drop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) else Duel.Recover(tp,1000,REASON_EFFECT) @@ -41,10 +38,10 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.drop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c89662401.lua b/official/c89662401.lua index 00f09084d6..d71ee6df91 100644 --- a/official/c89662401.lua +++ b/official/c89662401.lua @@ -79,4 +79,4 @@ function s.caop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89662736.lua b/official/c89662736.lua index 73e2b13987..997abeb4c7 100644 --- a/official/c89662736.lua +++ b/official/c89662736.lua @@ -1,4 +1,5 @@ --武神器-ヤタ +--Bujingi Crow local s,id=GetID() function s.initial_effect(c) --negate attack @@ -10,19 +11,15 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.nacon) - e1:SetCost(s.nacost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.natg) e1:SetOperation(s.naop) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.nacon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(0x88) and at:IsRace(RACE_BEASTWARRIOR) -end -function s.nacost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return at:IsControler(tp) and at:IsFaceup() and at:IsSetCard(SET_BUJIN) and at:IsRace(RACE_BEASTWARRIOR) end function s.natg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsOnField() end @@ -34,4 +31,4 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then Duel.Damage(1-tp,a:GetAttack()/2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c8967776.lua b/official/c8967776.lua index ab7df05ad3..0bd47726d6 100644 --- a/official/c8967776.lua +++ b/official/c8967776.lua @@ -1,4 +1,5 @@ --究極時械神セフィロン +--Sephylon, the Ultimate Timelord local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -39,30 +40,30 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) local c=e:GetHandler() local tc=g:GetFirst() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK) e3:SetValue(4000) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) tc:RegisterEffect(e3) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c89698120.lua b/official/c89698120.lua index c2dfe807f8..02f8de32ae 100644 --- a/official/c89698120.lua +++ b/official/c89698120.lua @@ -1,4 +1,5 @@ --華麗なる潜入工作員 +--Tactical Espionage Expert local s,id=GetID() function s.initial_effect(c) --summon success @@ -13,4 +14,4 @@ function s.sumsuc(e,tp,eg,ep,ev,re,r,rp) end function s.chlimit(re,rp,tp) return not re:GetHandler():IsTrap() or not re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c89707961.lua b/official/c89707961.lua index e432222e30..6890fa28d5 100644 --- a/official/c89707961.lua +++ b/official/c89707961.lua @@ -1,5 +1,5 @@ --- Pharaonic Guardian Sphinx --- 王家の守護者スフィンクス +--王家の守護者スフィンクス +--Pharaonic Guardian Sphinx local s,id=GetID() function s.initial_effect(c) --turn set @@ -37,7 +37,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -66,13 +66,13 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEDOWN_DEFENSE) end diff --git a/official/c89719143.lua b/official/c89719143.lua index 25b5011a2e..0be72afe23 100644 --- a/official/c89719143.lua +++ b/official/c89719143.lua @@ -1,4 +1,5 @@ --決戦融合-ファイナル・フュージョン +--Final Fusion local s,id=GetID() function s.initial_effect(c) --Activate @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.RDComplete() end end -end +end \ No newline at end of file diff --git a/official/c8972398.lua b/official/c8972398.lua index 3e95e3ddf7..c5b06f77db 100644 --- a/official/c8972398.lua +++ b/official/c8972398.lua @@ -1,7 +1,6 @@ --妖醒龍ラルバウール --Omni Dragon Brotaur --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon from hand or GY @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -51,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end @@ -72,7 +71,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)~=0 + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc) diff --git a/official/c89731911.lua b/official/c89731911.lua index 7b3adc54f4..d11640b3c5 100644 --- a/official/c89731911.lua +++ b/official/c89731911.lua @@ -1,4 +1,5 @@ --ファミリア・ナイト +--Familiar Knight local s,id=GetID() function s.initial_effect(c) --special summon @@ -38,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(g2:GetFirst(),0,1-tp,1-tp,false,false,POS_FACEUP) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c89739383.lua b/official/c89739383.lua index b1132bdfc0..94dc633012 100644 --- a/official/c89739383.lua +++ b/official/c89739383.lua @@ -1,4 +1,5 @@ --グリモの魔導書 +--Spellbook of Secrets local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.filter(c) - return c:IsSetCard(0x106e) and c:GetCode()~=id and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:GetCode()~=id and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c89743495.lua b/official/c89743495.lua index 9fd5ba6c88..0b975e8508 100644 --- a/official/c89743495.lua +++ b/official/c89743495.lua @@ -1,5 +1,5 @@ --斬機ディヴィジョン ---Processlayer Division +--Mathmech Division --scripted by Logical Nonsense --Substitute ID local s,id=GetID() @@ -28,7 +28,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Part of "Zan-Ki" archetype -s.listed_series={0x132} +s.listed_series={SET_MATHMECH} --Check for your cyberse monster in EMZ function s.costfilter(c,tp) return c:GetSequence()>=5 and c:IsRace(RACE_CYBERSE) and c:IsControler(tp) @@ -46,8 +46,8 @@ end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end --Special summon from hand and/or GY function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -84,8 +84,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89770167.lua b/official/c89770167.lua index cf0d24037d..ccd35a492a 100644 --- a/official/c89770167.lua +++ b/official/c89770167.lua @@ -1,4 +1,5 @@ --炎熱刀プロミネンス +--Prominence, Molten Swordsman local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,22 +12,19 @@ function s.initial_effect(c) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCondition(s.atcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.atcost) e1:SetOperation(s.atop) c:RegisterEffect(e1) end -s.listed_series={0x39} -function s.atcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_LAVAL} function s.cfilter(c) - return c:IsSetCard(0x39) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_LAVAL) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atop(e,tp,eg,ep,ev,re,r,rp) @@ -36,7 +34,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c89771220.lua b/official/c89771220.lua index 6fc5932656..2b1845f4ea 100644 --- a/official/c89771220.lua +++ b/official/c89771220.lua @@ -29,11 +29,11 @@ function s.initial_effect(c) e3:SetCode(CARD_URSARCTIC_DRYTRON) c:RegisterEffect(e3) end -s.listed_names={33250142,89264428,58793369,27693363,97148796} +s.listed_names={33250142,CARD_URSARCTIC_BIG_DIPPER,58793369,27693363,97148796} --"Ultimate Flagship Ursatron", "Ursarctic Big Dipper", "Drytron Fafnir", "Ursarctic Polari", "Drytron Alpha Thuban" s.listed_series={SET_URSARCTIC,SET_DRYTRON} function s.rmfilter(c) - return c:IsCode(89264428,58793369) and c:IsAbleToRemove() + return c:IsCode(CARD_URSARCTIC_BIG_DIPPER,58793369) and c:IsAbleToRemove() end function s.rescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetCode)==2 and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1 diff --git a/official/c89774530.lua b/official/c89774530.lua index 0e3ede4e41..92cc803738 100644 --- a/official/c89774530.lua +++ b/official/c89774530.lua @@ -1,4 +1,5 @@ --H・C ダブル・ランス +--Heroic Challenger - Double Lance local s,id=GetID() function s.initial_effect(c) --spsummon @@ -30,13 +31,13 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end @@ -44,4 +45,4 @@ end function s.xyzlimit(e,c) if not c then return false end return not c:IsRace(RACE_WARRIOR) -end +end \ No newline at end of file diff --git a/official/c8978197.lua b/official/c8978197.lua index 293650225c..a38fa5d6fc 100644 --- a/official/c8978197.lua +++ b/official/c8978197.lua @@ -1,8 +1,8 @@ +--ロード・オブ・ドラゴン-ドラゴンの統制者- --The King of D. ---Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --change name + --This card's name becomes "Lord of D." while on the field local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetValue(17985575) c:RegisterEffect(e1) - --search + --Add 1 "The Flute of Summoning Dragon", "The Melody of Awakening Dragon", or "Dragon Revival Rhapsody" from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -21,12 +21,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end +s.listed_names={17985575,71867500,43973174,48800175} -- "Lord of D.", "The Flute of Summoning Dragon", "The Melody of Awakening Dragon", or "Dragon Revival Rhapsody" function s.cfilter(c) return c:IsSpellTrap() and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return c:IsCode(71867500,43973174,48800175) and c:IsAbleToHand() @@ -42,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c89785779.lua b/official/c89785779.lua index c3875dbfb6..2812777964 100644 --- a/official/c89785779.lua +++ b/official/c89785779.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -27,19 +27,15 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1110} +s.listed_series={SET_EYES_RESTRICT} s.listed_names={64631466} -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c,tp) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler() and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) end function s.eqfilter(c,ec,tp) local eff={c:GetCardEffect(id)} - if c:IsFacedown() or ((not c:IsSetCard(0x1110) or not c:IsType(TYPE_FUSION)) and not c:IsCode(64631466)) then return false end + if c:IsFacedown() or ((not c:IsSetCard(SET_EYES_RESTRICT) or not c:IsType(TYPE_FUSION)) and not c:IsCode(64631466)) then return false end for _,te in ipairs(eff) do if te:GetValue()(ec,c,tp) then return true end end @@ -65,7 +61,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c,e) - return (c:IsSetCard(0x1110) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466) + return (c:IsSetCard(SET_EYES_RESTRICT) and c:IsType(TYPE_FUSION)) or c:IsCode(64631466) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.thfilter,1,nil) @@ -78,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89792713.lua b/official/c89792713.lua index 8c0af42a85..f55b929d88 100644 --- a/official/c89792713.lua +++ b/official/c89792713.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_END|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do if tc:IsFaceup() and tc:IsRelateToBattle() then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end end diff --git a/official/c89801755.lua b/official/c89801755.lua index 1396d33622..beea84f1f1 100644 --- a/official/c89801755.lua +++ b/official/c89801755.lua @@ -7,15 +7,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) @@ -25,7 +21,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(att) Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(rc) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND|LOCATION_DECK) end function s.filter(c,rc,att) return c:IsRace(rc) and c:IsAttribute(att) and c:IsAbleToGrave() @@ -34,8 +30,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local att=e:GetLabel() local p,rc=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(p,s.filter,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,rc,att) + local g=Duel.SelectMatchingCard(p,s.filter,p,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,rc,att) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89810518.lua b/official/c89810518.lua index 00b05d6f82..6ba31d3e5e 100644 --- a/official/c89810518.lua +++ b/official/c89810518.lua @@ -1,6 +1,5 @@ --レプティレス・メデューサ --Reptilianne Medusa - local s,id=GetID() function s.initial_effect(c) --Targeted monster's ATK becomes 0, also cannot change its battle position @@ -35,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Cannot change its battle position local e2=Effect.CreateEffect(e:GetHandler()) @@ -43,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c89818984.lua b/official/c89818984.lua index b41a697bda..2490bed519 100644 --- a/official/c89818984.lua +++ b/official/c89818984.lua @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.synop) c:RegisterEffect(e3) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c,tp) - return c:IsSetCard(0xe6) and c:GetLevel()==11 and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and c:GetLevel()==11 and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -65,7 +65,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) Duel.BreakEffect() - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then @@ -81,4 +81,4 @@ function s.synop(e,tg,ntg,sg,lv,sc,tp) local res=sg:CheckWithSumEqual(Card.GetSynchroLevel,lv,#sg,#sg,sc) or sg:CheckWithSumEqual(function() return 2 end,lv,#sg,#sg) return res,true -end +end \ No newline at end of file diff --git a/official/c89824842.lua b/official/c89824842.lua index 5f16398a88..db8666efce 100644 --- a/official/c89824842.lua +++ b/official/c89824842.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.descon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c89839552.lua b/official/c89839552.lua index 5296af4085..e02b90a6c9 100644 --- a/official/c89839552.lua +++ b/official/c89839552.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg2) e3:SetOperation(s.thop2) c:RegisterEffect(e3) diff --git a/official/c89856523.lua b/official/c89856523.lua index 5b9a56e048..427efeb227 100644 --- a/official/c89856523.lua +++ b/official/c89856523.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE),1,1,Synchro.NonTunerEx(Card.IsSetCard,0x79),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_FIRE),1,1,Synchro.NonTunerEx(Card.IsSetCard,SET_FIRE_FIST),1,99) c:EnableReviveLimit() --set local e1=Effect.CreateEffect(c) @@ -23,12 +23,12 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0x7c,0x79} +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.setcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c89870349.lua b/official/c89870349.lua index 0be07f10eb..c1ad179e10 100644 --- a/official/c89870349.lua +++ b/official/c89870349.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) - e3:SetCost(s.thcost) + e3:SetCost(Cost.PayLP(500)) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -46,14 +46,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.thfilter(c) return c:IsSpellTrap() and c:IsAbleToHand() end @@ -69,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89882100.lua b/official/c89882100.lua index 37c97197b6..ba8f6909f8 100644 --- a/official/c89882100.lua +++ b/official/c89882100.lua @@ -1,4 +1,5 @@ --ナイト・ショット +--Night Beam local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.limit(c) return function (e,lp,tp) return e:GetHandler()~=c end -end +end \ No newline at end of file diff --git a/official/c89883517.lua b/official/c89883517.lua index ab7ef987a6..5e870f4132 100644 --- a/official/c89883517.lua +++ b/official/c89883517.lua @@ -14,8 +14,8 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ct1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD+LOCATION_HAND,0) - local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND) + local ct1=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD|LOCATION_HAND,0) + local ct2=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD|LOCATION_HAND) return ct10 @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,1,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c89907227.lua b/official/c89907227.lua index 51d5e749ee..0f870d2d1b 100644 --- a/official/c89907227.lua +++ b/official/c89907227.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) e2:SetCountLimit(1) e2:SetCondition(s.tkcon2) e2:SetTarget(s.tktg) diff --git a/official/c89914395.lua b/official/c89914395.lua index 11259a77a9..c7ff9f64df 100644 --- a/official/c89914395.lua +++ b/official/c89914395.lua @@ -1,6 +1,5 @@ --ミョルニルの魔槌 --Divine Relic Mjollnir - local s,id=GetID() function s.initial_effect(c) --Targeted "Aesir" monster can make a second attack @@ -11,16 +10,15 @@ function s.initial_effect(c) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.operation) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x4b} - +s.listed_series={SET_AESIR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) + return c:IsFaceup() and c:IsSetCard(SET_AESIR) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -37,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c89928517.lua b/official/c89928517.lua index 13b641d1f5..424f0e5253 100644 --- a/official/c89928517.lua +++ b/official/c89928517.lua @@ -1,5 +1,5 @@ --通販売員 ---Two-Man Salesman +--Two-for-One Team --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -52,4 +52,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(g,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c899287.lua b/official/c899287.lua index 839f144c11..61e21b62b4 100644 --- a/official/c899287.lua +++ b/official/c899287.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.thcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -28,11 +28,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={CARD_STROMBERG} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.thfilter(c) return c:IsCode(CARD_STROMBERG) and c:IsAbleToHand() end @@ -62,4 +57,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c89948817.lua b/official/c89948817.lua index 83730e1a31..a3dcfaa01b 100644 --- a/official/c89948817.lua +++ b/official/c89948817.lua @@ -122,4 +122,4 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) if re:IsMonsterEffect() then Duel.RegisterFlagEffect(rp,id,RESET_PHASE|PHASE_END,0,1) end -end +end \ No newline at end of file diff --git a/official/c89974904.lua b/official/c89974904.lua index 040d477713..d4de15b6bf 100644 --- a/official/c89974904.lua +++ b/official/c89974904.lua @@ -1,4 +1,5 @@ --シンクロコール +--Synchro Call local s,id=GetID() function s.initial_effect(c) --activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c,tc) - return c:IsRace(RACE_DRAGON+RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK) + return c:IsRace(RACE_DRAGON|RACE_FIEND) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsSynchroSummonable(tc) end function s.spfilter(c,e,tp) @@ -34,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -47,4 +48,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SynchroSummon(tp,sg:GetFirst(),tc) end end -end +end \ No newline at end of file diff --git a/official/c89997728.lua b/official/c89997728.lua index b0cbb2e5e8..f5655df08c 100644 --- a/official/c89997728.lua +++ b/official/c89997728.lua @@ -1,4 +1,5 @@ --トゥーンのもくじ +--Toon Table of Contents local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x62} +s.listed_series={SET_TOON} function s.filter(c) - return c:IsSetCard(0x62) and c:IsAbleToHand() + return c:IsSetCard(SET_TOON) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c90000652.lua b/official/c90000652.lua index 64a63ef0d1..f79ad3704e 100644 --- a/official/c90000652.lua +++ b/official/c90000652.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={id} function s.spcfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x18c) and not c:IsCode(id) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_RESCUE_ACE) and not c:IsCode(id) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp) @@ -56,17 +56,17 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsControler,1,nil,1-tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x18c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_RESCUE_ACE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c9000988.lua b/official/c9000988.lua index 597b0fe623..0fc07ce00d 100644 --- a/official/c9000988.lua +++ b/official/c9000988.lua @@ -1,4 +1,5 @@ --EM小判竜 +--Performapal Coin Dragon local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -51,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetOwnerPlayer(tp) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1,true) end end @@ -65,4 +66,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.atktg(e,c) return c:IsRace(RACE_DRAGON) and c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c90011152.lua b/official/c90011152.lua index 45cac4f8b6..a14a678472 100644 --- a/official/c90011152.lua +++ b/official/c90011152.lua @@ -1,4 +1,5 @@ --おジャマ・カントリー +--Ojama Country local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,12 +28,12 @@ function s.initial_effect(c) e3:SetCode(EFFECT_SWAP_BASE_AD) c:RegisterEffect(e3) end -s.listed_series={0xf} +s.listed_series={SET_OJAMA} function s.atcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xf),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_OJAMA),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) end function s.costfilter(c) - return c:IsSetCard(0xf) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_OJAMA) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -41,7 +42,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0xf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_OJAMA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -57,4 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c90019393.lua b/official/c90019393.lua index b897b84204..7c30e14b12 100644 --- a/official/c90019393.lua +++ b/official/c90019393.lua @@ -1,4 +1,5 @@ --ジェムナイト・アレキサンド +--Gem-Knight Alexandrite local s,id=GetID() function s.initial_effect(c) --spsummon @@ -7,18 +8,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1047} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_GEM_KNIGHT} function s.filter(c,e,tp) - return c:IsSetCard(0x1047) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c90020065.lua b/official/c90020065.lua index bb2555e1b5..afeb815eb3 100644 --- a/official/c90020065.lua +++ b/official/c90020065.lua @@ -1,4 +1,5 @@ --タイム・ボマー +--Jigen Bakudan local s,id=GetID() function s.initial_effect(c) --flip @@ -15,22 +16,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.descon) - e1:SetCost(s.descost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.destg) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) c:RegisterEffect(e1) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -43,4 +40,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp,chk) local dam=g:GetSum(Card.GetAttack)/2 Duel.Destroy(g,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90020780.lua b/official/c90020780.lua index 204ddd81c7..ed995f2045 100644 --- a/official/c90020780.lua +++ b/official/c90020780.lua @@ -1,7 +1,6 @@ --シノビネクロ --Shinobi Necro --Scripted by andré - local s,id=GetID() function s.initial_effect(c) --Draw 1, then discard 1 @@ -47,8 +46,8 @@ function s.doperation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)~=0 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) - end + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) + end end function s.spcondition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) and (e:GetHandler():IsReason(REASON_EFFECT) @@ -68,7 +67,7 @@ function s.spoperation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c90036274.lua b/official/c90036274.lua index cb275cc81b..cf8d021da4 100644 --- a/official/c90036274.lua +++ b/official/c90036274.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.discon) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -43,9 +43,9 @@ function s.initial_effect(c) e3:SetOperation(s.penop) c:RegisterEffect(e3) end -s.listed_series={0x2016} +s.listed_series={SET_SPEEDROID} function s.cfilter1(c) - return c:IsFaceup() and c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_SPEEDROID) and c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost() end function s.cfilter2(c) return c:IsFaceup() and (not c:IsType(TYPE_TUNER) or c:IsHasEffect(EFFECT_NONTUNER)) and c:IsAbleToGraveAsCost() @@ -76,9 +76,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.disfilter(c) return c:IsSummonLocation(LOCATION_EXTRA) and not (c:GetAttack()==0 and c:IsDisabled()) end @@ -91,24 +88,24 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end diff --git a/official/c90050480.lua b/official/c90050480.lua index 49f4351ad6..e522efdd44 100644 --- a/official/c90050480.lua +++ b/official/c90050480.lua @@ -21,19 +21,19 @@ function s.initial_effect(c) aux.EnableNeosReturn(c,CATEGORY_DESTROY,s.desinfo,s.desop) end s.listed_names={CARD_NEOS} -s.material_setcode={0x8,0x3008,0x9,0x1f} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO,SET_NEOS,SET_NEO_SPACIAN} function s.ffilter(c,fc,sumtype,tp,sub,mg,sg) - return c:IsSetCard(0x1f,fc,sumtype,tp) and c:GetAttribute(fc,sumtype,tp)~=0 and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetAttribute(fc,sumtype,tp),fc,sumtype,tp)) + return c:IsSetCard(SET_NEO_SPACIAN,fc,sumtype,tp) and c:GetAttribute(fc,sumtype,tp)~=0 and (not sg or not sg:IsExists(s.fusfilter,1,c,c:GetAttribute(fc,sumtype,tp),fc,sumtype,tp)) end function s.fusfilter(c,attr,fc,sumtype,tp) - return c:IsSetCard(0x1f,fc,sumtype,tp) and c:IsAttribute(attr,fc,sumtype,tp) and not c:IsHasEffect(511002961) + return c:IsSetCard(SET_NEO_SPACIAN,fc,sumtype,tp) and c:IsAttribute(attr,fc,sumtype,tp) and not c:IsHasEffect(511002961) end function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) @@ -56,7 +56,7 @@ function s.naop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) @@ -71,5 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c90075978.lua b/official/c90075978.lua index 6c0936de11..cf24603918 100644 --- a/official/c90075978.lua +++ b/official/c90075978.lua @@ -1,4 +1,5 @@ --W星雲隕石 +--W Nebula Meteorite local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCondition(s.setcon) e1:SetOperation(s.setop) Duel.RegisterEffect(e1,tp) @@ -53,4 +54,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg:Select(tp,1,1,nil),0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c900787.lua b/official/c900787.lua index b979db7ffb..a10a54950f 100644 --- a/official/c900787.lua +++ b/official/c900787.lua @@ -30,12 +30,12 @@ function s.cfilter(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 - and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) e:SetLabel(g:GetFirst():GetAttack()) Duel.Remove(g,POS_FACEUP,REASON_COST) - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_DAMAGE,0,1) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90098780.lua b/official/c90098780.lua index e3720e4ad6..89a7f42a2d 100644 --- a/official/c90098780.lua +++ b/official/c90098780.lua @@ -22,14 +22,14 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x6d} +s.listed_series={SET_DJINN} function s.filter(c,e,tp) - return c:IsSetCard(0x6d) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DJINN) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -50,12 +50,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x6d) and c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) + return c:IsFaceup() and c:IsSetCard(SET_DJINN) and c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end @@ -69,7 +65,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90122655.lua b/official/c90122655.lua index 4689e5fa13..2f9b1d29b9 100644 --- a/official/c90122655.lua +++ b/official/c90122655.lua @@ -1,4 +1,5 @@ --天魔大帝 +--Tenmataitei local s,id=GetID() function s.initial_effect(c) --act limit @@ -12,10 +13,10 @@ end function s.chainop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and rc:IsSummonType(SUMMON_TYPE_NORMAL) then + if re:IsMonsterEffect() and loc==LOCATION_MZONE and rc:IsNormalSummoned() then Duel.SetChainLimit(s.chainlm) end end function s.chainlm(e,rp,tp) return tp==rp -end +end \ No newline at end of file diff --git a/official/c90126061.lua b/official/c90126061.lua index d739adeee6..0e537533c6 100644 --- a/official/c90126061.lua +++ b/official/c90126061.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.con) @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_TODECK) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.con) @@ -82,6 +82,6 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c90135989.lua b/official/c90135989.lua index 8b0374de59..0c5272cef7 100644 --- a/official/c90135989.lua +++ b/official/c90135989.lua @@ -12,21 +12,19 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.condition) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.counter_place_list={0x1019} +s.counter_place_list={COUNTER_FOG} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.operation(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do - tc:AddCounter(0x1019,1) + for tc in g:Iter() do + tc:AddCounter(COUNTER_FOG,1) end -end +end \ No newline at end of file diff --git a/official/c90140980.lua b/official/c90140980.lua index 86832da136..3fe9704c7c 100644 --- a/official/c90140980.lua +++ b/official/c90140980.lua @@ -1,4 +1,5 @@ --おジャマ・キング +--Ojama King local s,id=GetID() function s.initial_effect(c) --fusion material @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.disop) c:RegisterEffect(e1) end -s.material_setcode=0xf +s.material_setcode=SET_OJAMA function s.disop(e,tp) local c=Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0) if c==0 then return end @@ -26,4 +27,4 @@ function s.disop(e,tp) end end return dis1 -end +end \ No newline at end of file diff --git a/official/c90147755.lua b/official/c90147755.lua index 0d89bd58a6..0cfb321c7a 100644 --- a/official/c90147755.lua +++ b/official/c90147755.lua @@ -1,4 +1,5 @@ --炎の女暗殺者 +--Lady Assailant of Flames local s,id=GetID() function s.initial_effect(c) --flip @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90156158.lua b/official/c90156158.lua index ee8e0c9d13..0152b8dc80 100644 --- a/official/c90156158.lua +++ b/official/c90156158.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x53} +s.listed_series={SET_CONSTELLAR} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCurrentPhase()~=PHASE_MAIN2 end local e1=Effect.CreateEffect(e:GetHandler()) @@ -21,17 +21,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.filter(c) - return c:IsSetCard(0x53) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CONSTELLAR) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c90161770.lua b/official/c90161770.lua index 5419f96d05..4fc3b13d03 100644 --- a/official/c90161770.lua +++ b/official/c90161770.lua @@ -1,5 +1,5 @@ --B・F-早撃ちのアルバレスト ---Battlewasp – Arbalest the Rapid Fire +--Battlewasp - Arbalest the Rapidfire local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x12f} +s.listed_series={SET_BATTLEWASP} function s.filter(c,e,tp) return c:IsLevelBelow(3) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end @@ -47,18 +47,18 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():GetPreviousControler()==tp end function s.spfilter(c,e,tp) - return c:IsSetCard(0x12f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BATTLEWASP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c90162951.lua b/official/c90162951.lua index 4bce49fdd5..4122587829 100644 --- a/official/c90162951.lua +++ b/official/c90162951.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.destg) e4:SetOperation(s.desop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) @@ -68,4 +68,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) or c:IsFacedown() then return end local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90173539.lua b/official/c90173539.lua index 661afd6d1f..1f98991252 100644 --- a/official/c90173539.lua +++ b/official/c90173539.lua @@ -45,14 +45,14 @@ function s.initial_effect(c) e5:SetRange(LOCATION_GRAVE) e5:SetCountLimit(1,id) e5:SetCondition(s.spcon) - e5:SetCost(aux.bfgcost) + e5:SetCost(Cost.SelfBanish) e5:SetTarget(s.sptg) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.atkcon1(e) - return e:GetHandler():GetFlagEffect(id)~=0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x11a),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return e:GetHandler():GetFlagEffect(id)~=0 and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DINOWRESTLER),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.atktg1(e,c) return c:GetFieldID()~=e:GetLabel() @@ -60,21 +60,21 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():GetFlagEffect(id)~=0 then return end local fid=eg:GetFirst():GetFieldID() - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) e:GetLabelObject():SetLabel(fid) end function s.atktg2(e,c) - return c:IsSetCard(0x11a) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() + return c:IsSetCard(SET_DINOWRESTLER) and Duel.GetTurnPlayer()==e:GetHandlerPlayer() and Duel.GetAttacker()==c end function s.atkcon2(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()~=nil + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget()~=nil end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x11a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOWRESTLER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -88,5 +88,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c90176467.lua b/official/c90176467.lua index d517866bc5..f3dc104983 100644 --- a/official/c90176467.lua +++ b/official/c90176467.lua @@ -1,5 +1,5 @@ --夢魔鏡の逆徒-ネイロイ ---Neiroy, the Dream Mirror Heretic +--Neiroy, the Dream Mirror Traitor --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -21,7 +21,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) - e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetTarget(s.sptg) @@ -29,7 +29,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={18189187,CARD_DREAM_MIRROR_JOY,CARD_DREAM_MIRROR_TERROR} -s.lsited_series={0x131} +s.listed_series={SET_DREAM_MIRROR} function s.thfilter(c) return c:IsCode(18189187) and c:IsAbleToHand() end @@ -53,17 +53,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(ATTRIBUTE_LIGHT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end end function s.spcfilter(c,e,tp) - return c:IsSetCard(0x131) and c:HasLevel() and Duel.GetMZoneCount(tp,c)>0 + return c:IsSetCard(SET_DREAM_MIRROR) and c:HasLevel() and Duel.GetMZoneCount(tp,c)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c) end function s.spfilter(c,e,tp,tc) - return c:IsSetCard(0x131) and not c:IsLevel(tc:GetLevel()) + return c:IsSetCard(SET_DREAM_MIRROR) and not c:IsLevel(tc:GetLevel()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,c) end diff --git a/official/c90179822.lua b/official/c90179822.lua index f0156e07d0..da0db5c2cb 100644 --- a/official/c90179822.lua +++ b/official/c90179822.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -39,11 +39,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return g and g:IsExists(s.disfilter,1,nil,tp) and Duel.IsChainDisablable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not re:GetHandler():IsStatus(STATUS_DISABLED) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) @@ -69,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c90200789.lua b/official/c90200789.lua index 1dfc7da7c5..84aaaf32d7 100644 --- a/official/c90200789.lua +++ b/official/c90200789.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,10 +19,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.filter1(c,tp,slv,ft) local lv1=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x2b) and lv1>0 and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_NINJA) and lv1>0 and (ft>0 or c:GetSequence()<5) and Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_MZONE,1,nil,lv1,slv) end function s.filter2(c,lv1,slv) @@ -30,7 +30,7 @@ function s.filter2(c,lv1,slv) return c:IsFaceup() and lv2>0 and lv1+lv2>=slv end function s.spfilter(c,e,tp,lv) - return c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not lv or c:IsLevelBelow(lv)) + return c:IsRace(RACE_DRAGON|RACE_DINOSAUR|RACE_SEASERPENT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not lv or c:IsLevelBelow(lv)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -78,4 +78,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90207654.lua b/official/c90207654.lua index b6ab212c52..6b6510d295 100644 --- a/official/c90207654.lua +++ b/official/c90207654.lua @@ -37,27 +37,27 @@ function s.initial_effect(c) e3:SetValue(aux.imval1) c:RegisterEffect(e3) end -s.listed_series={0x42,0x4b} +s.listed_series={SET_NORDIC,SET_AESIR} function s.matfilter(c,scard,sumtype,tp) - return c:IsSetCard(0x42,scard,sumtype,tp) and c:IsLevelBelow(5) + return c:IsSetCard(SET_NORDIC,scard,sumtype,tp) and c:IsLevelBelow(5) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x42) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_NORDIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.spcheck(sg,e,tp,mg) return Duel.GetMZoneCount(tp,sg,tp,LOCATION_REASON_TOFIELD)>=#sg and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,#sg,nil,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,1,3,s.spcheck,0) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) local ct=3 if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end local rg=aux.SelectUnselectGroup(g,e,tp,1,ct,s.spcheck,1,tp,HINTMSG_REMOVE) @@ -71,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -79,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() @@ -88,19 +88,19 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,2)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x4b) + return not c:IsSetCard(SET_AESIR) end function s.tgfilter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_AESIR) and c:IsMonster() end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetLinkedGroup():IsExists(s.tgfilter,1,nil) end function s.tgtg(e,c) return s.tgfilter(c) and e:GetHandler():GetLinkedGroup():IsContains(c) -end +end \ No newline at end of file diff --git a/official/c90219263.lua b/official/c90219263.lua index 1302102ece..56d1aac719 100644 --- a/official/c90219263.lua +++ b/official/c90219263.lua @@ -24,15 +24,15 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c90238142.lua b/official/c90238142.lua index bc7f598414..de6f0d8865 100644 --- a/official/c90238142.lua +++ b/official/c90238142.lua @@ -1,4 +1,5 @@ --ハーピィ・チャネラー +--Harpie Channeler local s,id=GetID() function s.initial_effect(c) --special summon @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetValue(CARD_HARPIE_LADY) c:RegisterEffect(e2) --change level @@ -30,17 +31,17 @@ function s.initial_effect(c) e3:SetValue(7) c:RegisterEffect(e3) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} s.listed_names={CARD_HARPIE_LADY} function s.cfilter(c) - return c:IsSetCard(0x64) and c:IsDiscardable() + return c:IsSetCard(SET_HARPIE) and c:IsDiscardable() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0x64) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_HARPIE) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -57,4 +58,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.lvcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_DRAGON),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c90239723.lua b/official/c90239723.lua index 67ecf9713d..1128cee1f7 100644 --- a/official/c90239723.lua +++ b/official/c90239723.lua @@ -1,4 +1,5 @@ --D・リペアユニット +--Morphtronic Repair Unit local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,9 +24,9 @@ function s.initial_effect(c) e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) c:RegisterEffect(e3) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cfilter(c) - return c:IsSetCard(0x26) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -34,7 +35,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -56,12 +57,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Equip(tp,c,tc) --Add Equip limit e:SetLabelObject(tc) - tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD) + tc:CreateRelation(c,RESET_EVENT|RESETS_STANDARD) local e1=Effect.CreateEffect(tc) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -71,4 +72,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9024198.lua b/official/c9024198.lua index e31ea933d6..e443b29928 100644 --- a/official/c9024198.lua +++ b/official/c9024198.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),2) --Must be properly summoned before being revived c:EnableReviveLimit() --Place 2 "D/D" monsters from your Deck to your Pendulum Zones @@ -31,10 +31,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xaf} +s.listed_series={SET_DD} --Check for "D/D" pendulum monsters function s.pcfilter(c) - return c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() + return c:IsSetCard(SET_DD) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end --Activation legality function s.pltg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -55,7 +55,7 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Place 2 "D/D" monsters in your Pendulum Zones local g=Duel.GetMatchingGroup(s.pcfilter,tp,LOCATION_DECK,0,nil) @@ -75,30 +75,30 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) end --Limit special summons to "D/D" monsters for rest of turn function s.splimit(e,c) - return not c:IsSetCard(0xaf) + return not c:IsSetCard(SET_DD) end --Check reason why destroyed and if link summoned function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsReason(REASON_EFFECT) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))) - and c:IsSummonType(SUMMON_TYPE_LINK) and rp==1-tp + and c:IsLinkSummoned() and rp==1-tp end --Check for "D/D" monster in GY or face-up extra deck function s.spfilter(c,e,tp) if c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return false end - return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_EXTRA) end --Performing the effect of special summoning a "D/D" monster from face-up extra deck or GY function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end diff --git a/official/c9024367.lua b/official/c9024367.lua index 1d0e53e4be..9b0cb06501 100644 --- a/official/c9024367.lua +++ b/official/c9024367.lua @@ -1,4 +1,5 @@ --ギャラクシー・ドラグーン +--Galaxy Dragon local s,id=GetID() function s.initial_effect(c) --atklimit @@ -43,21 +44,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local bc=c:GetBattleTarget() if bc and bc:IsRace(RACE_DRAGON) then - c:CreateRelation(bc,RESET_EVENT+RESETS_STANDARD) + c:CreateRelation(bc,RESET_EVENT|RESETS_STANDARD) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetCondition(s.discon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCondition(s.discon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) bc:RegisterEffect(e2) end end function s.discon(e) return e:GetOwner():IsRelateToCard(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c90243945.lua b/official/c90243945.lua index eff9e93994..73c70913f7 100644 --- a/official/c90243945.lua +++ b/official/c90243945.lua @@ -2,15 +2,15 @@ --Wightprincess local s,id=GetID() function s.initial_effect(c) - --Name becomes "Skull Servant" while in GY + --This card's name becomes "Skull Servant" while in the GY local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e1:SetRange(LOCATION_GRAVE) e1:SetCode(EFFECT_CHANGE_CODE) + e1:SetRange(LOCATION_GRAVE) e1:SetValue(CARD_SKULL_SERVANT) c:RegisterEffect(e1) - --If normal or special summoned, send 1 "Wightprince" from deck to GY + --Send 1 "Wightprince" from your Deck to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_TOGRAVE) @@ -23,21 +23,21 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - --Lower ATK/DEF of all monsters on field + --Make all monsters currently on the field lose ATK/DEF equal to their own Level/Rank x 300, until the end of that turn local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetCode(EVENT_FREE_CHAIN) - e4:SetRange(LOCATION_MZONE+LOCATION_HAND) - e4:SetCondition(s.atkcon) - e4:SetCost(s.atkcost) - e4:SetTarget(s.atktg) - e4:SetOperation(s.atkop) + e4:SetRange(LOCATION_MZONE|LOCATION_HAND) + e4:SetCondition(aux.StatChangeDamageStepCondition) + e4:SetCost(Cost.SelfToGrave) + e4:SetTarget(s.atkdeftg) + e4:SetOperation(s.atkdefop) c:RegisterEffect(e4) end -s.listed_names={CARD_SKULL_SERVANT,57473560} +s.listed_names={CARD_SKULL_SERVANT,57473560} --"Wightprince" function s.tgfilter(c) return c:IsCode(57473560) and c:IsAbleToGrave() end @@ -46,36 +46,30 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) - local tg=Duel.GetFirstMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,nil) - if tg then - Duel.SendtoGrave(tg,REASON_EFFECT) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) end end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end -function s.atkfilter(c) - return c:IsFaceup() and (c:GetLevel()>0 or c:GetRank()>0) +function s.atkdeffilter(c) + return (c:HasLevel() or c:HasRank()) and c:IsFaceup() end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end +function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.atkdeffilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do - local val=0 - if tc:IsType(TYPE_XYZ) then val=tc:GetRank()*-300 - else val=tc:GetLevel()*-300 end - local e1=Effect.CreateEffect(e:GetHandler()) +function s.atkdefop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local g=Duel.GetMatchingGroup(s.atkdeffilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) + for tc in g:Iter() do + local val=tc:HasLevel() and tc:GetLevel()*-300 or tc:GetRank()*-300 + --It loses ATK/DEF equal to its own Level/Rank x 300, until the end of this turn + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(val) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) diff --git a/official/c90246973.lua b/official/c90246973.lua index 179809f121..1f264cddc6 100644 --- a/official/c90246973.lua +++ b/official/c90246973.lua @@ -1,4 +1,5 @@ --パワー・ピカクス +--Power Pickaxe local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -19,10 +20,10 @@ function s.rmfilter(c,lv) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ec=e:GetHandler():GetEquipTarget() - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc,ec:GetLevel()) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil,ec:GetLevel()) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc,ec:GetLevel()) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil,ec:GetLevel()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,ec:GetLevel()) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil,ec:GetLevel()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -34,8 +35,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(500) ec:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90247311.lua b/official/c90247311.lua index 8e1af4db66..7b977ed108 100644 --- a/official/c90247311.lua +++ b/official/c90247311.lua @@ -24,16 +24,16 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x2b,0x61} +s.listed_series={SET_NINJA,SET_NINJITSU_ART} function s.splimit(e,se,sp,st) - return (se:IsActiveType(TYPE_MONSTER) and se:GetHandler():IsSetCard(0x2b)) or se:GetHandler():IsSetCard(0x61) + return (se:IsMonsterEffect() and se:GetHandler():IsSetCard(SET_NINJA)) or se:GetHandler():IsSetCard(SET_NINJITSU_ART) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true end function s.cfilter(c) - return ((c:IsMonster() and c:IsSetCard(0x2b)) or c:IsSetCard(0x61)) + return ((c:IsMonster() and c:IsSetCard(SET_NINJA)) or c:IsSetCard(SET_NINJITSU_ART)) and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToGraveAsCost() end @@ -41,7 +41,7 @@ function s.filter(c,e) return c:IsSpellTrap() and (not e or c:IsCanBeEffectTarget(e)) end function s.costfilter(c,rg,dg) - if not (c:IsMonster() and c:IsSetCard(0x2b)) then return false end + if not (c:IsMonster() and c:IsSetCard(SET_NINJA)) then return false end local a=0 if dg:IsContains(c) then a=1 end if c:GetEquipCount()==0 then return rg:IsExists(s.costfilter2,1,c,a,dg) end @@ -54,14 +54,14 @@ function s.costfilter(c,rg,dg) end function s.costfilter2(c,a,dg) if dg:IsContains(c) then a=a+1 end - return c:IsSetCard(0x61) and #dg-a>=1 + return c:IsSetCard(SET_NINJITSU_ART) and #dg-a>=1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end if chk==0 then if e:GetLabel()==1 then e:SetLabel(0) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,nil) local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) return rg:IsExists(s.costfilter,1,nil,rg,dg) else @@ -70,7 +70,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end if e:GetLabel()==1 then e:SetLabel(0) - local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil) + local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,nil) local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local sg1=rg:FilterSelect(tp,s.costfilter,1,1,nil,rg,dg) @@ -97,5 +97,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Destroy(sg,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c90263923.lua b/official/c90263923.lua index 5a5bf99fca..6b74bd90fa 100644 --- a/official/c90263923.lua +++ b/official/c90263923.lua @@ -1,4 +1,5 @@ --シャイニング・アブソーブ +--Leeching the Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,9 +32,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) sc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c9028399.lua b/official/c9028399.lua index f9bf070b31..0397629ec0 100644 --- a/official/c9028399.lua +++ b/official/c9028399.lua @@ -52,4 +52,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c90290572.lua b/official/c90290572.lua index 02856436c1..00f49d68d1 100644 --- a/official/c90290572.lua +++ b/official/c90290572.lua @@ -1,12 +1,12 @@ --- 代行者の近衛 ムーン --- Guard of the Agents - Moon --- Scripted by Hatter +--代行者の近衛 ムーン +--Protector of The Agents - Moon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Fairy Monsters + --2 Fairy Monsters Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsRace,RACE_FAIRY),2,2) - -- Send to GY or add to hand + --Send to GY or add to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -18,7 +18,7 @@ function s.initial_effect(c) e1:SetTarget(s.ghtg) e1:SetOperation(s.ghop) c:RegisterEffect(e1) - -- Destroy + --Destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -34,10 +34,10 @@ end s.listed_names={CARD_SANCTUARY_SKY,91188343} function s.sanct() return Duel.IsEnvironment(CARD_SANCTUARY_SKY) - or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),0,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + or Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),0,LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end function s.ghcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.tgfilter(c) return (c:IsCode(CARD_SANCTUARY_SKY) or c:ListsCode(CARD_SANCTUARY_SKY)) and c:IsAbleToGrave() @@ -48,14 +48,14 @@ end function s.ghtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) - or (s.sanct() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)) + or (s.sanct() and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil)) end Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.ghop(e,tp,eg,ep,ev,re,r,rp) local gg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) - local hg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) + local hg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil) if (#hg>0 and s.sanct()) and (#gg<1 or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=hg:Select(tp,1,1,nil) @@ -90,4 +90,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90299015.lua b/official/c90299015.lua index 95462b03a8..d679e1fac6 100644 --- a/official/c90299015.lua +++ b/official/c90299015.lua @@ -1,9 +1,9 @@ --- ヴァンパイアの幽鬼 --- Vampire Ghost Ogre --- Scripted by Hatter +--ヴァンパイアの幽鬼 +--Vampire Ghost +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Search + --Search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Normal Summon + --Normal Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SUMMON) @@ -30,22 +30,22 @@ function s.initial_effect(c) e2:SetOperation(s.nsop) c:RegisterEffect(e2) end -s.listed_series={0x8e} +s.listed_series={SET_VAMPIRE} function s.thcostfilter(c) - return c:IsSetCard(0x8e) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + return c:IsSetCard(SET_VAMPIRE) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c) end + if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local cg=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c) + local cg=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c) Duel.SendtoGrave(cg,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x8e) and c:IsLevelAbove(4) and c:IsAbleToHand() + return c:IsSetCard(SET_VAMPIRE) and c:IsLevelAbove(4) and c:IsAbleToHand() end function s.tgfilter(c) - return c:IsSetCard(0x8e) and c:IsLevelBelow(2) and c:IsAbleToGrave() + return c:IsSetCard(SET_VAMPIRE) and c:IsLevelBelow(2) and c:IsAbleToGrave() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) @@ -71,16 +71,16 @@ function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.PayLPCost(tp,500) end function s.nsfilter(c) - return c:IsSetCard(0x8e) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_VAMPIRE) and c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end function s.nsop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) - local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.nsfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) if #g>0 then Duel.Summon(tp,g:GetFirst(),true,nil) end -end +end \ No newline at end of file diff --git a/official/c9030160.lua b/official/c9030160.lua index 375b625690..f2338ad5e2 100644 --- a/official/c9030160.lua +++ b/official/c9030160.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e8:SetDescription(aux.Stringid(id,0)) e8:SetCategory(CATEGORY_DAMAGE) e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e8:SetCode(EVENT_PHASE+PHASE_STANDBY) + e8:SetCode(EVENT_PHASE|PHASE_STANDBY) e8:SetRange(LOCATION_SZONE) e8:SetCountLimit(1) e8:SetCondition(s.damcon) @@ -44,23 +44,23 @@ function s.initial_effect(c) e8:SetOperation(s.damop) c:RegisterEffect(e8) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.matlimit(e,c,sumtype,tp) if tp==PLAYER_NONE then tp=c:GetControler() end return e:GetHandlerPlayer()==1-tp end function s.condition(e) - return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,2,nil,0xaf) + return Duel.IsExistingMatchingCard(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_PZONE,0,2,nil,SET_DD) end function s.sumlimit(e,c) if not c then return false end return not c:IsControler(e:GetHandlerPlayer()) end function s.evalue(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==1-e:GetHandlerPlayer() + return re:IsSpellTrapEffect() and rp==1-e:GetHandlerPlayer() end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -72,4 +72,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90303176.lua b/official/c90303176.lua index 73e75319ee..9d3aa52ad4 100644 --- a/official/c90303176.lua +++ b/official/c90303176.lua @@ -27,15 +27,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,0)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_HAND) -end +end \ No newline at end of file diff --git a/official/c90307498.lua b/official/c90307498.lua index 202500cabe..43ca717151 100644 --- a/official/c90307498.lua +++ b/official/c90307498.lua @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c90307777.lua b/official/c90307777.lua index 891495b7bc..4da34cb27d 100644 --- a/official/c90307777.lua +++ b/official/c90307777.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --ritual level - Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsSetCard,0xb4)) + Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsSetCard,SET_NEKROZ)) --tohand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -17,12 +17,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)~=0 end function s.filter(c) - return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -35,4 +35,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c90311614.lua b/official/c90311614.lua index dfce7da13a..2ce9f3dac6 100644 --- a/official/c90311614.lua +++ b/official/c90311614.lua @@ -1,4 +1,5 @@ --氷結界の水影 +--Dewdark of the Ice Barrier local s,id=GetID() function s.initial_effect(c) --direct attack @@ -15,4 +16,4 @@ end function s.dircon(e) local tp=e:GetHandler():GetControler() return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c90312154.lua b/official/c90312154.lua index 48261dcf86..3b3cf08334 100644 --- a/official/c90312154.lua +++ b/official/c90312154.lua @@ -1,5 +1,5 @@ --失われた聖域 ---Lost Sanctuary +--Fallen Sanctuary --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_CHANGE_CODE) - e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_SZONE|LOCATION_GRAVE) e2:SetValue(CARD_SANCTUARY_SKY) c:RegisterEffect(e2) --Negate @@ -82,13 +82,13 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c90315086.lua b/official/c90315086.lua index b4d52fd568..829c114969 100644 --- a/official/c90315086.lua +++ b/official/c90315086.lua @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) diff --git a/official/c9032529.lua b/official/c9032529.lua index 276ebe6b7c..2e610f53fc 100644 --- a/official/c9032529.lua +++ b/official/c9032529.lua @@ -1,4 +1,5 @@ --天使の涙 +--Graceful Tear local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Recover(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90330453.lua b/official/c90330453.lua index 3b4dce2be6..434bf12004 100644 --- a/official/c90330453.lua +++ b/official/c90330453.lua @@ -1,4 +1,5 @@ --魔女狩り +--Last Day of Witch local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90330454.lua b/official/c90330454.lua deleted file mode 100644 index 4595f63794..0000000000 --- a/official/c90330454.lua +++ /dev/null @@ -1,24 +0,0 @@ ---魔女狩り(EU) -local s,id=GetID() -function s.initial_effect(c) - --Activate - local e1=Effect.CreateEffect(c) - e1:SetCategory(CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) - e1:SetTarget(s.target) - e1:SetOperation(s.activate) - c:RegisterEffect(e1) -end -function s.filter(c) - return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() -end -function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end - local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,#sg,0,0) -end -function s.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - Duel.Destroy(sg,REASON_EFFECT) -end diff --git a/official/c90337190.lua b/official/c90337190.lua index 5383713e02..9e0b541d76 100644 --- a/official/c90337190.lua +++ b/official/c90337190.lua @@ -1,4 +1,5 @@ --魚雷魚 +--Torpedo Fish local s,id=GetID() function s.initial_effect(c) --immune spell @@ -16,5 +17,5 @@ function s.econ(e) return Duel.IsEnvironment(CARD_UMI) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end + return te:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c90351981.lua b/official/c90351981.lua index a4edcf0ed2..5b2adde9f6 100644 --- a/official/c90351981.lua +++ b/official/c90351981.lua @@ -1,5 +1,5 @@ --オルフェゴール・バベル ---Orphegel Babel +--Orcustrated Babel --AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -41,5 +41,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c90359458.lua b/official/c90359458.lua index 9dacbafd86..e728a4b527 100644 --- a/official/c90359458.lua +++ b/official/c90359458.lua @@ -1,9 +1,9 @@ --- トップ・シェア --- Top Share --- Scripted by Hatter +--トップ・シェア +--Top Share +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Place on top + --Place on top local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) @@ -33,4 +33,4 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleDeck(1-tp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(1-tp,1) -end +end \ No newline at end of file diff --git a/official/c90361010.lua b/official/c90361010.lua index ef7ad15297..ebb4941eec 100644 --- a/official/c90361010.lua +++ b/official/c90361010.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c90361289.lua b/official/c90361289.lua index 2f15f7e816..1b50759f33 100644 --- a/official/c90361289.lua +++ b/official/c90361289.lua @@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c,e,tp) - return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c:GetAttribute()) + return c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,c:GetAttribute()) end function s.spfilter(c,e,tp,att) return c:IsDefense(c:GetAttack()) and c:IsAttackAbove(0) and c:IsDefenseAbove(0) and c:IsAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) @@ -69,14 +69,14 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND|LOCATION_DECK) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,tc:GetAttribute()) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,tc:GetAttribute()) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c90374791.lua b/official/c90374791.lua index ebbd58a65d..d75234cea9 100644 --- a/official/c90374791.lua +++ b/official/c90374791.lua @@ -1,4 +1,5 @@ --アームド・チェンジャー +--Armed Changer local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,nil,nil,s.cost) @@ -42,4 +43,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c90384300.lua b/official/c90384300.lua index c18a19c34b..21317e3455 100644 --- a/official/c90384300.lua +++ b/official/c90384300.lua @@ -3,9 +3,10 @@ --scripted by andré local s,id=GetID() function s.initial_effect(c) - --activation + --Draw 2 card local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DRAW) + e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -20,8 +21,9 @@ function s.filter(c) and not c:IsSummonableCard() and not c:IsType(TYPE_TOKEN) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,nil) end - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,2,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,2,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_MZONE,0,2,2,nil) Duel.Remove(g,POS_FACEDOWN,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c90397998.lua b/official/c90397998.lua index bbef5e2263..4541ca3c29 100644 --- a/official/c90397998.lua +++ b/official/c90397998.lua @@ -1,4 +1,5 @@ --六武衆-カモン +--The Six Samurai - Kamon local s,id=GetID() function s.initial_effect(c) --destroy @@ -24,9 +25,9 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:GetCode()~=id end function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) @@ -36,7 +37,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetProperty(EFFECT_FLAG_OATH) e:GetHandler():RegisterEffect(e1) end @@ -58,7 +59,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -76,5 +77,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c90407382.lua b/official/c90407382.lua index 02e1c5adb0..89372de58c 100644 --- a/official/c90407382.lua +++ b/official/c90407382.lua @@ -31,4 +31,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Equip(tp,tc,c) end -end +end \ No newline at end of file diff --git a/official/c904185.lua b/official/c904185.lua index 5ecff8f699..126dc5cbb8 100644 --- a/official/c904185.lua +++ b/official/c904185.lua @@ -28,7 +28,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHA_PHANTOM_BEAST,0x101b,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end + if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_MECHA_PHANTOM_BEAST,SET_MECHA_PHANTOM_BEAST,TYPES_TOKEN,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,e:GetLabel(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),tp,0) end @@ -37,11 +37,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if ft<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end if ft0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,-2,-2,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -36,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) --turn set local e2=Effect.CreateEffect(c) @@ -48,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.setcon) e2:SetTarget(s.settg) e2:SetOperation(s.setop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end @@ -61,17 +62,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(Duel.GetAttacker():GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(Duel.GetAttacker():GetDefense()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanTurnSet() end @@ -82,4 +83,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) and c:IsSSetable(true) then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c90448279.lua b/official/c90448279.lua index 2a8e1a8695..91af0eea3b 100644 --- a/official/c90448279.lua +++ b/official/c90448279.lua @@ -13,8 +13,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) - e1:SetCost(aux.dxmcostgen(2,2,nil)) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) + e1:SetCost(Cost.Detach(2,2,nil)) e1:SetTarget(s.gytg) e1:SetOperation(s.gyop) c:RegisterEffect(e1) @@ -42,7 +42,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if (a and a:IsType(TYPE_XYZ)) or (d and d:IsType(TYPE_XYZ)) then - Duel.RegisterFlagEffect(0,id+1,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(0,id+1,RESET_PHASE|PHASE_END,0,1) end end function s.xyzfilter(c,tp,xyzc) @@ -50,7 +50,7 @@ function s.xyzfilter(c,tp,xyzc) end function s.xyzop(e,tp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.GetFlagEffect(0,id+1)>0 end - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true end function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -73,15 +73,15 @@ function s.attfilter(c,e) return not c:IsImmuneToEffect(e) end function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.attfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e) + if chk==0 then return Duel.IsExistingMatchingCard(s.attfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA,0,1,nil,e) and e:GetHandler():IsType(TYPE_XYZ) end end function s.attop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local tc=Duel.SelectMatchingCard(tp,s.attfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.attfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil,e):GetFirst() if tc then Duel.Overlay(c,tc,true) end -end +end \ No newline at end of file diff --git a/official/c90452877.lua b/official/c90452877.lua index 9ad0eef504..724c2d7a16 100644 --- a/official/c90452877.lua +++ b/official/c90452877.lua @@ -1,4 +1,5 @@ --Kozmo-エナジーアーツ +--Kozmojo local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.desfilter(c) - return c:IsFaceup() and c:IsSetCard(0xd2) + return c:IsFaceup() and c:IsSetCard(SET_KOZMO) end function s.rmfilter(c) return c:IsAbleToRemove() and (c:IsLocation(LOCATION_SZONE) or aux.SpElimFilter(c,true,true)) @@ -23,17 +24,17 @@ end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.desfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end + and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD|LOCATION_GRAVE) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then local b1=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) - local b2=not Duel.IsPlayerAffectedByEffect(tp,69832741) + local b2=not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) local op=0 if b1 and b2 then @@ -48,8 +49,8 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) elseif op==1 then g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) else - g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil) + g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_GRAVE,1,1,nil) end Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90464188.lua b/official/c90464188.lua index ae2377a8bf..fd413cbb67 100644 --- a/official/c90464188.lua +++ b/official/c90464188.lua @@ -35,7 +35,7 @@ function s.disfilter(c,tp) return c:IsControler(tp) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_DARK) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end + if not re:IsSpellTrapEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g==0 then return end if g:IsExists(s.disfilter,1,nil,tp) then @@ -43,4 +43,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(re:GetHandler(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c90470931.lua b/official/c90470931.lua index cb1d2e7bc9..01ded535c7 100644 --- a/official/c90470931.lua +++ b/official/c90470931.lua @@ -1,4 +1,5 @@ --鬼神の連撃 +--Oni-Gami Combo local s,id=GetID() function s.initial_effect(c) --multi attack @@ -43,8 +44,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c9047460.lua b/official/c9047460.lua index 06bb73fb6c..206d55367a 100644 --- a/official/c9047460.lua +++ b/official/c9047460.lua @@ -28,11 +28,11 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_SYNCHRO_MAT_RESTRICTION) e4:SetCondition(s.matcon) - e4:SetValue(aux.TargetBoolFunction(Card.IsSetCard,0x33)) + e4:SetValue(aux.TargetBoolFunction(Card.IsSetCard,SET_BLACKWING)) c:RegisterEffect(e4) end s.listed_names={9047461} -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.tkcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK @@ -63,9 +63,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.matcon(e) return e:GetHandler():GetFlagEffect(id)>0 -end +end \ No newline at end of file diff --git a/official/c90488465.lua b/official/c90488465.lua index fb1acb011b..4c93d620f2 100644 --- a/official/c90488465.lua +++ b/official/c90488465.lua @@ -1,7 +1,6 @@ --混沌の創世神 --The Chaos Creator --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -41,8 +40,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -51,7 +50,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() diff --git a/official/c90502999.lua b/official/c90502999.lua index ceb7182872..84092e4fe2 100644 --- a/official/c90502999.lua +++ b/official/c90502999.lua @@ -25,4 +25,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp) return e:GetLabelObject():GetLabel() -end +end \ No newline at end of file diff --git a/official/c90506641.lua b/official/c90506641.lua index f5c683f6f0..0e1fe8cda4 100644 --- a/official/c90506641.lua +++ b/official/c90506641.lua @@ -51,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(sc,REASON_RULE) end Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90508760.lua b/official/c90508760.lua index c6b280d8f7..84d0dc68d2 100644 --- a/official/c90508760.lua +++ b/official/c90508760.lua @@ -1,4 +1,5 @@ --X-セイバー エアベルン +--X-Saber Airbellum local s,id=GetID() function s.initial_effect(c) --handes @@ -23,5 +24,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil) if #g==0 then return end local sg=g:RandomSelect(1-tp,1) - Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT) -end + Duel.SendtoGrave(sg,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c90512490.lua b/official/c90512490.lua index b77a6b5434..a25e88c3e4 100644 --- a/official/c90512490.lua +++ b/official/c90512490.lua @@ -56,5 +56,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c90519313.lua b/official/c90519313.lua index c8893d5a02..9986316653 100644 --- a/official/c90519313.lua +++ b/official/c90519313.lua @@ -1,4 +1,5 @@ --検疫 +--Quarantine local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end -end +end \ No newline at end of file diff --git a/official/c9053187.lua b/official/c9053187.lua index 6e3f1caa5a..77e791697f 100644 --- a/official/c9053187.lua +++ b/official/c9053187.lua @@ -1,7 +1,8 @@ --覚醒の勇士 ガガギゴ +--Gagagigo the Risen local s,id=GetID() function s.initial_effect(c) --xyz summon Xyz.AddProcedure(c,nil,4,3) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c90555947.lua b/official/c90555947.lua index 9cdb084c73..e002ce6226 100644 --- a/official/c90555947.lua +++ b/official/c90555947.lua @@ -44,4 +44,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90557975.lua b/official/c90557975.lua index ddd297e809..007615900b 100644 --- a/official/c90557975.lua +++ b/official/c90557975.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -s.counter_place_list={0x1019} +s.counter_place_list={COUNTER_FOG} function s.filter(c) - return c:GetCounter(0x1019)>0 + return c:GetCounter(COUNTER_FOG)>0 end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -23,9 +23,9 @@ function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) local tc=g:GetFirst() local s=0 for tc in aux.Next(g) do - local ct=tc:GetCounter(0x1019) + local ct=tc:GetCounter(COUNTER_FOG) s=s+ct - tc:RemoveCounter(tp,0x1019,ct,REASON_COST) + tc:RemoveCounter(tp,COUNTER_FOG,ct,REASON_COST) end e:SetLabel(s*300) end @@ -38,4 +38,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9056100.lua b/official/c9056100.lua index c581c2f362..4ae6bfd159 100644 --- a/official/c9056100.lua +++ b/official/c9056100.lua @@ -6,10 +6,10 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetDescription(aux.Stringid(id,0)) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2f)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ICE_BARRIER)) c:RegisterEffect(e1) end -s.listed_series={0x2f} +s.listed_series={SET_ICE_BARRIER} \ No newline at end of file diff --git a/official/c90576781.lua b/official/c90576781.lua index cf19624326..45e68c1fe9 100644 --- a/official/c90576781.lua +++ b/official/c90576781.lua @@ -1,4 +1,5 @@ --レプティレス・ポイズン +--Reptilianne Poison local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3c} +s.listed_series={SET_REPTILIANNE} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x3c),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_REPTILIANNE),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDefensePos() end @@ -30,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90579153.lua b/official/c90579153.lua index 763f63fde7..39197342a6 100644 --- a/official/c90579153.lua +++ b/official/c90579153.lua @@ -1,9 +1,10 @@ --D-HERO ディストピアガイ +--Destiny HERO - Dystopia local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc008),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESTINY_HERO),2) --damage local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -29,10 +30,10 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0xc008} -s.material_setcode={0x8,0xc008} +s.listed_series={SET_DESTINY_HERO} +s.material_setcode={SET_HERO,SET_DESTINY_HERO} function s.filter(c) - return c:IsSetCard(0xc008) and c:IsLevelBelow(4) and c:GetAttack()>0 + return c:IsSetCard(SET_DESTINY_HERO) and c:IsLevelBelow(4) and c:GetAttack()>0 end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -67,7 +68,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90583279.lua b/official/c90583279.lua index 653be5ae0f..42249a31bb 100644 --- a/official/c90583279.lua +++ b/official/c90583279.lua @@ -31,11 +31,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local rg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,true,nil,tp) + local rg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,true,nil,tp) if rg and #rg>0 then rg:KeepAlive() e:SetLabelObject(rg) @@ -66,7 +66,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not tc:IsRelateToEffect(e) or Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end if tc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(tp) end local c=e:GetHandler() - if tc:IsType(TYPE_RITUAL|TYPE_FUSION) and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then + if tc:IsType(TYPE_RITUAL|TYPE_FUSION) and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) elseif tc:IsType(TYPE_SYNCHRO|TYPE_XYZ) and tc:IsLocation(LOCATION_EXTRA) @@ -76,7 +76,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(1000) c:RegisterEffect(e1) end diff --git a/official/c90590303.lua b/official/c90590303.lua index 2a9a47c3e3..2cd7ba0fe1 100644 --- a/official/c90590303.lua +++ b/official/c90590303.lua @@ -1,4 +1,5 @@ --No.41 泥睡魔獣バグースカ +--Number 41: Bagooska the Terribly Tired Tapir local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -8,7 +9,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.mtcon) @@ -48,7 +49,7 @@ function s.initial_effect(c) end s.xyz_number=41 function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) then @@ -72,8 +73,8 @@ end function s.discon(e,tp,eg,ep,ev,re,r,rp) local loc,pos=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION) return e:GetHandler():IsDefensePos() - and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and (pos&POS_DEFENSE)~=0 + and re:IsMonsterEffect() and loc==LOCATION_MZONE and (pos&POS_DEFENSE)~=0 end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c90592429.lua b/official/c90592429.lua index b758a644af..f19335ad59 100644 --- a/official/c90592429.lua +++ b/official/c90592429.lua @@ -1,7 +1,8 @@ --ヴァイロン・フィラメント +--Vylon Filament local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x30)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_VYLON)) --Actlimit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -21,7 +22,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.lmop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetAttacker()~=e:GetHandler():GetEquipTarget() then return end local e1=Effect.CreateEffect(e:GetHandler()) @@ -30,7 +31,7 @@ function s.lmop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) @@ -41,7 +42,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x30) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_VYLON) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c9059700.lua b/official/c9059700.lua index c3b3b7a417..0053316d78 100644 --- a/official/c9059700.lua +++ b/official/c9059700.lua @@ -1,4 +1,5 @@ --インフェルニティ・バリア +--Infernity Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0xb) + return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(SET_INFERNITY) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if ep==tp or not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 then return false end - return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return Duel.IsChainNegatable(ev) and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90616316.lua b/official/c90616316.lua index bf845610a8..682308da2e 100644 --- a/official/c90616316.lua +++ b/official/c90616316.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.op2) c:RegisterEffect(e2) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and (r&REASON_DISCARD)~=0 end @@ -41,7 +41,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and not c:IsPublic() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and not c:IsPublic() end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -51,7 +51,7 @@ function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) Duel.ShuffleHand(tp) end function s.filter2(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsAbleToGrave() end function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil) end @@ -63,4 +63,4 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9061682.lua b/official/c9061682.lua index 6fbb514f83..68263d3f41 100644 --- a/official/c9061682.lua +++ b/official/c9061682.lua @@ -1,8 +1,6 @@ --魔轟神アンドレイス ---Fabled Andraith +--Fabled Andwraith --Logical Nonsense - ---Substitute ID local s,id=GetID() function s.initial_effect(c) --Synchro summon procedure @@ -34,14 +32,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end - --Specifically lists itself s.listed_names={id} - - --Check for "Fabled" monster function s.tfilter(c,lc,stype,tp) - return c:IsSetCard(0x35,lc,stype,tp) + return c:IsSetCard(SET_FABLED,lc,stype,tp) end - --Activation legality function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) @@ -49,13 +43,12 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end - --Draw 2 cards, discard 1 function s.drop(e,tp,eg,ep,ev,re,r,rp) --Opponent can negate this effect by discarding 1 card local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) if #hg>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,3)) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT|REASON_DISCARD,nil) if Duel.IsChainDisablable(0) then Duel.NegateEffect(0) return @@ -65,23 +58,19 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,2,REASON_EFFECT)==2 then Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end - --Check if a monster(s) was sent from opponent's hand function s.cfilter(c,tp) return c:IsMonster() and c:GetPreviousControler()==1-tp and c:IsPreviousLocation(LOCATION_HAND) end - --If it ever happened function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end - --Check for opponent's sent monster in GY/banished function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and s.cfilter(c,tp) and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_GRAVE) end - --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local g=eg:Filter(s.spfilter,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 end @@ -95,7 +84,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetTargetCard(c) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end - --Special summon 1 of opponent's monsters that was sent from hand function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then @@ -103,12 +91,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() end diff --git a/official/c90640901.lua b/official/c90640901.lua index d77352aa06..c8114900fb 100644 --- a/official/c90640901.lua +++ b/official/c90640901.lua @@ -1,4 +1,5 @@ --リバース・バスター +--Reverse Buster local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -53,4 +54,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90642597.lua b/official/c90642597.lua index cb781e01c9..2f153ee394 100644 --- a/official/c90642597.lua +++ b/official/c90642597.lua @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9064354.lua b/official/c9064354.lua index 84dff9ecd9..f6dc1ae764 100644 --- a/official/c9064354.lua +++ b/official/c9064354.lua @@ -28,9 +28,9 @@ function s.cfilter(c) return c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,4 +43,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90654356.lua b/official/c90654356.lua index 3323f1f255..0baa1b352b 100644 --- a/official/c90654356.lua +++ b/official/c90654356.lua @@ -1,4 +1,5 @@ --暗黒プテラ +--Black Ptera local s,id=GetID() function s.initial_effect(c) --to grave @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90659259.lua b/official/c90659259.lua index 6fd753e0d4..2fd93a50c6 100644 --- a/official/c90659259.lua +++ b/official/c90659259.lua @@ -1,5 +1,5 @@ --D・コンバートユニット ---Morphtronic Convert Unit +--Morphtronic Converter --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.spfilter1(c,e,tp,code) - return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) + return c:IsSetCard(SET_MORPHTRONIC) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) end function s.spfilter2(c,e,tp) return c:IsRace(RACE_MACHINE) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -29,6 +29,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() if tc:IsAttackPos() then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) @@ -37,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() diff --git a/official/c90660762.lua b/official/c90660762.lua index 5b25a14dc7..86d91e01b7 100644 --- a/official/c90660762.lua +++ b/official/c90660762.lua @@ -1,4 +1,5 @@ --メテオ・ブラック・ドラゴン +--Meteor Black Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -6,4 +7,4 @@ function s.initial_effect(c) Fusion.AddProcMix(c,true,true,CARD_REDEYES_B_DRAGON,64271667) end s.listed_names={CARD_REDEYES_B_DRAGON} -s.material_setcode=0x3b +s.material_setcode=SET_RED_EYES \ No newline at end of file diff --git a/official/c90664857.lua b/official/c90664857.lua index 5221322aec..9af552cffc 100644 --- a/official/c90664857.lua +++ b/official/c90664857.lua @@ -1,7 +1,6 @@ --電脳堺甲-甲々 ---Datascape Shell - Jiajia +--Virtual World Shell - Jaja --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.indcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.indtg) e1:SetOperation(s.indop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -31,10 +30,6 @@ function s.initial_effect(c) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -51,7 +46,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_OPPO_TURN) tc:RegisterEffect(e1) end end diff --git a/official/c90669991.lua b/official/c90669991.lua index 757bb89336..612103cec5 100644 --- a/official/c90669991.lua +++ b/official/c90669991.lua @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dg=g:Select(1-tp,ct,ct,nil) Duel.HintSelection(dg,true) Duel.Destroy(g-dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90673413.lua b/official/c90673413.lua index 55e4ae1ea8..faa006ed8c 100644 --- a/official/c90673413.lua +++ b/official/c90673413.lua @@ -1,4 +1,5 @@ --ガガガリベンジ +--Gagagarevenge local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,9 +27,9 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.filter(c,e,tp) - return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GAGAGA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) end @@ -80,7 +81,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90681088.lua b/official/c90681088.lua index 789ec51c15..f2e1b8830a 100644 --- a/official/c90681088.lua +++ b/official/c90681088.lua @@ -83,7 +83,7 @@ function s.threg(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,2)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,{id,2}) e1:SetCondition(function() return ct==1 or Duel.GetTurnCount()~=turn_ct end) diff --git a/official/c9069157.lua b/official/c9069157.lua index fd79eac5bc..1c71a0bcb7 100644 --- a/official/c9069157.lua +++ b/official/c9069157.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -25,11 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_series={SET_ROID} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.thfilter(c) return c:IsSetCard(SET_ROID) and c:IsAttributeExcept(ATTRIBUTE_WIND) and c:IsAbleToHand() end @@ -85,7 +80,7 @@ function s.efilter(e,ct) return p==tp and te:IsHasCategory(CATEGORY_FUSION_SUMMON) end function s.limfilter(c,tp) - return c:IsSummonPlayer(tp) and c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsSummonPlayer(tp) and c:IsFusionSummoned() end function s.limcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.limfilter,1,nil,tp) @@ -133,6 +128,6 @@ function s.rcop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_RACE) e1:SetValue(RACE_DRAGON) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end \ No newline at end of file diff --git a/official/c9070454.lua b/official/c9070454.lua index d6666a3428..ffb6703580 100644 --- a/official/c9070454.lua +++ b/official/c9070454.lua @@ -1,5 +1,5 @@ --龍皇の波動 ---Dragon King's Aura +--Draco-Utopian Aura --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and (loc&LOCATION_MZONE)~=0 and ep==1-tp + return Duel.IsChainNegatable(ev) and re:IsMonsterEffect() and (loc&LOCATION_MZONE)~=0 and ep==1-tp end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -48,16 +48,16 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) oc:RegisterEffect(e2) end Duel.SpecialSummonComplete() end end -end +end \ No newline at end of file diff --git a/official/c90711610.lua b/official/c90711610.lua index 711a41abcf..481170f482 100644 --- a/official/c90711610.lua +++ b/official/c90711610.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.detchtg) e2:SetOperation(s.detchop) c:RegisterEffect(e2) diff --git a/official/c90724272.lua b/official/c90724272.lua index 6fb6891bb2..e39c2c3282 100644 --- a/official/c90724272.lua +++ b/official/c90724272.lua @@ -46,9 +46,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -60,5 +60,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local opt=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) Duel.SendtoDeck(e:GetHandler(),nil,opt,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c90726340.lua b/official/c90726340.lua index c9d8066443..88d50d9a6a 100644 --- a/official/c90726340.lua +++ b/official/c90726340.lua @@ -1,6 +1,5 @@ --竜魔人 クィーンドラグーン --Queen Dragun Djinn - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -24,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.spcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,10 +31,6 @@ end function s.indtg(e,c) return c:IsRace(RACE_DRAGON) and c:GetCode()~=id end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsLevelAbove(5) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -54,12 +49,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Cannot attack this turn local e3=Effect.CreateEffect(e:GetHandler()) @@ -67,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CANNOT_ATTACK) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() diff --git a/official/c90727556.lua b/official/c90727556.lua index 6990e941a0..d6166ec23a 100644 --- a/official/c90727556.lua +++ b/official/c90727556.lua @@ -34,10 +34,10 @@ function s.initial_effect(c) e4:SetValue(1) c:RegisterEffect(e4) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():IsSetCard(0x100a) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) + return Duel.IsPhase(PHASE_MAIN1) and not Duel.CheckPhaseActivity() and e:GetHandler():IsSetCard(SET_STEELSWARM) + and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,0,1,nil) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end @@ -45,7 +45,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.splimit) @@ -53,7 +53,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -71,5 +71,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.sumlimit(e,c) - return not c:IsSetCard(0x100a) -end + return not c:IsSetCard(SET_STEELSWARM) +end \ No newline at end of file diff --git a/official/c90740329.lua b/official/c90740329.lua index aa7389b296..45c0667190 100644 --- a/official/c90740329.lua +++ b/official/c90740329.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_MAIN1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -31,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.atklimit) e1:SetLabel(tc:GetRealFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c90743290.lua b/official/c90743290.lua index e0ff428d82..ed6b753de5 100644 --- a/official/c90743290.lua +++ b/official/c90743290.lua @@ -1,4 +1,5 @@ --魔導老士 エアミット +--Hermit of Prophecy local s,id=GetID() function s.initial_effect(c) --atk/lvup @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and re:GetHandler():IsSetCard(0x106e) + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and re:GetHandler():IsSetCard(SET_SPELLBOOK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -21,10 +22,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(300) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c9074847.lua b/official/c9074847.lua index 2bfdf1c59f..95a536f19b 100644 --- a/official/c9074847.lua +++ b/official/c9074847.lua @@ -1,4 +1,5 @@ --大騒動 +--Major Riot local s,id=GetID() function s.initial_effect(c) --Activate @@ -53,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c9076207.lua b/official/c9076207.lua index dbedd70180..f7fb61caca 100644 --- a/official/c9076207.lua +++ b/official/c9076207.lua @@ -1,4 +1,5 @@ --青い忍者 +--Armed Ninja local s,id=GetID() function s.initial_effect(c) --flip @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end if tc:IsSpell() then Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c90764875.lua b/official/c90764875.lua index 57f89210ed..21310fdbb8 100644 --- a/official/c90764875.lua +++ b/official/c90764875.lua @@ -1,4 +1,5 @@ --ゴルゴニック・グール +--Gorgonic Ghoul local s,id=GetID() function s.initial_effect(c) --special summon @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(2,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.PayLP(300)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -21,10 +22,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,300) end - Duel.PayLPCost(tp,300) -end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -34,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c90788081.lua b/official/c90788081.lua index c9384fc87a..ad6bce8522 100644 --- a/official/c90788081.lua +++ b/official/c90788081.lua @@ -28,8 +28,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsFaceup() and c:IsRelateToEffect(e) then local count=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) - if c:UpdateLevel(count,RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END)==count then - return c:UpdateAttack(count*100,RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + if c:UpdateLevel(count,RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END)==count then + return c:UpdateAttack(count*100,RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) end end end @@ -48,10 +48,10 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_NO_TURN_RESET) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 -end +end \ No newline at end of file diff --git a/official/c90790253.lua b/official/c90790253.lua index 30a4337266..6d787181e8 100644 --- a/official/c90790253.lua +++ b/official/c90790253.lua @@ -1,4 +1,5 @@ --リトル・ウィンガード +--Little-Winguard local s,id=GetID() function s.initial_effect(c) --pos change @@ -26,4 +27,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c90809975.lua b/official/c90809975.lua index cb4e6e5e47..2634b38072 100644 --- a/official/c90809975.lua +++ b/official/c90809975.lua @@ -1,5 +1,5 @@ --餅カエル ---Todally Awesome +--Toadally Awesome local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -10,10 +10,10 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -43,9 +43,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) aux.DoubleSnareValidity(c,LOCATION_MZONE) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.spfilter(c,e,tp) - return c:IsSetCard(0x12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FROG) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -63,15 +63,15 @@ end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if ep==tp or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) end function s.cfilter(c) return c:IsRace(RACE_AQUA) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -83,7 +83,7 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end local cat=e:GetCategory() - if dc:GetOriginalType()&TYPE_MONSTER~=0 then + if dc:IsMonsterCard() then e:SetCategory(cat|CATEGORY_SPECIAL_SUMMON) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,dc,1,0,LOCATION_GRAVE) --Ghost Belle requires this location else @@ -94,7 +94,7 @@ end function s.negop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if not Duel.NegateActivation(ev) then return end - if rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) + if rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND|LOCATION_DECK) and aux.nvfilter(rc) then if (rc:IsMonster() and ((rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (not rc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))) @@ -125,4 +125,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90810762.lua b/official/c90810762.lua index 48574d946a..9f19889e14 100644 --- a/official/c90810762.lua +++ b/official/c90810762.lua @@ -1,4 +1,5 @@ --逆巻く炎の精霊 +--Raging Flame Sprite local s,id=GetID() function s.initial_effect(c) --direct attack @@ -27,7 +28,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90812044.lua b/official/c90812044.lua index 0a4a0a4383..90db4c7dff 100644 --- a/official/c90812044.lua +++ b/official/c90812044.lua @@ -1,6 +1,5 @@ --連鎖召喚 --Chain Summon - local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,9 +44,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1,true) - sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + sc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Return it to extra deck during end phase local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -71,5 +70,5 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c90835938.lua b/official/c90835938.lua index 580674a72d..8dff05644e 100644 --- a/official/c90835938.lua +++ b/official/c90835938.lua @@ -1,7 +1,6 @@ --聖夜に煌めく竜 --Starry Night, Starry Dragon --Scripted by edo9300 - local s,id=GetID() function s.initial_effect(c) --If Normal or Special Summoned from hand, destroy 1 card on the field @@ -67,12 +66,12 @@ end function s.banop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local d=Duel.GetAttacker():GetBattleTarget() - if d and d:IsRelateToBattle() and d:IsControler(1-tp) and Duel.Remove(d,0,REASON_EFFECT+REASON_TEMPORARY)>0 then - d:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if d and d:IsRelateToBattle() and d:IsControler(1-tp) and Duel.Remove(d,0,REASON_EFFECT|REASON_TEMPORARY)>0 then + d:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(d) e1:SetCountLimit(1) e1:SetCondition(s.retcon) @@ -85,7 +84,7 @@ function s.banop(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_MZONE) e2:SetOperation(function(e) Duel.ChainAttack() end) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e2) end end @@ -94,4 +93,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c90844184.lua b/official/c90844184.lua index e6245bef3f..1f159415a0 100644 --- a/official/c90844184.lua +++ b/official/c90844184.lua @@ -1,4 +1,5 @@ --ガルマソード +--Garma Sword local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c90861137.lua b/official/c90861137.lua index 74be593e1d..00137405a8 100644 --- a/official/c90861137.lua +++ b/official/c90861137.lua @@ -72,4 +72,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c90873992.lua b/official/c90873992.lua index 87ea1b0536..388d4b001b 100644 --- a/official/c90873992.lua +++ b/official/c90873992.lua @@ -1,4 +1,5 @@ --戦士抹殺 +--Warrior Elimination local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90884403.lua b/official/c90884403.lua index bfa7474b44..36d87fedb9 100644 --- a/official/c90884403.lua +++ b/official/c90884403.lua @@ -1,6 +1,5 @@ --究極幻神 アルティミトル・ビシバールキン --Phantasmal Lord Ultimitl Bishbaalkin - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -133,7 +132,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c90885155.lua b/official/c90885155.lua index 3ae7e3861f..b5eefb74d7 100644 --- a/official/c90885155.lua +++ b/official/c90885155.lua @@ -1,4 +1,5 @@ --クリフォート・シェル +--Qliphort Shell local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -64,9 +65,9 @@ function s.initial_effect(c) e9:SetLabelObject(e8) c:RegisterEffect(e9) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -104,7 +105,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -112,14 +113,14 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e2) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.effop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -127,19 +128,19 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_PIERCE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0xaa) then + if g:IsExists(Card.IsSetCard,1,nil,SET_QLI) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end -end +end \ No newline at end of file diff --git a/official/c90925163.lua b/official/c90925163.lua index 6b6ee8d3bd..6b8efcad0a 100644 --- a/official/c90925163.lua +++ b/official/c90925163.lua @@ -1,4 +1,5 @@ --踊る妖精 +--Dancing Fairy local s,id=GetID() function s.initial_effect(c) --recover @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_RECOVER) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.condition) diff --git a/official/c90928333.lua b/official/c90928333.lua index b45424466e..cfbc1d08c7 100644 --- a/official/c90928333.lua +++ b/official/c90928333.lua @@ -1,4 +1,5 @@ --闇の量産工場 +--Dark Factory of Mass Production local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90934570.lua b/official/c90934570.lua index f96e8b85d7..2d98f9de48 100644 --- a/official/c90934570.lua +++ b/official/c90934570.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xa} +s.listed_series={SET_LSWARM} function s.rmfilter(c) - return c:IsFaceup() and c:IsSetCard(0xa) and c:IsAbleToRemove() + return c:IsFaceup() and c:IsSetCard(SET_LSWARM) and c:IsAbleToRemove() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -35,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local hg=g2:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoHand(hg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c90946420.lua b/official/c90946420.lua index a0bdbeed2d..09da34dde0 100644 --- a/official/c90946420.lua +++ b/official/c90946420.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.mattg) e2:SetOperation(s.matop) c:RegisterEffect(e2) diff --git a/official/c90951921.lua b/official/c90951921.lua index 82e4efb9c3..f9a591b33e 100644 --- a/official/c90951921.lua +++ b/official/c90951921.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.counterfilter(c) - return c:IsSetCard(0x70) + return c:IsSetCard(SET_CHRONOMALY) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -26,33 +26,33 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) - return not c:IsSetCard(0x70) + return not c:IsSetCard(SET_CHRONOMALY) end function s.filter(c) - return c:IsMonster() and c:IsSetCard(0x70) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) + return c:IsMonster() and c:IsSetCard(SET_CHRONOMALY) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then if not Duel.IsPlayerCanDiscardDeck(tp,2) - or not Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) then return false end + or not Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) then return false end local g=Duel.GetDecktopGroup(tp,2) return g:FilterCount(Card.IsAbleToHand,nil)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) end @@ -76,4 +76,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c90953320.lua b/official/c90953320.lua index dabfb4da21..35a8ab5876 100644 --- a/official/c90953320.lua +++ b/official/c90953320.lua @@ -1,4 +1,5 @@ --TG ハイパー・ライブラリアン +--T.G. Hyper Librarian local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -30,4 +31,4 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c90957527.lua b/official/c90957527.lua index 638b758d94..aa4f3ce52a 100644 --- a/official/c90957527.lua +++ b/official/c90957527.lua @@ -1,9 +1,10 @@ --剣闘獣ゲオルディアス +--Gladiator Beast Gaiodiaz local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,79580323,aux.FilterBoolFunctionEx(Card.IsSetCard,0x19)) + Fusion.AddProcMix(c,true,true,79580323,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GLADIATOR)) Fusion.AddContactProc(c,s.contactfil,s.contactop,s.splimit) --damage local e3=Effect.CreateEffect(c) @@ -20,7 +21,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.spcon) e4:SetCost(s.spcost) @@ -28,15 +29,15 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} s.listed_names={79580323} -s.material_setcode=0x19 +s.material_setcode=SET_GLADIATOR function s.contactfil(tp) return Duel.GetMatchingGroup(function(c) return c:IsMonster() and c:IsAbleToDeckOrExtraAsCost() end,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g,tp) Duel.ConfirmCards(1-tp,g) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST+REASON_MATERIAL) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) return e:GetHandler():GetLocation()~=LOCATION_EXTRA @@ -47,10 +48,10 @@ function s.damcon(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() if c==a then e:SetLabel(d:GetDefense()) - return c:IsRelateToBattle() and d:GetLocation()==LOCATION_GRAVE and d:IsMonster() + return c:IsRelateToBattle() and d:IsLocation(LOCATION_GRAVE) and d:IsMonster() else e:SetLabel(a:GetDefense()) - return c:IsRelateToBattle() and a:GetLocation()==LOCATION_GRAVE and a:IsMonster() + return c:IsRelateToBattle() and a:IsLocation(LOCATION_GRAVE) and a:IsMonster() end end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -70,10 +71,10 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToExtraAsCost() end - Duel.SendtoDeck(c,nil,0,REASON_COST) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(c,e,tp) - return not c:IsCode(79580323) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,121,tp,false,false) + return not c:IsCode(79580323) and c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,121,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -93,10 +94,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,2,2,nil) local tc=sg:GetFirst() Duel.SpecialSummonStep(tc,121,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) tc=sg:GetNext() Duel.SpecialSummonStep(tc,121,tp,tp,false,false,POS_FACEUP) - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c90960358.lua b/official/c90960358.lua index c5f35aeb00..a7a7ada397 100644 --- a/official/c90960358.lua +++ b/official/c90960358.lua @@ -97,9 +97,9 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.val(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,CARD_DARK_MAGICIAN,30208479)*300 -end +end \ No newline at end of file diff --git a/official/c90965652.lua b/official/c90965652.lua index 343afdd6da..571913400a 100644 --- a/official/c90965652.lua +++ b/official/c90965652.lua @@ -1,9 +1,9 @@ --- 二量合成 --- Dimer Synthesis --- scripted by Hatter +--二量合成 +--Dimer Synthesis +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Add to hand + --Add to hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Change ATK + --Change ATK local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) diff --git a/official/c90969892.lua b/official/c90969892.lua index 7c0d3cc2f6..efd8adad32 100644 --- a/official/c90969892.lua +++ b/official/c90969892.lua @@ -1,9 +1,9 @@ --- トライブ・ドライブ --- Tribe Drive --- Scripted by Hatter +--トライブ・ドライブ +--Tribe Drive +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Add to hand or Special Summon + --Add to hand or Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON) @@ -67,4 +67,4 @@ function s.thspop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveToDeckBottom(sg,tp) Duel.SortDeckbottom(tp,tp,#sg) end -end +end \ No newline at end of file diff --git a/official/c9097866.lua b/official/c9097866.lua index 6ac08c8eae..5b409763ba 100644 --- a/official/c9097866.lua +++ b/official/c9097866.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atkcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -67,12 +67,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tgc=Duel.GetFirstTarget() if tc and tc:IsRelateToBattle() and tc:IsFaceup() and tgc and tgc:IsRelateToEffect(e) and tgc:IsLocation(LOCATION_GRAVE) and - tc:UpdateAttack(tgc:GetAttack(),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,c)==tgc:GetAttack() then + tc:UpdateAttack(tgc:GetAttack(),RESETS_STANDARD_PHASE_END,c)==tgc:GetAttack() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c90980792.lua b/official/c90980792.lua index a36a1805ad..083bda08dc 100644 --- a/official/c90980792.lua +++ b/official/c90980792.lua @@ -1,4 +1,5 @@ --ダークジェロイド +--Dark Jeroid local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c91011603.lua b/official/c91011603.lua index 80cb52eb01..a5f950c75c 100644 --- a/official/c91011603.lua +++ b/official/c91011603.lua @@ -1,5 +1,5 @@ --極星工イーヴァルディ ---Ivaldi of the Nordic Smiths +--Nordic Smith Ivaldi --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -29,9 +29,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x42,0x4b,0x5042} +s.listed_series={SET_NORDIC,SET_AESIR,SET_NORDIC_RELIC} function s.spcfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b)) + return c:IsFaceup() and (c:IsSetCard(SET_NORDIC) or c:IsSetCard(SET_AESIR)) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil) @@ -47,7 +47,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.thfilter(c) - return c:IsSetCard(0x5042) and c:IsAbleToHand() + return c:IsSetCard(SET_NORDIC_RELIC) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -60,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91019775.lua b/official/c91019775.lua index 3eeefbe844..97b6bdb814 100644 --- a/official/c91019775.lua +++ b/official/c91019775.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) diff --git a/official/c91027843.lua b/official/c91027843.lua index 1a59cbb976..cb467ea9d4 100644 --- a/official/c91027843.lua +++ b/official/c91027843.lua @@ -63,13 +63,13 @@ function s.atkval(e,c) return 200+c:GetEquipGroup():FilterCount(Card.IsSetCard,nil,SET_MARINCESS)*600 end function s.etarget(e,c) - return c:IsFaceup() and c:IsInExtraMZone() and c:HasFlagEffect(id) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsFaceup() and c:IsInExtraMZone() and c:HasFlagEffect(id) and c:IsLinkSummoned() end function s.efilter(e,re) return e:GetOwnerPlayer()~=re:GetOwnerPlayer() end function s.eqcfilter(c,tp) - return c:IsSetCard(SET_MARINCESS) and c:IsLinkMonster() and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetSequence()>=5 and c:IsSummonPlayer(tp) + return c:IsSetCard(SET_MARINCESS) and c:IsLinkMonster() and c:IsLinkSummoned() and c:GetSequence()>=5 and c:IsSummonPlayer(tp) end function s.eqfilter(c) return c:IsSetCard(SET_MARINCESS) and c:IsLinkMonster() and not c:IsForbidden() diff --git a/official/c91034681.lua b/official/c91034681.lua index 9d6dd72b4a..27cc446188 100644 --- a/official/c91034681.lua +++ b/official/c91034681.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc3),aux.FilterBoolFunctionEx(Card.IsSetCard,0xa9)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_EDGE_IMP),aux.FilterBoolFunctionEx(Card.IsSetCard,SET_FLUFFAL)) --damage after destroying local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -28,8 +28,8 @@ function s.initial_effect(c) e2:SetOperation(s.damop2) c:RegisterEffect(e2) end -s.listed_series={0xad,0xc3,0xa9} -s.material_setcode={0xc3,0xa9} +s.listed_series={SET_FRIGHTFUR,SET_EDGE_IMP,SET_FLUFFAL} +s.material_setcode={SET_EDGE_IMP,SET_FLUFFAL} function s.damtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -46,7 +46,7 @@ function s.damcon2(e,tp,eg,ep,ev,re,r,rp) and c:IsPreviousPosition(POS_FACEUP) end function s.damfilter(c) - return c:IsMonster() and c:IsSetCard(0xad) + return c:IsMonster() and c:IsSetCard(SET_FRIGHTFUR) end function s.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) local gc=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_GRAVE,0,nil) @@ -58,4 +58,4 @@ function s.damop2(e,tp,eg,ep,ev,re,r,rp) local gc=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_GRAVE,0,nil) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,gc*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9106362.lua b/official/c9106362.lua index 3f42588032..20d26deeed 100644 --- a/official/c9106362.lua +++ b/official/c9106362.lua @@ -34,6 +34,6 @@ function s.dmop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c91070115.lua b/official/c91070115.lua index f05d200829..b233b968fa 100644 --- a/official/c91070115.lua +++ b/official/c91070115.lua @@ -28,14 +28,14 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_list={COUNTER_A} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,0,1,COUNTER_A,1,REASON_COST) end Duel.RemoveCounter(tp,0,1,COUNTER_A,1,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) end @@ -51,12 +51,12 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c91078716.lua b/official/c91078716.lua index a1d57966a8..efa82a6553 100644 --- a/official/c91078716.lua +++ b/official/c91078716.lua @@ -60,4 +60,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9109991.lua b/official/c9109991.lua index 8b2d6dd1f4..c99c3ffec2 100644 --- a/official/c9109991.lua +++ b/official/c9109991.lua @@ -1,4 +1,5 @@ --BF-鉄鎖のフェーン +--Blackwing - Fane the Steel Chain local s,id=GetID() function s.initial_effect(c) --direct attack @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:IsAttackPos() then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c91107093.lua b/official/c91107093.lua index cafda3a5ce..bc49c17663 100644 --- a/official/c91107093.lua +++ b/official/c91107093.lua @@ -1,4 +1,5 @@ --電磁シールド +--Electromagnetic Shield local s,id=GetID() function s.initial_effect(c) --activate @@ -32,4 +33,4 @@ function s.filter(c) end function s.descon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c91110378.lua b/official/c91110378.lua index 30bbb679d4..a598bc56a8 100644 --- a/official/c91110378.lua +++ b/official/c91110378.lua @@ -1,4 +1,5 @@ --光天使スローネ +--Star Seraph Sovereignty local s,id=GetID() function s.initial_effect(c) --xyz @@ -24,9 +25,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x86} +s.listed_series={SET_STAR_SERAPH} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x86) and c:IsSummonPlayer(tp) + return c:IsFaceup() and c:IsSetCard(SET_STAR_SERAPH) and c:IsSummonPlayer(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -42,10 +43,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end local dc=Duel.GetOperatedGroup():GetFirst() - if dc:IsSetCard(0x86) and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) + if dc:IsSetCard(SET_STAR_SERAPH) and dc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() Duel.SpecialSummon(dc,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c91123920.lua b/official/c91123920.lua index 1f51c5405f..c1f5974ce1 100644 --- a/official/c91123920.lua +++ b/official/c91123920.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) end s.listed_names={CARD_SANCTUARY_SKY} function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) + return te:IsSpellEffect() end function s.envfilter(c) return c:IsFaceup() and c:IsCode(CARD_SANCTUARY_SKY) @@ -34,4 +34,4 @@ function s.val(e,c) if not (Duel.IsExistingMatchingCard(s.envfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) or Duel.IsEnvironment(CARD_SANCTUARY_SKY,tp)) then return 0 end local v=Duel.GetLP(tp)-Duel.GetLP(1-tp) if v>0 then return v else return 0 end -end +end \ No newline at end of file diff --git a/official/c91133740.lua b/official/c91133740.lua index 7992c6d2ae..677c6286db 100644 --- a/official/c91133740.lua +++ b/official/c91133740.lua @@ -1,4 +1,5 @@ --スノーマンイーター +--Snowman Eater local s,id=GetID() function s.initial_effect(c) --Destroy @@ -24,4 +25,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9113513.lua b/official/c9113513.lua index 5a841c9ef6..e167a1445b 100644 --- a/official/c9113513.lua +++ b/official/c9113513.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Activate - local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,0x9b),Fusion.InHandMat,s.fextra,nil,nil,s.stage2,2,nil,nil,nil,nil,nil,nil,s.extratg) + local e1=Fusion.CreateSummonEff(c,aux.FilterBoolFunction(Card.IsSetCard,SET_MELODIOUS),Fusion.InHandMat,s.fextra,nil,nil,s.stage2,2,nil,nil,nil,nil,nil,nil,s.extratg) e1:SetCondition(s.condition) c:RegisterEffect(e1) end @@ -20,7 +20,7 @@ function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.stage2(e,tc,tp,mg,chk) if chk==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end if chk==1 then local e1=Effect.CreateEffect(e:GetHandler()) @@ -31,7 +31,7 @@ function s.stage2(e,tc,tp,mg,chk) e1:SetLabelObject(tc) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -46,7 +46,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.mgfilter(c,e,tp,fusc,mg) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and (c:GetReason()&0x40008)==0x40008 and c:GetReasonCard()==fusc + and (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))==(REASON_FUSION|REASON_MATERIAL) and c:GetReasonCard()==fusc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and fusc:CheckFusionMaterial(mg,c) end @@ -62,4 +62,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91135480.lua b/official/c91135480.lua index 35132556f5..3baf7d0c94 100644 --- a/official/c91135480.lua +++ b/official/c91135480.lua @@ -1,7 +1,6 @@ --クロノダイバー・ダブルバレル ---Time Thief Doublebarrel +--Time Thief Double Barrel --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -22,20 +21,18 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end - --Maximum of 1 for each card type function s.rescon(sg,e,tp,mg) return sg:FilterCount(Card.IsMonster,nil)<=1 and sg:FilterCount(Card.IsSpell,nil)<=1 and sg:FilterCount(Card.IsTrap,nil)<=1 end - --Activation legality function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local g=c:GetOverlayGroup() local ty=0 - if c:IsFaceup() then ty=ty | TYPE_MONSTER end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) then ty=ty | TYPE_SPELL end - if Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then ty=ty | TYPE_TRAP end + if c:IsFaceup() then ty=ty|TYPE_MONSTER end + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) then ty=ty|TYPE_SPELL end + if Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then ty=ty|TYPE_TRAP end if chk==0 then return ty>0 and g:IsExists(Card.IsType,1,nil,ty) end end --Detach and apply multiple effects @@ -44,31 +41,30 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local g=c:GetOverlayGroup() local ty=0 - if c:IsFaceup() then ty=ty | TYPE_MONSTER end - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) then ty=ty | TYPE_SPELL end - if Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then ty=ty | TYPE_TRAP end + if c:IsFaceup() then ty=ty|TYPE_MONSTER end + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,nil) then ty=ty|TYPE_SPELL end + if Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then ty=ty|TYPE_TRAP end if ty==0 then return end local sg=aux.SelectUnselectGroup(g:Filter(Card.IsType,nil,ty),e,tp,1,3,s.rescon,1,tp,HINTMSG_XMATERIAL) - local lb=0 - for tc in aux.Next(sg) do - lb=lb | tc:GetType() + local card_type=0 + for tc in sg:Iter() do + card_type=card_type|tc:GetMainCardType() end - lb=lb & 0x7 Duel.SendtoGrave(sg,REASON_EFFECT) Duel.RaiseSingleEvent(c,EVENT_DETACH_MATERIAL,e,0,0,0,0) Duel.BreakEffect() - if lb & TYPE_MONSTER ~=0 then + if (card_type&TYPE_MONSTER)>0 then if c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end - if lb & TYPE_SPELL ~=0 then + if (card_type&TYPE_SPELL)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local tc=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsControlerCanBeChanged),tp,0,LOCATION_MZONE,1,1,nil):GetFirst() if tc and Duel.GetControl(tc,tp,PHASE_END,1)~=0 then @@ -78,7 +74,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) --Cannot activate its effects @@ -88,7 +84,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e2) end end - if lb & TYPE_TRAP ~=0 then + if (card_type&TYPE_TRAP)>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) local g=Duel.SelectMatchingCard(tp,Card.IsNegatableMonster,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) if #g>0 then @@ -98,14 +94,14 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c91140491.lua b/official/c91140491.lua index a7335bb188..44a7c59880 100644 --- a/official/c91140491.lua +++ b/official/c91140491.lua @@ -1,5 +1,5 @@ --熾天蝶 ---Seraphim Papillon +--Seraphim Papillion --Scripted by AlphaKretin local COUNTER_PAPILLON=0x14d local s,id=GetID() @@ -52,7 +52,7 @@ function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -86,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c91148083.lua b/official/c91148083.lua index a4bdd71bd0..5b8130f04d 100644 --- a/official/c91148083.lua +++ b/official/c91148083.lua @@ -11,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x4b} +s.listed_series={SET_AESIR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x4b) and c:IsControlerCanBeChanged() + return c:IsFaceup() and c:IsSetCard(SET_AESIR) and c:IsControlerCanBeChanged() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -25,7 +25,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetControl(tc,1-tp)~=0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -33,12 +33,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) e1:SetLabelObject(tc) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,1) Duel.RegisterEffect(e1,tp) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() diff --git a/official/c91182675.lua b/official/c91182675.lua index 9b133b53a2..33073bc470 100644 --- a/official/c91182675.lua +++ b/official/c91182675.lua @@ -44,7 +44,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.counter_place_list={COUNTER_SPELL} -s.listed_series={0x10d} +s.listed_series={SET_MYTHICAL_BEAST} s.listed_names={55424270} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)==1 @@ -70,7 +70,7 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.acop(e,tp,eg,ep,ev,re,r,rp) - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and e:GetHandler():GetFlagEffect(1)>0 then e:GetHandler():AddCounter(COUNTER_SPELL,1) end end @@ -81,7 +81,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(c,REASON_COST) end function s.spfilter(c,e,tp) - return (c:IsSetCard(0x10d) or c:IsCode(55424270)) and not c:IsCode(id) + return (c:IsSetCard(SET_MYTHICAL_BEAST) or c:IsCode(55424270)) and not c:IsCode(id) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -95,4 +95,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c911883.lua b/official/c911883.lua index 5a7220f3b8..d80e1b42e7 100644 --- a/official/c911883.lua +++ b/official/c911883.lua @@ -30,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91188343.lua b/official/c91188343.lua index 65d6dc9156..02702a596f 100644 --- a/official/c91188343.lua +++ b/official/c91188343.lua @@ -12,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x44} +s.listed_series={SET_THE_AGENT} s.listed_names={55794644,CARD_SANCTUARY_SKY} function s.filter1(c) - return c:IsSetCard(0x44) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_THE_AGENT) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.filter2(c) - return ((c:IsSetCard(0x44) and c:GetCode()~=id and c:IsMonster()) or c:IsCode(55794644)) and c:IsAbleToHand() + return ((c:IsSetCard(SET_THE_AGENT) and c:GetCode()~=id and c:IsMonster()) or c:IsCode(55794644)) and c:IsAbleToHand() end function s.envfilter(c) return c:IsFaceup() and c:IsCode(CARD_SANCTUARY_SKY) @@ -41,4 +41,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91222209.lua b/official/c91222209.lua index 190d8dd699..28074211a4 100644 --- a/official/c91222209.lua +++ b/official/c91222209.lua @@ -1,5 +1,5 @@ --R-ACEイントルーダー ---Rescue-ACE Intruder +--Rescue-ACE Monitor --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -24,18 +24,18 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_CHAINING) - e3:SetRange(LOCATION_HAND+LOCATION_MZONE) + e3:SetRange(LOCATION_HAND|LOCATION_MZONE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.spcond) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0x18c) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_RESCUE_ACE) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -50,15 +50,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.spcond(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()==LOCATION_MZONE -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) + return rp==1-tp and re:IsMonsterEffect() and re:GetActivateLocation()==LOCATION_MZONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x18c) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RESCUE_ACE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c91231901.lua b/official/c91231901.lua index 7b2768182c..d1f1d47fa9 100644 --- a/official/c91231901.lua +++ b/official/c91231901.lua @@ -18,15 +18,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.filter(c) - return c:GetLevel()>0 and c:IsSetCard(0xc) and c:IsAbleToGrave() + return c:GetLevel()>0 and c:IsSetCard(SET_ALIEN) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -51,7 +51,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xc) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ALIEN) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91250514.lua b/official/c91250514.lua index 0298152fce..120ed33735 100644 --- a/official/c91250514.lua +++ b/official/c91250514.lua @@ -1,4 +1,5 @@ --タン・ツイスター +--Tongue Twister local s,id=GetID() function s.initial_effect(c) --draw @@ -24,7 +25,7 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,2,REASON_EFFECT) Duel.BreakEffect() - if e:GetHandler():IsRelateToEffect(e) and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) then + if e:GetHandler():IsRelateToEffect(e) and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) then Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91258852.lua b/official/c91258852.lua index b83a0a0bb6..1a8a67ba74 100644 --- a/official/c91258852.lua +++ b/official/c91258852.lua @@ -1,7 +1,8 @@ +--SPYRAL-グレース --SPYRAL Master Plan local s,id=GetID() function s.initial_effect(c) - --search + --Add 1 "SPYRAL MISSION" card from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetTarget(s.thtg1) e1:SetOperation(s.thop1) c:RegisterEffect(e1) - --to hand + --Add 1 "SPYRAL Resort" and 1 "SPYRAL" monster from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -24,10 +25,10 @@ function s.initial_effect(c) e2:SetOperation(s.thop2) c:RegisterEffect(e2) end -s.listed_series={0x20ee,0xee} -s.listed_names={54631665} +s.listed_series={SET_SPYRAL_MISSION,SET_SPYRAL} +s.listed_names={54631665}--"SPYRAL Resort" function s.thfilter1(c) - return c:IsSetCard(0x20ee) and c:IsAbleToHand() + return c:IsSetCard(SET_SPYRAL_MISSION) and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end @@ -49,7 +50,7 @@ function s.thfilter2(c,tp) and Duel.IsExistingMatchingCard(s.thfilter3,tp,LOCATION_DECK,0,1,c) end function s.thfilter3(c) - return c:IsSetCard(0xee) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SPYRAL) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil,tp) end @@ -65,4 +66,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g1) end -end +end \ No newline at end of file diff --git a/official/c91262474.lua b/official/c91262474.lua index f921a8efae..6f259d4328 100644 --- a/official/c91262474.lua +++ b/official/c91262474.lua @@ -1,5 +1,5 @@ --- スターダスト・ヴルム --- Stardust Wurm +--スターダスト・ヴルム +--Stardust Wurm local s,id=GetID() function s.initial_effect(c) --Special Summon itself from the hand or GY @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg2) e2:SetOperation(s.spop2) c:RegisterEffect(e2) @@ -32,14 +32,12 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE,0,1,nil) end - --Activation legality function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end - --Special Summon from hand or GY, banish it if it leaves the field function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then @@ -50,31 +48,25 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end ---Special Summon up to 2 Level 1 LIGHT Dragons -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_DRAGON) and c:IsLevel(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop2(e,tp,eg,ep,ev,re,r,rp) local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),2) if ft<1 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,ft,nil,e,tp) local c=e:GetHandler() for tc in sg:Iter() do if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then @@ -84,7 +76,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c9126351.lua b/official/c9126351.lua index 996c998217..47aeb543f9 100644 --- a/official/c9126351.lua +++ b/official/c9126351.lua @@ -39,7 +39,7 @@ function s.initial_effect(c) e5:SetOperation(s.exop) c:RegisterEffect(e5) end -s.listed_series={0x12} +s.listed_series={SET_FROG} function s.spfilter(c) return c:IsMonster() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() end @@ -47,7 +47,7 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,e:GetHandler()) - return aux.SelectUnselectGroup(g,e,tp,1,1,nil,0) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + return aux.SelectUnselectGroup(g,e,tp,1,1,nil,0) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,e:GetHandler()) @@ -62,7 +62,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local rg=e:GetLabelObject() if not rg then return end - Duel.SendtoGrave(rg,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(rg,REASON_COST|REASON_DISCARD) rg:DeleteGroup() end function s.tgfilter(c) @@ -70,12 +70,12 @@ function s.tgfilter(c) and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_MZONE) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_MZONE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_MZONE) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_MZONE,0,1,1,nil) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end @@ -93,13 +93,13 @@ function s.exop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(id,2)) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(s.estg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.estg(e,c) - return c:IsSetCard(0x12) and c:GetCode()~=id -end + return c:IsSetCard(SET_FROG) and c:GetCode()~=id +end \ No newline at end of file diff --git a/official/c91269402.lua b/official/c91269402.lua index 779b47843c..2ced435d29 100644 --- a/official/c91269402.lua +++ b/official/c91269402.lua @@ -1,4 +1,5 @@ --サイバース・ビーコン +--Cyberse Beacon local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,7 +23,7 @@ function s.initial_effect(c) end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if (r&REASON_EFFECT~=0 and rp~=ep) or r&REASON_BATTLE~=0 then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91272072.lua b/official/c91272072.lua index c366f37372..5af32b611d 100644 --- a/official/c91272072.lua +++ b/official/c91272072.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfb)) + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TRICKSTAR)) --avoid damage local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -38,15 +38,15 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xfb} -s.material_setcode={0xfb} +s.listed_series={SET_TRICKSTAR} +s.material_setcode={SET_TRICKSTAR} function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_LINK,fc,sumtype,tp) and c:IsSetCard(0xfb,fc,sumtype,tp) + return c:IsType(TYPE_LINK,fc,sumtype,tp) and c:IsSetCard(SET_TRICKSTAR,fc,sumtype,tp) end function s.damval(e,re,val,r,rp) - if r&REASON_EFFECT==REASON_EFFECT and re and re:IsActiveType(TYPE_MONSTER) then + if r&REASON_EFFECT==REASON_EFFECT and re and re:IsMonsterEffect() then local rc=re:GetHandler() - if rc:IsFaceup() and rc:IsSetCard(0xfb) and rc:IsLinkMonster() + if rc:IsFaceup() and rc:IsSetCard(SET_TRICKSTAR) and rc:IsLinkMonster() and rc:GetLinkedGroup():IsContains(e:GetHandler()) then return val*2 end @@ -54,7 +54,7 @@ function s.damval(e,re,val,r,rp) return val end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and r&REASON_EFFECT==REASON_EFFECT and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xfb) + return ep~=tp and r&REASON_EFFECT==REASON_EFFECT and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_TRICKSTAR) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -64,12 +64,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetLabelObject(e) e1:SetValue(ev) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0xfb) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_TRICKSTAR) and c:IsAbleToHand() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetAttackedCount()>0 diff --git a/official/c91279700.lua b/official/c91279700.lua index 2c953b6380..d29fc6fdf0 100644 --- a/official/c91279700.lua +++ b/official/c91279700.lua @@ -1,8 +1,9 @@ --ヴェルズ・オピオン +--Evilswarm Ophion local s,id=GetID() function s.initial_effect(c) --xyz summon - Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xa),4,2) + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LSWARM),4,2) c:EnableReviveLimit() --disable spsummon local e1=Effect.CreateEffect(c) @@ -20,24 +21,20 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.cost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x65,0xa} +s.listed_series={SET_INFESTATION,SET_LSWARM} function s.dscon(e) return e:GetHandler():GetOverlayCount()~=0 end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLevelAbove(5) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsSetCard(0x65) and c:IsAbleToHand() + return c:IsSetCard(SET_INFESTATION) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -50,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91283212.lua b/official/c91283212.lua index 0a1cc7f36e..9044b2424a 100644 --- a/official/c91283212.lua +++ b/official/c91283212.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.damcon) - e1:SetCost(s.damcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.damtg) e1:SetOperation(s.damop) c:RegisterEffect(e1) @@ -28,18 +28,14 @@ function s.initial_effect(c) e2:SetOperation(s.tnop) c:RegisterEffect(e2) end -s.listed_series={0x12f} +s.listed_series={SET_BATTLEWASP} function s.damcon(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local bc=tc:GetBattleTarget() - return tc:IsRelateToBattle() and tc:IsStatus(STATUS_OPPO_BATTLE) and tc:IsControler(tp) and tc:IsSetCard(0x12f) + return tc:IsRelateToBattle() and tc:IsStatus(STATUS_OPPO_BATTLE) and tc:IsControler(tp) and tc:IsSetCard(SET_BATTLEWASP) and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and bc:GetPreviousControler()~=tp and bc:GetBaseAttack()>0 and bc:GetOwner()==1-tp end -function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -69,7 +65,7 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_ADD_TYPE) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) e0:SetValue(TYPE_TUNER) tc:RegisterEffect(e0) end @@ -80,7 +76,7 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -90,4 +86,4 @@ function s.splimit(e,c) end function s.lizfilter(e,c) return not c:IsOriginalRace(RACE_INSECT) -end +end \ No newline at end of file diff --git a/official/c91299846.lua b/official/c91299846.lua index 65d2b7e025..c0aca1b4e9 100644 --- a/official/c91299846.lua +++ b/official/c91299846.lua @@ -25,20 +25,20 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.cfilter(c,tp) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.tffilter,tp,LOCATION_DECK,0,1,nil,c,tp) end function s.tffilter(c,cc,tp) - return c:IsSpellTrap() and c:IsSetCard(0x109) and not c:IsForbidden() + return c:IsSpellTrap() and c:IsSetCard(SET_THE_WEATHER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc) and not c:IsType(TYPE_FIELD) end function s.tfcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -62,9 +62,9 @@ function s.spreg(e,tp,eg,ep,ev,re,r,rp) if not re then return end local c=e:GetHandler() local rc=re:GetHandler() - if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) then + if c:IsReason(REASON_COST) and rc:IsSetCard(SET_THE_WEATHER) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c91323605.lua b/official/c91323605.lua index 621bdca793..5bedff332f 100644 --- a/official/c91323605.lua +++ b/official/c91323605.lua @@ -61,4 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.ShuffleDeck(tp) end -end +end \ No newline at end of file diff --git a/official/c91336701.lua b/official/c91336701.lua index a61c053153..f2b6e79ed9 100644 --- a/official/c91336701.lua +++ b/official/c91336701.lua @@ -1,5 +1,5 @@ --魔導耀士 デイブレイカー ---Day-Breaker the Shinning Magical Knight +--Day-Breaker the Shining Magical Warrior --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -49,7 +49,7 @@ function s.initial_effect(c) end s.counter_place_list={COUNTER_SPELL} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -88,4 +88,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91337277.lua b/official/c91337277.lua index 6a462c0f88..9b741867c3 100644 --- a/official/c91337277.lua +++ b/official/c91337277.lua @@ -29,7 +29,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(10000) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c91349449.lua b/official/c91349449.lua index c68c56e36f..2c3af12142 100644 --- a/official/c91349449.lua +++ b/official/c91349449.lua @@ -1,6 +1,5 @@ --ライトレイ ソーサラー --Lightray Sorcerer - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -49,7 +48,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function s.filter1(c) @@ -75,7 +74,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tc2=g:GetFirst() if tc1==tc2 then tc2=g:GetNext() end - if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,2,REASON_EFFECT)~=0 then + if tc1:IsRelateToEffect(e) and Duel.SendtoDeck(tc1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then if tc2:IsFaceup() and tc2:IsRelateToEffect(e) then Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) end diff --git a/official/c91350799.lua b/official/c91350799.lua index 94be3f30de..91d3c03a31 100644 --- a/official/c91350799.lua +++ b/official/c91350799.lua @@ -1,4 +1,5 @@ --マドルチェ・ホーットケーキ +--Madolche Hootcake local s,id=GetID() function s.initial_effect(c) --to deck @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.retcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp and e:GetHandler():IsPreviousControler(tp) @@ -34,7 +35,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.retop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.rmfilter(c,tp) @@ -42,14 +43,14 @@ function s.rmfilter(c,tp) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.filter(c,e,tp) - return c:IsSetCard(0x71) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MADOLCHE) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc,tp) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc,tp) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end @@ -63,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c91351370.lua b/official/c91351370.lua index 5e78178888..54b812883a 100644 --- a/official/c91351370.lua +++ b/official/c91351370.lua @@ -18,14 +18,14 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.filter(c,val) local atk=c:GetAttack() - return c:IsAttackAbove(0) and atk0 @@ -44,14 +44,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetBaseAttack()/2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_BASE_DEFENSE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(tc:GetBaseDefense()/2) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c91397409.lua b/official/c91397409.lua index aa0f4a5d25..bb2be0044e 100644 --- a/official/c91397409.lua +++ b/official/c91397409.lua @@ -41,12 +41,12 @@ function s.initial_effect(c) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0x5a} +s.listed_series={SET_PENGUIN} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x5a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_PENGUIN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp - and re:IsActiveType(TYPE_MONSTER) + and re:IsMonsterEffect() end function s.posfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsFacedown() and c:IsCanChangePosition() @@ -79,4 +79,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp,chk) if #g>0 then Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c91405870.lua b/official/c91405870.lua index 09c321270b..d16bf663da 100644 --- a/official/c91405870.lua +++ b/official/c91405870.lua @@ -1,5 +1,5 @@ --烈風の空牙団 - +--Mayhem Fur Hire -- local s,id=GetID() function s.initial_effect(c) @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.filter(c,e,tp) - return c:IsSetCard(0x114) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_FUR_HIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -31,5 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end - +end \ No newline at end of file diff --git a/official/c91407982.lua b/official/c91407982.lua index 36b77dd328..535c46879a 100644 --- a/official/c91407982.lua +++ b/official/c91407982.lua @@ -3,15 +3,16 @@ --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - --Activate + --When this card is activated: You can add 1 "Fortune Lady" card from your Deck to your hand local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetOperation(s.activate) c:RegisterEffect(e1) - --immdes + --Apply a "this turn, monsters you control cannot be destroyed by card effects" effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -19,60 +20,63 @@ function s.initial_effect(c) e2:SetCode(EVENT_REMOVE) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) - e2:SetCondition(s.imdcon) - e2:SetOperation(s.imdop) + e2:SetCondition(s.cannotdescon) + e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end) + e2:SetOperation(s.cannotdesop) c:RegisterEffect(e2) - --zerodamage + --Apply a "make the next battle damage you take this turn become 0" effect local e3=e2:Clone() e3:SetDescription(aux.Stringid(id,2)) - e3:SetCondition(s.damcon) - e3:SetOperation(s.damop) + e3:SetCondition(s.nodamcon) + e3:SetOperation(s.nodamop) c:RegisterEffect(e3) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.thfilter(c) - return c:IsSetCard(0x31) and c:IsAbleToHand() + return c:IsSetCard(SET_FORTUNE_LADY) and c:IsAbleToHand() end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) - if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then + if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local sg=g:Select(tp,1,1,nil) - Duel.SendtoHand(sg,nil,REASON_EFFECT) - Duel.ConfirmCards(1-tp,sg) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end end end -function s.imdfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and (c:GetReason()&0x40)==0x40 +function s.confilter(c,player) + return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(player) and c:IsReason(REASON_EFFECT) end -function s.imdcon(e,tp,eg,ep,ev,re,r,rp) - return eg and eg:IsExists(s.imdfilter,1,nil,tp) +function s.cannotdescon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.confilter,1,nil,tp) and not Duel.HasFlagEffect(tp,id) end -function s.imdop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local e1=Effect.CreateEffect(e:GetHandler()) +function s.cannotdesop(e,tp,eg,ep,ev,re,r,rp) + if Duel.HasFlagEffect(tp,id) then return end + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) + local c=e:GetHandler() + --This turn, monsters you control cannot be destroyed by card effects + local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,4)) end -function s.damfilter(c,tp) - return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(1-tp) and (c:GetReason()&0x40)==0x40 -end -function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return eg and eg:IsExists(s.damfilter,1,nil,tp) +function s.nodamcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(s.confilter,1,nil,1-tp) end -function s.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end +function s.nodamop(e,tp,eg,ep,ev,re,r,rp) + --Make the next battle damage you take this turn become 0 local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,5)) e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) - e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL|PHASE_END) Duel.RegisterEffect(e1,tp) end diff --git a/official/c91420202.lua b/official/c91420202.lua index 609ff33a89..df1fa0a0b2 100644 --- a/official/c91420202.lua +++ b/official/c91420202.lua @@ -1,5 +1,5 @@ --アドヴェンデット・セイヴァー ---Advendread Savior +--Avendread Savior --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -37,10 +37,10 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} s.listed_names={4388680} function s.thfilter(c) - return c:IsSetCard(0x106) and c:IsAbleToHand() + return c:IsSetCard(SET_VENDREAD) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -79,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) bc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c91420254.lua b/official/c91420254.lua index 71da31cd32..1c6feee36f 100644 --- a/official/c91420254.lua +++ b/official/c91420254.lua @@ -31,9 +31,9 @@ function s.initial_effect(c) e3:SetValue(s.bttg) c:RegisterEffect(e3) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xb3) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_YOSENJU) and e:GetHandler():GetLeftScale()~=11 end function s.scop(e,tp,eg,ep,ev,re,r,rp) @@ -43,7 +43,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetValue(11) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_CHANGE_RSCALE) @@ -55,11 +55,11 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e3:SetDescription(aux.Stringid(id,2)) e3:SetTargetRange(1,0) e3:SetTarget(s.splimit) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xb3) + return not c:IsSetCard(SET_YOSENJU) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAttackPos() end @@ -72,5 +72,5 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.bttg(e,c) - return c:IsFaceup() and c:IsSetCard(0xb3) and c~=e:GetHandler() -end + return c:IsFaceup() and c:IsSetCard(SET_YOSENJU) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c91422370.lua b/official/c91422370.lua index 1680400a14..7bdefbd9c2 100644 --- a/official/c91422370.lua +++ b/official/c91422370.lua @@ -13,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.costfilter(c,ft,tp) - return c:IsSetCard(0x58) and c:IsAttackAbove(1500) + return c:IsSetCard(SET_WIND_UP) and c:IsAttackAbove(1500) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -25,10 +25,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(sg,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WIND_UP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.filter2(c,atk,e,tp) - return c:IsSetCard(0x58) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WIND_UP) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(dg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c91434208.lua b/official/c91434208.lua index 966a3d145f..ddfc580bca 100644 --- a/official/c91434208.lua +++ b/official/c91434208.lua @@ -74,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91434602.lua b/official/c91434602.lua index d458042540..e2d604af7c 100644 --- a/official/c91434602.lua +++ b/official/c91434602.lua @@ -1,20 +1,20 @@ --- マジェスティ・ヒュペリオン --- Majesty Hyperion --- Scripted by Hatter +--マジェスティ・ヒュペリオン +--Majesty Hyperion +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon from hand + --Special Summon from hand local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.hspcon) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Battle damage also inflicted to opponent + --Battle damage also inflicted to opponent local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_ALSO_BATTLE_DAMAGE) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY)) c:RegisterEffect(e2) - -- Banish card from either GY + --Banish card from either GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,0)) e3:SetCategory(CATEGORY_REMOVE) @@ -35,10 +35,10 @@ function s.initial_effect(c) e3:SetOperation(s.rmop) c:RegisterEffect(e3) end -s.listed_series={0x44} +s.listed_series={SET_THE_AGENT} s.listed_names={CARD_SANCTUARY_SKY} function s.spfilter(c) - return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_THE_AGENT) and c:IsAbleToRemoveAsCost() and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and aux.SpElimFilter(c,true,true) end function s.hspcon(e,c) @@ -49,11 +49,11 @@ function s.hspcon(e,c) if not op or op(e,c) then return false end end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,nil) return aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),0) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,c) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,nil) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #g<1 then return false end g:KeepAlive() @@ -67,30 +67,30 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) + if Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_SANCTUARY_SKY),e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) or Duel.IsEnvironment(CARD_SANCTUARY_SKY) then return e:GetHandler():GetFlagEffect(id)<2 else return e:GetHandler():GetFlagEffect(id)<1 end end function s.cfilter(c,tp) return c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost() and (c:IsLocation(LOCATION_HAND) or aux.SpElimFilter(c,true)) - and Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) + and Duel.IsExistingTarget(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE|LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE|LOCATION_MZONE|LOCATION_HAND,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.rmfilter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and s.rmfilter(chkc) end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -98,4 +98,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91438674.lua b/official/c91438674.lua index da6e1ed799..677ba35060 100644 --- a/official/c91438674.lua +++ b/official/c91438674.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND) e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E|TIMING_DAMAGE_STEP) e1:SetCondition(s.atkcond) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,id) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.pltg) e3:SetOperation(s.plop) c:RegisterEffect(e3) diff --git a/official/c91438994.lua b/official/c91438994.lua index 79fd788e71..604210f198 100644 --- a/official/c91438994.lua +++ b/official/c91438994.lua @@ -78,4 +78,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91449144.lua b/official/c91449144.lua index 30657bf6b4..05b7c13343 100644 --- a/official/c91449144.lua +++ b/official/c91449144.lua @@ -1,4 +1,5 @@ --ガスタの静寂 カーム +--Caam, Serenity of Gusto local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.filter(c) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToDeckAsCost() + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,2,nil) end @@ -33,4 +34,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91449532.lua b/official/c91449532.lua index 8debe049f3..8807bdc82e 100644 --- a/official/c91449532.lua +++ b/official/c91449532.lua @@ -1,4 +1,5 @@ --EMオールカバー・ヒッポ +--Performapal Flip Hippo local s,id=GetID() function s.initial_effect(c) --Special Summon @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.spfilter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -40,12 +41,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -63,4 +64,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c9145181.lua b/official/c9145181.lua index 1bb1751dd7..416afbc195 100644 --- a/official/c9145181.lua +++ b/official/c9145181.lua @@ -28,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91468551.lua b/official/c91468551.lua index 05ffe449fa..79ca16d356 100644 --- a/official/c91468551.lua +++ b/official/c91468551.lua @@ -1,4 +1,5 @@ --太陽の祭壇 +--Temple of the Sun local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,5 +18,5 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.atktg(e,c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsSummonLocation(LOCATION_GRAVE) -end + return c:IsSpecialSummoned() and c:IsSummonLocation(LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c91479482.lua b/official/c91479482.lua index a1a154601f..e1ab73c21e 100644 --- a/official/c91479482.lua +++ b/official/c91479482.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,{id,0}) - e1:SetCost(s.eqcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -36,11 +36,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_series={SET_INFERNOBLE_KNIGHT} -function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.tgfilter(c,tp) return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp) end diff --git a/official/c91482773.lua b/official/c91482773.lua index 4a34a5b72d..897afee7b5 100644 --- a/official/c91482773.lua +++ b/official/c91482773.lua @@ -47,4 +47,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91499077.lua b/official/c91499077.lua index 36903d1068..95d5f49d6a 100644 --- a/official/c91499077.lua +++ b/official/c91499077.lua @@ -1,6 +1,5 @@ --ガガガザムライ --Gagaga Samurai - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -15,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atcon) - e1:SetCost(s.atcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.attg) e1:SetOperation(s.atop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -29,17 +28,12 @@ function s.initial_effect(c) e2:SetOperation(s.cbop) c:RegisterEffect(e2) end -s.listed_series={0x54} - +s.listed_series={SET_GAGAGA} function s.atcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 + return c:IsFaceup() and c:IsSetCard(SET_GAGAGA) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -57,7 +51,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c91500017.lua b/official/c91500017.lua index 4dcb05613e..0589024ad4 100644 --- a/official/c91500017.lua +++ b/official/c91500017.lua @@ -1,7 +1,6 @@ --トゥーンのしおり --Toon Bookmark --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Add 1 "Toon World" or 1 card that specifically lists "Toon World" from deck @@ -26,7 +25,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={15259703,id} - function s.filter(c) return (c:ListsCode(15259703) or c:IsCode(15259703)) and not c:IsCode(id) and c:IsAbleToHand() end @@ -49,7 +47,7 @@ end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true else return false diff --git a/official/c91501248.lua b/official/c91501248.lua index 4ef788095a..01e497ee01 100644 --- a/official/c91501248.lua +++ b/official/c91501248.lua @@ -63,8 +63,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(p,g) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:FilterSelect(p,Card.IsAbleToDeck,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.ShuffleHand(1-p) end end -end +end \ No newline at end of file diff --git a/official/c91505214.lua b/official/c91505214.lua index 546e292a75..6d680bd49b 100644 --- a/official/c91505214.lua +++ b/official/c91505214.lua @@ -1,4 +1,5 @@ --トリックスター・ナルキッス +--Trickstar Narkissus local s,id=GetID() function s.initial_effect(c) --special summon @@ -44,8 +45,8 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.regop(e,tp,eg,ep,ev,re,r,rp) - if rp~=tp and re:IsActiveType(TYPE_MONSTER) and (re:GetActivateLocation()==LOCATION_GRAVE or re:GetActivateLocation()==LOCATION_HAND) then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1) + if rp~=tp and re:IsMonsterEffect() and (re:GetActivateLocation()==LOCATION_GRAVE or re:GetActivateLocation()==LOCATION_HAND) then + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN,0,1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -55,4 +56,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) Duel.Damage(1-tp,200,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91509824.lua b/official/c91509824.lua index ef8fbb3487..269d042b56 100644 --- a/official/c91509824.lua +++ b/official/c91509824.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c91512835.lua b/official/c91512835.lua index 964faa6a0e..dfcf0fb122 100644 --- a/official/c91512835.lua +++ b/official/c91512835.lua @@ -73,4 +73,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,TOKEN_INSECT_MONSTER) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c91530236.lua b/official/c91530236.lua index 5dec4e93c5..f768cd1d2e 100644 --- a/official/c91530236.lua +++ b/official/c91530236.lua @@ -15,19 +15,20 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xbf,0xc0,0x10c0} +s.listed_series={SET_CHARMER,SET_POSSESSED,SET_FAMILIAR_POSSESSED} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter2(c,e,tp,mft,sft,code) - return not c:IsCode(code) and - ((mft>0 and c:IsMonster() and (c:IsSetCard(0xbf) or c:IsSetCard(0x10c0)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) - or (sft>0 and c:IsSpellTrap() and c:IsSetCard(0xc0) and c:IsSSetable())) + return not c:IsCode(code) + and ((mft>0 and c:IsMonster() and c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED}) + and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) + or (sft>0 and c:IsSpellTrap() and c:IsSetCard(SET_POSSESSED) and c:IsSSetable())) end function s.filter(c,e,tp,mft,sft) - return c:IsAbleToHand() and - ((c:IsMonster() and (c:IsSetCard(0xbf) or c:IsSetCard(0x10c0))) or (c:IsSpellTrap() and c:IsSetCard(0xc0))) + return c:IsAbleToHand() + and ((c:IsMonster() and c:IsSetCard({SET_CHARMER,SET_FAMILIAR_POSSESSED})) or (c:IsSpellTrap() and c:IsSetCard(SET_POSSESSED))) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,c,e,tp,mft,sft,c:GetCode()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,c2) end end -end +end \ No newline at end of file diff --git a/official/c91534476.lua b/official/c91534476.lua index 3ca84c4f65..b019be6bda 100644 --- a/official/c91534476.lua +++ b/official/c91534476.lua @@ -21,25 +21,25 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.cfilter(c,tp) return c:IsMonster() and c:IsAbleToGraveAsCost() - and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c) + and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,c) end function s.filter(c) return (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) and c:IsMonster() and c:IsLevel(1) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.filter(chkc) and chkc~=e:GetLabelObject() end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and s.filter(chkc) and chkc~=e:GetLabelObject() end if chk==0 then if e:GetLabel()~=1 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) + return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local sc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp):GetFirst() Duel.SendtoGrave(sc,REASON_COST) e:SetLabelObject(sc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,sc) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,sc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) @@ -47,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91554542.lua b/official/c91554542.lua index 599ff820ad..c3c6008d49 100644 --- a/official/c91554542.lua +++ b/official/c91554542.lua @@ -1,4 +1,5 @@ --ネオフレムベル・サーベル +--Neo Flamvell Sabre local s,id=GetID() function s.initial_effect(c) --atk @@ -15,4 +16,4 @@ function s.val(e) if gct<=4 then return 600 elseif gct>=8 then return -300 else return 0 end -end +end \ No newline at end of file diff --git a/official/c91557476.lua b/official/c91557476.lua index f9984cf74f..5325982ddd 100644 --- a/official/c91557476.lua +++ b/official/c91557476.lua @@ -38,12 +38,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x1157} +s.listed_series={SET_SUNAVALON} function s.matfilter(c,lc,st,tp) return c:IsRace(RACE_PLANT,lc,st,tp) and c:IsType(TYPE_NORMAL,lc,st,tp) end function s.cfilter(c,tp,rp) - return c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) + return c:IsPreviousPosition(POS_FACEUP) and c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) end function s.descon(e,tp,eg,ep,ev,re,r,rp) @@ -60,7 +60,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x1157) and c:IsType(TYPE_LINK) and c:GetLink()>0 + return c:IsFaceup() and c:IsSetCard(SET_SUNAVALON) and c:IsType(TYPE_LINK) and c:GetLink()>0 end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -79,7 +79,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(tc:GetLink()*800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -99,12 +99,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c91559748.lua b/official/c91559748.lua index 9be5d289e6..8e7693fb09 100644 --- a/official/c91559748.lua +++ b/official/c91559748.lua @@ -1,4 +1,5 @@ --棘の妖精 +--Prickle Fairy local s,id=GetID() function s.initial_effect(c) --change position @@ -37,4 +38,4 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) if g:IsRelateToBattle() and g:IsAttackPos() then Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c9156135.lua b/official/c9156135.lua index 8f699d2a1c..94e3ff2c25 100644 --- a/official/c9156135.lua +++ b/official/c9156135.lua @@ -65,4 +65,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91575236.lua b/official/c91575236.lua index 95b8df67fc..781b08f2e2 100644 --- a/official/c91575236.lua +++ b/official/c91575236.lua @@ -1,12 +1,12 @@ --- イモータル・ドラゴン --- Immortal Dragon --- Scripted by Hatter +--イモータル・ドラゴン +--Immortal Dragon +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 1 Tuner + 1+ non-Tuner monsters + --1 Tuner + 1+ non-Tuner monsters Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) - -- Send a Zombie to the GY + --Send a Zombie to the GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_LVCHANGE) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) - -- Special Summon self + --Special Summon self local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -43,13 +43,13 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,c):GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then - -- Change Level + --Change Level local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(math.abs(c:GetOriginalLevel()-tc:GetOriginalLevel())) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -69,13 +69,13 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c91580102.lua b/official/c91580102.lua index 1c5cf64028..ebbd348d73 100644 --- a/official/c91580102.lua +++ b/official/c91580102.lua @@ -1,4 +1,5 @@ --レプティレス・アンガー +--Reptilianne Rage local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -41,7 +42,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c91584698.lua b/official/c91584698.lua index a386a6f3f2..9492c233b4 100644 --- a/official/c91584698.lua +++ b/official/c91584698.lua @@ -19,28 +19,24 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.thcost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end s.listed_names={CARD_POLYMERIZATION} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.thfilter(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91588074.lua b/official/c91588074.lua index 84890b3689..e9d73075e8 100644 --- a/official/c91588074.lua +++ b/official/c91588074.lua @@ -1,6 +1,5 @@ --創星神 tierra --Tierra, Source of Destruction - local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -35,6 +34,7 @@ function s.initial_effect(c) e4:SetOperation(s.tdop) c:RegisterEffect(e4) end +local LOC_HAND_FIELD_GRAVE_EXTRA=LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE|LOCATION_EXTRA function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==#sg,sg:GetClassCount(Card.GetCode)~=#sg end @@ -42,11 +42,11 @@ function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c) + local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) return (ft>0 or g:IsExists(aux.NOT(Card.IsInExtraMZone),(-ft)+1,nil)) and g:GetClassCount(Card.GetCode)>9 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c) + local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,c) local rg=aux.SelectUnselectGroup(g,e,tp,10,10,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #rg>0 then rg:KeepAlive() @@ -58,19 +58,19 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp,c) local rg=e:GetLabelObject() if not rg then return end - Duel.SendtoDeck(rg,nil,2,REASON_COST) + Duel.SendtoDeck(rg,nil,SEQ_DECKSHUFFLE,REASON_COST) rg:DeleteGroup() end function s.tdfilter(c) - return (c:IsLocation(0x1e) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAbleToDeck() + return (c:IsLocation(LOCATION_GRAVE|LOCATION_ONFIELD|LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local g=Duel.GetMatchingGroup(s.tdfilter,tp,0x5e,0x5e,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOC_HAND_FIELD_GRAVE_EXTRA,LOC_HAND_FIELD_GRAVE_EXTRA,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) Duel.SetChainLimit(aux.FALSE) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tdfilter,tp,0x5e,0x5e,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOC_HAND_FIELD_GRAVE_EXTRA,LOC_HAND_FIELD_GRAVE_EXTRA,e:GetHandler()) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91595718.lua b/official/c91595718.lua index 20224b531c..827d1bae7b 100644 --- a/official/c91595718.lua +++ b/official/c91595718.lua @@ -1,4 +1,5 @@ --秘術の書 +--Book of Secret Arts local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c91596726.lua b/official/c91596726.lua index dc2bfec846..5fbb046cc6 100644 --- a/official/c91596726.lua +++ b/official/c91596726.lua @@ -1,4 +1,5 @@ --ダーク・クルセイダー +--Dark Crusader local s,id=GetID() function s.initial_effect(c) --atkup @@ -27,7 +28,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c91598270.lua b/official/c91598270.lua index 5694de1070..1b11b9e3f2 100644 --- a/official/c91598270.lua +++ b/official/c91598270.lua @@ -1,18 +1,18 @@ --- ソドレミコード・グレーシア --- Sodoremichord Gracea --- scripted by Hatter +--ソドレミコード・グレーシア +--SolSolfachord Gracia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- pendulum + --pendulum Pendulum.AddProcedure(c) - -- cannot activate s/t on pendulum summon + --cannot activate s/t on pendulum summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_PZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetOperation(s.sucop) c:RegisterEffect(e1) - -- search + --search local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) @@ -26,7 +26,7 @@ function s.initial_effect(c) local e3=e2:Clone() e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) - -- cannot activate monster effects on attack + --cannot activate monster effects on attack local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_ATTACK_ANNOUNCE) @@ -35,9 +35,9 @@ function s.initial_effect(c) e4:SetOperation(s.btop) c:RegisterEffect(e4) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.sucfilter(c,tp) - return c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsPendulumSummoned() end function s.sucop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.sucfilter,1,nil,tp) then @@ -45,10 +45,10 @@ function s.sucop(e,tp,eg,ep,ev,re,r,rp) end end function s.chainlm(e,rp,tp) - return tp==rp or (e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)) + return tp==rp or (e:IsSpellTrapEffect() and not e:IsHasType(EFFECT_TYPE_ACTIVATE)) end function s.thfilter(c) - return c:IsSetCard(0x164) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SOLFACHORD) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,7 +64,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.btcon(e,tp,eg,ep,ev,re,r,rp) local ac=Duel.GetAttacker() - return ac and ac:IsControler(tp) and ac:IsType(TYPE_PENDULUM) and ac:IsSetCard(0x164) + return ac and ac:IsControler(tp) and ac:IsType(TYPE_PENDULUM) and ac:IsSetCard(SET_SOLFACHORD) end function s.btop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -76,12 +76,12 @@ function s.btop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetCondition(s.actcon) e1:SetValue(s.actlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end function s.actcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsEvenScale),e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil) end function s.actlimit(e,re,tp) - return re:IsActiveType(TYPE_MONSTER) -end + return re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c91607976.lua b/official/c91607976.lua index 8f697dd3f6..ec2a37043f 100644 --- a/official/c91607976.lua +++ b/official/c91607976.lua @@ -67,4 +67,4 @@ end function s.opd2(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9161357.lua b/official/c9161357.lua index 5dc09bc06b..ea65f59c72 100644 --- a/official/c9161357.lua +++ b/official/c9161357.lua @@ -27,16 +27,16 @@ function s.initial_effect(c) e2:SetOperation(s.lpop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=6 function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x48) + return ec:IsControler(tp) and ec:IsSetCard(SET_NUMBER) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.filter(c) - return c:IsSetCard(0x48) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_NUMBER) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -55,7 +55,7 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk) tc:RegisterEffect(e2) end @@ -74,7 +74,7 @@ end function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local eqg=c:GetEquipGroup() - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 and #eqg>0 and eqg:IsExists(s.eqfilter,1,nil,tp) + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and #eqg>0 and eqg:IsExists(s.eqfilter,1,nil,tp) and c:CheckRemoveOverlayCard(tp,1,REASON_COST) end c:RemoveOverlayCard(tp,1,1,REASON_COST) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) @@ -85,15 +85,15 @@ function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.lpop(e,tp,eg,ep,ev,re,r,rp) Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2) -end +end \ No newline at end of file diff --git a/official/c91623717.lua b/official/c91623717.lua index e8afbffde9..d215c83109 100644 --- a/official/c91623717.lua +++ b/official/c91623717.lua @@ -1,4 +1,5 @@ --連鎖爆撃 +--Chain Strike local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91642007.lua b/official/c91642007.lua index c2e74a0fdd..c4a1f2a427 100644 --- a/official/c91642007.lua +++ b/official/c91642007.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x13f} +s.listed_series={SET_PLUNDER_PATROLL} s.listed_names={id} function s.thfilter(c) - return c:IsSetCard(0x13f) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsMonster() and c:IsAbleToHand() and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -60,17 +60,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x13f) + return not c:IsSetCard(SET_PLUNDER_PATROLL) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) + return e:GetHandler():IsPreviousLocation(LOCATION_HAND|LOCATION_MZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x13f) and c:IsOriginalType(TYPE_MONSTER) and c:GetSequence()<5 + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsOriginalType(TYPE_MONSTER) and c:GetSequence()<5 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c91646304.lua b/official/c91646304.lua index 0829679005..69d83917f0 100644 --- a/official/c91646304.lua +++ b/official/c91646304.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EFFECT_DESTROY_REPLACE) - e2:SetRange(LOCATION_GRAVE+LOCATION_MZONE) + e2:SetRange(LOCATION_GRAVE|LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.reptg) e2:SetValue(s.repval) diff --git a/official/c91650245.lua b/official/c91650245.lua index f7997a54d4..af4a8693d3 100644 --- a/official/c91650245.lua +++ b/official/c91650245.lua @@ -1,6 +1,5 @@ --森羅の恵み --Sylvan Blessing - local s,id=GetID() function s.initial_effect(c) --Special summon 1 "Sylvan" monster from hand or GY @@ -10,22 +9,21 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x90} - +s.listed_series={SET_SYLVAN} function s.filter(c,e,tp) - return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,c,e,tp) + return c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,c,e,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x90) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SYLVAN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end @@ -36,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local opt=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) Duel.SendtoDeck(g,nil,opt,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc,e,tp) + local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,tc,e,tp) local sc=sg:GetFirst() if sc then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) @@ -47,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetOperation(s.tdop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sc:RegisterEffect(e1) --Unaffected by other card effects local e2=Effect.CreateEffect(e:GetHandler()) @@ -56,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_IMMUNE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(s.efilter) sc:RegisterEffect(e2) end @@ -66,9 +64,9 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) or Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1))==0 then - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT) else - Duel.SendtoDeck(c,nil,1,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end function s.efilter(e,te) diff --git a/official/c91662792.lua b/official/c91662792.lua index 2ca145c495..8bdafd72d9 100644 --- a/official/c91662792.lua +++ b/official/c91662792.lua @@ -1,4 +1,5 @@ --ガスタ・イグル +--Gusto Egul local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x10) and not c:IsType(TYPE_TUNER) + return c:IsLevelBelow(4) and c:IsSetCard(SET_GUSTO) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91663373.lua b/official/c91663373.lua index 26920915b2..2dfba0d83b 100644 --- a/official/c91663373.lua +++ b/official/c91663373.lua @@ -1,4 +1,5 @@ --サイバー・エスパー +--Cyber Esper local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -22,4 +23,4 @@ function s.cfop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(tp,cg) Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c91665064.lua b/official/c91665064.lua index 8c5cd8d771..5d4e2d4d4a 100644 --- a/official/c91665064.lua +++ b/official/c91665064.lua @@ -1,6 +1,5 @@ --セキュリティ・ブロック --Security Block - local s,id=GetID() function s.initial_effect(c) --Targeted cyberse monster cannot be destroyed by battle, also neither player take battle damage @@ -29,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then @@ -39,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) tc:RegisterEffect(e2) end diff --git a/official/c91668401.lua b/official/c91668401.lua index b8568cb865..322974a434 100644 --- a/official/c91668401.lua +++ b/official/c91668401.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) end) + e1:SetCondition(function(e) return e:GetHandler():IsRitualSummoned() end) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) c:RegisterEffect(e1) @@ -96,4 +96,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(g2,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c91677585.lua b/official/c91677585.lua index 4d88159df8..b19334f3c0 100644 --- a/official/c91677585.lua +++ b/official/c91677585.lua @@ -1,6 +1,5 @@ --かっとビング・チャレンジ --Hi-Five the Sky - local s,id=GetID() function s.initial_effect(c) --Make 1 of your Xyz monsters, that already attack this turn, make a second attack @@ -37,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) --Opponent cannot activate cards/effects until end of damage step local e2=Effect.CreateEffect(c) @@ -48,7 +47,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,1) e2:SetValue(s.aclimit) e2:SetCondition(s.actcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e2) end end @@ -56,5 +55,5 @@ function s.actcon(e) return Duel.GetAttacker()==e:GetHandler() end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER) -end + return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsMonsterEffect() +end \ No newline at end of file diff --git a/official/c91691605.lua b/official/c91691605.lua index a5e09c70ff..6ad28c4088 100644 --- a/official/c91691605.lua +++ b/official/c91691605.lua @@ -22,9 +22,9 @@ function s.initial_effect(c) e3:SetCode(EFFECT_PIERCE) c:RegisterEffect(e3) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.filter(c,e,tp,atk) - return c:IsSetCard(0xc008) and c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91697229.lua b/official/c91697229.lua index 2cd74c925c..871ebfce32 100644 --- a/official/c91697229.lua +++ b/official/c91697229.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e5:SetDescription(aux.Stringid(id,1)) e5:SetCategory(CATEGORY_POSITION) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e5:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e5:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(s.poscon) @@ -39,18 +39,18 @@ function s.initial_effect(c) e6:SetCode(EFFECT_BOTH_BATTLE_DAMAGE) c:RegisterEffect(e6) end -s.listed_series={0x4b} +s.listed_series={SET_AESIR} function s.spcon(e,c) - if c==nil then return Duel.GetCurrentPhase()==PHASE_MAIN2 end + if c==nil then return Duel.IsPhase(PHASE_MAIN2) end local tp=c:GetControler() return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x4b),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AESIR),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.descon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x4b),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_AESIR),0,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -62,4 +62,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c91703676.lua b/official/c91703676.lua index df68a42fae..b30df7f67e 100644 --- a/official/c91703676.lua +++ b/official/c91703676.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMINGS_CHECK_MONSTER_E) + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMINGS_CHECK_MONSTER_E) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -62,4 +62,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end return Duel.SelectEffectYesNo(tp,c,96) -end +end \ No newline at end of file diff --git a/official/c91706817.lua b/official/c91706817.lua index 5060a4ed90..56f68351bc 100644 --- a/official/c91706817.lua +++ b/official/c91706817.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetCondition(function(_,_,_,_,_,_,r)return r&REASON_EFFECT~=0 end) e2:SetTarget(s.settg) e2:SetOperation(s.setop) diff --git a/official/c91711547.lua b/official/c91711547.lua index 7aa5357948..0a745f753a 100644 --- a/official/c91711547.lua +++ b/official/c91711547.lua @@ -1,4 +1,5 @@ --フレムベル・デビル +--Flamvell Fiend local s,id=GetID() function s.initial_effect(c) --damage diff --git a/official/c91712985.lua b/official/c91712985.lua index f82cdc0751..168e5f8c56 100644 --- a/official/c91712985.lua +++ b/official/c91712985.lua @@ -1,4 +1,5 @@ --時械神カミオン +--Kamion, the Timelord local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -35,7 +36,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_TODECK+CATEGORY_DAMAGE) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.tdcon) @@ -47,7 +48,7 @@ function s.initial_effect(c) e7:SetDescription(aux.Stringid(id,2)) e7:SetCategory(CATEGORY_TODECK) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e7:SetCode(EVENT_PHASE+PHASE_STANDBY) + e7:SetCode(EVENT_PHASE|PHASE_STANDBY) e7:SetCountLimit(1) e7:SetRange(LOCATION_MZONE) e7:SetCondition(s.rtdcon) @@ -81,7 +82,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) end end function s.rtdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -90,6 +91,6 @@ end function s.rtdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91718579.lua b/official/c91718579.lua index eac084273f..586cfd9153 100644 --- a/official/c91718579.lua +++ b/official/c91718579.lua @@ -1,4 +1,5 @@ --ゴゴゴアリステラ&デクシア +--Gogogo Aristera & Dexia local s,id=GetID() function s.initial_effect(c) --untargetable @@ -16,7 +17,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetRange(LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x59)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GOGOGO)) e2:SetCondition(s.tgcon) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) @@ -28,16 +29,16 @@ function s.initial_effect(c) e3:SetOperation(s.effop) c:RegisterEffect(e3) end -s.listed_series={0x59} +s.listed_series={SET_GOGOGO} function s.tgcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x59),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GOGOGO),0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0x59) + return c:IsFaceup() and c:IsSetCard(SET_GOGOGO) end function s.effcon(e,tp,eg,ep,ev,re,r,rp) local mg=e:GetHandler():GetReasonCard():GetMaterial() - return r==REASON_XYZ and mg:IsExists(Card.IsSetCard,#mg,nil,0x59) + return r==REASON_XYZ and mg:IsExists(Card.IsSetCard,#mg,nil,SET_GOGOGO) end function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_CARD,0,id) @@ -52,19 +53,19 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.poscon) e1:SetTarget(s.postg) e1:SetOperation(s.posop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.filter(c) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() @@ -83,7 +84,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c91740879.lua b/official/c91740879.lua index 19ad73ef21..350bff9d6c 100644 --- a/official/c91740879.lua +++ b/official/c91740879.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_COUNTER) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) e2:SetCondition(s.condition) e2:SetOperation(s.operation) @@ -56,7 +56,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.announcecost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -87,4 +87,4 @@ function s.dmgop(e,tp,eg,ep,ev,re,r,rp) local d=e:GetHandler():GetCounter(COUNTER_CAULDRON)*300 local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91742238.lua b/official/c91742238.lua index b28ee05d1c..b3ce3fc4dc 100644 --- a/official/c91742238.lua +++ b/official/c91742238.lua @@ -1,7 +1,6 @@ --リターン・オブ・アンデット --Return of the Zombies --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Banish 1 zombie monster from field, then controller of it special summons 1 zombie monster from their GY @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetCountLimit(1,id) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e1) --Set itself from GY local e2=Effect.CreateEffect(c) @@ -73,7 +72,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1) end diff --git a/official/c91754175.lua b/official/c91754175.lua index 48057e4744..6aa37336a6 100644 --- a/official/c91754175.lua +++ b/official/c91754175.lua @@ -22,12 +22,12 @@ function s.tgfilter(c) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsAbleToGrave() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) local c=e:GetHandler() local tc=g:GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) @@ -37,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(lv*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c917796.lua b/official/c917796.lua index cff70aa86b..3a759c5ad8 100644 --- a/official/c917796.lua +++ b/official/c917796.lua @@ -12,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x54),tp,LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,1,nil) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x54),tp,LOCATION_MZONE,0,nil) + local sg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,nil) local atk=#sg*500 local c=e:GetHandler() local tc=sg:GetFirst() @@ -26,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY,2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c91781484.lua b/official/c91781484.lua index 8a6c4a9be9..fbf76b94dd 100644 --- a/official/c91781484.lua +++ b/official/c91781484.lua @@ -17,9 +17,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10af} +s.listed_series={SET_DDD} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x10af),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_DDD),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end @@ -36,7 +36,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -45,16 +45,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e3=e1:Clone() e3:SetCode(EFFECT_CANNOT_ATTACK) tc:RegisterEffect(e3) - if tc:IsSummonType(SUMMON_TYPE_SPECIAL) and tc:IsSummonLocation(LOCATION_EXTRA) then + if tc:IsSpecialSummoned() and tc:IsSummonLocation(LOCATION_EXTRA) then --Treated as a "D/D/D" monster local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetProperty(EFFECT_FLAG_CLIENT_HINT) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_ADD_SETCODE) - e4:SetValue(0x10af) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetValue(SET_DDD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4) end end -end +end \ No newline at end of file diff --git a/official/c91781589.lua b/official/c91781589.lua index 2c61f29873..e08c386ef6 100644 --- a/official/c91781589.lua +++ b/official/c91781589.lua @@ -1,4 +1,5 @@ --覇者の一括 +--Thunder of Ruler local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_STANDBY + return Duel.IsTurnPlayer(1-tp) and Duel.IsPhase(PHASE_STANDBY) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(0,1) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c91782219.lua b/official/c91782219.lua index 99ac276e13..cb3c93eee3 100644 --- a/official/c91782219.lua +++ b/official/c91782219.lua @@ -1,4 +1,5 @@ --クラブ・タートル +--Crab Turtle local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c91798373.lua b/official/c91798373.lua index 3737c46579..2008a57a63 100644 --- a/official/c91798373.lua +++ b/official/c91798373.lua @@ -1,4 +1,5 @@ --デュアル・スコーピオン +--Gemini Scorpion local s,id=GetID() function s.initial_effect(c) --spsummon @@ -30,4 +31,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91800273.lua b/official/c91800273.lua index 0dd7011d3c..49a36ef96d 100644 --- a/official/c91800273.lua +++ b/official/c91800273.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetOperation(s.operation) c:RegisterEffect(e1) end @@ -19,10 +19,6 @@ function s.condition(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_GRAVE,0)==0 end --Send this card from hand to GY -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end --Cards sent to GY are banished instead, lasts to next turn function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -30,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetTargetRange(0xff,0xff) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) e1:SetValue(LOCATION_REMOVED) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c91812341.lua b/official/c91812341.lua index 8675d85cf3..7a440e5fc8 100644 --- a/official/c91812341.lua +++ b/official/c91812341.lua @@ -1,4 +1,5 @@ --トリオンの蟲惑魔 +--Traptrix Myrmeleo local s,id=GetID() function s.initial_effect(c) --immune @@ -29,13 +30,13 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.listed_series={0x4c,0x89} +s.listed_series={SET_TRAP_HOLE,SET_HOLE} function s.efilter(e,te) local c=te:GetHandler() - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) end function s.filter(c) - return c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:IsAbleToHand() + return c:IsNormalTrap() and (c:IsSetCard(SET_TRAP_HOLE) or c:IsSetCard(SET_HOLE)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -50,7 +51,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and s.desfilter(chkc) end @@ -64,4 +65,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91819979.lua b/official/c91819979.lua index 9d460d6060..2168f11c2b 100644 --- a/official/c91819979.lua +++ b/official/c91819979.lua @@ -1,4 +1,5 @@ --マジックブラスト +--Magical Blast local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -47,7 +48,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end @@ -60,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c91822647.lua b/official/c91822647.lua index c540779123..3035bae201 100644 --- a/official/c91822647.lua +++ b/official/c91822647.lua @@ -1,4 +1,5 @@ --ガスタのつむじ風 +--Whirlwind of Gusto local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.filter1(c) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToDeck() end function s.filter2(c,e,tp) - return c:IsSetCard(0x10) and c:IsDefenseBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GUSTO) and c:IsDefenseBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -45,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c91831066.lua b/official/c91831066.lua index b938746ab3..ba7277c864 100644 --- a/official/c91831066.lua +++ b/official/c91831066.lua @@ -28,14 +28,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10cd} +s.listed_series={SET_AQUAACTRESS} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local bc=Duel.GetAttackTarget() if not bc then return false end if bc:IsControler(1-tp) then bc=tc end e:SetLabelObject(bc) - return bc:IsFaceup() and bc:IsSetCard(0x10cd) + return bc:IsFaceup() and bc:IsSetCard(SET_AQUAACTRESS) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -45,7 +45,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -79,9 +79,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:GetRace()~=RACE_AQUA -end +end \ No newline at end of file diff --git a/official/c91842653.lua b/official/c91842653.lua index 598129c494..b3cecec911 100644 --- a/official/c91842653.lua +++ b/official/c91842653.lua @@ -100,7 +100,7 @@ function s.atklimit(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.atcost(e,c,tp) @@ -111,4 +111,4 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.PayLPCost(tp,500) Duel.AttackCostPaid() end -end +end \ No newline at end of file diff --git a/official/c91862578.lua b/official/c91862578.lua index 3d9456e642..98b49a2996 100644 --- a/official/c91862578.lua +++ b/official/c91862578.lua @@ -1,4 +1,5 @@ --激昂のムカムカ +--Enraged Muka Muka local s,id=GetID() function s.initial_effect(c) --atkup @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*400 -end +end \ No newline at end of file diff --git a/official/c91869203.lua b/official/c91869203.lua index 37dc68959a..9bdef0ea62 100644 --- a/official/c91869203.lua +++ b/official/c91869203.lua @@ -1,4 +1,5 @@ --アマゾネスの射手 +--Amazoness Archer local s,id=GetID() function s.initial_effect(c) --damage @@ -27,4 +28,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c91870448.lua b/official/c91870448.lua index 24a24e61e8..86a072cf33 100644 --- a/official/c91870448.lua +++ b/official/c91870448.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_JINZO),tp,LOCATION_ONFIELD,0,1,nil) end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.pltg) e2:SetOperation(s.plop) c:RegisterEffect(e2) diff --git a/official/c91895091.lua b/official/c91895091.lua index 4bf2f54755..fef2e442aa 100644 --- a/official/c91895091.lua +++ b/official/c91895091.lua @@ -1,4 +1,5 @@ --銀嶺の巨神 +--Soul of Silvermountain local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -27,10 +28,6 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFacedown() and c:GetSequence()~=5 end @@ -49,7 +46,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.rcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -78,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c91903221.lua b/official/c91903221.lua index 674a87a616..5635ca44b8 100644 --- a/official/c91903221.lua +++ b/official/c91903221.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x304e} +s.listed_series={SET_EVOLTILE} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) @@ -28,7 +28,7 @@ function s.tdfilter(c) return c:IsRace(RACE_DINOSAUR) and c:IsAbleToDeck() end function s.thfilter(c) - return c:IsSetCard(0x304e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_EVOLTILE) and c:IsMonster() and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end @@ -45,4 +45,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg2,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg2) end -end +end \ No newline at end of file diff --git a/official/c9190563.lua b/official/c9190563.lua index eeb0f230cd..da690da4d1 100644 --- a/official/c9190563.lua +++ b/official/c9190563.lua @@ -1,4 +1,5 @@ --RAMクラウダー +--RAM Clouder local s,id=GetID() function s.initial_effect(c) --spsummon @@ -38,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c91907707.lua b/official/c91907707.lua index 07e78791dd..2662fe6b14 100644 --- a/official/c91907707.lua +++ b/official/c91907707.lua @@ -1,4 +1,5 @@ --クリフォート・アーカイブ +--Qliphort Carrier local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -18,7 +19,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_PZONE) e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetTargetRange(LOCATION_MZONE,0) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xaa)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_QLI)) e3:SetValue(300) c:RegisterEffect(e3) --summon with no tribute @@ -59,9 +60,9 @@ function s.initial_effect(c) e8:SetOperation(s.thop) c:RegisterEffect(e8) end -s.listed_series={0xaa} +s.listed_series={SET_QLI} function s.splimit(e,c) - return not c:IsSetCard(0xaa) + return not c:IsSetCard(SET_QLI) end function s.ntcon(e,c,minc) if c==nil then return true end @@ -99,7 +100,7 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(4) - e1:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -107,11 +108,11 @@ function s.lvop2(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetValue(1800) - e2:SetReset(RESET_EVENT|(RESETS_STANDARD|RESET_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) + e2:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE)&~(RESET_TOFIELD|RESET_LEAVE)) c:RegisterEffect(e2) end function s.immcon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL) + return e:GetHandler():IsNormalSummoned() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end @@ -125,4 +126,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c91932350.lua b/official/c91932350.lua index 1c755107d2..8953636ff8 100644 --- a/official/c91932350.lua +++ b/official/c91932350.lua @@ -1,4 +1,5 @@ --ハーピィ・レディ1 +--Harpie Lady 1 local s,id=GetID() function s.initial_effect(c) --atkup @@ -11,4 +12,4 @@ function s.initial_effect(c) e1:SetValue(300) c:RegisterEffect(e1) end -s.listed_names={CARD_HARPIE_LADY} +s.listed_names={CARD_HARPIE_LADY} \ No newline at end of file diff --git a/official/c91946859.lua b/official/c91946859.lua index 01af5c8602..988ed334f5 100644 --- a/official/c91946859.lua +++ b/official/c91946859.lua @@ -62,4 +62,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP) then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c91949988.lua b/official/c91949988.lua index 2b443da607..f34c9a260d 100644 --- a/official/c91949988.lua +++ b/official/c91949988.lua @@ -1,4 +1,5 @@ --迅雷の騎士ガイアドラグーン +--Gaia Dragon, the Thunder Charger local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,4 +14,4 @@ end function s.ovfilter(c) local rk=c:GetRank() return c:IsFaceup() and (rk==5 or rk==6) -end +end \ No newline at end of file diff --git a/official/c91953000.lua b/official/c91953000.lua index c8289d80be..526eaeaa7d 100644 --- a/official/c91953000.lua +++ b/official/c91953000.lua @@ -33,10 +33,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} --Check for "Marincess" monster, besides same name function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0x12b) and not c:IsCode(id) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_MARINCESS) and not c:IsCode(id) and c:IsAbleToGrave() end --Activation legality function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,7 +64,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) end --Check for "Marincess" card function s.thfilter(c) - return c:IsSetCard(0x12b) and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and c:IsAbleToHand() end --Excavate top 3 cards function s.thop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c91957038.lua b/official/c91957038.lua index 25e07186e7..50f5dc2447 100644 --- a/official/c91957038.lua +++ b/official/c91957038.lua @@ -68,4 +68,4 @@ function s.damval(e,re,val,r,rp,rc) return 0 end return val -end +end \ No newline at end of file diff --git a/official/c91969909.lua b/official/c91969909.lua index 5ec4d5ad9f..bf7f2ef2dd 100644 --- a/official/c91969909.lua +++ b/official/c91969909.lua @@ -4,55 +4,52 @@ local s,id=GetID() function s.initial_effect(c) --Activate + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_ACTIVATE) + e0:SetCode(EVENT_FREE_CHAIN) + c:RegisterEffect(e0) + --Your opponent cannot target "Valkyrie" monsters you control with card effects, also they cannot be destroyed by your opponent's card effects local e1=Effect.CreateEffect(c) - e1:SetType(EFFECT_TYPE_ACTIVATE) - e1:SetCode(EVENT_FREE_CHAIN) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e1:SetRange(LOCATION_SZONE) + e1:SetTargetRange(LOCATION_MZONE,0) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VALKYRIE)) + e1:SetValue(aux.indoval) c:RegisterEffect(e1) - ---Prevent destruction by opponent's effect - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e2:SetRange(LOCATION_SZONE) - e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x122)) - e2:SetValue(aux.indoval) + local e2=e1:Clone() + e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) + e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) + e2:SetValue(aux.tgoval) c:RegisterEffect(e2) - --Prevent effect target - local e3=e2:Clone() - e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e3:SetValue(aux.tgoval) + --Declare 1 card name and reveal 1 Set card your opponent controls, and if it was the declared card, banish it, otherwise, banish 1 card you control + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,0)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1) + e3:SetTarget(s.rmtg) + e3:SetOperation(s.rmop) c:RegisterEffect(e3) - --Banish - local e4=Effect.CreateEffect(c) - e4:SetCategory(CATEGORY_REMOVE) - e4:SetDescription(aux.Stringid(id,0)) - e4:SetType(EFFECT_TYPE_IGNITION) - e4:SetCountLimit(1) - e4:SetRange(LOCATION_SZONE) - e4:SetProperty(EFFECT_FLAG_CARD_TARGET) - e4:SetTarget(s.rmtg) - e4:SetOperation(s.rmop) - c:RegisterEffect(e4) -end -s.listed_series={0x122} -function s.rmfilter(c) - return c:IsFacedown() and c:IsAbleToRemove() end +s.listed_series={SET_VALKYRIE} function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_ONFIELD) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) end - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil) + if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsFacedown() and chkc:IsAbleToRemove() end + if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsExistingTarget(aux.AND(Card.IsFacedown,Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) local ac=Duel.AnnounceCard(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectTarget(tp,aux.AND(Card.IsFacedown,Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetTargetParam(ac) Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD) - Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,g+Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0),1,tp,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) - local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local tc=Duel.GetFirstTarget() - if not (e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFacedown()) then return end + if not (tc:IsRelateToEffect(e) and tc:IsFacedown()) then return end + local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) Duel.ConfirmCards(tp,tc) if tc:IsCode(ac) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) @@ -60,7 +57,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil) if #g>0 then + Duel.HintSelection(g) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end -end \ No newline at end of file +end diff --git a/official/c91985515.lua b/official/c91985515.lua index 201c0338db..4353717fba 100644 --- a/official/c91985515.lua +++ b/official/c91985515.lua @@ -1,4 +1,5 @@ --鋼核初期化 +--Koa'ki Meiru Initialize! local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,22 +14,22 @@ function s.initial_effect(c) end s.listed_names={36623431} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x1d) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x1d) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_KOAKI_MEIRU) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_KOAKI_MEIRU) Duel.Release(g,REASON_COST) end function s.filter(c) return c:IsCode(36623431) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c91989718.lua b/official/c91989718.lua index 7644d9f4cd..06641b22ca 100644 --- a/official/c91989718.lua +++ b/official/c91989718.lua @@ -1,4 +1,5 @@ --アタック・リフレクター・ユニット +--Attack Reflector Unit local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,15 +30,15 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c91998119.lua b/official/c91998119.lua index 9ea153d936..f8ea8938cb 100644 --- a/official/c91998119.lua +++ b/official/c91998119.lua @@ -22,14 +22,14 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) + return not e:GetHandler():IsLocation(LOCATION_EXTRA|LOCATION_GRAVE) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end @@ -43,4 +43,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92001300.lua b/official/c92001300.lua index 13bb90c603..71c3a0833f 100644 --- a/official/c92001300.lua +++ b/official/c92001300.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR)) e2:SetValue(300) c:RegisterEffect(e2) --counter @@ -42,13 +42,13 @@ function s.initial_effect(c) ge1:SetCode(EFFECT_SUMMON_PROC) ge1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) ge1:SetCondition(s.sumcon) - ge1:SetTarget(aux.FieldSummonProcTg(aux.TargetBoolFunction(Card.IsSetCard,0x7),s.sumtg)) + ge1:SetTarget(aux.FieldSummonProcTg(aux.TargetBoolFunction(Card.IsSetCard,SET_ANCIENT_GEAR),s.sumtg)) ge1:SetOperation(s.sumop) ge1:SetValue(SUMMON_TYPE_TRIBUTE) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} function s.addc(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0xb,1) end @@ -65,6 +65,7 @@ end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,c) tp=c:GetControler() local mi,ma=c:GetTributeRequirement() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) local sg=Duel.SelectMatchingCard(tp,s.castlefilter,tp,LOCATION_SZONE,0,1,1,true,nil,tp,mi,ma) if sg then sg:KeepAlive() @@ -78,4 +79,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp,c) if not sg then return end Duel.Release(sg,REASON_COST) sg:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c9201964.lua b/official/c9201964.lua index ee9b211440..e9d86a2076 100644 --- a/official/c9201964.lua +++ b/official/c9201964.lua @@ -12,17 +12,17 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget()==nil + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil end function s.cfilter(c) - return c:IsSetCard(0xc008) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_DESTINY_HERO) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end \ No newline at end of file diff --git a/official/c92035412.lua b/official/c92035412.lua index b9e77c4531..ecf1eeeb30 100644 --- a/official/c92035412.lua +++ b/official/c92035412.lua @@ -1,4 +1,5 @@ --ヴァイロン・エレメント +--Vylon Element local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,9 +19,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x30} +s.listed_series={SET_VYLON} function s.cfilter(c,tp) - return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x30) + return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_VYLON) and (c:GetPreviousTypeOnField()&TYPE_EQUIP)~=0 end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -29,7 +30,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ct>0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x30) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_VYLON) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) @@ -51,12 +52,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e1:SetValue(s.synlimit) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() end function s.synlimit(e,c) if not c then return false end - return not c:IsSetCard(0x30) -end + return not c:IsSetCard(SET_VYLON) +end \ No newline at end of file diff --git a/official/c92039899.lua b/official/c92039899.lua index 42c90586d2..97f135b4f1 100644 --- a/official/c92039899.lua +++ b/official/c92039899.lua @@ -1,6 +1,5 @@ --デーモンの騎兵 --Archfiend Cavalry - local s,id=GetID() function s.initial_effect(c) --If destroyed by card effect, special summon 1 "Archfiend" monster from GY @@ -15,14 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x45} - +s.listed_series={SET_ARCHFIEND} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x45) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ARCHFIEND) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -41,7 +39,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c92043888.lua b/official/c92043888.lua index b78fa43302..4547827153 100644 --- a/official/c92043888.lua +++ b/official/c92043888.lua @@ -1,5 +1,5 @@ --ドレミコード・フォーマル ---Doremichord Formal +--Solfachord Formal --Scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) - and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0x164) + return rp==1-tp and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,SET_SOLFACHORD) end function s.disfilter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeck() @@ -72,4 +72,4 @@ function s.efilter(e,re) end function s.rmlimit(e,c,tp,r,re) return c:IsLocation(LOCATION_PZONE) and re==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c92053608.lua b/official/c92053608.lua index b90101dba8..b1505080ee 100644 --- a/official/c92053608.lua +++ b/official/c92053608.lua @@ -1,4 +1,5 @@ --アクアアクトレス・アロワナ +--Aquaactress Arowana local s,id=GetID() function s.initial_effect(c) --to hand @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.thop) c:RegisterEffect(e1) end -s.listed_series={0x10cd} +s.listed_series={SET_AQUAACTRESS} function s.filter(c) - return c:IsSetCard(0x10cd) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_AQUAACTRESS) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -26,4 +27,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c92065772.lua b/official/c92065772.lua index b46dd64192..801b2513c8 100644 --- a/official/c92065772.lua +++ b/official/c92065772.lua @@ -1,4 +1,5 @@ --氷結界に住む魔酔虫 +--Numbing Grub in the Ice Barrier local s,id=GetID() function s.initial_effect(c) --dis field @@ -17,10 +18,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e:GetHandler():RegisterEffect(e1) end function s.disop(e,tp) local dis1=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0) return dis1 -end +end \ No newline at end of file diff --git a/official/c92067220.lua b/official/c92067220.lua index 663439e3a8..56689f6eaa 100644 --- a/official/c92067220.lua +++ b/official/c92067220.lua @@ -1,5 +1,5 @@ +--ジョーカーズ・ストレート --Joker's Straight ---Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) --Activate @@ -48,9 +48,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)==0 + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)==0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) @@ -86,8 +86,8 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local c=e:GetHandler() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 - and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 + and tc:IsLocation(LOCATION_DECK|LOCATION_EXTRA) and c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92079625.lua b/official/c92079625.lua index 590dd5be77..6c88c9a9af 100644 --- a/official/c92079625.lua +++ b/official/c92079625.lua @@ -60,4 +60,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if attct>0 and Duel.IsPlayerCanDiscardDeck(tp,attct) then Duel.DiscardDeck(tp,attct,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92080692.lua b/official/c92080692.lua index 777046a97f..7f85faf9d0 100644 --- a/official/c92080692.lua +++ b/official/c92080692.lua @@ -1,5 +1,5 @@ --見切りの極意 ---Critical Timing +--Showdown of the Secret Sense Scroll Techniques --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return rp~=tp and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) + return rp~=tp and (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_GRAVE,1,nil,re:GetHandler():GetCode()) and Duel.IsChainNegatable(ev) end @@ -29,5 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c92084010.lua b/official/c92084010.lua index 74862e59b7..b6081cae60 100644 --- a/official/c92084010.lua +++ b/official/c92084010.lua @@ -1,4 +1,5 @@ --ヒゲアンコウ +--Unshaven Angler local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c92092092.lua b/official/c92092092.lua index 513b67767f..7c8ff3385d 100644 --- a/official/c92092092.lua +++ b/official/c92092092.lua @@ -1,3 +1,4 @@ +--調星のドラッグスター --Space Dragster local s,id=GetID() function s.initial_effect(c) @@ -27,15 +28,15 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,1800,1,RACE_MACHINE,ATTRIBUTE_FIRE) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,1800,1,RACE_MACHINE,ATTRIBUTE_FIRE) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,0,1800,1,RACE_MACHINE,ATTRIBUTE_FIRE) then return end - c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TUNER+TYPE_TRAP) + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,0,1800,1,RACE_MACHINE,ATTRIBUTE_FIRE) then return end + c:AddMonsterAttribute(TYPE_EFFECT|TYPE_TUNER|TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() @@ -45,4 +46,4 @@ function s.indcon(e) end function s.indtg(e,c) return c~=e:GetHandler() and c:IsType(TYPE_TUNER) -end +end \ No newline at end of file diff --git a/official/c92099232.lua b/official/c92099232.lua index d3f2fc3043..c20755e5b5 100644 --- a/official/c92099232.lua +++ b/official/c92099232.lua @@ -14,16 +14,16 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and - Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,0,2,RACE_FIEND,ATTRIBUTE_EARTH) end + Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,0,2,RACE_FIEND,ATTRIBUTE_EARTH) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,0,2,RACE_FIEND,ATTRIBUTE_EARTH) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,0,2,RACE_FIEND,ATTRIBUTE_EARTH) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TUNER+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c9212051.lua b/official/c9212051.lua index 3d5ca71a74..3f0fcee2b9 100644 --- a/official/c9212051.lua +++ b/official/c9212051.lua @@ -1,3 +1,4 @@ +--SPYRAL MISSION-救出 --SPYRAL MISSION - Rescue local s,id=GetID() function s.initial_effect(c) @@ -37,7 +38,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetHintTiming(0,TIMING_END_PHASE) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -54,12 +55,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetRange(LOCATION_SZONE) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3) + e1:SetReset(RESETS_STANDARD_PHASE_END|RESET_SELF_TURN,3) c:SetTurnCounter(0) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -72,10 +73,10 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.thfilter(c) - return c:IsSetCard(0xee) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPYRAL) and c:IsMonster() and c:IsAbleToHand() end function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -93,18 +94,13 @@ function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0xee) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SPYRAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -119,4 +115,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92133240.lua b/official/c92133240.lua index 24859c1ab9..00ad18e724 100644 --- a/official/c92133240.lua +++ b/official/c92133240.lua @@ -1,9 +1,9 @@ --- ダイノルフィア・テリジア --- Dinoruffia Therizia --- Scripted by Hatter +--ダイノルフィア・テリジア +--Dinomorphia Therizia +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Set + --Set local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -17,7 +17,7 @@ function s.initial_effect(c) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) - -- Special Summon + --Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -32,9 +32,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.setfilter(c) - return c:IsSetCard(0x175) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_DINOMORPHIA) and c:IsTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end @@ -46,12 +46,12 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if tc and Duel.SSet(tp,tc)>0 and Duel.GetLP(tp)<=2000 and c:IsFaceup() and c:IsRelateToEffect(e) then Duel.BreakEffect() - -- Gain ATK + --Gain ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -68,7 +68,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(tg,POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x175) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOMORPHIA) and c:IsLevelBelow(4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -82,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92142169.lua b/official/c92142169.lua index 4d116d9bfe..3147bb9a7a 100644 --- a/official/c92142169.lua +++ b/official/c92142169.lua @@ -1,4 +1,5 @@ --パクバグ +--Bite Bug local s,id=GetID() function s.initial_effect(c) --special summon @@ -46,7 +47,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c92170894.lua b/official/c92170894.lua index 41caf973f5..d0aad7f590 100644 --- a/official/c92170894.lua +++ b/official/c92170894.lua @@ -1,4 +1,5 @@ --EMロングフォーン・ブル +--Performapal Longphone Bull local s,id=GetID() function s.initial_effect(c) --search @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.tgop) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.thfilter(c) - return c:IsSetCard(0x9f) and c:IsMonster() and not c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() + return c:IsSetCard(SET_PERFORMAPAL) and c:IsMonster() and not c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -28,4 +29,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c92182447.lua b/official/c92182447.lua index 61723a2a37..8ff11f4f25 100644 --- a/official/c92182447.lua +++ b/official/c92182447.lua @@ -13,14 +13,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x122} +s.listed_series={SET_VALKYRIE} s.listed_names={92182447} function s.condition(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==1-tp or Duel.GetCurrentPhase()~=PHASE_BATTLE or Duel.GetCurrentChain(true)>0 then + if Duel.IsTurnPlayer(1-tp) or Duel.GetCurrentPhase()~=PHASE_BATTLE or Duel.GetCurrentChain(true)>0 then return false end local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) - return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,0x122),nil)==#g + return #g>0 and g:FilterCount(aux.FaceupFilter(Card.IsSetCard,SET_VALKYRIE),nil)==#g end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -34,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(c,REASON_EFFECT) end --skip phases until Battle Phase - Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1) --prevent activations for the rest of that battle phase local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_FIELD) @@ -42,26 +42,26 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e0:SetCode(EFFECT_CANNOT_ACTIVATE) e0:SetTargetRange(0,1) e0:SetValue(1) - e0:SetReset(RESET_PHASE+PHASE_BATTLE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_BATTLE|PHASE_END) Duel.RegisterEffect(e0,tp) - Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) - Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1) + Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) + Duel.SkipPhase(tp,PHASE_END,RESET_PHASE|PHASE_END,1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_SKIP_TURN) e1:SetTargetRange(0,1) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) - Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,2) - Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,2) - Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,2) + Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE|PHASE_END,2) + Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE|PHASE_END,2) + Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE|PHASE_END,2) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EFFECT_CANNOT_EP) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_SELF_TURN) + e2:SetReset(RESET_PHASE|PHASE_MAIN1|RESET_SELF_TURN) Duel.RegisterEffect(e2,tp) --prevent activation of "Mischief of the Time Goddess" local e3=Effect.CreateEffect(c) @@ -71,9 +71,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetTargetRange(1,0) e3:SetValue(s.limit) - e3:SetReset(RESET_PHASE+PHASE_END,3) + e3:SetReset(RESET_PHASE|PHASE_END,3) Duel.RegisterEffect(e3,tp) end function s.limit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(92182447) -end +end \ No newline at end of file diff --git a/official/c92204263.lua b/official/c92204263.lua index 5a6779bc88..c7f409528e 100644 --- a/official/c92204263.lua +++ b/official/c92204263.lua @@ -1,7 +1,6 @@ --紺碧の機界騎士 --Mekk-Knight Indigo Eclipse --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -25,8 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.seqop) c:RegisterEffect(e2) end -s.listed_series={0x10c} - +s.listed_series={SET_MEKK_KNIGHT} function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -40,7 +38,7 @@ function s.hspval(e,c) return 0,zone end function s.seqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10c) + return c:IsFaceup() and c:IsSetCard(SET_MEKK_KNIGHT) end function s.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.seqfilter(chkc) end @@ -54,4 +52,4 @@ function s.seqop(e,tp,eg,ep,ev,re,r,rp) if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0),2)) -end +end \ No newline at end of file diff --git a/official/c92219931.lua b/official/c92219931.lua index b21b4c0b40..5fcae22baf 100644 --- a/official/c92219931.lua +++ b/official/c92219931.lua @@ -1,4 +1,5 @@ --二者一両損 +--Simultaneous Loss local s,id=GetID() function s.initial_effect(c) --discard deck @@ -17,4 +18,4 @@ end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(0,1,REASON_EFFECT) Duel.DiscardDeck(1,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c92221402.lua b/official/c92221402.lua index 13f6d595cf..79adb7675c 100644 --- a/official/c92221402.lua +++ b/official/c92221402.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.ctrlcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.crtltg) e2:SetOperation(s.crtlop) c:RegisterEffect(e2) diff --git a/official/c92223641.lua b/official/c92223641.lua index 5a50af3034..79923851db 100644 --- a/official/c92223641.lua +++ b/official/c92223641.lua @@ -1,4 +1,5 @@ --天空の泉 +--The Fountain in the Sky local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local rc=s.filter(eg,tp) - return rc and not Duel.IsPlayerAffectedByEffect(rc:GetControler(),69832741) and rc:IsAbleToRemoveAsCost() + return rc and not Duel.IsPlayerAffectedByEffect(rc:GetControler(),CARD_SPIRIT_ELIMINATION) and rc:IsAbleToRemoveAsCost() end local rc=s.filter(eg,tp) e:SetLabel(rc:GetAttack()) @@ -43,4 +44,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c92246806.lua b/official/c92246806.lua index 633c6576b7..a1442c41ae 100644 --- a/official/c92246806.lua +++ b/official/c92246806.lua @@ -32,10 +32,10 @@ function s.initial_effect(c) e4:SetOperation(s.regop) c:RegisterEffect(e4) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} s.listed_names={id} function s.filter(c) - return c:IsSetCard(0xb3) and not c:IsCode(id) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_YOSENJU) and not c:IsCode(id) and c:IsSummonable(true,nil) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil) end @@ -63,7 +63,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetTarget(s.rettg) e1:SetOperation(s.retop) - e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD&~(RESET_TEMP_REMOVE|RESET_TURN_SET)|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -75,4 +75,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92266279.lua b/official/c92266279.lua index ef7e318334..d3a8c0fa67 100644 --- a/official/c92266279.lua +++ b/official/c92266279.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -36,13 +36,9 @@ function s.initial_effect(c) e3:SetOperation(s.recop) c:RegisterEffect(e3) end -s.listed_series={0xc9} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end +s.listed_series={SET_AROMA} function s.thfilter(c) - return c:IsSetCard(0xc9) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_AROMA) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,4 +66,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c92300891.lua b/official/c92300891.lua index 86438edb45..38c8e7924e 100644 --- a/official/c92300891.lua +++ b/official/c92300891.lua @@ -1,4 +1,5 @@ --カラクリ樽 真九六 +--Karakuri Barrel mdl 96 "Shinkuro" local s,id=GetID() function s.initial_effect(c) --must attack @@ -36,4 +37,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c92327802.lua b/official/c92327802.lua index 688c2e7f10..f3725a54c0 100644 --- a/official/c92327802.lua +++ b/official/c92327802.lua @@ -1,9 +1,10 @@ --ディフェクト・コンパイラー --Defect Compiler local s,id=GetID() +local COUNTER_DEFECT=0x43 function s.initial_effect(c) - c:EnableCounterPermit(0x43) - c:SetCounterLimit(0x43,1) + c:EnableCounterPermit(COUNTER_DEFECT) + c:SetCounterLimit(COUNTER_DEFECT,1) --damage reduce local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -26,28 +27,25 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) - e2:SetCondition(s.condition) + e2:SetCondition(aux.StatChangeDamageStepCondition) e2:SetCost(s.cost) e2:SetTarget(s.tg) e2:SetOperation(s.op) c:RegisterEffect(e2) end -s.counter_place_list={0x43} +s.counter_place_list={COUNTER_DEFECT} function s.damval(e,re,val,r,rp,rc) local c=e:GetHandler() - if r&REASON_EFFECT~=0 and c:IsCanAddCounter(0x43,1) and c:GetFlagEffect(id)==0 then - c:AddCounter(0x43,1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + if r&REASON_EFFECT~=0 and c:IsCanAddCounter(COUNTER_DEFECT,1) and c:GetFlagEffect(id)==0 then + c:AddCounter(COUNTER_DEFECT,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) return 0 end return val end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x43,1,REASON_COST) end - Duel.RemoveCounter(tp,1,0,0x43,1,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,COUNTER_DEFECT,1,REASON_COST) end + Duel.RemoveCounter(tp,1,0,COUNTER_DEFECT,1,REASON_COST) end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_CYBERSE) @@ -60,12 +58,12 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.op(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(800) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c92332424.lua b/official/c92332424.lua index cc7017fb2d..cab1b7eb12 100644 --- a/official/c92332424.lua +++ b/official/c92332424.lua @@ -1,10 +1,10 @@ --- 竜剣士マジェスティP --- Majesty Pegasus, the Dracoslayer --- Scripted by Hatter +--竜剣士マジェスティP +--Majesty Pegasus, the Dracoslayer +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Search 1 "Dracoslayer" Pendulum Monster + --Search 1 "Dracoslayer" Pendulum Monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY) @@ -14,18 +14,18 @@ function s.initial_effect(c) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) - -- Protect "Dracoslayer" monsters + --Protect "Dracoslayer" monsters local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER) - e2:SetCost(s.ptcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.pttg) e2:SetOperation(s.ptop) c:RegisterEffect(e2) - -- Search 1 Field Spell + --Search 1 Field Spell local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) @@ -38,14 +38,14 @@ function s.initial_effect(c) e3:SetOperation(s.fthop) c:RegisterEffect(e3) end -s.listed_series={0xc7,0xd0} +s.listed_series={SET_DRACOSLAYER,SET_MAJESPECTER} function s.thfilter(c,code) - return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() and not c:IsCode(code) + return c:IsSetCard(SET_DRACOSLAYER) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() and not c:IsCode(code) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,e:GetHandler()) - return pc and (pc:IsSetCard(0xc7) or pc:IsSetCard(0xd0)) + return pc and (pc:IsSetCard(SET_DRACOSLAYER) or pc:IsSetCard(SET_MAJESPECTER)) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,pc:GetOriginalCode()) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) @@ -68,37 +68,32 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(dg,REASON_EFFECT) end end -function s.ptcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.pttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end end function s.ptop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) local c=e:GetHandler() - -- "Dracoslayer" monsters target protection + --"Dracoslayer" monsters target protection local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc7)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_DRACOSLAYER)) e1:SetValue(aux.tgoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - -- "Dracoslayer" monsters destruction protection + --"Dracoslayer" monsters destruction protection local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetProperty(0) e2:SetValue(aux.indoval) Duel.RegisterEffect(e2,tp) - aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,4),RESET_PHASE+PHASE_END,1) + aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,4),RESET_PHASE|PHASE_END,1) end function s.fthcon(e,tp,eg,ep,ev,re,r,rp) - return re and re:GetHandler():IsSetCard(0xc7) or e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return re and re:GetHandler():IsSetCard(SET_DRACOSLAYER) or e:GetHandler():IsPendulumSummoned() end function s.fthfilter(c) return c:IsType(TYPE_FIELD) and c:IsSpell() and c:IsAbleToHand() @@ -114,6 +109,6 @@ function s.fthop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) Duel.ShuffleHand(tp) Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD,nil) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil) end end \ No newline at end of file diff --git a/official/c92346415.lua b/official/c92346415.lua index 33e0c9f029..de8a3e19c1 100644 --- a/official/c92346415.lua +++ b/official/c92346415.lua @@ -1,4 +1,5 @@ --サイコ・ソード +--Psychic Sword local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHIC)) @@ -14,4 +15,4 @@ function s.atkval(e,c) if dif>0 then return dif>2000 and 2000 or dif else return 0 end -end +end \ No newline at end of file diff --git a/official/c92353449.lua b/official/c92353449.lua index 57378ab125..b236b6c646 100644 --- a/official/c92353449.lua +++ b/official/c92353449.lua @@ -1,4 +1,5 @@ --レッドアイズ・インサイト +--Red-Eyes Insight local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,19 +13,19 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0x3b) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_RED_EYES) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x3b) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_RED_EYES) and c:IsSpellTrap() and not c:IsCode(id) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c923596.lua b/official/c923596.lua index d7e143411f..2bdadddd84 100644 --- a/official/c923596.lua +++ b/official/c923596.lua @@ -22,12 +22,12 @@ function s.initial_effect(c) e2:SetOperation(s.shop) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} s.listed_names={id} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -37,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c) - return c:IsSetCard(0x72) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GEARGIA) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.shtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -50,4 +50,4 @@ function s.shop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c92361635.lua b/official/c92361635.lua index ab5436c144..b04eeb26fe 100644 --- a/official/c92361635.lua +++ b/official/c92361635.lua @@ -1,8 +1,9 @@ --アトミック・スクラップ・ドラゴン +--Atomic Scrap Dragon local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x24),1,1,Synchro.NonTuner(nil),2,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SCRAP),1,1,Synchro.NonTuner(nil),2,99) c:EnableReviveLimit() --Destroy local e1=Effect.CreateEffect(c) @@ -27,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) @@ -44,7 +45,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_TODECK) if g1:GetFirst():IsRelateToEffect(e) and Duel.Destroy(g1,REASON_EFFECT)~=0 then local hg=g2:Filter(Card.IsRelateToEffect,nil,e) - Duel.SendtoDeck(hg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(hg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -53,7 +54,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and tp~=crp and crp~=PLAYER_NONE end function s.spfilter(c,e,tp) - return c:IsSetCard(0x24) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SCRAP) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -67,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92362073.lua b/official/c92362073.lua index 864efcd43a..8f04687600 100644 --- a/official/c92362073.lua +++ b/official/c92362073.lua @@ -12,11 +12,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) e1:SetCondition(s.atkcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return ph>PHASE_MAIN1 and ph0 end @@ -59,7 +59,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) --client hint aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,2),PHASE_BATTLE) @@ -70,11 +70,11 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_SET_ATTACK_FINAL) e3:SetValue(m.xyz_number*100) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,1) + e3:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE,1) tc:RegisterEffect(e3) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK,0,1,nil) end @@ -87,4 +87,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c92365601.lua b/official/c92365601.lua index 7214e3a37f..3cc8454e95 100644 --- a/official/c92365601.lua +++ b/official/c92365601.lua @@ -1,4 +1,5 @@ --RUM-リミテッド・バリアンズ・フォース +--Rank-Up-Magic Limited Barian's Force local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1048} +s.listed_series={SET_NUMBER_C} function s.filter1(c,e,tp) local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsRank(4) @@ -19,7 +20,7 @@ function s.filter1(c,e,tp) end function s.filter2(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard(SET_NUMBER_C) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c9236985.lua b/official/c9236985.lua index dd33181069..4b50951937 100644 --- a/official/c9236985.lua +++ b/official/c9236985.lua @@ -13,11 +13,11 @@ function s.initial_effect(c) if not s.ritual_matching_function then s.ritual_matching_function={} end - s.ritual_matching_function[c]=aux.FilterEqualFunction(Card.IsSetCard,0x3a) + s.ritual_matching_function[c]=aux.FilterEqualFunction(Card.IsSetCard,SET_GISHKI) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.filter(c,e,tp,lp) - if not c:IsRitualMonster() or not c:IsSetCard(0x3a) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then + if not c:IsRitualMonster() or not c:IsSetCard(SET_GISHKI) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end return lp>c:GetLevel()*500 @@ -44,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c92373006.lua b/official/c92373006.lua index e1895190e3..ebcd064d97 100644 --- a/official/c92373006.lua +++ b/official/c92373006.lua @@ -1,4 +1,5 @@ --スレイブタイガー +--Test Tiger local s,id=GetID() function s.initial_effect(c) --special summon rule @@ -17,28 +18,23 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x19),tp,LOCATION_MZONE,0,1,nil) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),tp,LOCATION_MZONE,0,1,nil) end function s.tgfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0x19) and c:IsAbleToDeck() and (ft>-1 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_GLADIATOR) and c:IsAbleToDeck() and (ft>-1 or c:GetSequence()<5) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,130,tp,false,false) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,130,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -53,11 +49,11 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local rc=Duel.GetFirstTarget() if not rc or not rc:IsFaceup() or not rc:IsRelateToEffect(e) then return end - local rt=Duel.SendtoDeck(rc,nil,2,REASON_EFFECT) + local rt=Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if rt==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummon(tc,130,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD_DISABLE,0,0) + tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT|RESETS_STANDARD_DISABLE,0,0) end -end +end \ No newline at end of file diff --git a/official/c92377303.lua b/official/c92377303.lua index b77a3ae3da..e20fcf9e81 100644 --- a/official/c92377303.lua +++ b/official/c92377303.lua @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c9238125.lua b/official/c9238125.lua index 070959d668..3871bdadd0 100644 --- a/official/c9238125.lua +++ b/official/c9238125.lua @@ -1,9 +1,9 @@ --- 山と雪解の春化精 --- Vernalizer Fairy of Mountains and Melting Snow --- Scripted by Hatter +--山と雪解の春化精 +--Vernusylph of the Thawing Mountains +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Grant second attack each Battle Phase + --Grant second attack each Battle Phase local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -14,26 +14,26 @@ function s.initial_effect(c) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Draw 1 card + --Draw 1 card c:RegisterEffect(Effect.CreateVernalizerSPEffect(c,id,1,CATEGORY_DRAW,s.drtg,s.drop)) end -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x183) end - if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x183),tp,LOCATION_MZONE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_VERNUSYLPH) end + if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_VERNUSYLPH),tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x183),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_VERNUSYLPH),tp,LOCATION_MZONE,0,1,1,nil) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - -- Can make a second attack + --Can make a second attack local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3201) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end diff --git a/official/c92385016.lua b/official/c92385016.lua index b721661d1d..90cdedfc3b 100644 --- a/official/c92385016.lua +++ b/official/c92385016.lua @@ -1,14 +1,13 @@ --神碑の翼ムニン ---Muninn, Wings of the Mysterune +--Munin the Runick Wings --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --2 "Mysterune" monsters - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x180),2) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_RUNICK),2) --If Special Summoned from the Extra Deck, add 1 "Mysterune" Continuous Spell from Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -30,7 +29,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) @@ -56,16 +55,15 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Mysterune" archetype -s.listed_series={0x180} - +s.listed_series={SET_RUNICK} --Discard 1 card as cost function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end --Check for "Mysterune" Continuous Spell function s.thfilter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSetCard(0x180) and c:IsAbleToHand() + return c:IsContinuousSpell() and c:IsSetCard(SET_RUNICK) and c:IsAbleToHand() end --Activation legality function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -82,7 +80,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end --If your "Mysterune" card(s) and/or Set card(s) is targeted function s.tgfilter(c,tp) - return c:IsControler(tp) and c:IsOnField() and ((c:IsFaceup() and c:IsSetCard(0x180)) or c:IsFacedown()) + return c:IsControler(tp) and c:IsOnField() and ((c:IsFaceup() and c:IsSetCard(SET_RUNICK)) or c:IsFacedown()) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and Duel.IsChainNegatable(ev)) then return false end diff --git a/official/c92394653.lua b/official/c92394653.lua index 1d98f920f3..55f89140e1 100644 --- a/official/c92394653.lua +++ b/official/c92394653.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(s.mtcon) diff --git a/official/c92408984.lua b/official/c92408984.lua index c3e60b670f..1a4cf20a78 100644 --- a/official/c92408984.lua +++ b/official/c92408984.lua @@ -25,13 +25,13 @@ function s.cfilter(c) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_DRAGON) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not (re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end + if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not (re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE)) then return false end local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return tg and tg:IsExists(s.cfilter,1,nil) and Duel.IsChainDisablable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -54,4 +54,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) and Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92411493.lua b/official/c92411493.lua index e4c75536a8..e9aacc38a5 100644 --- a/official/c92411493.lua +++ b/official/c92411493.lua @@ -25,16 +25,16 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_REMOVED) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.tffilter(c,tp) - return c:IsSpellTrap() and c:IsSetCard(0x109) and not c:IsForbidden() and c:CheckUniqueOnField(tp) + return c:IsSpellTrap() and c:IsSetCard(SET_THE_WEATHER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and not c:IsType(TYPE_FIELD) end function s.tftg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -53,9 +53,9 @@ function s.spreg(e,tp,eg,ep,ev,re,r,rp) if not re then return end local c=e:GetHandler() local rc=re:GetHandler() - if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) then + if c:IsReason(REASON_COST) and rc:IsSetCard(SET_THE_WEATHER) then e:SetLabel(Duel.GetTurnCount()+1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c92418590.lua b/official/c92418590.lua index ef2d16d8fe..6a27b2df99 100644 --- a/official/c92418590.lua +++ b/official/c92418590.lua @@ -1,4 +1,5 @@ --ギミック・パペット-ネクロ・ドール +--Gimmick Puppet Dreary Doll local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,15 +21,15 @@ function s.initial_effect(c) e2:SetValue(s.xyzlimit) c:RegisterEffect(e2) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.cfilter(c,tp) - return c:IsSetCard(0x1083) and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler(),tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -43,5 +44,5 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.xyzlimit(e,c) if not c then return false end - return not c:IsSetCard(0x1083) -end + return not c:IsSetCard(SET_GIMMICK_PUPPET) +end \ No newline at end of file diff --git a/official/c92422871.lua b/official/c92422871.lua index b0cd276b13..caf5dcf6a5 100644 --- a/official/c92422871.lua +++ b/official/c92422871.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.negcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.negtg) e2:SetOperation(s.negop) c:RegisterEffect(e2) diff --git a/official/c92428405.lua b/official/c92428405.lua index f4942c1ead..db68f067e5 100644 --- a/official/c92428405.lua +++ b/official/c92428405.lua @@ -84,7 +84,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and re:IsSpellEffect() diff --git a/official/c92435533.lua b/official/c92435533.lua index 193a65e1a8..42b1f4959a 100644 --- a/official/c92435533.lua +++ b/official/c92435533.lua @@ -1,4 +1,5 @@ --時械神ラツィオン +--Lazion, the Timelord local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -35,7 +36,7 @@ function s.initial_effect(c) e6:SetDescription(aux.Stringid(id,1)) e6:SetCategory(CATEGORY_TODECK) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e6:SetCode(EVENT_PHASE+PHASE_BATTLE) + e6:SetCode(EVENT_PHASE|PHASE_BATTLE) e6:SetCountLimit(1) e6:SetRange(LOCATION_MZONE) e6:SetCondition(s.tdcon) @@ -60,7 +61,7 @@ function s.initial_effect(c) e8:SetDescription(aux.Stringid(id,3)) e8:SetCategory(CATEGORY_TODECK) e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e8:SetCode(EVENT_PHASE+PHASE_STANDBY) + e8:SetCode(EVENT_PHASE|PHASE_STANDBY) e8:SetCountLimit(1) e8:SetRange(LOCATION_MZONE) e8:SetCondition(s.rtdcon) @@ -102,7 +103,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.rtdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -111,6 +112,6 @@ end function s.rtdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,2,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92450185.lua b/official/c92450185.lua index 21767825a6..0d59243ab7 100644 --- a/official/c92450185.lua +++ b/official/c92450185.lua @@ -1,4 +1,5 @@ --リミッター・ブレイク +--Limiter Overload local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,7 +15,7 @@ end s.listed_names={9365703} function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE) end function s.spfilter(c,e,tp) return c:IsCode(9365703) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -22,8 +23,8 @@ end function s.thop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92481084.lua b/official/c92481084.lua index 7f39909f9c..d0fbbbde40 100644 --- a/official/c92481084.lua +++ b/official/c92481084.lua @@ -16,5 +16,4 @@ function s.initial_effect(c) e2:SetTargetRange(1,1) e2:SetValue(1000) c:RegisterEffect(e2) -end - +end \ No newline at end of file diff --git a/official/c92501449.lua b/official/c92501449.lua index 7abda0862d..c1c14837e6 100644 --- a/official/c92501449.lua +++ b/official/c92501449.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -23,16 +23,12 @@ function s.initial_effect(c) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.rmvtg) e2:SetOperation(s.rmvop) c:RegisterEffect(e2) end s.listed_series={SET_PRIMITE} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end s.announce_filter={TYPE_NORMAL,OPCODE_ISTYPE} diff --git a/official/c92510265.lua b/official/c92510265.lua index 6e38ec9f89..6f8a142bb2 100644 --- a/official/c92510265.lua +++ b/official/c92510265.lua @@ -48,7 +48,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local lc=tg:GetFirst() if lc==tc then lc=tg:GetNext() end - if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)~=0 and lc:IsRelateToEffect(e) and lc:IsControler(1-tp) then + if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT|REASON_RETURN)~=0 and lc:IsRelateToEffect(e) and lc:IsControler(1-tp) then Duel.Remove(lc,POS_FACEUP,REASON_EFFECT) end end @@ -67,4 +67,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92512625.lua b/official/c92512625.lua index 01c6aa25d5..176fad474f 100644 --- a/official/c92512625.lua +++ b/official/c92512625.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_SUMMON) e1:SetCondition(s.condition1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(3000)) e1:SetTarget(s.target1) e1:SetOperation(s.activate1) c:RegisterEffect(e1) @@ -24,7 +24,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_ACTIVATE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.condition2) - e4:SetCost(s.cost) + e4:SetCost(Cost.PayLP(3000)) e4:SetTarget(s.target2) e4:SetOperation(s.activate2) c:RegisterEffect(e4) @@ -36,10 +36,6 @@ function s.condition1(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,3000) end - Duel.PayLPCost(tp,3000) -end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,0,0) @@ -50,7 +46,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) + return (re:IsMonsterEffect() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,4 +60,4 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9251497.lua b/official/c9251497.lua index 51cd9c6756..a7e4bc4830 100644 --- a/official/c9251497.lua +++ b/official/c9251497.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_SZONE) - e2:SetHintTiming(0,TIMING_TOGRAVE+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMING_TOGRAVE|TIMING_END_PHASE) e2:SetCountLimit(1,id) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) diff --git a/official/c92518817.lua b/official/c92518817.lua index 7e4c66f98d..06214079db 100644 --- a/official/c92518817.lua +++ b/official/c92518817.lua @@ -1,4 +1,5 @@ --燃え盛るヒータ +--Blazing Hiita local s,id=GetID() function s.initial_effect(c) --spsummon @@ -36,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_LEAVE_FIELD) e1:SetRange(LOCATION_MZONE) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) g:GetFirst():RegisterEffect(e1) end end @@ -44,4 +45,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(Card.IsCode,1,nil,id) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92519087.lua b/official/c92519087.lua index 33986c3ddc..4027c8ef7f 100644 --- a/official/c92519087.lua +++ b/official/c92519087.lua @@ -1,5 +1,5 @@ --電脳堺狐-仙々 ---Datascape Fox - Xianxian +--Virtual World Kyubi - Shenshen --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -55,7 +55,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsMonster),tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) if #g>0 then - Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(g,REASON_EFFECT|REASON_RETURN) end end function s.rmfilter(c) @@ -65,7 +65,7 @@ function s.rescon(sg,e,tp,mg) return sg:GetClassCount(Card.GetOriginalRace)==#sg and sg:GetClassCount(Card.GetOriginalAttribute)==#sg end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,e:GetHandler()) if chk==0 then return aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,0) end local g=aux.SelectUnselectGroup(g,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) @@ -79,4 +79,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c92534075.lua b/official/c92534075.lua index b417dbaa20..aee6d9c3f9 100644 --- a/official/c92534075.lua +++ b/official/c92534075.lua @@ -1,5 +1,5 @@ --魔弾-デビルズ・ディール ---Magibullet - Devil's Deal +--Magical Musket - Fiendish Deal --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_MAGICAL_MUSKET)) e2:SetValue(1) c:RegisterEffect(e2) --to hand @@ -29,24 +29,24 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x108} +s.listed_series={SET_MAGICAL_MUSKET} s.listed_names={id} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp~=tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) end function s.thfilter(c) - return c:IsSetCard(0x108) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_MAGICAL_MUSKET) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c92536468.lua b/official/c92536468.lua index 61531131b4..64264e01ce 100644 --- a/official/c92536468.lua +++ b/official/c92536468.lua @@ -53,7 +53,7 @@ function s.initial_effect(c) end function s.revcon1(e,tp,eg,ep,ev,re,r,rp) if not (ep==tp and (r&REASON_EFFECT)~=0) then return false end - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,0,1) if Duel.GetFlagEffect(tp,id)>0 then Duel.ResetFlagEffect(tp,id) end return true end @@ -87,7 +87,7 @@ function s.revop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetValue(s.revval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end diff --git a/official/c92559258.lua b/official/c92559258.lua index 093dc4d83c..b36520e991 100644 --- a/official/c92559258.lua +++ b/official/c92559258.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) c:SetSPSummonOnce(id) - c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE+LOCATION_MZONE) + c:EnableCounterPermit(COUNTER_SPELL,LOCATION_PZONE|LOCATION_MZONE) Pendulum.AddProcedure(c) --Place a Spell Counter on itself each time a Spell resolves local e1=Effect.CreateEffect(c) @@ -28,7 +28,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DIRECT_ATTACK) - e3:SetCondition(function(e) return e:GetHandler():GetCounter(0x1)>0 end) + e3:SetCondition(function(e) return e:GetHandler():GetCounter(COUNTER_SPELL)>0 end) c:RegisterEffect(e3) --Place 1 Spell Counter on each card that can hold Spell Counters local e4=Effect.CreateEffect(c) @@ -81,7 +81,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_PZONE+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_PZONE|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -98,7 +98,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.ctcost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.cttg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCanAddCounter,COUNTER_SPELL,1),tp,LOCATION_ONFIELD,0,1,nil) end @@ -131,4 +131,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() c:AddCounter(COUNTER_SPELL,ct) end -end +end \ No newline at end of file diff --git a/official/c92562411.lua b/official/c92562411.lua index bbced68a46..11a634e27b 100644 --- a/official/c92562411.lua +++ b/official/c92562411.lua @@ -1,5 +1,5 @@ --星遺物の導く先 ---World Legacy's Continuation +--The World Legacy --Scripted by Eerie Code local s,id=GetID() local COUNTER_WL =0x14f @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_SZONE) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -44,10 +44,6 @@ end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetCounter(COUNTER_WL)==7 end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_CYBERSE) and c:IsLinkMonster() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -61,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92565383.lua b/official/c92565383.lua index 46facb92df..d6267c9f30 100644 --- a/official/c92565383.lua +++ b/official/c92565383.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(s.discon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.distg) e3:SetOperation(s.disop) c:RegisterEffect(e3) @@ -42,11 +42,6 @@ function s.indestg(e,c) local handler=e:GetHandler() return c==handler or c==handler:GetBattleTarget() end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.thfilter(c,e,tp) return c:IsMonster() and c:ListsCode(CARD_CHIMERA_FUSION) and not c:IsCode(id) and c:IsAbleToHand() end diff --git a/official/c92572371.lua b/official/c92572371.lua index d5e2b490fb..b34391e320 100644 --- a/official/c92572371.lua +++ b/official/c92572371.lua @@ -1,4 +1,5 @@ --殺炎星-ブルキ +--Brotherhood of the Fire Fist - Buffalo local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x79,0x7c} +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.cfilter(c) - return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) and c:IsAbleToGraveAsCost() + return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard({SET_FIRE_FIST,SET_FIRE_FORMATION}) and c:IsAbleToGraveAsCost() end function s.mzfilter(c) return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 @@ -23,7 +24,7 @@ end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=-ft+1 - local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) + local sg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,nil) local nc=#sg>=2 and (ft>0 or (ct<3 and sg:IsExists(s.mzfilter,ct,nil))) if chk==0 then if Duel.IsPlayerAffectedByEffect(tp,CARD_FIRE_FIST_EAGLE) then @@ -55,4 +56,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92586237.lua b/official/c92586237.lua index 81b6d5ff0e..43e16cad1d 100644 --- a/official/c92586237.lua +++ b/official/c92586237.lua @@ -1,7 +1,6 @@ --武神-マヒトツ --Bujin Mahitotsu --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -40,11 +39,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Bujin" archetype -s.listed_series={0x88} - +s.listed_series={SET_BUJIN} --Check for a "Bujin" card function s.cfilter(c) - return c:IsSetCard(0x88) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_BUJIN) and c:IsAbleToGraveAsCost() end --Send 1 "Bujin" card from hand to GY as cost function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,11 +63,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --Check for 1 "Bujin" monster to add from GY function s.thfilter(c,cd) - return c:IsSetCard(0x88) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToHand() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToHand() end --Check for 1 "Bujin" monster to send to GY as cost function s.cfilter1(c,tp) - return c:IsMonster() and c:IsAbleToGraveAsCost() and c:IsSetCard(0x88) + return c:IsMonster() and c:IsAbleToGraveAsCost() and c:IsSetCard(SET_BUJIN) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) end --Send 1 "Bujin" monster from hand to GY as cost @@ -96,11 +94,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end --Check for 1 "Bujin" monster to send from deck function s.tgfilter(c,cd) - return c:IsSetCard(0x88) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToGrave() + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and not c:IsCode(cd) and c:IsAbleToGrave() end --Check for 1 "Bujin" monster to banish as cost function s.cfilter2(c,tp) - return c:IsMonster() and c:IsAbleToRemoveAsCost() and c:IsSetCard(0x88) + return c:IsMonster() and c:IsAbleToRemoveAsCost() and c:IsSetCard(SET_BUJIN) and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) end --Banish 1 "Bujin" monster from GY as cost @@ -123,4 +121,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92595545.lua b/official/c92595545.lua index 7bdd42192e..1a7bccd26d 100644 --- a/official/c92595545.lua +++ b/official/c92595545.lua @@ -1,4 +1,5 @@ --プラズマ・ボール +--Plasma Ball local s,id=GetID() function s.initial_effect(c) --direct attack @@ -28,4 +29,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.Destroy(e:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92595643.lua b/official/c92595643.lua index f9b319ee41..b377a9120d 100644 --- a/official/c92595643.lua +++ b/official/c92595643.lua @@ -1,4 +1,5 @@ --罰則金 +--Fine local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,5 +19,5 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - Duel.DiscardHand(p,nil,2,2,REASON_EFFECT+REASON_DISCARD) -end + Duel.DiscardHand(p,nil,2,2,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c92597893.lua b/official/c92597893.lua index 4dca742c1c..1ada2f9208 100644 --- a/official/c92597893.lua +++ b/official/c92597893.lua @@ -1,7 +1,6 @@ --いたずら風のフィードラン --Feedran, the Winds of Mischief --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --If normal or special summoned, make 1 of your monsters be able to inflict piercing damage @@ -29,7 +28,7 @@ function s.initial_effect(c) e3:SetCondition(s.poscond) e3:SetTarget(s.postg) e3:SetOperation(s.posop) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e3) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -47,12 +46,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PIERCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.poscond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.filter(c) return c:IsFaceup() and c:IsCanChangePosition() @@ -75,4 +74,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c92607427.lua b/official/c92607427.lua index 3352468e55..6c84a67274 100644 --- a/official/c92607427.lua +++ b/official/c92607427.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FAIRY),tp,LOCATION_MZONE,0,1,nil) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c9260791.lua b/official/c9260791.lua index 1ce992848a..208cc2e5ad 100644 --- a/official/c9260791.lua +++ b/official/c9260791.lua @@ -1,4 +1,5 @@ --銀河眼の雲篭 +--Galaxy-Eyes Cloudragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -23,29 +24,25 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x107b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GALAXY_EYES) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107b) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_GALAXY_EYES) and c:IsType(TYPE_XYZ) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -59,4 +56,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,c) end -end +end \ No newline at end of file diff --git a/official/c92609670.lua b/official/c92609670.lua index 749ccddf4b..3197490d6e 100644 --- a/official/c92609670.lua +++ b/official/c92609670.lua @@ -1,4 +1,5 @@ --H・C アンブッシュ・ソルジャー +--Heroic Challenger - Ambush Soldier local s,id=GetID() function s.initial_effect(c) --special summon @@ -6,11 +7,11 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -24,30 +25,26 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x106f} +s.listed_series={SET_HEROIC_CHALLENGER} s.listed_names={id} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(tp) end function s.filter(c,e,tp) - return not c:IsCode(id) and c:IsSetCard(0x106f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return not c:IsCode(id) and c:IsSetCard(SET_HEROIC_CHALLENGER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft<1 then return end if ft>2 then ft=2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,ft,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,ft,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+id,e,0,tp,tp,0) @@ -58,7 +55,7 @@ function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.lvfilter(c) - return c:IsFaceup() and c:IsSetCard(0x106f) and c:GetLevel()>1 + return c:IsFaceup() and c:IsSetCard(SET_HEROIC_CHALLENGER) and c:GetLevel()>1 end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -71,7 +68,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c92610868.lua b/official/c92610868.lua index bede1bfd41..c50e930515 100644 --- a/official/c92610868.lua +++ b/official/c92610868.lua @@ -1,11 +1,11 @@ --- レドレミコード・ドリーミア --- Redoremichord Dreamea --- scripted by Hatter +--レドレミコード・ドリーミア +--ReSolfachord Dreamia +--scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- pendulum summon + --pendulum summon Pendulum.AddProcedure(c) - -- cannot disable pendulum summon + --cannot disable pendulum summon local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTargetRange(1,0) e1:SetTarget(s.target) c:RegisterEffect(e1) - -- spsummon from hand + --spsummon from hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) - -- destroy replace + --destroy replace local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EFFECT_DESTROY_REPLACE) @@ -36,12 +36,12 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x164} +s.listed_series={SET_SOLFACHORD} function s.target(e,c) - return c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsSetCard(0x164) and c:IsType(TYPE_PENDULUM) + return c:IsPendulumSummoned() and c:IsSetCard(SET_SOLFACHORD) and c:IsType(TYPE_PENDULUM) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x164),tp,LOCATION_PZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SOLFACHORD),tp,LOCATION_PZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -58,7 +58,7 @@ function s.repcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsOddScale),e:GetHandlerPlayer(),LOCATION_PZONE,0,1,nil) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x164) and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) + return c:IsFaceup() and c:IsSetCard(SET_SOLFACHORD) and c:IsOriginalType(TYPE_PENDULUM) and c:IsOriginalType(TYPE_MONSTER) and c:IsControler(tp) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,5 +86,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() c:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(c,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(c,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c92644052.lua b/official/c92644052.lua index 76dc39a125..bfe48a9f69 100644 --- a/official/c92644052.lua +++ b/official/c92644052.lua @@ -1,11 +1,11 @@ --EM稀代の決闘者 ---Performapal Greatest Duelist +--Performapal Duelist Extraordinaire --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) - --Pendulum Summon + --Pendulum Summon procedure Pendulum.AddProcedure(c) - --Action Spell! "Miracle"! + --Return this card to the hand, and if you do, banish 1 Spell from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) @@ -13,17 +13,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_START) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1) - e1:SetCondition(s.atkcon) - e1:SetTarget(s.atktg) - e1:SetOperation(s.atkop) + e1:SetCondition(function() return Duel.GetAttacker() and Duel.GetAttackTarget() end) + e1:SetTarget(s.selfthtg) + e1:SetOperation(s.selfthop) c:RegisterEffect(e1) - --Search 1 "Supreme King Dragon","Supreme King Gate", or "The Supreme King's Soul" + --Add 1 "Supreme King Dragon" monster, "Supreme King Gate" monster, or "Soul of the Supreme King" from your Deck to your hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLE_DAMAGE) - e2:SetCondition(s.thcon) + e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -35,9 +35,10 @@ function s.initial_effect(c) e3:SetCode(EVENT_PHASE+PHASE_STANDBY) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) + e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) - --Action Spell! "Evasion"! + --The attacked player can apply the following effect: ● Add 1 of your banished Spells to your hand, then discard it, and if you do, negate that attack. local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(id,3)) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_HANDES) @@ -45,62 +46,54 @@ function s.initial_effect(c) e4:SetCode(EVENT_ATTACK_ANNOUNCE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) - e4:SetOperation(s.atkop2) + e4:SetTarget(s.negtg) + e4:SetOperation(s.negop) c:RegisterEffect(e4) end -s.listed_names={92428405} -s.listed_series={0x10f8,0x20f8} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - local bc=Duel.GetAttackTarget() - if not bc then return false end - return Duel.GetAttacker():IsControler(tp) or bc:IsControler(tp) -end +s.listed_names={92428405} --"Soul of the Supreme King" +s.listed_series={SET_SUPREME_KING_DRAGON,SET_SUPREME_KING_GATE} function s.rmfilter(c) return c:IsSpell() and c:IsAbleToRemove() end -function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) +function s.selfthtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil) and c:IsAbleToHand() end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0) + if chk==0 then return c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK) end -function s.atkop(e,tp,eg,ep,ev,re,r,rp) +function s.selfthop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - if Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then + if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end - local a=Duel.GetAttacker() - local d=Duel.GetAttackTarget() - if a:IsControler(1-tp) then a,d=d,a end - if a:IsRelateToBattle() and a:IsControler(tp) then - --Cannot be destroyed by that battle + local bg=Group.FromCards(Duel.GetAttacker(),Duel.GetAttackTarget()):Match(function(c) return c:IsRelateToBattle() and c:IsControler(tp) end,nil) + if #bg==0 then return end + for bc in bg:Iter() do + --For that battle, your monster cannot be destroyed local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) - a:RegisterEffect(e1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) + bc:RegisterEffect(e1) end - --Battle damage you take is halved + --For that battle, the battle damage you take is halved local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) - e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) + e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetTargetRange(1,0) e2:SetValue(HALF_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end -function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp -end function s.thfilter(c) - return ((c:IsMonster() and (c:IsSetCard(0x10f8) or c:IsSetCard(0x20f8))) or c:IsCode(92428405)) and c:IsAbleToHand() + return ((c:IsSetCard({SET_SUPREME_KING_DRAGON,SET_SUPREME_KING_GATE}) and c:IsMonster()) or c:IsCode(92428405)) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -114,6 +107,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end +function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_DECK) +end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local turn_p=Duel.GetTurnPlayer() local step=turn_p==0 and 1 or -1 @@ -122,33 +119,37 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if #g>0 and Duel.SelectYesNo(p,aux.Stringid(id,4)) then Duel.Hint(HINT_SELECTMSG,p,HINTMSG_REMOVE) local rg=g:Select(p,1,1,nil) - if #rg==0 then return end - Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + if #rg>0 then + Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) + end end end end -function s.thfilter2(c) - return c:IsFaceup() and c:IsSpell() and c:IsAbleToHand() +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + local bc=Duel.GetAttackTarget() + local attacked_player=bc and bc:GetControler() or (1-Duel.GetAttacker():GetControler()) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,attacked_player,LOCATION_REMOVED) + Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,0,attacked_player,1) +end +function s.rmthfilter(c) + return c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() end -function s.atkop2(e,tp,eg,ep,ev,re,r,rp) +function s.negop(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetAttackTarget() - local p - if not bc then - p=1-Duel.GetAttacker():GetControler() - else - p=bc:GetControler() - end - local g=Duel.GetMatchingGroup(s.thfilter2,p,LOCATION_REMOVED,0,1,nil) - if #g>0 and Duel.SelectYesNo(p,aux.Stringid(id,5)) then - Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND) - local tc=g:Select(p,1,1,nil):GetFirst() - if not tc then return end - if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) - and tc:IsDiscardable(REASON_EFFECT) then - Duel.ConfirmCards(1-p,tc) + local attacked_player=bc and bc:GetControler() or (1-Duel.GetAttacker():GetControler()) + local g=Duel.GetMatchingGroup(s.rmthfilter,attacked_player,LOCATION_REMOVED,0,1,nil) + if #g>0 and Duel.SelectYesNo(attacked_player,aux.Stringid(id,5)) then + Duel.Hint(HINT_SELECTMSG,attacked_player,HINTMSG_ATOHAND) + local sc=g:Select(attacked_player,1,1,nil):GetFirst() + if not sc then return end + Duel.HintSelection(sc) + if Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) + and sc:IsDiscardable(REASON_EFFECT) then Duel.BreakEffect() - if Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)==0 then return end - Duel.NegateAttack() + if Duel.SendtoGrave(sc,REASON_EFFECT|REASON_DISCARD)>0 then + Duel.NegateAttack() + end end end -end \ No newline at end of file +end diff --git a/official/c9264485.lua b/official/c9264485.lua index 471706eb3d..418295da3a 100644 --- a/official/c9264485.lua +++ b/official/c9264485.lua @@ -13,4 +13,4 @@ function s.initial_effect(c) e1:SetValue(aux.tgoval) c:RegisterEffect(e1) end -s.listed_series={SET_HORUS_BLACK_FLAME_DRAGON} +s.listed_series={SET_HORUS_BLACK_FLAME_DRAGON} \ No newline at end of file diff --git a/official/c92650018.lua b/official/c92650018.lua index 563818ab13..ce6292938d 100644 --- a/official/c92650018.lua +++ b/official/c92650018.lua @@ -1,7 +1,6 @@ --A・Ɐ・HH ---Amaze Ɐttraction Horror House +--Amaze Attraction Horror House --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --From cards_specific_functions.lua @@ -27,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.posop) c:RegisterEffect(e2) end -s.listed_series={0x15e} +s.listed_series={SET_AMAZEMENT} function s.disfilter(c) return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT) end @@ -46,13 +45,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -66,4 +65,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c92650749.lua b/official/c92650749.lua index 78486f0e15..64f40b18e2 100644 --- a/official/c92650749.lua +++ b/official/c92650749.lua @@ -150,4 +150,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end +end \ No newline at end of file diff --git a/official/c92652813.lua b/official/c92652813.lua index bfebe1a7e3..53cfe9f885 100644 --- a/official/c92652813.lua +++ b/official/c92652813.lua @@ -1,5 +1,5 @@ --憑依覚醒-大稲荷火 ---Awakening of the Possessed - Great Inari Fire +--Awakening of the Possessed - Greater Inari Fire --Scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) - e1:SetRange(LOCATION_HAND+LOCATION_DECK) + e1:SetRange(LOCATION_HAND|LOCATION_DECK) e1:SetValue(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) @@ -39,7 +39,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x514d,0xc0} +s.listed_series={SET_SPIRITUAL_FIRE_ART,SET_POSSESSED} function s.spfilter1(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToGraveAsCost() end @@ -105,7 +105,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsAbleToHand() and (c:IsSetCard(0x514d) or (c:IsSetCard(0xc0) and c:IsSpellTrap())) + return c:IsAbleToHand() and (c:IsSetCard(SET_SPIRITUAL_FIRE_ART) or (c:IsSetCard(SET_POSSESSED) and c:IsSpellTrap())) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -118,4 +118,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c92661479.lua b/official/c92661479.lua index aca347f8fe..c136204f66 100644 --- a/official/c92661479.lua +++ b/official/c92661479.lua @@ -1,4 +1,5 @@ --フォトン・ストリーク・バウンサー +--Photon Strike Bounzer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetCountLimit(1) e1:SetCode(EVENT_CHAINING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -21,11 +22,7 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp,chk) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp - and loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + and loc==LOCATION_MZONE and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) then Duel.Damage(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92676637.lua b/official/c92676637.lua index e7cecd309d..5d4206ed6f 100644 --- a/official/c92676637.lua +++ b/official/c92676637.lua @@ -1,4 +1,5 @@ --チューニング・サポーター +--Tuningware local s,id=GetID() function s.initial_effect(c) --draw @@ -35,4 +36,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9267769.lua b/official/c9267769.lua index 516ce297e2..af530f5c23 100644 --- a/official/c9267769.lua +++ b/official/c9267769.lua @@ -1,4 +1,5 @@ --閃光弾 +--Flashbang local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,6 +14,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:GetFirst():IsControler(1-tp) and Duel.GetAttackTarget()==nil end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1) - Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) -end + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_END,1,1) + Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE|PHASE_END,1) +end \ No newline at end of file diff --git a/official/c92693205.lua b/official/c92693205.lua index 7e544be43d..b35e575fe8 100644 --- a/official/c92693205.lua +++ b/official/c92693205.lua @@ -1,4 +1,5 @@ --ギアギアンカー +--Geargianchor local s,id=GetID() function s.initial_effect(c) --turn set @@ -20,11 +21,11 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x72} +s.listed_series={SET_GEARGIA} function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -34,7 +35,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x72),tp,LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GEARGIA),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -42,7 +43,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x72),tp,LOCATION_MZONE,0,e:GetHandler()) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_GEARGIA),tp,LOCATION_MZONE,0,e:GetHandler()) if ct==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil) @@ -50,4 +51,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92714517.lua b/official/c92714517.lua index 915ed6d222..31cd4c4979 100644 --- a/official/c92714517.lua +++ b/official/c92714517.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92719314.lua b/official/c92719314.lua index 74db3b4230..65b8caf8ab 100644 --- a/official/c92719314.lua +++ b/official/c92719314.lua @@ -1,4 +1,5 @@ --ダーク・クリエイター +--The Dark Creator local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -46,14 +47,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if e:GetLabel()==1 then e:SetLabel(0) - return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp) else return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end end if e:GetLabel()==1 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,e,tp) + local cg=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.Remove(cg,POS_FACEUP,REASON_COST) e:SetLabel(0) end @@ -67,4 +68,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92720564.lua b/official/c92720564.lua index 32d5e33188..f4313b97f3 100644 --- a/official/c92720564.lua +++ b/official/c92720564.lua @@ -1,4 +1,5 @@ --D・ラジカッセン +--Morphtronic Boomboxen local s,id=GetID() function s.initial_effect(c) --atk @@ -19,15 +20,15 @@ function s.initial_effect(c) e2:SetOperation(s.opd) c:RegisterEffect(e2) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cona(e) return e:GetHandler():IsAttackPos() end function s.cond(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local d=Duel.GetAttackTarget() - return not c:IsDisabled() and c:IsDefensePos() and d:IsFaceup() and d:IsSetCard(0x26) + return not c:IsDisabled() and c:IsDefensePos() and d:IsFaceup() and d:IsSetCard(SET_MORPHTRONIC) end function s.opd(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c92723496.lua b/official/c92723496.lua index dff01db4be..d05a38f6b0 100644 --- a/official/c92723496.lua +++ b/official/c92723496.lua @@ -1,4 +1,5 @@ --竜宮のツガイ +--Giant Pairfish local s,id=GetID() function s.initial_effect(c) --spsummon @@ -17,7 +18,7 @@ function s.costfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsLevelBelow(4) and c:IsRace(RACE_WYRM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -34,4 +35,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9272381.lua b/official/c9272381.lua index bd6b6824ed..f388ab08f8 100644 --- a/official/c9272381.lua +++ b/official/c9272381.lua @@ -40,24 +40,20 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e4:SetCondition(s.condition) - e4:SetCost(s.cost) + e4:SetCost(Cost.Detach(1)) e4:SetTarget(s.target) e4:SetOperation(s.operation) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) end function s.ovfilter(c,tp,xyzc) - return c:IsFaceup() and c:IsSetCard(0x9c,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) - and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and Duel.GetCurrentPhase()==PHASE_MAIN2 + return c:IsFaceup() and c:IsSetCard(SET_TELLARKNIGHT,xyzc,SUMMON_TYPE_XYZ,tp) and c:IsType(TYPE_XYZ,xyzc,SUMMON_TYPE_XYZ,tp) + and not c:IsSummonCode(xyzc,SUMMON_TYPE_XYZ,tp,id) and Duel.IsPhase(PHASE_MAIN2) end function s.effcon(e) return e:GetHandler():GetOverlayCount()>0 end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and Duel.IsChainNegatable(ev) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return ep~=tp and re:IsMonsterEffect() and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -70,4 +66,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92729410.lua b/official/c92729410.lua index 2cd02e2f68..003e6f7613 100644 --- a/official/c92729410.lua +++ b/official/c92729410.lua @@ -23,14 +23,14 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -54,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c92731385.lua b/official/c92731385.lua index 427f02bf9d..ac8b0d5444 100644 --- a/official/c92731385.lua +++ b/official/c92731385.lua @@ -1,10 +1,10 @@ --ティアラメンツ・キトカロス ---Tearalaments Kitkalos +--Tearlaments Kitkallos --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x182),aux.FilterBoolFunctionEx(Card.IsRace,RACE_AQUA)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TEARLAMENTS),aux.FilterBoolFunctionEx(Card.IsRace,RACE_AQUA)) --Search or send to the GY 1 "Tearalaments" card from your Deck local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -40,9 +40,9 @@ function s.initial_effect(c) e3:SetOperation(s.gyop) c:RegisterEffect(e3) end -s.listed_series={0x182} +s.listed_series={SET_TEARLAMENTS} function s.thfilter(c) - return c:IsSetCard(0x182) and (c:IsAbleToHand() or c:IsAbleToGrave()) + return c:IsSetCard(SET_TEARLAMENTS) and (c:IsAbleToHand() or c:IsAbleToGrave()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -54,23 +54,23 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) aux.ToHandOrElse(tc,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x182) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_TEARLAMENTS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToGrave() end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsRelateToEffect(e) and tc:IsControler(tp) then Duel.SendtoGrave(tc,REASON_EFFECT) end diff --git a/official/c92736188.lua b/official/c92736188.lua index 99f2f41835..e35d95ef6d 100644 --- a/official/c92736188.lua +++ b/official/c92736188.lua @@ -1,4 +1,5 @@ --グレート・スピリット +--Great Spirit local s,id=GetID() function s.initial_effect(c) --turn set @@ -23,7 +24,7 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -47,7 +48,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SWAP_BASE_AD) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c92746535.lua b/official/c92746535.lua index 0009ac6e46..b01c195f09 100644 --- a/official/c92746535.lua +++ b/official/c92746535.lua @@ -1,5 +1,5 @@ --竜剣士ラスターP ---Luster Pendulum, The Dracoslayer +--Luster Pendulum, the Dracoslayer local s,id=GetID() function s.initial_effect(c) --Pendulum procedure diff --git a/official/c92755808.lua b/official/c92755808.lua index 113620ddd8..c22472e883 100644 --- a/official/c92755808.lua +++ b/official/c92755808.lua @@ -1,4 +1,5 @@ --エレメント・ザウルス +--Element Saurus local s,id=GetID() function s.initial_effect(c) --atk @@ -36,11 +37,11 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD_EXC_GRAVE) + e2:SetReset(RESET_EVENT|RESETS_STANDARD_EXC_GRAVE) bc:RegisterEffect(e2) end \ No newline at end of file diff --git a/official/c92767273.lua b/official/c92767273.lua index be44d6742a..5890f4b3eb 100644 --- a/official/c92767273.lua +++ b/official/c92767273.lua @@ -1,9 +1,10 @@ ---EMバラクーダ +--EMバラクーダ +--Performapal Barracuda local s,id=GetID() function s.initial_effect(c) - --pendulum summon + --Pendulum Summon procedure Pendulum.AddProcedure(c) - --atk up + --Make an opponent's monster that battles your "Performapal" monster lose ATK equal to the difference between its original ATK and current ATK local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_ATKCHANGE) @@ -11,65 +12,63 @@ function s.initial_effect(c) e1:SetCode(EVENT_BATTLE_CONFIRM) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1) - e1:SetCondition(s.atkcon1) - e1:SetOperation(s.atkop1) + e1:SetCondition(s.oppatkcon) + e1:SetOperation(s.oppatkop) c:RegisterEffect(e1) - --atk down + --Make 1 "Performapal" monster whose current ATK is different from its original ATK gain ATK equal to the difference until the end of this turn local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) + e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCondition(s.atkcon2) - e2:SetTarget(s.atktg2) - e2:SetOperation(s.atkop2) + e2:SetHintTiming(TIMING_DAMAGE_STEP) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetTarget(s.ppalatktg) + e2:SetOperation(s.ppalatkop) c:RegisterEffect(e2) end -s.listed_series={0x9f} -function s.atkcon1(e,tp,eg,ep,ev,re,r,rp) - local tc=Duel.GetAttacker() - local bc=Duel.GetAttackTarget() - if not bc then return false end - if tc:IsControler(1-tp) then bc,tc=tc,bc end - e:SetLabelObject(bc) - return bc:IsFaceup() and tc:IsFaceup() and tc:IsSetCard(0x9f) and bc:GetBaseAttack()~=bc:GetAttack() +s.listed_series={SET_PERFORMAPAL} +function s.oppatkcon(e,tp,eg,ep,ev,re,r,rp) + local bc1,bc2=Duel.GetBattleMonster(tp) + return bc1 and bc1:IsSetCard(SET_PERFORMAPAL) and bc2 and not bc2:IsAttack(bc2:GetBaseAttack()) end -function s.atkop1(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end - local bc=e:GetLabelObject() +function s.oppatkop(e,tp,eg,ep,ev,re,r,rp) + local _,bc=Duel.GetBattleMonster(tp) if bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsControler(1-tp) then local diff=math.abs(bc:GetBaseAttack()-bc:GetAttack()) + --It loses ATK equal to the difference between its original ATK and current ATK local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-diff) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) bc:RegisterEffect(e1) end end -function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9f) and c:GetBaseAttack()~=c:GetAttack() +function s.ppalatkfilter(c) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsFaceup() and not c:IsAttack(c:GetBaseAttack()) end -function s.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end - Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) +function s.ppalatktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.ppalatkfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.ppalatkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) + Duel.SelectTarget(tp,s.ppalatkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end -function s.atkop2(e,tp,eg,ep,ev,re,r,rp) +function s.ppalatkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() then local diff=math.abs(tc:GetBaseAttack()-tc:GetAttack()) + --It gains ATK equal to the difference until the end of this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(diff) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c92770064.lua b/official/c92770064.lua index d7b20110d4..7f38bfecd8 100644 --- a/official/c92770064.lua +++ b/official/c92770064.lua @@ -43,14 +43,14 @@ function s.initial_effect(c) e4:SetCost(s.descost) e4:SetTarget(s.destg) e4:SetOperation(s.desop) - c:RegisterEffect(e4) + c:RegisterEffect(e4) end -s.listed_series={0x1157} +s.listed_series={SET_SUNAVALON} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.thfilter(c) - return (c:IsSetCard(0x1157) and c:IsSpellTrap()) and c:IsAbleToHand() + return (c:IsSetCard(SET_SUNAVALON) and c:IsSpellTrap()) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -64,7 +64,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end - function s.tgvalue(e,re,rp) return rp~=e:GetHandlerPlayer() end @@ -91,7 +90,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(lk) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,lk,0,0) end -function s.desop(e,tp,eg,ep,ev,re,r,rp) +function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,e:GetLabel(),nil) if #g>0 then diff --git a/official/c92773018.lua b/official/c92773018.lua index 93e7752503..e8387894ee 100644 --- a/official/c92773018.lua +++ b/official/c92773018.lua @@ -22,7 +22,6 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={CARD_CYBER_DRAGON} - function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==1-Duel.GetTurnPlayer() end @@ -48,4 +47,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and tc:CanAttack() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92781606.lua b/official/c92781606.lua index 1700edae53..3973bccac2 100644 --- a/official/c92781606.lua +++ b/official/c92781606.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x104),2,2) + Link.AddProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,SET_KRAWLER),2,2) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -51,14 +51,14 @@ function s.initial_effect(c) e5:SetCondition(s.effcon) c:RegisterEffect(e5) end -s.listed_series={0x104} +s.listed_series={SET_KRAWLER} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT))) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp end function s.spfilter(c,e,tp) - return c:IsSetCard(0x104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_KRAWLER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -85,12 +85,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.effilter(c) - return c:IsFaceup() and c:IsSetCard(0x104) + return c:IsFaceup() and c:IsSetCard(SET_KRAWLER) end function s.effcon(e) return Duel.GetMatchingGroupCount(s.effilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)>=e:GetLabel() end function s.actcon(e) local ph=Duel.GetCurrentPhase() - return s.effcon(e) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE + return s.effcon(e) and Duel.IsBattlePhase() end \ No newline at end of file diff --git a/official/c92784374.lua b/official/c92784374.lua index a917934fb3..3cb6d47178 100644 --- a/official/c92784374.lua +++ b/official/c92784374.lua @@ -1,4 +1,5 @@ --リチュア・エリアル +--Gishki Ariel local s,id=GetID() function s.initial_effect(c) --search @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x3a} +s.listed_series={SET_GISHKI} function s.filter(c) - return c:IsSetCard(0x3a) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GISHKI) and c:IsMonster() and c:IsAbleToHand() end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -27,4 +28,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c92798873.lua b/official/c92798873.lua index 1066c21d52..830de2328e 100644 --- a/official/c92798873.lua +++ b/official/c92798873.lua @@ -1,11 +1,11 @@ --ダイノルフィア・レクスターム ---Dinorphia Rexsturm +--Dinomorphia Rexterm --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() --Fusion Summon procedure - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0x175)) + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DINOMORPHIA)) --Opponent cannot activate monster effects local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_MAIN_END+TIMINGS_CHECK_MONSTER) + e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER) e2:SetCountLimit(1,id) - e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.PayLP(1/2)) e2:SetTarget(s.atktg) e2:SetOperation(s.atkop) c:RegisterEffect(e2) @@ -43,21 +43,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x175} -s.material_setcode={0x175} +s.listed_series={SET_DINOMORPHIA} +s.material_setcode={SET_DINOMORPHIA} function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_FUSION,fc,sumtype,tp) and c:IsSetCard(0x175,fc,sumtype,tp) + return c:IsType(TYPE_FUSION,fc,sumtype,tp) and c:IsSetCard(SET_DINOMORPHIA,fc,sumtype,tp) end function s.aclimit(e,re,tp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE) and rc:IsAttackAbove(Duel.GetLP(e:GetHandlerPlayer())) -end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.PayLPCost(tp,Duel.GetLP(tp)//2) + return re:IsMonsterEffect() and rc:IsLocation(LOCATION_MZONE) and rc:IsAttackAbove(Duel.GetLP(e:GetHandlerPlayer())) end function s.atkfilter(c,atk) return c:IsFaceup() and not c:IsAttack(atk) @@ -76,7 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -84,7 +77,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x175) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DINOMORPHIA) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c92807548.lua b/official/c92807548.lua index 4d1a8608d5..e34191c8e6 100644 --- a/official/c92807548.lua +++ b/official/c92807548.lua @@ -1,4 +1,5 @@ --堕天使ユコバック +--Darklord Ukoback local s,id=GetID() function s.initial_effect(c) --tograve @@ -16,9 +17,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0xef} +s.listed_series={SET_DARKLORD} function s.tgfilter(c) - return c:IsSetCard(0xef) and c:IsAbleToGrave() + return c:IsSetCard(SET_DARKLORD) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -30,4 +31,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92812851.lua b/official/c92812851.lua index ae258f7515..545e9c768e 100644 --- a/official/c92812851.lua +++ b/official/c92812851.lua @@ -90,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c92821268.lua b/official/c92821268.lua index cb10b3733f..669f9c2e8c 100644 --- a/official/c92821268.lua +++ b/official/c92821268.lua @@ -1,4 +1,5 @@ --ギミック・パペット-ナイト・ジョーカー +--Gimmick Puppet Twilight Joker local s,id=GetID() function s.initial_effect(c) --spsummon @@ -14,13 +15,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x1083} +s.listed_series={SET_GIMMICK_PUPPET} function s.cfilter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x1083) + return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(SET_GIMMICK_PUPPET) and c:IsPreviousControler(tp) and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,69832741) and eg:IsExists(s.cfilter,1,nil,tp) end + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and eg:IsExists(s.cfilter,1,nil,tp) end local g=eg:Filter(s.cfilter,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92826944.lua b/official/c92826944.lua index 4a2f8dd124..13e9224685 100644 --- a/official/c92826944.lua +++ b/official/c92826944.lua @@ -1,4 +1,5 @@ --馬頭鬼 +--Mezuki local s,id=GetID() function s.initial_effect(c) --revive @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRace(RACE_ZOMBIE) and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92841002.lua b/official/c92841002.lua index aa6875674b..493db52051 100644 --- a/official/c92841002.lua +++ b/official/c92841002.lua @@ -20,4 +20,4 @@ function s.spcon(e,c) local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c9284723.lua b/official/c9284723.lua index 55bcb794f0..8ac6eea922 100644 --- a/official/c9284723.lua +++ b/official/c9284723.lua @@ -1,6 +1,5 @@ --ヴェノム・ボア --Venom Boa - local s,id=GetID() function s.initial_effect(c) --Place 2 venom counters on 1 of opponent's monsters @@ -16,8 +15,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.counter_place_list={0x1009} - +s.counter_place_list={COUNTER_VENOM} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end --Cannot attack this turn @@ -26,21 +24,21 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(0x1009,2) end - if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x1009,2) end + if chkc then return chkc:IsControler(1-tp) and chkc:IsCanAddCounter(COUNTER_VENOM,2) end + if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,COUNTER_VENOM,2) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) - local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x1009,2) + local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,COUNTER_VENOM,2) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,2,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(0x1009,2) then + if tc:IsRelateToEffect(e) and tc:IsCanAddCounter(COUNTER_VENOM,2) then local atk=tc:GetAttack() - tc:AddCounter(0x1009,2) + tc:AddCounter(COUNTER_VENOM,2) if atk>0 and tc:GetAttack()==0 then Duel.RaiseEvent(tc,EVENT_CUSTOM+54306223,e,0,0,0,0) end diff --git a/official/c92854392.lua b/official/c92854392.lua index 1ae197db4b..2e678bdb9c 100644 --- a/official/c92854392.lua +++ b/official/c92854392.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end @@ -28,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_MUST_ATTACK) e1:SetTargetRange(0,LOCATION_MZONE) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) diff --git a/official/c92868896.lua b/official/c92868896.lua index ed1a6bd3eb..6271bf843d 100644 --- a/official/c92868896.lua +++ b/official/c92868896.lua @@ -25,16 +25,16 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.cfilter(c) - return c:IsSetCard(0x29) and c:IsDiscardable() + return c:IsSetCard(SET_DRAGUNITY) and c:IsDiscardable() end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.eqfilter(c,ec) - return c:IsSetCard(0x29) and c:IsType(TYPE_TUNER) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsType(TYPE_TUNER) and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -52,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(c) g:GetFirst():RegisterEffect(e1) @@ -64,7 +64,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetDescription(aux.Stringid(id,2)) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) --lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -79,11 +79,11 @@ function s.lizfilter(e,c) return not c:IsOriginalRace(RACE_DRAGON) end function s.repfilter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(0x29) + return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsSetCard(SET_DRAGUNITY) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE) end function s.desfilter(c,e,tp) - return e:GetHandler():GetEquipGroup():IsContains(c) and c:IsSetCard(0x29) + return e:GetHandler():GetEquipGroup():IsContains(c) and c:IsSetCard(SET_DRAGUNITY) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -104,5 +104,5 @@ end function s.repop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) end \ No newline at end of file diff --git a/official/c92870717.lua b/official/c92870717.lua index 4f0b97a088..ad0502d9d0 100644 --- a/official/c92870717.lua +++ b/official/c92870717.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -36,7 +36,7 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end if Duel.Destroy(e:GetHandler(),REASON_EFFECT)~=0 then - Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) + Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE|PHASE_BATTLE_STEP,1) end end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -44,7 +44,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil) end function s.spfilter(c,e,tp) - return c:IsAttackBelow(2000) and c:IsRace(RACE_WARRIOR+RACE_SPELLCASTER) + return c:IsAttackBelow(2000) and c:IsRace(RACE_WARRIOR|RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c9287078.lua b/official/c9287078.lua index b263de2317..433de2dcf3 100644 --- a/official/c9287078.lua +++ b/official/c9287078.lua @@ -29,7 +29,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g2=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,1,g1:GetFirst()) g1:Merge(g2) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spfilter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) if #g==2 and Duel.SendtoGrave(g,REASON_EFFECT)==2 and g:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp) + local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,nil,e,tp) if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -46,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c92881099.lua b/official/c92881099.lua index f0343f4cde..7a66883023 100644 --- a/official/c92881099.lua +++ b/official/c92881099.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0x64} +s.listed_series={SET_HARPIE} s.listed_names={CARD_HARPIE_LADY,CARD_HARPIE_LADY_SISTERS} function s.cfilter(c,tp) return c:IsReason(REASON_BATTLE) and (c:GetPreviousCodeOnField()==CARD_HARPIE_LADY or c:GetPreviousCodeOnField()==CARD_HARPIE_LADY_SISTERS) @@ -46,7 +46,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp,code) - return c:IsSetCard(0x64) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsOriginalCode(code) + return c:IsSetCard(SET_HARPIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsOriginalCode(code) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -62,11 +62,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.filter(c,e,tp) - return c:IsSetCard(0x64) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_HARPIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_ONFIELD) and (rp~=tp or (rp==tp and re:GetHandler():IsSetCard(0x64))) and c:IsPreviousControler(tp) + return c:IsPreviousLocation(LOCATION_ONFIELD) and (rp~=tp or (rp==tp and re:GetHandler():IsSetCard(SET_HARPIE))) and c:IsPreviousControler(tp) and r&REASON_EFFECT==REASON_EFFECT end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -81,5 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c92887027.lua b/official/c92887027.lua index 2a6cc245c8..72f6c5df4d 100644 --- a/official/c92887027.lua +++ b/official/c92887027.lua @@ -1,4 +1,5 @@ --ながれ者傭兵部隊 +--Nomadic Force local s,id=GetID() function s.initial_effect(c) --destroy @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -19,10 +20,6 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE) and c:IsRelateToBattle() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsPosition(POS_FACEDOWN_DEFENSE) end @@ -38,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsPosition(POS_FACEDOWN_DEFENSE) and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92890308.lua b/official/c92890308.lua index 3889083ed8..2e6a870ce8 100644 --- a/official/c92890308.lua +++ b/official/c92890308.lua @@ -1,4 +1,5 @@ --ディフォーム +--Morphtransition local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() - return d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(0x26) + return d:IsControler(tp) and d:IsFaceup() and d:IsSetCard(SET_MORPHTRONIC) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local ta=Duel.GetAttacker() @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if ta:IsRelateToEffect(e) and Duel.NegateAttack() and td:IsFaceup() and td:IsRelateToEffect(e) then Duel.ChangePosition(td,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0) end -end +end \ No newline at end of file diff --git a/official/c92892239.lua b/official/c92892239.lua index d91ca9d617..63034f2fe1 100644 --- a/official/c92892239.lua +++ b/official/c92892239.lua @@ -1,7 +1,6 @@ --ヴァレルロード・F・ドラゴン --Borreload Furious Dragon --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -17,7 +16,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) @@ -29,7 +28,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) @@ -75,7 +74,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() diff --git a/official/c92895501.lua b/official/c92895501.lua index fa6e5fef4e..a246f444e8 100644 --- a/official/c92895501.lua +++ b/official/c92895501.lua @@ -102,4 +102,4 @@ function s.vsop(e,tp,eg,ep,ev,re,r,rp) elseif op==2 then Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92901944.lua b/official/c92901944.lua index c42703d130..cb698a4ad7 100644 --- a/official/c92901944.lua +++ b/official/c92901944.lua @@ -1,4 +1,5 @@ --スクラップ・サーチャー +--Scrap Searcher local s,id=GetID() function s.initial_effect(c) --special summon @@ -22,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x24} +s.listed_series={SET_SCRAP} function s.cfilter(c,tp) - return c:IsSetCard(0x24) and c:GetCode()~=id and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_SCRAP) and c:GetCode()~=id and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -41,7 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.desfilter(c) - return c:IsFaceup() and not c:IsSetCard(0x24) + return c:IsFaceup() and not c:IsSetCard(SET_SCRAP) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -51,4 +52,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_MZONE,0,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c92907248.lua b/official/c92907248.lua index 76a367a079..94da0780f0 100644 --- a/official/c92907248.lua +++ b/official/c92907248.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgytg) e2:SetOperation(s.tgyop) c:RegisterEffect(e2) diff --git a/official/c92918648.lua b/official/c92918648.lua index 6f5ee11426..70ff6c57c4 100644 --- a/official/c92918648.lua +++ b/official/c92918648.lua @@ -1,4 +1,5 @@ --魔導法皇 ハイロン +--Hierophant of Prophecy local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,21 +12,17 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -s.listed_series={0x106e} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end +s.listed_series={SET_SPELLBOOK} function s.cfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,nil) @@ -39,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,s.filter,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c92919429.lua b/official/c92919429.lua index f47672e1e3..cb1ba9d00f 100644 --- a/official/c92919429.lua +++ b/official/c92919429.lua @@ -34,16 +34,16 @@ function s.tgfilter(c) return c:IsRace(RACE_FAIRY) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,nil) and e:GetHandler():IsRelateToEffect(e) end - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK|LOCATION_EXTRA,0,1,1,nil):GetFirst() if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and tc:HasLevel() and c:IsFaceup() and c:IsRelateToEffect(e) then - c:UpdateLevel(tc:GetLevel(),RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + c:UpdateLevel(tc:GetLevel(),RESETS_STANDARD_DISABLE_PHASE_END) end end function s.spfilter(c,e,tp) @@ -52,14 +52,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c92932860.lua b/official/c92932860.lua index 783f09e3d0..11b7eeb991 100644 --- a/official/c92932860.lua +++ b/official/c92932860.lua @@ -1,10 +1,8 @@ --EMミス・ディレクター --Performapal Miss Director --Credit to Larry126 and/or ClementLouis - --Substitute ID local s,id=GetID() - function s.initial_effect(c) --Cannot be battle target local e1=Effect.CreateEffect(c) @@ -48,7 +46,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end --Supports "Odd-Eyes" archetype -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} --Check if you control "Odd-Eyes" monster function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) @@ -59,7 +57,7 @@ function s.econ(e) end --"Odd-Eyes" filter function s.efilter(e,c) - return c:IsSetCard(0x99) + return c:IsSetCard(SET_ODD_EYES) end --Check for synchro monster function s.scfilter(c,mg) @@ -90,7 +88,7 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) diff --git a/official/c92933195.lua b/official/c92933195.lua index f32fdfee62..a62af39fd7 100644 --- a/official/c92933195.lua +++ b/official/c92933195.lua @@ -1,4 +1,5 @@ --霞の谷の風使い +--Mist Valley Windmaster local s,id=GetID() function s.initial_effect(c) --hand adjust @@ -30,4 +31,4 @@ function s.handop(e,tp,eg,ep,ev,re,r,rp) g:Merge(sg) end Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9293977.lua b/official/c9293977.lua index 4f18662e7d..a4c8cf1b71 100644 --- a/official/c9293977.lua +++ b/official/c9293977.lua @@ -1,7 +1,8 @@ --メタル・ドラゴン +--Metal Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,29172562,55444629) -end +end \ No newline at end of file diff --git a/official/c92958307.lua b/official/c92958307.lua index 3e655a097e..00f8ce7ad2 100644 --- a/official/c92958307.lua +++ b/official/c92958307.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -32,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c92964816.lua b/official/c92964816.lua index 2fab402ab5..a952775467 100644 --- a/official/c92964816.lua +++ b/official/c92964816.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_TO_GRAVE) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -38,12 +38,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local ck=Duel.IsExistingMatchingCard(s.fieldcond,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) @@ -61,5 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsRace(RACE_ZOMBIE) -end - +end \ No newline at end of file diff --git a/official/c92970404.lua b/official/c92970404.lua index 7a9a0b87d7..89579104b8 100644 --- a/official/c92970404.lua +++ b/official/c92970404.lua @@ -1,4 +1,5 @@ --Subterror Behemoth Ultramafus +--Subterror Behemoth Ultramafus local s,id=GetID() function s.initial_effect(c) --flip @@ -64,7 +65,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -72,4 +73,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c9298235.lua b/official/c9298235.lua index 9bf5cb2def..0de096134e 100644 --- a/official/c9298235.lua +++ b/official/c9298235.lua @@ -1,4 +1,5 @@ --ファーニマル・クレーン +--Fluffal Crane local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,9 +14,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,tp) - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetReasonPlayer()~=tp + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetReasonPlayer()~=tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsSetCard(0xa9) and c:IsAbleToHand() + and c:IsPreviousControler(tp) and c:IsControler(tp) and c:IsSetCard(SET_FLUFFAL) and c:IsAbleToHand() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,tp) @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c92998610.lua b/official/c92998610.lua index 08edfcded3..acab2aeb25 100644 --- a/official/c92998610.lua +++ b/official/c92998610.lua @@ -1,7 +1,6 @@ --孤高除獣 --Aloof Lupine --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Banish 1 monster from deck @@ -72,5 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end - +end \ No newline at end of file diff --git a/official/c93013676.lua b/official/c93013676.lua index 0f3ffbcc41..1b83182f06 100644 --- a/official/c93013676.lua +++ b/official/c93013676.lua @@ -1,4 +1,5 @@ --マハー・ヴァイロ +--Maha Vailo local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.val(e,c) return c:GetEquipCount()*500 -end +end \ No newline at end of file diff --git a/official/c93014827.lua b/official/c93014827.lua index 955940177d..1fdf491e31 100644 --- a/official/c93014827.lua +++ b/official/c93014827.lua @@ -1,5 +1,5 @@ --ゼロ・デイ・ブラスター ---Zero Day Blaster +--Zero-Day Blaster --scripted by andré local s,id=GetID() function s.initial_effect(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) diff --git a/official/c93016201.lua b/official/c93016201.lua index 92c7f5695a..d4a2bed1a8 100644 --- a/official/c93016201.lua +++ b/official/c93016201.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_SPSUMMON) e2:SetCondition(s.condition1) - e2:SetCost(s.cost2) + e2:SetCost(Cost.PayLP(800)) e2:SetTarget(s.target2) e2:SetOperation(s.activate2) c:RegisterEffect(e2) @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_BOTH_SIDE) e3:SetCode(EVENT_SPSUMMON) e3:SetCondition(s.condition2) - e3:SetCost(s.cost2) + e3:SetCost(Cost.PayLP(800)) e3:SetTarget(s.target2) e3:SetOperation(s.activate2) c:RegisterEffect(e3) @@ -37,7 +37,7 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_BOTH_SIDE) e4:SetCode(EVENT_CHAINING) e4:SetCondition(s.condition3) - e4:SetCost(s.cost3) + e4:SetCost(Cost.PayLP(800)) e4:SetTarget(s.target3) e4:SetOperation(s.activate3) c:RegisterEffect(e4) @@ -48,10 +48,6 @@ end function s.condition2(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain()==0 end -function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,0,0) @@ -65,10 +61,6 @@ end function s.condition3(e,tp,eg,ep,ev,re,r,rp) return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and Duel.IsChainDisablable(ev) end -function s.cost3(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,800) end - Duel.PayLPCost(tp,800) -end function s.target3(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) @@ -81,4 +73,4 @@ function s.activate3(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93018428.lua b/official/c93018428.lua index de5cccb552..3694198654 100644 --- a/official/c93018428.lua +++ b/official/c93018428.lua @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93020401.lua b/official/c93020401.lua index b7f7ea6739..deb257986a 100644 --- a/official/c93020401.lua +++ b/official/c93020401.lua @@ -1,7 +1,6 @@ --燈影の機界騎士 --Mekk-Knight Orange Sunset --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Special Summon itself from hand @@ -26,8 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10c} - +s.listed_series={SET_MEKK_KNIGHT} function s.cfilter(c) return c:GetColumnGroupCount()>0 end @@ -51,7 +49,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.spcfilter,1,nil,tp,e:GetHandler()) end function s.filter(c,e,tp) - return c:IsSetCard(0x10c) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MEKK_KNIGHT) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -68,4 +66,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93023479.lua b/official/c93023479.lua index c9eb2ceb5e..c14b0dcce3 100644 --- a/official/c93023479.lua +++ b/official/c93023479.lua @@ -1,4 +1,5 @@ --墓守の召喚師 +--Gravekeeper's Recruiter local s,id=GetID() function s.initial_effect(c) --search @@ -12,7 +13,7 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsPreviousControler(tp) @@ -22,7 +23,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.filter(c) - return c:IsDefenseBelow(1500) and c:IsSetCard(0x2e) and c:IsMonster() and c:IsAbleToHand() + return c:IsDefenseBelow(1500) and c:IsSetCard(SET_GRAVEKEEPERS) and c:IsMonster() and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c93031067.lua b/official/c93031067.lua index 3fd07d4396..4ab5cc3869 100644 --- a/official/c93031067.lua +++ b/official/c93031067.lua @@ -1,7 +1,6 @@ --海造賊-拠点 --Plunder Patroll Shipyarrrd --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +14,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x13f)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_PLUNDER_PATROLL)) e2:SetValue(s.atkval) c:RegisterEffect(e2) --Add 1 "Plunder Patroll" card from deck @@ -41,20 +40,19 @@ function s.initial_effect(c) e4:SetOperation(s.setop) c:RegisterEffect(e4) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.atkfil(c) - return c:IsFaceup() and c:IsSetCard(0x13f) and c:GetSequence()<5 + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and c:GetSequence()<5 end function s.atkval(e,c) return Duel.GetMatchingGroupCount(s.atkfil,e:GetHandlerPlayer(),LOCATION_SZONE,0,nil)*500 end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) - return c:IsSetCard(0x13f) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_PLUNDER_PATROLL) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -70,7 +68,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.setfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13f) and c:IsAbleToHand() and not c:IsLocation(LOCATION_FZONE) + return c:IsFaceup() and c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsAbleToHand() and not c:IsLocation(LOCATION_FZONE) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and s.setfilter(chkc) end @@ -86,7 +84,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and c:IsSSetable() and Duel.SSet(tp,c)~=0 and tc and tc:IsRelateToEffect(e) - and tc:IsSetCard(0x13f) and tc:IsLocation(LOCATION_SZONE) then + and tc:IsSetCard(SET_PLUNDER_PATROLL) and tc:IsLocation(LOCATION_SZONE) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c93039339.lua b/official/c93039339.lua index 772383e5ba..0dd1142857 100644 --- a/official/c93039339.lua +++ b/official/c93039339.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c93078761.lua b/official/c93078761.lua index 7805e1a334..6b21914f15 100644 --- a/official/c93078761.lua +++ b/official/c93078761.lua @@ -1,5 +1,5 @@ --賽挑戦 ---Dice Try Again +--Diced Dice --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if r2==1 or r2==6 then Duel.SendtoHand(c,nil,REASON_EFFECT) else - Duel.SendtoDeck(c,nil,0,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKTOP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c93085839.lua b/official/c93085839.lua index 8edc6673f4..652ad45207 100644 --- a/official/c93085839.lua +++ b/official/c93085839.lua @@ -1,4 +1,5 @@ --聖騎士エクター・ド・マリス +--Noble Knight Eachtar local s,id=GetID() function s.initial_effect(c) --special summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -28,12 +29,12 @@ function s.initial_effect(c) e3:SetOperation(s.effop2) c:RegisterEffect(e3) end -s.listed_series={0x107a} +s.listed_series={SET_NOBLE_KNIGHT} function s.spfilter(c) - return c:IsSetCard(0x107a) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,e:GetHandler()) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and #rg>1 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0) end local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE) @@ -50,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.effcon(e,tp,eg,ep,ev,re,r,rp) - return (r==REASON_XYZ or r==REASON_SYNCHRO) and e:GetHandler():GetReasonCard():IsSetCard(0x107a) + return (r==REASON_XYZ or r==REASON_SYNCHRO) and e:GetHandler():GetReasonCard():IsSetCard(SET_NOBLE_KNIGHT) end function s.effop1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,7 +60,7 @@ function s.effop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetOperation(s.sumop) rc:RegisterEffect(e1) end @@ -76,6 +77,6 @@ function s.effop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c93087299.lua b/official/c93087299.lua index 5a27cd080c..a6de314d44 100644 --- a/official/c93087299.lua +++ b/official/c93087299.lua @@ -1,4 +1,5 @@ --炎の護封剣 +--Swords of Burning Light local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,4 +30,4 @@ end function s.descon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)~=0 or Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_HAND)>=5 -end +end \ No newline at end of file diff --git a/official/c93104632.lua b/official/c93104632.lua index 10ae951f16..a5787a9790 100644 --- a/official/c93104632.lua +++ b/official/c93104632.lua @@ -25,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c93107608.lua b/official/c93107608.lua index b19c3afc21..3c275b7ca6 100644 --- a/official/c93107608.lua +++ b/official/c93107608.lua @@ -1,4 +1,5 @@ --共鳴虫 +--Howling Insect local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93108433.lua b/official/c93108433.lua index 63449661c8..3c52265d31 100644 --- a/official/c93108433.lua +++ b/official/c93108433.lua @@ -1,4 +1,5 @@ --モンスター回収 +--Monster Recovery local s,id=GetID() function s.initial_effect(c) --Activate @@ -43,4 +44,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Draw(tp,ct,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c93108839.lua b/official/c93108839.lua index 10c278cade..f9019849cc 100644 --- a/official/c93108839.lua +++ b/official/c93108839.lua @@ -1,5 +1,5 @@ --No.58 炎圧鬼バーナー・バイサー ---Number 58: Burner Vision +--Number 58: Burner Visor local s,id=GetID() function s.initial_effect(c) Xyz.AddProcedure(c,nil,4,2) diff --git a/official/c93124273.lua b/official/c93124273.lua index 40f7ec229d..bf031d486b 100644 --- a/official/c93124273.lua +++ b/official/c93124273.lua @@ -1,4 +1,5 @@ --レプティアの武者騎兵 +--Samurai Cavalry of Reptier local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if d:IsRelateToBattle() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93125329.lua b/official/c93125329.lua index de06330d6b..5e489886c2 100644 --- a/official/c93125329.lua +++ b/official/c93125329.lua @@ -62,4 +62,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93130021.lua b/official/c93130021.lua index 7c2af116e2..c2e00ba89a 100644 --- a/official/c93130021.lua +++ b/official/c93130021.lua @@ -65,7 +65,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not c:IsRelateToEffect(e) or c:IsFacedown() or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,atk,def,lv,race,att) then return end local token=Duel.CreateToken(tp,id+1) - c:CreateRelation(token,RESET_EVENT+RESETS_STANDARD) + c:CreateRelation(token,RESET_EVENT|RESETS_STANDARD) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -73,7 +73,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.tokenatk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -83,25 +83,25 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_CHANGE_LEVEL) e3:SetValue(s.tokenlv) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e3,true) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_CHANGE_RACE) e4:SetValue(s.tokenrace) - e4:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e4,true) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_CHANGE_ATTRIBUTE) e5:SetValue(s.tokenatt) - e5:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e5,true) local e6=Effect.CreateEffect(c) e6:SetType(EFFECT_TYPE_SINGLE) e6:SetCode(EFFECT_SELF_DESTROY) e6:SetCondition(s.tokendes) - e6:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e6:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) token:RegisterEffect(e6,true) Duel.SpecialSummonComplete() else @@ -110,7 +110,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(400) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -132,4 +132,4 @@ function s.tokenatt(e,c) end function s.tokendes(e) return not e:GetOwner():IsRelateToCard(e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c93138457.lua b/official/c93138457.lua index 7bef0230ea..7e68427af0 100644 --- a/official/c93138457.lua +++ b/official/c93138457.lua @@ -12,21 +12,21 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,e,tp) - return ((c:IsType(TYPE_TUNER) and c:IsLevelBelow(4)) or c:IsSetCard(0x27)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return ((c:IsType(TYPE_TUNER) and c:IsLevelBelow(4)) or c:IsSetCard(SET_TG)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateAttack() then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) if #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c93149655.lua b/official/c93149655.lua index c0af36a7e1..0d3bf879f0 100644 --- a/official/c93149655.lua +++ b/official/c93149655.lua @@ -1,4 +1,5 @@ --オッドアイズ・ファントム・ドラゴン +--Odd-Eyes Phantom Dragon local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -27,9 +28,9 @@ function s.initial_effect(c) e2:SetOperation(s.damop) c:RegisterEffect(e2) end -s.listed_series={0x99} +s.listed_series={SET_ODD_EYES} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0x99) then return end + if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_ODD_EYES) then return end local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() if d and a:GetControler()~=d:GetControler() then @@ -52,21 +53,21 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) tc:RegisterEffect(e1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return ep~=tp and e:GetHandler():IsPendulumSummoned() and Duel.GetAttacker()==e:GetHandler() end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x99),tp,LOCATION_PZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ODD_EYES),tp,LOCATION_PZONE,0,nil) if chk==0 then return ct>0 end Duel.SetTargetParam(ct*1200) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*1200) end function s.damop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x99),tp,LOCATION_PZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ODD_EYES),tp,LOCATION_PZONE,0,nil) Duel.Damage(1-tp,ct*1200,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c93151201.lua b/official/c93151201.lua index 31e6ce687e..bb5394cf90 100644 --- a/official/c93151201.lua +++ b/official/c93151201.lua @@ -1,4 +1,5 @@ --ボルテック・コング +--Voltic Kong local s,id=GetID() function s.initial_effect(c) --discard deck @@ -26,4 +27,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil) Duel.DiscardDeck(1-tp,ct,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c93157004.lua b/official/c93157004.lua index d52d376388..b1a0d519e3 100644 --- a/official/c93157004.lua +++ b/official/c93157004.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1) diff --git a/official/c93169863.lua b/official/c93169863.lua index 92b91eff32..008ac60256 100644 --- a/official/c93169863.lua +++ b/official/c93169863.lua @@ -1,7 +1,6 @@ --クリスタル・ガール --Crystal Girl --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Search 1 Level 5+ WATER monster during the End Phase @@ -41,7 +40,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) @@ -81,7 +80,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c93187568.lua b/official/c93187568.lua index d934e51073..d9e249e419 100644 --- a/official/c93187568.lua +++ b/official/c93187568.lua @@ -48,4 +48,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) if not rg then return end Duel.Remove(rg,POS_FACEUP,REASON_COST) rg:DeleteGroup() -end +end \ No newline at end of file diff --git a/official/c93191801.lua b/official/c93191801.lua index 06b47eaae3..6037842ccd 100644 --- a/official/c93191801.lua +++ b/official/c93191801.lua @@ -23,16 +23,16 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_END_PHASE) e2:SetCountLimit(1,id) e2:SetCondition(s.setcond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x143} +s.listed_series={SET_ELDLIXIR} s.listed_names={CARD_GOLDEN_LORD} function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x143,0x11,1800,1500,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_NORMAL,1800,1500,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_EITHER,LOCATION_GRAVE) end @@ -40,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x143,0x11,1800,1500,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_ELDLIXIR,TYPE_MONSTER|TYPE_NORMAL,1800,1500,5,RACE_ZOMBIE,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) Duel.SpecialSummonStep(c,1,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -55,10 +55,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.setcond(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.setfilter(c) - return c:IsSetCard(0x143) and c:IsSSetable() and not c:IsForbidden() + return c:IsSetCard(SET_ELDLIXIR) and c:IsSSetable() and not c:IsForbidden() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 @@ -72,4 +72,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SSet(tp,g) end -end +end \ No newline at end of file diff --git a/official/c93192592.lua b/official/c93192592.lua index d9c1ed4c2c..85e8497eb8 100644 --- a/official/c93192592.lua +++ b/official/c93192592.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end) - e2:SetCost(aux.SelfToExtraCost) + e2:SetCost(Cost.SelfToExtra) e2:SetTarget(s.gysptg) e2:SetOperation(s.gyspop) c:RegisterEffect(e2) diff --git a/official/c93211810.lua b/official/c93211810.lua index 6caaa74b87..c48a6d6c2a 100644 --- a/official/c93211810.lua +++ b/official/c93211810.lua @@ -1,6 +1,5 @@ --超音速波 --Sonic Boom - local s,id=GetID() function s.initial_effect(c) --Apply various effects @@ -29,24 +28,23 @@ function s.initial_effect(c) end) end) end -s.listed_series={0x101b} - +s.listed_series={SET_MECHA_PHANTOM_BEAST} function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 then s[ep]=s[ep]+1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()==tp and ph0 end end diff --git a/official/c93236220.lua b/official/c93236220.lua index 65cf4b1cb0..c12f33e5c5 100644 --- a/official/c93236220.lua +++ b/official/c93236220.lua @@ -1,4 +1,5 @@ --星遺物を巡る戦い +--World Legacy Clash local s,id=GetID() function s.initial_effect(c) --activate @@ -8,15 +9,12 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end e:SetLabel(100) @@ -35,7 +33,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetLabelObject(rc) e1:SetCountLimit(1) e1:SetOperation(s.retop) @@ -54,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -64,4 +62,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c93238626.lua b/official/c93238626.lua index 632934cf40..80766aa000 100644 --- a/official/c93238626.lua +++ b/official/c93238626.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) e3:SetCode(EVENT_BE_BATTLE_TARGET) e3:SetCondition(s.spcon) - e3:SetCost(s.spcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) @@ -40,12 +40,12 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x48,0x1048} +s.listed_series={SET_NUMBER,SET_NUMBER_C} function s.checkop(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -61,14 +61,10 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0x48) and not at:IsSetCard(0x1048) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(SET_NUMBER) and not at:IsSetCard(SET_NUMBER_C) end function s.filter(c,e,tp,mc,no,pg) - return c.xyz_number==no and c:IsSetCard(0x1048) and mc:IsCanBeXyzMaterial(c,tp) + return c.xyz_number==no and c:IsSetCard(SET_NUMBER_C) and mc:IsCanBeXyzMaterial(c,tp) and (#pg<=0 or pg:IsContains(mc)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -96,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) sc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c93260132.lua b/official/c93260132.lua index e20d0b52f4..9c8aa78a0a 100644 --- a/official/c93260132.lua +++ b/official/c93260132.lua @@ -1,4 +1,5 @@ --魔法効果の矢 +--Spell Shattering Arrow local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_ONFIELD,nil) local ct=Duel.Destroy(sg,REASON_EFFECT) Duel.Damage(1-tp,ct*500,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9327502.lua b/official/c9327502.lua index 007bfa0946..bb07854944 100644 --- a/official/c9327502.lua +++ b/official/c9327502.lua @@ -1,4 +1,5 @@ --E・HERO ボルテック +--Elemental HERO Voltic local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -15,7 +16,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x3008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93294869.lua b/official/c93294869.lua index 59e9157ff2..b090cae54d 100644 --- a/official/c93294869.lua +++ b/official/c93294869.lua @@ -18,12 +18,12 @@ function s.initial_effect(c) e2:SetOperation(s.flipop) c:RegisterEffect(e2) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.filter1(c) - return c:IsSetCard(0x7c) and c:IsTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsTrap() and c:IsSSetable() end function s.filter2(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c93298460.lua b/official/c93298460.lua index c1133d6397..77fb5f1891 100644 --- a/official/c93298460.lua +++ b/official/c93298460.lua @@ -1,4 +1,5 @@ --魔装戦士 ヴァンドラ +--Ventdra, the Empowered Warrior local s,id=GetID() function s.initial_effect(c) --direct attack @@ -22,7 +23,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON+RACE_WARRIOR+RACE_SPELLCASTER) and c:IsAbleToHand() + return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_DRAGON|RACE_WARRIOR|RACE_SPELLCASTER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -36,4 +37,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93302695.lua b/official/c93302695.lua index 05d971f7e4..a01d45f561 100644 --- a/official/c93302695.lua +++ b/official/c93302695.lua @@ -1,6 +1,5 @@ --Kozmo-ダーク・ローズ --Kozmoll Wickedwitch - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 5+ "Kozmo" monster from hand @@ -11,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -22,15 +21,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.indcost) + e2:SetCost(Cost.PayLP(1000)) e2:SetOperation(s.indop) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e2) end -s.listed_series={0xd2} - +s.listed_series={SET_KOZMO} function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -46,10 +44,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -function s.indcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.indop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) then @@ -60,7 +54,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) diff --git a/official/c93332803.lua b/official/c93332803.lua index e5dc88590f..9390fc7acc 100644 --- a/official/c93332803.lua +++ b/official/c93332803.lua @@ -1,6 +1,5 @@ --怒炎壊獣ドゴラン --Dogoran, the Mad Flame Kaiju - local s,id=GetID() function s.initial_effect(c) local e1,e2=aux.AddKaijuProcedure(c) @@ -15,19 +14,18 @@ function s.initial_effect(c) e3:SetOperation(s.desop) c:RegisterEffect(e3) end -s.counter_list={0x37} - +s.counter_list={COUNTER_KAIJU} function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x37,3,REASON_COST) + if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) and e:GetHandler():GetAttackAnnouncedCount()==0 end - Duel.RemoveCounter(tp,1,1,0x37,3,REASON_COST) + Duel.RemoveCounter(tp,1,1,COUNTER_KAIJU,3,REASON_COST) --Cannot attack this turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(3206) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c9334391.lua b/official/c9334391.lua index 6eae5f5c9b..5224fda98c 100644 --- a/official/c9334391.lua +++ b/official/c9334391.lua @@ -12,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.thfilter(c,tp) - return c:IsSetCard(0x1034) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsMonster() and c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.plfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) end function s.plfilter(c,code) - return c:IsSetCard(0x1034) and c:IsMonster() and not c:IsCode(code) and not c:IsForbidden() + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsMonster() and not c:IsCode(code) and not c:IsForbidden() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) @@ -44,8 +44,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) tc:RegisterEffect(e1) - Duel.RaiseEvent(tc,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(tc,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end -end +end \ No newline at end of file diff --git a/official/c93347961.lua b/official/c93347961.lua index 7d0745f5dc..98fd19cb62 100644 --- a/official/c93347961.lua +++ b/official/c93347961.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() and e:GetHandler():HasFlagEffect(id) end) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c93353691.lua b/official/c93353691.lua index 946e4a49d0..6f3406c48c 100644 --- a/official/c93353691.lua +++ b/official/c93353691.lua @@ -1,4 +1,5 @@ --不退の荒武者 +--Driven Daredevil local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -38,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if a:IsRelateToBattle() then Duel.Destroy(a,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93356623.lua b/official/c93356623.lua index b0682970f1..45f901ea63 100644 --- a/official/c93356623.lua +++ b/official/c93356623.lua @@ -10,16 +10,16 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x108} +s.listed_series={SET_MAGICAL_MUSKET} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x108),tp,LOCATION_MZONE,0,1,nil) - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_MAGICAL_MUSKET),tp,LOCATION_MZONE,0,1,nil) + and aux.StatChangeDamageStepCondition() end function s.filter(c) return c:IsFaceup() and not (c:GetAttack()==0 and c:GetDefense()==0 and c:IsDisabled()) @@ -38,7 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_SET_ATTACK_FINAL) e0:SetValue(0) - e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e0:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e0) local e1=e0:Clone() e1:SetCode(EFFECT_SET_DEFENSE_FINAL) @@ -47,13 +47,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c9336190.lua b/official/c9336190.lua index bd66ad0100..a20ea3d67f 100644 --- a/official/c9336190.lua +++ b/official/c9336190.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10db} +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10db) and c:IsMonster() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -45,8 +45,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10db) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,0,0,c:GetOriginalLevel(),RACE_WARRIOR,ATTRIBUTE_DARK) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,0,c:GetOriginalLevel(),RACE_WARRIOR,ATTRIBUTE_DARK) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -66,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local lv=tc:GetOriginalLevel() if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,0x11,0,0,lv,RACE_WARRIOR,ATTRIBUTE_DARK) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_THE_PHANTOM_KNIGHTS,TYPE_MONSTER|TYPE_NORMAL,0,0,lv,RACE_WARRIOR,ATTRIBUTE_DARK) then c:AddMonsterAttribute(TYPE_NORMAL,0,0,lv,0,0) c:AssumeProperty(ASSUME_RACE,RACE_WARRIOR) if Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) then @@ -78,7 +78,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) --Change Level local e2=Effect.CreateEffect(c) @@ -86,7 +86,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e2:SetValue(lv) - e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e2:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) c:RegisterEffect(e2,true) end end diff --git a/official/c93368494.lua b/official/c93368494.lua index 65711b73ee..529377922a 100644 --- a/official/c93368494.lua +++ b/official/c93368494.lua @@ -1,4 +1,5 @@ --魔妖仙獣 大刃禍是 +--Mayosenju Daibak local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -61,10 +62,10 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xb3} +s.listed_series={SET_YOSENJU} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:IsControler(tp) and at:IsSetCard(0xb3) + return at:IsControler(tp) and at:IsSetCard(SET_YOSENJU) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end @@ -74,7 +75,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) at:RegisterEffect(e1) end end @@ -103,4 +104,4 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93369354.lua b/official/c93369354.lua index 494979fb76..97b938f7fc 100644 --- a/official/c93369354.lua +++ b/official/c93369354.lua @@ -30,7 +30,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -42,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c93377803.lua b/official/c93377803.lua index 05deffc332..259ad950a9 100644 --- a/official/c93377803.lua +++ b/official/c93377803.lua @@ -1,5 +1,5 @@ --孤毒の剣 ---Sword of Toxic Solitude +--Solitary Sword of Poison --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -74,5 +74,4 @@ function s.atkval(e,c) end function s.defval(e,c) return c:GetBaseDefense()*2 -end - +end \ No newline at end of file diff --git a/official/c93379652.lua b/official/c93379652.lua index 70f00acd9e..65e0c905d0 100644 --- a/official/c93379652.lua +++ b/official/c93379652.lua @@ -1,9 +1,10 @@ --ジェムナイト・プリズムオーラ +--Gem-Knight Prismaura local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x1047),aux.FilterBoolFunctionEx(Card.IsRace,RACE_THUNDER)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GEM_KNIGHT),aux.FilterBoolFunctionEx(Card.IsRace,RACE_THUNDER)) --spsummon condition local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -24,13 +25,13 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x1047} -s.material_setcode={0x47,0x1047} +s.listed_series={SET_GEM_KNIGHT} +s.material_setcode={SET_GEM,SET_GEM_KNIGHT} function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function s.costfilter(c) - return c:IsSetCard(0x1047) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_GEM_KNIGHT) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93382620.lua b/official/c93382620.lua index e96028c349..1eea4137ca 100644 --- a/official/c93382620.lua +++ b/official/c93382620.lua @@ -20,7 +20,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) return #g>0 and g:FilterCount(Card.IsDiscardable,nil)==#g end local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) + Duel.SendtoGrave(g,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -42,8 +42,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c93394164.lua b/official/c93394164.lua index b57a3066b5..a3aee3dcd8 100644 --- a/official/c93394164.lua +++ b/official/c93394164.lua @@ -30,7 +30,7 @@ function s.mtarget(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if not ec then return false end local p=ec:GetControler() - local zone=ec:GetLinkedZone()&0x1f + local zone=ec:GetLinkedZone()&ZONES_MMZ return Duel.GetLocationCount(p,LOCATION_MZONE,p,LOCATION_REASON_CONTROL,zone)>0 end end @@ -39,7 +39,7 @@ function s.moperation(e,tp,eg,ep,ev,re,r,rp) local ec=c:GetEquipTarget() if not ec then return end local p=ec:GetControler() - local zone=ec:GetLinkedZone()&0x1f + local zone=ec:GetLinkedZone()&ZONES_MMZ if Duel.GetLocationCount(p,LOCATION_MZONE,p,LOCATION_REASON_CONTROL,zone)>0 then local i=0 if not ec:IsControler(tp) then i=16 end @@ -75,5 +75,4 @@ function s.doperation(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c93396832.lua b/official/c93396832.lua index 538847d10e..aee869dca0 100644 --- a/official/c93396832.lua +++ b/official/c93396832.lua @@ -1,4 +1,5 @@ --角笛砕き +--Smashing Horn local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (re:IsActiveType(TYPE_MONSTER) or (re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE))) + return (re:IsMonsterEffect() or (re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE))) and re:IsHasCategory(CATEGORY_DISABLE_SUMMON) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9341993.lua b/official/c9341993.lua index 705fb69d8c..9c70680b3a 100644 --- a/official/c9341993.lua +++ b/official/c9341993.lua @@ -18,10 +18,10 @@ function s.initial_effect(c) c:RegisterEffect(e1) end --Part of "Adamacia" archetype -s.listed_series={0x140} +s.listed_series={SET_ADAMANCIPATOR} --Check for "Adamacia" monster function s.cfilter(c) - return c:IsSetCard(0x140) and c:IsMonster() + return c:IsSetCard(SET_ADAMANCIPATOR) and c:IsMonster() end function s.spcheck(sg,tp,exg,oc) local ex=sg:Clone() @@ -50,4 +50,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #tg>0 then Duel.Destroy(tg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9342162.lua b/official/c9342162.lua index 6e45bed1fd..0c24041b2c 100644 --- a/official/c9342162.lua +++ b/official/c9342162.lua @@ -1,4 +1,5 @@ --彼岸の悪鬼 ハロウハウンド +--Cagna, Malebranche of the Burning Abyss local s,id=GetID() function s.initial_effect(c) --self destroy @@ -33,13 +34,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.sdfilter(c) - return not c:IsFaceup() or not c:IsSetCard(0xb1) + return not c:IsFaceup() or not c:IsSetCard(SET_BURNING_ABYSS) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.sscon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,0,1,nil) @@ -55,7 +56,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.tgfilter(c) - return c:IsSetCard(0xb1) and c:IsSpellTrap() and c:IsAbleToGrave() + return c:IsSetCard(SET_BURNING_ABYSS) and c:IsSpellTrap() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -67,4 +68,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93431518.lua b/official/c93431518.lua index 2135d13ce7..1c543fb57d 100644 --- a/official/c93431518.lua +++ b/official/c93431518.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x6} +s.listed_series={SET_DARK_WORLD} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end @@ -25,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) @@ -33,7 +33,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() @@ -44,10 +44,10 @@ function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return e:GetHandler()~=se:GetHandler() end function s.filter(c,e,tp) - return c:IsSetCard(0x6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DARK_WORLD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) diff --git a/official/c93431862.lua b/official/c93431862.lua index 68ac138b50..9feb482fc5 100644 --- a/official/c93431862.lua +++ b/official/c93431862.lua @@ -1,4 +1,5 @@ --D-HERO ダンクガイ +--Destiny HERO - Dunker local s,id=GetID() function s.initial_effect(c) --damage @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.damop) c:RegisterEffect(e1) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} function s.cfilter(c) - return c:IsSetCard(0xc008) and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_DESTINY_HERO) and c:IsAbleToGraveAsCost() end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -32,4 +33,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c93437091.lua b/official/c93437091.lua index a2930542e2..abeb20b714 100644 --- a/official/c93437091.lua +++ b/official/c93437091.lua @@ -13,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xdd} +s.listed_series={SET_BLUE_EYES} s.listed_names={CARD_BLUEEYES_W_DRAGON,23995346} function s.filter(c) - return ( ( (c:IsSetCard(0xdd) and c:IsMonster()) ) or ( (c:ListsCode(CARD_BLUEEYES_W_DRAGON) or c:ListsCode(23995346)) and c:IsSpellTrap() and not c:IsCode(id) ) ) + return ( ( (c:IsSetCard(SET_BLUE_EYES) and c:IsMonster()) ) or ( (c:ListsCode(CARD_BLUEEYES_W_DRAGON) or c:ListsCode(23995346)) and c:IsSpellTrap() and not c:IsCode(id) ) ) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -34,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=sg:Select(1-tp,1,1,nil):GetFirst() Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93445074.lua b/official/c93445074.lua index 09ca58873c..6a086ed06a 100644 --- a/official/c93445074.lua +++ b/official/c93445074.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re and re:IsActiveType(TYPE_TRAP))) + return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and re and re:IsTrapEffect())) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -39,7 +39,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -48,7 +48,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_SET_CONTROL) e2:SetValue(tp) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --Destroy local e3=Effect.CreateEffect(c) @@ -56,13 +56,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EVENT_LEAVE_FIELD_P) e3:SetOperation(s.checkop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e4:SetCode(EVENT_LEAVE_FIELD) e4:SetOperation(s.desop) - e4:SetReset(RESET_EVENT+RESET_OVERLAY+RESET_TOFIELD) + e4:SetReset(RESET_EVENT|RESET_OVERLAY|RESET_TOFIELD) e4:SetLabelObject(e3) c:RegisterEffect(e4) end diff --git a/official/c93449450.lua b/official/c93449450.lua index bc3213021b..d2708fab30 100644 --- a/official/c93449450.lua +++ b/official/c93449450.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) e5:SetValue(LOCATION_REMOVED) c:RegisterEffect(e5) end -s.listed_series={0x107} +s.listed_series={SET_FA} function s.atkval(e,c) return c:GetLevel()*300 end @@ -56,7 +56,7 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp) e:SetLabel(e:GetHandler():GetLevel()) end function s.immval(e,te) - if te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then + if te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsMonsterEffect() and te:IsActivated() then local lv=e:GetLabelObject():GetLabel() local tc=te:GetHandler() if tc:GetRank()>0 then @@ -67,7 +67,7 @@ function s.immval(e,te) else return false end end function s.lvcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:GetHandler():IsSetCard(0x107) + return re:IsSpellTrapEffect() and re:GetHandler():IsSetCard(SET_FA) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -78,7 +78,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetValue(1) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -87,4 +87,4 @@ function s.excon(e) end function s.extg(e,c) return c:GetOwner()~=e:GetHandlerPlayer() and Duel.IsPlayerCanRemove(e:GetHandlerPlayer(),c) -end +end \ No newline at end of file diff --git a/official/c93451636.lua b/official/c93451636.lua index adf0a5da15..d0681740a8 100644 --- a/official/c93451636.lua +++ b/official/c93451636.lua @@ -1,4 +1,5 @@ --ゼンマイハニー +--Wind-Up Honeybee local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x58) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_WIND_UP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93469007.lua b/official/c93469007.lua index 423f14e83e..4b6e1c3643 100644 --- a/official/c93469007.lua +++ b/official/c93469007.lua @@ -1,4 +1,5 @@ --バスター・バースト +--Assault Overload local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,8 +14,8 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x104f) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x104f) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_ASSAULT_MODE) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_ASSAULT_MODE) e:SetLabel(g:GetFirst():GetLevel()*200) Duel.Release(g,REASON_COST) end @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,d,REASON_EFFECT,true) Duel.Damage(tp,d,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c93473606.lua b/official/c93473606.lua index 1bcc38c42b..8d8360244a 100644 --- a/official/c93473606.lua +++ b/official/c93473606.lua @@ -1,7 +1,6 @@ --A・Ɐ・WW ---Amaze Ɐttraction Wonder Wheel +--Amaze Attraction Wonder Wheel --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --From cards_specific_functions.lua @@ -29,7 +28,7 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0x15e} +s.listed_series={SET_AMAZEMENT} function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsMainPhase() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp) @@ -40,15 +39,14 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(p,aux.TRUE,p,LOCATION_HAND,0,1,1,nil) - if Duel.SendtoDeck(g,nil,1,REASON_EFFECT)~=0 then + if Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 then Duel.BreakEffect() Duel.Draw(p,1,REASON_EFFECT) end end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetEquipTarget() - if chk==0 then return tc and tc:HasDefense() - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) end + if chk==0 then return tc and tc:HasDefense() and aux.StatChangeDamageStepCondition() end end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -59,14 +57,14 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(def) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_DEFENSE_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(atk) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c93483212.lua b/official/c93483212.lua index b62f23800a..c6589553ac 100644 --- a/official/c93483212.lua +++ b/official/c93483212.lua @@ -1,6 +1,5 @@ --極神聖帝オーディン --Odin, Father of the Aesir - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -47,10 +46,9 @@ function s.initial_effect(c) e4:SetOperation(s.drop) c:RegisterEffect(e4) end -s.listed_series={0x3042} - +s.listed_series={SET_NORDIC_ASCENDANT} function s.tfilter(c,scard,sumtype,tp) - return c:IsSetCard(0x3042,scard,sumtype,tp) or c:IsHasEffect(EFFECT_SYNSUB_NORDIC) + return c:IsSetCard(SET_NORDIC_ASCENDANT,scard,sumtype,tp) or c:IsHasEffect(EFFECT_SYNSUB_NORDIC) end function s.imop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -63,12 +61,12 @@ function s.imop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.imfilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.imfilter(e,re) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -76,20 +74,20 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end if rp~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_ONFIELD) and (pos&POS_FACEUP)~=0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 end function s.cfilter(c,tp) - return c:IsSetCard(0x3042) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_NORDIC_ASCENDANT) and c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c9348522.lua b/official/c9348522.lua index 0273dd88f6..76206e05c4 100644 --- a/official/c9348522.lua +++ b/official/c9348522.lua @@ -1,4 +1,5 @@ --浮鵺城 +--Cloudcastle local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -37,7 +38,7 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - tc:RegisterFlagEffect(id,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE|RESET_TOHAND|RESET_TODECK|RESET_LEAVE|RESET_TOFIELD|RESET_PHASE|PHASE_END,0,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -62,4 +63,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.limtg(e,c) return c:IsLevelBelow(8) and c:GetFlagEffect(id)~=0 -end +end \ No newline at end of file diff --git a/official/c93490856.lua b/official/c93490856.lua index cd56654da6..b573a7a30a 100644 --- a/official/c93490856.lua +++ b/official/c93490856.lua @@ -1,9 +1,9 @@ --- 相剣軍師-龍淵 --- Swordsoul Strategist Longyuan --- Scripted by Hatter +--相剣軍師-龍淵 +--Swordsoul Strategist Longyuan +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self and token + --Special Summon self and token local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Send to GY + --Send to GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DAMAGE) @@ -28,13 +28,13 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={TOKEN_SWORDSOUL} -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.spcostfilter(c) - return (c:IsSetCard(0x16d) or (c:IsMonster() and c:IsRace(RACE_WYRM))) and c:IsDiscardable(REASON_COST) + return (c:IsSetCard(SET_SWORDSOUL) or (c:IsMonster() and c:IsRace(RACE_WYRM))) and c:IsDiscardable(REASON_COST) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,s.spcostfilter,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -45,12 +45,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,0x16d,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,SET_SWORDSOUL,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() local token=Duel.CreateToken(tp,TOKEN_SWORDSOUL) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Cannot Special Summon non-Synchro monsters from Extra Deck + --Cannot Special Summon non-Synchro monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -58,11 +58,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) - -- Lizard check + --Lizard check local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return not c:IsOriginalType(TYPE_SYNCHRO) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end @@ -79,4 +79,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9349094.lua b/official/c9349094.lua index eb1aa9cda4..732542f952 100644 --- a/official/c9349094.lua +++ b/official/c9349094.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.attcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) + return Duel.IsTurnPlayer(tp) and rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function s.atttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local rt=re:GetActiveType()&(TYPE_SPELL|TYPE_MONSTER|TYPE_TRAP) @@ -56,7 +56,7 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) + return Duel.IsTurnPlayer(1-tp) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -81,4 +81,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c9350312.lua b/official/c9350312.lua index a63caf1169..6e2108803d 100644 --- a/official/c9350312.lua +++ b/official/c9350312.lua @@ -1,24 +1,24 @@ --- 丘と芽吹の春化精 --- Vernalizer Fairy of Hills and Blooms --- Scripted by Hatter +--丘と芽吹の春化精 +--Vernusylph of the Flourishing Hills +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Effect destruction protection + --Effect destruction protection local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x183)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_VERNUSYLPH)) e1:SetValue(1) c:RegisterEffect(e1) - -- Search 1 "Vernalizer Fairy" card + --Search 1 "Vernalizer Fairy" card c:RegisterEffect(Effect.CreateVernalizerSPEffect(c,id,0,CATEGORY_TOHAND+CATEGORY_SEARCH,s.thtg,s.thop)) end s.listed_names={id} -s.listed_series={0x183} +s.listed_series={SET_VERNUSYLPH} function s.thfilter(c) - return c:IsSetCard(0x183) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_VERNUSYLPH) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c93503294.lua b/official/c93503294.lua index e64d999ba9..af50b73524 100644 --- a/official/c93503294.lua +++ b/official/c93503294.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --link summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x103),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ALTERGEIST),2) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -31,12 +31,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.spcfilter(c,tp,zone) - return c:IsSetCard(0x103) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0 + return c:IsSetCard(SET_ALTERGEIST) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -46,7 +46,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(g,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x103) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ALTERGEIST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end @@ -65,7 +65,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x103) and c:IsAbleToHand() + return c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -79,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93504463.lua b/official/c93504463.lua index 76787bec98..e8b6eee5ff 100644 --- a/official/c93504463.lua +++ b/official/c93504463.lua @@ -1,4 +1,5 @@ --進化への懸け橋 +--Evolutionary Bridge local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x304e} +s.listed_series={SET_EVOLTILE} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return d and d:IsControler(tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x304e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EVOLTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -36,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(a,tc) end end -end +end \ No newline at end of file diff --git a/official/c93506862.lua b/official/c93506862.lua index 0735cb6c8e..238880f428 100644 --- a/official/c93506862.lua +++ b/official/c93506862.lua @@ -1,4 +1,5 @@ --リチュア・ヴァニティ +--Gishki Vanity local s,id=GetID() function s.initial_effect(c) --act limit @@ -6,40 +7,35 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfDiscard) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3a} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_GISHKI} function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) e1:SetOperation(s.chainop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetOperation(s.sucop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_CHAIN_END) e3:SetOperation(s.cedop) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetLabelObject(e2) Duel.RegisterEffect(e3,tp) end function s.chainop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(0x3a) and rc:IsType(TYPE_RITUAL) then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsSetCard(SET_GISHKI) and rc:IsType(TYPE_RITUAL) then Duel.SetChainLimit(s.chainlm) end end @@ -47,7 +43,7 @@ function s.chainlm(e,rp,tp) return tp==rp end function s.sucfilter(c) - return c:IsSetCard(0x3a) and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsSetCard(SET_GISHKI) and c:IsType(TYPE_RITUAL) and c:IsRitualSummoned() end function s.sucop(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(s.sucfilter,1,nil) then @@ -58,4 +54,4 @@ function s.cedop(e,tp,eg,ep,ev,re,r,rp) if Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS) and e:GetLabelObject():GetLabel()==1 then Duel.SetChainLimitTillChainEnd(s.chainlm) end -end +end \ No newline at end of file diff --git a/official/c93507434.lua b/official/c93507434.lua index 95aa89f369..f9014d00fe 100644 --- a/official/c93507434.lua +++ b/official/c93507434.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) e2:SetOperation(s.ddop) c:RegisterEffect(e2) end -s.listed_series={0x11a} +s.listed_series={SET_DINOWRESTLER} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end @@ -48,7 +48,7 @@ function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=c:GetReasonCard() return c:IsLocation(LOCATION_GRAVE) and r & REASON_LINK == REASON_LINK - and rc:IsSetCard(0x11a) and rc:IsLinkMonster() + and rc:IsSetCard(SET_DINOWRESTLER) and rc:IsLinkMonster() end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -57,12 +57,12 @@ end function s.ddop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local sync=c:GetReasonCard() - if sync:IsRelateToEffect(e) and sync:IsFaceup() and sync:IsSetCard(0x11a) and sync:IsLinkMonster() then + if sync:IsRelateToEffect(e) and sync:IsFaceup() and sync:IsSetCard(SET_DINOWRESTLER) and sync:IsLinkMonster() then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) sync:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c93509766.lua b/official/c93509766.lua index d8e804d4b6..4cd0bdfd41 100644 --- a/official/c93509766.lua +++ b/official/c93509766.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfToDeckCost) + e1:SetCost(Cost.SelfToDeck) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -54,11 +54,6 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsAbleToDeckAsCost() end - Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) -end function s.thfilter(c) return c:IsCode(82661630) and c:IsAbleToHand() end diff --git a/official/c93542102.lua b/official/c93542102.lua index 4b984ffa6e..cb57ce5077 100644 --- a/official/c93542102.lua +++ b/official/c93542102.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.roll_dice=true -s.listed_series={0x26} +s.listed_series={SET_MORPHTRONIC} function s.cona(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsDisabled() and e:GetHandler():IsAttackPos() end @@ -33,7 +33,7 @@ function s.cond(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsDisabled() and e:GetHandler():IsDefensePos() end function s.cfilter(c) - return c:IsLevelBelow(4) and c:IsSetCard(0x26) and c:IsMonster() + return c:IsLevelBelow(4) and c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() end function s.tga(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 @@ -46,7 +46,7 @@ function s.tgd(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) end function s.filter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x26) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_MORPHTRONIC) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.opa(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end @@ -64,4 +64,4 @@ function s.opd(e,tp,eg,ep,ev,re,r,rp) local dc=Duel.TossDice(tp,1) local g=Duel.GetDecktopGroup(tp,dc) Duel.ConfirmCards(tp,g) -end +end \ No newline at end of file diff --git a/official/c93543806.lua b/official/c93543806.lua index 76a6eca65f..29a0a1314f 100644 --- a/official/c93543806.lua +++ b/official/c93543806.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.counterfilter(c) - return c:IsSetCard(0x70) + return c:IsSetCard(SET_CHRONOMALY) end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -25,22 +25,22 @@ function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) - return not c:IsSetCard(0x70) + return not c:IsSetCard(SET_CHRONOMALY) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x70) and not c:IsLevel(6) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_CHRONOMALY) and not c:IsLevel(6) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -56,7 +56,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(6) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c9354555.lua b/official/c9354555.lua index a48a7b438f..d45d48dbec 100644 --- a/official/c9354555.lua +++ b/official/c9354555.lua @@ -41,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(hg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,hg) end -end +end \ No newline at end of file diff --git a/official/c93554166.lua b/official/c93554166.lua index 6b8ecf22b5..937d1f44be 100644 --- a/official/c93554166.lua +++ b/official/c93554166.lua @@ -30,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then Duel.BreakEffect() - Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end end -end +end \ No newline at end of file diff --git a/official/c93568288.lua b/official/c93568288.lua index 07bfaa4a07..b98966ec24 100644 --- a/official/c93568288.lua +++ b/official/c93568288.lua @@ -1,4 +1,5 @@ --No.80 狂装覇王ラプソディ・イン・バーサーク +--Number 80: Rhapsody in Berserk local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -22,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(2,id) - e2:SetCost(s.rmcost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.rmtg) e2:SetOperation(s.rmop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -52,32 +53,28 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetLabelObject(tc) c:RegisterEffect(e2) end function s.eqlimit(e,c) return c==e:GetLabelObject() end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rmfilter(c) return c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil) + local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) @@ -85,4 +82,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93581434.lua b/official/c93581434.lua index d60d5ad9d6..22c586d067 100644 --- a/official/c93581434.lua +++ b/official/c93581434.lua @@ -1,5 +1,5 @@ --剛鬼ヘルトレーナー ---Gouki Hell Trainer +--Gouki Ringtrainer -- local s,id=GetID() function s.initial_effect(c) @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end @@ -33,7 +33,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfc) and c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GOUKI) and c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -58,16 +58,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) Duel.SpecialSummonComplete() end end end function s.indfilter(c) - return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(0xfc) + return c:IsFaceup() and c:IsLinkMonster() and c:IsSetCard(SET_GOUKI) end function s.indcon(e) return Duel.IsExistingMatchingCard(s.indfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end - +end \ No newline at end of file diff --git a/official/c93595154.lua b/official/c93595154.lua index 3f77889713..b7d5b4490d 100644 --- a/official/c93595154.lua +++ b/official/c93595154.lua @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_COST) and re and re:IsActivated() and re:IsActiveType(TYPE_MONSTER) + if c:IsReason(REASON_COST) and re and re:IsActivated() and re:IsMonsterEffect() and re:GetHandler():IsCode(CARD_ALBAZ) then local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,1)) @@ -58,12 +58,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.setcon) e1:SetTarget(s.settg) e1:SetOperation(s.setop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_END + return Duel.IsPhase(PHASE_END) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsSSetable() end diff --git a/official/c93599951.lua b/official/c93599951.lua index c6b0305b08..e8895b4e85 100644 --- a/official/c93599951.lua +++ b/official/c93599951.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(tc,Duel.GetAttackTarget()) end end -end +end \ No newline at end of file diff --git a/official/c93600443.lua b/official/c93600443.lua index dce88a69a4..47d7da000d 100644 --- a/official/c93600443.lua +++ b/official/c93600443.lua @@ -1,4 +1,5 @@ --マスク・チェンジ・セカンド +--Mask Change II local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xa008} +s.listed_series={SET_MASKED_HERO} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) local lv=c:GetLevel() @@ -25,7 +26,7 @@ function s.filter(c,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv,att,c) end function s.spfilter(c,e,tp,lv,att,mc) - return c:IsSetCard(0xa008) and c:GetLevel()>lv and c:IsAttribute(att) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_MASKED_HERO) and c:GetLevel()>lv and c:IsAttribute(att) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.chkfilter(c,tc) local lv=tc:GetLevel() @@ -54,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) g:GetFirst():CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c93612434.lua b/official/c93612434.lua index 16ff72c015..ae23051403 100644 --- a/official/c93612434.lua +++ b/official/c93612434.lua @@ -1,5 +1,5 @@ --デュアルウィール・ドラゴン ---Dualwiel Dragon +--Double Disruptor Dragon local s,id=GetID() function s.initial_effect(c) --Special summon Rokket monsters with different names from GY @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -21,19 +21,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} s.listed_names={67526112,20071842} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.spcheck(sg,e,tp) return sg:GetClassCount(Card.GetCode)==2 @@ -58,14 +54,14 @@ function s.thfilter(c) return c:IsCode(67526112,20071842) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c93655221.lua b/official/c93655221.lua index 0f5b05d875..365528f93e 100644 --- a/official/c93655221.lua +++ b/official/c93655221.lua @@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) hc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -67,7 +67,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) c:RegisterEffect(e1) --Equip limit @@ -77,7 +77,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) e2:SetLabelObject(tc) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -88,4 +88,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c93657021.lua b/official/c93657021.lua index 9fb61a0c99..e1273d9169 100644 --- a/official/c93657021.lua +++ b/official/c93657021.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,0xc008)) + Fusion.AddProcMix(c,true,true,s.matfilter,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DESTINY_HERO)) --fusion success local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -27,13 +27,13 @@ function s.initial_effect(c) e2:SetOperation(s.indop) c:RegisterEffect(e2) end -s.listed_series={0xc008} -s.material_setcode={0x8,0xc008} +s.listed_series={SET_DESTINY_HERO} +s.material_setcode={SET_HERO,SET_DESTINY_HERO} function s.matfilter(c,fc,sumtype,tp) - return c:IsType(TYPE_FUSION,fc,sumtype,tp) and c:IsSetCard(0xc008,fc,sumtype,tp) + return c:IsType(TYPE_FUSION,fc,sumtype,tp) and c:IsSetCard(SET_DESTINY_HERO,fc,sumtype,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) + return e:GetHandler():IsFusionSummoned() end function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) end @@ -49,7 +49,7 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) @@ -61,4 +61,4 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) tc:RegisterEffect(e4) end -end +end \ No newline at end of file diff --git a/official/c9365703.lua b/official/c9365703.lua index 9857db5f30..71a921baac 100644 --- a/official/c9365703.lua +++ b/official/c9365703.lua @@ -1,4 +1,5 @@ --スピード・ウォリアー +--Speed Warrior local s,id=GetID() function s.initial_effect(c) --summon success @@ -21,10 +22,10 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) end function s.dacon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE_STEP and Duel.GetCurrentChain()==0 + return Duel.IsPhase(PHASE_BATTLE_STEP) and Duel.GetCurrentChain()==0 and e:GetHandler():GetFlagEffect(id)~=0 end function s.daop(e,tp,eg,ep,ev,re,r,rp) @@ -34,6 +35,6 @@ function s.daop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetBaseAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c93662626.lua b/official/c93662626.lua index f4043e66e0..98c27a356f 100644 --- a/official/c93662626.lua +++ b/official/c93662626.lua @@ -1,4 +1,5 @@ --イグナイト・ウージー +--Igknight Veteran local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c93671934.lua b/official/c93671934.lua index a0bbe660fc..f51298843b 100644 --- a/official/c93671934.lua +++ b/official/c93671934.lua @@ -1,4 +1,5 @@ --士気高揚 +--Morale Boost local s,id=GetID() function s.initial_effect(c) --Activate @@ -62,4 +63,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT,true) end Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c93672138.lua b/official/c93672138.lua index a80ce32005..4d2aec0fbf 100644 --- a/official/c93672138.lua +++ b/official/c93672138.lua @@ -1,12 +1,12 @@ --- Evil★Twin's トラブル・サニー --- Evil★Twin's Trouble Sunny --- Scripted by Hatter +--Evil★Twin's トラブル・サニー +--Evil★Twin's Trouble Sunny +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2+ monsters, including an "Evil★Twin" monster + --2+ monsters, including an "Evil★Twin" monster Link.AddProcedure(c,nil,2,4,s.lcheck) - -- Special Summon up to 1 "Ki-sikil" and "Lil-la" monster each + --Special Summon up to 1 "Ki-sikil" and "Lil-la" monster each local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,11 +15,11 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Send 1 card on the field to the GY + --Send 1 card on the field to the GY local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOGRAVE) @@ -35,10 +35,6 @@ s.listed_series={SET_KI_SIKIL,SET_LIL_LA,SET_EVIL_TWIN} function s.lcheck(g,lc,sumtype,tp) return g:IsExists(Card.IsSetCard,1,nil,SET_EVIL_TWIN,lc,sumtype,tp) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsSetCard({SET_KI_SIKIL,SET_LIL_LA}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c93684009.lua b/official/c93684009.lua index 44c334a43f..e1e2d934ae 100644 --- a/official/c93684009.lua +++ b/official/c93684009.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetCondition(s.tgcon) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GLADIATOR)) e2:SetValue(aux.tgoval) c:RegisterEffect(e2) --Summon from deck @@ -33,19 +33,19 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.tgcon(e) local ph=Duel.GetCurrentPhase() return ph<=PHASE_MAIN1 or ph>=PHASE_MAIN2 end function s.cfilter(c,tp) - return c:IsSetCard(0x19) and c:IsSummonLocation(LOCATION_DECK) and c:IsPreviousControler(tp) + return c:IsSetCard(SET_GLADIATOR) and c:IsSummonLocation(LOCATION_DECK) and c:IsPreviousControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_GLADIATOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,c:GetRace()),tp,LOCATION_MZONE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) diff --git a/official/c93708824.lua b/official/c93708824.lua index b8a344a0e3..4fe5e32b04 100644 --- a/official/c93708824.lua +++ b/official/c93708824.lua @@ -32,7 +32,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id,CARD_BLACK_ROSE_DRAGON} -s.listed_series={0x1123} +s.listed_series={SET_ROSE_DRAGON} --Search function s.thfilter(c) return c:IsAbleToHand() and not c:IsCode(id) and c:ListsCode(CARD_BLACK_ROSE_DRAGON) @@ -53,7 +53,7 @@ end function s.rthfilter(c,tp) return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) - and (c:IsPreviousSetCard(0x1123) or (c:GetPreviousRaceOnField()&RACE_PLANT~=0 and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0)) + and (c:IsPreviousSetCard(SET_ROSE_DRAGON) or (c:GetPreviousRaceOnField()&RACE_PLANT~=0 and c:GetPreviousTypeOnField()&TYPE_SYNCHRO~=0)) end function s.rthcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,4 +68,4 @@ function s.rthop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93709215.lua b/official/c93709215.lua index 36914b714e..1664c5959f 100644 --- a/official/c93709215.lua +++ b/official/c93709215.lua @@ -1,4 +1,5 @@ --ダークネス・デストロイヤー +--Darkness Destroyer local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -16,4 +17,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_EXTRA_ATTACK) e3:SetValue(1) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c93713837.lua b/official/c93713837.lua index 39209978a5..a64f66f7b0 100644 --- a/official/c93713837.lua +++ b/official/c93713837.lua @@ -1,4 +1,5 @@ --No.24 竜血鬼ドラギュラス +--Number 24: Dragulas the Vampiric Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -13,7 +14,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.poscost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.postg) e1:SetOperation(s.posop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -42,10 +43,6 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.xyz_number=24 -function s.poscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.posfilter(c) return c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA) and c:IsCanTurnSet() end @@ -90,4 +87,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93715853.lua b/official/c93715853.lua index ae29ea79af..b62dd84a15 100644 --- a/official/c93715853.lua +++ b/official/c93715853.lua @@ -1,4 +1,5 @@ --魔神アーク・マキナ +--Mekanikal Arkfiend local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,14 +20,14 @@ function s.filter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93717133.lua b/official/c93717133.lua index 8d32c7832d..9c3e2dd92f 100644 --- a/official/c93717133.lua +++ b/official/c93717133.lua @@ -64,18 +64,18 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Group.FromCards(c,tc) local mcount=0 if tc:IsFaceup() then mcount=tc:GetOverlayCount() end - if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then + if Duel.Remove(g,0,REASON_EFFECT|REASON_TEMPORARY)~=0 then local og=Duel.GetOperatedGroup() if not og:IsContains(tc) then mcount=0 end local oc=og:GetFirst() for oc in aux.Next(og) do - oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + oc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end og:KeepAlive() local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) e1:SetLabel(mcount) e1:SetCountLimit(1) e1:SetLabelObject(og) @@ -95,9 +95,9 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetOwner()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(e:GetLabel()*500) e:GetOwner():RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c93724592.lua b/official/c93724592.lua index b8270c9f56..a74c5c2b7b 100644 --- a/official/c93724592.lua +++ b/official/c93724592.lua @@ -1,4 +1,5 @@ --カラクリ忍者 参参九 +--Karakuri Ninja mdl 339 "Sazank" local s,id=GetID() function s.initial_effect(c) --must attack @@ -58,6 +59,6 @@ function s.dirop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c93729065.lua b/official/c93729065.lua index fd39d9b52c..9ad95fdd80 100644 --- a/official/c93729065.lua +++ b/official/c93729065.lua @@ -74,7 +74,7 @@ end function s.rdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.SelectEffectYesNo(tp,c) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) Duel.Hint(HINT_CARD,0,id) Duel.ChangeBattleDamage(tp,0) end @@ -98,16 +98,16 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetValue(code) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) - if c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)>0 then + if c:CopyEffect(code,RESETS_STANDARD_PHASE_END,1)>0 then Duel.BreakEffect() --Decrease ATK/DEF local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) @@ -116,13 +116,13 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_DISABLE) - e4:SetReset(RESET_EVENT+RESETS_STANDARD) + e4:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_SINGLE) e5:SetCode(EFFECT_DISABLE_EFFECT) e5:SetValue(RESET_TURN_SET) - e5:SetReset(RESET_EVENT+RESETS_STANDARD) + e5:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e5) Duel.Damage(1-tp,500,REASON_EFFECT) end diff --git a/official/c93729896.lua b/official/c93729896.lua index a96b5545ef..2157b6be92 100644 --- a/official/c93729896.lua +++ b/official/c93729896.lua @@ -114,4 +114,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c93730230.lua b/official/c93730230.lua index d1356c5602..b9bfbc4a73 100644 --- a/official/c93730230.lua +++ b/official/c93730230.lua @@ -1,11 +1,9 @@ --先史遺産クリスタル・エイリアン --Chronomaly Crystal Chrononaut - local s,id=GetID() function s.initial_effect(c) - --Must be properly summoned before reviving - c:EnableReviveLimit() - --Xyz summon procedure + c:EnableReviveLimit() + --Xyz Summon procedure: 2 Level 3 monsters Xyz.AddProcedure(c,nil,3,2) --When targeted for attack, make itself unable to be destroyed by battle or card effect local e1=Effect.CreateEffect(c) @@ -14,14 +12,10 @@ function s.initial_effect(c) e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -32,7 +26,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) diff --git a/official/c93730409.lua b/official/c93730409.lua index dbc6d89de6..7d2f2cf57e 100644 --- a/official/c93730409.lua +++ b/official/c93730409.lua @@ -17,9 +17,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c9373534.lua b/official/c9373534.lua index 4875fba786..f5c6a27ac9 100644 --- a/official/c9373534.lua +++ b/official/c9373534.lua @@ -1,7 +1,8 @@ --風魔手裏剣 +--Fuhma Shuriken local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x2b)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_NINJA)) --Atk up local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -32,4 +33,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c93738004.lua b/official/c93738004.lua index e1d7e872d0..55e5dfe055 100644 --- a/official/c93738004.lua +++ b/official/c93738004.lua @@ -1,5 +1,5 @@ --空牙団の孤高 サジータ ---Sajita, Solitary of the Skyfang Brigade +--Sagitta, Maverick Fur Hire local s,id=GetID() function s.initial_effect(c) --damage @@ -25,9 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.damfilter(c) - return not c:IsCode(id) and c:IsFaceup() and c:IsSetCard(0x114) + return not c:IsCode(id) and c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -41,6 +41,5 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,dam,REASON_EFFECT) end function s.tgtg(e,c) - return c~=e:GetHandler() and c:IsSetCard(0x114) -end - + return c~=e:GetHandler() and c:IsSetCard(SET_FUR_HIRE) +end \ No newline at end of file diff --git a/official/c93747864.lua b/official/c93747864.lua index 04adba4263..59c926f8f9 100644 --- a/official/c93747864.lua +++ b/official/c93747864.lua @@ -1,4 +1,5 @@ --砂漠の光 +--Desert Sunlight local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c93749093.lua b/official/c93749093.lua index fca99e7803..a70ae4888a 100644 --- a/official/c93749093.lua +++ b/official/c93749093.lua @@ -1,4 +1,5 @@ --マシュマカロン +--Marshmacaron local s,id=GetID() function s.initial_effect(c) --special summon @@ -23,8 +24,8 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,e:GetHandler(),e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local ct=2 @@ -32,8 +33,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ct=math.min(ct,Duel.GetLocationCount(tp,LOCATION_MZONE)) if ct<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,ct,e:GetHandler(),e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,ct,e:GetHandler(),e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93751476.lua b/official/c93751476.lua index f78b416d88..06da7b2763 100644 --- a/official/c93751476.lua +++ b/official/c93751476.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetOperation(s.setop) c:RegisterEffect(e2) end -s.listed_series={0x79,0x7c} +s.listed_series={SET_FIRE_FIST,SET_FIRE_FORMATION} function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) then @@ -33,12 +33,12 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_FIST) and c:GetLevel()==4 and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -55,10 +55,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.setcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO - and e:GetHandler():GetReasonCard():IsSetCard(0x79) + and e:GetHandler():GetReasonCard():IsSetCard(SET_FIRE_FIST) end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpell() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c93754402.lua b/official/c93754402.lua index 5d277c8138..85e96f9a6e 100644 --- a/official/c93754402.lua +++ b/official/c93754402.lua @@ -1,7 +1,6 @@ --炎舞-「洞明」 --Fire Formation - Domei --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --When activated, ritual summon 1 beast-warrior ritual monster from hand @@ -24,8 +23,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x79} - +s.listed_series={SET_FIRE_FIST} function s.filter(c) return c:IsRace(RACE_BEASTWARRIOR) and c:IsRitualMonster() end @@ -50,7 +48,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsPreviousLocation(LOCATION_SZONE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x79) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_FIST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end diff --git a/official/c93775296.lua b/official/c93775296.lua index 386cbd9ca8..cb55925a79 100644 --- a/official/c93775296.lua +++ b/official/c93775296.lua @@ -39,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_DEFENSE) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c93777634.lua b/official/c93777634.lua index 3dc1b64e22..82b22865d1 100644 --- a/official/c93777634.lua +++ b/official/c93777634.lua @@ -1,7 +1,6 @@ --No.39 希望皇ホープ・ライジング --Number 39: Utopia Rising --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -35,15 +34,14 @@ function s.initial_effect(c) c:RegisterEffect(e2) end --Lists "Number" archetype -s.listed_series={0x48} +s.listed_series={SET_NUMBER} --Mentions itself s.listed_names={id} --Number 39 s.xyz_number=39 - --Check for a "Number" Xyz Monster function s.spfilter(c,e,tp) - return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and not c:IsCode(id) + return c:IsSetCard(SET_NUMBER) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end --Activation legality @@ -69,7 +67,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end --If you Xyz Summon function s.revfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsSummonPlayer(tp) + return c:IsXyzSummoned() and c:IsSummonPlayer(tp) end function s.revcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.revfilter,1,nil,tp) @@ -92,7 +90,7 @@ function s.revop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end end \ No newline at end of file diff --git a/official/c93816465.lua b/official/c93816465.lua index 414e43a723..5d025bb0c6 100644 --- a/official/c93816465.lua +++ b/official/c93816465.lua @@ -1,4 +1,5 @@ --ゼロ・ガードナー +--Zero Gardna local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,14 +8,10 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -22,13 +19,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetValue(1) Duel.RegisterEffect(e2,tp) -end +end \ No newline at end of file diff --git a/official/c93830681.lua b/official/c93830681.lua index ba0e3487a1..c5e89d8c65 100644 --- a/official/c93830681.lua +++ b/official/c93830681.lua @@ -1,4 +1,5 @@ --キラー・ラブカ +--Friller Rabca local s,id=GetID() function s.initial_effect(c) --disable attack @@ -10,14 +11,14 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() - return at and at:IsControler(tp) and at:IsFaceup() and at:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + return at and at:IsControler(tp) and at:IsFaceup() and at:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -33,7 +34,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c93850652.lua b/official/c93850652.lua index 3ca0c8e037..020f9c9f4e 100644 --- a/official/c93850652.lua +++ b/official/c93850652.lua @@ -1,5 +1,5 @@ --空牙団の剣士 ビート ---Beat, Swordsman of the Skyfang Brigade +--Beat, Bladesman Fur Hire -- local s,id=GetID() function s.initial_effect(c) @@ -28,9 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,13 +46,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) - return c:IsSetCard(0x114) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_FUR_HIRE) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -65,5 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c93850690.lua b/official/c93850690.lua index 27420b5dd2..0f8585ba0e 100644 --- a/official/c93850690.lua +++ b/official/c93850690.lua @@ -1,5 +1,5 @@ --大霊峰相剣門 ---Xiangjianmen the Grand Spiritual Peak +--Swordsoul Sacred Summit --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.filter(c,e,tp,sync) - return (c:IsSetCard(0x16d) or (sync and c:IsRace(RACE_WYRM))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_SWORDSOUL) or (sync and c:IsRace(RACE_WYRM))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local sync=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsType,TYPE_SYNCHRO),tp,LOCATION_MZONE,0,1,nil) @@ -46,7 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.lvfilter(c) - return c:IsFaceup() and (c:IsSetCard(0x16d) or c:IsRace(RACE_WYRM)) and c:HasLevel() + return c:IsFaceup() and (c:IsSetCard(SET_SWORDSOUL) or c:IsRace(RACE_WYRM)) and c:HasLevel() end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end @@ -66,7 +66,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) if op==0 then e1:SetValue(1) else @@ -74,4 +74,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp,chk) end tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c93854893.lua b/official/c93854893.lua index 9567345e92..c776e5be76 100644 --- a/official/c93854893.lua +++ b/official/c93854893.lua @@ -81,4 +81,4 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(c,g) end end -end +end \ No newline at end of file diff --git a/official/c938717.lua b/official/c938717.lua index f0f9f4813c..a09d8b1e14 100644 --- a/official/c938717.lua +++ b/official/c938717.lua @@ -1,7 +1,6 @@ --起動兵長コマンドリボルバー --Boot-Up Corporal - Command Dynamo --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -24,14 +23,13 @@ function s.initial_effect(c) e2:SetValue(s.atkval) c:RegisterEffect(e2) end -s.listed_series={0x51} - +s.listed_series={SET_GADGET} function s.eqfilter(c) - return c:IsRace(RACE_MACHINE) and c:IsSetCard(0x51) and c:IsFaceup() and c:IsMonster() + return c:IsRace(RACE_MACHINE) and c:IsSetCard(SET_GADGET) and c:IsFaceup() and c:IsMonster() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end + local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end local ft=math.min(Duel.GetLocationCount(tp,LOCATION_SZONE),2) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ft>0 and aux.SelectUnselectGroup(g,e,tp,1,ft,aux.dncheck,chk) @@ -46,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) - local g=Duel.GetTargetCards(e):Match(Card.IsMonster,nil):Match(Card.IsSetCard,nil,0x51) + local g=Duel.GetTargetCards(e):Match(Card.IsMonster,nil):Match(Card.IsSetCard,nil,SET_GADGET) if ft<#g then return end Duel.BreakEffect() for tc in aux.Next(g) do @@ -55,10 +53,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) end end end diff --git a/official/c93877990.lua b/official/c93877990.lua index ae15ea82e1..ae42ce60c0 100644 --- a/official/c93877990.lua +++ b/official/c93877990.lua @@ -1,7 +1,6 @@ --富炎星-ハクテンオウ --Brotherhood of the Fire Fist - Swan --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -32,13 +31,12 @@ function s.initial_effect(c) e2:SetCost(s.descost) e2:SetTarget(s.destg) e2:SetOperation(s.desop) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) c:RegisterEffect(e2) end -s.listed_series={0x7c} - +s.listed_series={SET_FIRE_FORMATION} function s.damfilter(c) - return c:IsFaceup() and c:IsSpellTrap() and c:IsSetCard(0x7c) + return c:IsFaceup() and c:IsSpellTrap() and c:IsSetCard(SET_FIRE_FORMATION) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) local ct=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_ONFIELD,0,nil) @@ -54,11 +52,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE - and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) + return Duel.IsBattlePhase() and aux.StatChangeDamageStepCondition() end function s.descfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local nc=Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_ONFIELD,0,1,nil) @@ -73,9 +70,9 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c93880808.lua b/official/c93880808.lua index 7631c3dd55..6e09d99cc4 100644 --- a/official/c93880808.lua +++ b/official/c93880808.lua @@ -1,4 +1,5 @@ --Arcana Triumph Joker +--Arcana Triumph Joker local s,id=GetID() function s.initial_effect(c) --special summon @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -39,9 +40,9 @@ function s.rescon(sg,e,tp,mg) return aux.ChkfMMZ(1)(sg,e,tp,mg) and sg:GetClassCount(Card.GetCode)==3 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local g1=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,CARD_QUEEN_KNIGHT) - local g2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,CARD_KING_KNIGHT) - local g3=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,CARD_JACK_KNIGHT) + local g1=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,CARD_QUEEN_KNIGHT) + local g2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,CARD_KING_KNIGHT) + local g3=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,CARD_JACK_KNIGHT) g1:Merge(g2) g1:Merge(g3) if chk==0 then return aux.SelectUnselectGroup(g1,e,tp,3,3,s.rescon,0) end @@ -73,9 +74,9 @@ end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_HAND,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) - Duel.DiscardHand(tp,s.descfilter,1,1,REASON_COST+REASON_DISCARD,nil,tp) + Duel.DiscardHand(tp,s.descfilter,1,1,REASON_COST|REASON_DISCARD,nil,tp) local g=Duel.GetOperatedGroup() - e:SetLabel(g:GetFirst():GetType()&0x7) + e:SetLabel(g:GetFirst():GetMainCardType()) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -85,4 +86,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.dfilter,tp,0,LOCATION_ONFIELD,nil,e:GetLabel()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c93882364.lua b/official/c93882364.lua index 7150d84f62..34e4290045 100644 --- a/official/c93882364.lua +++ b/official/c93882364.lua @@ -1,4 +1,5 @@ --ジェネクス・ワーカー +--Genex Worker local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,18 +8,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end +s.listed_series={SET_GENEX} function s.filter(c,e,tp) - return c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_GENEX) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93889755.lua b/official/c93889755.lua index ceebb1ff1b..3236eb403e 100644 --- a/official/c93889755.lua +++ b/official/c93889755.lua @@ -1,4 +1,5 @@ --マーダーサーカス +--Crass Clown local s,id=GetID() function s.initial_effect(c) --to hand @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93892436.lua b/official/c93892436.lua index 401fcf4453..bf0b347bdb 100644 --- a/official/c93892436.lua +++ b/official/c93892436.lua @@ -1,4 +1,5 @@ --EMブランコブラ +--Performapal Swincobra local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) @@ -23,7 +24,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_POSITION) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) e3:SetCondition(s.poscon) @@ -49,4 +50,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c93895605.lua b/official/c93895605.lua index fb7fe1b5bc..ef5385e3e5 100644 --- a/official/c93895605.lua +++ b/official/c93895605.lua @@ -1,4 +1,5 @@ --ヘイト・バスター +--Hate Buster local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,4 +38,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,a:GetAttack(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c93896655.lua b/official/c93896655.lua index ef9cc196fa..9e1f73cdeb 100644 --- a/official/c93896655.lua +++ b/official/c93896655.lua @@ -2,10 +2,10 @@ --Sunavalon Dryas local s,id=GetID() function s.initial_effect(c) - --link summon c:EnableReviveLimit() + --Link Summon procedure: 1 Level 4 or lower Plant monster Link.AddProcedure(c,s.matfilter,1,1) - --search + --Add 1 "Sunvine" Spell/Trap from your Deck to your hand local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetValue(s.valcheck) e2:SetLabelObject(e1) c:RegisterEffect(e2) - --cannot be atk + --Cannot be targeted for attacks local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) @@ -30,7 +30,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetValue(1) c:RegisterEffect(e3) - --spsummon + --Gain LP equal to the damage you take, and if you do, Special Summon 1 "Sunvine" monster from your Extra Deck local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -43,7 +43,8 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x2157} +s.listed_series={SET_SUNVINE} +s.listed_names={27520594} --"Sunseed Genius Loci" function s.matfilter(c,lc,sumtype,tp) return c:IsRace(RACE_PLANT,lc,sumtype,tp) and c:IsLevelBelow(4) end @@ -56,11 +57,11 @@ function s.valcheck(e,c) end end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetSequence()>4 and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():GetSequence()>4 and e:GetHandler():IsLinkSummoned() and e:GetLabel()==1 end function s.thfilter(c) - return c:IsSetCard(0x2157) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SUNVINE) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -78,7 +79,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_BATTLE+REASON_EFFECT)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x2157) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUNVINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 @@ -94,4 +95,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c93900406.lua b/official/c93900406.lua index b1575359ec..85dd6ba631 100644 --- a/official/c93900406.lua +++ b/official/c93900406.lua @@ -1,4 +1,5 @@ --マタンゴ +--Mushroom Man #2 local s,id=GetID() function s.initial_effect(c) --damage @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_DAMAGE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.damcon) @@ -22,13 +23,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.ctlcon) - e2:SetCost(s.ctlcost) + e2:SetCost(Cost.PayLP(500)) e2:SetTarget(s.ctltg) e2:SetOperation(s.ctlop) c:RegisterEffect(e2) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -38,11 +39,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,300,REASON_EFFECT) end function s.ctlcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp -end -function s.ctlcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) + return Duel.IsTurnPlayer(tp) end function s.ctltg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsControlerCanBeChanged() end @@ -53,4 +50,4 @@ function s.ctlop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.GetControl(c,1-tp) end -end +end \ No newline at end of file diff --git a/official/c93912845.lua b/official/c93912845.lua index 4cce2982df..1ba1605628 100644 --- a/official/c93912845.lua +++ b/official/c93912845.lua @@ -34,12 +34,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) end end @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c9391354.lua b/official/c9391354.lua index 0f7ee8ec29..5440c77b50 100644 --- a/official/c9391354.lua +++ b/official/c9391354.lua @@ -1,4 +1,5 @@ --グラビ・クラッシュドラゴン +--Gravi-Crush Dragon local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.cfilter(c) - return c:IsFaceup() and c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsContinuousSpell() and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) end @@ -34,4 +35,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93920420.lua b/official/c93920420.lua index 2b7fd872a2..7216f53139 100644 --- a/official/c93920420.lua +++ b/official/c93920420.lua @@ -28,12 +28,12 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg2) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xfe,0x11b} +s.listed_series={SET_WORLD_LEGACY,SET_ORCUST} function s.indcon(e) return e:GetHandler():GetSummonType() & SUMMON_TYPE_SPECIAL == 0 end @@ -41,7 +41,7 @@ function s.indval(e,c) return c:IsSummonLocation(LOCATION_EXTRA) end function s.spfilter1(c,e,tp) - return c:IsSetCard(0xfe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -57,7 +57,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x11b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_ORCUST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.spfilter2(chkc,e,tp) end @@ -78,12 +78,12 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end diff --git a/official/c93920745.lua b/official/c93920745.lua index 58e48106e5..d2d1d41d3b 100644 --- a/official/c93920745.lua +++ b/official/c93920745.lua @@ -1,4 +1,5 @@ --ペンギン・ソルジャー +--Penguin Soldier local s,id=GetID() function s.initial_effect(c) --flip @@ -24,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c93927067.lua b/official/c93927067.lua index 7a9d9bb8af..f36e0d92f0 100644 --- a/official/c93927067.lua +++ b/official/c93927067.lua @@ -1,4 +1,5 @@ --カイザー・ブラッド・ヴォルス +--Kaiser Vorse Raider local s,id=GetID() function s.initial_effect(c) --spsummon proc @@ -40,7 +41,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -51,7 +52,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-500) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c93946239.lua b/official/c93946239.lua index 5b62d13525..cf8eebda40 100644 --- a/official/c93946239.lua +++ b/official/c93946239.lua @@ -1,4 +1,5 @@ --無の煉獄 +--Into the Void local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,11 +29,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetOperation(s.disop) Duel.RegisterEffect(e1,p) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0) - Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) -end + Duel.SendtoGrave(g,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c93953933.lua b/official/c93953933.lua index 491329a24e..93a6c88b93 100644 --- a/official/c93953933.lua +++ b/official/c93953933.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.excon) - e1:SetCost(s.excost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.extg) e1:SetOperation(s.exop) c:RegisterEffect(e1) @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -32,11 +32,6 @@ function s.excon(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_GRAVE,0,nil) return #g>=4 and g:GetClassCount(Card.GetCode)==#g end -function s.excost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.extg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local ct=Duel.GetMatchingGroupCount(Card.IsMonster,tp,LOCATION_GRAVE,0,nil) diff --git a/official/c93966624.lua b/official/c93966624.lua index 6640bb88ac..10ab71f49f 100644 --- a/official/c93966624.lua +++ b/official/c93966624.lua @@ -1,4 +1,5 @@ --マジック・ストライダー +--Spell Strider local s,id=GetID() function s.initial_effect(c) --remove @@ -36,4 +37,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c93969023.lua b/official/c93969023.lua index e08fdc0269..57702ce41a 100644 --- a/official/c93969023.lua +++ b/official/c93969023.lua @@ -1,4 +1,5 @@ --黒鋼竜 +--Black Metal Dragon local s,id=GetID() function s.initial_effect(c) --equip @@ -6,7 +7,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) @@ -21,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x3b} +s.listed_series={SET_RED_EYES} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x3b) + return c:IsFaceup() and c:IsSetCard(SET_RED_EYES) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -46,7 +47,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabelObject(tc) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) @@ -54,7 +55,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(600) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.eqlimit(e,c) @@ -64,7 +65,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0x3b) and c:IsAbleToHand() + return c:IsSetCard(SET_RED_EYES) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -77,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c93983867.lua b/official/c93983867.lua index 6b6d6897fa..bbe91c6417 100644 --- a/official/c93983867.lua +++ b/official/c93983867.lua @@ -1,4 +1,5 @@ --トリック・ボックス +--Trick Box local s,id=GetID() function s.initial_effect(c) --activate @@ -12,16 +13,16 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc6} +s.listed_series={SET_PERFORMAGE} function s.cfilter(c,tp) - return c:IsSetCard(0xc6) and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) + return c:IsSetCard(SET_PERFORMAGE) and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAGE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end @@ -48,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetOperation(s.retop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -60,6 +61,6 @@ function s.retop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(c:GetOwner()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TEMP_REMOVE+RESET_TURN_SET)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_TURN_SET)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c9400127.lua b/official/c9400127.lua index e4294f6b01..f9ae609dc9 100644 --- a/official/c9400127.lua +++ b/official/c9400127.lua @@ -1,5 +1,5 @@ --溟界の漠-フロギ ---Phlogi, Dreg of the Abhyss +--Flogos, the Ogdoadic Boundless --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94004268.lua b/official/c94004268.lua index 256da38c11..0a3c3cd33d 100644 --- a/official/c94004268.lua +++ b/official/c94004268.lua @@ -1,4 +1,5 @@ --アマゾネスの剣士 +--Amazoness Swords Woman local s,id=GetID() function s.initial_effect(c) --reflect battle dam @@ -7,4 +8,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c94016752.lua b/official/c94016752.lua index 3fd7b51753..6793c81cd0 100644 --- a/official/c94016752.lua +++ b/official/c94016752.lua @@ -12,15 +12,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1500)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1500) end - Duel.PayLPCost(tp,1500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE) @@ -57,4 +53,4 @@ end function s.aclimit(e,re,tp) local rc=re:GetHandler() return re:IsMonsterEffect() and (rc:HasFlagEffect(id) or rc:IsCode(e:GetLabel())) -end +end \ No newline at end of file diff --git a/official/c9402966.lua b/official/c9402966.lua index d4ba60d73f..ba84c8b391 100644 --- a/official/c9402966.lua +++ b/official/c9402966.lua @@ -1,4 +1,5 @@ --超重武者タマ-C +--Superheavy Samurai Battleball local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -13,20 +14,20 @@ function s.initial_effect(c) e1:SetOperation(s.scop) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x9a) + return c:IsFacedown() or not c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) - and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) + and not Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_GRAVE,0,1,nil) end function s.filter(c,e,tp,lv) return c:IsFaceup() and c:GetLevel()>0 and Duel.IsExistingMatchingCard(s.scfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetOriginalLevel()) end function s.scfilter(c,e,tp,lv) - return c:IsSetCard(0x9a) and c:IsLevel(lv) and c:IsType(TYPE_SYNCHRO) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsLevel(lv) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -59,4 +60,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) tc:CompleteProcedure() end end -end +end \ No newline at end of file diff --git a/official/c94046012.lua b/official/c94046012.lua index f580febdac..0f05c463cb 100644 --- a/official/c94046012.lua +++ b/official/c94046012.lua @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetCondition(s.spcon1) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetCondition(s.spcon2) c:RegisterEffect(e2) end -s.listed_series={0x11b} +s.listed_series={SET_ORCUST} s.listed_names={id} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) @@ -30,7 +30,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,CARD_ORCUSTRATED_BABEL) end function s.filter(c,e,tp) - return c:IsSetCard(0x11b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_ORCUST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -50,10 +50,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,1),nil) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsAttribute(ATTRIBUTE_DARK) -end +end \ No newline at end of file diff --git a/official/c94068856.lua b/official/c94068856.lua index 1822b61c90..ca270d4fd2 100644 --- a/official/c94068856.lua +++ b/official/c94068856.lua @@ -1,4 +1,5 @@ --タイムパッセージ +--Time Passage local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x31) + return c:IsFaceup() and c:IsSetCard(SET_FORTUNE_LADY) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -27,6 +28,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(3) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c94073244.lua b/official/c94073244.lua index 407499f80c..b39f59b172 100644 --- a/official/c94073244.lua +++ b/official/c94073244.lua @@ -1,5 +1,5 @@ --空牙団の撃手 ドンパ ---Donpa, Marksman of the Skyfang Brigade +--Donpa, Marksman Fur Hire -- local s,id=GetID() function s.initial_effect(c) @@ -28,9 +28,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x114} +s.listed_series={SET_FUR_HIRE} function s.spfilter(c,e,tp) - return c:IsSetCard(0x114) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FUR_HIRE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -46,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x114) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_FUR_HIRE) and c:IsControler(tp) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) @@ -63,5 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c94076521.lua b/official/c94076521.lua index 0bf01ab610..a3a47c3db1 100644 --- a/official/c94076521.lua +++ b/official/c94076521.lua @@ -1,19 +1,19 @@ --- 水界の秘石-カトリン --- Hidden Jewel of the Hydrosphere – Katrin --- Scripted by Hatter +--水界の秘石-カトリン +--Cartorhyn the Hidden Gem of the Seafront +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Gain additional Normal Summon + --Gain additional Normal Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.nscost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.nstg) e1:SetOperation(s.nsop) c:RegisterEffect(e1) - -- Special summon this card + --Special summon this card local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -25,23 +25,18 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanAdditionalSummon(tp) and Duel.IsPlayerCanSummon(tp) end end function s.nsop(e,tp,eg,ep,ev,re,r,rp) - -- Extra Normal Summon + --Extra Normal Summon local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER+ATTRIBUTE_EARTH)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -57,13 +52,13 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Banish it if it leaves the field + --Banish it if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c94079037.lua b/official/c94079037.lua index 6860356a28..82eaec17d4 100644 --- a/official/c94079037.lua +++ b/official/c94079037.lua @@ -1,4 +1,5 @@ --マイン・モール +--Mine Mole local s,id=GetID() function s.initial_effect(c) --battle indes @@ -49,4 +50,4 @@ end function s.rmcon(e) local c=e:GetHandler() return c:IsFaceup() and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=c:GetControler() -end +end \ No newline at end of file diff --git a/official/c94081496.lua b/official/c94081496.lua index 1f55288336..4c194f497a 100644 --- a/official/c94081496.lua +++ b/official/c94081496.lua @@ -1,4 +1,5 @@ --黒光りするG +--Shiny Black "C" local s,id=GetID() function s.initial_effect(c) --destroy @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94092230.lua b/official/c94092230.lua index 0577d8589b..e05a578583 100644 --- a/official/c94092230.lua +++ b/official/c94092230.lua @@ -1,4 +1,5 @@ --インヴェルズ・グレズ +--Steelswarm Hercules local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -28,9 +29,9 @@ function s.initial_effect(c) e5:SetOperation(s.desop) c:RegisterEffect(e5) end -s.listed_series={0x100a} +s.listed_series={SET_STEELSWARM} function s.tlimit(e,c) - return not c:IsSetCard(0x100a) + return not c:IsSetCard(SET_STEELSWARM) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -44,4 +45,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94096018.lua b/official/c94096018.lua index 94ef834853..c05f586e29 100644 --- a/official/c94096018.lua +++ b/official/c94096018.lua @@ -1,4 +1,5 @@ --SPYGAL Misty +--SPYGAL Misty local s,id=GetID() function s.initial_effect(c) --draw @@ -67,4 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g==2 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9409625.lua b/official/c9409625.lua index 72b45bb6d4..278d7c9a43 100644 --- a/official/c9409625.lua +++ b/official/c9409625.lua @@ -55,7 +55,7 @@ function s.initial_effect(c) e4:SetOperation(s.tdop) c:RegisterEffect(e4) end -s.listed_series={0x4a} +s.listed_series={SET_TIMELORD} s.listed_names={36894320} function s.valcon(e,re,r,rp) return (r&REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer() @@ -63,13 +63,13 @@ end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp and e:GetHandler():GetFlagEffect(id+1)==0 end - c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1) + c:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,1) return true end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end function s.drfilter(c) return c:GetLevel()==10 and c:IsDiscardable() @@ -77,7 +77,7 @@ end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.drfilter,tp,LOCATION_HAND,0,1,nil) and s.cost(e,tp,eg,ep,ev,re,r,rp,0) end - Duel.DiscardHand(tp,s.drfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.drfilter,1,1,REASON_COST|REASON_DISCARD) s.cost(e,tp,eg,ep,ev,re,r,rp,1) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -98,7 +98,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_SZONE,0,1,e:GetHandler()) end function s.tdfilter(c) - return c:IsSetCard(0x4a) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_TIMELORD) and c:IsMonster() and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -113,12 +113,11 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then - local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then + local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then local sc=g:Select(tp,1,1,nil):GetFirst() Duel.SSet(tp,sc) end end -end - +end \ No newline at end of file diff --git a/official/c94096616.lua b/official/c94096616.lua index 472752c23e..d1c3b0b7bb 100644 --- a/official/c94096616.lua +++ b/official/c94096616.lua @@ -1,4 +1,5 @@ --武神器-オロチ +--Bujingi Ophidian local s,id=GetID() function s.initial_effect(c) --direct attack @@ -8,21 +9,17 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x88} +s.listed_series={SET_BUJIN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsAbleToEnterBP() end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x88) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) + return c:IsFaceup() and c:IsSetCard(SET_BUJIN) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -36,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c94113093.lua b/official/c94113093.lua index 94472beecb..6542280ad5 100644 --- a/official/c94113093.lua +++ b/official/c94113093.lua @@ -24,12 +24,12 @@ function s.initial_effect(c) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1186} +s.listed_series={SET_DOODLE_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttackTarget() return at and at:IsFaceup() and at:IsRace(RACE_DINOSAUR) and at:IsControler(tp) @@ -39,7 +39,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x1186) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DOODLE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not Duel.NegateAttack() or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end @@ -58,11 +58,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) --Destroy it during the End Phase local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,3)) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(id,3)) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) diff --git a/official/c9411399.lua b/official/c9411399.lua index 55f6869750..a969a981bc 100644 --- a/official/c9411399.lua +++ b/official/c9411399.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.SelfBanishCost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -29,4 +29,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94119480.lua b/official/c94119480.lua index 0984a7e130..55949edd1d 100644 --- a/official/c94119480.lua +++ b/official/c94119480.lua @@ -1,4 +1,5 @@ --終焉の守護者アドレウス +--Adreus, Keeper of Armageddon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94136469.lua b/official/c94136469.lua index aec3d74c79..19dd883488 100644 --- a/official/c94136469.lua +++ b/official/c94136469.lua @@ -45,4 +45,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.indcon(e) return e:GetHandler():IsAttackPos() -end +end \ No newline at end of file diff --git a/official/c94142993.lua b/official/c94142993.lua index 3c823a0949..1514f26fb5 100644 --- a/official/c94142993.lua +++ b/official/c94142993.lua @@ -38,9 +38,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.thfilter(c) - return c:IsSetCard(0x10b) and c:IsAbleToHand() + return c:IsSetCard(SET_TINDANGLE) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -55,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsSetCard(0x10b) and c:IsAbleToGrave() + return c:IsSetCard(SET_TINDANGLE) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -83,5 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then Duel.ConfirmCards(1-tp,c) end -end - +end \ No newline at end of file diff --git a/official/c94145021.lua b/official/c94145021.lua index 34e62f35b6..62b239c6b4 100644 --- a/official/c94145021.lua +++ b/official/c94145021.lua @@ -27,7 +27,7 @@ function s.cfilter(c,tp) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetCurrentPhase()==PHASE_DRAW or Duel.GetCurrentPhase()==PHASE_DAMAGE then return false end + if Duel.IsPhase(PHASE_DRAW) or Duel.IsPhase(PHASE_DAMAGE) then return false end local v=0 if eg:IsExists(s.cfilter,1,nil,0) then v=v+1 end if eg:IsExists(s.cfilter,1,nil,1) then v=v+2 end @@ -51,19 +51,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_TO_HAND) e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCode(EFFECT_CANNOT_DRAW) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,1) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,1)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,1) Duel.RegisterEffect(e3,tp) -end +end \ No newline at end of file diff --git a/official/c94145683.lua b/official/c94145683.lua index dced66189b..cc86561255 100644 --- a/official/c94145683.lua +++ b/official/c94145683.lua @@ -1,4 +1,5 @@ --スワローズ・ネスト +--Swallow's Nest local s,id=GetID() function s.initial_effect(c) --Activate @@ -45,4 +46,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94151981.lua b/official/c94151981.lua index 5e49f8b094..441ef5b0ae 100644 --- a/official/c94151981.lua +++ b/official/c94151981.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(2,2,nil)) + e2:SetCost(Cost.Detach(2,2,nil)) e2:SetTarget(s.drwtg) e2:SetOperation(s.drwop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -73,4 +73,4 @@ end function s.btlcond(e) local ec=e:GetHandler():GetEquipTarget() return ec and (Duel.GetAttacker()==ec or Duel.GetAttackTarget()==ec) -end +end \ No newline at end of file diff --git a/official/c94156050.lua b/official/c94156050.lua index b362853756..f94a3f3b93 100644 --- a/official/c94156050.lua +++ b/official/c94156050.lua @@ -1,4 +1,5 @@ --逆さ眼鏡 +--Reverse Glasses local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,26 +9,22 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(tc:GetAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c94163677.lua b/official/c94163677.lua index 0d07611d8a..7c61ea5d81 100644 --- a/official/c94163677.lua +++ b/official/c94163677.lua @@ -1,4 +1,5 @@ --無限の手札 +--Infinite Cards local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetTargetRange(1,1) e2:SetValue(100) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c9416697.lua b/official/c9416697.lua index 1e317d2295..5936d774bc 100644 --- a/official/c9416697.lua +++ b/official/c9416697.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x18b} +s.listed_series={SET_GHOTI} function s.spfilter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end @@ -49,13 +49,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() @@ -64,13 +64,13 @@ function s.cfilter(c) return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_FISH) and c:IsAbleToRemoveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0x18b) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_GHOTI) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c9418365.lua b/official/c9418365.lua index 87ad22d776..92a51c5b1d 100644 --- a/official/c9418365.lua +++ b/official/c9418365.lua @@ -29,17 +29,17 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.spfilter(c,tp) - return c:IsSetCard(0x88) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_BUJIN) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil,tp) return aux.SelectUnselectGroup(g,e,tp,1,1,aux.ChkfMMZ(1),0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_MZONE,0,nil,tp) local rg=aux.SelectUnselectGroup(g,e,tp,1,1,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #rg>0 then rg:KeepAlive() @@ -65,8 +65,8 @@ function s.hdtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1) end function s.hdop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)~=0 then Duel.BreakEffect() - Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) + Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD) end -end +end \ No newline at end of file diff --git a/official/c94183877.lua b/official/c94183877.lua index 8bf66b3456..05e5861603 100644 --- a/official/c94183877.lua +++ b/official/c94183877.lua @@ -1,5 +1,5 @@ --王の影 ロプトル ---Loptr, Shadow of the Generaider Boss +--Loptr, Shadow of the Generaider Bosses --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.atkcon) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x134)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_GENERAIDER)) e1:SetValue(1000) c:RegisterEffect(e1) local e2=e1:Clone() @@ -32,18 +32,18 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x134} +s.listed_series={SET_GENERAIDER} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsMainPhase() end function s.spfilter(c,e,tp,cd) - return c:IsSetCard(0x134) and c:GetLevel()==9 and not c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return c:IsSetCard(SET_GENERAIDER) and c:GetLevel()==9 and not c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end function s.costfilter(c,e,tp,ft) - return c:IsSetCard(0x134) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) + return c:IsSetCard(SET_GENERAIDER) and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup()) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,4 +64,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9418534.lua b/official/c9418534.lua index 3dc71852e9..a1b4aba98f 100644 --- a/official/c9418534.lua +++ b/official/c9418534.lua @@ -40,14 +40,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.descon) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) e1:SetCountLimit(1) tc:RegisterEffect(e1) end end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94187078.lua b/official/c94187078.lua index 7c9738e60e..443175a9fa 100644 --- a/official/c94187078.lua +++ b/official/c94187078.lua @@ -1,5 +1,5 @@ --極超の竜輝巧 ---Draitron Nova +--Drytron Nova --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -15,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.sumfilter(c) return not c:IsSummonableCard() end @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -36,7 +36,7 @@ function s.splimit(e,c) return c:IsSummonableCard() end function s.spfilter(c,e,tp) - return c:IsSetCard(0x151) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DRYTRON) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) then local tc=g:GetFirst() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) --Destroy it during the End Phase local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -74,4 +74,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Destroy(tc,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94192409.lua b/official/c94192409.lua index 6b2e7fec15..06968f6dd5 100644 --- a/official/c94192409.lua +++ b/official/c94192409.lua @@ -1,4 +1,5 @@ --強制脱出装置 +--Compulsory Evacuation Device local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94203886.lua b/official/c94203886.lua index 9f293bce98..46fae51cf3 100644 --- a/official/c94203886.lua +++ b/official/c94203886.lua @@ -23,9 +23,9 @@ function s.initial_effect(c) e2:SetOperation(s.lvop) c:RegisterEffect(e2) end -s.listed_series={0x54} +s.listed_series={SET_GAGAGA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x54) and c:GetCode()~=id + return c:IsFaceup() and c:IsSetCard(SET_GAGAGA) and c:GetCode()~=id end function s.spcon(e,c) if c==nil then return true end @@ -36,19 +36,19 @@ function s.lvcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.lvfilter(c,lv) local clv=c:GetLevel() - return c:IsFaceup() and c:IsSetCard(0x54) and clv>0 and clv~=lv + return c:IsFaceup() and c:IsSetCard(SET_GAGAGA) and clv>0 and clv~=lv end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc,e:GetHandler():GetLevel()) end @@ -64,7 +64,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c94207108.lua b/official/c94207108.lua index 649c867776..4f6732a878 100644 --- a/official/c94207108.lua +++ b/official/c94207108.lua @@ -29,12 +29,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetBattleTarget() end function s.spfilter1(c,e,tp) - return c:IsSetCard(0x12b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MARINCESS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -50,19 +50,19 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) local tc=c:GetEquipGroup():FilterSelect(tp,s.spfilter1,1,1,nil,e,tp):GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then local fid=c:GetFieldID() - tc:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id+1,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -79,7 +79,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.eqval(ec,c,tp) - return ec:IsSetCard(0x12b) + return ec:IsSetCard(SET_MARINCESS) end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() @@ -97,7 +97,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(c) tc:RegisterEffect(e1) @@ -113,7 +113,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0x12b) and c:IsLinkBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MARINCESS) and c:IsLinkBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 diff --git a/official/c94212438.lua b/official/c94212438.lua index 403bb1d9b4..10c42a8ae9 100644 --- a/official/c94212438.lua +++ b/official/c94212438.lua @@ -43,9 +43,9 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0x1c} +s.listed_series={SET_SPIRIT_MESSAGE} function s.plcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and e:GetHandler():GetFlagEffect(id)<4 + return Duel.IsTurnPlayer(1-tp) and e:GetHandler():GetFlagEffect(id)<4 end function s.plfilter(c,code) return c:IsCode(code) and not c:IsForbidden() @@ -57,9 +57,9 @@ function s.plop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end local passcode=CARDS_SPIRIT_MESSAGE[c:GetFlagEffect(id)+1] Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,passcode) + local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,passcode) if #g>0 and Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.extraop(e,tp,eg,ep,ev,re,r,rp) @@ -67,9 +67,9 @@ function s.extraop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end local cid=CARDS_SPIRIT_MESSAGE[c:GetFlagEffect(id)+1] Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,cid) + local g=Duel.SelectMatchingCard(tp,s.plfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,cid) local tc=g:GetFirst() - if tc and Duel.IsPlayerCanSpecialSummonMonster(tp,cid,0,0x11,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp,181) + if tc and Duel.IsPlayerCanSpecialSummonMonster(tp,cid,0,TYPE_MONSTER|TYPE_NORMAL,0,0,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,tp,181) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)<1 or Duel.SelectYesNo(tp,aux.Stringid(CARD_DARK_SANCTUARY,0))) then tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_DARK,RACE_FIEND,1,0,0) @@ -82,20 +82,20 @@ function s.extraop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+0x47c0000) + e1:SetReset(RESET_EVENT|RESET_TODECK|RESET_TOHAND|RESET_TOGRAVE|RESET_REMOVE) tc:RegisterEffect(e1) --cannot be target local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_IGNORE_BATTLE_TARGET) e2:SetValue(1) - e2:SetReset(RESET_EVENT+0x47c0000) + e2:SetReset(RESET_EVENT|RESET_TODECK|RESET_TOHAND|RESET_TOGRAVE|RESET_REMOVE) tc:RegisterEffect(e2) Duel.SpecialSummonComplete() - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) elseif tc and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.efilter(e,te) @@ -103,10 +103,10 @@ function s.efilter(e,te) return not tc:IsCode(id) end function s.cfilter1(c,tp) - return c:IsControler(tp) and (c:IsCode(id) or c:IsSetCard(0x1c)) + return c:IsControler(tp) and (c:IsCode(id) or c:IsSetCard(SET_SPIRIT_MESSAGE)) end function s.cfilter2(c) - return c:IsFaceup() and (c:IsCode(id) or c:IsSetCard(0x1c)) + return c:IsFaceup() and (c:IsCode(id) or c:IsSetCard(SET_SPIRIT_MESSAGE)) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter1,1,nil,tp) @@ -123,4 +123,4 @@ function s.winop(e,tp,eg,ep,ev,re,r,rp) if g:GetClassCount(Card.GetCode)==4 then Duel.Win(tp,WIN_REASON_DESTINY_BOARD) end -end +end \ No newline at end of file diff --git a/official/c94215860.lua b/official/c94215860.lua index b57f52cd69..c3141471a1 100644 --- a/official/c94215860.lua +++ b/official/c94215860.lua @@ -38,4 +38,4 @@ function s.sretop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94220427.lua b/official/c94220427.lua index ea04c20067..6464ab55a1 100644 --- a/official/c94220427.lua +++ b/official/c94220427.lua @@ -1,8 +1,10 @@ --RUM-アージェント・カオス・フォース +--Rank-Up-Magic Argent Chaos Force local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -12,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) --salvage local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,0)) + e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) @@ -23,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x1048,0x1073} +s.listed_series={SET_NUMBER_C,SET_CXYZ} function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) @@ -32,7 +34,7 @@ function s.filter1(c,e,tp) end function s.filter2(c,e,tp,mc,rk,pg) if c.rum_limit and not c.rum_limit(mc,e) then return false end - return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) and mc:IsCanBeXyzMaterial(c,tp) + return mc:IsType(TYPE_XYZ,c,SUMMON_TYPE_XYZ,tp) and c:IsRank(rk) and c:IsSetCard({SET_NUMBER_C,SET_CXYZ}) and mc:IsCanBeXyzMaterial(c,tp) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -72,4 +74,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,c) end -end +end \ No newline at end of file diff --git a/official/c94224458.lua b/official/c94224458.lua index a71e610cec..2bafc1531b 100644 --- a/official/c94224458.lua +++ b/official/c94224458.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c94230224.lua b/official/c94230224.lua index 81d7a96874..67ea081d67 100644 --- a/official/c94230224.lua +++ b/official/c94230224.lua @@ -1,4 +1,5 @@ --ニードル・ボール +--Needle Ball local s,id=GetID() function s.initial_effect(c) --flip @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DAMAGE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) @@ -25,4 +22,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94243005.lua b/official/c94243005.lua index 7c6a13e983..62d573fafb 100644 --- a/official/c94243005.lua +++ b/official/c94243005.lua @@ -48,7 +48,7 @@ function s.initial_effect(c) end s.counter_place_list={0x13} function s.ctfilter(c) - return c:IsFaceup() and c:IsMonster() and not c:IsPreviousLocation(0x80+LOCATION_SZONE) and not c:IsType(TYPE_TOKEN) + return c:IsFaceup() and c:IsMonster() and not c:IsPreviousLocation(LOCATION_OVERLAY|LOCATION_SZONE) and not c:IsType(TYPE_TOKEN) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local ct=eg:FilterCount(s.ctfilter,nil) @@ -101,4 +101,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c94253609.lua b/official/c94253609.lua index 886b4406f4..47ac925530 100644 --- a/official/c94253609.lua +++ b/official/c94253609.lua @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) end function s.atktarget(e,c) return c:IsAttribute(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c94253655.lua b/official/c94253655.lua index 2704cfd3ec..67e4622c6d 100644 --- a/official/c94253655.lua +++ b/official/c94253655.lua @@ -1,7 +1,6 @@ --海造賊-豪速のブレンネ号 --Plunder Patrollship Brann --Scripted by pyrQ - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -34,27 +33,26 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) - e3:SetHintTiming(0,TIMING_SSET+TIMING_EQUIP+TIMING_END_PHASE) + e3:SetHintTiming(0,TIMING_SSET|TIMING_EQUIP|TIMING_END_PHASE) e3:SetCondition(s.condition2) c:RegisterEffect(e3) end -s.listed_series={0x13f} - +s.listed_series={SET_PLUNDER_PATROLL} function s.atktg(e,c) return c:IsRace(RACE_FIEND) and c~=e:GetHandler() end function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x13f) + return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_PLUNDER_PATROLL) end function s.condition2(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x13f) + return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_PLUNDER_PATROLL) end function s.cfilter(c) - return c:IsSetCard(0x13f) and c:IsDiscardable() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.tgfilter(c) return c:IsSpellTrap() and c:IsAbleToRemove() @@ -68,7 +66,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0x13f) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_PLUNDER_PATROLL) and c:IsMonster() and c:IsAbleToHand() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() diff --git a/official/c94256039.lua b/official/c94256039.lua index e884cabd6c..e740426653 100644 --- a/official/c94256039.lua +++ b/official/c94256039.lua @@ -44,7 +44,7 @@ s.counter_place_list={COUNTER_SPELL} function s.acop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_PLAYER) local c=e:GetHandler() - if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and c:GetFlagEffect(1)>0 then + if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsSpellEffect() and c:GetFlagEffect(1)>0 then c:AddCounter(COUNTER_SPELL,1) if c:GetCounter(COUNTER_SPELL)==4 then Duel.RaiseSingleEvent(c,EVENT_CUSTOM+id,re,0,0,p,0) @@ -72,4 +72,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94259633.lua b/official/c94259633.lua index 733956f72e..2a77fbebda 100644 --- a/official/c94259633.lua +++ b/official/c94259633.lua @@ -51,7 +51,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) end function s.equipop(c,e,tp,tc) - c:EquipByEffectAndLimitRegister(e,tp,tc,id) + c:EquipByEffectAndLimitRegister(e,tp,tc,id) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -75,4 +75,4 @@ function s.atkval(e,c) else return atk end -end +end \ No newline at end of file diff --git a/official/c94283662.lua b/official/c94283662.lua index 5f1e915398..ec86a2def7 100644 --- a/official/c94283662.lua +++ b/official/c94283662.lua @@ -1,4 +1,5 @@ --トランス・デーモン +--Trance Archfiend local s,id=GetID() function s.initial_effect(c) --atk up @@ -32,13 +33,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local ct=Duel.DiscardHand(tp,s.dfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil) + local ct=Duel.DiscardHand(tp,s.dfilter,1,1,REASON_EFFECT|REASON_DISCARD,nil) if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) e1:SetValue(500) c:RegisterEffect(e1) end @@ -63,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94303232.lua b/official/c94303232.lua index 142ea02745..159a633a81 100644 --- a/official/c94303232.lua +++ b/official/c94303232.lua @@ -120,4 +120,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94317736.lua b/official/c94317736.lua index b1ea3f6f0e..9c1fd9a151 100644 --- a/official/c94317736.lua +++ b/official/c94317736.lua @@ -1,5 +1,5 @@ --極東秘泉郷 ---Secret Hot Springs of the Far East +--Hidden Springs of the Far East --Scripted by The Razgriz local s,id=GetID() function s.initial_effect(c) @@ -22,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.reccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN2 + return Duel.IsPhase(PHASE_MAIN2) end function s.recop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -34,7 +34,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON) e1:SetRange(LOCATION_FZONE) e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,p) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) @@ -45,7 +45,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) e3:SetCode(EFFECT_CANNOT_INACTIVATE) e3:SetRange(LOCATION_FZONE) e3:SetValue(s.efilter) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e3,p) --Set Spell/Traps cannot be destroyed or targeted local e4=Effect.CreateEffect(c) @@ -55,7 +55,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) e4:SetRange(LOCATION_FZONE) e4:SetTargetRange(LOCATION_SZONE,0) e4:SetTarget(aux.TargetBoolFunction(Card.IsPosition,POS_FACEDOWN)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetValue(s.tgvalue) Duel.RegisterEffect(e4,p) local e5=e4:Clone() diff --git a/official/c94331452.lua b/official/c94331452.lua index afdfc5183f..efd4d8bebc 100644 --- a/official/c94331452.lua +++ b/official/c94331452.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target(0)) e2:SetOperation(s.operation) c:RegisterEffect(e2) diff --git a/official/c9433350.lua b/official/c9433350.lua index 08580732f5..da45798b23 100644 --- a/official/c9433350.lua +++ b/official/c9433350.lua @@ -1,4 +1,5 @@ --Sin 青眼の白龍 +--Malefic Blue-Eyes White Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -27,4 +28,4 @@ function s.descon(e) end function s.antarget(e,c) return c~=e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c94344242.lua b/official/c94344242.lua index b4f4fb848c..a351192a58 100644 --- a/official/c94344242.lua +++ b/official/c94344242.lua @@ -1,4 +1,5 @@ --電子光虫-ウェブソルダー +--Digital Bug Websolder local s,id=GetID() function s.initial_effect(c) --xyzlimit @@ -70,19 +71,19 @@ function s.efop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.defcon) e1:SetOperation(s.defop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1,true) if not rc:IsType(TYPE_EFFECT) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ADD_TYPE) e2:SetValue(TYPE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e2,true) end end function s.defcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.defop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) @@ -93,7 +94,7 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c94350039.lua b/official/c94350039.lua index 2c2fe5462b..2c3d08d7ea 100644 --- a/official/c94350039.lua +++ b/official/c94350039.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x27} +s.listed_series={SET_TG} function s.spfilter(c) - return c:IsFaceup() and c:IsSetCard(0x27) + return c:IsFaceup() and c:IsSetCard(SET_TG) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(-1000) tc:RegisterEffect(e1) end diff --git a/official/c94365540.lua b/official/c94365540.lua index 20c16d22cf..5687eb17b6 100644 --- a/official/c94365540.lua +++ b/official/c94365540.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetRange(LOCATION_MZONE) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.filter(c) return c:IsFacedown() end @@ -54,27 +54,22 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp,zone) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_TINDANGLE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK|POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end end -end - +end \ No newline at end of file diff --git a/official/c94374859.lua b/official/c94374859.lua index 8272a21516..3d935fbf1e 100644 --- a/official/c94374859.lua +++ b/official/c94374859.lua @@ -1,4 +1,5 @@ --押し売りゾンビ +--Hard-sellin' Zombie local s,id=GetID() function s.initial_effect(c) --activate @@ -20,7 +21,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return ep~=tp and eg:GetFirst():GetControler()==tp + return ep~=tp and eg:GetFirst():IsControler(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end @@ -35,6 +36,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94377247.lua b/official/c94377247.lua index b128c40454..b05302025a 100644 --- a/official/c94377247.lua +++ b/official/c94377247.lua @@ -1,5 +1,6 @@ --仮面魔獣の儀式 +--Curse of the Masked Beast local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,49064413) -end +end \ No newline at end of file diff --git a/official/c94380860.lua b/official/c94380860.lua index 3fb1d8db69..1f87da22d3 100644 --- a/official/c94380860.lua +++ b/official/c94380860.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) @@ -48,4 +48,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94381039.lua b/official/c94381039.lua index b83a950750..9fad6003c9 100644 --- a/official/c94381039.lua +++ b/official/c94381039.lua @@ -1,4 +1,5 @@ --ライトロード・エンジェル ケルビム +--Celestia, Lightsworn Angel local s,id=GetID() function s.initial_effect(c) --summon success @@ -21,17 +22,17 @@ function s.initial_effect(c) e2:SetLabelObject(e1) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.valcheck(e,c) local g=c:GetMaterial() - if g:IsExists(Card.IsSetCard,1,nil,0x38) then + if g:IsExists(Card.IsSetCard,1,nil,SET_LIGHTSWORN) then e:GetLabelObject():SetLabel(1) else e:GetLabelObject():SetLabel(0) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and e:GetLabel()==1 + return e:GetHandler():IsTributeSummoned() and e:GetLabel()==1 end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,4) end @@ -50,4 +51,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94388754.lua b/official/c94388754.lua index 6f358d5d27..65850d9f43 100644 --- a/official/c94388754.lua +++ b/official/c94388754.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xe6} +s.listed_series={SET_FLOWER_CARDIAN} s.listed_names={id} function s.hspfilter(c,tp) - return c:IsSetCard(0xe6) and not c:IsCode(id) + return c:IsSetCard(SET_FLOWER_CARDIAN) and not c:IsCode(id) end function s.hspcon(e,c) if c==nil then return true end @@ -58,7 +58,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)~=0 then local tc=Duel.GetOperatedGroup():GetFirst() Duel.ConfirmCards(1-tp,tc) - if tc:IsMonster() and tc:IsSetCard(0xe6) then + if tc:IsMonster() and tc:IsSetCard(SET_FLOWER_CARDIAN) then local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.BreakEffect() @@ -71,4 +71,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c94392192.lua b/official/c94392192.lua index 73d4486567..f288315b6e 100644 --- a/official/c94392192.lua +++ b/official/c94392192.lua @@ -79,4 +79,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) end function s.rmeffcon(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsMonsterEffect() -end +end \ No newline at end of file diff --git a/official/c94395649.lua b/official/c94395649.lua index eeb07650c7..8d30a13743 100644 --- a/official/c94395649.lua +++ b/official/c94395649.lua @@ -1,7 +1,6 @@ --超重禽属コカトリウム ---Cockathorium, the Superheavy Shining Soarer +--Cocatorium the Heavy Metal Avian --Scripted by Naim - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand or GY @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) @@ -49,7 +48,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -75,7 +74,7 @@ function s.copyop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(tc:GetCode()) c:RegisterEffect(e1) local e2=e1:Clone() diff --git a/official/c94415058.lua b/official/c94415058.lua index 528b063aa8..f29f3b8632 100644 --- a/official/c94415058.lua +++ b/official/c94415058.lua @@ -1,4 +1,5 @@ --星読みの魔術師 +--Stargazer Magician local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -39,7 +40,7 @@ function s.initial_effect(c) e6:SetOperation(s.spop) c:RegisterEffect(e6) end -s.listed_series={0x98,0x99} +s.listed_series={SET_MAGICIAN,SET_ODD_EYES} function s.actcon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end @@ -52,14 +53,14 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.scfilter(c) - return c:IsSetCard(0x98) or c:IsSetCard(0x99) + return c:IsSetCard({SET_MAGICIAN,SET_ODD_EYES}) end function s.sccon(e) return not Duel.IsExistingMatchingCard(s.scfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler()) @@ -86,4 +87,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94418111.lua b/official/c94418111.lua index fc4bcf7145..8317aec33a 100644 --- a/official/c94418111.lua +++ b/official/c94418111.lua @@ -32,7 +32,7 @@ s.listed_series={SET_MAGICAL_MUSKET} function s.tdcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - if Duel.GetCurrentPhase()&PHASE_DAMAGE+PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + if Duel.GetCurrentPhase()&PHASE_DAMAGE|PHASE_DAMAGE_CAL~=0 or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) return c:IsColumn(seq,p,LOCATION_SZONE) end @@ -51,7 +51,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) diff --git a/official/c94423983.lua b/official/c94423983.lua index 95481d79d5..05673f8ab3 100644 --- a/official/c94423983.lua +++ b/official/c94423983.lua @@ -1,5 +1,5 @@ --同契魔術 ---Simult Archfiends +--Simul Archfiends --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -19,7 +19,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(0,id)==0 end end function s.operation(e,tp,eg,ep,ev,re,r,rp) - Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) local c=e:GetHandler() --Players cannot Special Summon monsters with the same type as they control local e1=Effect.CreateEffect(c) @@ -29,7 +29,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,1) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Increase ATK of monsters local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsType,TYPE_RITUAL_FUSION_SYNCHRO_XYZ_LINK),tp,LOCATION_MZONE,0,nil) @@ -44,7 +44,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end diff --git a/official/c94431029.lua b/official/c94431029.lua index 21a0430aeb..31906fd230 100644 --- a/official/c94431029.lua +++ b/official/c94431029.lua @@ -51,5 +51,4 @@ function s.compare(c1,c2) if c1:IsType(tp) and c2:IsType(tp) then return true end end return false -end - +end \ No newline at end of file diff --git a/official/c94432298.lua b/official/c94432298.lua index e6129b0e5b..8ef4f29fcf 100644 --- a/official/c94432298.lua +++ b/official/c94432298.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetRange(LOCATION_SZONE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetHintTiming(TIMING_STANDBY_PHASE,0) e2:SetCountLimit(1) e2:SetCondition(s.tgcon) @@ -29,12 +29,12 @@ function s.initial_effect(c) e3:SetCondition(s.sdcon) c:RegisterEffect(e3) end -s.listed_series={0xbb} +s.listed_series={SET_INFERNOID} function s.tgcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.filter(c) - return c:IsSetCard(0xbb) and c:IsMonster() and c:IsAbleToGrave() + return c:IsSetCard(SET_INFERNOID) and c:IsMonster() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -49,8 +49,8 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) end end function s.sdfilter(c) - return c:IsFacedown() or not c:IsSetCard(0xbb) + return c:IsFacedown() or not c:IsSetCard(SET_INFERNOID) end function s.sdcon(e) return Duel.IsExistingMatchingCard(s.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c94445733.lua b/official/c94445733.lua index 503816a4e7..dff7a2276b 100644 --- a/official/c94445733.lua +++ b/official/c94445733.lua @@ -1,18 +1,18 @@ --- 破壊の神碑 --- Mysterune of Destruction --- Scripted by Hatter +--破壊の神碑 +--Runick Destruction +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e1=Effect.CreateMysteruneQPEffect(c,id,CATEGORY_DESTROY,s.destg,s.desop,4,EFFECT_FLAG_CARD_TARGET) c:RegisterEffect(e1) end -s.listed_series={0x180} +s.listed_series={SET_RUNICK} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c94446564.lua b/official/c94446564.lua index d6cf6f06ba..b81cd7919a 100644 --- a/official/c94446564.lua +++ b/official/c94446564.lua @@ -29,7 +29,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc1=g1:GetFirst() local g2=Duel.GetDecktopGroup(1-tp,1) local tc2=g2:GetFirst() - if (tc1:GetType()&0x7)==(tc2:GetType()&0x7) then + if (tc1:GetMainCardType()==tc2:GetMainCardType()) then Duel.DisableShuffleCheck() Duel.SendtoHand(tc1,nil,REASON_EFFECT) Duel.SendtoHand(tc2,nil,REASON_EFFECT) @@ -40,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(tc1,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94454495.lua b/official/c94454495.lua index 1768db660f..d8c3e7e2d3 100644 --- a/official/c94454495.lua +++ b/official/c94454495.lua @@ -1,4 +1,5 @@ --Kozmo-スリップライダー +--Kozmo Sliprider local s,id=GetID() function s.initial_effect(c) --destroy @@ -27,12 +28,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xd2} +s.listed_series={SET_KOZMO} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -43,14 +44,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsLocation(LOCATION_GRAVE) and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xd2) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KOZMO) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -64,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94463200.lua b/official/c94463200.lua index 73d18e1e21..31f54677d0 100644 --- a/official/c94463200.lua +++ b/official/c94463200.lua @@ -1,7 +1,8 @@ --血の刻印 +--Battle-Scarred local s,id=GetID() function s.initial_effect(c) - aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,0x45),nil,nil,TIMING_STANDBY_PHASE) + aux.AddPersistentProcedure(c,0,aux.FaceupFilter(Card.IsSetCard,SET_ARCHFIEND),nil,nil,TIMING_STANDBY_PHASE) --lpcost local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) @@ -24,9 +25,9 @@ function s.initial_effect(c) e4:SetOperation(s.desop2) c:RegisterEffect(e4) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.lpcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_STANDBY and ep==tp + return Duel.IsPhase(PHASE_STANDBY) and ep==tp and re:GetHandler()==e:GetHandler():GetFirstCardTarget() end function s.lpop(e,tp,eg,ep,ev,re,r,rp) @@ -46,4 +47,4 @@ function s.desop2(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsLocation(LOCATION_MZONE) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94484482.lua b/official/c94484482.lua index cf2b574c17..9a768f9933 100644 --- a/official/c94484482.lua +++ b/official/c94484482.lua @@ -1,4 +1,5 @@ --スリップ・サモン +--Slip Summon local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,7 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=g:GetFirst() if tc and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -61,4 +62,4 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp) end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94515289.lua b/official/c94515289.lua index e112913bba..271b279ad5 100644 --- a/official/c94515289.lua +++ b/official/c94515289.lua @@ -1,4 +1,5 @@ --氷結のフィッツジェラルド +--Frozen Fitzgerald local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -38,7 +39,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -49,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=0 and e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c9453320.lua b/official/c9453320.lua index 9156784ada..15140b76ac 100644 --- a/official/c9453320.lua +++ b/official/c9453320.lua @@ -36,7 +36,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,{id,1}) - e4:SetCost(aux.dxmcostgen(1,1,nil)) + e4:SetCost(Cost.Detach(1,1,nil)) e4:SetTarget(s.settg) e4:SetOperation(s.setop) c:RegisterEffect(e4,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c94535485.lua b/official/c94535485.lua index bf326e120e..bec5b713c7 100644 --- a/official/c94535485.lua +++ b/official/c94535485.lua @@ -1,4 +1,5 @@ --手をつなぐ魔人 +--Hand-Holding Genie local s,id=GetID() function s.initial_effect(c) --atk limit @@ -27,4 +28,4 @@ end function s.defval(e,c) local g=Duel.GetMatchingGroup(s.deffilter,c:GetControler(),LOCATION_MZONE,0,c) return g:GetSum(Card.GetBaseDefense) -end +end \ No newline at end of file diff --git a/official/c94538053.lua b/official/c94538053.lua index f4956f83bb..2e19684566 100644 --- a/official/c94538053.lua +++ b/official/c94538053.lua @@ -1,4 +1,5 @@ --マックス・ウォリアー +--Max Warrior local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -35,7 +36,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(c:GetBaseAttack()/2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) @@ -46,4 +47,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e3:SetValue(2) c:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c94553671.lua b/official/c94553671.lua index 7f4cf72deb..e1c5f4ecc9 100644 --- a/official/c94553671.lua +++ b/official/c94553671.lua @@ -32,24 +32,24 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCountLimit(1,{id,1}) e3:SetCondition(aux.exccon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg2) e3:SetOperation(s.thop2) c:RegisterEffect(e3) end -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.tdfilter(c) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) end function s.thfilter(c) - return c:IsSetCard(0x128) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end @@ -67,7 +67,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter2(c) - return c:IsSetCard(0x128) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpell() and c:IsFaceup() and c:IsAbleToHand() end function s.thcheck(sg) return sg:GetClassCount(Card.GetCode)==#sg @@ -85,4 +85,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94561645.lua b/official/c94561645.lua index 6e3333aa04..3e418be044 100644 --- a/official/c94561645.lua +++ b/official/c94561645.lua @@ -1,4 +1,5 @@ --カウンター・ゲート +--Counter Gate local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,4 +27,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Summon(tp,tc,true,nil) end end -end +end \ No newline at end of file diff --git a/official/c94566432.lua b/official/c94566432.lua index 3916fb6f1c..00ca58fc19 100644 --- a/official/c94566432.lua +++ b/official/c94566432.lua @@ -1,7 +1,8 @@ --カイザー・ドラゴン +--Kaiser Dragon local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,87796900,20315854) -end +end \ No newline at end of file diff --git a/official/c94568601.lua b/official/c94568601.lua index 86c6e4389b..9c539954d3 100644 --- a/official/c94568601.lua +++ b/official/c94568601.lua @@ -1,5 +1,5 @@ --タイラント・ドラゴン ---not fully implemented +--Tyrant Dragon --Tyrant Dragon local s,id=GetID() function s.initial_effect(c) @@ -49,7 +49,7 @@ function s.distg(e,c) return c:GetCardTarget():IsContains(e:GetHandler()) end function s.disop(e,tp,eg,ep,ev,re,r,rp) - if not re:IsActiveType(TYPE_TRAP) then return end + if not re:IsTrapEffect() then return end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or #g==0 then return end @@ -68,4 +68,4 @@ end function s.spcop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectReleaseGroupCost(tp,Card.IsRace,1,1,false,nil,nil,RACE_DRAGON) Duel.Release(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94573223.lua b/official/c94573223.lua index 4147ebf44a..b9b8d6e1f3 100644 --- a/official/c94573223.lua +++ b/official/c94573223.lua @@ -1,4 +1,5 @@ --甲虫装機 ギガマンティス +--Inzektor Giga-Mantis local s,id=GetID() function s.initial_effect(c) --equip @@ -30,9 +31,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x56) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -53,7 +54,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -66,7 +67,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x56) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_INZEKTOR) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -81,4 +82,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94585852.lua b/official/c94585852.lua index f8492f972e..29bde6fe8a 100644 --- a/official/c94585852.lua +++ b/official/c94585852.lua @@ -35,9 +35,9 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x45} +s.listed_series={SET_ARCHFIEND} function s.regfilter(c) - return c:IsReason(REASON_DESTROY) and not c:IsReason(REASON_BATTLE) and c:IsSetCard(0x45) and c:HasLevel() + return c:IsReason(REASON_DESTROY) and not c:IsReason(REASON_BATTLE) and c:IsSetCard(SET_ARCHFIEND) and c:HasLevel() and (c:IsPreviousLocation(LOCATION_MZONE) or (not c:IsPreviousLocation(LOCATION_MZONE) and c:IsMonster())) end function s.regop(e,tp,eg,ep,ev,re,r,rp) @@ -61,10 +61,10 @@ end function s.lrcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() - return Duel.GetCurrentPhase()==PHASE_STANDBY and rc:IsSetCard(0x45) and rc:IsMonster() + return Duel.IsPhase(PHASE_STANDBY) and rc:IsSetCard(SET_ARCHFIEND) and rc:IsMonster() end function s.filter(c,lv) - return c:GetLevel()0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) @@ -94,5 +94,4 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RemoveCounter(ep,COUNTER_SPELL,1,REASON_EFFECT) -end - +end \ No newline at end of file diff --git a/official/c94622638.lua b/official/c94622638.lua index 126faa34f8..3b490aa5dc 100644 --- a/official/c94622638.lua +++ b/official/c94622638.lua @@ -1,4 +1,5 @@ --A・ジェネクス・パワーコール +--Genex Ally Powercell local s,id=GetID() function s.initial_effect(c) --atkup @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.atktg(e,c) return c~=e:GetHandler() and e:GetHandler():IsAttribute(c:GetAttribute()) -end +end \ No newline at end of file diff --git a/official/c94626050.lua b/official/c94626050.lua index 7555f07dfe..f13254713b 100644 --- a/official/c94626050.lua +++ b/official/c94626050.lua @@ -1,4 +1,5 @@ --フィッシュ・レイン +--Fish Rain local s,id=GetID() function s.initial_effect(c) --spsummon @@ -13,13 +14,13 @@ function s.initial_effect(c) end function s.cfilter(c) return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) - and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) + and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(3) and c:IsRace(RACE_FISH+RACE_SEASERPENT+RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(3) and c:IsRace(RACE_FISH|RACE_SEASERPENT|RACE_AQUA) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94626871.lua b/official/c94626871.lua index 58ce181504..2483601450 100644 --- a/official/c94626871.lua +++ b/official/c94626871.lua @@ -1,9 +1,9 @@ --トリックスター・スイートデビル ---Trickstar Sweet Devil +--Trickstar Black Catbat local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfb),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_TRICKSTAR),2,2) --damage local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DAMAGE) @@ -23,11 +23,11 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.cfilter(c,tp,zone) local seq=c:GetPreviousSequence() if not c:IsPreviousControler(tp) then seq=seq+16 end - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and bit.extract(zone,seq)~=0 end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -39,7 +39,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp and r&REASON_BATTLE==0 and re - and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0xfb) + and re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_TRICKSTAR) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -52,7 +52,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-ct*200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c94634433.lua b/official/c94634433.lua index 5695ecbf24..11ef354166 100644 --- a/official/c94634433.lua +++ b/official/c94634433.lua @@ -1,4 +1,5 @@ --緊急同調 +--Urgent Tuning local s,id=GetID() function s.initial_effect(c) --synchro effect @@ -6,14 +7,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e1:SetCondition(s.sccon) e1:SetTarget(s.sctg) e1:SetOperation(s.scop) c:RegisterEffect(e1) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsBattlePhase() end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end @@ -26,4 +27,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),nil) end -end +end \ No newline at end of file diff --git a/official/c9464441.lua b/official/c9464441.lua index 3e3da373a6..0db2fec8f6 100644 --- a/official/c9464441.lua +++ b/official/c9464441.lua @@ -54,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp - and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) + and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WATER) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -68,4 +68,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94656263.lua b/official/c94656263.lua index 8b3ac6f496..53c2369adc 100644 --- a/official/c94656263.lua +++ b/official/c94656263.lua @@ -1,4 +1,5 @@ --カゲトカゲ +--Kagetokage local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -36,4 +37,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then c:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c94661166.lua b/official/c94661166.lua index bb5200a7c5..49411dadae 100644 --- a/official/c94661166.lua +++ b/official/c94661166.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(s.poscon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.postg) e2:SetOperation(s.posop) c:RegisterEffect(e2) diff --git a/official/c94662235.lua b/official/c94662235.lua index 32971cc53e..88b1b0c381 100644 --- a/official/c94662235.lua +++ b/official/c94662235.lua @@ -21,11 +21,11 @@ function s.initial_effect(c) e2:SetOperation(s.activate2) c:RegisterEffect(e2) end -s.listed_series={0x31} +s.listed_series={SET_FORTUNE_LADY} function s.check(tp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local count=#g - return count>0 and g:FilterCount(Card.IsSetCard,nil,0x31)==count + return count>0 and g:FilterCount(Card.IsSetCard,nil,SET_FORTUNE_LADY)==count end function s.condition1(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain(true)==0 and s.check(tp) @@ -44,7 +44,7 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetOperation(s.retop) ec:RegisterEffect(e1) end @@ -67,11 +67,11 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetOperation(s.retop) ec:RegisterEffect(e1) end end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94664694.lua b/official/c94664694.lua index e048267b3c..db62339e35 100644 --- a/official/c94664694.lua +++ b/official/c94664694.lua @@ -1,4 +1,5 @@ --マッド・デーモン +--Mad Archfiend local s,id=GetID() function s.initial_effect(c) --pierce @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsPosition(POS_FACEUP_ATTACK) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c94666032.lua b/official/c94666032.lua index 58c71a43ed..ddf5d68826 100644 --- a/official/c94666032.lua +++ b/official/c94666032.lua @@ -14,14 +14,14 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0x106} +s.listed_series={SET_VENDREAD} s.fit_monster={4388680} --should be removed in hardcode overhaul s.listed_names={4388680} function s.ritualfil(c) - return c:IsSetCard(0x106) and c:IsRitualMonster() + return c:IsSetCard(SET_VENDREAD) and c:IsRitualMonster() end function s.mfilter(c) - return not Duel.IsPlayerAffectedByEffect(c:GetControler(),69832741) and c:HasLevel() and c:IsRace(RACE_ZOMBIE) + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),CARD_SPIRIT_ELIMINATION) and c:HasLevel() and c:IsRace(RACE_ZOMBIE) and c:IsMonster() and c:IsAbleToRemove() end function s.extrafil(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,7 +33,7 @@ function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsCode(4388680) - and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end diff --git a/official/c94667532.lua b/official/c94667532.lua index 5b0f78450d..4a9f3d6de3 100644 --- a/official/c94667532.lua +++ b/official/c94667532.lua @@ -1,4 +1,5 @@ --機械犬マロン +--Mecha-Dog Marron local s,id=GetID() function s.initial_effect(c) --damage @@ -34,4 +35,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) else Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94670654.lua b/official/c94670654.lua index 27acbf09d1..f5a6048397 100644 --- a/official/c94670654.lua +++ b/official/c94670654.lua @@ -1,9 +1,9 @@ --獣の忍者-獏 ---Beast Ninja Baku +--Baku the Beast Ninja --scripted by Naim local s,id=GetID() function s.initial_effect(c) - --Special Summon itself if added to the hand + --Special Summon this card local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -15,7 +15,7 @@ function s.initial_effect(c) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - --Return 1 "Ninja" or "Ninjitsu" card to the hand + --Return to the hand 1 "Ninja" or "Ninjitsu Art" card from your GY or face-up Spell & Trap Zone, except "Baku the Beast Ninja" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) @@ -30,28 +30,28 @@ function s.initial_effect(c) e3:SetCode(EVENT_FLIP) c:RegisterEffect(e3) end -s.listed_series={0x2b,0x61} +s.listed_series={SET_NINJA,SET_NINJITSU_ART} s.listed_names={id} function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if not c:IsRelateToEffect(e) then return end - Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end end function s.thfilter(c) - return (c:IsSetCard(0x2b) or c:IsSetCard(0x61)) and c:IsFaceup() and not c:IsCode(id) and c:IsAbleToHand() - and (c:IsLocation(LOCATION_GRAVE) or c:GetSequence()<5) + return c:IsSetCard({SET_NINJA,SET_NINJITSU_ART}) and c:IsFaceup() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsLocation(LOCATION_SZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end - if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,nil) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_STZONE) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE|LOCATION_STZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) - local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE|LOCATION_STZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -59,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end diff --git a/official/c94677445.lua b/official/c94677445.lua index 2ce4d36f0a..bf127b5fd4 100644 --- a/official/c94677445.lua +++ b/official/c94677445.lua @@ -1,5 +1,5 @@ --星杯の神子イヴ ---Ib the World Chalice Miko +--Ib the World Chalice Justiciar --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -32,15 +32,15 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xfe,0xfd} +s.listed_series={SET_WORLD_LEGACY,SET_WORLD_CHALICE} function s.matfilter(c,scard,sumtype,tp) - return c:IsType(TYPE_NORMAL,scard,sumtype,tp) and c:IsSetCard(0xfd,scard,sumtype,tp) + return c:IsType(TYPE_NORMAL,scard,sumtype,tp) and c:IsSetCard(SET_WORLD_CHALICE,scard,sumtype,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) + return e:GetHandler():IsSynchroSummoned() end function s.thfilter(c) - return c:IsSetCard(0xfe) and c:IsAbleToHand() + return c:IsSetCard(SET_WORLD_LEGACY) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -56,21 +56,21 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSynchroSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0xfd) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WORLD_CHALICE) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94681654.lua b/official/c94681654.lua index c1809fc09c..61f881efb0 100644 --- a/official/c94681654.lua +++ b/official/c94681654.lua @@ -1,4 +1,5 @@ --フェザー・ウィンド・アタック +--Raptor Wing Strike local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x33} +s.listed_series={SET_BLACKWING} function s.costfilter(c) - return c:IsFaceup() and c:IsSetCard(0x33) and c:IsAbleToDeckAsCost() + return c:IsFaceup() and c:IsSetCard(SET_BLACKWING) and c:IsAbleToDeckAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -22,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x33) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_BLACKWING) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c94689206.lua b/official/c94689206.lua index 0061381f67..105b27cda5 100644 --- a/official/c94689206.lua +++ b/official/c94689206.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetTarget(s.sptg) e2:SetCondition(s.spcon) e2:SetOperation(s.spop) @@ -47,11 +47,11 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_HAND,0,e:GetHandler()) - return aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_MZONE|LOCATION_HAND,0,e:GetHandler()) + return aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_HAND,0,e:GetHandler()) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_MZONE|LOCATION_HAND,0,e:GetHandler()) local rg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true) if #rg>0 then rg:KeepAlive() @@ -88,4 +88,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c94689635.lua b/official/c94689635.lua index c730951b0e..c0a84fda46 100644 --- a/official/c94689635.lua +++ b/official/c94689635.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) aux.DoubleSnareValidity(c,LOCATION_MZONE) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - return ep==1-tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return ep==1-tp and re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.costfilter(c) @@ -44,4 +44,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94693857.lua b/official/c94693857.lua index 7dbf19e485..61f9f1a916 100644 --- a/official/c94693857.lua +++ b/official/c94693857.lua @@ -1,4 +1,5 @@ --ブンボーグ001 +--Deskbot 001 local s,id=GetID() function s.initial_effect(c) --atk/def @@ -41,4 +42,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94716515.lua b/official/c94716515.lua index 9223fb1245..d59957a15e 100644 --- a/official/c94716515.lua +++ b/official/c94716515.lua @@ -1,4 +1,5 @@ --トゲトゲ神の殺虫剤 +--Eradicating Aerosol local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(sg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94730900.lua b/official/c94730900.lua index d0536b051f..0420823889 100644 --- a/official/c94730900.lua +++ b/official/c94730900.lua @@ -32,14 +32,14 @@ function s.initial_effect(c) e3:SetValue(1) c:RegisterEffect(e3) end -s.listed_series={0x207a} +s.listed_series={SET_NOBLE_ARMS} function s.cfilter(c) - return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(0x207a)) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeckAsCost() + return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(SET_NOBLE_ARMS)) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeckAsCost() end function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,3,3,e:GetHandler()) Duel.SendtoDeck(g,nil,3,REASON_COST) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -73,7 +73,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -81,4 +81,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c94739788.lua b/official/c94739788.lua index 7bc28bfe62..06ae57c490 100644 --- a/official/c94739788.lua +++ b/official/c94739788.lua @@ -1,4 +1,5 @@ --洗脳解除 +--Remove Brainwashing local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_BRAINWASHING_CHECK) @@ -15,4 +16,4 @@ function s.initial_effect(c) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c94749594.lua b/official/c94749594.lua index b9db020c47..f97c6bab52 100644 --- a/official/c94749594.lua +++ b/official/c94749594.lua @@ -1,4 +1,4 @@ ---Japanese name +--古代亀の呪い --Curse of the Ancient Turtle --scripted by Naim local s,id=GetID() @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c94766498.lua b/official/c94766498.lua index 2e9857f32d..399e2e6761 100644 --- a/official/c94766498.lua +++ b/official/c94766498.lua @@ -13,12 +13,12 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) end -s.listed_series={0x70} +s.listed_series={SET_CHRONOMALY} function s.chainfilter(re,tp,cid) - return not (re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x70)) + return not (re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(SET_CHRONOMALY)) end function s.hspcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c94770493.lua b/official/c94770493.lua index 057646cb12..a584d0e2da 100644 --- a/official/c94770493.lua +++ b/official/c94770493.lua @@ -21,13 +21,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) --Can make another attack local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(tc:GetAttackAnnouncedCount()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Double its ATK local e2=Effect.CreateEffect(c) @@ -35,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EVENT_BATTLE_START) e2:SetCountLimit(1) e2:SetOperation(s.atkop) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -47,6 +47,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetRange(LOCATION_MZONE) e1:SetValue(e:GetHandler():GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) e:GetHandler():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c94772232.lua b/official/c94772232.lua index f6f09998cf..7e6d3d34a3 100644 --- a/official/c94772232.lua +++ b/official/c94772232.lua @@ -1,4 +1,5 @@ --死のメッセージ「T」 +--Spirit Message "A" local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) diff --git a/official/c94784213.lua b/official/c94784213.lua index 63073f2e1f..3f3017cd39 100644 --- a/official/c94784213.lua +++ b/official/c94784213.lua @@ -1,4 +1,5 @@ --マジェスペクター・フォックス +--Majespecter Fox - Kyubi local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -33,9 +34,9 @@ function s.initial_effect(c) e5:SetValue(s.indval) c:RegisterEffect(e5) end -s.listed_series={0xd0} +s.listed_series={SET_MAJESPECTER} function s.thfilter(c) - return c:IsSetCard(0xd0) and c:IsTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MAJESPECTER) and c:IsTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -51,4 +52,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c94793422.lua b/official/c94793422.lua index 9c0a1203b5..da616a68a9 100644 --- a/official/c94793422.lua +++ b/official/c94793422.lua @@ -9,4 +9,4 @@ function s.initial_effect(c) e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e1:SetValue(aux.ChangeBattleDamage(1,1000)) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c94798725.lua b/official/c94798725.lua index 5c616ad426..5789ddd603 100644 --- a/official/c94798725.lua +++ b/official/c94798725.lua @@ -64,7 +64,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end end function s.regcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()>0 + return e:GetHandler():IsXyzSummoned() and e:GetLabel()>0 end function s.regtg(e,tp,eg,ep,ev,re,r,rp,chk) local effs=e:GetLabel() diff --git a/official/c94801854.lua b/official/c94801854.lua index fefc58faa2..eb48305fb2 100644 --- a/official/c94801854.lua +++ b/official/c94801854.lua @@ -1,4 +1,5 @@ --不知火の隠者 +--Shiranui Solitaire local s,id=GetID() function s.initial_effect(c) --special summon @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} s.listed_names={40005099} function s.spcfilter(c,ft,tp) return c:IsRace(RACE_ZOMBIE) @@ -52,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter2(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xd9) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_SHIRANUI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.spfilter2(chkc,e,tp) end @@ -73,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) g=g:Select(tp,ft,ft,nil) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c94804055.lua b/official/c94804055.lua index 7edc79d706..9ccd1d130b 100644 --- a/official/c94804055.lua +++ b/official/c94804055.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1) e3:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c94807487.lua b/official/c94807487.lua index a05702d442..82466b3e1c 100644 --- a/official/c94807487.lua +++ b/official/c94807487.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableCounterPermit(0x31) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x107f)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_UTOPIA)) --Untargetable local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) @@ -35,7 +35,7 @@ function s.initial_effect(c) e6:SetOperation(s.rop) c:RegisterEffect(e6) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} s.counter_place_list={0x31} function s.regop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x31,1) @@ -49,4 +49,4 @@ function s.rcon(e,tp,eg,ep,ev,re,r,rp) end function s.rop(e,tp,eg,ep,ev,re,r,rp) return Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end +end \ No newline at end of file diff --git a/official/c94820406.lua b/official/c94820406.lua index 875f330e36..ad36048adc 100644 --- a/official/c94820406.lua +++ b/official/c94820406.lua @@ -1,6 +1,5 @@ --ダーク・フュージョン --Dark Fusion - local s,id=GetID() function s.initial_effect(c) --Fusion summon 1 fiend fusion monster @@ -15,7 +14,7 @@ function s.stage2(e,tc,tp,sg,chk) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(aux.tgoval) tc:RegisterEffect(e1) end diff --git a/official/c94821366.lua b/official/c94821366.lua index 2e809de525..27ea34c333 100644 --- a/official/c94821366.lua +++ b/official/c94821366.lua @@ -1,5 +1,5 @@ --驚楽園の支配人 <Ɐrlechino> ---Amazement Administrator - Arlechino +--Amazement Administrator Arlekino --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) diff --git a/official/c9482987.lua b/official/c9482987.lua index 234bd66b11..80351477d2 100644 --- a/official/c9482987.lua +++ b/official/c9482987.lua @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.eqtgfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x152) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_EXTRA,0,1,nil,0x152) + return c:IsFaceup() and c:IsSetCard(SET_MAGISTUS) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_EXTRA,0,1,nil,SET_MAGISTUS) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() @@ -43,13 +43,13 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then return end - local ec=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_EXTRA,0,1,1,nil,0x152):GetFirst() + local ec=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_EXTRA,0,1,1,nil,SET_MAGISTUS):GetFirst() if ec then Duel.Equip(tp,ec,tc,true) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) ec:RegisterEffect(e1) diff --git a/official/c94845226.lua b/official/c94845226.lua index 87b156e28c..a628a863f2 100644 --- a/official/c94845226.lua +++ b/official/c94845226.lua @@ -1,5 +1,5 @@ --魔轟神獣ルビィラーダ ---The Fabled Rudyruda +--The Fabled Rubyruda local s,id=GetID() function s.initial_effect(c) --Negate attack @@ -11,14 +11,14 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.cfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:IsDiscardable() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c94853057.lua b/official/c94853057.lua index 3faa4b52ec..47f6cfb46e 100644 --- a/official/c94853057.lua +++ b/official/c94853057.lua @@ -1,4 +1,5 @@ --閃光の追放者 +--Banisher of the Radiance local s,id=GetID() function s.initial_effect(c) --remove diff --git a/official/c9485511.lua b/official/c9485511.lua index 19ebcfe4fb..1c2dc0987c 100644 --- a/official/c9485511.lua +++ b/official/c9485511.lua @@ -26,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.indop) c:RegisterEffect(e2) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -59,10 +59,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xb2) + return c:IsFaceup() and c:IsSetCard(SET_UA) end function s.indcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -79,10 +79,10 @@ function s.indop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) e1:SetValue(s.valcon) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 -end +end \ No newline at end of file diff --git a/official/c94861297.lua b/official/c94861297.lua index 58f5ce0d00..fe307e51cb 100644 --- a/official/c94861297.lua +++ b/official/c94861297.lua @@ -1,4 +1,5 @@ --検問 +--The Forceful Checkpoint local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end @@ -26,8 +27,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) local hg=tg:Select(tp,1,1,nil) - Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD) + Duel.SendtoGrave(hg,REASON_EFFECT|REASON_DISCARD) end Duel.ShuffleHand(1-tp) end -end +end \ No newline at end of file diff --git a/official/c9486959.lua b/official/c9486959.lua index 2b9d9b2018..c03fa429d6 100644 --- a/official/c9486959.lua +++ b/official/c9486959.lua @@ -1,5 +1,5 @@ --神隠し鬼火丸 ---Spiriting-Away Onibimaru +--Onibimaru Soul Sweeper --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,1}) - e1:SetCost(s.rmcost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -38,10 +38,6 @@ function s.initial_effect(c) e3:SetLabelObject(e2) c:RegisterEffect(e3) end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end @@ -51,8 +47,8 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)>0 then + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -60,7 +56,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN) Duel.RegisterEffect(e1,tp) end end @@ -94,4 +90,4 @@ function s.matpreop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetHandler():GetOverlayGroup() g:KeepAlive() e:GetLabelObject():SetLabelObject(g) -end +end \ No newline at end of file diff --git a/official/c94878265.lua b/official/c94878265.lua index e71a597767..52bd5e00d4 100644 --- a/official/c94878265.lua +++ b/official/c94878265.lua @@ -1,4 +1,5 @@ --モジャ +--Moja local s,id=GetID() function s.initial_effect(c) --salvage @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c94886282.lua b/official/c94886282.lua index da979d0196..01cdc7a132 100644 --- a/official/c94886282.lua +++ b/official/c94886282.lua @@ -1,4 +1,5 @@ --光の援軍 +--Charge of the Light Brigade local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end Duel.DiscardDeck(tp,3,REASON_COST) end function s.filter(c) - return c:IsSetCard(0x38) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_LIGHTSWORN) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c94905343.lua b/official/c94905343.lua index c723e4001d..0759c3b26d 100644 --- a/official/c94905343.lua +++ b/official/c94905343.lua @@ -1,7 +1,8 @@ --ミノケンタウロス +--Rabid Horseman local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,5053103,68516705) -end +end \ No newline at end of file diff --git a/official/c94919024.lua b/official/c94919024.lua index 285527f647..fc0459ddb5 100644 --- a/official/c94919024.lua +++ b/official/c94919024.lua @@ -1,4 +1,5 @@ --月光紅狐 +--Lunalight Crimson Fox local s,id=GetID() function s.initial_effect(c) --ATK to 0 @@ -21,12 +22,12 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCondition(s.condition) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xdf} +s.listed_series={SET_LUNALIGHT} function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsReason(REASON_EFFECT) end @@ -43,12 +44,12 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end function s.filter(c,tp) - return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xdf) + return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(SET_LUNALIGHT) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -68,4 +69,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(1-tp,1000,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94933468.lua b/official/c94933468.lua index 10707042d3..2fa2fd759f 100644 --- a/official/c94933468.lua +++ b/official/c94933468.lua @@ -1,4 +1,5 @@ --Vain-裏切りの嘲笑 +--Vain Betrayer local s,id=GetID() function s.initial_effect(c) --activate @@ -67,7 +68,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) end function s.deckcon(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and e:GetHandler():GetFirstCardTarget()~=nil + return Duel.IsTurnPlayer(1-tp) and e:GetHandler():GetFirstCardTarget()~=nil end function s.decktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -77,4 +78,4 @@ function s.deckop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end Duel.DiscardDeck(1-tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94937430.lua b/official/c94937430.lua index 8d2582829f..403abdf41a 100644 --- a/official/c94937430.lua +++ b/official/c94937430.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_SZONE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCondition(s.drcon) - e3:SetCost(s.drcost) + e3:SetCost(Cost.SelfToGrave) e3:SetTarget(s.drtg) e3:SetOperation(s.drop) c:RegisterEffect(e3) @@ -42,10 +42,6 @@ end function s.drcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetCounter(COUNTER_SPELL)==3 end -function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) @@ -55,4 +51,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c94940436.lua b/official/c94940436.lua index 3097d1385a..fd189e97c0 100644 --- a/official/c94940436.lua +++ b/official/c94940436.lua @@ -1,4 +1,5 @@ --磁力の召喚円 LV2 +--Magnet Circle LV2 local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c94942656.lua b/official/c94942656.lua index 13bd20a95f..a551d6e40a 100644 --- a/official/c94942656.lua +++ b/official/c94942656.lua @@ -1,5 +1,5 @@ --ステルス・クラーゲン・エフィラ ---Kragen Spawn +--Stealth Kragen Spawn --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetCondition(s.descon) e1:SetTarget(s.destg) e1:SetOperation(s.desop) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x48,0x16a} +s.listed_series={SET_NUMBER,SET_STEALTH_KRAGEN} function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() end @@ -44,13 +44,13 @@ end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local rc=re:GetHandler() - if rc and re:IsActiveType(TYPE_MONSTER) and rc:IsSetCard(0x48) and rc:IsType(TYPE_XYZ) then + if rc and re:IsMonsterEffect() and rc:IsSetCard(SET_NUMBER) and rc:IsType(TYPE_XYZ) then local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_DESTROYED) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) - e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE-RESET_LEAVE-RESET_REMOVE) + e3:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOGRAVE-RESET_LEAVE-RESET_REMOVE) e3:SetCondition(s.spcon) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) @@ -61,7 +61,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetCode(EVENT_LEAVE_FIELD_P) e4:SetOperation(s.recordop) - e4:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE-RESET_LEAVE-RESET_REMOVE) + e4:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOGRAVE-RESET_LEAVE-RESET_REMOVE) e4:SetLabelObject(e3) c:RegisterEffect(e4) end @@ -72,7 +72,7 @@ function s.recordop(e,tp,eg,ep,ev,re,r,rp) e:GetLabelObject():SetLabelObject(g) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x16a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_STEALTH_KRAGEN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) @@ -103,4 +103,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end end -end +end \ No newline at end of file diff --git a/official/c94944637.lua b/official/c94944637.lua index 7b24418632..9b71317568 100644 --- a/official/c94944637.lua +++ b/official/c94944637.lua @@ -44,4 +44,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if #dg>0 then Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94950218.lua b/official/c94950218.lua index 96715bfce6..7b15f7fef3 100644 --- a/official/c94950218.lua +++ b/official/c94950218.lua @@ -1,7 +1,8 @@ --リバース・ブレイカー +--Reverse Breaker local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x107f)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_UTOPIA)) --destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) @@ -15,12 +16,12 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.descon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler():GetEquipTarget() end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and s.desfilter(chkc) end @@ -38,4 +39,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.climit(e,lp,tp) return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c94977269.lua b/official/c94977269.lua index 85388b2485..b5d9e10be3 100644 --- a/official/c94977269.lua +++ b/official/c94977269.lua @@ -1,9 +1,10 @@ --エルシャドール・ミドラーシュ +--El Shaddoll Winda local s,id=GetID() function s.initial_effect(c) Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT) c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x9d),s.matfilter) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_SHADDOLL),s.matfilter) --splimit local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) @@ -40,8 +41,8 @@ function s.initial_effect(c) e5:SetOperation(s.thop) c:RegisterEffect(e5) end -s.listed_series={0x9d} -s.material_setcode=0x9d +s.listed_series={SET_SHADDOLL} +s.material_setcode=SET_SHADDOLL function s.matfilter(c,lc,sumtype,tp) return c:IsAttribute(ATTRIBUTE_DARK,lc,sumtype,tp) or c:IsHasEffect(4904633) end @@ -49,7 +50,7 @@ function s.indval(e,re,tp) return tp~=e:GetHandlerPlayer() end function s.thfilter(c) - return c:IsSetCard(0x9d) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_SHADDOLL) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -63,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c94982447.lua b/official/c94982447.lua index 7140876d38..26323502f7 100644 --- a/official/c94982447.lua +++ b/official/c94982447.lua @@ -36,14 +36,14 @@ function s.initial_effect(c) e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) c:RegisterEffect(e4) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and - c:IsSummonType(SUMMON_TYPE_TRIBUTE) + c:IsTributeSummoned() end function s.spfilter(c,e,tp) - return c:IsSetCard(0xf9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -59,5 +59,5 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgtg(e,c) - return c:IsSetCard(0xf9) and c~=e:GetHandler() -end + return c:IsSetCard(SET_TRUE_DRACO_KING) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c94997874.lua b/official/c94997874.lua index a10fbb4837..412b70c236 100644 --- a/official/c94997874.lua +++ b/official/c94997874.lua @@ -68,7 +68,7 @@ function s.posop2(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.spfilter(c,e,tp) if not c:IsType(TYPE_FLIP) then return false end @@ -77,14 +77,14 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if sc then local code_chk=sc:IsCode(42932862) and e:GetHandler():IsCode(id) Duel.SpecialSummon(sc,0,tp,tp,code_chk,code_chk,POS_FACEDOWN_DEFENSE) diff --git a/official/c95004025.lua b/official/c95004025.lua index 48b1210001..394f760ddc 100644 --- a/official/c95004025.lua +++ b/official/c95004025.lua @@ -1,4 +1,5 @@ --真竜導士マジェスティM +--Majesty Maiden, the True Dracocaster local s,id=GetID() function s.initial_effect(c) --summon with s/t @@ -23,12 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xf9} +s.listed_series={SET_TRUE_DRACO_KING} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) and rp~=tp + return e:GetHandler():IsTributeSummoned() and rp~=tp end function s.thfilter(c) - return c:IsSetCard(0xf9) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -41,4 +42,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95026693.lua b/official/c95026693.lua index 79edc5a27f..de732d23a7 100644 --- a/official/c95026693.lua +++ b/official/c95026693.lua @@ -1,4 +1,5 @@ --ファイヤー・ソウル +--Soul of Fire local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,7 +19,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.filter(c) @@ -39,4 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local dam=g:GetFirst():GetAttack()/2 Duel.Damage(1-tp,dam,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95027497.lua b/official/c95027497.lua index 5868be7d1d..14a2b099c9 100644 --- a/official/c95027497.lua +++ b/official/c95027497.lua @@ -1,4 +1,5 @@ --忍者マスター HANZO +--Ninja Grandmaster Hanzo local s,id=GetID() function s.initial_effect(c) --search @@ -22,12 +23,12 @@ function s.initial_effect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x61,0x2b} +s.listed_series={SET_NINJITSU_ART,SET_NINJA} function s.filter1(c) - return c:IsSetCard(0x61) and c:IsAbleToHand() + return c:IsSetCard(SET_NINJITSU_ART) and c:IsAbleToHand() end function s.filter2(c) - return c:IsSetCard(0x2b) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_NINJA) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c95034141.lua b/official/c95034141.lua index 71563ec0b9..fc79650b8e 100644 --- a/official/c95034141.lua +++ b/official/c95034141.lua @@ -1,7 +1,6 @@ --黄金郷の七摩天 ---Seven Realms of the Golden Land +--Seven Cities of the Golden Land --Logical Nonsense - local s,id=GetID() function s.initial_effect(c) --Activate @@ -62,8 +61,8 @@ function s.stop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c95051344.lua b/official/c95051344.lua index 0d4816f22a..d3253238dc 100644 --- a/official/c95051344.lua +++ b/official/c95051344.lua @@ -1,4 +1,5 @@ --成仏 +--Eternal Rest local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9505425.lua b/official/c9505425.lua index 9c13b0aa43..4a64a928e1 100644 --- a/official/c9505425.lua +++ b/official/c9505425.lua @@ -1,5 +1,5 @@ --法典の大賢者クロウリー ---Magistus Grimoire Crowley +--Crowley, the Magistus of Grimoires --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -31,20 +31,20 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1,{id,2}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.eqtg) e3:SetOperation(s.eqop) c:RegisterEffect(e3) end -s.listed_series={0x152} +s.listed_series={SET_MAGISTUS} function s.spcfilter(c,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsMonster() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler(),tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,e:GetHandler(),tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler(),tp) + local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_ONFIELD|LOCATION_HAND,0,1,1,e:GetHandler(),tp) Duel.SendtoGrave(g,REASON_COST) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -70,21 +70,21 @@ function s.attop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end function s.eqfilter(c) - return c:IsSetCard(0x152) and not c:IsLevel(4) and c:IsMonster() + return c:IsSetCard(SET_MAGISTUS) and not c:IsLevel(4) and c:IsMonster() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x152) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_MAGISTUS) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x152),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_MAGISTUS),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x152),tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_MAGISTUS),tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -98,7 +98,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) ec:RegisterEffect(e1) @@ -106,4 +106,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.eqlimit(e,c) return c==e:GetLabelObject() -end +end \ No newline at end of file diff --git a/official/c95081386.lua b/official/c95081386.lua index dd7be219ed..4f61fade9d 100644 --- a/official/c95081386.lua +++ b/official/c95081386.lua @@ -1,4 +1,5 @@ --スリーストライク・バリア +--Three Strikes Barrier local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) elseif sel==1 then local e1=Effect.CreateEffect(c) @@ -36,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetTargetRange(1,0) e1:SetValue(1) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) else local e1=Effect.CreateEffect(c) @@ -44,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetCondition(s.reccon) e1:SetOperation(s.recop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -53,4 +54,4 @@ function s.reccon(e,tp,eg,ep,ev,re,r,rp) end function s.recop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(tp,ev,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95083785.lua b/official/c95083785.lua index 450a8b3ebd..cbec4a542c 100644 --- a/official/c95083785.lua +++ b/official/c95083785.lua @@ -1,4 +1,5 @@ --早すぎた帰還 +--Premature Return local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c95084054.lua b/official/c95084054.lua index 5fa56efa5a..9018758e57 100644 --- a/official/c95084054.lua +++ b/official/c95084054.lua @@ -40,4 +40,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95090813.lua b/official/c95090813.lua index b5c60056f6..4dd11c639e 100644 --- a/official/c95090813.lua +++ b/official/c95090813.lua @@ -30,7 +30,7 @@ function s.eqval(ec,c,tp) return ec:IsControler(tp) and ec:IsLevelBelow(3) and ec:IsRace(RACE_WARRIOR) end function s.mtcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.cfilter1(c) return c:IsCode(36623431) and c:IsAbleToGraveAsCost() @@ -88,14 +88,14 @@ function s.equipop(c,e,tp,tc) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(atk/2) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3:SetCode(EFFECT_DESTROY_SUBSTITUTE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(s.subval) tc:RegisterEffect(e3) end @@ -109,4 +109,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end function s.subval(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c95096437.lua b/official/c95096437.lua index 9e924b9f5b..41784f0d18 100644 --- a/official/c95096437.lua +++ b/official/c95096437.lua @@ -33,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.hdcon) e1:SetTarget(s.hdtg) e1:SetOperation(s.hdop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -49,5 +49,5 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) local dg=g:RandomSelect(tp,2) - Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) -end + Duel.SendtoGrave(dg,REASON_EFFECT|REASON_DISCARD) +end \ No newline at end of file diff --git a/official/c95113856.lua b/official/c95113856.lua index 3b41362d7b..2484ab7a90 100644 --- a/official/c95113856.lua +++ b/official/c95113856.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -24,10 +24,10 @@ function s.bansc(tp,loc) --Banish check shortcut return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,loc,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD|LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,1,nil) end local b1=s.bansc(tp,LOCATION_ONFIELD) local b2=s.bansc(tp,LOCATION_HAND) - local b3=(Duel.IsPlayerAffectedByEffect(1-tp,69832741) and s.bansc(tp,LOCATION_MZONE)) or s.bansc(tp,LOCATION_GRAVE) + local b3=(Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) and s.bansc(tp,LOCATION_MZONE)) or s.bansc(tp,LOCATION_GRAVE) local b4=s.bansc(tp,LOCATION_DECK) local op=Duel.SelectEffect(tp, {b1,aux.Stringid(id,1)}, @@ -54,7 +54,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) elseif op==3 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g - if Duel.IsPlayerAffectedByEffect(1-tp,69832741) then + if Duel.IsPlayerAffectedByEffect(1-tp,CARD_SPIRIT_ELIMINATION) then g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil) else g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) @@ -69,4 +69,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c95132338.lua b/official/c95132338.lua index 4b44601969..cb38e276e2 100644 --- a/official/c95132338.lua +++ b/official/c95132338.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --Increase ATK local e2=Effect.CreateEffect(c) @@ -22,9 +22,6 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,c) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,c:GetCode()),0,LOCATION_MZONE,LOCATION_MZONE,1,c) -end +end \ No newline at end of file diff --git a/official/c95134948.lua b/official/c95134948.lua index 15007dcbcf..4e135b5552 100644 --- a/official/c95134948.lua +++ b/official/c95134948.lua @@ -1,5 +1,5 @@ --No.99 希望皇ホープドラグナー ---Number 99: Utopia Dragner +--Number 99: Utopia Dragonar --Scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -40,7 +40,7 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} s.xyz_number=99 function s.counterfilter(c) return c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA @@ -48,8 +48,8 @@ end function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if not Duel.GetAttackTarget() then - Duel.RegisterFlagEffect(ep,id,RESET_PHASE+PHASE_END,0,1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(ep,id,RESET_PHASE|PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -65,7 +65,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) --lizard check aux.addTempLizardCheck(c,tp,s.lizfilter) @@ -77,7 +77,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ge2:SetTargetRange(LOCATION_MZONE,0) ge2:SetTarget(s.ftarget) ge2:SetLabel(c:GetFieldID()) - ge2:SetReset(RESET_PHASE+PHASE_END) + ge2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge2,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) @@ -90,7 +90,7 @@ function s.ftarget(e,c) return e:GetLabel()~=c:GetFieldID() end function s.filter(c,e,tp,rp) - return c:IsSetCard(0x48) and c.xyz_number and c.xyz_number>=1 and c.xyz_number<=100 + return c:IsSetCard(SET_NUMBER) and c.xyz_number and c.xyz_number>=1 and c.xyz_number<=100 and Duel.GetLocationCountFromEx(tp,rp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -119,8 +119,8 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c95144193.lua b/official/c95144193.lua index 4f7b675e63..17cc4176eb 100644 --- a/official/c95144193.lua +++ b/official/c95144193.lua @@ -1,7 +1,8 @@ --クワガー・ヘラクレス +--Kwagar Hercules local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,60802233,52584282) -end +end \ No newline at end of file diff --git a/official/c95166228.lua b/official/c95166228.lua index 030d6f0dc3..3825c1940b 100644 --- a/official/c95166228.lua +++ b/official/c95166228.lua @@ -10,4 +10,4 @@ function s.initial_effect(c) e1:SetCondition(Gemini.EffectStatusCondition) e1:SetValue(1) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c95169481.lua b/official/c95169481.lua index a383ca70e8..89e43805cb 100644 --- a/official/c95169481.lua +++ b/official/c95169481.lua @@ -13,15 +13,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.descost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.destg) e1:SetOperation(s.desop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.desfilter(c) return c:IsFaceup() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) @@ -39,4 +35,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95174353.lua b/official/c95174353.lua index ad7da34977..9b88da3104 100644 --- a/official/c95174353.lua +++ b/official/c95174353.lua @@ -1,4 +1,5 @@ --アメーバ +--Ameba local s,id=GetID() function s.initial_effect(c) --damage @@ -19,4 +20,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(tp,2000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95178994.lua b/official/c95178994.lua index 3aee88056c..c2cae9de9a 100644 --- a/official/c95178994.lua +++ b/official/c95178994.lua @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK) end end -end +end \ No newline at end of file diff --git a/official/c95192919.lua b/official/c95192919.lua index b361d18ae6..c77d72fe8c 100644 --- a/official/c95192919.lua +++ b/official/c95192919.lua @@ -40,13 +40,13 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.ctval(e,re,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp==1-e:GetHandlerPlayer() + return re:IsSpellTrapEffect() and rp==1-e:GetHandlerPlayer() end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return re:IsSpellTrapEffect() end function s.cfilter(c) return c:IsRace(RACE_WINGEDBEAST) and c:IsAttribute(ATTRIBUTE_WIND) @@ -66,7 +66,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -86,4 +86,4 @@ function s.thcfilter(c,tp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.thcfilter,1,e:GetHandler(),tp) -end +end \ No newline at end of file diff --git a/official/c95194279.lua b/official/c95194279.lua index 7f10069c01..ed68c1890c 100644 --- a/official/c95194279.lua +++ b/official/c95194279.lua @@ -1,4 +1,5 @@ --次元の歪み +--Dimension Distortion local s,id=GetID() function s.initial_effect(c) --Activate @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95200011.lua b/official/c95200011.lua index e1925387b6..cf067567c7 100644 --- a/official/c95200011.lua +++ b/official/c95200011.lua @@ -17,4 +17,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.RockPaperScissors() Duel.Recover(p,2000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95200012.lua b/official/c95200012.lua index 57f73962a5..15fc47fc68 100644 --- a/official/c95200012.lua +++ b/official/c95200012.lua @@ -25,4 +25,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g~=0 then Duel.SpecialSummon(g,0,p,p,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95200013.lua b/official/c95200013.lua index 1fc5152d63..b5d44d3c77 100644 --- a/official/c95200013.lua +++ b/official/c95200013.lua @@ -17,4 +17,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.RockPaperScissors() Duel.Draw(p,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95200102.lua b/official/c95200102.lua index 008090d896..2fc9da77e6 100644 --- a/official/c95200102.lua +++ b/official/c95200102.lua @@ -15,7 +15,7 @@ function s.filter(c,e,tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_DECK|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetMatchingGroup(s.filter,tp,LOCATION_EXTRA,0,nil,e,tp) @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c95204084.lua b/official/c95204084.lua index bb2074717b..0e086b5769 100644 --- a/official/c95204084.lua +++ b/official/c95204084.lua @@ -1,4 +1,5 @@ --コアキメイル・トルネード +--Koa'ki Meiru Tornado local s,id=GetID() function s.initial_effect(c) --destroy @@ -20,10 +21,10 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,0,REASON_COST) + Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST) end function s.filter(c) - return c:IsSummonType(SUMMON_TYPE_SPECIAL) + return c:IsSpecialSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end @@ -33,4 +34,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95209656.lua b/official/c95209656.lua index 5d28320258..11f530c77e 100644 --- a/official/c95209656.lua +++ b/official/c95209656.lua @@ -43,9 +43,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={22398665,id} -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.tgval(e,re,rp) - return aux.tgoval(e,re,rp) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return aux.tgoval(e,re,rp) and re:IsSpellTrapEffect() end function s.valcheck(e,c) local g=c:GetMaterial() @@ -55,27 +55,27 @@ function s.valcheck(e,c) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(id)~=0 + return c:IsRitualSummoned() and c:GetFlagEffect(id)~=0 end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if chk==0 then return #g>0 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) and e:GetHandler():IsRitualSummoned() end function s.rescon(sg,e,tp,mg) return sg:GetSum(Card.GetAttack)==4000 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x151) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) + return c:IsSetCard(SET_DRYTRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -93,4 +93,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c95214051.lua b/official/c95214051.lua index 4350ec7afe..113b7b83f3 100644 --- a/official/c95214051.lua +++ b/official/c95214051.lua @@ -1,4 +1,5 @@ --翡翠の蟲笛 +--Jade Insect Whistle local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,4 +22,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(1-tp,1) end -end +end \ No newline at end of file diff --git a/official/c95218695.lua b/official/c95218695.lua index 64dfd4087a..42ef7d1581 100644 --- a/official/c95218695.lua +++ b/official/c95218695.lua @@ -1,4 +1,5 @@ --サブテラーマリス・アルラボーン +--Subterror Behemoth Dragossuary local s,id=GetID() function s.initial_effect(c) --flip @@ -30,15 +31,15 @@ function s.initial_effect(c) e3:SetOperation(s.posop) c:RegisterEffect(e3) end -s.listed_series={0xed} +s.listed_series={SET_SUBTERROR} function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetTargetRange(LOCATION_ONFIELD,0) - e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xed)) + e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_SUBTERROR)) e1:SetValue(aux.indoval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.cfilter(c,tp) @@ -61,7 +62,7 @@ end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -69,4 +70,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c95220856.lua b/official/c95220856.lua index 24e0730a31..3267135fae 100644 --- a/official/c95220856.lua +++ b/official/c95220856.lua @@ -1,4 +1,5 @@ --怨霊の湿地帯 +--Vengeful Bog Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.target(e,c) return c:IsStatus(STATUS_SUMMON_TURN+STATUS_FLIP_SUMMON_TURN+STATUS_SPSUMMON_TURN) -end +end \ No newline at end of file diff --git a/official/c95231062.lua b/official/c95231062.lua index db7f73201e..96cf94da25 100644 --- a/official/c95231062.lua +++ b/official/c95231062.lua @@ -1,4 +1,5 @@ --ロスト・ブルー・ブレイカー +--Lost Blue Breaker local s,id=GetID() function s.initial_effect(c) --destroy @@ -9,20 +10,16 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FISH+RACE_AQUA+RACE_SEASERPENT),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_FISH|RACE_AQUA|RACE_SEASERPENT),tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -36,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9523599.lua b/official/c9523599.lua index b74e880005..7cda9d41ae 100644 --- a/official/c9523599.lua +++ b/official/c9523599.lua @@ -38,4 +38,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c95238394.lua b/official/c95238394.lua index afbe691fde..edab3738b3 100644 --- a/official/c95238394.lua +++ b/official/c95238394.lua @@ -15,13 +15,13 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end function s.fextra(e,tp,mg) - return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) + return Duel.GetMatchingGroup(aux.NecroValleyFilter(Fusion.IsMonsterFilter(Card.IsFaceup,Card.IsAbleToDeck)),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil) end function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -41,4 +41,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95239444.lua b/official/c95239444.lua index 0bf7f4d614..029381f0eb 100644 --- a/official/c95239444.lua +++ b/official/c95239444.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1) e2:SetRange(LOCATION_MZONE) - e2:SetCost(aux.dxmcostgen(1,1,nil)) + e2:SetCost(Cost.Detach(1,1,nil)) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c95243515.lua b/official/c95243515.lua index 460db4244e..86428caa47 100644 --- a/official/c95243515.lua +++ b/official/c95243515.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetCountLimit(1) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c95245544.lua b/official/c95245544.lua index d87a17de39..96169663fa 100644 --- a/official/c95245544.lua +++ b/official/c95245544.lua @@ -24,15 +24,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} function s.spfilter(c,e,tp) - return c:IsSetCard(0x128) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 @@ -53,7 +53,7 @@ function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.tgfilter(c) - return c:IsSetCard(0x128) and c:IsAbleToGrave() + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsAbleToGrave() end function s.drop(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(tp,1,REASON_EFFECT)>0 then diff --git a/official/c95245571.lua b/official/c95245571.lua index 9d1cb291eb..28df8290d2 100644 --- a/official/c95245571.lua +++ b/official/c95245571.lua @@ -22,13 +22,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.gycond) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.gytg) e2:SetOperation(s.gyop) c:RegisterEffect(e2) end s.listed_names={CARD_VISAS_STARFROST} -s.listed_series={0x17c} +s.listed_series={SET_SCARECLAW} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) return true @@ -49,7 +49,7 @@ function s.tgfilter(c,e,tp) return not visas or c:IsAbleToRemove() end function s.cfilter(c) - return c:IsSetCard(0x17c) + return c:IsSetCard(SET_SCARECLAW) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.tgfilter(chkc,e,tp) end @@ -85,7 +85,7 @@ function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chk==0 then return Duel.GetFlagEffect(0,id)==0 end end function s.gyop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(0,id,RESET_PHASE|PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) @@ -93,10 +93,10 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetValue(s.actlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.actlimit(e,re,tp) local loc=re:GetActivateLocation() - return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsType(TYPE_LINK) + return loc==LOCATION_MZONE and re:IsMonsterEffect() and re:GetHandler():IsType(TYPE_LINK) end \ No newline at end of file diff --git a/official/c95254840.lua b/official/c95254840.lua index dd65febbdd..fb86d859a5 100644 --- a/official/c95254840.lua +++ b/official/c95254840.lua @@ -1,4 +1,5 @@ --ドタキャン +--Last Minute Cancel local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,7 +11,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker():IsControler(1-tp) end @@ -33,10 +34,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.rmtg) e1:SetValue(LOCATION_HAND) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end function s.rmtg(e,c) - return c:IsSetCard(0x9f) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) -end + return c:IsSetCard(SET_PERFORMAPAL) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c95286165.lua b/official/c95286165.lua index 64937e4c78..bae9dac75c 100644 --- a/official/c95286165.lua +++ b/official/c95286165.lua @@ -25,7 +25,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.mgfilter(c,e,tp,fusc,mg) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE) - and (c:GetReason()&0x40008)==0x40008 and c:GetReasonCard()==fusc + and (c:GetReason()&(REASON_FUSION|REASON_MATERIAL))==(REASON_FUSION|REASON_MATERIAL) and c:GetReasonCard()==fusc and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and fusc:CheckFusionMaterial(mg,c,PLAYER_NONE|FUSPROC_NOTFUSION) end @@ -35,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local mg=tc:GetMaterial() local ct=#mg local sumtype=tc:GetSummonType() - if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 and (sumtype&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION + if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and (sumtype&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and ct>0 and ct<=Duel.GetLocationCount(tp,LOCATION_MZONE) and mg:FilterCount(aux.NecroValleyFilter(s.mgfilter),nil,e,tp,tc,mg)==ct and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) diff --git a/official/c95308449.lua b/official/c95308449.lua index 0cebaced5b..119c87cb00 100644 --- a/official/c95308449.lua +++ b/official/c95308449.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetOperation(s.activate) c:RegisterEffect(e1) aux.GlobalCheck(s,function() @@ -23,10 +23,6 @@ function s.initial_effect(c) Duel.RegisterEffect(ge2,0) end) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local e1=Effect.CreateEffect(c) @@ -38,7 +34,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetLabel(0) e1:SetValue(0) e1:SetTargetRange(1,1) - e1:SetReset(RESET_PHASE+PHASE_END,21) + e1:SetReset(RESET_PHASE|PHASE_END,21) Duel.RegisterEffect(e1,tp) local descnum=tp==c:GetOwner() and 0 or 1 local e2=Effect.CreateEffect(c) @@ -49,7 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetLabelObject(e1) e2:SetOwnerPlayer(tp) e2:SetOperation(s.reset) - e2:SetReset(RESET_PHASE+PHASE_END,21) + e2:SetReset(RESET_PHASE|PHASE_END,21) c:RegisterEffect(e2) end function s.reset(e,tp,eg,ep,ev,re,r,rp) @@ -96,4 +92,4 @@ function s.winop(e,tp,eg,ep,ev,re,r,rp) Duel.Win(1,WIN_REASON_FINAL_COUNTDOWN) end end -end +end \ No newline at end of file diff --git a/official/c95326659.lua b/official/c95326659.lua index d63b216360..c0d781bdb0 100644 --- a/official/c95326659.lua +++ b/official/c95326659.lua @@ -1,4 +1,5 @@ --宝玉の導き +--Crystal Beacon local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,12 +12,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1034} +s.listed_series={SET_CRYSTAL_BEAST} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,2,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,2,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsSetCard(SET_CRYSTAL_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -25,10 +26,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x1034),tp,LOCATION_SZONE,0,2,nil) then return end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_CRYSTAL_BEAST),tp,LOCATION_SZONE,0,2,nil) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95352218.lua b/official/c95352218.lua index b97c3efc29..73adcc5936 100644 --- a/official/c95352218.lua +++ b/official/c95352218.lua @@ -1,4 +1,5 @@ --天下統一 +--Unification local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_SZONE) e2:SetCountLimit(1) e2:SetOperation(s.adjustop) @@ -40,4 +41,4 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp) local clv=g:Select(turnp,1,1,nil):GetFirst():GetLevel() local dg=g:Filter(s.filter2,nil,clv) Duel.SendtoGrave(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95360850.lua b/official/c95360850.lua index cbafb58bf5..adc8cda1c4 100644 --- a/official/c95360850.lua +++ b/official/c95360850.lua @@ -1,4 +1,5 @@ --シールド・ウォリアー +--Shield Warrior local s,id=GetID() function s.initial_effect(c) -- @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.atkcon) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetOperation(s.atkop) c:RegisterEffect(e1) end @@ -25,7 +26,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c95362816.lua b/official/c95362816.lua index 0da0bc103b..dae8a10d05 100644 --- a/official/c95362816.lua +++ b/official/c95362816.lua @@ -1,4 +1,5 @@ --E・HERO レディ・オブ・ファイア +--Elemental HERO Lady Heat local s,id=GetID() function s.initial_effect(c) --damage @@ -15,18 +16,18 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x3008),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ELEMENTAL_HERO),tp,LOCATION_MZONE,0,nil) Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x3008),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ELEMENTAL_HERO),tp,LOCATION_MZONE,0,nil) Duel.Damage(p,ct*200,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95372220.lua b/official/c95372220.lua index db9b23d6b2..0ed0a54890 100644 --- a/official/c95372220.lua +++ b/official/c95372220.lua @@ -94,4 +94,4 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95376428.lua b/official/c95376428.lua index 7435b3eb7f..b4df87e0c0 100644 --- a/official/c95376428.lua +++ b/official/c95376428.lua @@ -1,4 +1,5 @@ --召喚制限-エクストラネット +--Extra Net local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95395761.lua b/official/c95395761.lua index 84fb714a6e..079dc69bf9 100644 --- a/official/c95395761.lua +++ b/official/c95395761.lua @@ -37,17 +37,17 @@ function s.initial_effect(c) e5:SetOperation(s.repop) c:RegisterEffect(e5) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.eqval(ec,c,tp) - return ec:IsControler(tp) and ec:IsSetCard(0x56) + return ec:IsControler(tp) and ec:IsSetCard(SET_INZEKTOR) end function s.filter(c) - return c:IsSetCard(0x56) and c:IsMonster() and not c:IsForbidden() + return c:IsSetCard(SET_INZEKTOR) and c:IsMonster() and not c:IsForbidden() end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.equipop(c,e,tp,tc) c:EquipByEffectAndLimitRegister(e,tp,tc,nil,true) @@ -57,7 +57,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst() if tc then s.equipop(c,e,tp,tc) @@ -70,5 +70,5 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,c,96) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c95401059.lua b/official/c95401059.lua index 032c87e2f3..04a1385530 100644 --- a/official/c95401059.lua +++ b/official/c95401059.lua @@ -1,4 +1,5 @@ --オルシャドール-セフィラルーツ +--Shaddoll Zefracore local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -28,17 +29,17 @@ function s.initial_effect(c) e4:SetCondition(aux.TRUE) c:RegisterEffect(e4) end -s.listed_series={0x9d,0xc4} +s.listed_series={SET_SHADDOLL,SET_ZEFRA} s.listed_names={id} function s.splimit(e,c,sump,sumtype,sumpos,targetp) - if c:IsSetCard(0x9d) or c:IsSetCard(0xc4) then return false end + if c:IsSetCard(SET_SHADDOLL) or c:IsSetCard(SET_ZEFRA) then return false end return (sumtype&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.condition1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) + return e:GetHandler():IsPendulumSummoned() end function s.filter(c,e,tp) - return c:IsSetCard(0xc4) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ZEFRA) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -53,4 +54,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95403418.lua b/official/c95403418.lua index 466061db26..c2ad73673f 100644 --- a/official/c95403418.lua +++ b/official/c95403418.lua @@ -1,4 +1,5 @@ --スターダストン +--Starduston local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -46,13 +47,13 @@ function s.initial_effect(c) e6:SetCondition(s.descon) c:RegisterEffect(e6) end -s.listed_series={0x80} +s.listed_series={SET_DUSTON} function s.aclimit(e,re,tp) local rc=re:GetHandler() return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsLocation(LOCATION_SZONE) and rc:IsFacedown() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x80) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_DUSTON) and c:IsAbleToGraveAsCost() end function s.spcon(e,c) if c==nil then return true end @@ -88,4 +89,4 @@ end function s.descon(e) local tp=e:GetHandlerPlayer() return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)0 end end @@ -56,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_MUST_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_MUST_ATTACK_MONSTER) @@ -79,4 +75,4 @@ end function s.refcon(e) return Duel.IsExistingMatchingCard(s.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and Duel.GetAttackTarget()==e:GetHandler() -end +end \ No newline at end of file diff --git a/official/c95443805.lua b/official/c95443805.lua index 0a214c0ac2..2b6b997962 100644 --- a/official/c95443805.lua +++ b/official/c95443805.lua @@ -1,4 +1,5 @@ --霞の谷の祈祷師 +--Mist Valley Shaman local s,id=GetID() function s.initial_effect(c) --atkup @@ -25,7 +26,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c95448692.lua b/official/c95448692.lua index 680f7ed90c..56cd48ccf1 100644 --- a/official/c95448692.lua +++ b/official/c95448692.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target2) e2:SetOperation(s.activate2) c:RegisterEffect(e2) @@ -50,7 +50,7 @@ function s.activate2(e,tp,eg,ep,ev,re,r,rp) Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) end function s.val1(e,re,dam,r,rp,rc) - if r&(REASON_BATTLE+REASON_EFFECT)~=0 then + if r&(REASON_BATTLE|REASON_EFFECT)~=0 then return dam/2 else return dam end end @@ -58,4 +58,4 @@ function s.val2(e,re,dam,r,rp,rc) if (r&REASON_EFFECT)~=0 then return dam/2 else return dam end -end +end \ No newline at end of file diff --git a/official/c95451366.lua b/official/c95451366.lua index e512b79b1c..23dd58749b 100644 --- a/official/c95451366.lua +++ b/official/c95451366.lua @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local cc=tc:GetCounter(COUNTER_SPELL) tc:RemoveCounter(tp,COUNTER_SPELL,cc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95454996.lua b/official/c95454996.lua index 7fabbcc274..140d7c34b9 100644 --- a/official/c95454996.lua +++ b/official/c95454996.lua @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_REMOVE) e3:SetCountLimit(1,{id,2}) - e3:SetCost(aux.PayLPCost(900)) + e3:SetCost(Cost.PayLP(900)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c95457011.lua b/official/c95457011.lua index 849479f024..6e867e8bee 100644 --- a/official/c95457011.lua +++ b/official/c95457011.lua @@ -28,7 +28,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} s.listed_names={id} function s.spfilter(c,e,tp) return c:GetAttack()==800 and c:GetDefense()==1000 and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -51,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(id,2)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -62,7 +62,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) end function s.thfilter(c) - return c:IsFaceup() and c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsFaceup() and c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.thfilter(chkc) end @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95466842.lua b/official/c95466842.lua index 6fd9312254..c83b93b802 100644 --- a/official/c95466842.lua +++ b/official/c95466842.lua @@ -1,4 +1,5 @@ --水精鱗-アビスラング +--Mermail Abysslung local s,id=GetID() function s.initial_effect(c) --at limit @@ -21,4 +22,4 @@ function s.initial_effect(c) end function s.atlimit(e,c) return c~=e:GetHandler() and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c95472621.lua b/official/c95472621.lua index fa4e19f551..ea8a1e5b56 100644 --- a/official/c95472621.lua +++ b/official/c95472621.lua @@ -1,4 +1,5 @@ --大火葬 +--Big Burn local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,14 +22,14 @@ function s.filter(c) return c:IsMonster() and c:IsAbleToRemove() and aux.SpElimFilter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end - if Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) then + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end + if Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) then Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_MZONE) else Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95474755.lua b/official/c95474755.lua index c773ef329c..3191a3b3d5 100644 --- a/official/c95474755.lua +++ b/official/c95474755.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(aux.dxmcostgen(1,1,nil)) + e1:SetCost(Cost.Detach(1,1,nil)) e1:SetTarget(s.extg) e1:SetOperation(s.exop) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(function(e) return e:GetHandler():HasFlagEffect(id) end) diff --git a/official/c9547962.lua b/official/c9547962.lua index 167221d72e..062f4adf05 100644 --- a/official/c9547962.lua +++ b/official/c9547962.lua @@ -1,5 +1,5 @@ --オイラーサーキット ---Euler Circuit +--Euler's Circuit --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -20,7 +20,7 @@ function s.initial_effect(c) local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_CONTROL) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_FZONE) e3:SetCountLimit(1) @@ -40,15 +40,15 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} function s.atkcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x10b),e:GetHandlerPlayer(),LOCATION_MZONE,0,3,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_TINDANGLE),e:GetHandlerPlayer(),LOCATION_MZONE,0,3,nil) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.ctfilter(c) - return c:IsFaceup() and c:IsSetCard(0x10b) and c:IsControlerCanBeChanged() + return c:IsFaceup() and c:IsSetCard(SET_TINDANGLE) and c:IsControlerCanBeChanged() end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.ctfilter(chkc) end @@ -65,13 +65,13 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0x10b) and c:IsDiscardable() + return c:IsSetCard(SET_TINDANGLE) and c:IsDiscardable() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsCode(id) and c:IsAbleToHand() diff --git a/official/c95486586.lua b/official/c95486586.lua index 036cb502e9..5d6775d55e 100644 --- a/official/c95486586.lua +++ b/official/c95486586.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x3008),3) + Fusion.AddProcMixN(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_ELEMENTAL_HERO),3) --spsummon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_BATTLE) + e3:SetCode(EVENT_PHASE|PHASE_BATTLE) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCountLimit(1) @@ -44,8 +44,8 @@ function s.initial_effect(c) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x3008} -s.material_setcode={0x8,0x3008} +s.listed_series={SET_ELEMENTAL_HERO} +s.material_setcode={SET_HERO,SET_ELEMENTAL_HERO} function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -53,7 +53,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(c:GetAttack()*2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE) c:RegisterEffect(e1) end end @@ -74,7 +74,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsLevelBelow(8) and c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) + return c:IsLevelBelow(8) and c:IsSetCard(SET_ELEMENTAL_HERO) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95492061.lua b/official/c95492061.lua index b0cee7c47e..43812522c7 100644 --- a/official/c95492061.lua +++ b/official/c95492061.lua @@ -1,4 +1,5 @@ --マンジュ・ゴッド +--Manju of the Ten Thousand Hands local s,id=GetID() function s.initial_effect(c) --effect @@ -28,4 +29,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95493471.lua b/official/c95493471.lua index 32a4f5cb3f..f0117cb188 100644 --- a/official/c95493471.lua +++ b/official/c95493471.lua @@ -40,15 +40,15 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xdc} +s.listed_series={SET_SUPER_QUANT} function s.matcheck(g,lc,sumtype,tp) - return g:IsExists(Card.IsSetCard,1,nil,0xdc,lc,sumtype,tp) + return g:IsExists(Card.IsSetCard,1,nil,SET_SUPER_QUANT,lc,sumtype,tp) end function s.incon(e) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.drcfilter(c,tp,lg) - return c:IsSetCard(0xdc) and c:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_EXTRA) + return c:IsSetCard(SET_SUPER_QUANT) and c:IsType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_EXTRA) and lg:IsContains(c) and not Duel.IsExistingMatchingCard(s.drfilter,tp,LOCATION_MZONE,0,1,c,c:GetCode()) end function s.drfilter(c,code) @@ -78,7 +78,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp,zone,rp) end function s.spfilter(c,e,tp,attr) - return c:IsSetCard(0xdc) and c:GetOriginalAttribute()&attr~=0 + return c:IsSetCard(SET_SUPER_QUANT) and c:GetOriginalAttribute()&attr~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -101,4 +101,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95500396.lua b/official/c95500396.lua index db64bf2943..fa6a3f75cb 100644 --- a/official/c95500396.lua +++ b/official/c95500396.lua @@ -7,14 +7,14 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) end -s.listed_series={0x9a} +s.listed_series={SET_SUPERHEAVY_SAMURAI} function s.eqfilter(c) - return c:IsFaceup() and c:IsSetCard(0x9a) + return c:IsFaceup() and c:IsSetCard(SET_SUPERHEAVY_SAMURAI) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) and chkc~=e:GetHandler() end @@ -28,7 +28,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if not c:IsRelateToEffect(e) then return end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end local tc=Duel.GetFirstTarget() - if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()==1-tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then + if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not tc:IsRelateToEffect(e) then Duel.SendtoGrave(c,REASON_EFFECT) return end @@ -37,7 +37,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -49,7 +49,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(0,LOCATION_MZONE) e2:SetValue(s.atlimit) e2:SetLabelObject(tc) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) --tribute to special summon local e3=Effect.CreateEffect(c) @@ -60,7 +60,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e3:SetCost(s.spcost) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e3) end function s.eqlimit(e,c) @@ -76,7 +76,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Release(tc,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x9a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SUPERHEAVY_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -92,4 +92,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95503687.lua b/official/c95503687.lua index aca5daae45..ca3bdb653b 100644 --- a/official/c95503687.lua +++ b/official/c95503687.lua @@ -1,4 +1,5 @@ --ライトロード・サモナー ルミナス +--Lumina, Lightsworn Summoner local s,id=GetID() function s.initial_effect(c) --special summon @@ -26,13 +27,13 @@ function s.initial_effect(c) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0x38} +s.listed_series={SET_LIGHTSWORN} function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c,e,tp) - return c:IsSetCard(0x38) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_LIGHTSWORN) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -57,4 +58,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(tp,3,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95504778.lua b/official/c95504778.lua index 833101b3d2..dbafc4cf47 100644 --- a/official/c95504778.lua +++ b/official/c95504778.lua @@ -1,6 +1,5 @@ --トリガー・ヴルム --Triggering Wurm - local s,id=GetID() function s.initial_effect(c) --If sent to GY as link material for a DARK monster, special summon itself from GY @@ -37,13 +36,13 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() - local zone=re:GetHandler():GetLinkedZone(tp)&0x1f + local zone=re:GetHandler():GetLinkedZone(tp)&ZONES_MMZ if chk==0 then return zone~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,tp,zone) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - local zone=re:GetHandler():GetLinkedZone(tp)&0x1f + local zone=re:GetHandler():GetLinkedZone(tp)&ZONES_MMZ if c:IsRelateToEffect(e) and zone~=0 and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP_ATTACK,zone) then --Cannot be used as link material local e1=Effect.CreateEffect(c) @@ -52,7 +51,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() diff --git a/official/c95507060.lua b/official/c95507060.lua index 211c923405..e2293b6077 100644 --- a/official/c95507060.lua +++ b/official/c95507060.lua @@ -1,4 +1,5 @@ --狂植物の氾濫 +--Raging Mad Plants local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,RACE_PLANT) end @@ -24,19 +22,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_MZONE,0,nil) local atk=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_PLANT)*300 local c=e:GetHandler() - local tc=g:GetFirst() - for tc in aux.Next(g) do + for tc in g:Iter() do local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) end local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetCountLimit(1) e2:SetCondition(s.descon) e2:SetOperation(s.desop) @@ -48,4 +45,4 @@ end function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsRace,RACE_PLANT),tp,LOCATION_MZONE,0,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95515058.lua b/official/c95515058.lua index 18b5b81930..180c285843 100644 --- a/official/c95515058.lua +++ b/official/c95515058.lua @@ -1,12 +1,11 @@ --剛鬼ザ・ブレード・オーガ --Gouki The Blade Ogre - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Link summon procedure - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xfc),2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_GOUKI),2) --Gains 300 ATK for each monster it points to local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -25,8 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xfc} - +s.listed_series={SET_GOUKI} function s.atkval(e,c) return c:GetLinkedGroup():FilterCount(Card.IsMonster,nil)*300 end @@ -54,7 +52,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c95515060.lua b/official/c95515060.lua index bd518586ac..c7867ab36a 100644 --- a/official/c95515060.lua +++ b/official/c95515060.lua @@ -1,4 +1,5 @@ --静寂のロッド-ケースト +--Rod of Silence - Kay'est local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -43,10 +44,10 @@ function s.distg(e,c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local ec=e:GetHandler() - if not ec:GetEquipTarget() or not re:IsActiveType(TYPE_SPELL) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end + if not ec:GetEquipTarget() or not re:IsSpellEffect() or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g or not g:IsContains(ec:GetEquipTarget()) then return end if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(re:GetHandler(),REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95515518.lua b/official/c95515518.lua index 4d24f6f0fc..c35d77d2b2 100644 --- a/official/c95515518.lua +++ b/official/c95515518.lua @@ -5,7 +5,7 @@ local s,id=GetID() function s.initial_effect(c) --Link Summon c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x109),3,3) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_THE_WEATHER),3,3) --Special Summon 1 of your banished "The Weather" monsters local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -48,12 +48,12 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={54178659} -s.listed_series={0x109} +s.listed_series={SET_THE_WEATHER} function s.spcon1(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.spfilter1(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0x109) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_THE_WEATHER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -70,7 +70,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsLinkSummoned() end function s.spfilter2(c,e,tp) return c:IsCode(54178659) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -88,7 +88,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end function s.eftg(e,c) local lg=e:GetHandler():GetLinkedGroup() - return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x109) and lg:IsContains(c) + return c:IsType(TYPE_EFFECT) and c:IsSetCard(SET_THE_WEATHER) and lg:IsContains(c) end function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) end @@ -104,17 +104,17 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)>0 then local ct=Duel.GetCurrentPhase()<=PHASE_STANDBY and 2 or 1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE+RESET_PHASE+PHASE_STANDBY,0,ct) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TEMP_REMOVE|RESET_PHASE|PHASE_STANDBY,0,ct) --Banish it until the Standby Phase of the next turn local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.retcon) e1:SetOperation(s.retop) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,ct) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,ct) e1:SetLabel(Duel.GetTurnCount()) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) @@ -127,4 +127,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ZONE) Duel.ReturnToField(e:GetLabelObject()) -end +end \ No newline at end of file diff --git a/official/c95515789.lua b/official/c95515789.lua index bc12243e21..e852e34fc4 100644 --- a/official/c95515789.lua +++ b/official/c95515789.lua @@ -1,5 +1,5 @@ --赫の聖女カルテシア ---Red Cartesia, the Virtuous +--Blazing Cartesia, the Virtuous --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -53,12 +53,12 @@ s.listed_names={CARD_ALBAZ} function s.checkop(e,tp,eg,ep,ev,re,r,rp) for tc in eg:Iter() do if tc:IsType(TYPE_FUSION) then - Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tc:GetControler(),id,RESET_PHASE|PHASE_END,0,1) end end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ALBAZ),tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_ALBAZ),tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c9551692.lua b/official/c9551692.lua index 321a4b5e61..ab09957b5a 100644 --- a/official/c9551692.lua +++ b/official/c9551692.lua @@ -77,4 +77,4 @@ function s.selfspop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) end -end +end \ No newline at end of file diff --git a/official/c95519486.lua b/official/c95519486.lua index 542485261e..9e568eed06 100644 --- a/official/c95519486.lua +++ b/official/c95519486.lua @@ -1,4 +1,5 @@ --六武衆-ザンジ +--The Six Samurai - Zanji local s,id=GetID() function s.initial_effect(c) --destroy @@ -21,10 +22,10 @@ function s.initial_effect(c) e2:SetOperation(s.desrepop) c:RegisterEffect(e2) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={id} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x3d) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and not c:IsCode(id) end function s.descon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() @@ -41,7 +42,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.repfilter(c,e) - return c:IsFaceup() and c:IsSetCard(0x3d) + return c:IsFaceup() and c:IsSetCard(SET_SIX_SAMURAI) and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -59,5 +60,5 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() tc:SetStatus(STATUS_DESTROY_CONFIRMED,false) - Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(tc,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c95526884.lua b/official/c95526884.lua index 30887138fa..7630cd4424 100644 --- a/official/c95526884.lua +++ b/official/c95526884.lua @@ -43,4 +43,4 @@ end function s.recop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Recover(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95545183.lua b/official/c95545183.lua index 3136522689..54fabb71c7 100644 --- a/official/c95545183.lua +++ b/official/c95545183.lua @@ -83,4 +83,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c95561146.lua b/official/c95561146.lua index 7ddcf2bf58..eec4c06d4e 100644 --- a/official/c95561146.lua +++ b/official/c95561146.lua @@ -1,4 +1,4 @@ ---Japanese name +--アポピスの蛇神 --Apophis the Serpent --scripted by Naim local s,id=GetID() @@ -75,4 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95561280.lua b/official/c95561280.lua index 2e427bdb8b..2f0cc05ac7 100644 --- a/official/c95561280.lua +++ b/official/c95561280.lua @@ -1,4 +1,5 @@ --猛毒の風 +--Poisonous Winds local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.initial_effect(c) end function s.tg(e,c) return c:IsAttribute(ATTRIBUTE_WIND) -end +end \ No newline at end of file diff --git a/official/c95568112.lua b/official/c95568112.lua index 5d234c3c4f..d7a4c5dfac 100644 --- a/official/c95568112.lua +++ b/official/c95568112.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) --to defense local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e4:SetCode(EVENT_PHASE+PHASE_BATTLE) + e4:SetCode(EVENT_PHASE|PHASE_BATTLE) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1) e4:SetCondition(s.poscon) @@ -67,7 +67,7 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk*100) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -103,4 +103,4 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end -end +end \ No newline at end of file diff --git a/official/c95600067.lua b/official/c95600067.lua index c204d77a8b..87a383ba75 100644 --- a/official/c95600067.lua +++ b/official/c95600067.lua @@ -1,4 +1,5 @@ --宝玉獣 トパーズ・タイガー +--Crystal Beast Topaz Tiger local s,id=GetID() function s.initial_effect(c) --send replace @@ -29,13 +30,13 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) c:RegisterEffect(e1) - Duel.RaiseEvent(c,EVENT_CUSTOM+47408488,e,0,tp,0,0) + Duel.RaiseEvent(c,EVENT_CUSTOM+CARD_CRYSTAL_TREE,e,0,tp,0,0) end function s.condition(e) local phase=Duel.GetCurrentPhase() return (phase==PHASE_DAMAGE or phase==PHASE_DAMAGE_CAL) and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil -end +end \ No newline at end of file diff --git a/official/c95602345.lua b/official/c95602345.lua index 77b5407664..995b16e039 100644 --- a/official/c95602345.lua +++ b/official/c95602345.lua @@ -1,9 +1,9 @@ --- 暗岩の海竜神 --- Kairyu-Shin of the Reef --- Scripted by Hatter +--暗岩の海竜神 +--Kairyu-Shin's Dark Reef +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -32,24 +32,24 @@ function s.spfilter1(c,e,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND|LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND|LOCATION_DECK) end function s.spfilter2(c,e,tp) return c:IsLevelBelow(6) and c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - -- Special Summon (up to 2 with different names) - local g=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + --Special Summon (up to 2 with different names) + local g=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) local ct=math.min(2,Duel.GetLocationCount(tp,LOCATION_MZONE)) if ct>0 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end local sg=aux.SelectUnselectGroup(g,e,tp,1,ct,aux.dncheck,1,tp,HINTMSG_SPSUMMON) if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then - -- Special Summon (any number) - local ng=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + --Special Summon (any number) + local ng=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) local nct=Duel.GetLocationCount(tp,LOCATION_MZONE) if #ng>0 and nct>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then nct=1 end @@ -62,7 +62,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end - -- Cannot Special Summon non-WATER monsters + --Cannot Special Summon non-WATER monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) @@ -70,6 +70,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(function(_,c)return not c:IsAttribute(ATTRIBUTE_WATER)end) - e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_SELF_TURN,Duel.IsTurnPlayer(tp) and 2 or 1) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c9560338.lua b/official/c9560338.lua index d045dc9540..a44a94ecd8 100644 --- a/official/c9560338.lua +++ b/official/c9560338.lua @@ -16,9 +16,9 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} function s.cfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() end function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) @@ -27,7 +27,7 @@ function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.thfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToHand() end function s.spfilter(c,e,tp) return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(5) @@ -47,7 +47,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end --4+: Search 1 "Spellbook" Spell diff --git a/official/c95612049.lua b/official/c95612049.lua index f93180fe33..184edc5941 100644 --- a/official/c95612049.lua +++ b/official/c95612049.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --Ritual Summon - local e1=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsCode,46427957,72426662),nil,nil,nil,nil,s.mfilter,nil,LOCATION_HAND+LOCATION_DECK) + local e1=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsCode,46427957,72426662),nil,nil,nil,nil,s.mfilter,nil,LOCATION_HAND|LOCATION_DECK) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end diff --git a/official/c95614612.lua b/official/c95614612.lua index 6c4090f92b..324350e357 100644 --- a/official/c95614612.lua +++ b/official/c95614612.lua @@ -1,4 +1,5 @@ --砲弾ヤリ貝 +--Cannonball Spear Shellfish local s,id=GetID() function s.initial_effect(c) --immune spell @@ -16,5 +17,5 @@ function s.econ(e) return Duel.IsEnvironment(CARD_UMI) end function s.efilter(e,te) - return te:IsActiveType(TYPE_SPELL) -end + return te:IsSpellEffect() +end \ No newline at end of file diff --git a/official/c95621257.lua b/official/c95621257.lua index 67fc045815..937cf08ed7 100644 --- a/official/c95621257.lua +++ b/official/c95621257.lua @@ -15,4 +15,4 @@ end s.listed_series={SET_ALLY_OF_JUSTICE} function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ALLY_OF_JUSTICE),e:GetHandler():GetControler(),LOCATION_MZONE,0,1,nil) -end +end \ No newline at end of file diff --git a/official/c95638658.lua b/official/c95638658.lua index 736349cc0a..a394979816 100644 --- a/official/c95638658.lua +++ b/official/c95638658.lua @@ -1,4 +1,5 @@ --流星の弓-シール +--Shooting Star Bow - Ceal local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -13,4 +14,4 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c95642274.lua b/official/c95642274.lua index f0ae5c2c84..9184c3f40e 100644 --- a/official/c95642274.lua +++ b/official/c95642274.lua @@ -1,4 +1,5 @@ --謙虚な番兵 +--The Humble Sentry local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,7 +26,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>=1 then Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) local sg=g:Select(p,1,1,nil) - Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end Duel.ShuffleHand(p) -end +end \ No newline at end of file diff --git a/official/c95658967.lua b/official/c95658967.lua index 7dd1a30b58..bc99414c3d 100644 --- a/official/c95658967.lua +++ b/official/c95658967.lua @@ -36,7 +36,7 @@ function s.cfilter(c) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter(c) return ((c:IsMonster() and c:IsAttribute(ATTRIBUTE_LIGHT)) or c:IsSpell()) @@ -94,4 +94,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95664204.lua b/official/c95664204.lua index 1da0579f12..08473daebd 100644 --- a/official/c95664204.lua +++ b/official/c95664204.lua @@ -27,9 +27,9 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0x107f,0x107e,0x207e} +s.listed_series={SET_UTOPIA,SET_ZW,SET_ZS} function s.spfilter(c,e,tp) - return (c:IsSetCard(0x107e) or c:IsSetCard(0x207e)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_ZW) or c:IsSetCard(SET_ZS)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x107f),tp,LOCATION_MZONE,0,1,nil) then + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_UTOPIA),tp,LOCATION_MZONE,0,1,nil) then local op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3),aux.Stringid(id,4)) if op==2 then return end Duel.BreakEffect() @@ -56,13 +56,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end end function s.cfilter(c) - return (c:IsSetCard(0x107e) or c:IsSetCard(0x207e)) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return (c:IsSetCard(SET_ZW) or c:IsSetCard(SET_ZS)) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() @@ -84,4 +84,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95676943.lua b/official/c95676943.lua index 59c9f8b0e9..e263d9da12 100644 --- a/official/c95676943.lua +++ b/official/c95676943.lua @@ -9,15 +9,11 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetCondition(function() return Duel.IsMainPhase() end) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(2000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,2000) end - Duel.PayLPCost(tp,2000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) end end @@ -26,7 +22,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) c:SetTurnCounter(0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetCountLimit(1) e1:SetOperation(s.tgop) e1:SetReset(RESET_PHASE|PHASE_BATTLE,3) diff --git a/official/c95679145.lua b/official/c95679145.lua index 99ed13b72a..b81b36ddb2 100644 --- a/official/c95679145.lua +++ b/official/c95679145.lua @@ -79,7 +79,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ge1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) ge1:SetTargetRange(1,0) ge1:SetTarget(s.splimit) - ge1:SetReset(RESET_PHASE+PHASE_END) + ge1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(ge1,tp) aux.RegisterClientHint(e:GetHandler(),EFFECT_FLAG_OATH,tp,1,0,aux.Stringid(id,2),nil) --lizard check @@ -88,4 +88,4 @@ end --Cannot special summon from extra deck function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return c:IsLocation(LOCATION_EXTRA) -end +end \ No newline at end of file diff --git a/official/c95685352.lua b/official/c95685352.lua index cf7c8c3a79..7f104ad52e 100644 --- a/official/c95685352.lua +++ b/official/c95685352.lua @@ -27,8 +27,8 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1) - e2:SetCondition(s.atkcon2) - e2:SetCost(s.cost) + e2:SetCondition(aux.StatChangeDamageStepCondition) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.target) e2:SetOperation(s.atkop2) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) @@ -43,10 +43,6 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.pendulum_level=7 -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end @@ -61,14 +57,11 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(atk/2)) tc:RegisterEffect(e1) end end -function s.atkcon2(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atkop2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() @@ -77,7 +70,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(math.ceil(atk/2)) tc:RegisterEffect(e1) if c:IsRelateToEffect(e) and c:IsFaceup() then @@ -85,7 +78,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(math.ceil(atk/2)) c:RegisterEffect(e2) end diff --git a/official/c95697223.lua b/official/c95697223.lua index 5eedea2945..1440436366 100644 --- a/official/c95697223.lua +++ b/official/c95697223.lua @@ -1,4 +1,5 @@ --竜の闘志 +--Dragon's Fighting Spirit local s,id=GetID() function s.initial_effect(c) --Activate @@ -29,7 +30,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(ct) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c95701283.lua b/official/c95701283.lua index 0857d930c4..3bad25964a 100644 --- a/official/c95701283.lua +++ b/official/c95701283.lua @@ -21,7 +21,7 @@ function s.sumop(g,e,tp,eg,ep,ev,re,r,rp,c,minc,zone,relzone,exeff) e1:SetCountLimit(1) e1:SetTarget(s.tgtg) e1:SetOperation(s.tgop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -33,4 +33,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.SendtoGrave(c,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c95714077.lua b/official/c95714077.lua index 5592142fd2..7cdb13960e 100644 --- a/official/c95714077.lua +++ b/official/c95714077.lua @@ -21,12 +21,12 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x58} +s.listed_series={SET_WIND_UP} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x58) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_WIND_UP) end function s.filter(c) - return c:IsSetCard(0x58) and c:IsLevelBelow(4) and c:IsAbleToHand() + return c:IsSetCard(SET_WIND_UP) and c:IsLevelBelow(4) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -42,4 +42,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95735217.lua b/official/c95735217.lua index 501dd427ba..7813e5eb56 100644 --- a/official/c95735217.lua +++ b/official/c95735217.lua @@ -1,4 +1,5 @@ --古代の機械巨人-アルティメット・パウンド +--Ancient Gear Golem - Ultimate Pound local s,id=GetID() function s.initial_effect(c) --cannot special summon @@ -34,7 +35,7 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0x7} +s.listed_series={SET_ANCIENT_GEAR} s.listed_names={CARD_POLYMERIZATION} function s.atcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()==e:GetHandler() and aux.bdcon(e,tp,eg,ep,ev,re,r,rp) @@ -45,7 +46,7 @@ function s.costfilter(c) end function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.atop(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() @@ -57,12 +58,12 @@ function s.thfilter1(c) return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand() end function s.thfilter2(c) - return c:IsSetCard(0x7) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ANCIENT_GEAR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK|LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) @@ -78,4 +79,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g2,nil,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c95744531.lua b/official/c95744531.lua index a9a6a4163d..2ef512d761 100644 --- a/official/c95744531.lua +++ b/official/c95744531.lua @@ -1,4 +1,5 @@ --グリグル +--Griggle local s,id=GetID() function s.initial_effect(c) --recover @@ -19,4 +20,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(1-tp,3000,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95750695.lua b/official/c95750695.lua index 0010b467e6..915fbf72a8 100644 --- a/official/c95750695.lua +++ b/official/c95750695.lua @@ -39,4 +39,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9576193.lua b/official/c9576193.lua index d4f4b483c2..d75fa75fd8 100644 --- a/official/c9576193.lua +++ b/official/c9576193.lua @@ -1,4 +1,5 @@ --モンスター・スロット +--Monster Slots local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) end function s.filter1(c,tp) local lv=c:GetLevel() - return lv>0 and c:IsFaceup() and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,lv) + return lv>0 and c:IsFaceup() and Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,lv) end function s.filter2(c,lv) return c:IsLevel(lv) and c:IsAbleToRemove() and aux.SpElimFilter(c,true) @@ -26,7 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g2=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,g1:GetFirst():GetLevel()) + local g2=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,g1:GetFirst():GetLevel()) e:SetLabelObject(g1:GetFirst()) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) @@ -49,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(tp) end else Duel.ShuffleHand(tp) end -end +end \ No newline at end of file diff --git a/official/c95772051.lua b/official/c95772051.lua index 22b6c7d249..9be6009e50 100644 --- a/official/c95772051.lua +++ b/official/c95772051.lua @@ -1,4 +1,5 @@ --魔聖騎士ランスロット +--Ignoble Knight of Black Laundsallyn local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x207a} +s.listed_series={SET_NOBLE_ARMS} function s.spfilter(c,ft) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) @@ -46,11 +47,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function s.thfilter(c) - return c:IsSetCard(0x207a) and c:IsAbleToHand() + return c:IsSetCard(SET_NOBLE_ARMS) and c:IsAbleToHand() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x107a) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x107a) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_NOBLE_KNIGHT) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_NOBLE_KNIGHT) Duel.Release(g,REASON_COST) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -64,4 +65,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95784434.lua b/official/c95784434.lua index ed4575db6a..9ec5fd1343 100644 --- a/official/c95784434.lua +++ b/official/c95784434.lua @@ -1,4 +1,5 @@ --モルティング・エスケープ +--Molting Escape local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE)) @@ -21,7 +22,7 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) if (r&REASON_BATTLE)~=0 then - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE,0,1) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1) return true else return false end end @@ -35,6 +36,6 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(300) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:GetEquipTarget():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c95789089.lua b/official/c95789089.lua index 0d3679f88f..c5b2bdec78 100644 --- a/official/c95789089.lua +++ b/official/c95789089.lua @@ -1,4 +1,5 @@ --カンガルー・チャンプ +--Kangaroo Champ local s,id=GetID() function s.initial_effect(c) --change position @@ -26,4 +27,4 @@ function s.cpop(e,tp,eg,ep,ev,re,r,rp) if g:IsRelateToBattle() and g:IsAttackPos() then Duel.ChangePosition(g,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c95793022.lua b/official/c95793022.lua index c42e180dee..ce577be887 100644 --- a/official/c95793022.lua +++ b/official/c95793022.lua @@ -1,5 +1,5 @@ --星杯の守護竜アルマドゥーク ---World Chalice Guardragon Almarduk +--World Chalice Guardragon Almarduke --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -31,7 +31,7 @@ function s.contactfil(tp) return Duel.GetReleaseGroup(tp) end function s.contactop(g) - Duel.Release(g,REASON_COST+REASON_MATERIAL) + Duel.Release(g,REASON_COST|REASON_MATERIAL) end function s.descon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -46,9 +46,9 @@ function s.descfilter(c,lk) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetBattleTarget() - if chk==0 then return tc and tc:IsLinkMonster() and Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tc:GetLink()) end + if chk==0 then return tc and tc:IsLinkMonster() and Duel.IsExistingMatchingCard(s.descfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tc:GetLink()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.descfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tc:GetLink()) + local g=Duel.SelectMatchingCard(tp,s.descfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tc:GetLink()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -63,5 +63,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c9581215.lua b/official/c9581215.lua index 885169bbbc..df80a71a93 100644 --- a/official/c9581215.lua +++ b/official/c9581215.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and Duel.GetCurrentChain(true)>1 + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsMonsterEffect() and Duel.IsChainDisablable(ev) and Duel.GetCurrentChain(true)>1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -25,7 +25,7 @@ function s.filter(c,cd) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if not Duel.NegateEffect(ev) then return end - local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_HAND+LOCATION_DECK,nil,re:GetHandler():GetOriginalCode()) + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_HAND|LOCATION_DECK,nil,re:GetHandler():GetOriginalCode()) local hg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil) local rc=0 if #g>0 and Duel.SelectYesNo(1-tp,aux.Stringid(id,0)) then @@ -40,5 +40,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local sg=hg:RandomSelect(tp,1) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c95816395.lua b/official/c95816395.lua index f1e2b9dfc3..deb7a9740d 100644 --- a/official/c95816395.lua +++ b/official/c95816395.lua @@ -1,4 +1,5 @@ --どぐう +--Dogu local s,id=GetID() function s.initial_effect(c) --to grave @@ -21,7 +22,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_GRAVE) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end @@ -30,7 +31,7 @@ function s.cfilter(c,lv) end function s.filter(c,tp) return c:IsMonster() and c:IsAbleToHand() - and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,c:GetLevel()) + and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,c:GetLevel()) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,tp) end @@ -43,4 +44,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c95824983.lua b/official/c95824983.lua index 39e0ac6da4..ded6c72dc5 100644 --- a/official/c95824983.lua +++ b/official/c95824983.lua @@ -1,9 +1,9 @@ --- 電気海月-フィサリア- --- Physalia --- Scripted by Hatter +--電気海月-フィサリア- +--Electric Jellyfish +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon + --Special Summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -33,9 +33,9 @@ function s.spcostfilter(c,tp) and Duel.GetMZoneCount(tp,c)>0 end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_ONFIELD,0,1,1,nil,tp) Duel.SendtoGrave(g,REASON_COST) end function s.spfilter(c,e,tp) @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.negcon(e,tp,eg,ep,ev,re,r,rp) - return rp==1-tp and Duel.IsChainDisablable(ev) and (re:IsActiveType(TYPE_SPELL) or re:IsActiveType(TYPE_MONSTER)) + return rp==1-tp and Duel.IsChainDisablable(ev) and (re:IsSpellEffect() or re:IsMonsterEffect()) and (Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_UMI),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) or Duel.IsEnvironment(CARD_UMI)) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -66,15 +66,15 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateEffect(ev) and c:IsFaceup() and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() - -- Gain ATK/DEF + --Gain ATK/DEF local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c95825679.lua b/official/c95825679.lua index e61e297e9c..cf96c03dc9 100644 --- a/official/c95825679.lua +++ b/official/c95825679.lua @@ -40,11 +40,11 @@ function s.indval(e,c) return not c:IsType(TYPE_RITUAL) end function s.indeval(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) and not re:IsActiveType(TYPE_RITUAL) + return re:IsMonsterEffect() and not re:IsActiveType(TYPE_RITUAL) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_RITUAL) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsRitualSummoned() and rp==1-tp and c:IsPreviousControler(tp) end function s.spfilter(c,e,tp) @@ -53,15 +53,15 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95833645.lua b/official/c95833645.lua index 9fd5e0c7bd..4df03f2365 100644 --- a/official/c95833645.lua +++ b/official/c95833645.lua @@ -25,14 +25,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -57,13 +57,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c9583383.lua b/official/c9583383.lua index 37107cc8ec..5e36d9ea2d 100644 --- a/official/c9583383.lua +++ b/official/c9583383.lua @@ -1,4 +1,5 @@ --ガガガカイザー +--Gagaga Caesar local s,id=GetID() function s.initial_effect(c) --atklimit @@ -25,7 +26,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.atkcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x54),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) end function s.rfilter(c,tp) local lv=c:GetLevel() @@ -34,18 +35,18 @@ function s.rfilter(c,tp) end function s.tfilter(c,clv) local lv=c:GetLevel() - return lv>0 and lv~=clv and c:IsFaceup() and c:IsSetCard(0x54) + return lv>0 and lv~=clv and c:IsFaceup() and c:IsSetCard(SET_GAGAGA) end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) local lv=g:GetFirst():GetLevel() Duel.SetTargetParam(lv) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.lvop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x54),tp,LOCATION_MZONE,0,nil) + local g=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_GAGAGA),tp,LOCATION_MZONE,0,nil) local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local tc=g:GetFirst() for tc in aux.Next(g) do @@ -54,7 +55,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c95841282.lua b/official/c95841282.lua index 99f367531e..0b03ac6a3a 100644 --- a/official/c95841282.lua +++ b/official/c95841282.lua @@ -1,4 +1,5 @@ --ネコ耳族 +--Cat's Ear Tribe local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.atkcon(e) end function s.atktg(e,c) return c==e:GetHandler():GetBattleTarget() -end +end \ No newline at end of file diff --git a/official/c95856586.lua b/official/c95856586.lua index b085179add..8f88f98bb6 100644 --- a/official/c95856586.lua +++ b/official/c95856586.lua @@ -82,7 +82,7 @@ end function s.mtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local g=e:GetLabelObject():Filter(s.mcfilter,nil,e,tp) if chkc then return g:IsContains(chkc) and s.mcfilter(chkc,e,tp) end - if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,TYPE_XYZ) end + if chk==0 then return #g>0 and Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,nil,TYPE_XYZ) end Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) if #g==1 then Duel.SetTargetCard(g:GetFirst()) @@ -96,7 +96,7 @@ function s.mop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if e:GetHandler():IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsType),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,tc,TYPE_XYZ) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsType),tp,LOCATION_GRAVE|LOCATION_EXTRA,0,1,1,tc,TYPE_XYZ) if #g>0 then Duel.Overlay(tc,g,true) end @@ -113,4 +113,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.MoveSequence(tc,0) Duel.ConfirmDecktop(tp,1) end -end +end \ No newline at end of file diff --git a/official/c95886782.lua b/official/c95886782.lua index 45ea0f2644..7b4ddaa515 100644 --- a/official/c95886782.lua +++ b/official/c95886782.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) - e1:SetRange(LOCATION_HAND+LOCATION_MZONE) + e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetCondition(s.eqcon) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) @@ -38,12 +38,12 @@ function s.initial_effect(c) e3:SetOperation(s.rop) c:RegisterEffect(e3) end -s.listed_series={0x107f} +s.listed_series={SET_UTOPIA} function s.eqcon(e) return e:GetHandler():CheckUniqueOnField(e:GetHandlerPlayer()) end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x107f) + return c:IsFaceup() and c:IsSetCard(SET_UTOPIA) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -70,7 +70,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) @@ -95,4 +95,4 @@ function s.rcon(e,tp,eg,ep,ev,re,r,rp) end function s.rop(e,tp,eg,ep,ev,re,r,rp) return Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end +end \ No newline at end of file diff --git a/official/c95905259.lua b/official/c95905259.lua index 0d416a4b87..883f7145a4 100644 --- a/official/c95905259.lua +++ b/official/c95905259.lua @@ -1,4 +1,5 @@ --予言僧 チョウレン +--Chow Len the Prophet local s,id=GetID() function s.initial_effect(c) --confirm @@ -33,8 +34,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c95911373.lua b/official/c95911373.lua index 4e6c0dab59..d6cd2e4271 100644 --- a/official/c95911373.lua +++ b/official/c95911373.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end) + e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c95920682.lua b/official/c95920682.lua index 0b9eb5d47a..533ca8ea82 100644 --- a/official/c95920682.lua +++ b/official/c95920682.lua @@ -1,4 +1,5 @@ --ヒロイック・ギフト +--Heroic Gift local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLP(1-tp)==8000 then return end Duel.SetLP(1-tp,8000) Duel.Draw(tp,2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95923441.lua b/official/c95923441.lua index 7da6c5441c..acf9aa2893 100644 --- a/official/c95923441.lua +++ b/official/c95923441.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetCondition(s.sumcon) e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ROCK)) diff --git a/official/c95929069.lua b/official/c95929069.lua index ddaa08c32f..666d9938ec 100644 --- a/official/c95929069.lua +++ b/official/c95929069.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end s.listed_names={68535320} function s.dfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.dfilter(chkc) end @@ -41,4 +41,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c95937545.lua b/official/c95937545.lua index 45d400256c..70de0d809d 100644 --- a/official/c95937545.lua +++ b/official/c95937545.lua @@ -60,7 +60,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(1500) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) end end diff --git a/official/c95943058.lua b/official/c95943058.lua index c27a341d59..f72c6c18e3 100644 --- a/official/c95943058.lua +++ b/official/c95943058.lua @@ -8,18 +8,14 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfBanish) e1:SetCondition(s.condition) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) -end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_FIEND) and not c:IsHasEffect(EFFECT_EXTRA_ATTACK) @@ -39,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_EXTRA_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(1) tc:RegisterEffect(e1) end @@ -49,9 +45,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_REMOVED) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCountLimit(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) + e2:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,2) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -59,7 +55,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetLabel()==Duel.GetTurnCount(tp) + return Duel.IsTurnPlayer(tp) and e:GetLabel()==Duel.GetTurnCount(tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -69,4 +65,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) -end +end \ No newline at end of file diff --git a/official/c95952802.lua b/official/c95952802.lua index 1bbfe20360..8f2f8bf8a8 100644 --- a/official/c95952802.lua +++ b/official/c95952802.lua @@ -1,7 +1,8 @@ --フラワー・ウルフ +--Flower Wolf local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,90357090,43500484) -end +end \ No newline at end of file diff --git a/official/c95953557.lua b/official/c95953557.lua index faccf6c103..3748f71144 100644 --- a/official/c95953557.lua +++ b/official/c95953557.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1},EFFECT_COUNT_CODE_DUEL) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.regtg) e2:SetOperation(s.regop) c:RegisterEffect(e2) @@ -70,7 +70,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetRange(LOCATION_REMOVED) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,ct) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) @@ -99,4 +99,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) end end end ---trans rights +--trans rights \ No newline at end of file diff --git a/official/c95956346.lua b/official/c95956346.lua index 05fbe90c12..2890b0ff0a 100644 --- a/official/c95956346.lua +++ b/official/c95956346.lua @@ -1,4 +1,5 @@ --シャインエンジェル +--Shining Angel local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c9596126.lua b/official/c9596126.lua index a735420353..14570a20d0 100644 --- a/official/c9596126.lua +++ b/official/c9596126.lua @@ -1,6 +1,5 @@ --カオス・ソーサラー --Chaos Sorcerer - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -41,8 +40,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=e:GetHandlerPlayer() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -51,7 +50,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -74,7 +73,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e:GetHandler():RegisterEffect(e1,true) end function s.tgfilter(c) diff --git a/official/c95990456.lua b/official/c95990456.lua index 4b82d88ec3..da91185d1f 100644 --- a/official/c95990456.lua +++ b/official/c95990456.lua @@ -37,4 +37,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c95992081.lua b/official/c95992081.lua index adbbc414cd..801c7219ac 100644 --- a/official/c95992081.lua +++ b/official/c95992081.lua @@ -1,4 +1,5 @@ --虚空海竜リヴァイエール +--Leviair the Sea Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -12,15 +13,11 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCountLimit(1) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsFaceup() and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -37,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c95993388.lua b/official/c95993388.lua index 9717cc092e..f94d0b9e88 100644 --- a/official/c95993388.lua +++ b/official/c95993388.lua @@ -52,7 +52,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,1)) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) @@ -80,4 +80,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96008713.lua b/official/c96008713.lua index 8daf009715..2e5f658ae5 100644 --- a/official/c96008713.lua +++ b/official/c96008713.lua @@ -1,4 +1,5 @@ --マジックアーム・シールド +--Magical Arm Shield local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.CalculateDamage(a,tc) end end -end +end \ No newline at end of file diff --git a/official/c96012004.lua b/official/c96012004.lua index 36988a12cf..5459790ac6 100644 --- a/official/c96012004.lua +++ b/official/c96012004.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) end function s.coincon(e,tp,eg,ep,ev,re,r,rp) local ex,eg,et,cp,ct=Duel.GetOperationInfo(ev,CATEGORY_COIN) - if ex and ct==1 and re:IsActiveType(TYPE_MONSTER) then + if ex and ct==1 and re:IsMonsterEffect() then e:SetLabelObject(re) return true else return false end diff --git a/official/c96015976.lua b/official/c96015976.lua index f0aceb8b8b..cac82deb02 100644 --- a/official/c96015976.lua +++ b/official/c96015976.lua @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(dc) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c96026108.lua b/official/c96026108.lua index cb7a24a5ec..ce95d68c85 100644 --- a/official/c96026108.lua +++ b/official/c96026108.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(Drytron.TributeCost) e2:SetTarget(s.sptg) @@ -25,9 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.spconlimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(0x151) + return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(SET_DRYTRON) end function s.sumfilter(c) return not c:IsSummonableCard() @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c96029574.lua b/official/c96029574.lua index ae76a5aebf..10a0191fa5 100644 --- a/official/c96029574.lua +++ b/official/c96029574.lua @@ -39,7 +39,7 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.desfilter(chkc) end @@ -74,4 +74,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) tc:EnableGeminiStatus() end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c9603252.lua b/official/c9603252.lua index 800e992d47..9c448967f7 100644 --- a/official/c9603252.lua +++ b/official/c9603252.lua @@ -1,14 +1,13 @@ --ウィッチクラフト・バイスマスター ---Witchcrafter Vice-Master +--Witchcrafter Vice-Madame --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving c:EnableReviveLimit() --Fusion Summon procedure - Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,0x128),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) + Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_WITCHCRAFTER),aux.FilterBoolFunctionEx(Card.IsRace,RACE_SPELLCASTER)) --Destroy 1 card on the field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -39,13 +38,12 @@ function s.initial_effect(c) c:RegisterEffect(e3) end --Lists "Witchcrafter" archetype and its own name -s.listed_series={0x128} +s.listed_series={SET_WITCHCRAFTER} s.listed_names={id} - --Check for activated Spell Card/effect or non-fusion Spellcaster's effect function s.condition(e,tp,eg,ep,ev,re,r,rp) local race=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_RACE) - return re:IsActiveType(TYPE_SPELL) or (not re:IsActiveType(TYPE_FUSION) and re:IsActiveType(TYPE_MONSTER) + return re:IsSpellEffect() or (not re:IsActiveType(TYPE_FUSION) and re:IsMonsterEffect() and race&RACE_SPELLCASTER>0) end --Activation legality @@ -58,17 +56,17 @@ function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk) end --Effect 2 function s.spfilter(c,e,tp) - return c:IsSetCard(0x128) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end --Effect 3 function s.thfilter(c) - return c:IsSetCard(0x128) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_WITCHCRAFTER) and c:IsSpellTrap() and c:IsAbleToHand() end function s.tg3(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -89,7 +87,7 @@ end function s.op2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end diff --git a/official/c9603356.lua b/official/c9603356.lua index a7e018c729..c083707835 100644 --- a/official/c9603356.lua +++ b/official/c9603356.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end) diff --git a/official/c96051150.lua b/official/c96051150.lua index a6119a5b7a..73909a45e4 100644 --- a/official/c96051150.lua +++ b/official/c96051150.lua @@ -1,6 +1,5 @@ --陽炎獣 メコレオス --Hazy Flame Mantikor - local s,id=GetID() function s.initial_effect(c) --Cannot be targeted by opponent's card effects @@ -20,16 +19,16 @@ function s.initial_effect(c) e2:SetCountLimit(1) e2:SetCost(s.cost) e2:SetOperation(s.operation) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) c:RegisterEffect(e2) end function s.cfilter(c) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function s.operation(e,tp,eg,ep,ev,re,r,rp) @@ -42,7 +41,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c96084564.lua b/official/c96084564.lua index 00ae58696c..63d7b1b305 100644 --- a/official/c96084564.lua +++ b/official/c96084564.lua @@ -1,30 +1,30 @@ --- エルロン --- Aileron --- Scripted by Hatter +--エルロン +--Aileron +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Increase ATK of equipped "Sky Striker Ace" monster + --Increase ATK of equipped "Sky Striker Ace" monster local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(0x1115) end) + e1:SetCondition(function(e) return e:GetHandler():GetEquipTarget():IsSetCard(SET_SKY_STRIKER_ACE) end) e1:SetValue(400) c:RegisterEffect(e1) - -- Equip to a "Sky Striker Ace" monster + --Equip to a "Sky Striker Ace" monster local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_EQUIP) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetRange(LOCATION_HAND+LOCATION_MZONE) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetRange(LOCATION_HAND|LOCATION_MZONE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,id) e2:SetCondition(function() return Duel.IsMainPhase() end) e2:SetTarget(s.eqtg) e2:SetOperation(s.eqop) c:RegisterEffect(e2) - -- Send 1 "Sky Striker" Spell to GY + --Send 1 "Sky Striker" Spell to GY local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOGRAVE) @@ -37,15 +37,15 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0x115,0x1115} +s.listed_series={SET_SKY_STRIKER,SET_SKY_STRIKER_ACE} function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return c~=chkc and chkc:IsLocation(LOCATION_MZONE) - and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(0x1115) end + and chkc:IsControler(tp) and chkc:IsFaceup() and chkc:IsSetCard(SET_SKY_STRIKER_ACE) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 - and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,0x1115),tp,LOCATION_MZONE,0,1,c) end + and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER_ACE),tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,0x1115),tp,LOCATION_MZONE,0,1,1,c) + Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_SKY_STRIKER_ACE),tp,LOCATION_MZONE,0,1,1,c) Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) @@ -55,11 +55,11 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,c,tc,true) then - -- Equip limit + --Equip limit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(e,c) return c==e:GetLabelObject() end) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -68,7 +68,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return c:IsSetCard(0x115) and c:IsSpell() and c:IsAbleToGrave() + return c:IsSetCard(SET_SKY_STRIKER) and c:IsSpell() and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -80,4 +80,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9608555.lua b/official/c9608555.lua index e17460c66a..753bb966e2 100644 --- a/official/c9608555.lua +++ b/official/c9608555.lua @@ -89,4 +89,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g,true) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96099959.lua b/official/c96099959.lua index 1af6e9c56d..92d5778c3a 100644 --- a/official/c96099959.lua +++ b/official/c96099959.lua @@ -1,4 +1,5 @@ --X-セイバー パロムロ +--X-Saber Palomuro local s,id=GetID() function s.initial_effect(c) --special summon @@ -9,23 +10,19 @@ function s.initial_effect(c) e1:SetRange(LOCATION_GRAVE) e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xd} +s.listed_series={SET_SABER} function s.filter(c,ec,tp) - return c~=ec and c:IsSetCard(0xd) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) + return c~=ec and c:IsSetCard(SET_SABER) and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousControler(tp) and c:IsReason(REASON_BATTLE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,e:GetHandler(),tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -35,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96100333.lua b/official/c96100333.lua index 7132d8f309..0e75e853e8 100644 --- a/official/c96100333.lua +++ b/official/c96100333.lua @@ -111,7 +111,7 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg==0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) diff --git a/official/c96142517.lua b/official/c96142517.lua index dba11bc64e..51f4db81ce 100644 --- a/official/c96142517.lua +++ b/official/c96142517.lua @@ -13,21 +13,21 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1048,0x1073} +s.listed_series={SET_NUMBER_C,SET_CXYZ} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -46,7 +46,7 @@ function s.filter2(c,e,tp,rk,g1) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+1,g) end function s.spfilter(c,e,tp,rk,g) - if c:GetRank()~=rk or (not c:IsSetCard(0x1048) and not c:IsSetCard(0x1073)) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end + if c:GetRank()~=rk or (not c:IsSetCard(SET_NUMBER_C) and not c:IsSetCard(SET_CXYZ)) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return false end return not c.rum_limit or g:IsExists(function(mc) return c.rum_limit(mc,e) end,1,nil) and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -83,4 +83,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(sc,mg) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96146814.lua b/official/c96146814.lua index e770396d33..e2512fc80c 100644 --- a/official/c96146814.lua +++ b/official/c96146814.lua @@ -1,4 +1,5 @@ --ADチェンジャー +--A/D Changer local s,id=GetID() function s.initial_effect(c) --adchange @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_GRAVE) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c96148285.lua b/official/c96148285.lua index b2bb82c054..b60aed3a7b 100644 --- a/official/c96148285.lua +++ b/official/c96148285.lua @@ -1,4 +1,5 @@ --誘発召喚 +--Triggered Summon local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c96150936.lua b/official/c96150936.lua index a8f315406c..a8919625bf 100644 --- a/official/c96150936.lua +++ b/official/c96150936.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x71),2,2) + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_MADOLCHE),2,2) --destroy replace local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) @@ -28,9 +28,9 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) c:RegisterEffect(e3) end -s.listed_series={0x71} +s.listed_series={SET_MADOLCHE} function s.desrepfilter(c) - return c:IsSetCard(0x71) and c:IsMonster() and c:IsAbleToDeck() and aux.nvfilter(c) + return c:IsSetCard(SET_MADOLCHE) and c:IsMonster() and c:IsAbleToDeck() and aux.nvfilter(c) end function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) @@ -40,14 +40,14 @@ end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,s.desrepfilter,tp,LOCATION_GRAVE,0,1,1,nil) - Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_REPLACE) + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT|REASON_REPLACE) end function s.linkfilter(c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsMonster() + return c:IsFaceup() and c:IsSetCard(SET_MADOLCHE) and c:IsMonster() end function s.indescon(e,c) return e:GetHandler():GetLinkedGroup():IsExists(s.linkfilter,1,nil) end function s.indestg(e,c) - return c:IsFaceup() and c:IsSetCard(0x71) and c:IsSpellTrap() -end + return c:IsFaceup() and c:IsSetCard(SET_MADOLCHE) and c:IsSpellTrap() +end \ No newline at end of file diff --git a/official/c96156729.lua b/official/c96156729.lua index c5a2c45cf4..a9c6a89fb5 100644 --- a/official/c96156729.lua +++ b/official/c96156729.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end -s.listed_series={0xf0} +s.listed_series={SET_WINDWITCH} function s.counterfilter(c) return c:IsAttribute(ATTRIBUTE_WIND) end @@ -30,17 +30,17 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) return not c:IsAttribute(ATTRIBUTE_WIND) end function s.tgfilter(c,e,tp) - return c:IsSetCard(0xf0) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) + return c:IsSetCard(SET_WINDWITCH) and c:IsFaceup() and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.spfilter(c,e,tp,code) - return not c:IsCode(code) and c:IsSetCard(0xf0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return not c:IsCode(code) and c:IsSetCard(SET_WINDWITCH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tgfilter(chkc,e,tp) end diff --git a/official/c96157835.lua b/official/c96157835.lua index fa37b55b88..65f787f6c3 100644 --- a/official/c96157835.lua +++ b/official/c96157835.lua @@ -1,4 +1,5 @@ --RR-アーセナル・ファルコン +--Raidraptor - Arsenal Falcon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.spcost1) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.sptg1) e1:SetOperation(s.spop1) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -34,12 +35,8 @@ function s.initial_effect(c) e3:SetOperation(s.spop2) c:RegisterEffect(e3) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} s.listed_names={id} -function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.spfilter1(c,e,tp) return c:IsRace(RACE_WINGEDBEAST) and c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -57,17 +54,17 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) end end function s.ctcon(e) - return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xba) + return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_RAIDRAPTOR) end function s.ctval(e,c) - return e:GetHandler():GetOverlayGroup():FilterCount(Card.IsSetCard,nil,0xba)-1 + return e:GetHandler():GetOverlayGroup():FilterCount(Card.IsSetCard,nil,SET_RAIDRAPTOR)-1 end function s.spcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xba) and c:IsPreviousLocation(LOCATION_MZONE) + return c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,SET_RAIDRAPTOR) and c:IsPreviousLocation(LOCATION_MZONE) end function s.spfilter2(c,e,tp) - return c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_RAIDRAPTOR) and c:IsType(TYPE_XYZ) and not c:IsCode(id) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -84,4 +81,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,c) end end -end +end \ No newline at end of file diff --git a/official/c96163807.lua b/official/c96163807.lua index 96888e5f27..7a907b59b1 100644 --- a/official/c96163807.lua +++ b/official/c96163807.lua @@ -1,4 +1,5 @@ --冥界騎士トリスタン +--Tristan, Knight of the Underworld local s,id=GetID() function s.initial_effect(c) --tohand @@ -38,4 +39,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.atkcon(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_ZOMBIE),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) -end +end \ No newline at end of file diff --git a/official/c96182448.lua b/official/c96182448.lua index f302520619..68510524ad 100644 --- a/official/c96182448.lua +++ b/official/c96182448.lua @@ -1,5 +1,5 @@ --ニトロ・シンクロン --- Nitro Synchron +--Nitro Synchron local s,id=GetID() function s.initial_effect(c) --draw @@ -14,10 +14,10 @@ function s.initial_effect(c) e1:SetOperation(s.drop) c:RegisterEffect(e1) end -s.listed_series={0x2d} +s.listed_series={SET_NITRO} function s.drcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(0x2d) + return c:IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO and c:GetReasonCard():IsSetCard(SET_NITRO) end function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -28,4 +28,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c96203584.lua b/official/c96203584.lua index 6df8d1d659..ec42777ee7 100644 --- a/official/c96203584.lua +++ b/official/c96203584.lua @@ -1,5 +1,5 @@ --溟界の大蛟 ---Ogdoadic Flood +--Ogdoadic Serpent Strike --Scripted by Neo Yuno local s,id=GetID() function s.initial_effect(c) @@ -43,9 +43,9 @@ function s.spfilter(c,e,tp,att) return c:IsRace(RACE_REPTILE) and not c:IsOriginalAttribute(att) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,e,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_MZONE|LOCATION_HAND,0,1,1,nil,e,tp) local att=g:GetFirst():GetOriginalAttribute() e:SetLabel(att) Duel.SendtoGrave(g,REASON_COST) @@ -85,4 +85,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96214561.lua b/official/c96214561.lua index e3ef9da3b1..9b8a894eaf 100644 --- a/official/c96214561.lua +++ b/official/c96214561.lua @@ -1,5 +1,5 @@ --招神鳥シムルグ ---Simorgh, Bird of Summoning +--Simorgh, Bird of Bringing --scripted by Larry126 local s,id=GetID() function s.initial_effect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0x12d} +s.listed_series={SET_SIMORGH} function s.thfilter(c) - return c:IsSetCard(0x12d) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_SIMORGH) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -60,7 +60,7 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end @@ -70,10 +70,10 @@ function s.ssop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(id,2)) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTarget(s.sslimit) Duel.RegisterEffect(e1,tp) end function s.sslimit(e,c) return not c:IsRace(RACE_WINGEDBEAST) -end +end \ No newline at end of file diff --git a/official/c96216229.lua b/official/c96216229.lua index c5bdf446ce..2f19dfa2da 100644 --- a/official/c96216229.lua +++ b/official/c96216229.lua @@ -1,4 +1,5 @@ --剣闘獣の戦車 +--Gladiator Beast War Chariot local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,10 +13,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x19),tp,LOCATION_MZONE,0,1,nil) - and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),tp,LOCATION_MZONE,0,1,nil) + and re:IsMonsterEffect() and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -28,4 +29,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96218085.lua b/official/c96218085.lua index bea9114afc..297dbfd3f2 100644 --- a/official/c96218085.lua +++ b/official/c96218085.lua @@ -1,4 +1,5 @@ --中央突破 +--Breakthrough! local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,13 +12,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} s.listed_names={63176202} function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentPhase()0 end function s.filter(c) - return c:IsFaceup() and c:HasLevel() and c:IsSetCard(0xba) + return c:IsFaceup() and c:HasLevel() and c:IsSetCard(SET_RAIDRAPTOR) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end @@ -56,7 +56,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -64,7 +64,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetTurnID()==Duel.GetTurnCount() and not e:GetHandler():IsReason(REASON_RETURN) end function s.thfilter(c) - return c:IsSetCard(0xba) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_RAIDRAPTOR) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -77,4 +77,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96352326.lua b/official/c96352326.lua index 9fb3a3e19d..a02bec1c74 100644 --- a/official/c96352326.lua +++ b/official/c96352326.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.poscon) e2:SetTarget(s.postg) @@ -38,12 +38,12 @@ function s.spfilter(c,e,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end - local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp) + local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil,e,tp) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,1,nil) @@ -55,7 +55,7 @@ function s.posfilter(c) return c:IsRace(RACE_SPELLCASTER) and c:IsFacedown() and c:IsDefensePos() end function s.poscon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.IsMainPhase() + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -68,4 +68,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp,chk) local pos=Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEUP_DEFENSE) Duel.ChangePosition(tc,pos) end -end +end \ No newline at end of file diff --git a/official/c96355986.lua b/official/c96355986.lua index 2946dc68e3..9a28cba8c8 100644 --- a/official/c96355986.lua +++ b/official/c96355986.lua @@ -1,4 +1,5 @@ --ホーリージャベリン +--Enchanted Javelin local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,7 +14,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local rec=tc:GetAttack() Duel.Recover(tp,rec,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96363153.lua b/official/c96363153.lua index 5c2c3c1aa5..47b62dd747 100644 --- a/official/c96363153.lua +++ b/official/c96363153.lua @@ -1,4 +1,5 @@ --調律 +--Tuning local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1017} +s.listed_series={SET_SYNCHRON} function s.filter(c) - return c:IsSetCard(0x1017) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() + return c:IsSetCard(SET_SYNCHRON) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) @@ -29,4 +30,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.DiscardDeck(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9637706.lua b/official/c9637706.lua index 935ebb2e52..3661b7adaf 100644 --- a/official/c9637706.lua +++ b/official/c9637706.lua @@ -1,4 +1,5 @@ --デス・ウォンバット +--Des Wombat local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -16,4 +17,4 @@ end function s.damval(e,re,val,r,rp,rc) if (r&REASON_EFFECT)~=0 then return 0 else return val end -end +end \ No newline at end of file diff --git a/official/c96378317.lua b/official/c96378317.lua index 622825e43a..aa099169ed 100644 --- a/official/c96378317.lua +++ b/official/c96378317.lua @@ -1,7 +1,6 @@ --鉄獣の邂逅 --Tri-Brigade Rendezvous --Scripted by Hatter - local s,id=GetID() function s.initial_effect(c) --ATK up @@ -12,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(1,id) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) c:RegisterEffect(e1) @@ -27,9 +26,6 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c,e) return c:IsFaceup() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsCanBeEffectTarget(e) and c:IsLinked() @@ -45,17 +41,17 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if #g>0 then g:ForEach(s.op,e:GetHandler()) end end -function s.op(tc,c) +function s.op(tc,c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(700) tc:RegisterEffect(e1) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsLinked() and c:IsLocation(LOCATION_MZONE) - and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) + and c:IsControler(tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT|REASON_BATTLE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(s.repfilter,1,nil,tp) end @@ -66,4 +62,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c96380700.lua b/official/c96380700.lua index 17008ba114..3f1cfb1ed1 100644 --- a/official/c96380700.lua +++ b/official/c96380700.lua @@ -19,7 +19,7 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x101} +s.listed_series={SET_CODE_TALKER} function s.matfilter(c,lc,sumtype,tp) return c:IsLevelBelow(2) and c:IsRace(RACE_CYBERSE,lc,sumtype,tp) end @@ -36,7 +36,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabelObject(g:GetFirst()) end function s.spfilter(c,e,tp,rc) - return c:IsSetCard(0x101) and c:IsMonster() and not c:IsOriginalCodeRule(rc:GetOriginalCodeRule()) + return c:IsSetCard(SET_CODE_TALKER) and c:IsMonster() and not c:IsOriginalCodeRule(rc:GetOriginalCodeRule()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) diff --git a/official/c96381979.lua b/official/c96381979.lua index 081f62af84..494b7b5b6c 100644 --- a/official/c96381979.lua +++ b/official/c96381979.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) - e2:SetCost(s.discost) + e2:SetCost(Cost.Detach(1)) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) @@ -38,12 +38,12 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x7c} +s.listed_series={SET_FIRE_FORMATION} function s.setcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.filter(c) - return c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsSSetable() + return c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -55,10 +55,6 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.SSet(tp,g:GetFirst()) end end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.dfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsRace(RACE_BEASTWARRIOR) end @@ -73,12 +69,12 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) tc:RegisterEffect(e2) end end @@ -86,7 +82,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_FIRE_FORMATION) and c:IsSpellTrap() and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local nc=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,3,nil) diff --git a/official/c96383838.lua b/official/c96383838.lua index 93685ee549..62167333fd 100644 --- a/official/c96383838.lua +++ b/official/c96383838.lua @@ -1,4 +1,5 @@ --トライワイトゾーン +--Tri-Wight local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if #sg>ft then sg=sg:Select(tp,ft,ft,nil) end Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c96384007.lua b/official/c96384007.lua index 27f32fd07a..5e6a7a6123 100644 --- a/official/c96384007.lua +++ b/official/c96384007.lua @@ -1,4 +1,5 @@ --マシンナーズ・ディフェンダー +--Machina Defender local s,id=GetID() function s.initial_effect(c) --flip @@ -25,4 +26,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c96385345.lua b/official/c96385345.lua index 66c030456b..d6429b5ebc 100644 --- a/official/c96385345.lua +++ b/official/c96385345.lua @@ -1,4 +1,5 @@ --薔薇の聖騎士 +--Rose Paladin local s,id=GetID() function s.initial_effect(c) --spsummon @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -17,7 +18,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfToGrave) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -27,31 +28,23 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) local bc=c:GetBattleTarget() return c:IsRelateToBattle() and bc:IsMonster() and bc:IsLocation(LOCATION_GRAVE) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.thfilter(c) return c:IsLevelAbove(7) and c:IsRace(RACE_PLANT) and c:IsAbleToHand() end @@ -66,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96399967.lua b/official/c96399967.lua index afa5e77cc2..244dcab489 100644 --- a/official/c96399967.lua +++ b/official/c96399967.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -69,4 +69,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96404912.lua b/official/c96404912.lua index 02d6a91cbd..ff91f4bf97 100644 --- a/official/c96404912.lua +++ b/official/c96404912.lua @@ -30,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(eg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c96420087.lua b/official/c96420087.lua index 1167cd1146..6dd353eb54 100644 --- a/official/c96420087.lua +++ b/official/c96420087.lua @@ -1,5 +1,6 @@ --闇の支配者との契約 +--Contract with the Dark Master local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,8,nil,97642679) -end +end \ No newline at end of file diff --git a/official/c96427353.lua b/official/c96427353.lua index c5d06b8bad..6dcfbb67b8 100644 --- a/official/c96427353.lua +++ b/official/c96427353.lua @@ -1,4 +1,5 @@ --機甲忍者アクア +--Aqua Armor Ninja local s,id=GetID() function s.initial_effect(c) --disable attack @@ -9,17 +10,17 @@ function s.initial_effect(c) e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetRange(LOCATION_GRAVE) e1:SetCondition(s.condition) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2b} +s.listed_series={SET_NINJA} function s.cfilter(c) - return c:IsSetCard(0x2b) and c:IsMonster() + return c:IsSetCard(SET_NINJA) and c:IsMonster() end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==nil and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -30,4 +31,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() -end +end \ No newline at end of file diff --git a/official/c96428622.lua b/official/c96428622.lua index 8e3922b079..219ba1085d 100644 --- a/official/c96428622.lua +++ b/official/c96428622.lua @@ -1,4 +1,5 @@ --サイバネティック・サイクロプス +--Cybernetic Cyclopean local s,id=GetID() function s.initial_effect(c) --atk @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.atkcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)==0 -end +end \ No newline at end of file diff --git a/official/c96433300.lua b/official/c96433300.lua index 602ad5005c..673aa0f2f3 100644 --- a/official/c96433300.lua +++ b/official/c96433300.lua @@ -1,5 +1,5 @@ --溟界の虚 ---Emptiness of the Abhyss +--Ogdoadic Hollow --scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -58,14 +58,14 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCondition(s.tgcon) e1:SetOperation(s.tgop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetCountLimit(1) e1:SetLabelObject(tc) Duel.RegisterEffect(e1,tp) @@ -91,4 +91,4 @@ end function s.gyop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.FaceupFilter(aux.NOT(Card.IsRace),RACE_REPTILE),tp,LOCATION_MZONE,0,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c96434581.lua b/official/c96434581.lua index 02a88e1230..c0e3b0edb8 100644 --- a/official/c96434581.lua +++ b/official/c96434581.lua @@ -1,6 +1,5 @@ --オーバード・パラディオン --Crusadia Power - local s,id=GetID() function s.initial_effect(c) --Targeted "Crusadia" monster becomes unaffected by other card effects @@ -14,10 +13,9 @@ function s.initial_effect(c) e1:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e1) end -s.listed_series={0x116} - +s.listed_series={SET_CRUSADIA} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0x116) + return c:IsFaceup() and c:IsSetCard(SET_CRUSADIA) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end @@ -35,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end diff --git a/official/c96457619.lua b/official/c96457619.lua index dd744a249f..c6980db003 100644 --- a/official/c96457619.lua +++ b/official/c96457619.lua @@ -1,4 +1,5 @@ --エクシーズ・ヴェール +--Xyz Veil local s,id=GetID() function s.initial_effect(c) --Activate @@ -19,4 +20,4 @@ function s.initial_effect(c) end function s.etarget(e,c) return c:GetOverlayCount()~=0 -end +end \ No newline at end of file diff --git a/official/c96458440.lua b/official/c96458440.lua index 07410be511..432aba7bbc 100644 --- a/official/c96458440.lua +++ b/official/c96458440.lua @@ -1,4 +1,5 @@ --伝説の黒帯 +--Legendary Black Belt local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,8508055,3810071,49814180)) @@ -34,4 +35,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c96462121.lua b/official/c96462121.lua index 401fa263f5..42b28fac01 100644 --- a/official/c96462121.lua +++ b/official/c96462121.lua @@ -1,5 +1,5 @@ --超接地展開 ---Outrigger Expand +--Outrigger Extension --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -30,14 +30,14 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x127} +s.listed_series={SET_INFINITRACK} function s.tgval(e,c) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) end function s.filter1(c,e,tp) local rk=c:GetRank() local pg=aux.GetMustBeMaterialGroup(tp,Group.FromCards(c),tp,nil,nil,REASON_XYZ) - return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(0x127) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) + return (#pg<=0 or (#pg==1 and pg:IsContains(c))) and c:IsFaceup() and c:IsSetCard(SET_INFINITRACK) and (rk>0 or c:IsStatus(STATUS_NO_LEVEL)) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2,pg) end function s.filter2(c,e,tp,mc,rk,pg) @@ -72,9 +72,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetDescription(aux.Stringid(id,1)) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) return not (c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH)) -end +end \ No newline at end of file diff --git a/official/c96470883.lua b/official/c96470883.lua index 5049d3b7f2..8fbee6def5 100644 --- a/official/c96470883.lua +++ b/official/c96470883.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) @@ -41,4 +41,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) else Duel.Destroy(tg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c96471335.lua b/official/c96471335.lua index e9680ce5fd..364593753c 100644 --- a/official/c96471335.lua +++ b/official/c96471335.lua @@ -1,4 +1,5 @@ --幻想の黒魔導師 +--Ebon Illusion Magician local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -32,22 +33,18 @@ end function s.ovfilter(c,tp,xyzc) return c:IsFaceup() and c:GetRank()==6 and c:IsRace(RACE_SPELLCASTER,xyzc,SUMMON_TYPE_XYZ,tp) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c,e,tp) return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -68,4 +65,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96474800.lua b/official/c96474800.lua index 9917e12e4f..acd30e0d42 100644 --- a/official/c96474800.lua +++ b/official/c96474800.lua @@ -1,4 +1,5 @@ --マジック・ディフレクター +--Magic Deflector local s,id=GetID() function s.initial_effect(c) --activate @@ -16,14 +17,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DISABLE) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) e1:SetTarget(s.distg) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --disable effect local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetOperation(s.disop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.distg(e,c) @@ -36,4 +37,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if (tl&LOCATION_SZONE)~=0 and (tpe&TYPE_SPELL)~=0 and (tpe&TYPE_EQUIP+TYPE_FIELD+TYPE_CONTINUOUS+TYPE_QUICKPLAY)~=0 then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c96501677.lua b/official/c96501677.lua index b518c3f6fe..4f289c7151 100644 --- a/official/c96501677.lua +++ b/official/c96501677.lua @@ -1,4 +1,5 @@ --またたびキャット +--Catnipped Kitty local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -37,8 +38,8 @@ function s.defop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c9653271.lua b/official/c9653271.lua index b8df39ab8a..eb97c56a17 100644 --- a/official/c9653271.lua +++ b/official/c9653271.lua @@ -1,7 +1,8 @@ --雷神の怒り +--Kaminari Attack local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,86088138,21817254) -end +end \ No newline at end of file diff --git a/official/c96540.lua b/official/c96540.lua index 1ab5e26732..d8c55492b4 100644 --- a/official/c96540.lua +++ b/official/c96540.lua @@ -49,5 +49,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end - +end \ No newline at end of file diff --git a/official/c96540807.lua b/official/c96540807.lua index fb6547b502..daf82bbc6a 100644 --- a/official/c96540807.lua +++ b/official/c96540807.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfTributeCost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.rttg) e2:SetOperation(s.rtop) c:RegisterEffect(e2) diff --git a/official/c96546575.lua b/official/c96546575.lua index 76969951c4..aa0a661a35 100644 --- a/official/c96546575.lua +++ b/official/c96546575.lua @@ -1,9 +1,9 @@ --- 大要塞クジラ --- Mega Fortress Whale --- Scripted by Hatter +--大要塞クジラ +--Mega Fortress Whale +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Allow direct attack + --Allow direct attack local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_IGNITION) @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) c:RegisterEffect(e1) - -- Destroy + --Destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY) @@ -20,13 +20,13 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_ATTACK|TIMING_BATTLE_END) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.descon) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) - -- Add to hand or Special Summon + --Add to hand or Special Summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) @@ -46,13 +46,13 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - -- WATER monsters can attact directly this turn + --WATER monsters can attact directly this turn local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(c,nil,tp,1,0,aux.Stringid(id,3),nil) end @@ -82,15 +82,15 @@ end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,ft,e,tp) + return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,ft,e,tp) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,ft,e,tp):GetFirst() + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,ft,e,tp):GetFirst() if not sc then return end aux.ToHandOrElse(sc,tp, function(sc) @@ -100,4 +100,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) return Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,4)) -end +end \ No newline at end of file diff --git a/official/c96553688.lua b/official/c96553688.lua index 14e8e83d22..47bcd8bfb2 100644 --- a/official/c96553688.lua +++ b/official/c96553688.lua @@ -1,4 +1,5 @@ --フェニキシアン・シード +--Phoenixian Seed local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,16 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end s.listed_names={23558733} -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(23558733) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end @@ -33,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96565487.lua b/official/c96565487.lua index 560c175d61..5f83c04809 100644 --- a/official/c96565487.lua +++ b/official/c96565487.lua @@ -1,4 +1,5 @@ --ブリザード・ウォリアー +--Blizzard Warrior local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -22,4 +23,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if opt==1 then Duel.MoveSequence(tc,opt) end -end +end \ No newline at end of file diff --git a/official/c96570609.lua b/official/c96570609.lua index 95c69691da..e04071a173 100644 --- a/official/c96570609.lua +++ b/official/c96570609.lua @@ -23,29 +23,29 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetRange(LOCATION_HAND) e4:SetCode(EVENT_FREE_CHAIN) - e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e4:SetCondition(s.sumcon) e4:SetCost(s.sumcost) e4:SetTarget(s.sumtg) e4:SetOperation(s.sumop) c:RegisterEffect(e4) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} function s.otfilter(c) - return c:IsSummonType(SUMMON_TYPE_TRIBUTE) + return c:IsTributeSummoned() end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.tgfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToGrave() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToGrave() end function s.spfilter(c,e,tp) return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) return g:GetClassCount(Card.GetCode)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) @@ -54,7 +54,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) + local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,nil) if g:GetClassCount(Card.GetCode)<2 then return end local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dncheck,1,tp,HINTMSG_TOGRAVE) if Duel.SendtoGrave(tg,REASON_EFFECT)~=0 and tg:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then @@ -64,7 +64,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) local fid=e:GetHandler():GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) @@ -90,10 +90,10 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.cfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() end function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -121,4 +121,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) else Duel.MSet(tp,c,true,nil,1) end -end +end \ No newline at end of file diff --git a/official/c96594609.lua b/official/c96594609.lua index 63a1e756fc..b12cc4c44d 100644 --- a/official/c96594609.lua +++ b/official/c96594609.lua @@ -1,4 +1,5 @@ --炎王獣 キリン +--Fire King Avatar Kirin local s,id=GetID() function s.initial_effect(c) --spsummon @@ -25,10 +26,10 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0x81} +s.listed_series={SET_FIRE_KING} function s.cfilter(c,tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) - and c:IsReason(REASON_EFFECT) and c:IsSetCard(0x81) + and c:IsReason(REASON_EFFECT) and c:IsSetCard(SET_FIRE_KING) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) @@ -60,4 +61,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9659580.lua b/official/c9659580.lua index 793d6432be..7e2e6da6f4 100644 --- a/official/c9659580.lua +++ b/official/c9659580.lua @@ -1,4 +1,5 @@ --方界業 +--Cubic Karma local s,id=GetID() function s.initial_effect(c) --Activate @@ -7,22 +8,24 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) c:RegisterEffect(e1) - --lp halve + --Send this card to the Graveyard, and if you do, halve your opponent's LP local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_TOGRAVE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetCondition(s.lpcon) + e2:SetTarget(s.lptg) e2:SetOperation(s.lpop) c:RegisterEffect(e2) - --to hand + --Add 1 "Cubic" monster from your Deck to your hand local e3=Effect.CreateEffect(c) - e3:SetDescription(aux.Stringid(id,2)) + e3:SetDescription(aux.Stringid(id,1)) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) @@ -32,17 +35,18 @@ function s.tgfilter(c) return c:IsCode(CARD_VIJAM) and c:IsAbleToGrave() end function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xe3) and not c:IsCode(CARD_VIJAM) + return c:IsFaceup() and c:IsSetCard(SET_CUBIC) and not c:IsCode(CARD_VIJAM) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return true end if Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) - and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then + and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil) + and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then e:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOGRAVE) e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetOperation(s.activate) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) else @@ -52,9 +56,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,99,nil) + local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,99,nil) if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then local og=Duel.GetOperatedGroup() local n=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) @@ -65,16 +68,20 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(n*800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end end function s.lpcon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() - return Duel.GetTurnPlayer()~=tp and re:IsActiveType(TYPE_MONSTER) and rc and rc:IsSetCard(0xe3) + return Duel.IsTurnPlayer(1-tp) and re:IsMonsterEffect() and rc and rc:IsSetCard(SET_CUBIC) and eg:IsExists(Card.IsCode,1,nil,CARD_VIJAM) end +function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,tp,0) +end function s.lpop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then @@ -82,7 +89,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xe3) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_CUBIC) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -95,4 +102,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96598015.lua b/official/c96598015.lua index 13a9ebc780..735dc8168f 100644 --- a/official/c96598015.lua +++ b/official/c96598015.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.counterfilter(c) - return c:IsSummonType(SUMMON_TYPE_PENDULUM) + return c:IsPendulumSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -23,14 +23,14 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -42,21 +42,21 @@ function s.filter(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,3,nil) end + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,3,nil) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,nil) if #g<3 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local sg=g:Select(tp,3,3,nil) - Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT) local og=Duel.GetOperatedGroup() if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96606246.lua b/official/c96606246.lua index aef65cacd4..ee5667c897 100644 --- a/official/c96606246.lua +++ b/official/c96606246.lua @@ -1,4 +1,5 @@ --EMフレンドンキー +--Performapal Friendonkey local s,id=GetID() function s.initial_effect(c) --spsummon @@ -11,20 +12,20 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x9f} +s.listed_series={SET_PERFORMAPAL} function s.filter(c,e,tp) - return c:IsSetCard(0x9f) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_PERFORMAPAL) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96622984.lua b/official/c96622984.lua index 9b69c2fe46..8068573ddf 100644 --- a/official/c96622984.lua +++ b/official/c96622984.lua @@ -36,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetCondition(s.lvcon) e1:SetValue(1) tc:RegisterEffect(e1) @@ -61,7 +61,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(tc:GetOriginalLevel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c96631852.lua b/official/c96631852.lua index 7763d5c964..d2b81a9100 100644 --- a/official/c96631852.lua +++ b/official/c96631852.lua @@ -1,4 +1,5 @@ --鉄壁の布陣 +--Impenetrable Formation local s,id=GetID() function s.initial_effect(c) --Activate @@ -39,7 +40,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetCondition(s.rcon) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end end @@ -54,4 +55,4 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(), REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c96633955.lua b/official/c96633955.lua index 0bd309bb2a..a7441d1b21 100644 --- a/official/c96633955.lua +++ b/official/c96633955.lua @@ -1,5 +1,5 @@ --- 相剣大公-承影 --- Cheng Ying, the Xiangjian Grand Duke +--相剣大公-承影 +--Swordsoul Supreme Sovereign - Chengying local s,id=GetID() function s.initial_effect(c) --Synchro Summon @@ -69,10 +69,10 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) else return false end end function s.remtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),69832741) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),CARD_SPIRIT_ELIMINATION) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,0,LOCATION_ONFIELD+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,0,LOCATION_ONFIELD|LOCATION_GRAVE) end function s.remop(e,tp,eg,ep,ev,re,r,rp) local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil) @@ -86,4 +86,4 @@ function s.remop(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(sg1,true) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96637156.lua b/official/c96637156.lua index 8603e64245..f2c87ef0cf 100644 --- a/official/c96637156.lua +++ b/official/c96637156.lua @@ -1,17 +1,17 @@ --- 席取-六双丸 --- Musical Sumo Dice Games --- Scripted by Hatter +--席取-六双丸 +--Musical Sumo Dice Games +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() - -- 2 Level 6 monsters + --2 Level 6 monsters Xyz.AddProcedure(c,nil,6,2) - -- Roll die and move to corresponding zone + --Roll die and move to corresponding zone local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DICE+CATEGORY_CONTROL+CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(function(_,tp) return Duel.IsTurnPlayer(1-tp) end) @@ -32,7 +32,6 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) if not (c:IsRelateToEffect(e) and c:IsInMainMZone()) then return end local dice=Duel.TossDice(tp,1) if dice<1 or dice>6 then return end - local seq=c:GetSequence() local col3=Duel.IsDuelType(DUEL_3_COLUMNS_FIELD) local max=col3 and 4 or 5 @@ -41,15 +40,12 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) if seq==0 and col3 then seq=-2 elseif seq<-max then seq=max-1 end end - local switch=seq<0 if switch and not c:IsAbleToChangeControler() then return s.cannot_move(c) end - local fp=switch and 1-tp or tp local nseq=switch and 5+seq or seq local tc=Duel.GetFieldCard(fp,LOCATION_MZONE,nseq) if Duel.GetMZoneCount(fp,tc,tp,nil,1<6) end - if switch and Duel.GetControl(c,1-tp,0,0,1<0 @@ -31,4 +32,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96661780.lua b/official/c96661780.lua index 37798f2256..c99258f822 100644 --- a/official/c96661780.lua +++ b/official/c96661780.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) diff --git a/official/c9666558.lua b/official/c9666558.lua index 67237ff2db..4dc05f9750 100644 --- a/official/c9666558.lua +++ b/official/c9666558.lua @@ -1,4 +1,5 @@ --ゴーレム・ドラゴン +--Golem Dragon local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -12,4 +13,4 @@ function s.initial_effect(c) end function s.tg(e,c) return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_DRAGON) -end +end \ No newline at end of file diff --git a/official/c96676583.lua b/official/c96676583.lua index 8cf3ec801b..5e05b2a884 100644 --- a/official/c96676583.lua +++ b/official/c96676583.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetCode(EVENT_REMOVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.PayLPCost(300)) + e3:SetCost(Cost.PayLP(300)) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c96677818.lua b/official/c96677818.lua index 8ac54484e2..bd1462a668 100644 --- a/official/c96677818.lua +++ b/official/c96677818.lua @@ -15,4 +15,4 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SortDecktop(tp,tp,3) -end +end \ No newline at end of file diff --git a/official/c96682430.lua b/official/c96682430.lua index 73fb802462..f5d992ebd0 100644 --- a/official/c96682430.lua +++ b/official/c96682430.lua @@ -1,4 +1,5 @@ --水精鱗-アビスヒルデ +--Mermail Abysshilde local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x74} +s.listed_series={SET_MERMAIL} function s.filter(c,e,tp) - return c:IsSetCard(0x74) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MERMAIL) and c:GetCode()~=id and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96687733.lua b/official/c96687733.lua index 04630fa4f6..dd88907723 100644 --- a/official/c96687733.lua +++ b/official/c96687733.lua @@ -1,4 +1,4 @@ ---Japanese name +--神殿の守護神 --Defense of the Temple --scripted by Naim local s,id=GetID() @@ -51,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96699830.lua b/official/c96699830.lua index 664aa90e77..aa8c6986d6 100644 --- a/official/c96699830.lua +++ b/official/c96699830.lua @@ -1,7 +1,6 @@ --ボーン・フロム・ドラコニス --Born from Draconis --Scripted by ahtelel - local s,id=GetID() function s.initial_effect(c) --Special summon 1 level 6+ LIGHT machine from hand @@ -24,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) e1:SetLabelObject(e) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) aux.RegisterClientHint(e:GetHandler(),nil,tp,1,0,aux.Stringid(id,2),nil) end @@ -43,17 +42,17 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local mg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) - local gg=not Duel.IsPlayerAffectedByEffect(tp,69832741) and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) + local gg=not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) and Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) or Group.CreateGroup() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ((#mg>0 and mg:FilterCount(s.mzfilter,nil)+ft>0) or (#gg>0 and ft>0)) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end local g - if Duel.IsPlayerAffectedByEffect(tp,69832741) then + if Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) else - g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) + g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil) end Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.SetTargetParam(#g) @@ -70,7 +69,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(ct*500) tc:RegisterEffect(e1) local e2=e1:Clone() @@ -84,7 +83,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e3:SetRange(LOCATION_MZONE) e3:SetValue(s.efilter) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end Duel.SpecialSummonComplete() @@ -92,4 +91,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end function s.efilter(e,re) return e:GetHandler()~=re:GetOwner() -end +end \ No newline at end of file diff --git a/official/c96700602.lua b/official/c96700602.lua index d40a8b8dc9..faf9829e15 100644 --- a/official/c96700602.lua +++ b/official/c96700602.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp + return Duel.IsTurnPlayer(1-tp) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsType,1,false,nil,nil,TYPE_SYNCHRO) end @@ -40,4 +40,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,tc:GetDefense(),REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c96704018.lua b/official/c96704018.lua index 64043d680f..0277c109c8 100644 --- a/official/c96704018.lua +++ b/official/c96704018.lua @@ -1,4 +1,5 @@ --紋章獣ベルナーズ・ファルコン +--Heraldic Beast Berners Falcon local s,id=GetID() function s.initial_effect(c) --lv change @@ -29,7 +30,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c96704974.lua b/official/c96704974.lua index fba6a424f1..c53dc8890e 100644 --- a/official/c96704974.lua +++ b/official/c96704974.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,nil,2,2,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,nil,2,2,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.filter(c) return c:IsTrap() and c:IsSSetable() diff --git a/official/c96708940.lua b/official/c96708940.lua index 07a7c7122a..2f2722aed5 100644 --- a/official/c96708940.lua +++ b/official/c96708940.lua @@ -1,7 +1,6 @@ --SRビーダマシーン --Speedroid Marble Machine --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -26,8 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0x2016} - +s.listed_series={SET_SPEEDROID} function s.condition(e,tp,eg,ep,ev,re,r,rp) local d=Duel.GetAttackTarget() return d and d:IsControler(tp) and d:IsDefensePos() @@ -45,13 +43,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1) tc:RegisterEffect(e1) end end function s.filter(c) - return c:IsSetCard(0x2016) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_SPEEDROID) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -70,12 +68,12 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end diff --git a/official/c96733134.lua b/official/c96733134.lua index 7fcb1ca927..b3fa108bd9 100644 --- a/official/c96733134.lua +++ b/official/c96733134.lua @@ -41,16 +41,16 @@ function s.initial_effect(c) e4:SetRange(LOCATION_MZONE) e4:SetHintTiming(0,TIMING_BATTLE_START) e4:SetCondition(s.spcon) - e4:SetCost(s.spcost) + e4:SetCost(Cost.SelfTribute) e4:SetTarget(s.sptg) e4:SetOperation(s.spop) c:RegisterEffect(e4) end -s.listed_series={0x10f8,0x20f8} +s.listed_series={SET_SUPREME_KING_GATE,SET_SUPREME_KING_DRAGON} s.listed_names={id} function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,0x20f8) end - local sg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,0x20f8) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,1,false,nil,nil,SET_SUPREME_KING_DRAGON) end + local sg=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,1,1,false,nil,nil,SET_SUPREME_KING_DRAGON) Duel.Release(sg,REASON_COST) end function s.thfilter(c) @@ -72,8 +72,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end end function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,2,false,aux.ReleaseCheckMMZ,nil,0x20f8) end - local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,2,2,false,aux.ReleaseCheckMMZ,nil,0x20f8) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsSetCard,2,false,aux.ReleaseCheckMMZ,nil,SET_SUPREME_KING_DRAGON) end + local g=Duel.SelectReleaseGroupCost(tp,Card.IsSetCard,2,2,false,aux.ReleaseCheckMMZ,nil,SET_SUPREME_KING_DRAGON) Duel.Release(g,REASON_COST) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -91,15 +91,10 @@ function s.damtg(e,c) return c:IsType(TYPE_PENDULUM) and c:GetBattleTarget()~=nil end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) + return Duel.IsBattlePhase() end function s.spfilter(c,e,tp) - return c:IsFaceup() and (c:IsSetCard(0x10f8) or c:IsSetCard(0x20f8)) + return c:IsFaceup() and (c:IsSetCard(SET_SUPREME_KING_GATE) or c:IsSetCard(SET_SUPREME_KING_DRAGON)) and c:IsType(TYPE_PENDULUM) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end @@ -118,4 +113,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c96746083.lua b/official/c96746083.lua index d130505438..91e12fe715 100644 --- a/official/c96746083.lua +++ b/official/c96746083.lua @@ -115,4 +115,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96765646.lua b/official/c96765646.lua index 1639f625cc..17fccd77f3 100644 --- a/official/c96765646.lua +++ b/official/c96765646.lua @@ -1,4 +1,5 @@ --思い出のブランコ +--Swing of Memories local s,id=GetID() function s.initial_effect(c) --Activate @@ -32,11 +33,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetOperation(s.desop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetCountLimit(1) tc:RegisterEffect(e1,true) end end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9677699.lua b/official/c9677699.lua index 5c6bec55d0..7d91603b7b 100644 --- a/official/c9677699.lua +++ b/official/c9677699.lua @@ -1,5 +1,5 @@ --- ガラスの靴 --- Glass Slippers +--ガラスの靴 +--Glass Slippers local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(s.value) c:RegisterEffect(e1) - -- cannot attack + --cannot attack local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_CANNOT_ATTACK) @@ -65,5 +65,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) end -end - +end \ No newline at end of file diff --git a/official/c96782886.lua b/official/c96782886.lua index 3ba4808590..9925550292 100644 --- a/official/c96782886.lua +++ b/official/c96782886.lua @@ -1,4 +1,5 @@ --メンタルマスター +--Mind Master local s,id=GetID() function s.initial_effect(c) --special summon @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c96789758.lua b/official/c96789758.lua index 5a88399dbe..c1f0dfcadd 100644 --- a/official/c96789758.lua +++ b/official/c96789758.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetRange(LOCATION_MZONE) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCondition(s.excon) e1:SetTarget(s.extg) c:RegisterEffect(e1) @@ -46,4 +46,4 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c967928.lua b/official/c967928.lua index be6978a88b..2eefcb8735 100644 --- a/official/c967928.lua +++ b/official/c967928.lua @@ -30,11 +30,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetCode(EFFECT_CANNOT_DRAW) - if Duel.GetTurnPlayer()==p and Duel.GetCurrentPhase()==PHASE_DRAW then - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2) + if Duel.GetTurnPlayer()==p and Duel.IsPhase(PHASE_DRAW) then + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN,2) e1:SetLabel(Duel.GetTurnCount()) else - e1:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN) + e1:SetReset(RESET_PHASE|PHASE_DRAW|RESET_SELF_TURN) e1:SetLabel(0) end e1:SetCondition(s.skipcon) @@ -50,13 +50,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,p) end end function s.skipcon(e) - return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetCurrentPhase()==PHASE_DRAW + return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsPhase(PHASE_DRAW) end function s.aclimit(e,re,tp) return re:IsHasType(EFFECT_TYPE_ACTIVATE) -end +end \ No newline at end of file diff --git a/official/c96795312.lua b/official/c96795312.lua index 4b4b5f2c2d..4fc6526927 100644 --- a/official/c96795312.lua +++ b/official/c96795312.lua @@ -42,7 +42,7 @@ function s.spcfilter(c) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.spcfilter,1,1,REASON_COST|REASON_DISCARD) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c96802306.lua b/official/c96802306.lua index 56a46db744..6ebf43e1bf 100644 --- a/official/c96802306.lua +++ b/official/c96802306.lua @@ -1,4 +1,5 @@ --イグナイト・キャリバー +--Igknight Gallant local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c96857854.lua b/official/c96857854.lua index 41411e77d6..43b5d16c69 100644 --- a/official/c96857854.lua +++ b/official/c96857854.lua @@ -1,6 +1,5 @@ --ダイヤモンドダストン --Diamond Duston - local s,id=GetID() function s.initial_effect(c) --Special summon "Duston" monsters to either field @@ -28,24 +27,23 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x80} - +s.listed_series={SET_DUSTON} function s.cfilter(c) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil) end function s.filter(c,e,tp) - return c:IsSetCard(0x80) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_DUSTON) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ct=#eg local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+Duel.GetLocationCount(1-tp,LOCATION_MZONE) if chk==0 then return (not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) or ct==1) and ft>=ct - and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,ct,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_DECK+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,ct,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct,tp,LOCATION_DECK|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ct=#eg @@ -54,7 +52,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE) if ft1<=0 and ft2<=0 then return end if ft1+ft2#g then return end if ft2>ct then ft2=ct end local ct2=ct-ft1 @@ -81,7 +79,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummonComplete() end function s.spfilter(c) - return c:IsSetCard(0x80) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_DUSTON) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil) end @@ -91,14 +89,14 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,1000,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,1000,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() if c:IsRelateToEffect(e) - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x11,0,1000,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_NORMAL,0,1000,1,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_FIEND) Duel.SpecialSummonStep(c,0,tp,1-tp,true,false,POS_FACEUP_DEFENSE) @@ -110,7 +108,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -119,7 +117,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e3:SetCode(EFFECT_CANNOT_BE_MATERIAL) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) e3:SetValue(aux.cannotmatfilter(SUMMON_TYPE_FUSION,SUMMON_TYPE_SYNCHRO,SUMMON_TYPE_XYZ)) c:RegisterEffect(e3,true) Duel.SpecialSummonComplete() diff --git a/official/c96864105.lua b/official/c96864105.lua index 8ed67c4efe..e50120b8ca 100644 --- a/official/c96864105.lua +++ b/official/c96864105.lua @@ -1,4 +1,5 @@ --CNo.73 激瀧瀑神アビス・スープラ +--Number C73: Abyss Supra Splash local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -36,7 +37,7 @@ function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(id)==0 end c:RemoveOverlayCard(tp,1,1,REASON_COST) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL,0,1) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local a=Duel.GetAttacker() @@ -47,10 +48,10 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(d:GetAttack()) a:RegisterEffect(e1) end function s.indcon(e) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,36076683) -end +end \ No newline at end of file diff --git a/official/c96864811.lua b/official/c96864811.lua index 5d363550af..291cdc6874 100644 --- a/official/c96864811.lua +++ b/official/c96864811.lua @@ -1,6 +1,5 @@ --禁じられた聖衣 --Forbidden Dress - local s,id=GetID() function s.initial_effect(c) --Targeted monster loses 600 ATK, cannot be targeted or destroyed by card effects @@ -9,15 +8,12 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER|TIMING_DAMAGE_STEP) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -32,7 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(-600) tc:RegisterEffect(e1) --Cannot be targeted or destroyed by card effects @@ -42,13 +38,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetValue(1) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end \ No newline at end of file diff --git a/official/c96875080.lua b/official/c96875080.lua index 6e1c5e14a7..26776a6841 100644 --- a/official/c96875080.lua +++ b/official/c96875080.lua @@ -1,4 +1,5 @@ --大気圏外射撃 +--Orbital Bombardment local s,id=GetID() function s.initial_effect(c) --Activate @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xc) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and c:IsSetCard(SET_ALIEN) and c:IsAbleToGraveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end @@ -24,7 +25,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.filter(chkc) and chkc~=e:GetHandler() end @@ -38,4 +39,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96890582.lua b/official/c96890582.lua index 5064ec419e..3ef23f79fb 100644 --- a/official/c96890582.lua +++ b/official/c96890582.lua @@ -1,4 +1,5 @@ --秒殺の暗殺者 +--Flash Assailant local s,id=GetID() function s.initial_effect(c) --atkdown @@ -16,4 +17,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*(-400) -end +end \ No newline at end of file diff --git a/official/c96891787.lua b/official/c96891787.lua index fe7910700a..0e490be572 100644 --- a/official/c96891787.lua +++ b/official/c96891787.lua @@ -59,10 +59,10 @@ end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and c:IsFaceup() and - c:UpdateAttack(600,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END)==600 then + c:UpdateAttack(600,RESETS_STANDARD_DISABLE_PHASE_END)==600 then local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then - tc:UpdateAttack(-600,RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END,c) + tc:UpdateAttack(-600,RESETS_STANDARD_DISABLE_PHASE_END,c) end end -end +end \ No newline at end of file diff --git a/official/c96897184.lua b/official/c96897184.lua index 6c037862a0..ad40d6a905 100644 --- a/official/c96897184.lua +++ b/official/c96897184.lua @@ -42,7 +42,7 @@ function s.initial_effect(c) end s.listed_names={CARD_FOSSIL_FUSION} function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==1-tp + return Duel.IsTurnPlayer(1-tp) end function s.spfilter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp) @@ -60,8 +60,8 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)~=0 + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD,nil,REASON_EFFECT)~=0 and tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c96907086.lua b/official/c96907086.lua index f35ecc0788..7d20ec13a8 100644 --- a/official/c96907086.lua +++ b/official/c96907086.lua @@ -25,4 +25,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,nil) Duel.Destroy(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c96914272.lua b/official/c96914272.lua index af72e0abfc..a52a46b343 100644 --- a/official/c96914272.lua +++ b/official/c96914272.lua @@ -71,7 +71,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) Duel.SelectOption(tp,aux.Stringid(id,1)) e1:SetValue(lv) end - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c96915510.lua b/official/c96915510.lua index 2604fc25c4..848c83d4dc 100644 --- a/official/c96915510.lua +++ b/official/c96915510.lua @@ -29,7 +29,7 @@ function s.initial_effect(c) e3:SetValue(2000) c:RegisterEffect(e3) end -s.listed_series={0x117} +s.listed_series={SET_IMPCANTATION} s.listed_names={86758915} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsMainPhase() @@ -40,7 +40,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) c:RegisterFlagEffect(id,RESET_CHAIN,0,1) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x117) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_IMPCANTATION) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcheck(sg,e,tp,mg) return sg:GetSum(Card.GetLevel)==10 @@ -57,7 +57,7 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) - if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT|REASON_DISCARD)==0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=math.min(ft,1) end if #g==0 or ft==0 then return end local sg=aux.SelectUnselectGroup(g,e,tp,1,ft,s.spcheck,1,tp,HINTMSG_SPSUMMON) @@ -66,7 +66,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=sg:GetFirst() for tc in aux.Next(sg) do if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end end Duel.SpecialSummonComplete() @@ -99,9 +99,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local sg=e:GetLabelObject() local dg=sg:Filter(s.desfilter,nil,e:GetLabel()) if #dg>0 then - Duel.SendtoDeck(dg,nil,2,REASON_EFFECT) + Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end end function s.tg(e,c) - return c:IsSetCard(0x117) and not c:IsType(TYPE_RITUAL) -end + return c:IsSetCard(SET_IMPCANTATION) and not c:IsType(TYPE_RITUAL) +end \ No newline at end of file diff --git a/official/c96930127.lua b/official/c96930127.lua index 7eef520a2f..f5d0835a5a 100644 --- a/official/c96930127.lua +++ b/official/c96930127.lua @@ -1,6 +1,5 @@ --チェーンドッグ --Chain Dog - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY @@ -38,7 +37,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c96938777.lua b/official/c96938777.lua index d05928e56a..307c7b69bd 100644 --- a/official/c96938777.lua +++ b/official/c96938777.lua @@ -1,4 +1,5 @@ --神機王ウル +--Machine Lord Ür local s,id=GetID() function s.initial_effect(c) --attack all @@ -12,4 +13,4 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c96938986.lua b/official/c96938986.lua index 6001b4a88a..6276f74216 100644 --- a/official/c96938986.lua +++ b/official/c96938986.lua @@ -1,4 +1,5 @@ --共振虫 +--Resonance Insect local s,id=GetID() function s.initial_effect(c) --tohand @@ -55,4 +56,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96947648.lua b/official/c96947648.lua index e0fed86581..245ccde27e 100644 --- a/official/c96947648.lua +++ b/official/c96947648.lua @@ -1,4 +1,5 @@ --サルベージ +--Salvage local s,id=GetID() function s.initial_effect(c) --Activate @@ -15,7 +16,7 @@ function s.filter(c) return c:IsMonster() and c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and s.filter(chkc) end + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,2,2,nil) @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #sg>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c96965364.lua b/official/c96965364.lua index c66e2b634a..4928c6963e 100644 --- a/official/c96965364.lua +++ b/official/c96965364.lua @@ -1,4 +1,5 @@ --孵化 +--Insect Imitation local s,id=GetID() function s.initial_effect(c) --Activate @@ -44,4 +45,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97000273.lua b/official/c97000273.lua index 5bd0a8cd3e..8ed02300dc 100644 --- a/official/c97000273.lua +++ b/official/c97000273.lua @@ -55,4 +55,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c97001138.lua b/official/c97001138.lua index fa6bbdb974..dd7f046d59 100644 --- a/official/c97001138.lua +++ b/official/c97001138.lua @@ -1,4 +1,5 @@ --ダーク・アドバンス +--Dark Advance local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,15 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) - e1:SetCondition(s.condition) + e1:SetCondition(function() return Duel.IsMainPhase() or Duel.IsBattlePhase() end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 -end function s.thfilter(c) return c:IsAttackAbove(2400) and c:GetDefense()==1000 and c:IsMonster() and c:IsAbleToHand() end @@ -44,4 +41,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ShuffleHand(tp) end end -end +end \ No newline at end of file diff --git a/official/c97007933.lua b/official/c97007933.lua index a602e144f9..064ca6c2fb 100644 --- a/official/c97007933.lua +++ b/official/c97007933.lua @@ -39,9 +39,9 @@ function s.cfilter(c) return c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -63,7 +63,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() @@ -72,7 +72,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(id,2)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end @@ -86,4 +86,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97017120.lua b/official/c97017120.lua index c655076ef6..ffba2c073b 100644 --- a/official/c97017120.lua +++ b/official/c97017120.lua @@ -1,4 +1,5 @@ --巨大ネズミ +--Giant Rat local s,id=GetID() function s.initial_effect(c) --special summon @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c97021916.lua b/official/c97021916.lua index 4e3c0634b1..91604f2b2f 100644 --- a/official/c97021916.lua +++ b/official/c97021916.lua @@ -1,4 +1,5 @@ --ダーク・リゾネーター +--Dark Resonator local s,id=GetID() function s.initial_effect(c) --battle indes @@ -13,4 +14,4 @@ function s.initial_effect(c) end function s.valcon(e,re,r,rp) return (r&REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c97024987.lua b/official/c97024987.lua index fd36e5d4d3..4489107a65 100644 --- a/official/c97024987.lua +++ b/official/c97024987.lua @@ -1,4 +1,5 @@ --イグナイト・ドラグノフ +--Igknight Templar local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -13,18 +14,18 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xc8} +s.listed_series={SET_IGKNIGHT} function s.thcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xc8) + return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),SET_IGKNIGHT) end function s.filter(c) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -33,9 +34,9 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #dg<2 then return end if Duel.Destroy(dg,REASON_EFFECT)~=2 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c97036149.lua b/official/c97036149.lua index 5d031d4938..087697479e 100644 --- a/official/c97036149.lua +++ b/official/c97036149.lua @@ -1,5 +1,5 @@ --天威龍-ナハタ ---Tianwei Dragon - Nahata +--Tenyi Spirit - Nahata --Scripted by Hatter local s,id=GetID() function s.initial_effect(c) @@ -18,10 +18,10 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_ATTACK_ANNOUNCE) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.atcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.atg) e2:SetOperation(s.atop) c:RegisterEffect(e2) @@ -60,7 +60,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-1500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c97051536.lua b/official/c97051536.lua index 40c0a00b4d..4312a5f6a6 100644 --- a/official/c97051536.lua +++ b/official/c97051536.lua @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c97053215.lua b/official/c97053215.lua index 6348c356f9..240ff3f1f9 100644 --- a/official/c97053215.lua +++ b/official/c97053215.lua @@ -48,12 +48,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2,true) --Banish it if it leaves the field local e3=Effect.CreateEffect(c) @@ -61,11 +61,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e3:SetReset(RESET_EVENT+RESETS_REDIRECT) + e3:SetReset(RESET_EVENT|RESETS_REDIRECT) e3:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e3,true) end Duel.SpecialSummonComplete() end, aux.Stringid(id,1)) -end +end \ No newline at end of file diff --git a/official/c97064649.lua b/official/c97064649.lua index 151bdc9a3f..d84c860215 100644 --- a/official/c97064649.lua +++ b/official/c97064649.lua @@ -18,7 +18,7 @@ function s.setcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c) - return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and c:IsSSetable() + return c:IsContinuousSpell() and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -35,7 +35,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_TRIGGER) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c97077563.lua b/official/c97077563.lua index 02cc5a4b80..fbcc393971 100644 --- a/official/c97077563.lua +++ b/official/c97077563.lua @@ -1,4 +1,5 @@ --リビングデッドの呼び声 +--Call of the Haunted local s,id=GetID() function s.initial_effect(c) --Activate @@ -37,7 +38,7 @@ function s.filter(c,e,tp) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end @@ -72,4 +73,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97091969.lua b/official/c97091969.lua index 7fc817659f..a4ee2fe06e 100644 --- a/official/c97091969.lua +++ b/official/c97091969.lua @@ -30,10 +30,10 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.optfilter(c) - return c:IsFaceup() and c:IsSetCard(0x111) and c:HasLevel() + return c:IsFaceup() and c:IsSetCard(SET_ARMED_DRAGON) and c:HasLevel() end function s.thfilter(c,lvl) - return c:IsSetCard(0x111) and c:IsMonster() and c:IsLevelBelow(lvl) and c:IsAbleToHand() + return c:IsSetCard(SET_ARMED_DRAGON) and c:IsMonster() and c:IsLevelBelow(lvl) and c:IsAbleToHand() end function s.opttarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.optfilter(chkc) end @@ -61,7 +61,7 @@ function s.opteffect(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(val) tc:RegisterEffect(e1) end @@ -77,7 +77,7 @@ function s.opteffect(e,tp,eg,ep,ev,re,r,rp) end function s.repfilter(c,tp) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) - and c:IsSetCard(0x111) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) + and c:IsSetCard(SET_ARMED_DRAGON) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp) end @@ -88,4 +88,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97093037.lua b/official/c97093037.lua index dde3c5fced..6da2f011ba 100644 --- a/official/c97093037.lua +++ b/official/c97093037.lua @@ -1,4 +1,5 @@ --創世者の化身 +--The Creator Incarnate local s,id=GetID() function s.initial_effect(c) --special summon @@ -7,16 +8,12 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={61505339} -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c,e,tp) return c:IsCode(61505339) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -33,4 +30,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9709452.lua b/official/c9709452.lua index 071a398f91..42d8ae6427 100644 --- a/official/c9709452.lua +++ b/official/c9709452.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_BATTLE) + e2:SetCode(EVENT_PHASE|PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetTarget(s.thtg) diff --git a/official/c97112505.lua b/official/c97112505.lua index e9948d360e..c2d4c1b638 100644 --- a/official/c97112505.lua +++ b/official/c97112505.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfTributeCost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c97120394.lua b/official/c97120394.lua index 96b68e5954..982d33aa3b 100644 --- a/official/c97120394.lua +++ b/official/c97120394.lua @@ -4,34 +4,29 @@ local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_BATTLE_START) - e1:SetCondition(s.condition) + e1:SetCondition(function() return Duel.IsPhase(PHASE_BATTLE_START) end) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_BATTLE_START -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - if e:IsHasType(EFFECT_TYPE_ACTIVATE) then - Duel.SetChainLimit(aux.FALSE) - end + if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) end + Duel.SetChainLimit(aux.FALSE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) + if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end + --For the rest of this turn after this card resolves, neither player can activate Spell/Trap Cards, or their effects local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) - e1:SetDescription(aux.Stringid(id,1)) + e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) - e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetValue(function(e,re,tp) return re:IsSpellTrapEffect() end) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -function s.aclimit(e,re,tp) - return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) -end diff --git a/official/c97148796.lua b/official/c97148796.lua index efed8b83c2..2317a7eac0 100644 --- a/official/c97148796.lua +++ b/official/c97148796.lua @@ -1,5 +1,5 @@ --竜輝巧-バンα ---Draitron Alpha Thuban +--Drytron Alpha Thuban --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCost(Drytron.TributeCost) e2:SetTarget(s.sptg) @@ -25,9 +25,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.sumfilter) end -s.listed_series={0x151} +s.listed_series={SET_DRYTRON} function s.spconlimit(e,se,sp,st) - return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(0x151) + return se:IsHasType(EFFECT_TYPE_ACTIONS) and se:GetHandler():IsSetCard(SET_DRYTRON) end function s.sumfilter(c) return not c:IsSummonableCard() @@ -53,4 +53,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,sg) end end -end +end \ No newline at end of file diff --git a/official/c9715126.lua b/official/c9715126.lua index 53ebb53388..5102a5cbac 100644 --- a/official/c9715126.lua +++ b/official/c9715126.lua @@ -1,7 +1,6 @@ --起動指令 ギア・フォース --Boot-Up Order - Gear Force --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Destroy opponent's monsters, up to the number of your machine monsters diff --git a/official/c97151365.lua b/official/c97151365.lua index 817f501d2a..11e381679d 100644 --- a/official/c97151365.lua +++ b/official/c97151365.lua @@ -30,12 +30,12 @@ function s.initial_effect(c) end s.counter_place_list={0x1e} function s.ctop(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()~=tp or Duel.GetAttackTarget()~=nil then + if Duel.IsTurnPlayer(1-tp) or Duel.GetAttackTarget()~=nil then e:GetHandler():AddCounter(0x1e,1) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(tp) and (Duel.IsMainPhase()) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end @@ -57,4 +57,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97165977.lua b/official/c97165977.lua index efe9300c38..9d9b5f3c8d 100644 --- a/official/c97165977.lua +++ b/official/c97165977.lua @@ -4,7 +4,7 @@ local s,id=GetID() function s.initial_effect(c) --Fusion summon procedure c:EnableReviveLimit() - Fusion.AddProcMix(c,false,false,51777272,aux.FilterBoolFunctionEx(Card.IsSetCard,0xdf)) + Fusion.AddProcMix(c,false,false,51777272,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_LUNALIGHT)) --Special Summon condition local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) @@ -39,8 +39,8 @@ function s.initial_effect(c) e4:SetOperation(s.atkop) c:RegisterEffect(e4) end -s.listed_series={0xdf} -s.material_setcode=0xdf +s.listed_series={SET_LUNALIGHT} +s.material_setcode=SET_LUNALIGHT function s.splimit(e,se,sp,st) return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (st&SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end @@ -54,14 +54,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(s.indct) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) if c:IsRelateToEffect(e) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_ATTACK_ALL) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(2) c:RegisterEffect(e2) end @@ -78,7 +78,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(200) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_BATTLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c97168905.lua b/official/c97168905.lua index aaac0afa2e..6b3e307889 100644 --- a/official/c97168905.lua +++ b/official/c97168905.lua @@ -1,4 +1,5 @@ --奇跡の軌跡 +--Miracle Locus local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,14 +9,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsPosition(POS_FACEUP_ATTACK) end if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) @@ -31,19 +29,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(1000) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) e2:SetValue(1) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_NO_BATTLE_DAMAGE) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end -end +end \ No newline at end of file diff --git a/official/c97169186.lua b/official/c97169186.lua index fd87eb269b..94ceba6a4a 100644 --- a/official/c97169186.lua +++ b/official/c97169186.lua @@ -1,4 +1,5 @@ --地砕き +--Smashing Ground local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(sg,REASON_EFFECT) else Duel.Destroy(tg,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c97170107.lua b/official/c97170107.lua index 7dba2a0dcc..3d2157e622 100644 --- a/official/c97170107.lua +++ b/official/c97170107.lua @@ -1,4 +1,5 @@ --シャインエルフ +--Shining Elf local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -22,10 +23,6 @@ end function s.filter(c,e,tp) return c:IsFaceup() and c:IsControler(1-tp) and c:GetAttack()>0 and (not e or c:IsRelateToEffect(e)) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return eg:IsExists(s.filter,1,nil,nil,tp) end Duel.SetTargetCard(eg) @@ -38,7 +35,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c97173708.lua b/official/c97173708.lua index 09a6004d0f..867df04321 100644 --- a/official/c97173708.lua +++ b/official/c97173708.lua @@ -1,4 +1,5 @@ --トークン生誕祭 +--Oh Tokenbaum! local s,id=GetID() function s.initial_effect(c) --Activate @@ -59,14 +60,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) end Duel.SpecialSummonComplete() g:KeepAlive() @@ -96,4 +97,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() local tg=g:Filter(s.desfilter,nil,e:GetLabel()) Duel.Destroy(tg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97182396.lua b/official/c97182396.lua index ac635cd6ad..d62e67666d 100644 --- a/official/c97182396.lua +++ b/official/c97182396.lua @@ -1,5 +1,5 @@ --A・Ɐ・VV ---Amaze Ɐttraction Vanquish Viking +--Amaze Attraction Viking Vortex --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -51,4 +51,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if ec then Duel.SendtoHand(ec,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9718968.lua b/official/c9718968.lua index c75461ab65..a3b3b19dff 100644 --- a/official/c9718968.lua +++ b/official/c9718968.lua @@ -1,4 +1,5 @@ --フォトン・スレイヤー +--Photon Slasher local s,id=GetID() function s.initial_effect(c) --special summon @@ -18,4 +19,4 @@ function s.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c97204936.lua b/official/c97204936.lua index ce163a6fb9..271c5f2fc8 100644 --- a/official/c97204936.lua +++ b/official/c97204936.lua @@ -1,7 +1,8 @@ --大地の騎士ガイアナイト +--Gaia Knight, the Force of Earth local s,id=GetID() function s.initial_effect(c) --synchro summon Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() -end +end \ No newline at end of file diff --git a/official/c9720537.lua b/official/c9720537.lua index 1a5a77682e..b6b2a5b649 100644 --- a/official/c9720537.lua +++ b/official/c9720537.lua @@ -26,8 +26,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_CONTROL) e1:SetValue(tc:GetOwner()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-(RESET_TOFIELD+RESET_TEMP_REMOVE+RESET_TURN_SET)) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-(RESET_TOFIELD|RESET_TEMP_REMOVE|RESET_TURN_SET)) tc:RegisterEffect(e1) end end -end +end \ No newline at end of file diff --git a/official/c97211663.lua b/official/c97211663.lua index b49ed5001a..7603e774b2 100644 --- a/official/c97211663.lua +++ b/official/c97211663.lua @@ -1,4 +1,5 @@ --影霊衣の反魂術 +--Nekroz Cycle local s,id=GetID() function s.initial_effect(c) Ritual.AddProcEqual(c,s.ritualfil,nil,nil,nil,nil,nil,nil,LOCATION_HAND|LOCATION_GRAVE):SetCountLimit(1,id) @@ -13,15 +14,15 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xb4} +s.listed_series={SET_NEKROZ} function s.ritualfil(c) - return c:IsSetCard(0xb4) and c:IsRitualMonster() + return c:IsSetCard(SET_NEKROZ) and c:IsRitualMonster() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 end function s.cfilter(c) - return c:IsSetCard(0xb4) and c:IsMonster() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_NEKROZ) and c:IsMonster() and c:IsAbleToRemoveAsCost() end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() @@ -32,7 +33,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.thfilter(c) - return c:IsSetCard(0xb4) and c:IsSpell() and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsSpell() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -45,4 +46,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c97219708.lua b/official/c97219708.lua index e31f507a9a..f2e6f5b362 100644 --- a/official/c97219708.lua +++ b/official/c97219708.lua @@ -1,4 +1,5 @@ --RR-ラスト・ストリクス +--Raidraptor - Last Strix local s,id=GetID() function s.initial_effect(c) --recover @@ -19,22 +20,22 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xba} +s.listed_series={SET_RAIDRAPTOR} function s.reccon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetAttacker() local at=Duel.GetAttackTarget() - return (tc:IsControler(tp) and tc:IsSetCard(0xba)) or (at and at:IsControler(tp) and at:IsSetCard(0xba)) + return (tc:IsControler(tp) and tc:IsSetCard(SET_RAIDRAPTOR)) or (at and at:IsControler(tp) and at:IsSetCard(SET_RAIDRAPTOR)) end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and not e:GetHandler():IsStatus(STATUS_CHAINING) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) - and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) end - local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,TYPE_SPELL+TYPE_TRAP) + and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,1,nil) end + local ct=Duel.GetMatchingGroupCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*100) end @@ -42,7 +43,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,TYPE_SPELL+TYPE_TRAP) + local ct=Duel.GetMatchingGroupCount(Card.IsSpellTrap,tp,LOCATION_ONFIELD|LOCATION_GRAVE,0,nil) if ct>0 then Duel.BreakEffect() Duel.Recover(tp,ct*100,REASON_EFFECT) @@ -50,11 +51,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsType(TYPE_XYZ) and c:IsSetCard(0xba) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_RAIDRAPTOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end @@ -69,15 +66,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local fid=c:GetFieldID() - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) @@ -96,7 +93,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetTargetRange(0,1) e4:SetValue(1) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e4,tp) end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) @@ -110,5 +107,5 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) -end + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c97232518.lua b/official/c97232518.lua index 7a70a13188..a1c32768ae 100644 --- a/official/c97232518.lua +++ b/official/c97232518.lua @@ -1,6 +1,5 @@ --深淵のスタングレイ --Abyss Stungray - local s,id=GetID() function s.initial_effect(c) --Special summon itself as a monster @@ -15,14 +14,14 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 - or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) then return end + or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,TYPE_MONSTER|TYPE_EFFECT,1900,0,5,RACE_THUNDER,ATTRIBUTE_LIGHT) then return end c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) c:AddMonsterAttributeComplete() @@ -34,7 +33,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1,true) Duel.SpecialSummonComplete() end \ No newline at end of file diff --git a/official/c97234686.lua b/official/c97234686.lua index f6dd1bfc8c..5ac0b9e5a7 100644 --- a/official/c97234686.lua +++ b/official/c97234686.lua @@ -1,4 +1,5 @@ --グラディアル・チェンジ +--Gladiator Lash local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.filter(c,tp) - return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x19) + return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(SET_GLADIATOR) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.filter,1,nil,tp) @@ -23,5 +24,5 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_DISCARD+REASON_EFFECT) -end + Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_DISCARD|REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c97262307.lua b/official/c97262307.lua index f21159a266..4c3392292e 100644 --- a/official/c97262307.lua +++ b/official/c97262307.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) @@ -27,11 +27,6 @@ function s.initial_effect(c) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST|REASON_DISCARD) -end function s.spfilter(c,e,tp) return c:IsRace(RACE_INSECT|RACE_PLANT|RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end diff --git a/official/c97268402.lua b/official/c97268402.lua index 2e57d1ead6..040899e33f 100644 --- a/official/c97268402.lua +++ b/official/c97268402.lua @@ -1,4 +1,5 @@ --エフェクト・ヴェーラー +--Effect Veiler local s,id=GetID() function s.initial_effect(c) --disable @@ -8,21 +9,17 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_MAIN_END) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() - return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase()) end function s.filter(c) return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT) @@ -42,13 +39,13 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c97273514.lua b/official/c97273514.lua index 27ae2331fd..b2bb07e88e 100644 --- a/official/c97273514.lua +++ b/official/c97273514.lua @@ -46,21 +46,21 @@ end function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetTargetCards(e) if #tg<=0 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end end function s.eqcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) + return e:GetHandler():IsLinkSummoned() end function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_INSECT) @@ -94,7 +94,7 @@ function s.equipop(c,e,tp,tc) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) @@ -105,9 +105,9 @@ function s.equipop(c,e,tp,tc) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end function s.eqlimit(e,c) return c:GetControler()==e:GetHandlerPlayer() -end +end \ No newline at end of file diff --git a/official/c97300502.lua b/official/c97300502.lua index e3ac184719..0e54ee5556 100644 --- a/official/c97300502.lua +++ b/official/c97300502.lua @@ -56,7 +56,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END|RESET_OPPO_TURN) c:RegisterEffect(e1) end end @@ -75,5 +75,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c97316367.lua b/official/c97316367.lua index 1c5e70ee0a..db7ef4daed 100644 --- a/official/c97316367.lua +++ b/official/c97316367.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.drtg) e2:SetOperation(s.drop) c:RegisterEffect(e2) @@ -62,12 +62,12 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local td=tg:Filter(Card.IsRelateToEffect,nil,e) if not tg or #td<=0 then return end - Duel.SendtoDeck(td,nil,0,REASON_EFFECT) + Duel.SendtoDeck(td,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct>0 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97317530.lua b/official/c97317530.lua index a64ccde95a..bd9389b381 100644 --- a/official/c97317530.lua +++ b/official/c97317530.lua @@ -1,4 +1,5 @@ --森の聖獣 カラントーサ +--Kalantosa, Mystical Beast of the Forest local s,id=GetID() function s.initial_effect(c) --destroy @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsRace(RACE_BEAST) + return re and re:IsMonsterEffect() and re:GetHandler():IsRace(RACE_BEAST) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -28,4 +29,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97342942.lua b/official/c97342942.lua index 0a15cd20f2..8ffd780715 100644 --- a/official/c97342942.lua +++ b/official/c97342942.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local atk=rg:GetFirst():GetBaseAttack()/2 Duel.Damage(1-tp,atk,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97362768.lua b/official/c97362768.lua index 785d386136..708c35ac73 100644 --- a/official/c97362768.lua +++ b/official/c97362768.lua @@ -1,4 +1,5 @@ --スパークガン +--Spark Blaster local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsCode,20721928)) @@ -49,7 +50,7 @@ function s.resetop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not eg:IsContains(c) or not c:IsLocation(LOCATION_SZONE) then return end if c:GetFlagEffect(id)==0 then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,0) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,0) end end function s.regop(e,tp,eg,ep,ev,re,r,rp) @@ -57,4 +58,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local ct=c:GetFlagEffectLabel(id)+1 if ct==3 then Duel.Destroy(c,REASON_EFFECT) else c:SetFlagEffectLabel(id,ct) end -end +end \ No newline at end of file diff --git a/official/c97383507.lua b/official/c97383507.lua index 814f6c895a..6664673fe1 100644 --- a/official/c97383507.lua +++ b/official/c97383507.lua @@ -31,12 +31,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop2) c:RegisterEffect(e2) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.lcheck(g,lc,sumtype,tp) return g:CheckDifferentProperty(Card.GetCode,lc,sumtype,tp) end function s.spfilter(c,e,tp,zone) - return c:IsLevelBelow(4) and c:IsSetCard(0x135) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) + return c:IsLevelBelow(4) and c:IsSetCard(SET_IGNISTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler():GetLinkedZone(tp)) end @@ -47,18 +47,19 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) local zone=c:GetLinkedZone(tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,ft,ft,nil,e,tp,zone) - for sc in aux.Next(sg) do + for sc in sg:Iter() do if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP,zone)~=0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e2) end end @@ -78,4 +79,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97385276.lua b/official/c97385276.lua index d0d4a7623a..178ddb3317 100644 --- a/official/c97385276.lua +++ b/official/c97385276.lua @@ -1,4 +1,5 @@ --レベル・ウォリアー +--Level Warrior local s,id=GetID() function s.initial_effect(c) --summon @@ -31,7 +32,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) end function s.spcon(e,c) @@ -46,6 +47,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(4) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE-RESET_TOFIELD) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c97396380.lua b/official/c97396380.lua index 0a248ba9b8..9cf9e19c17 100644 --- a/official/c97396380.lua +++ b/official/c97396380.lua @@ -1,4 +1,5 @@ --火舞太刀 +--Fencing Fire Ferret local s,id=GetID() function s.initial_effect(c) --destroy @@ -34,4 +35,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then Duel.Damage(1-tp,500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97403510.lua b/official/c97403510.lua index e2607b00ab..8887b75bf7 100644 --- a/official/c97403510.lua +++ b/official/c97403510.lua @@ -1,4 +1,5 @@ --No.92 偽骸神龍 Heart-eartH Dragon +--Number 92: Heart-eartH Dragon local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -24,7 +25,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetCondition(s.rmcon) - e3:SetCost(s.rmcost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -60,15 +61,11 @@ s.xyz_number=92 function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() for tc in aux.Next(eg) do - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.rmcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) + return Duel.IsTurnPlayer(1-tp) end function s.filter(c,turn) return (c:IsLocation(LOCATION_MZONE) or c:GetFlagEffect(id)~=0) and c:GetTurnID()==turn and c:IsAbleToRemove() @@ -109,7 +106,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c9742784.lua b/official/c9742784.lua index cf60175204..c23e8b222e 100644 --- a/official/c9742784.lua +++ b/official/c9742784.lua @@ -1,6 +1,5 @@ --ジェット・シンクロン --Jet Synchron - local s,id=GetID() function s.initial_effect(c) --If sent to GY as synchro material, add 1 "Junk" monster from deck @@ -25,13 +24,12 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x43} - +s.listed_series={SET_JUNK} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO end function s.filter(c) - return c:IsSetCard(0x43) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_JUNK) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -65,7 +63,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) end diff --git a/official/c97433739.lua b/official/c97433739.lua index 03853ef562..4fb76e1663 100644 --- a/official/c97433739.lua +++ b/official/c97433739.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) end function s.counterfilter(c) - return c:IsSummonType(SUMMON_TYPE_XYZ) + return c:IsXyzSummoned() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end @@ -23,7 +23,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetLabelObject(e) e1:SetTarget(s.sumlimit) @@ -31,7 +31,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -67,17 +67,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) - e3:SetReset(RESET_EVENT+RESETS_STANDARD) + e3:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e3) end end @@ -86,19 +86,19 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetOperation(s.checkop2) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCountLimit(1) e2:SetOperation(s.lpop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) e1:SetLabelObject(e2) end function s.checkop2(e,tp,eg,ep,ev,re,r,rp) - if eg:GetFirst():IsSummonType(SUMMON_TYPE_XYZ) then + if eg:GetFirst():IsXyzSummoned() then e:GetLabelObject():Reset() e:Reset() end @@ -106,4 +106,4 @@ end function s.lpop(e,tp,eg,ep,ev,re,r,rp) local lp=Duel.GetLP(tp) Duel.SetLP(tp,lp-4000) -end +end \ No newline at end of file diff --git a/official/c97439308.lua b/official/c97439308.lua index 86206841ba..cf232421aa 100644 --- a/official/c97439308.lua +++ b/official/c97439308.lua @@ -1,4 +1,5 @@ --カオス・グリード +--Chaos Greed local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,4 +26,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97439806.lua b/official/c97439806.lua index 842315b50b..1a4a61bbe1 100644 --- a/official/c97439806.lua +++ b/official/c97439806.lua @@ -13,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.op) c:RegisterEffect(e1) end -s.listed_series={0x35} +s.listed_series={SET_FABLED} function s.costfilter(c) - return c:IsSetCard(0x35) and c:IsMonster() and c:GetCode()~=id and c:IsDiscardable() + return c:IsSetCard(SET_FABLED) and c:IsMonster() and c:GetCode()~=id and c:IsDiscardable() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD|REASON_COST) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToHand() end @@ -30,4 +30,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,e:GetHandler()) end -end +end \ No newline at end of file diff --git a/official/c9744376.lua b/official/c9744376.lua index 4741586b14..9005b8e377 100644 --- a/official/c9744376.lua +++ b/official/c9744376.lua @@ -1,4 +1,5 @@ --ゴブリンのやりくり上手 +--Good Goblin Housekeeping local s,id=GetID() function s.initial_effect(c) --Activate @@ -25,5 +26,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(p,aux.TRUE,p,LOCATION_HAND,0,1,1,nil) - Duel.SendtoDeck(g,nil,1,REASON_EFFECT) -end + Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_EFFECT) +end \ No newline at end of file diff --git a/official/c97452817.lua b/official/c97452817.lua index c7fd07890c..c9522ad702 100644 --- a/official/c97452817.lua +++ b/official/c97452817.lua @@ -36,7 +36,7 @@ function s.arcanareg(c,coin) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCountLimit(1) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) diff --git a/official/c97453744.lua b/official/c97453744.lua index 3cf7ed4d2e..8ac9b0acec 100644 --- a/official/c97453744.lua +++ b/official/c97453744.lua @@ -1,5 +1,5 @@ --- H-C クレイヴソリッシュ --- Heroic Champion - Claiomh Solais +--H-C クレイヴソリッシュ +--Heroic Champion - Claivesolish local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -35,7 +35,7 @@ function s.initial_effect(c) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,{id,2}) e3:SetCondition(s.atkcon) - e3:SetCost(aux.dxmcostgen(1,1,nil)) + e3:SetCost(Cost.Detach(1,1,nil)) e3:SetTarget(s.atktg) e3:SetOperation(s.atkop) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -52,11 +52,11 @@ end function s.doubleop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE_START) e1:SetCountLimit(1) e1:SetCondition(s.con) e1:SetOperation(s.op) - e1:SetReset(RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_PHASE|PHASE_BATTLE) Duel.RegisterEffect(e1,tp) end function s.con(e,tp,eg,ep,ev,re,r,rp) @@ -72,7 +72,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(tc:GetAttack()*2) tc:RegisterEffect(e1) end @@ -100,7 +100,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(tc:GetAttack()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c97466438.lua b/official/c97466438.lua index de4bd44d6d..509f6dfbb4 100644 --- a/official/c97466438.lua +++ b/official/c97466438.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) end function s.reg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - e:GetHandler():RegisterFlagEffect(id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) + e:GetHandler():RegisterFlagEffect(id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1) end function s.zcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 @@ -45,7 +45,7 @@ end function s.ztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_MZONE,PLAYER_NONE,0) +Duel.GetLocationCount(tp,LOCATION_SZONE,PLAYER_NONE,0)+Duel.GetLocationCount(1-tp,LOCATION_SZONE,PLAYER_NONE,0)>0 end - local dis=Duel.SelectDisableField(tp,1,LOCATION_MZONE+LOCATION_SZONE,LOCATION_MZONE+LOCATION_SZONE,0) + local dis=Duel.SelectDisableField(tp,1,LOCATION_MZONE|LOCATION_SZONE,LOCATION_MZONE|LOCATION_SZONE,0) Duel.Hint(HINT_ZONE,tp,dis) e:SetLabel(dis) end @@ -57,7 +57,7 @@ function s.zop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_PZONE) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabel(e:GetLabel()) c:RegisterEffect(e1) end @@ -68,10 +68,10 @@ function s.zop2(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_DISABLE_FIELD) e1:SetOperation(s.disop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetLabel(e:GetLabel()) c:RegisterEffect(e1) end function s.disop(e,tp) return e:GetLabel() -end +end \ No newline at end of file diff --git a/official/c97466712.lua b/official/c97466712.lua index 2340f7feab..87297f7885 100644 --- a/official/c97466712.lua +++ b/official/c97466712.lua @@ -1,4 +1,5 @@ --ハック・ワーム +--Hack Worm local s,id=GetID() function s.initial_effect(c) --special summon @@ -14,4 +15,4 @@ function s.hspcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 -end +end \ No newline at end of file diff --git a/official/c9748752.lua b/official/c9748752.lua index 5860ea92d9..d077a7a958 100644 --- a/official/c9748752.lua +++ b/official/c9748752.lua @@ -1,4 +1,5 @@ --邪帝ガイウス +--Caius the Shadow Monarch local s,id=GetID() function s.initial_effect(c) --remove @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_TRIBUTE) + return e:GetHandler():IsTributeSummoned() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end @@ -37,4 +38,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,1000,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c97518132.lua b/official/c97518132.lua index 2babe5b85f..3490eaae4a 100644 --- a/official/c97518132.lua +++ b/official/c97518132.lua @@ -1,5 +1,5 @@ --影依の巫女 エリアル ---Noel Shaddoll Ariel +--Naelshaddoll Ariel --Scripted by ahtelel local s,id=GetID() function s.initial_effect(c) @@ -26,9 +26,9 @@ function s.initial_effect(c) e2:SetOperation(s.rmop) c:RegisterEffect(e2) end -s.listed_series={0x9d} +s.listed_series={SET_SHADDOLL} function s.filter(c,e,tp) - return c:IsSetCard(0x9d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) + return c:IsSetCard(SET_SHADDOLL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -59,4 +59,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97520701.lua b/official/c97520701.lua index b3cb725151..cbc4c1d976 100644 --- a/official/c97520701.lua +++ b/official/c97520701.lua @@ -1,4 +1,5 @@ --臨時ダイヤ +--Special Schedule local s,id=GetID() function s.initial_effect(c) --Activate @@ -59,4 +60,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c97522863.lua b/official/c97522863.lua index e2983c22d3..b842101a6a 100644 --- a/official/c97522863.lua +++ b/official/c97522863.lua @@ -1,4 +1,4 @@ ---Japanese name +--刻印を持つ者 --The Man with the Mark --scripted by Naim local s,id=GetID() @@ -50,4 +50,4 @@ function s.thtgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then aux.ToHandOrElse(g,tp) end -end +end \ No newline at end of file diff --git a/official/c97526666.lua b/official/c97526666.lua index 68c6e7b23d..ef96557fde 100644 --- a/official/c97526666.lua +++ b/official/c97526666.lua @@ -1,4 +1,5 @@ --惑星探査車 +--Planet Pathfinder local s,id=GetID() function s.initial_effect(c) --search @@ -7,15 +8,11 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.SelfTribute) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsType(TYPE_FIELD) and c:IsAbleToHand() end @@ -30,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c975299.lua b/official/c975299.lua index 675981f35b..0cc32b7ff5 100644 --- a/official/c975299.lua +++ b/official/c975299.lua @@ -15,7 +15,7 @@ function s.initial_effect(c) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_FZONE) e2:SetTargetRange(LOCATION_MZONE,0) - e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15)) + e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_BES)) e2:SetValue(500) c:RegisterEffect(e2) --DEF increase @@ -28,7 +28,7 @@ function s.initial_effect(c) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetRange(LOCATION_FZONE) e4:SetTargetRange(LOCATION_MZONE,0) - e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15)) + e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_BES)) e4:SetValue(aux.indoval) c:RegisterEffect(e4) --Prevent effect target @@ -38,7 +38,7 @@ function s.initial_effect(c) e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e5:SetRange(LOCATION_FZONE) e5:SetTargetRange(LOCATION_MZONE,0) - e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x15)) + e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_BES)) e5:SetValue(aux.tgoval) c:RegisterEffect(e5) --Special Summon from hand @@ -66,7 +66,7 @@ function s.initial_effect(c) e8:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e8) end -s.listed_series={0x15} +s.listed_series={SET_BES} s.listed_names={66947414} function s.thfilter(c) return c:IsCode(66947414) and c:IsAbleToHand() @@ -82,7 +82,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x15) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_BES) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -98,7 +98,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.ctfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x15) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_BES) and c:IsControler(tp) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.ctfilter,1,nil,tp) @@ -115,4 +115,4 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) for tc in aux.Next(g) do tc:AddCounter(0x1f,1) end -end +end \ No newline at end of file diff --git a/official/c97534104.lua b/official/c97534104.lua index 18ac7d9d75..e4bb5ba278 100644 --- a/official/c97534104.lua +++ b/official/c97534104.lua @@ -36,4 +36,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c9753964.lua b/official/c9753964.lua index d899315cb9..c66fa8fc19 100644 --- a/official/c9753964.lua +++ b/official/c9753964.lua @@ -51,21 +51,21 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end @@ -89,4 +89,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c97565997.lua b/official/c97565997.lua index fda9549294..e95d04ed80 100644 --- a/official/c97565997.lua +++ b/official/c97565997.lua @@ -1,5 +1,5 @@ --溟界神-オグドアビス ---Ogdoabyss, Deity of the Abhyss +--Ogdoabyss, the Ogdoadic Overlord --scripted by Xylen5967 local s,id=GetID() function s.initial_effect(c) @@ -44,7 +44,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.tgfilter(c) - return not (c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE) and c:IsSummonType(SUMMON_TYPE_SPECIAL)) and c:IsAbleToGrave() + return not (c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE) and c:IsSpecialSummoned()) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -54,4 +54,4 @@ end function s.tgop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97567736.lua b/official/c97567736.lua index 34643445e0..10686aebc1 100644 --- a/official/c97567736.lua +++ b/official/c97567736.lua @@ -24,10 +24,10 @@ function s.initial_effect(c) e2:SetOperation(s.tgop) c:RegisterEffect(e2) end -s.listed_series={0xc3} +s.listed_series={SET_EDGE_IMP} s.listed_names={id} function s.cfilter(c) - return c:IsSetCard(0xc3) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_EDGE_IMP) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -44,7 +44,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(p,d,REASON_EFFECT) end function s.tgfilter(c) - return c:IsSetCard(0xc3) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGraveAsCost() + return c:IsSetCard(SET_EDGE_IMP) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToGraveAsCost() end function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -60,8 +60,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_CODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(e:GetLabel()) c:RegisterEffect(e1) -end - +end \ No newline at end of file diff --git a/official/c97570038.lua b/official/c97570038.lua index 955d5c2ba7..a884621fdd 100644 --- a/official/c97570038.lua +++ b/official/c97570038.lua @@ -24,7 +24,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetOperation(s.desop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.cfilter(c,tp) diff --git a/official/c97584719.lua b/official/c97584719.lua index 72ae3bdb35..b0f80bdf82 100644 --- a/official/c97584719.lua +++ b/official/c97584719.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,id) - e2:SetCost(aux.dxmcostgen(1,function(e,tp) return Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) end,function(e,og) e:SetLabel(#og) end)) + e2:SetCost(Cost.Detach(1,function(e,tp) return Duel.GetMatchingGroupCount(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e) end,function(e,og) e:SetLabel(#og) end)) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2,false,REGISTER_FLAG_DETACH_XMAT) diff --git a/official/c97588916.lua b/official/c97588916.lua index b6f20c380a..14984b4c75 100644 --- a/official/c97588916.lua +++ b/official/c97588916.lua @@ -1,4 +1,5 @@ --ブンボーグ007 +--Deskbot 007 local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -35,16 +36,16 @@ function s.initial_effect(c) e6:SetValue(s.atlimit) c:RegisterEffect(e6) end -s.listed_series={0xab} +s.listed_series={SET_DESKBOT} function s.splimcon(e) return not e:GetHandler():IsForbidden() end function s.splimit(e,c,tp,sumtp,sumpos) - return not c:IsSetCard(0xab) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM + return not c:IsSetCard(SET_DESKBOT) and (sumtp&SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end function s.value(e,c) - return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0xab)*500 + return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,SET_DESKBOT)*500 end function s.atlimit(e,c) - return c:IsFaceup() and c:IsSetCard(0xab) and c~=e:GetHandler() -end + return c:IsFaceup() and c:IsSetCard(SET_DESKBOT) and c~=e:GetHandler() +end \ No newline at end of file diff --git a/official/c97616504.lua b/official/c97616504.lua index f022e79d54..b3ea964a97 100644 --- a/official/c97616504.lua +++ b/official/c97616504.lua @@ -1,5 +1,5 @@ --閃刀機構-ハーキュリーベース ---Brandish Mechanoid Hercules Base +--Sky Striker Mecharmory - Hercules Base -- local s,id=GetID() function s.initial_effect(c) @@ -41,7 +41,7 @@ function s.initial_effect(c) c:RegisterEffect(e5) end s.listed_names={id} -s.listed_series={0x115} +s.listed_series={SET_SKY_STRIKER} function s.cfilter(c) return c:GetSequence()<5 end @@ -67,7 +67,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.tdfilter(c) - return c:IsSetCard(0x115) and not c:IsCode(id) and c:IsAbleToDeck() + return c:IsSetCard(SET_SKY_STRIKER) and not c:IsCode(id) and c:IsAbleToDeck() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end @@ -81,5 +81,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c97617181.lua b/official/c97617181.lua index a37b135cb0..23d18dcd24 100644 --- a/official/c97617181.lua +++ b/official/c97617181.lua @@ -1,8 +1,10 @@ --銀河零式 +--Galaxy Zero local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) @@ -26,18 +28,18 @@ function s.initial_effect(c) e4:SetTarget(s.desreptg) e4:SetOperation(s.desrepop) c:RegisterEffect(e4) - --leave + --The equipped monster's ATK becomes 0 local e5=Effect.CreateEffect(c) - e5:SetDescription(aux.Stringid(id,0)) + e5:SetDescription(aux.Stringid(id,1)) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e5:SetCode(EVENT_LEAVE_FIELD) e5:SetCondition(s.atkcon) e5:SetOperation(s.atkop) c:RegisterEffect(e5) end -s.listed_series={0x55,0x7b} +s.listed_series={SET_PHOTON,SET_GALAXY} function s.spfilter(c,e,tp) - return (c:IsSetCard(0x55) or c:IsSetCard(0x7b)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard({SET_PHOTON,SET_GALAXY}) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -62,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) c:RegisterEffect(e1) @@ -85,7 +87,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end @@ -98,5 +100,5 @@ function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,c,96) end function s.desrepop(e,tp,eg,ep,ev,re,r,rp) - Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) -end + Duel.Destroy(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c97623219.lua b/official/c97623219.lua index d93faef9e8..27af767065 100644 --- a/official/c97623219.lua +++ b/official/c97623219.lua @@ -1,4 +1,5 @@ --エレメント・ヴァルキリー +--Element Valkyrie local s,id=GetID() function s.initial_effect(c) --atk @@ -27,4 +28,4 @@ function s.atkcon(e) end function s.ctlcon(e) return Duel.IsExistingMatchingCard(s.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c97637162.lua b/official/c97637162.lua index 446de8f95e..d5fe68eedb 100644 --- a/official/c97637162.lua +++ b/official/c97637162.lua @@ -1,5 +1,5 @@ --Handigallop ---scripted by andre +--Handigallop local s,id=GetID() function s.initial_effect(c) --cannot attack direct @@ -31,5 +31,4 @@ end function s.dmgcond(e) local tp=e:GetHandlerPlayer() return Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetAttacker()==e:GetHandler() -end - +end \ No newline at end of file diff --git a/official/c97642679.lua b/official/c97642679.lua index ee36bb5811..d799f21144 100644 --- a/official/c97642679.lua +++ b/official/c97642679.lua @@ -39,4 +39,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) Duel.Destroy(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97648103.lua b/official/c97648103.lua index b55c266898..93bbf43cba 100644 --- a/official/c97648103.lua +++ b/official/c97648103.lua @@ -1,5 +1,5 @@ --星遺物の加護 ---Star Relic's Aegis +--World Legacy's Heart local s,id=GetID() function s.initial_effect(c) --Activate @@ -22,9 +22,9 @@ function s.initial_effect(c) e2:SetOperation(s.repop) c:RegisterEffect(e2) end -s.listed_series={0xfd} +s.listed_series={SET_WORLD_CHALICE} function s.thfilter(c,e) - return c:IsMonster() and c:IsSetCard(0xfd) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) + return c:IsMonster() and c:IsSetCard(SET_WORLD_CHALICE) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,nil,e) @@ -53,4 +53,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97651498.lua b/official/c97651498.lua index a9d30cda6a..c4ccea2524 100644 --- a/official/c97651498.lua +++ b/official/c97651498.lua @@ -1,4 +1,5 @@ --魔轟神ルリー +--Fabled Lurrie local s,id=GetID() function s.initial_effect(c) --spsummon @@ -23,4 +24,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9765723.lua b/official/c9765723.lua index 420ce229e5..853b9b8077 100644 --- a/official/c9765723.lua +++ b/official/c9765723.lua @@ -7,8 +7,8 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_DAMAGE_STEP) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --destroy local e2=Effect.CreateEffect(c) @@ -17,7 +17,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCountLimit(1,id) e2:SetCost(s.descost) @@ -39,7 +39,7 @@ function s.initial_effect(c) e4:SetDescription(aux.Stringid(id,1)) e4:SetCategory(CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) - e4:SetCode(EVENT_PHASE+PHASE_STANDBY) + e4:SetCode(EVENT_PHASE|PHASE_STANDBY) e4:SetRange(LOCATION_SZONE) e4:SetCountLimit(1) e4:SetCondition(s.damcon) @@ -47,12 +47,9 @@ function s.initial_effect(c) e4:SetOperation(s.damop) c:RegisterEffect(e4) end -s.listed_series={0xaf,0xae} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_DD,SET_DARK_CONTRACT} function s.cfilter(c) - return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGraveAsCost() + return c:IsSetCard({SET_DD,SET_DARK_CONTRACT}) and c:IsAbleToGraveAsCost() end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end @@ -60,13 +57,12 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end - if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end + if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) @@ -79,7 +75,7 @@ function s.atktg(e,c) return c:IsRace(RACE_FIEND) end function s.damcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp + return Duel.IsTurnPlayer(tp) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -88,7 +84,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,1000) end function s.damop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97661969.lua b/official/c97661969.lua index 912d0818ad..f4566e4deb 100644 --- a/official/c97661969.lua +++ b/official/c97661969.lua @@ -38,7 +38,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end @@ -47,7 +47,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) @@ -55,7 +55,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp==1-tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp==1-tp and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsMonster() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() @@ -71,4 +71,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c97662494.lua b/official/c97662494.lua index 1a000adb17..d3a5daba11 100644 --- a/official/c97662494.lua +++ b/official/c97662494.lua @@ -11,7 +11,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,id) - e1:SetCost(aux.DiscardCost()) + e1:SetCost(Cost.Discard()) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.SelfBanishCost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.sptg) e3:SetOperation(s.spop) c:RegisterEffect(e3) diff --git a/official/c97677329.lua b/official/c97677329.lua index 15dadaddce..319c3d7831 100644 --- a/official/c97677329.lua +++ b/official/c97677329.lua @@ -88,15 +88,15 @@ end --Activation legality function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE) end --Performing the effect of special summoning "Backup Secretary" from hand, deck, or GY function s.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97687912.lua b/official/c97687912.lua index db98a10f79..b24eaba1f7 100644 --- a/official/c97687912.lua +++ b/official/c97687912.lua @@ -1,4 +1,5 @@ --メテオ・ストライク +--Fairy Meteor Crush local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -7,4 +8,4 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) -end +end \ No newline at end of file diff --git a/official/c97688360.lua b/official/c97688360.lua index c9d59801b9..c37c5859bf 100644 --- a/official/c97688360.lua +++ b/official/c97688360.lua @@ -1,5 +1,5 @@ --剛鬼ツイストコブラ ---Gouki TwistCobra +--Gouki Twistcobra local s,id=GetID() function s.initial_effect(c) --atkup @@ -12,7 +12,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.atkcon) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) @@ -30,16 +30,13 @@ function s.initial_effect(c) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xfc} +s.listed_series={SET_GOUKI} s.listed_names={id} -function s.atkcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.atkfilter1(c,tp) - return c:IsSetCard(0xfc) and Duel.IsExistingTarget(s.atkfilter2,tp,LOCATION_MZONE,0,1,c) + return c:IsSetCard(SET_GOUKI) and Duel.IsExistingTarget(s.atkfilter2,tp,LOCATION_MZONE,0,1,c) end function s.atkfilter2(c) - return c:IsFaceup() and c:IsSetCard(0xfc) + return c:IsFaceup() and c:IsSetCard(SET_GOUKI) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.atkfilter1,1,false,nil,nil,tp) end @@ -55,12 +52,12 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -68,7 +65,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xfc) and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -81,4 +78,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c97692972.lua b/official/c97692972.lua index f8adb70591..dbc57d8471 100644 --- a/official/c97692972.lua +++ b/official/c97692972.lua @@ -1,19 +1,19 @@ --- アマゾネスの金鞭使い --- Amazoness Golden Whip Master --- Scripted by Hatter +--アマゾネスの金鞭使い +--Amazoness Golden Whip Master +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) Pendulum.AddProcedure(c) - -- Grant ATK + --Grant ATK local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_PZONE) e1:SetTargetRange(LOCATION_MZONE,0) - e1:SetTarget(function(e,c) return c:IsSetCard(0x4) and c:HasLevel() end) + e1:SetTarget(function(e,c) return c:IsSetCard(SET_AMAZONESS) and c:HasLevel() end) e1:SetValue(function(e,c) return c:GetLevel()*100 end) c:RegisterEffect(e1) - -- Destroy + --Destroy local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_DESTROY) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetTarget(s.destg) e2:SetOperation(s.desop) c:RegisterEffect(e2) - -- Place in Pendulum Zone when destroyed + --Place in Pendulum Zone when destroyed local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) @@ -37,7 +37,7 @@ function s.initial_effect(c) e3:SetTarget(s.pentg) e3:SetOperation(s.penop) c:RegisterEffect(e3) - -- Place in Pendulum Zone on Special Summon + --Place in Pendulum Zone on Special Summon local e4=e3:Clone() e4:SetDescription(aux.Stringid(id,2)) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) @@ -47,20 +47,19 @@ function s.initial_effect(c) e4:SetCondition(s.sppencon) c:RegisterEffect(e4) end -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.descon(e,tp,eg,ep,ev,re,r,rp) local bc=Duel.GetBattleMonster(tp) - return bc and bc:IsFaceup() and bc:IsSetCard(0x4) + return bc and bc:IsFaceup() and bc:IsSetCard(SET_AMAZONESS) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end - if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingTarget(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) @@ -68,7 +67,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end function s.despencon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() end function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckPendulumZones(tp) end @@ -81,7 +80,7 @@ function s.penop(e,tp,eg,ep,ev,re,r,rp) end end function s.sppenconfilter(c,tp) - return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x4) + return c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) end function s.sppencon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.sppenconfilter,1,nil,tp) diff --git a/official/c97697447.lua b/official/c97697447.lua index 417bb29f1c..1574292710 100644 --- a/official/c97697447.lua +++ b/official/c97697447.lua @@ -1,4 +1,5 @@ --アビストローム +--Abyss-strom local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,16 +28,16 @@ end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then if e:GetLabel()==0 then - return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) + return Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end e:SetLabel(0) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp) end e:SetLabel(0) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),TYPE_SPELL+TYPE_TRAP) + local g=Duel.GetMatchingGroup(Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) Duel.SendtoGrave(g,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97697678.lua b/official/c97697678.lua index ee02f58e14..6da4e4233d 100644 --- a/official/c97697678.lua +++ b/official/c97697678.lua @@ -1,4 +1,5 @@ --円盤ムスキー +--Flying Saucer Muusik'i local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -12,13 +13,13 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} function s.condition(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.GetDrawCount(tp)>0 end function s.filter(c) - return c:IsSetCard(0xc) and c:IsAbleToHand() + return c:IsSetCard(SET_ALIEN) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end @@ -31,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) end diff --git a/official/c97705809.lua b/official/c97705809.lua index f0d6796187..e9f8aa9ab4 100644 --- a/official/c97705809.lua +++ b/official/c97705809.lua @@ -1,4 +1,5 @@ --スーパーチャージ +--Supercharge local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.cfilter(c) - return c:IsFacedown() or not c:IsSetCard(0x16) or not c:IsRace(RACE_MACHINE) + return c:IsFacedown() or not c:IsSetCard(SET_ROID) or not c:IsRace(RACE_MACHINE) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 + return Duel.IsTurnPlayer(1-tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)~=0 and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -29,4 +30,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97729135.lua b/official/c97729135.lua index 3899db24a8..56ffa90e01 100644 --- a/official/c97729135.lua +++ b/official/c97729135.lua @@ -68,4 +68,4 @@ function s.mvop2(e,tp,eg,ep,ev,re,r,rp) or Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL,zone)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.MoveSequence(tc,math.log(Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,~zone),2)) -end +end \ No newline at end of file diff --git a/official/c97738431.lua b/official/c97738431.lua index 5922bf5b40..2dd8ffd9e0 100644 --- a/official/c97738431.lua +++ b/official/c97738431.lua @@ -1,4 +1,5 @@ --ナンバーズ・オーバーレイ・ブースト +--Numbers Overlay Boost local s,id=GetID() function s.initial_effect(c) --Activate @@ -10,9 +11,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x48} +s.listed_series={SET_NUMBER} function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x48) and c:GetOverlayCount()==0 + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_NUMBER) and c:GetOverlayCount()==0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end @@ -31,4 +32,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Overlay(tc,og) end end -end +end \ No newline at end of file diff --git a/official/c97750534.lua b/official/c97750534.lua index 698d468666..ca16e093b6 100644 --- a/official/c97750534.lua +++ b/official/c97750534.lua @@ -49,4 +49,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c97769122.lua b/official/c97769122.lua index 066b74cd6f..563a278d2d 100644 --- a/official/c97769122.lua +++ b/official/c97769122.lua @@ -19,10 +19,10 @@ function s.initial_effect(c) e2:SetOperation(s.activate) c:RegisterEffect(e2) end -s.listed_series={0x48,0x177} +s.listed_series={SET_NUMBER,SET_SEVENTH} function s.regcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_RULE) + return Duel.IsPhase(PHASE_DRAW) and c:IsReason(REASON_RULE) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -30,24 +30,24 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1) c:RegisterEffect(e1) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_MAIN1,EFFECT_FLAG_CLIENT_HINT,1,0,66) end end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()==PHASE_MAIN1 + return Duel.IsPhase(PHASE_MAIN1) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(100) if chk==0 then return e:GetHandler():GetFlagEffect(id)~=0 end end function s.copfilter(c) - return c:IsAbleToGraveAsCost() and c:IsSetCard(0x177) and c:GetType()==TYPE_SPELL + return c:IsAbleToGraveAsCost() and c:IsSetCard(SET_SEVENTH) and c:IsNormalSpell() and c:CheckActivateEffect(true,true,false)~=nil end function s.xyzfilter(c,tp,sg,g) - return c:IsSetCard(0x48) and c:IsXyzSummonable(sg,sg+g) + return c:IsSetCard(SET_NUMBER) and c:IsXyzSummonable(sg,sg+g) and Duel.GetLocationCountFromEx(tp,tp,sg+g,c)>0 end function s.rescon(sg,e,tp,mg) @@ -122,7 +122,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_DISABLE_EFFECT) @@ -137,4 +137,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.XyzSummon(tp,xyzg:GetFirst(),sg) end end -end +end \ No newline at end of file diff --git a/official/c97783338.lua b/official/c97783338.lua index 6ad4efba2c..5b4802f18b 100644 --- a/official/c97783338.lua +++ b/official/c97783338.lua @@ -17,7 +17,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCountLimit(2,id) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(s.atkcost) e1:SetTarget(s.atktg) e1:SetOperation(s.atkop) @@ -39,7 +39,7 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() diff --git a/official/c97783659.lua b/official/c97783659.lua index ecccbb9caf..af330019db 100644 --- a/official/c97783659.lua +++ b/official/c97783659.lua @@ -1,4 +1,5 @@ --ブラッド・サッカー +--Blood Sucker local s,id=GetID() function s.initial_effect(c) --handes @@ -21,4 +22,4 @@ function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) Duel.DiscardDeck(1-tp,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97792247.lua b/official/c97792247.lua index 34dcbb3fc6..59926f281c 100644 --- a/official/c97792247.lua +++ b/official/c97792247.lua @@ -1,4 +1,5 @@ --スターダスト・アサルト・ウォリアー +--Stardust Assault Warrior local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -22,13 +23,13 @@ function s.initial_effect(c) e2:SetCode(EFFECT_PIERCE) c:RegisterEffect(e2) end -s.listed_series={0x43} +s.listed_series={SET_JUNK} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x43) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_JUNK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -43,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97800311.lua b/official/c97800311.lua index 8769aa51a3..d7758db074 100644 --- a/official/c97800311.lua +++ b/official/c97800311.lua @@ -1,4 +1,4 @@ ---Japanese name +--聖神蛇アポピス --Divine Serpent Apophis --Scripted by Eerie Code local s,id=GetID() @@ -104,4 +104,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97803170.lua b/official/c97803170.lua index f624003653..742c789752 100644 --- a/official/c97803170.lua +++ b/official/c97803170.lua @@ -42,10 +42,9 @@ end function s.spop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end local tc=Duel.GetFirstTarget() - if Duel.DiscardHand(tp,s.cfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then + if Duel.DiscardHand(tp,s.cfilter,1,1,REASON_EFFECT|REASON_DISCARD,nil)~=0 then if tc and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end end -end - +end \ No newline at end of file diff --git a/official/c9780364.lua b/official/c9780364.lua index f910b49bbf..58083aa38a 100644 --- a/official/c9780364.lua +++ b/official/c9780364.lua @@ -13,15 +13,15 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x19),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GLADIATOR),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.filter(c,e) return c:IsFaceup() and c:IsCanBeEffectTarget(e) and c:IsCanChangePosition() end function s.filter2(c) - return c:IsFaceup() and c:IsSetCard(0x19) and c:IsAbleToChangeControler() + return c:IsFaceup() and c:IsSetCard(SET_GLADIATOR) and c:IsAbleToChangeControler() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end @@ -55,4 +55,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.GetControl(tc,tp,PHASE_END,1) end end -end +end \ No newline at end of file diff --git a/official/c97806240.lua b/official/c97806240.lua index 45658794a6..327a5080d2 100644 --- a/official/c97806240.lua +++ b/official/c97806240.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) @@ -22,9 +22,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,1) e1:SetValue(s.aclimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) - return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) -end + return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsTrapEffect() +end \ No newline at end of file diff --git a/official/c97809599.lua b/official/c97809599.lua index af1323fd0f..1e07a21be2 100644 --- a/official/c97809599.lua +++ b/official/c97809599.lua @@ -1,19 +1,16 @@ --旧神の印 +--Seal of the Ancients local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end end @@ -22,4 +19,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.ConfirmCards(tp,g) end -end +end \ No newline at end of file diff --git a/official/c97836203.lua b/official/c97836203.lua index 7eddc5c1b3..c3eb7c991d 100644 --- a/official/c97836203.lua +++ b/official/c97836203.lua @@ -1,4 +1,5 @@ --TG ハルバード・キャノン +--T.G. Halberd Cannon local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -43,7 +44,7 @@ function s.initial_effect(c) e5:SetOperation(s.spop) c:RegisterEffect(e5) end -s.listed_series={0x27} +s.listed_series={SET_TG} s.synchro_tuner_required=1 s.synchro_nt_required=2 function s.discon(e,tp,eg,ep,ev,re,r,rp) @@ -64,7 +65,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.filter(c,e,tp) - return c:IsSetCard(0x27) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) + return c:IsSetCard(SET_TG) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -79,4 +80,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9785661.lua b/official/c9785661.lua index 6b3de162ec..3b5f383a8c 100644 --- a/official/c9785661.lua +++ b/official/c9785661.lua @@ -24,7 +24,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetTarget(s.thtg) diff --git a/official/c9786492.lua b/official/c9786492.lua index c37c4250ac..7469af0443 100644 --- a/official/c9786492.lua +++ b/official/c9786492.lua @@ -1,5 +1,6 @@ --白竜降臨 +--White Dragon Ritual local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,4,nil,73398797) -end +end \ No newline at end of file diff --git a/official/c97870394.lua b/official/c97870394.lua index 1e391ca830..d21920432e 100644 --- a/official/c97870394.lua +++ b/official/c97870394.lua @@ -1,20 +1,20 @@ --- アマゾネス霊術師 --- Amazoness Shaman --- Scripted by Hatter +--アマゾネス霊術師 +--Amazoness Spiritualist +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self from hand or GY + --Special Summon self from hand or GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) - -- Search 1 "Polymerization" + --Search 1 "Polymerization" local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) @@ -27,9 +27,9 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={id,CARD_POLYMERIZATION} -s.listed_series={0x4} +s.listed_series={SET_AMAZONESS} function s.spthfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0x4) and not c:IsCode(id) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0 + return c:IsFaceup() and c:IsSetCard(SET_AMAZONESS) and not c:IsCode(id) and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0 end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.spthfilter(chkc,tp) end @@ -43,18 +43,18 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - -- Cannot Special Summon from the Extra Deck, except "Amazoness" monsters + --Cannot Special Summon from the Extra Deck, except "Amazoness" monsters local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) - e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x4) end) + e1:SetReset(RESET_PHASE|PHASE_END) + e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SET_AMAZONESS) end) Duel.RegisterEffect(e1,tp) - -- Clock Lizard check - aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalSetCard(0x4) end) + --Clock Lizard check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalSetCard(SET_AMAZONESS) end) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and s.spthfilter(tc,tp) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then diff --git a/official/c97885363.lua b/official/c97885363.lua index 4987131704..f094c60d68 100644 --- a/official/c97885363.lua +++ b/official/c97885363.lua @@ -1,4 +1,5 @@ --エレキトンボ +--Wattdragonfly local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0xe} +s.listed_series={SET_WATT} function s.condition(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and e:GetHandler():IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0xe) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_WATT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c97896503.lua b/official/c97896503.lua index d5b458ca7f..751eca3fd4 100644 --- a/official/c97896503.lua +++ b/official/c97896503.lua @@ -1,4 +1,5 @@ --ズババナイト +--Zubaba Knight local s,id=GetID() function s.initial_effect(c) --destroy @@ -22,4 +23,4 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) if d~=nil and d:IsRelateToBattle() and d:IsDefensePos() then Duel.Destroy(d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97904474.lua b/official/c97904474.lua index 7b78a0c72d..c8e097165a 100644 --- a/official/c97904474.lua +++ b/official/c97904474.lua @@ -49,14 +49,14 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(-1800) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end end @@ -75,4 +75,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9791914.lua b/official/c9791914.lua index 2969dab80e..74e0f9c1d5 100644 --- a/official/c9791914.lua +++ b/official/c9791914.lua @@ -1,4 +1,5 @@ --白銀のスナイパー +--Silver Sentinel local s,id=GetID() function s.initial_effect(c) --Negate @@ -30,7 +31,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and rp~=tp then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,0) end end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -48,4 +49,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(tc,REASON_EFFECT) end end -end +end \ No newline at end of file diff --git a/official/c97922283.lua b/official/c97922283.lua index a3aa80340d..3fdcea2b9e 100644 --- a/official/c97922283.lua +++ b/official/c97922283.lua @@ -1,4 +1,5 @@ --野生の咆哮 +--Howl of the Wild local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local dam=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_BEAST),tp,LOCATION_MZONE,0,nil)*300 Duel.Damage(p,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c97926515.lua b/official/c97926515.lua index 7e9b1c82ae..ff7683d505 100644 --- a/official/c97926515.lua +++ b/official/c97926515.lua @@ -1,4 +1,5 @@ --緊急救急救命レスキュー +--Emerging Emergency Rescute Rescue local s,id=GetID() function s.initial_effect(c) --activate @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tg) end -end +end \ No newline at end of file diff --git a/official/c97940434.lua b/official/c97940434.lua index 5b96d5321c..cee8543cc9 100644 --- a/official/c97940434.lua +++ b/official/c97940434.lua @@ -39,7 +39,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler()) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,e:GetHandler()) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -50,4 +50,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c97946536.lua b/official/c97946536.lua index 1a44eed042..b6f8eebc5e 100644 --- a/official/c97946536.lua +++ b/official/c97946536.lua @@ -13,37 +13,37 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x56} +s.listed_series={SET_INZEKTOR} function s.cfilter(c,e,tp,ft) - return c:IsSetCard(0x56) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) + return c:IsSetCard(SET_INZEKTOR) and c:IsAbleToGraveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and (Duel.IsExistingMatchingCard(s.monfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft,c) or Duel.IsExistingMatchingCard(s.eqspfilter,tp,LOCATION_DECK,0,1,nil,tp,ft,c)) end function s.monfilter(c,e,tp,ft,sc) - return c:IsSetCard(0x56) and c:IsMonster() and (s.monspfilter(c,e,tp,sc) or s.moneqfilter(c,tp,ft,sc)) + return c:IsSetCard(SET_INZEKTOR) and c:IsMonster() and (s.monspfilter(c,e,tp,sc) or s.moneqfilter(c,tp,ft,sc)) end function s.monspfilter(c,e,tp,sc) return Duel.GetMZoneCount(tp,sc)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.moneqfilter(c,tp,ft,sc) return (ft>0 or (sc and sc:IsLocation(LOCATION_SZONE) and sc:GetSequence()<5)) and not c:IsForbidden() - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x56),tp,LOCATION_MZONE,0,1,sc) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_INZEKTOR),tp,LOCATION_MZONE,0,1,sc) end function s.eqspfilter(c,tp,ft,sc) - return c:IsSetCard(0x56) and c:IsType(TYPE_EQUIP) and c:IsSpell() + return c:IsSetCard(SET_INZEKTOR) and c:IsType(TYPE_EQUIP) and c:IsSpell() and (ft>0 or (sc and sc:IsLocation(LOCATION_SZONE) and sc:GetSequence()<5)) and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,sc,c) end function s.eqfilter(c,ec) - return c:IsFaceup() and c:IsSetCard(0x56) and ec:CheckEquipTarget(c) + return c:IsFaceup() and c:IsSetCard(SET_INZEKTOR) and ec:CheckEquipTarget(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) if c:IsLocation(LOCATION_HAND) then ft=ft-1 end - if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,e,tp,ft) end + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,c,e,tp,ft) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) - local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,e,tp,ft) + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,c,e,tp,ft) Duel.SendtoGrave(g,REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -81,7 +81,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) elseif op==2 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) - local ec=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,0x56),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + local ec=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsSetCard,SET_INZEKTOR),tp,LOCATION_MZONE,0,1,1,nil):GetFirst() if not ec then return end Duel.HintSelection(ec,true) if not Duel.Equip(tp,sc,ec,true) then return end @@ -89,7 +89,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(function(e,c) return c==e:GetLabelObject() end) e1:SetLabelObject(ec) sc:RegisterEffect(e1) diff --git a/official/c97947705.lua b/official/c97947705.lua index 04d1baf8fe..e21177c032 100644 --- a/official/c97947705.lua +++ b/official/c97947705.lua @@ -1,6 +1,5 @@ --バックアップ・オペレーター --Backup Operator - local s,id=GetID() function s.initial_effect(c) --Special summon itself from hand @@ -47,7 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) local tc=Duel.GetFirstTarget() diff --git a/official/c9794980.lua b/official/c9794980.lua index 6df4189d4f..0d37b81772 100644 --- a/official/c9794980.lua +++ b/official/c9794980.lua @@ -1,5 +1,5 @@ --夢幻転星イドリース ---Astroknightmare Idlee +--Knightmare Incarnation Idlee --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -66,5 +66,4 @@ function s.gyop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c97970833.lua b/official/c97970833.lua index cd7d322328..4855205172 100644 --- a/official/c97970833.lua +++ b/official/c97970833.lua @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(1-tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c97973962.lua b/official/c97973962.lua index 16a6f0a629..5d012b5fad 100644 --- a/official/c97973962.lua +++ b/official/c97973962.lua @@ -1,5 +1,5 @@ --暴走召喚師アレイスター ---Aleister the Meltdown Invoker +--Aleister the Invoker of Madness local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -9,7 +9,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_CHANGE_CODE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(86120751) c:RegisterEffect(e1) --search @@ -41,7 +41,7 @@ function s.spcheck(g,lc,sumtype,tp) return g:CheckDifferentPropertyBinary(Card.GetRace,lc,sumtype,tp) and g:CheckDifferentPropertyBinary(Card.GetAttribute,lc,sumtype,tp) end function s.thcfilter(c,tp) - return c:IsSummonType(SUMMON_TYPE_FUSION) + return c:IsFusionSummoned() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg and eg:IsExists(s.thcfilter,1,nil,tp) @@ -56,7 +56,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.thop(e,tp,eg,ep,ev,re,r,rp) - if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT|REASON_DISCARD)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) if #g>0 then @@ -83,4 +83,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c97997309.lua b/official/c97997309.lua index 8361304fc5..5013d349a3 100644 --- a/official/c97997309.lua +++ b/official/c97997309.lua @@ -1,4 +1,5 @@ --ゲーテの魔導書 +--Spellbook of Fate local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ function s.initial_effect(c) e2:SetCategory(CATEGORY_POSITION) e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetCode(EVENT_FREE_CHAIN) - e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e2:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e2:SetCondition(s.condition) e2:SetCost(s.cost) @@ -42,10 +43,10 @@ function s.initial_effect(c) e3:SetLabel(3) c:RegisterEffect(e3) end -s.listed_series={0x106e} +s.listed_series={SET_SPELLBOOK} s.check=false function s.rfilter(c) - return c:IsSetCard(0x106e) and c:IsSpell() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_SPELLBOOK) and c:IsSpell() and c:IsAbleToRemoveAsCost() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_SPELLCASTER),tp,LOCATION_MZONE,0,1,nil) @@ -131,4 +132,4 @@ function s.activate3(e,tp,eg,ep,ev,re,r,rp) Duel.HintSelection(g) Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98012938.lua b/official/c98012938.lua index 5c3e2fc538..9545508b33 100644 --- a/official/c98012938.lua +++ b/official/c98012938.lua @@ -1,4 +1,5 @@ --獣神ヴァルカン +--Vulcan the Divine local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -52,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,0) e1:SetValue(s.aclimit) e1:SetLabel(tc:GetCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -60,4 +61,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end function s.aclimit(e,re,tp) return re:GetHandler():IsCode(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c98020526.lua b/official/c98020526.lua index 99f9b6ff8c..76eada87af 100644 --- a/official/c98020526.lua +++ b/official/c98020526.lua @@ -64,7 +64,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) elseif op==2 then Duel.RegisterFlagEffect(tp,id+1,RESET_PHASE|PHASE_END,0,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - sg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil) + sg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,0,LOCATION_GRAVE|LOCATION_MZONE,1,1,nil) if #sg==0 then return end Duel.HintSelection(sg,true) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) diff --git a/official/c98022050.lua b/official/c98022050.lua index 2098daff87..fe6b95d427 100644 --- a/official/c98022050.lua +++ b/official/c98022050.lua @@ -1,5 +1,5 @@ --珠玉獣-アルゴザウルス ---Jewel Beast - Argosaurus +--Animadorned Archosaur --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0x10e} +s.listed_series={SET_EVOLUTION_PILL} s.listed_names={id} function s.desfilter(c,tp) return c:IsRace(RACE_DINOSAUR) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsCode(id) @@ -26,19 +26,19 @@ function s.desfilter(c,tp) end function s.thfilter(c,oc) if not c:IsAbleToHand() then return false end - if (c:IsSpell() and c:IsSetCard(0x10e)) then return true end + if (c:IsSpell() and c:IsSetCard(SET_EVOLUTION_PILL)) then return true end return c:IsMonster() and oc:HasLevel() and c:GetOriginalLevel()==oc:GetOriginalLevel() and (c:IsRace(RACE_WINGEDBEAST) or c:IsRace(RACE_REPTILE) or c:IsRace(RACE_SEASERPENT)) end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end - local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,tp) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,nil,tp) end + local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,nil,tp) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local tc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND|LOCATION_MZONE,0,1,1,nil,tp):GetFirst() if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) @@ -48,5 +48,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -end - +end \ No newline at end of file diff --git a/official/c98024118.lua b/official/c98024118.lua index 7409d0ac3c..cd71ea4270 100644 --- a/official/c98024118.lua +++ b/official/c98024118.lua @@ -1,4 +1,5 @@ --ホワイトポータン +--White Potan local s,id=GetID() function s.initial_effect(c) --lp damage @@ -40,4 +41,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98045062.lua b/official/c98045062.lua index d52ec1b31d..c011c30e42 100644 --- a/official/c98045062.lua +++ b/official/c98045062.lua @@ -72,4 +72,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) --Take control of that target until the End Phase Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c98049038.lua b/official/c98049038.lua index 9a8c990af6..70d510b1ac 100644 --- a/official/c98049038.lua +++ b/official/c98049038.lua @@ -1,4 +1,5 @@ --ステルスロイド +--Stealthroid local s,id=GetID() function s.initial_effect(c) --destroy @@ -7,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetCode(EVENT_PHASE+PHASE_BATTLE) + e1:SetCode(EVENT_PHASE|PHASE_BATTLE) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.descon) @@ -15,13 +16,13 @@ function s.initial_effect(c) e1:SetOperation(s.desop) c:RegisterEffect(e1) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.descon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()==tp and e:GetHandler():GetBattledGroupCount()>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x16),tp,LOCATION_MZONE,0,1,e:GetHandler()) + return Duel.IsTurnPlayer(tp) and e:GetHandler():GetBattledGroupCount()>0 + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ROID),tp,LOCATION_MZONE,0,1,e:GetHandler()) end function s.desfilter(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and s.desfilter(chkc) end @@ -32,8 +33,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.desop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x16),tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end + if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_ROID),tp,LOCATION_MZONE,0,1,e:GetHandler()) then return end if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98049915.lua b/official/c98049915.lua index 47879b010b..c9192b56ed 100644 --- a/official/c98049915.lua +++ b/official/c98049915.lua @@ -1,4 +1,5 @@ --魔法のランプ +--Mystic Lamp local s,id=GetID() function s.initial_effect(c) --direct attack @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DIRECT_ATTACK) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c98069388.lua b/official/c98069388.lua index dc748b0531..4208910c0d 100644 --- a/official/c98069388.lua +++ b/official/c98069388.lua @@ -35,4 +35,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.NegateSummon(eg) Duel.Destroy(eg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98076754.lua b/official/c98076754.lua index 8a8611cfc2..3eb3d3aade 100644 --- a/official/c98076754.lua +++ b/official/c98076754.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) c:RegisterEffect(e1) --Increase ATK local e2=Effect.CreateEffect(c) @@ -54,18 +54,15 @@ function s.initial_effect(c) e5:SetOperation(s.tdop) c:RegisterEffect(e5) end -s.listed_series={0xc4} -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_ZEFRA} function s.effcon(e) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0xc4),e:GetHandlerPlayer(),LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)>=e:GetLabel() + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ZEFRA),e:GetHandlerPlayer(),LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)>=e:GetLabel() end function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsFaceup,0,LOCATION_EXTRA,LOCATION_EXTRA,nil)*100 end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0xc4),tp,LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)==10 + return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_ZEFRA),tp,LOCATION_EXTRA,0,nil):GetClassCount(Card.GetCode)==10 end function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -73,11 +70,11 @@ function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(c,REASON_COST) end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end - local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil) + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,1,nil) end + local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,nil) + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE,nil) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end \ No newline at end of file diff --git a/official/c98093548.lua b/official/c98093548.lua index 85b827be75..e3edad9b75 100644 --- a/official/c98093548.lua +++ b/official/c98093548.lua @@ -1,7 +1,6 @@ --俊炎星-ゾウセイ --Brotherhood of the Fire Fist - Elephant --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -32,10 +31,9 @@ local e1=Effect.CreateEffect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x7c,0x79} - +s.listed_series={SET_FIRE_FORMATION,SET_FIRE_FIST} function s.cfilter(c) - return c:IsFaceup() and (c:IsSpell() or c:IsTrap()) and c:IsSetCard(0x7c) and c:IsAbleToGraveAsCost() + return c:IsFaceup() and (c:IsSpell() or c:IsTrap()) and c:IsSetCard(SET_FIRE_FORMATION) and c:IsAbleToGraveAsCost() end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local nc=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) @@ -49,7 +47,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) end end function s.spfilter(c,e,tp) - return c:IsSetCard(0x79) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_FIRE_FIST) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -65,10 +63,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.shfilter(c) - return c:IsAbleToDeck() and c:IsSetCard(0x7c) and (c:IsSpell() or c:IsTrap()) + return c:IsAbleToDeck() and c:IsSetCard(SET_FIRE_FORMATION) and (c:IsSpell() or c:IsTrap()) end function s.addfilter(c) - return c:IsMonster() and c:IsSetCard(0x79) and c:IsAbleToHand() and c:IsLevelAbove(5) + return c:IsMonster() and c:IsSetCard(SET_FIRE_FIST) and c:IsAbleToHand() and c:IsLevelAbove(5) end function s.addtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.shfilter(chkc) end @@ -80,7 +78,7 @@ function s.addtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.addop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then local g=Duel.GetMatchingGroup(s.addfilter,tp,LOCATION_DECK,0,nil) if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() diff --git a/official/c98095162.lua b/official/c98095162.lua index b7063dff61..2948d5a4e7 100644 --- a/official/c98095162.lua +++ b/official/c98095162.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,id) - e2:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e2:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) @@ -83,4 +83,4 @@ end function s.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) -end +end \ No newline at end of file diff --git a/official/c980973.lua b/official/c980973.lua index 460d659df6..e82d78d57c 100644 --- a/official/c980973.lua +++ b/official/c980973.lua @@ -8,38 +8,34 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetCondition(s.spcon) - e1:SetCost(s.spcost) + e1:SetCost(Cost.SelfToGrave) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) end s.listed_names={46384672} s.LVnum=3 -s.LVset=0x111 +s.LVset=SET_ARMED_DRAGON function s.spcon(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer() end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.spfilter(c,e,tp) return c:IsCode(46384672) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if e:GetHandler():GetSequence()<5 then ft=ft+1 end - if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) + if chk==0 then return ft>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() + local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst() if tc then Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP) tc:CompleteProcedure() end -end +end \ No newline at end of file diff --git a/official/c98126725.lua b/official/c98126725.lua index aa76019d03..691f32c69f 100644 --- a/official/c98126725.lua +++ b/official/c98126725.lua @@ -1,4 +1,5 @@ --紫炎の参謀 +--Shien's Advisor local s,id=GetID() function s.initial_effect(c) --special summon @@ -11,9 +12,9 @@ function s.initial_effect(c) e1:SetOperation(s.atop) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.atcon(e,tp,eg,ep,ev,re,r,rp,chk) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x3d),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_SIX_SAMURAI),tp,LOCATION_MZONE,0,1,nil) end function s.attg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -32,7 +33,7 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTarget(s.tglimit) e1:SetLabel(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --disable spsummon local e2=Effect.CreateEffect(c) @@ -43,9 +44,9 @@ function s.atop(e,tp,eg,ep,ev,re,r,rp) e2:SetTargetRange(1,1) e2:SetTarget(s.tglimit) e2:SetLabel(e:GetLabel()) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) end function s.tglimit(e,c) return c:IsRace(e:GetLabel()) -end +end \ No newline at end of file diff --git a/official/c98127546.lua b/official/c98127546.lua index cc767457c4..c7e66b67a8 100644 --- a/official/c98127546.lua +++ b/official/c98127546.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) - e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end) + e1:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -89,7 +89,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) end function s.immval(e,re) local c=e:GetHandler() - if not (re:IsActivated() and c:IsSummonType(SUMMON_TYPE_LINK) and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end + if not (re:IsActivated() and c:IsLinkSummoned() and e:GetOwnerPlayer()==1-re:GetOwnerPlayer()) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) return not g or not g:IsContains(c) diff --git a/official/c98139712.lua b/official/c98139712.lua index 2b6da2cc33..f185542018 100644 --- a/official/c98139712.lua +++ b/official/c98139712.lua @@ -27,4 +27,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,d1,REASON_EFFECT,true) Duel.Damage(tp,d2,REASON_EFFECT,true) Duel.RDComplete() -end +end \ No newline at end of file diff --git a/official/c98143165.lua b/official/c98143165.lua index 8da8e7391e..0bc84b1adf 100644 --- a/official/c98143165.lua +++ b/official/c98143165.lua @@ -17,4 +17,4 @@ function s.initial_effect(c) end function s.filter(c) return c:HasLevel() -end +end \ No newline at end of file diff --git a/official/c98147766.lua b/official/c98147766.lua index 299b5b5bdd..147f07fe4d 100644 --- a/official/c98147766.lua +++ b/official/c98147766.lua @@ -1,4 +1,5 @@ --ジェネティック・ウーマン +--Genetic Woman local s,id=GetID() function s.initial_effect(c) --salvage @@ -9,15 +10,11 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) -end function s.filter(c) return c:IsFaceup() and c:IsRace(RACE_PSYCHIC) and c:IsAbleToHand() end @@ -34,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c98153934.lua b/official/c98153934.lua index 7e5e49dd5d..0bd4992427 100644 --- a/official/c98153934.lua +++ b/official/c98153934.lua @@ -25,9 +25,9 @@ function s.initial_effect(c) e3:SetOperation(s.repop) c:RegisterEffect(e3) end -s.listed_series={0x10db} +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.filter(c,p) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x10db) and c:IsControler(p) + return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsControler(p) end function s.regcon(e,tp,eg,ep,ev,re,r,rp) if not re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -42,7 +42,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_SZONE) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetLabelObject(re) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_CHAIN) e1:SetCondition(s.damcon) e1:SetOperation(s.damop) c:RegisterEffect(e1) @@ -67,4 +67,4 @@ function s.repval(e,c) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c981540.lua b/official/c981540.lua index 1c6a3ff288..f41785636b 100644 --- a/official/c981540.lua +++ b/official/c981540.lua @@ -1,6 +1,5 @@ --ハーフ・アンブレイク --Half Unbreak - local s,id=GetID() function s.initial_effect(c) --Targeted monster cannot be destroyed by battle, you take half battle damage involving it @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.activate) - e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_BATTLE_START|TIMING_END_PHASE) c:RegisterEffect(e1) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -30,14 +29,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) --Halve battle damage involving this card local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e2:SetValue(aux.ChangeBattleDamage(0,HALF_DAMAGE)) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end \ No newline at end of file diff --git a/official/c98154550.lua b/official/c98154550.lua index ce4e9de7ba..05a3fa679a 100644 --- a/official/c98154550.lua +++ b/official/c98154550.lua @@ -39,7 +39,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c98159737.lua b/official/c98159737.lua index 3754f0e811..ccaac299de 100644 --- a/official/c98159737.lua +++ b/official/c98159737.lua @@ -1,5 +1,5 @@ --天威龍-アーダラ ---Skyforce Dragon - Adara +--Tenyi Spirit - Adhara --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -19,11 +19,11 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_IGNITION) - e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e2:SetRange(LOCATION_HAND|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCondition(s.thcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -61,4 +61,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c98162021.lua b/official/c98162021.lua index 8b41d5c266..d483e87ac7 100644 --- a/official/c98162021.lua +++ b/official/c98162021.lua @@ -2,8 +2,8 @@ --Shien's Daredevil local s,id=GetID() function s.initial_effect(c) - c:EnableCounterPermit(0x3) - c:SetCounterLimit(0x3,1) + c:EnableCounterPermit(COUNTER_BUSHIDO) + c:SetCounterLimit(COUNTER_BUSHIDO,1) --summon success local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,32 +33,32 @@ function s.initial_effect(c) e3:SetOperation(s.addc2) c:RegisterEffect(e3) end -s.counter_place_list={0x3} +s.counter_place_list={COUNTER_BUSHIDO} function s.addct(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3) + Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,COUNTER_BUSHIDO) end function s.addc(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - e:GetHandler():AddCounter(0x3,1) + e:GetHandler():AddCounter(COUNTER_BUSHIDO,1) end end function s.attackup(e,c) - return c:GetCounter(0x3)*300 + return c:GetCounter(COUNTER_BUSHIDO)*300 end function s.addct2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsOnField() and chkc:IsCanAddCounter(0x3,1) end - if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x3,1,REASON_EFFECT) - and Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),0x3,1) end + if chkc then return chkc:IsOnField() and chkc:IsCanAddCounter(COUNTER_BUSHIDO,1) end + if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,COUNTER_BUSHIDO,1,REASON_EFFECT) + and Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),COUNTER_BUSHIDO,1) end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,1)) - Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),0x3,1) + Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),COUNTER_BUSHIDO,1) end function s.addc2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:GetCounter(0x3)==0 then return end - c:RemoveCounter(tp,0x3,1,REASON_EFFECT) + if c:GetCounter(COUNTER_BUSHIDO)==0 then return end + c:RemoveCounter(tp,COUNTER_BUSHIDO,1,REASON_EFFECT) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then - tc:AddCounter(0x3,1) + tc:AddCounter(COUNTER_BUSHIDO,1) end -end +end \ No newline at end of file diff --git a/official/c98162242.lua b/official/c98162242.lua index 23adc8352f..52cdfd8837 100644 --- a/official/c98162242.lua +++ b/official/c98162242.lua @@ -1,4 +1,5 @@ --ニードルバンカー +--Needle Burrower local s,id=GetID() function s.initial_effect(c) --damage @@ -28,4 +29,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98169343.lua b/official/c98169343.lua index 2afe46707d..ec4eb58464 100644 --- a/official/c98169343.lua +++ b/official/c98169343.lua @@ -23,7 +23,7 @@ function s.initial_effect(c) e2:SetHintTiming(TIMING_DAMAGE_STEP) e2:SetCountLimit(1,id) e2:SetCondition(s.atkcon) - e2:SetCost(s.atkcost) + e2:SetCost(Cost.SelfToGrave) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end @@ -51,10 +51,6 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local tc,oc=Duel.GetBattleMonster(tp) return tc and oc and tc:IsSetCard(SET_TRICKSTAR) and tc:IsFaceup() end -function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST) -end function s.atkop(e,tp,eg,ep,ev,re,r,rp,chk) local tc,oc=Duel.GetBattleMonster(tp) if tc:IsFaceup() and tc:IsControler(tp) then diff --git a/official/c9817927.lua b/official/c9817927.lua index f461109ed9..6ddbc75ce3 100644 --- a/official/c9817927.lua +++ b/official/c9817927.lua @@ -1,4 +1,5 @@ --逆ギレパンダ +--Gyaku-Gire Panda local s,id=GetID() function s.initial_effect(c) --atk @@ -17,4 +18,4 @@ function s.initial_effect(c) end function s.val(e,c) return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500 -end +end \ No newline at end of file diff --git a/official/c98204536.lua b/official/c98204536.lua index 97dc2c1c42..562ed2305c 100644 --- a/official/c98204536.lua +++ b/official/c98204536.lua @@ -1,5 +1,5 @@ --先史遺産驚神殿-トリリトン ---Chronomaly Palace Trilithon +--Chronomaly Temple - Trilithon --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -16,7 +16,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.nscon) - e1:SetCost(s.nscost) + e1:SetCost(Cost.PayLP(500)) e1:SetTarget(s.nstg) e1:SetOperation(s.nsop) c:RegisterEffect(e1) @@ -31,17 +31,13 @@ function s.initial_effect(c) e2:SetOperation(s.rop) c:RegisterEffect(e2) end -s.listed_series={0x70,0x48} +s.listed_series={SET_CHRONOMALY,SET_NUMBER} function s.nscon(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x70),tp,LOCATION_MZONE,0,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_CHRONOMALY),tp,LOCATION_MZONE,0,nil) return ct==Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) end -function s.nscost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.nsfilter(c) - return c:IsSetCard(0x70) and c:IsSummonable(true,nil) + return c:IsSetCard(SET_CHRONOMALY) and c:IsSummonable(true,nil) end function s.nstg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.nsfilter,tp,LOCATION_HAND,0,1,nil) end @@ -57,7 +53,7 @@ end function s.rcon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() return (r&REASON_COST)~=0 and re:IsActivated() - and re:IsActiveType(TYPE_XYZ) and (rc:IsSetCard(0x70) or rc:IsSetCard(0x48)) + and re:IsActiveType(TYPE_XYZ) and (rc:IsSetCard(SET_CHRONOMALY) or rc:IsSetCard(SET_NUMBER)) and e:GetHandler():IsAbleToGraveAsCost() and ep==e:GetOwnerPlayer() and ev>=1 and rc:GetOverlayCount()>=ev-1 end diff --git a/official/c9822220.lua b/official/c9822220.lua index 4fcc2ac92a..4c8356cd0e 100644 --- a/official/c9822220.lua +++ b/official/c9822220.lua @@ -1,7 +1,6 @@ --天獄の王 --Lord of the Heavenly Prison --Scripted by DyXel - local s,id=GetID() function s.initial_effect(c) --Reveal and protect all Set cards. @@ -34,14 +33,14 @@ end function s.revop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() --Register flag effect which will be used to check for protection/search. - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) --Reveal until the end of opponent's turn. local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,2)) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_PUBLIC) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) c:RegisterEffect(e1) --Protect Set cards on the field as long as this card is revealed. local e2=Effect.CreateEffect(c) @@ -53,7 +52,7 @@ function s.revop(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(function(e)return s.isrev(e:GetHandler())end) e2:SetTarget(function(_,c)return c:IsFacedown()end) e2:SetValue(1) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) + e2:SetReset(RESETS_STANDARD_PHASE_END,2) c:RegisterEffect(e2) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) @@ -95,7 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.rmcon) e1:SetOperation(s.rmop) - e1:SetReset(RESET_PHASE+PHASE_END,2) + e1:SetReset(RESET_PHASE|PHASE_END,2) Duel.RegisterEffect(e1,tp) tc:CreateEffectRelation(e1) end @@ -112,4 +111,4 @@ end function s.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98225108.lua b/official/c98225108.lua index 5eacf2833b..cc95318a7a 100644 --- a/official/c98225108.lua +++ b/official/c98225108.lua @@ -1,4 +1,5 @@ --レオンタウロス +--Leotaur local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -14,4 +15,4 @@ function s.condtion(e) local ph=Duel.GetCurrentPhase() local bc=e:GetHandler():GetBattleTarget() return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and bc and not bc:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c98229575.lua b/official/c98229575.lua index 8d6cb44509..504477a623 100644 --- a/official/c98229575.lua +++ b/official/c98229575.lua @@ -23,10 +23,10 @@ function s.initial_effect(c) e2:SetOperation(s.atkop) c:RegisterEffect(e2) end -s.listed_series={0xb2} +s.listed_series={SET_UA} s.listed_names={id} function s.spfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(id) and c:IsAbleToHandAsCost() + return c:IsFaceup() and c:IsSetCard(SET_UA) and not c:IsCode(id) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcon(e,c) @@ -57,7 +57,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) local at=Duel.GetAttacker() - return at:IsSetCard(0xb2) and at:IsControler(tp) and at~=e:GetHandler() and e:GetHandler():IsAttackAbove(800) + return at:IsSetCard(SET_UA) and at:IsControler(tp) and at~=e:GetHandler() and e:GetHandler():IsAttackAbove(800) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,7 +68,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(-800) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) if at:IsFaceup() and at:IsRelateToBattle() then local e2=e1:Clone() @@ -76,4 +76,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) at:RegisterEffect(e2) end end -end +end \ No newline at end of file diff --git a/official/c98239899.lua b/official/c98239899.lua index 5271806e90..6cb243f194 100644 --- a/official/c98239899.lua +++ b/official/c98239899.lua @@ -1,4 +1,5 @@ --鎖付き爆弾 +--Blast with Chain local s,id=GetID() function s.initial_effect(c) --Activate @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetCost(aux.RemainFieldCost) e1:SetTarget(s.target) e1:SetOperation(s.operation) @@ -23,9 +24,6 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end @@ -37,14 +35,14 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then + if tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) --Atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Equip limit local e2=Effect.CreateEffect(c) @@ -52,7 +50,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(s.eqlimit) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e2) else c:CancelToGrave(false) @@ -62,13 +60,13 @@ function s.eqlimit(e,c) return c:GetControler()==e:GetOwnerPlayer() end function s.descon(e,tp,eg,ep,ev,re,r,rp) - return r&0x41==0x41 and e:GetHandler():GetEquipTarget()~=nil + return r&(REASON_DESTROY|REASON_EFFECT)==(REASON_DESTROY|REASON_EFFECT) and e:GetHandler():GetEquipTarget()~=nil end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) @@ -76,4 +74,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98252586.lua b/official/c98252586.lua index 394dd9c5db..ead5c9908b 100644 --- a/official/c98252586.lua +++ b/official/c98252586.lua @@ -1,4 +1,5 @@ --フォロー・ウィンド +--Follow Wind local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsRace,RACE_WINGEDBEAST)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(300) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c98259197.lua b/official/c98259197.lua index 2360843e76..41ffcd94ef 100644 --- a/official/c98259197.lua +++ b/official/c98259197.lua @@ -1,4 +1,5 @@ --おジャマッスル +--Ojamuscle local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,30 +12,30 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xf} +s.listed_series={SET_OJAMA} s.listed_names={90140980} function s.filter(c) return c:IsFaceup() and c:IsCode(90140980) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xf),0,LOCATION_MZONE,LOCATION_MZONE,1,c) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_OJAMA),0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) - local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0xf),0,LOCATION_MZONE,LOCATION_MZONE,g:GetFirst()) + local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_OJAMA),0,LOCATION_MZONE,LOCATION_MZONE,g:GetFirst()) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,#dg,0,0) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0xf),0,LOCATION_MZONE,LOCATION_MZONE,tc) + local dg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_OJAMA),0,LOCATION_MZONE,LOCATION_MZONE,tc) local ct=Duel.Destroy(dg,REASON_EFFECT) if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*1000) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c98263709.lua b/official/c98263709.lua index 44ddba591a..760d1d8f49 100644 --- a/official/c98263709.lua +++ b/official/c98263709.lua @@ -1,6 +1,5 @@ --銀河魔鏡士 --Galaxy Mirror Sage - local s,id=GetID() function s.initial_effect(c) --Gain 500 LP per "Galaxy" monster in your GY @@ -31,10 +30,9 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0x7b} - +s.listed_series={SET_GALAXY} function s.filter(c) - return c:IsSetCard(0x7b) and c:IsMonster() + return c:IsSetCard(SET_GALAXY) and c:IsMonster() end function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -49,23 +47,23 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) Duel.Recover(p,val,REASON_EFFECT) end function s.flipop(e,tp,eg,ep,ev,re,r,rp) - e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_OVERLAY-RESET_LEAVE-RESET_TOGRAVE,0,0) + e:GetHandler():RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_OVERLAY-RESET_LEAVE-RESET_TOGRAVE,0,0) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetFlagEffect(id)~=0 and e:GetHandler():IsReason(REASON_DESTROY) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x7b) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GALAXY) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if not tc then return end if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) then @@ -75,7 +73,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c98266377.lua b/official/c98266377.lua index a7e6d27d7e..2261698f4f 100644 --- a/official/c98266377.lua +++ b/official/c98266377.lua @@ -1,4 +1,5 @@ --E・HERO ザ・ヒート +--Elemental HERO Heat local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -9,7 +10,7 @@ function s.initial_effect(c) e1:SetValue(s.val) c:RegisterEffect(e1) end -s.listed_series={0x3008} +s.listed_series={SET_ELEMENTAL_HERO} function s.val(e,c) - return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x3008),c:GetControler(),LOCATION_MZONE,0,nil)*200 -end + return Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_ELEMENTAL_HERO),c:GetControler(),LOCATION_MZONE,0,nil)*200 +end \ No newline at end of file diff --git a/official/c98273947.lua b/official/c98273947.lua index b74ef86ff5..1e4a5d859b 100644 --- a/official/c98273947.lua +++ b/official/c98273947.lua @@ -1,4 +1,5 @@ --エンジェル・リフト +--Graceful Revival local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,7 +31,7 @@ function s.filter(c,e,tp) return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc,e,tp) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -58,4 +59,4 @@ function s.descon2(e,tp,eg,ep,ev,re,r,rp) end function s.desop2(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(e:GetHandler(),REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98280324.lua b/official/c98280324.lua index 0ea7e03532..69338bedee 100644 --- a/official/c98280324.lua +++ b/official/c98280324.lua @@ -1,4 +1,5 @@ --ファーニマル・シープ +--Fluffal Sheep local s,id=GetID() function s.initial_effect(c) --special summon @@ -20,10 +21,10 @@ function s.initial_effect(c) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0xa9,0xc3} +s.listed_series={SET_FLUFFAL,SET_EDGE_IMP} s.listed_names={id} function s.filter(c) - return c:IsFaceup() and c:IsSetCard(0xa9) and not c:IsCode(id) + return c:IsFaceup() and c:IsSetCard(SET_FLUFFAL) and not c:IsCode(id) end function s.spcon(e,c) if c==nil then return true end @@ -31,7 +32,7 @@ function s.spcon(e,c) and Duel.IsExistingMatchingCard(s.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function s.cfilter(c,ft) - return c:IsFaceup() and c:IsSetCard(0xa9) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) + return c:IsFaceup() and c:IsSetCard(SET_FLUFFAL) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -41,17 +42,17 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoHand(g,nil,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsSetCard(0xc3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_EDGE_IMP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98287529.lua b/official/c98287529.lua index 159ace6617..5f38087d10 100644 --- a/official/c98287529.lua +++ b/official/c98287529.lua @@ -29,10 +29,10 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xda} +s.listed_series={SET_DRACOVERLORD} s.listed_names={23160024,id} function s.skipcon(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) + return e:GetHandler():IsRitualSummoned() end function s.skipop(e,tp,eg,ep,ev,re,r,rp) --Skip the MP1 of the opponent's next turn @@ -44,7 +44,7 @@ function s.skipop(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e) return Duel.GetTurnCount()~=e:GetLabel() end) e1:SetLabel(Duel.GetTurnCount()) local ct=Duel.IsTurnPlayer(tp) and 1 or 2 - e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,ct) + e1:SetReset(RESET_PHASE|PHASE_END|RESET_OPPO_TURN,ct) Duel.RegisterEffect(e1,tp) end function s.distg(e,c) @@ -54,7 +54,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function s.thfilter(c) - return c:IsSetCard(0xda) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_DRACOVERLORD) and not c:IsCode(id) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c98299011.lua b/official/c98299011.lua index 529d23f2a9..0ffbfc153f 100644 --- a/official/c98299011.lua +++ b/official/c98299011.lua @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DRAW_PHASE) + e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_DRAW_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -24,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local rec=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300 Duel.Recover(p,rec,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98301564.lua b/official/c98301564.lua index 0ea1d1523b..a6e5945bc5 100644 --- a/official/c98301564.lua +++ b/official/c98301564.lua @@ -1,4 +1,5 @@ --解放のアリアドネ +--Guiding Ariadne local s,id=GetID() function s.initial_effect(c) --pendulum summon @@ -58,4 +59,4 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) local tg=sg:Select(1-tp,1,1,nil) Duel.SendtoHand(tg,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9831539.lua b/official/c9831539.lua index 15e32fd7bb..083b5ab868 100644 --- a/official/c9831539.lua +++ b/official/c9831539.lua @@ -1,4 +1,5 @@ --タンホイザーゲート +--Tannhauser Gate local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,9 +36,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL) e1:SetValue(lv) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c98336111.lua b/official/c98336111.lua index f28fe9148c..98cbb0e539 100644 --- a/official/c98336111.lua +++ b/official/c98336111.lua @@ -1,4 +1,5 @@ --フュージョニストキラー +--Fusion Devourer local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -18,4 +19,4 @@ function s.condtion(e) end function s.target(e,c) return c==e:GetHandler():GetBattleTarget() and c:IsType(TYPE_FUSION) -end +end \ No newline at end of file diff --git a/official/c98338152.lua b/official/c98338152.lua index 61bd7d735e..9b9628049d 100644 --- a/official/c98338152.lua +++ b/official/c98338152.lua @@ -42,4 +42,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.GetControl(tc,tp,PHASE_END,1) end end -end +end \ No newline at end of file diff --git a/official/c98358303.lua b/official/c98358303.lua index ffddb6a71e..139476e3cc 100644 --- a/official/c98358303.lua +++ b/official/c98358303.lua @@ -1,4 +1,5 @@ --静寂のサイコウィッチ +--Serene Psychic Witch local s,id=GetID() function s.initial_effect(c) --remove @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1) - e2:SetCode(EVENT_PHASE+PHASE_STANDBY) + e2:SetCode(EVENT_PHASE|PHASE_STANDBY) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) @@ -45,8 +46,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) if c:IsRelateToEffect(e) then - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2) + c:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,2) e:SetLabelObject(tc) end end @@ -68,4 +69,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98360333.lua b/official/c98360333.lua index a10a12667a..348dd87039 100644 --- a/official/c98360333.lua +++ b/official/c98360333.lua @@ -1,7 +1,6 @@ --Evil★Twin チャレンジ --Evil★Twin Challenge --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -11,23 +10,23 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) - e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE) + e1:SetHintTiming(0,TIMING_MAIN_END|TIMING_END_PHASE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end --Lists “Kisikil” and "Lilla" archetype -s.listed_series={0x153,0x154} +s.listed_series={SET_KI_SIKIL,SET_LIL_LA} --Specifically lists itself s.listed_names={id} --Check “Kisikil” or “Lilla” monster function s.filter(c,e,tp) - return (c:IsSetCard(0x153) or c:IsSetCard(0x154)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) + return (c:IsSetCard(SET_KI_SIKIL) or c:IsSetCard(SET_LIL_LA)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end --Check for "Evil★Twin" link monster function s.lkfilter(c) - return c:IsSetCard(0x155) and c:IsLinkSummonable() + return c:IsSetCard(SET_EVIL_TWIN) and c:IsLinkSummonable() end --Activation legality function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -51,4 +50,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.LinkSummon(tp,sg:GetFirst()) end end -end +end \ No newline at end of file diff --git a/official/c98371278.lua b/official/c98371278.lua index 4d224f30d8..989c0efd78 100644 --- a/official/c98371278.lua +++ b/official/c98371278.lua @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetCode(EVENT_DAMAGE_STEP_END) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.condition) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) @@ -51,7 +51,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) ec:RegisterEffect(e1) @@ -60,7 +60,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(500) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) ec:RegisterEffect(e2) end end @@ -87,4 +87,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.ChainAttack() end end -end +end \ No newline at end of file diff --git a/official/c9837195.lua b/official/c9837195.lua index f49fe3c592..d9ccb08ced 100644 --- a/official/c9837195.lua +++ b/official/c9837195.lua @@ -14,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x10} +s.listed_series={SET_GUSTO} function s.filter1(c) - return c:IsSetCard(0x10) and c:IsMonster() and c:IsAbleToDeck() + return c:IsSetCard(SET_GUSTO) and c:IsMonster() and c:IsAbleToDeck() end function s.filter2(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) @@ -36,7 +36,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local ex,g1=Duel.GetOperationInfo(0,CATEGORY_TODECK) local ex,g2=Duel.GetOperationInfo(0,CATEGORY_DISABLE) if g1:GetFirst():IsRelateToEffect(e) then - Duel.SendtoDeck(g1,nil,2,REASON_EFFECT) + Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) local og=Duel.GetOperatedGroup() if og:GetFirst():IsLocation(LOCATION_DECK) or og:GetFirst():IsLocation(LOCATION_EXTRA) then local tc=g2:GetFirst() @@ -44,12 +44,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end diff --git a/official/c98374133.lua b/official/c98374133.lua index b8ce4b8d7a..11ffd2d152 100644 --- a/official/c98374133.lua +++ b/official/c98374133.lua @@ -1,4 +1,5 @@ --覚醒 +--Invigoration local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH)) @@ -14,4 +15,4 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetValue(-200) c:RegisterEffect(e3) -end +end \ No newline at end of file diff --git a/official/c98380593.lua b/official/c98380593.lua index 6ad07ad414..c6571c84df 100644 --- a/official/c98380593.lua +++ b/official/c98380593.lua @@ -1,4 +1,5 @@ --至高の木の実 +--Supremacy Berry local s,id=GetID() function s.initial_effect(c) --recover @@ -31,4 +32,4 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp) else Duel.Damage(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98385955.lua b/official/c98385955.lua index 8d62a5b2a0..85916f322f 100644 --- a/official/c98385955.lua +++ b/official/c98385955.lua @@ -26,7 +26,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E+TIMING_MAIN_END) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E|TIMING_MAIN_END) e3:SetTarget(s.tdtg) e3:SetOperation(s.tdop) c:RegisterEffect(e3) diff --git a/official/c9839115.lua b/official/c9839115.lua index 507a543bef..a629db51cd 100644 --- a/official/c9839115.lua +++ b/official/c9839115.lua @@ -79,7 +79,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(nontuner_lv*300) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,2) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END,2) c:RegisterEffect(e1) Duel.BreakEffect() Duel.Damage(1-tp,tuner_lv*300,REASON_EFFECT) diff --git a/official/c9839945.lua b/official/c9839945.lua index a2fd13d5be..33abc32d05 100644 --- a/official/c9839945.lua +++ b/official/c9839945.lua @@ -1,5 +1,5 @@ --照耀の光霊使いライナ ---Lyna the Light Charmer, Shining +--Lyna the Light Charmer, Lustrous local s,id=GetID() function s.initial_effect(c) --Link summon @@ -37,7 +37,7 @@ end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() local lg=c:GetLinkedGroup() - local zone=c:GetFreeLinkedZone()&0x1f + local zone=c:GetFreeLinkedZone()&ZONES_MMZ if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.spfilter(chkc,e,tp,zone) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end @@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - local zone=e:GetHandler():GetFreeLinkedZone()&0x1f + local zone=e:GetHandler():GetFreeLinkedZone()&ZONES_MMZ local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and zone~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) @@ -54,7 +54,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp==1-tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp==1-tp and c:IsLinkSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end function s.thfilter(c) return c:IsDefenseBelow(1500) and c:IsMonster() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c983995.lua b/official/c983995.lua index 66580cb7aa..e2f2e1b8b8 100644 --- a/official/c983995.lua +++ b/official/c983995.lua @@ -31,9 +31,9 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-#tg>0 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil) end + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD|LOCATION_HAND,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) - Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD|LOCATION_HAND) end function s.operation(e,tp,eg,ep,ev,re,r,rp) if not Duel.NegateEffect(ev) then return end diff --git a/official/c984114.lua b/official/c984114.lua index 557f0bea57..a9893c5050 100644 --- a/official/c984114.lua +++ b/official/c984114.lua @@ -19,9 +19,9 @@ function s.initial_effect(c) e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS) c:RegisterEffect(e3) end -s.listed_series={0x16} +s.listed_series={SET_ROID} function s.filter(c) - return c:IsSetCard(0x16) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_ROID) and c:GetCode()~=id and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -37,4 +37,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c98414735.lua b/official/c98414735.lua index 749af3aaf9..6978e63c61 100644 --- a/official/c98414735.lua +++ b/official/c98414735.lua @@ -1,6 +1,5 @@ --バージェストマ・カナディア --Paleozoic Canadia - local s,id=GetID() function s.initial_effect(c) --Change 1 of opponent's monsters to face-down defense position @@ -9,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) + e1:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER|TIMING_BATTLE_PHASE) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -41,19 +40,19 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - return re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) + return re:IsTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) end c:RegisterFlagEffect(id,RESET_CHAIN,0,1) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler() - if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0xd4,0x11,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then + if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,SET_PALEOZOIC,TYPE_MONSTER|TYPE_NORMAL,1200,0,2,RACE_AQUA,ATTRIBUTE_WATER) then c:AddMonsterAttribute(TYPE_NORMAL) c:AssumeProperty(ASSUME_RACE,RACE_AQUA) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) @@ -66,7 +65,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetRange(LOCATION_MZONE) e1:SetValue(s.efilter) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) --Banish it if it leaves the field local e2=Effect.CreateEffect(c) @@ -74,12 +73,12 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e2:SetReset(RESET_EVENT+RESETS_REDIRECT) + e2:SetReset(RESET_EVENT|RESETS_REDIRECT) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end function s.efilter(e,re) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end \ No newline at end of file diff --git a/official/c98416533.lua b/official/c98416533.lua index 95159b6c03..fdd37ba273 100644 --- a/official/c98416533.lua +++ b/official/c98416533.lua @@ -1,5 +1,5 @@ --メルフィー・ワラビィ ---Melffy Wallaby +--Melffy Wally --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -38,7 +38,7 @@ function s.initial_effect(c) c:RegisterEffect(e4) end s.listed_names={id} -s.listed_series={0x147} +s.listed_series={SET_MELFFY} function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end @@ -52,7 +52,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x147) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_MELFFY) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() diff --git a/official/c98427577.lua b/official/c98427577.lua index 0e56740174..3f401414a8 100644 --- a/official/c98427577.lua +++ b/official/c98427577.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return tp~=Duel.GetTurnPlayer() + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local tg=Duel.GetAttacker() @@ -31,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.ChangePosition(c,POS_FACEDOWN) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end -end +end \ No newline at end of file diff --git a/official/c98431356.lua b/official/c98431356.lua index 86585f6884..d999b0c0cc 100644 --- a/official/c98431356.lua +++ b/official/c98431356.lua @@ -1,6 +1,5 @@ --幻影翼 --Phantom Knights' Wing - local s,id=GetID() function s.initial_effect(c) --Targeted monster gains 500 ATK @@ -10,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(TIMING_DAMAGE_STEP) - e1:SetCondition(s.condition) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) @@ -23,17 +22,13 @@ function s.initial_effect(c) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) e2:SetHintTiming(0,TIMING_END_PHASE) c:RegisterEffect(e2) end -s.listed_series={0x10db} - -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end +s.listed_series={SET_THE_PHANTOM_KNIGHTS} function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end @@ -48,7 +43,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(500) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) @@ -57,7 +52,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCountLimit(1) e2:SetValue(s.valcon) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end @@ -65,7 +60,7 @@ function s.valcon(e,re,r,rp) return (r&REASON_BATTLE+REASON_EFFECT)~=0 end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end @@ -84,7 +79,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c98434877.lua b/official/c98434877.lua index 536daf5b04..ddfe92ce19 100644 --- a/official/c98434877.lua +++ b/official/c98434877.lua @@ -1,4 +1,5 @@ --水魔神-スーガ +--Suijin local s,id=GetID() function s.initial_effect(c) --atkdown @@ -16,7 +17,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==e:GetHandler() + return Duel.IsTurnPlayer(1-tp) and Duel.GetAttackTarget()==e:GetHandler() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetAttacker():IsCanBeEffectTarget(e) end @@ -28,8 +29,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) - e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL) + e1:SetReset(RESET_PHASE|PHASE_DAMAGE_CAL) e1:SetValue(0) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c98437424.lua b/official/c98437424.lua index c19f799e04..ec0d94023a 100644 --- a/official/c98437424.lua +++ b/official/c98437424.lua @@ -1,4 +1,5 @@ --ナチュル・コスモスビート +--Naturia Cosmobeet local s,id=GetID() function s.initial_effect(c) --special summon @@ -28,4 +29,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c98439949.lua b/official/c98439949.lua index 55004c9f25..5f40cf9768 100644 --- a/official/c98439949.lua +++ b/official/c98439949.lua @@ -1,5 +1,5 @@ --無限起動キャンサークレーン ---Infinite Ignition Cancer Crane +--Infinitrack Crab Crane --Scripted by AlphaKretin local s,id=GetID() function s.initial_effect(c) @@ -70,4 +70,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c98444741.lua b/official/c98444741.lua index 81f3990f25..39aa1f5cfb 100644 --- a/official/c98444741.lua +++ b/official/c98444741.lua @@ -1,4 +1,5 @@ --積み上げる幸福 +--Accumulated Fortune local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,4 +25,4 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98446407.lua b/official/c98446407.lua index 7465b0cb48..9af88952b1 100644 --- a/official/c98446407.lua +++ b/official/c98446407.lua @@ -1,4 +1,5 @@ --ネフティスの導き手 +--Hand of Nephthys local s,id=GetID() function s.initial_effect(c) --special summon @@ -36,14 +37,14 @@ function s.filter(c,e,tp) return c:IsCode(61441708) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_HAND) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98452268.lua b/official/c98452268.lua index 17e8a055c8..fd6a5c9282 100644 --- a/official/c98452268.lua +++ b/official/c98452268.lua @@ -1,5 +1,5 @@ --覇王黒竜オッドアイズ・リベリオン・ドラゴン-オーバーロード ---Odd-Eyes Rebellion Dragon - Overlord +--Odd-Eyes Rebellion Dragon Overlord --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -44,12 +44,12 @@ function s.initial_effect(c) end s.listed_names={} s.pendulum_level=7 -s.listed_series={0x13b,0x10db} +s.listed_series={SET_REBELLION,SET_THE_PHANTOM_KNIGHTS} function s.ovfilter(c) - return c:IsFaceup() and c:IsSetCard(0x13b) and c:IsType(TYPE_XYZ) + return c:IsFaceup() and c:IsSetCard(SET_REBELLION) and c:IsType(TYPE_XYZ) end function s.spfilter(c,e,tp,mc,pg) - return c:IsFacedown() and (c:IsSetCard(0x13b) or c:IsSetCard(0x10db)) and c:IsType(TYPE_XYZ) + return c:IsFacedown() and (c:IsSetCard(SET_REBELLION) or c:IsSetCard(SET_THE_PHANTOM_KNIGHTS)) and c:IsType(TYPE_XYZ) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and mc:IsCanBeXyzMaterial(c,tp) and not c:IsCode(id) @@ -92,7 +92,7 @@ function s.valcheck(e,c) e:GetLabelObject():SetLabel(c:GetMaterial():FilterCount(s.valfilter,nil)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -104,7 +104,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end diff --git a/official/c9845733.lua b/official/c9845733.lua index f1fed6b4f8..6469c59997 100644 --- a/official/c9845733.lua +++ b/official/c9845733.lua @@ -1,5 +1,6 @@ --覚醒の証 +--Emblem of the Awakening local s,id=GetID() function s.initial_effect(c) Ritual.AddProcGreaterCode(c,4,nil,10789972) -end +end \ No newline at end of file diff --git a/official/c98477480.lua b/official/c98477480.lua index 7014d463e1..092e8eb10b 100644 --- a/official/c98477480.lua +++ b/official/c98477480.lua @@ -63,4 +63,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c9848939.lua b/official/c9848939.lua index 3bb89bdd51..c3b7a77817 100644 --- a/official/c9848939.lua +++ b/official/c9848939.lua @@ -1,4 +1,5 @@ --樹海の射手 +--Woodland Archer local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -22,7 +23,7 @@ function s.initial_effect(c) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfTribute) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) @@ -32,10 +33,6 @@ function s.spcon(e,c) return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,2,nil,TYPE_NORMAL) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) -end function s.filter(c) return c:IsType(TYPE_GEMINI) and c:IsAbleToHand() end @@ -50,4 +47,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c98494543.lua b/official/c98494543.lua index f3fa720edc..c7cfaaa8d6 100644 --- a/official/c98494543.lua +++ b/official/c98494543.lua @@ -1,4 +1,5 @@ --魔法石の採掘 +--Magical Stone Excavation local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -13,13 +14,13 @@ function s.initial_effect(c) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsSpell() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98495314.lua b/official/c98495314.lua index 464c87e684..3bfac05784 100644 --- a/official/c98495314.lua +++ b/official/c98495314.lua @@ -1,4 +1,5 @@ --執念の剣 +--Sword of Deep-Seated local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -27,6 +28,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98502113.lua b/official/c98502113.lua index a23391a26f..86aa9a03b5 100644 --- a/official/c98502113.lua +++ b/official/c98502113.lua @@ -1,9 +1,10 @@ --超魔導剣士-ブラック・パラディン +--Dark Paladin local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,78193831) + Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,CARD_BUSTER_BLADER) --negate local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -33,21 +34,21 @@ function s.initial_effect(c) e3:SetValue(aux.fuslimit) c:RegisterEffect(e3) end -s.material_setcode={0x10a2,0xd7} -s.listed_names={CARD_DARK_MAGICIAN,78193831} +s.material_setcode={SET_DARK_MAGICIAN,SET_BUSTER_BLADER} +s.listed_names={CARD_DARK_MAGICIAN,CARD_BUSTER_BLADER} function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,0,0x14,0x14,nil)*500 + return Duel.GetMatchingGroupCount(s.filter,0,LOCATION_MZONE|LOCATION_GRAVE,LOCATION_MZONE|LOCATION_GRAVE,nil)*500 end function s.filter(c) return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) end function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + and re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -62,4 +63,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98502114.lua b/official/c98502114.lua deleted file mode 100644 index 76a434b41c..0000000000 --- a/official/c98502114.lua +++ /dev/null @@ -1,63 +0,0 @@ ---超魔導剣士-ブラック・パラディン -local s,id=GetID() -function s.initial_effect(c) - --fusion material - c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,78193831) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.discon) - e1:SetCost(s.discost) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.val) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,0,0x14,0x14,nil)*500 -end -function s.filter(c) - return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/official/c98502115.lua b/official/c98502115.lua deleted file mode 100644 index 76a434b41c..0000000000 --- a/official/c98502115.lua +++ /dev/null @@ -1,63 +0,0 @@ ---超魔導剣士-ブラック・パラディン -local s,id=GetID() -function s.initial_effect(c) - --fusion material - c:EnableReviveLimit() - Fusion.AddProcMix(c,true,true,CARD_DARK_MAGICIAN,78193831) - --negate - local e1=Effect.CreateEffect(c) - e1:SetDescription(aux.Stringid(id,0)) - e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) - e1:SetType(EFFECT_TYPE_QUICK_O) - e1:SetRange(LOCATION_MZONE) - e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) - e1:SetCode(EVENT_CHAINING) - e1:SetCondition(s.discon) - e1:SetCost(s.discost) - e1:SetTarget(s.distg) - e1:SetOperation(s.disop) - c:RegisterEffect(e1) - --atkup - local e2=Effect.CreateEffect(c) - e2:SetType(EFFECT_TYPE_SINGLE) - e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) - e2:SetCode(EFFECT_UPDATE_ATTACK) - e2:SetRange(LOCATION_MZONE) - e2:SetValue(s.val) - c:RegisterEffect(e2) - --spsummon condition - local e3=Effect.CreateEffect(c) - e3:SetType(EFFECT_TYPE_SINGLE) - e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) - e3:SetCode(EFFECT_SPSUMMON_CONDITION) - e3:SetValue(aux.fuslimit) - c:RegisterEffect(e3) -end -function s.val(e,c) - return Duel.GetMatchingGroupCount(s.filter,0,0x14,0x14,nil)*500 -end -function s.filter(c) - return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) -end -function s.discon(e,tp,eg,ep,ev,re,r,rp) - return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) - and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) -end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) -end -function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return true end - Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) - if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then - Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) - end -end -function s.disop(e,tp,eg,ep,ev,re,r,rp) - local c=e:GetHandler() - if not c:IsFaceup() or not c:IsRelateToEffect(e) then return end - if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then - Duel.Destroy(eg,REASON_EFFECT) - end -end diff --git a/official/c98506199.lua b/official/c98506199.lua index 85675c7904..2beabe3593 100644 --- a/official/c98506199.lua +++ b/official/c98506199.lua @@ -21,34 +21,34 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_TODECK) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCode(EVENT_DESTROYED) e2:SetCountLimit(1,{id,1}) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetCondition(s.tdcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) end -s.listed_series={0x135} +s.listed_series={SET_IGNISTER} function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x135),tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end + if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,1,nil) + and Duel.IsExistingMatchingCard(Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,nil) end Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) - local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,0x135),tp,LOCATION_MZONE,0,1,nil) + local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsSetCard,SET_IGNISTER),tp,LOCATION_MZONE,0,1,nil) if ct>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,ct,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectMatchingCard(tp,Card.IsSpellTrap,tp,0,LOCATION_ONFIELD,1,ct,nil) if #g>0 then Duel.Destroy(g,REASON_EFFECT) end end end function s.cfilter(c,tp) - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetReasonPlayer()==1-tp + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetReasonPlayer()==1-tp end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,e:GetHandler(),tp) @@ -62,7 +62,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) + if tc:IsRelateToEffect(e) then + Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c9852718.lua b/official/c9852718.lua index 0a91708145..e61cb28d86 100644 --- a/official/c9852718.lua +++ b/official/c9852718.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) -end -function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + return Duel.IsTurnPlayer(1-tp) and Duel.IsBattlePhase() end function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) end @@ -51,4 +47,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) dam=dam+atk end Duel.Damage(1-tp,dam,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98596596.lua b/official/c98596596.lua index edace277da..e0b6125a34 100644 --- a/official/c98596596.lua +++ b/official/c98596596.lua @@ -52,7 +52,7 @@ function s.tkop1(e,tp,eg,ep,ev,re,r,rp) end end function s.tkcfilter(c,tp) - return c:IsMonster() and c:IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) and c:IsPreviousControler(tp) + return c:IsMonster() and c:IsPreviousLocation(LOCATION_HAND|LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT) end function s.tkcon2(e,tp,eg,ep,ev,re,r,rp) @@ -68,4 +68,4 @@ function s.tkop2(e,tp,eg,ep,ev,re,r,rp) local token=Duel.CreateToken(tp,23116809) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c9861795.lua b/official/c9861795.lua index 77c65c96d9..c0a43a47c7 100644 --- a/official/c9861795.lua +++ b/official/c9861795.lua @@ -1,4 +1,5 @@ --モグモール +--Mogmole local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,4 +28,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c98630720.lua b/official/c98630720.lua index 02a5ce9f62..40dd619f13 100644 --- a/official/c98630720.lua +++ b/official/c98630720.lua @@ -38,20 +38,20 @@ function s.initial_effect(c) e5:SetRange(LOCATION_MZONE) e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetCountLimit(1,id) - e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) + e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER|TIMING_END_PHASE) e5:SetTarget(s.distg) e5:SetOperation(s.disop) c:RegisterEffect(e5) end -s.listed_series={0x102} +s.listed_series={SET_ROKKET} function s.etg(e,re,rp) - return re:IsActiveType(TYPE_MONSTER) + return re:IsMonsterEffect() end function s.disfilter(c) return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x102) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ROKKET) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -82,17 +82,17 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e2) if tc1:IsImmuneToEffect(e1) or tc1:IsImmuneToEffect(e2) or not tc2 or not tc2:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c98637386.lua b/official/c98637386.lua index bd42692845..18b8934d2f 100644 --- a/official/c98637386.lua +++ b/official/c98637386.lua @@ -32,9 +32,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e1:SetValue(HALF_DAMAGE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1,true) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c98642179.lua b/official/c98642179.lua index 0438ea4fd4..5bc5c0437a 100644 --- a/official/c98642179.lua +++ b/official/c98642179.lua @@ -1,7 +1,6 @@ --剛炎の剣士 --Ferocious Flame Swordsman --Scripted by Eerie Code - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -34,7 +33,7 @@ function s.lcheck(g,lc,sumtype,tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_BATTLE+REASON_EFFECT) and rp~=tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK) + return c:IsReason(REASON_BATTLE|REASON_EFFECT) and rp~=tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsLinkSummoned() end function s.spfilter(c,e,tp) return c:IsRace(RACE_WARRIOR) and not c:IsLinkMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -57,7 +56,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c98643358.lua b/official/c98643358.lua index 41be3a60fb..e8c8fc2d00 100644 --- a/official/c98643358.lua +++ b/official/c98643358.lua @@ -1,4 +1,5 @@ --ダイヤモンド・ダスト +--Diamond Dust local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetOperatedGroup():FilterCount(s.ctfilter,nil) Duel.Damage(1-tp,ct*500,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98645731.lua b/official/c98645731.lua index 6189c8bbe2..7503755897 100644 --- a/official/c98645731.lua +++ b/official/c98645731.lua @@ -153,4 +153,4 @@ function s.clear(e,tp,eg,ep,ev,re,r,rp) s[2]={} s[3]={} s[4]=0 -end +end \ No newline at end of file diff --git a/official/c98649372.lua b/official/c98649372.lua index 8dd9b7b696..77d9c66ff5 100644 --- a/official/c98649372.lua +++ b/official/c98649372.lua @@ -1,4 +1,5 @@ --スカル・クラーケン +--Skull Kraken local s,id=GetID() function s.initial_effect(c) --destroy @@ -42,4 +43,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) then Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) end -end +end \ No newline at end of file diff --git a/official/c98666339.lua b/official/c98666339.lua index d5a9e132cd..16f491fda7 100644 --- a/official/c98666339.lua +++ b/official/c98666339.lua @@ -1,4 +1,5 @@ --リバースディメンション +--Dimensional Inversion local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.filter(c,e,tp) - return c:GetControler()==tp and c:IsFaceup() and c:GetReasonPlayer()==1-tp + return c:IsControler(tp) and c:IsFaceup() and c:GetReasonPlayer()==1-tp and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -29,4 +30,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98672567.lua b/official/c98672567.lua index 46dcf11ebf..0e8d9610e7 100644 --- a/official/c98672567.lua +++ b/official/c98672567.lua @@ -24,12 +24,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -52,12 +52,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==3 then Duel.BreakEffect() Duel.Draw(tp,2,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98700941.lua b/official/c98700941.lua index 82280dc7de..ff56c4ce29 100644 --- a/official/c98700941.lua +++ b/official/c98700941.lua @@ -1,4 +1,5 @@ --トリックスター・リリーベル +--Trickstar Lilybell local s,id=GetID() function s.initial_effect(c) --special summon @@ -30,7 +31,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsReason(REASON_DRAW) end @@ -49,7 +50,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.thfilter(c) - return c:IsSetCard(0xfb) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TRICKSTAR) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end @@ -63,4 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98707192.lua b/official/c98707192.lua index 579bc62e2f..04a0943b69 100644 --- a/official/c98707192.lua +++ b/official/c98707192.lua @@ -1,4 +1,5 @@ --ゴーストリック・マリー +--Ghostrick Mary local s,id=GetID() function s.initial_effect(c) --summon limit @@ -26,19 +27,19 @@ function s.initial_effect(c) e3:SetCode(EVENT_DAMAGE) e3:SetCountLimit(1,id) e3:SetCondition(s.condition) - e3:SetCost(s.cost) + e3:SetCost(Cost.SelfDiscard) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.sumcon(e) - return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x8d),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) + return not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_GHOSTRICK),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(id)==0 end - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END,0,1) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) end function s.posop(e,tp,eg,ep,ev,re,r,rp) @@ -50,12 +51,8 @@ end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==tp and (r&REASON_BATTLE+REASON_EFFECT)~=0 end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.filter(c,e,tp) - return c:IsSetCard(0x8d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_GHOSTRICK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -70,4 +67,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c98715423.lua b/official/c98715423.lua index 27072f9e68..0db918b935 100644 --- a/official/c98715423.lua +++ b/official/c98715423.lua @@ -64,7 +64,7 @@ function s.limcon(e) end function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD,nil) end function s.thfilter(c) return c:IsAbleToHand() and c:IsMonster() diff --git a/official/c98719226.lua b/official/c98719226.lua index 587506e11e..ac953f07da 100644 --- a/official/c98719226.lua +++ b/official/c98719226.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) @@ -37,12 +37,12 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) end end function s.adcon(e) - return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget() + return Duel.IsPhase(PHASE_DAMAGE_CAL) and Duel.GetAttackTarget() end function s.adtg(e,c) local bc=c:GetBattleTarget() - return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(0xc) + return bc and c:GetCounter(COUNTER_A)~=0 and bc:IsSetCard(SET_ALIEN) end function s.adval(e,c) return c:GetCounter(COUNTER_A)*-300 -end +end \ No newline at end of file diff --git a/official/c987311.lua b/official/c987311.lua index c0fd98d239..6bcc922912 100644 --- a/official/c987311.lua +++ b/official/c987311.lua @@ -3,7 +3,7 @@ local s,id=GetID() function s.initial_effect(c) --synchro summon - Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0xaf),1,1,Synchro.NonTuner(nil),1,99) + Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,SET_DD),1,1,Synchro.NonTuner(nil),1,99) c:EnableReviveLimit() --tohand local e1=Effect.CreateEffect(c) @@ -21,15 +21,15 @@ function s.initial_effect(c) e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) end -s.listed_series={0xaf} +s.listed_series={SET_DD} function s.cfilter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsControler(tp) + return c:IsFaceup() and c:IsSetCard(SET_DD) and c:IsControler(tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_DD) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end @@ -44,4 +44,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98745000.lua b/official/c98745000.lua index 404bcfccb6..39178a8675 100644 --- a/official/c98745000.lua +++ b/official/c98745000.lua @@ -1,4 +1,5 @@ --ジャッカルの聖戦士 +--Mystical Knight of Jackal local s,id=GetID() function s.initial_effect(c) --to deck @@ -27,6 +28,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98753320.lua b/official/c98753320.lua index 5a9e099fa1..ded430ca2e 100644 --- a/official/c98753320.lua +++ b/official/c98753320.lua @@ -28,12 +28,12 @@ function s.initial_effect(c) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x103} +s.listed_series={SET_ALTERGEIST} function s.cfilter(c,tp) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and rp~=tp and c:GetPreviousControler()==tp @@ -42,7 +42,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,e:GetHandler(),tp) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x103) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ALTERGEIST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -58,7 +58,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsMonster() and c:IsSetCard(0x103) and c:IsAbleToHand() + return c:IsMonster() and c:IsSetCard(SET_ALTERGEIST) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -72,5 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c98777036.lua b/official/c98777036.lua index 0c51a61fef..c115f4acc8 100644 --- a/official/c98777036.lua +++ b/official/c98777036.lua @@ -106,7 +106,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(tc:GetLevel()) - e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c98780137.lua b/official/c98780137.lua index dff0db4aa3..8d5efe3355 100644 --- a/official/c98780137.lua +++ b/official/c98780137.lua @@ -1,4 +1,5 @@ --マリスボラス・ナイフ +--Malicevorous Knife local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,9 +13,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x8b} +s.listed_series={SET_MALICEVOROUS} function s.filter(c,e,tp) - return c:GetCode()~=id and c:IsSetCard(0x8b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:GetCode()~=id and c:IsSetCard(SET_MALICEVOROUS) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end @@ -30,4 +31,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98787535.lua b/official/c98787535.lua index 9aa4a113ac..db8c20dd8a 100644 --- a/official/c98787535.lua +++ b/official/c98787535.lua @@ -70,6 +70,6 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e) if #sg>0 then - Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN) + Duel.SendtoGrave(sg,REASON_EFFECT|REASON_RETURN) end -end +end \ No newline at end of file diff --git a/official/c98792570.lua b/official/c98792570.lua index 45bedd64a9..4dcf952003 100644 --- a/official/c98792570.lua +++ b/official/c98792570.lua @@ -1,4 +1,5 @@ --受け継がれる力 +--Gift of the Martyr local s,id=GetID() function s.initial_effect(c) --Activate @@ -41,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c98804359.lua b/official/c98804359.lua index 3dfbd4852a..51d7f07cbb 100644 --- a/official/c98804359.lua +++ b/official/c98804359.lua @@ -49,7 +49,7 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and eg:IsExists(s.repfilter,1,nil,tp) and e:GetHandler():IsAbleToRemove() end if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) return true else return false @@ -59,5 +59,5 @@ function s.repval(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end function s.repop(e,tp,eg,ep,ev,re,r,rp) - Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE) -end + Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT|REASON_REPLACE) +end \ No newline at end of file diff --git a/official/c98828338.lua b/official/c98828338.lua index 2166b04ffb..e8faf71519 100644 --- a/official/c98828338.lua +++ b/official/c98828338.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(Fusion.SummonEffTG(table.unpack(params))) e2:SetOperation(Fusion.SummonEffOP(table.unpack(params))) c:RegisterEffect(e2) diff --git a/official/c98847704.lua b/official/c98847704.lua index 6197e10679..11be8fc936 100644 --- a/official/c98847704.lua +++ b/official/c98847704.lua @@ -1,4 +1,5 @@ --拘束解放波 +--Release Restraint Wave local s,id=GetID() function s.initial_effect(c) --Activate @@ -35,4 +36,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) dg:AddCard(tc) Duel.Destroy(dg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98850929.lua b/official/c98850929.lua index 29a0ffb5b6..fb0de68b80 100644 --- a/official/c98850929.lua +++ b/official/c98850929.lua @@ -1,4 +1,5 @@ --聖蛇の息吹 +--Sacred Serpent's Wake local s,id=GetID() function s.initial_effect(c) local e1=Effect.CreateEffect(c) @@ -31,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil) local ct=g:GetClassCount(s.typecast) - local g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) + local g1=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e) local g2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_GRAVE,0,nil,e) local g3=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_GRAVE,0,nil,e) if chk==0 then return (ct>1 and #g1>0) or (ct>2 and #g2>0) or (ct>3 and #g3>0) end @@ -84,4 +85,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c98864751.lua b/official/c98864751.lua index 2998eaee91..5e155ba0ab 100644 --- a/official/c98864751.lua +++ b/official/c98864751.lua @@ -1,5 +1,5 @@ --エアークラック・ストーム ---Aircrack Storm +--Air Cracking Storm local s,id=GetID() function s.initial_effect(c) --Activate @@ -33,7 +33,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() if tc:GetFlagEffect(id)==0 then s[ep]=s[ep]+1 - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) end end function s.drcon(e,tp,eg,ep,ev,re,r,rp) @@ -50,7 +50,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(s.ftarget) e1:SetLabel(c:GetEquipTarget():GetFieldID()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.ftarget(e,c) @@ -61,6 +61,6 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_BATTLE) e:GetHandler():GetEquipTarget():RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c98865920.lua b/official/c98865920.lua index e23d51af37..d09dd484cd 100644 --- a/official/c98865920.lua +++ b/official/c98865920.lua @@ -1,4 +1,5 @@ --アチャチャアーチャー +--Achacha Archer local s,id=GetID() function s.initial_effect(c) --damage @@ -23,4 +24,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98867329.lua b/official/c98867329.lua index ab5d1aa527..6938cc5efd 100644 --- a/official/c98867329.lua +++ b/official/c98867329.lua @@ -1,4 +1,5 @@ --災いの装備品 +--Cursed Armaments local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -41,4 +42,4 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) end -end +end \ No newline at end of file diff --git a/official/c98875863.lua b/official/c98875863.lua index cb6f13e8f4..fd8eda70f8 100644 --- a/official/c98875863.lua +++ b/official/c98875863.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(s.tkcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.tktg) e2:SetOperation(s.tkop) c:RegisterEffect(e2) @@ -33,7 +33,7 @@ end function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,c) end - Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST+REASON_DISCARD,c) + Duel.DiscardHand(tp,s.cfilter,1,1,REASON_COST|REASON_DISCARD,c) end function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -48,23 +48,18 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetValue(-2) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD|RESET_PHASE|PHASE_END) c:RegisterEffect(e1) end -function s.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsReleasable() end - Duel.Release(c,REASON_COST) -end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetMZoneCount(tp,e:GetHandler())>=3 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x187,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_G_GOLEM,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,0) end function s.tkop(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) and Duel.GetLocationCount(tp,LOCATION_MZONE)>2 - and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x187,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then + and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,SET_G_GOLEM,TYPES_TOKEN,0,0,1,RACE_CYBERSE,ATTRIBUTE_EARTH,POS_FACEUP_DEFENSE) then for i=1,3 do local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) @@ -79,7 +74,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.splimit(e,c) diff --git a/official/c98881700.lua b/official/c98881700.lua index 007283378d..d52a9a5643 100644 --- a/official/c98881700.lua +++ b/official/c98881700.lua @@ -1,6 +1,6 @@ --- クリスタル・シャーク --- Crystal Shark --- Scripted by Nellag +--クリスタル・シャーク +--Crystal Shark +--Scripted by Nellag local s,id=GetID() function s.initial_effect(c) --Special Summon itself @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetCountLimit(1,id) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) @@ -22,8 +22,8 @@ function s.initial_effect(c) e2:SetValue(s.xyzlv) c:RegisterEffect(e2) end --- Lists "Number" cards -s.listed_series={0x48} +--Lists "Number" cards +s.listed_series={SET_NUMBER} function s.cfilter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) end @@ -39,7 +39,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - -- Cannot Special Summon from the Extra Deck, except Xyz Monsters + --Cannot Special Summon from the Extra Deck, except Xyz Monsters local e0=Effect.CreateEffect(c) e0:SetDescription(aux.Stringid(id,1)) e0:SetType(EFFECT_TYPE_FIELD) @@ -47,27 +47,27 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e0:SetTargetRange(1,0) e0:SetTarget(s.splimit) - e0:SetReset(RESET_PHASE+PHASE_END) + e0:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e0,tp) --Clock Lizard check aux.addTempLizardCheck(c,tp,s.lizfilter) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then - -- Banish this card if it leaves the field. + --Banish this card if it leaves the field. local e1=Effect.CreateEffect(c) e1:SetDescription(3300) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetValue(LOCATION_REMOVED) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) c:RegisterEffect(e1,true) local tc=Duel.GetFirstTarget() if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end - -- Halve the targeted card's ATK. + --Halve the targeted card's ATK. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_SET_ATTACK_FINAL) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) e2:SetValue(tc:GetAttack()/2) tc:RegisterEffect(e2) end @@ -79,9 +79,9 @@ function s.lizfilter(e,c) return not c:IsOriginalType(TYPE_XYZ) end function s.xyzlv(e,c,rc) - if rc:IsSetCard(0x48) then + if rc:IsSetCard(SET_NUMBER) then return 4,3,e:GetHandler():GetLevel() else return e:GetHandler():GetLevel() end -end +end \ No newline at end of file diff --git a/official/c98881931.lua b/official/c98881931.lua index 61a22f554d..02ae026e94 100644 --- a/official/c98881931.lua +++ b/official/c98881931.lua @@ -21,17 +21,16 @@ function s.initial_effect(c) e2:SetValue(1000) c:RegisterEffect(e2) end -s.listed_series={0x55} +s.listed_series={SET_PHOTON} function s.sprcon(e,c) if c==nil then return true end local tp=c:GetControler() return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x55),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PHOTON),tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end function s.valcon(e,re,r,rp) - return (r&REASON_EFFECT)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) + return (r&REASON_EFFECT)~=0 and re:IsSpellTrapEffect() end function s.atkcon(e) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x55),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) -end - + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_PHOTON),e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) +end \ No newline at end of file diff --git a/official/c9888196.lua b/official/c9888196.lua index 7e4274f8f8..6c0bfa0353 100644 --- a/official/c9888196.lua +++ b/official/c9888196.lua @@ -1,4 +1,5 @@ --A・O・J ディサイシブ・アームズ +--Ally of Justice Decisive Armor local s,id=GetID() function s.initial_effect(c) --synchro summon @@ -72,7 +73,7 @@ function s.descost2(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoGrave(g,REASON_COST) end function s.filter2(c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) + return c:IsSpellTrap() end function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter2,tp,0,LOCATION_ONFIELD,1,nil) end @@ -111,4 +112,4 @@ function s.hdop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,atk,REASON_EFFECT) end Duel.ShuffleHand(1-tp) -end +end \ No newline at end of file diff --git a/official/c98884569.lua b/official/c98884569.lua index 2ec03b4da1..389fa035f8 100644 --- a/official/c98884569.lua +++ b/official/c98884569.lua @@ -1,4 +1,5 @@ --ブルーローズ・ドラゴン +--Blue Rose Dragon local s,id=GetID() function s.initial_effect(c) --special summon @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98898163.lua b/official/c98898163.lua index bdb16cb392..501db12921 100644 --- a/official/c98898163.lua +++ b/official/c98898163.lua @@ -1,5 +1,5 @@ --グランドタスク・ドラゴン ---Grand Ground Tusk Dragon +--Grandtusk Dragon --scripted by Naim local s,id=GetID() function s.initial_effect(c) @@ -39,7 +39,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(ct*600) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c98904974.lua b/official/c98904974.lua index 620498151b..9955aa9f4f 100644 --- a/official/c98904974.lua +++ b/official/c98904974.lua @@ -1,5 +1,5 @@ --魔鍵錠-解- ---Magikey Lock - Unlock +--Magikey Unlocking --scripted by XyleN5967 local s,id=GetID() function s.initial_effect(c) @@ -14,13 +14,13 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x167} +s.listed_series={SET_MAGIKEY} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0x167) and (c:IsType(TYPE_RITUAL) or c:IsSummonLocation(LOCATION_EXTRA)) + return c:IsFaceup() and c:IsSetCard(SET_MAGIKEY) and (c:IsType(TYPE_RITUAL) or c:IsSummonLocation(LOCATION_EXTRA)) end function s.condition(e,tp,eg,ep,ev,re,r,rp) if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end - return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) + return ep~=tp and re:IsSpellTrapEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetValue(attr) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end -end +end \ No newline at end of file diff --git a/official/c98905.lua b/official/c98905.lua index 721342adf3..85b69f8c2c 100644 --- a/official/c98905.lua +++ b/official/c98905.lua @@ -20,9 +20,9 @@ function s.initial_effect(c) Duel.RegisterEffect(ge1,0) end) end -s.listed_series={0xe5} +s.listed_series={SET_CIPHER} function s.cfilter(c) - return c:IsFaceup() and c:IsSetCard(0xe5) and c:IsType(TYPE_XYZ) and c:IsControler(c:GetOwner()) and c:GetOverlayCount()>0 + return c:IsFaceup() and c:IsSetCard(SET_CIPHER) and c:IsType(TYPE_XYZ) and c:IsControler(c:GetOwner()) and c:GetOverlayCount()>0 end function s.checkop(e,tp,eg,ep,ev,re,r,rp) if not eg then return end @@ -49,7 +49,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=eg:FilterSelect(tp,s.spfilter,1,1,nil,e,tp) Duel.SetTargetCard(g) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_GRAVE+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_GRAVE|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end diff --git a/official/c98918572.lua b/official/c98918572.lua index dc744d3b66..263d3d2c2d 100644 --- a/official/c98918572.lua +++ b/official/c98918572.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --Detach cost replacement + --If a "Zoodiac" Xyz Monster you control would detach its Xyz Material(s) you can detach from another Xyz Monster(s) you control instead local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) @@ -17,18 +17,19 @@ function s.initial_effect(c) e2:SetCondition(s.rcon) e2:SetOperation(s.rop) c:RegisterEffect(e2) - --Attach + --Attach 1 "Zoodiac" Xyz monster to another local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_GRAVE) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.xyztg) e3:SetOperation(s.xyzop) c:RegisterEffect(e3) end -s.listed_series={0xf1} +s.listed_series={SET_ZOODIAC} function s.rfilter(c,tp,oc) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,oc,REASON_COST) @@ -36,18 +37,19 @@ end function s.rcon(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() return (r&REASON_COST)~=0 and re:IsActivated() - and re:IsActiveType(TYPE_XYZ) and ep==e:GetOwnerPlayer() and rc:IsSetCard(0xf1) + and re:IsActiveType(TYPE_XYZ) and ep==e:GetOwnerPlayer() and rc:IsSetCard(SET_ZOODIAC) and Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE,0,1,rc,tp,ev) end function s.rop(e,tp,eg,ep,ev,re,r,rp) local ct=(ev&0xffff) local rc=re:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM) local tg=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE,0,1,1,rc,tp,ct) tg:GetFirst():RemoveOverlayCard(tp,ct,ct,REASON_COST) return ct end function s.xyzfilter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf1) + return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(SET_ZOODIAC) end function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -67,4 +69,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) if not tc:IsImmuneToEffect(e) then Duel.Overlay(tc,xc,true) end -end +end \ No newline at end of file diff --git a/official/c98927491.lua b/official/c98927491.lua index 66dafeca64..5cd787b03d 100644 --- a/official/c98927491.lua +++ b/official/c98927491.lua @@ -1,4 +1,5 @@ --レスキューキューロイド +--Ambulance Rescueroid local s,id=GetID() function s.initial_effect(c) --fusion material @@ -23,7 +24,7 @@ function s.initial_effect(c) e2:SetOperation(s.activate) c:RegisterEffect(e2) end -s.material_setcode=0x16 +s.material_setcode=SET_ROID function s.filter(c,e,tp) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousControler(tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) @@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c98931003.lua b/official/c98931003.lua index 8e4bdd4d11..de5fb226d5 100644 --- a/official/c98931003.lua +++ b/official/c98931003.lua @@ -1,4 +1,5 @@ --ナナナ +--Nanana local s,id=GetID() function s.initial_effect(c) --Activate @@ -26,10 +27,10 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(700) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c98935722.lua b/official/c98935722.lua index c4f976d2a9..b43d93159d 100644 --- a/official/c98935722.lua +++ b/official/c98935722.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e4:SetOperation(s.disop) c:RegisterEffect(e4) end -s.listed_series={0x10c} +s.listed_series={SET_MEKK_KNIGHT} function s.spfilter(c,e,tp) return c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end @@ -75,14 +75,14 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c,seq,p) - return c:IsFaceup() and c:IsSetCard(0x10c) and c:IsColumn(seq,p,LOCATION_MZONE) + return c:IsFaceup() and c:IsSetCard(SET_MEKK_KNIGHT) and c:IsColumn(seq,p,LOCATION_MZONE) end function s.discon(e,tp,eg,ep,ev,re,r,rp) - if rp==tp or not re:IsActiveType(TYPE_MONSTER) then return false end + if rp==tp or not re:IsMonsterEffect() then return false end local rc=re:GetHandler() local p,loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) return loc==LOCATION_MZONE and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,seq,p) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c98954106.lua b/official/c98954106.lua index 348b88f82a..a68f7dafa6 100644 --- a/official/c98954106.lua +++ b/official/c98954106.lua @@ -1,4 +1,5 @@ --貪欲な瓶 +--Jar of Avarice local s,id=GetID() function s.initial_effect(c) --Activate @@ -28,12 +29,12 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end - Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tg,nil,SEQ_DECKTOP,REASON_EFFECT) local g=Duel.GetOperatedGroup() if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end - local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) + local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK|LOCATION_EXTRA) if ct==5 then Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98954375.lua b/official/c98954375.lua index 3a226f026c..0499e8d4ec 100644 --- a/official/c98954375.lua +++ b/official/c98954375.lua @@ -1,4 +1,5 @@ --インフェルニティ・デストロイヤー +--Infernity Destroyer local s,id=GetID() function s.initial_effect(c) --damage @@ -29,4 +30,4 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then return end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c98956134.lua b/official/c98956134.lua index 7aec3635f7..23f05f5f6e 100644 --- a/official/c98956134.lua +++ b/official/c98956134.lua @@ -1,4 +1,5 @@ --デストラクション・ジャマー +--Destruction Jammer local s,id=GetID() function s.initial_effect(c) --Activate @@ -20,7 +21,7 @@ end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.IsPlayerAffectedByEffect(tp,EFFECT_DISCARD_COST_CHANGE) then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end @@ -33,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c98978921.lua b/official/c98978921.lua index 856a0fc0e6..8c60f78976 100644 --- a/official/c98978921.lua +++ b/official/c98978921.lua @@ -1,4 +1,5 @@ --リンク・スパイダー +--Link Spider local s,id=GetID() function s.initial_effect(c) --link summon @@ -33,4 +34,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone) end -end +end \ No newline at end of file diff --git a/official/c9897998.lua b/official/c9897998.lua index c8bf745cc1..53188f189c 100644 --- a/official/c9897998.lua +++ b/official/c9897998.lua @@ -1,4 +1,5 @@ --ガスタ・コドル +--Gusto Codor local s,id=GetID() function s.initial_effect(c) --special summon @@ -35,4 +36,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c98999181.lua b/official/c98999181.lua index 90f960cf3a..cf01e00b4d 100644 --- a/official/c98999181.lua +++ b/official/c98999181.lua @@ -1,5 +1,5 @@ --ネフティスの祈り手 ---Prayer of Nephthys +--Disciple of Nephthys local s,id=GetID() function s.initial_effect(c) --special summon @@ -25,7 +25,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetCondition(s.thcon2) e3:SetTarget(s.thtg2) e3:SetOperation(s.thop2) @@ -33,9 +33,9 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x11f} +s.listed_series={SET_NEPHTHYS} function s.filter(c,e,tp) - return c:IsSetCard(0x11f) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() + return c:IsSetCard(SET_NEPHTHYS) and c:IsMonster() and not c:IsCode(id) and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) @@ -58,17 +58,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) end function s.spr(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if (r&0x41)~=0x41 then return end - if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then + if (r&(REASON_DESTROY|REASON_EFFECT)~=(REASON_DESTROY|REASON_EFFECT)) then return end + if Duel.IsTurnPlayer(tp) and Duel.IsPhase(PHASE_STANDBY) then e:SetLabel(Duel.GetTurnCount()) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,2) else e:SetLabel(0) - c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_STANDBY|RESET_SELF_TURN,0,1) end end function s.thfilter(c,e,tp) - return c:IsSetCard(0x11f) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_NEPHTHYS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thcon2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -87,5 +87,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end - +end \ No newline at end of file diff --git a/official/c99000107.lua b/official/c99000107.lua index f286e31d27..14d2d97901 100644 --- a/official/c99000107.lua +++ b/official/c99000107.lua @@ -27,7 +27,7 @@ function s.initial_effect(c) end function s.aclimit(e,re,tp) local tc=re:GetHandler() - return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsAttackPos() and re:IsActiveType(TYPE_MONSTER) + return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsAttackPos() and re:IsMonsterEffect() end function s.tgcon(e) return e:GetHandler():IsDefensePos() diff --git a/official/c99000151.lua b/official/c99000151.lua index 1b6dc49c2c..42f3aeb10e 100644 --- a/official/c99000151.lua +++ b/official/c99000151.lua @@ -1,4 +1,5 @@ --死の花-ネクロ・フルール +--Necro Fleur local s,id=GetID() function s.initial_effect(c) --special summon @@ -15,7 +16,7 @@ function s.initial_effect(c) end s.listed_names={36405256} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return (e:GetHandler():GetReason()&0x41)==0x41 + return (e:GetHandler():GetReason()&(REASON_DESTROY|REASON_EFFECT))==(REASON_DESTROY|REASON_EFFECT) end function s.filter(c,e,tp) return c:IsCode(36405256) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99002135.lua b/official/c99002135.lua index 0b61a5b61b..c12d64f759 100644 --- a/official/c99002135.lua +++ b/official/c99002135.lua @@ -1,4 +1,5 @@ --緊急合成 +--Urgent Synthesis local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,7 +12,7 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x1d} +s.listed_series={SET_KOAKI_MEIRU} s.listed_names={36623431} function s.cfilter(c) return c:IsCode(36623431) and c:IsAbleToDeckAsCost() @@ -23,18 +24,18 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) end function s.spfilter(c,e,tp) - return c:IsLevelBelow(4) and c:IsSetCard(0x1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(4) and c:IsSetCard(SET_KOAKI_MEIRU) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_HAND,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_HAND) end function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_HAND,0,1,1,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99004583.lua b/official/c99004583.lua index 80876812d2..63fb1f36a5 100644 --- a/official/c99004583.lua +++ b/official/c99004583.lua @@ -1,6 +1,5 @@ --アクションマジック-フルターン --Action Magic - Full Turn - local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,7 +22,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) + return Duel.IsAbleToEnterBP() or Duel.IsBattlePhase() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetFlagEffect(tp,id)==0 or Duel.GetFlagEffect(1-tp,id)==0 end @@ -36,9 +35,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(1,1) e1:SetValue(DOUBLE_DAMAGE) e1:SetCondition(s.dcon) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) - Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) + Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,0,1) end function s.dcon(e) return Duel.GetAttackTarget() @@ -48,7 +47,7 @@ function s.costfilter(c) end function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST|REASON_DISCARD) end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsSSetable() end @@ -59,4 +58,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and c:IsSSetable() then Duel.SSet(tp,c) end -end +end \ No newline at end of file diff --git a/official/c99004752.lua b/official/c99004752.lua index 49002d3680..d04c25c8ab 100644 --- a/official/c99004752.lua +++ b/official/c99004752.lua @@ -1,4 +1,5 @@ --ミニマム・ガッツ +--Mini-Guts local s,id=GetID() function s.initial_effect(c) --Activate @@ -34,7 +35,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetDescription(aux.Stringid(id,0)) @@ -44,10 +45,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e2:SetCondition(s.damcon) e2:SetTarget(s.damtg) e2:SetOperation(s.damop) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetLabelObject(tc) Duel.RegisterEffect(e2,tp) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD_EXC_GRAVE+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_EXC_GRAVE|RESET_PHASE|PHASE_END,0,1) end end function s.damcon(e,tp,eg,ep,ev,re,r,rp) @@ -66,4 +67,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99011763.lua b/official/c99011763.lua index 31f79a1d89..8fe3515efe 100644 --- a/official/c99011763.lua +++ b/official/c99011763.lua @@ -27,7 +27,7 @@ function s.matcheck(e,c) e1:SetCost(s.addcost) e1:SetTarget(s.addtg) e1:SetOperation(s.addop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD-RESET_TOFIELD) c:RegisterEffect(e1) end end @@ -56,9 +56,9 @@ function s.addop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_DESTROY_REPLACE) e1:SetTarget(s.reptg) e1:SetOperation(s.repop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,0) end end function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -67,4 +67,4 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.repop(e,tp,eg,ep,ev,re,r,rp,chk) e:GetHandler():RemoveCounter(tp,0x1049,1,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99013397.lua b/official/c99013397.lua index 0148a808d5..6f9340bf13 100644 --- a/official/c99013397.lua +++ b/official/c99013397.lua @@ -2,7 +2,7 @@ --Gladiator Beast's Battle Halberd local s,id=GetID() function s.initial_effect(c) - aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,0x19)) + aux.AddEquipProcedure(c,nil,aux.FilterBoolFunction(Card.IsSetCard,SET_GLADIATOR)) --Destroy 1 Spell/Trap local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -26,7 +26,7 @@ function s.initial_effect(c) e2:SetOperation(s.retop) c:RegisterEffect(e2) end -s.listed_series={0x19} +s.listed_series={SET_GLADIATOR} function s.descon(e,tp,eg,ep,ev,re,r,rp) local eqc=e:GetHandler():GetEquipTarget() return eqc==Duel.GetAttacker() @@ -35,7 +35,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsSpellTrap() end if chk==0 then return true end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) - local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP) + local g=Duel.SelectTarget(tp,Card.IsSpellTrap,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.desop(e,tp,eg,ep,ev,re,r,rp) diff --git a/official/c99049589.lua b/official/c99049589.lua index b16311a6fb..57b502673a 100644 --- a/official/c99049589.lua +++ b/official/c99049589.lua @@ -21,15 +21,15 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={id} -s.listed_series={0xad,0xa9,0xc3} +s.listed_series={SET_FRIGHTFUR,SET_FLUFFAL,SET_EDGE_IMP} function s.tedfilter(c) - return c:IsSetCard(0xad) and c:IsMonster() and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() + return c:IsSetCard(SET_FRIGHTFUR) and c:IsMonster() and c:IsType(TYPE_FUSION) and c:IsAbleToExtra() end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tedfilter(chkc) end @@ -40,11 +40,11 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end function s.spfilter(c,e,tp) - return c:IsMonster() and (c:IsSetCard(0xa9) or c:IsSetCard(0xc3)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsMonster() and (c:IsSetCard(SET_FLUFFAL) or c:IsSetCard(SET_EDGE_IMP)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.tedop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then + if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp) if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.BreakEffect() @@ -68,4 +68,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99050989.lua b/official/c99050989.lua index bb48a164fb..78fe5e2c40 100644 --- a/official/c99050989.lua +++ b/official/c99050989.lua @@ -1,4 +1,5 @@ --ドリラゴ +--Drillago local s,id=GetID() function s.initial_effect(c) --direct attack @@ -15,4 +16,4 @@ function s.dircon(e) local tp=e:GetHandlerPlayer() return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0 and not Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) -end +end \ No newline at end of file diff --git a/official/c99054885.lua b/official/c99054885.lua index cf14f78c3b..af3344e16c 100644 --- a/official/c99054885.lua +++ b/official/c99054885.lua @@ -1,9 +1,9 @@ --- 破壊の代行者 ヴィーナス --- The Agent of Destruction – Venus --- Scripted by Hatter +--破壊の代行者 ヴィーナス +--The Agent of Destruction - Venus +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Special Summon self + --Special Summon self local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetTarget(s.hsptg) e1:SetOperation(s.hspop) c:RegisterEffect(e1) - -- Special Summon + --Special Summon local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) @@ -33,9 +33,9 @@ function s.hspcostfilter(c,tp) and Duel.GetMZoneCount(tp,c)>0 end function s.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.hspcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end + if chk==0 then return Duel.IsExistingMatchingCard(s.hspcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.hspcostfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp) + local g=Duel.SelectMatchingCard(tp,s.hspcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil,tp) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) @@ -54,7 +54,7 @@ function s.spfilter(c,e,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) + local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,nil,e,tp) local ct=math.min(#sg,Duel.GetLocationCount(tp,LOCATION_MZONE)) if chk==0 then return ct>0 and Duel.CheckLPCost(tp,500) end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end @@ -72,7 +72,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local ct=e:GetLabel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local sg=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,ct,ct,nil,e,tp) + local sg=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,ct,ct,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,#sg,tp,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) @@ -81,16 +81,16 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() for sc in g:Iter() do if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then - -- Place it on the bottom of the Deck if it leaves the field + --Place it on the bottom of the Deck if it leaves the field local e1=Effect.CreateEffect(c) e1:SetDescription(3301) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_DECKBOT) sc:RegisterEffect(e1,true) end end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c99064191.lua b/official/c99064191.lua index eaca5ca4c8..95caf7b456 100644 --- a/official/c99064191.lua +++ b/official/c99064191.lua @@ -31,7 +31,7 @@ function s.target1(e,tp,eg,ep,ev,re,r,rp,chk) local tc=pe:GetHandler() if pe:IsActiveType(TYPE_EFFECT) and tc:IsLevelAbove(5) and Duel.IsChainDisablable(ct-1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) if tc:IsRelateToEffect(pe) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) @@ -56,7 +56,7 @@ function s.condition2(e,tp,eg,ep,ev,re,r,rp,chk) end function s.cost2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.target2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 end diff --git a/official/c99070951.lua b/official/c99070951.lua index ef83561d50..2119cdcb12 100644 --- a/official/c99070951.lua +++ b/official/c99070951.lua @@ -1,4 +1,5 @@ --サイ・ガール +--Esper Girl local s,id=GetID() function s.initial_effect(c) --remove @@ -37,9 +38,9 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not tc or not tc:IsAbleToRemove() then return end Duel.DisableShuffleCheck() Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) + tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1) if c:IsLocation(LOCATION_MZONE) then - c:RegisterFlagEffect(id,RESET_EVENT+0x680000,0,1) + c:RegisterFlagEffect(id,RESET_EVENT|RESET_TOGRAVE|RESET_REMOVE,0,1) end e:SetLabelObject(tc) end @@ -58,4 +59,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:GetFlagEffect(id)~=0 then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99075257.lua b/official/c99075257.lua index 65137c057d..325a3d11f6 100644 --- a/official/c99075257.lua +++ b/official/c99075257.lua @@ -1,4 +1,5 @@ --D-タイム +--D - Time local s,id=GetID() function s.initial_effect(c) --Activate @@ -11,14 +12,14 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3008,0xc008} +s.listed_series={SET_ELEMENTAL_HERO,SET_DESTINY_HERO} function s.condition(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst() local lv=tc:GetLevel() - return #eg==1 and tc:IsSetCard(0x3008) and tc:IsPreviousPosition(POS_FACEUP) and tc:IsPreviousControler(tp) + return #eg==1 and tc:IsSetCard(SET_ELEMENTAL_HERO) and tc:IsPreviousPosition(POS_FACEUP) and tc:IsPreviousControler(tp) end function s.filter(c,lv) - return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsAbleToHand() + return c:IsLevelBelow(lv) and c:IsSetCard(SET_DESTINY_HERO) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,eg:GetFirst():GetLevel()) end @@ -32,4 +33,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c99092624.lua b/official/c99092624.lua index 47a32727c7..c9a36d8893 100644 --- a/official/c99092624.lua +++ b/official/c99092624.lua @@ -30,7 +30,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ct=ct+Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_FIELD) if ct==0 then return false end for p=0,1 do - if Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0x123,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,p) then return true end + if Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,SET_ROSE,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,p) then return true end end return false end @@ -43,8 +43,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if ct==0 then return end if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end repeat - local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0x123,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,tp) - local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0x123,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) + local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,SET_ROSE,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,tp) + local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,SET_ROSE,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) if not (b1 or b2) then break end local op=0 if b1 and b2 then @@ -78,23 +78,23 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)>0 then + if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT|REASON_TEMPORARY)>0 then local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetLabelObject(tc) e1:SetCountLimit(1) - if Duel.GetCurrentPhase()==PHASE_STANDBY then + if Duel.IsPhase(PHASE_STANDBY) then e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(s.retcon) - e1:SetReset(RESET_PHASE+PHASE_STANDBY,2) + e1:SetReset(RESET_PHASE|PHASE_STANDBY,2) else - e1:SetReset(RESET_PHASE+PHASE_STANDBY) + e1:SetReset(RESET_PHASE|PHASE_STANDBY) end e1:SetOperation(s.retop) Duel.RegisterEffect(e1,tp) if c:IsRelateToEffect(e) then - Duel.SendtoDeck(c,nil,1,REASON_EFFECT) + Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT) end end end @@ -104,4 +104,4 @@ end function s.retop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetLabelObject() Duel.ReturnToField(tc) -end +end \ No newline at end of file diff --git a/official/c9910360.lua b/official/c9910360.lua index b386013ade..57872a229b 100644 --- a/official/c9910360.lua +++ b/official/c9910360.lua @@ -1,4 +1,5 @@ --ガエル・サンデス +--D.3.S. Frog local s,id=GetID() function s.initial_effect(c) --fusion material @@ -14,7 +15,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={12538374} -s.material_setcode=0x12 +s.material_setcode=SET_FROG function s.atkval(e,c) return Duel.GetMatchingGroupCount(Card.IsCode,c:GetControler(),LOCATION_GRAVE,0,nil,12538374)*500 -end +end \ No newline at end of file diff --git a/official/c99111753.lua b/official/c99111753.lua index 1ea9c03124..3bca401db3 100644 --- a/official/c99111753.lua +++ b/official/c99111753.lua @@ -27,9 +27,9 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) - e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) + e:GetHandler():RegisterFlagEffect(0,RESET_EVENT|RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetTargetCards(e) Duel.SendtoHand(g,nil,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99115354.lua b/official/c99115354.lua index b6dbe5d4bd..05f92fe21b 100644 --- a/official/c99115354.lua +++ b/official/c99115354.lua @@ -40,7 +40,7 @@ function s.atktg(e,c) end function s.aclimit(e,re,tp) local loc=re:GetActivateLocation() - return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()>e:GetHandler():GetAttack() + return loc==LOCATION_MZONE and re:IsMonsterEffect() and re:GetHandler():GetAttack()>e:GetHandler():GetAttack() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -68,5 +68,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c99137266.lua b/official/c99137266.lua index 2dd13e6b68..084a15ffd2 100644 --- a/official/c99137266.lua +++ b/official/c99137266.lua @@ -1,14 +1,14 @@ --- 憶念の相剣 --- Swordsoul Sati --- Scripted by Hatter +--憶念の相剣 +--Swordsoul Strife +--Scripted by Hatter local s,id=GetID() function s.initial_effect(c) - -- Activate + --Activate local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e0) - -- Banish + --Banish local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE) @@ -20,7 +20,7 @@ function s.initial_effect(c) e1:SetTarget(s.rmtg) e1:SetOperation(s.rmop) c:RegisterEffect(e1) - -- Special Summon token + --Special Summon token local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) @@ -33,19 +33,19 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.listed_names={TOKEN_SWORDSOUL} -s.listed_series={0x16d} +s.listed_series={SET_SWORDSOUL} function s.rmfilter(c) - return (c:IsSetCard(0x16d) or (c:IsRace(RACE_WYRM) and c:IsType(TYPE_SYNCHRO))) + return (c:IsSetCard(SET_SWORDSOUL) or (c:IsRace(RACE_WYRM) and c:IsType(TYPE_SYNCHRO))) and c:IsAbleToRemove() and (c:IsFaceup() or not c:IsLocation(LOCATION_ONFIELD)) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) - local loc=LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD + local loc=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_ONFIELD if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,loc,LOCATION_ONFIELD,1,nil) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,loc) end function s.rmop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end - local loc=LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD + local loc=LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE|LOCATION_ONFIELD Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,loc,LOCATION_ONFIELD,1,1,nil) if #g>0 then @@ -58,7 +58,7 @@ end function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,0x16d,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_SWORDSOUL,SET_SWORDSOUL,TYPES_TOKEN+TYPE_TUNER,0,0,4,RACE_WYRM,ATTRIBUTE_WATER) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) @@ -68,7 +68,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local token=Duel.CreateToken(tp,TOKEN_SWORDSOUL) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) - -- Cannot Special Summon non-Synchro monsters from Extra Deck + --Cannot Special Summon non-Synchro monsters from Extra Deck local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) @@ -76,12 +76,12 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetAbsoluteRange(tp,1,0) e1:SetTarget(function(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) end) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) - -- Lizard check + --Lizard check local e2=aux.createContinuousLizardCheck(c,LOCATION_MZONE,function(_,c) return c:IsOriginalType(TYPE_SYNCHRO) end) - e2:SetReset(RESET_EVENT+RESETS_STANDARD) + e2:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e2,true) end Duel.SpecialSummonComplete() -end +end \ No newline at end of file diff --git a/official/c99150062.lua b/official/c99150062.lua index 5cb50f8015..f6bb3b1009 100644 --- a/official/c99150062.lua +++ b/official/c99150062.lua @@ -1,4 +1,5 @@ --ナチュル・アントジョー +--Naturia Antjaw local s,id=GetID() function s.initial_effect(c) --special summon @@ -13,12 +14,12 @@ function s.initial_effect(c) e1:SetOperation(s.spop) c:RegisterEffect(e1) end -s.listed_series={0x2a} +s.listed_series={SET_NATURIA} function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(aux.NOT(Card.IsSummonPlayer),1,nil,tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x2a) and c:GetLevel()<=3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_NATURIA) and c:GetLevel()<=3 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -30,4 +31,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c99153051.lua b/official/c99153051.lua index 5c5cbd66d7..a0cbcfbf4f 100644 --- a/official/c99153051.lua +++ b/official/c99153051.lua @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) e1:SetTarget(function(e,c) return not c:IsRace(RACE_INSECT|RACE_PLANT|RACE_REPTILE) end) e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c99157310.lua b/official/c99157310.lua index 0de562515f..7c390c7ac1 100644 --- a/official/c99157310.lua +++ b/official/c99157310.lua @@ -1,7 +1,6 @@ --ティンダングル・ドロネー --Tindangle Delaunay --Script by nekrozar - local s,id=GetID() function s.initial_effect(c) --Destroy attacking monster, special summon 1 "Tindangle Acute Cerberus" from extra deck @@ -23,16 +22,15 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetCondition(s.spcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end -s.listed_series={0x10b} +s.listed_series={SET_TINDANGLE} s.listed_names={75119040} - function s.cfilter1(c) - return c:IsSetCard(0x10b) and c:IsMonster() + return c:IsSetCard(SET_TINDANGLE) and c:IsMonster() end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep==tp and Duel.GetAttacker():IsControler(1-tp) @@ -67,7 +65,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) return not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) end function s.spfilter(c,e,tp) - return c:IsSetCard(0x10b) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) + return c:IsSetCard(SET_TINDANGLE) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return false end @@ -92,4 +90,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c99162522.lua b/official/c99162522.lua index 7d8fcd8c59..f5b7a39f03 100644 --- a/official/c99162522.lua +++ b/official/c99162522.lua @@ -16,10 +16,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={CARD_R_ACE_HYDRANT} function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0x18c),tp,LOCATION_MZONE,0,1,nil) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,SET_RESCUE_ACE),tp,LOCATION_MZONE,0,1,nil) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsType(TYPE_EFFECT) end @@ -32,7 +32,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or Duel.Destroy(tc,REASON_EFFECT)==0 then return end if not Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_R_ACE_HYDRANT),tp,LOCATION_ONFIELD,0,1,nil) then return end - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) --Cannot activate the effects of the destroyed monster or monsters with the same original name local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) @@ -41,10 +41,10 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetTargetRange(0,1) e1:SetValue(s.aclimit) e1:SetLabel(tc:GetOriginalCode()) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.aclimit(e,re,tp) local rc=re:GetHandler() - return re:IsActiveType(TYPE_MONSTER) and (rc:GetFlagEffect(id)>0 or rc:IsOriginalCode(e:GetLabel())) + return re:IsMonsterEffect() and (rc:GetFlagEffect(id)>0 or rc:IsOriginalCode(e:GetLabel())) end \ No newline at end of file diff --git a/official/c99162753.lua b/official/c99162753.lua index 59d5d5dbbf..4bfc0fab61 100644 --- a/official/c99162753.lua +++ b/official/c99162753.lua @@ -26,28 +26,28 @@ function s.rescon(sg,e,tp,mg) if sg:GetClassCount(Card.GetOriginalRace)~=1 or not sg:CheckDifferentPropertyBinary(function(c)return c:GetType()&(TYPES)end) then return false,true end - return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,e,tp,sg:GetFirst():GetOriginalRace()) + return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,1,nil,e,tp,sg:GetFirst():GetOriginalRace()) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,nil) return aux.SelectUnselectGroup(g,e,tp,6,6,s.rescon,0) end - Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,6,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE) - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,6,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_EXTRA) end function s.activate(e,tp,eg,ep,ev,re,r,rp) - local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil) + local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE,0,nil) local rg=aux.SelectUnselectGroup(g,e,tp,6,6,s.rescon,1,tp,HINTMSG_REMOVE) if #rg==6 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==6 then Duel.BreakEffect() local rc=rg:GetFirst():GetOriginalRace() local loc=LOCATION_EXTRA - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_DECK end + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc|LOCATION_DECK end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp,rc) if #sg>0 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end end -end +end \ No newline at end of file diff --git a/official/c99173029.lua b/official/c99173029.lua index 79b0ea929d..b101d31fdf 100644 --- a/official/c99173029.lua +++ b/official/c99173029.lua @@ -40,8 +40,8 @@ function s.levop(e,tp,eg,ep,ev,re,r,rp) end function s.mtop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then - Duel.DiscardHand(tp,nil,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,nil,1,1,REASON_COST|REASON_DISCARD) else Duel.Destroy(e:GetHandler(),REASON_COST) end -end +end \ No newline at end of file diff --git a/official/c99176254.lua b/official/c99176254.lua index 6affdc8eea..4b1d367ed6 100644 --- a/official/c99176254.lua +++ b/official/c99176254.lua @@ -33,7 +33,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT)>0 end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) diff --git a/official/c99185129.lua b/official/c99185129.lua index 501d23e221..ca762a0182 100644 --- a/official/c99185129.lua +++ b/official/c99185129.lua @@ -18,7 +18,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetCountLimit(1,id) - e2:SetCost(s.thcost) + e2:SetCost(Cost.SelfDiscard) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) @@ -30,20 +30,16 @@ function s.initial_effect(c) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) - e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER) + e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER) e3:SetCountLimit(1,{id,1}) - e3:SetCondition(s.condition) + e3:SetCondition(aux.StatChangeDamageStepCondition) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0xb4} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_NEKROZ} function s.thfilter(c) - return c:IsSetCard(0xb4) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_NEKROZ) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end @@ -57,9 +53,6 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.ConfirmCards(1-tp,g) end end -function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() -end function s.filter(c) return c:IsSummonLocation(LOCATION_EXTRA) and not (c:GetAttack()==0 and c:IsDisabled()) end @@ -72,24 +65,24 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() - if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetValue(RESET_TURN_SET) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end \ No newline at end of file diff --git a/official/c99188141.lua b/official/c99188141.lua index 0fb6d8b593..48ea4c5448 100644 --- a/official/c99188141.lua +++ b/official/c99188141.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - if (not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) + if (not re:IsMonsterEffect() and not re:IsHasType(EFFECT_TYPE_ACTIVATE)) or not Duel.IsChainNegatable(ev) then return false end local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-#tg>1 @@ -34,4 +34,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Remove(re:GetHandler(),POS_FACEUP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99189322.lua b/official/c99189322.lua index 7f82b12c68..18f542fcfa 100644 --- a/official/c99189322.lua +++ b/official/c99189322.lua @@ -42,7 +42,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local val=Arcana.GetCoinResult(tc) tc:ResetEffect(RESET_DISABLE,RESET_EVENT) regfun(tc,val) - tc:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD_DISABLE|RESET_PHASE|PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_DISABLE_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) diff --git a/official/c99212922.lua b/official/c99212922.lua index ee9607366b..dadba69fde 100644 --- a/official/c99212922.lua +++ b/official/c99212922.lua @@ -1,4 +1,5 @@ --白竜の忍者 +--White Dragon Ninja local s,id=GetID() function s.initial_effect(c) --spsummon limit @@ -19,10 +20,10 @@ function s.initial_effect(c) e2:SetValue(1) c:RegisterEffect(e2) end -s.listed_series={0x61} +s.listed_series={SET_NINJITSU_ART} function s.splimit(e,se,sp,st) - return se:GetHandler():IsSetCard(0x61) + return se:GetHandler():IsSetCard(SET_NINJITSU_ART) end function s.indes(e,c) - return c:IsType(TYPE_SPELL+TYPE_TRAP) -end + return c:IsSpellTrap() +end \ No newline at end of file diff --git a/official/c99214782.lua b/official/c99214782.lua index ab93b6699b..303d907056 100644 --- a/official/c99214782.lua +++ b/official/c99214782.lua @@ -1,4 +1,5 @@ --インヴェルズの歩哨 +--Steelswarm Sentinel local s,id=GetID() function s.initial_effect(c) --cannot trigger @@ -15,5 +16,5 @@ function s.condition(e) return e:GetHandler():IsAttackPos() end function s.target(e,c) - return c:GetLevel()>=5 and c:IsSummonType(SUMMON_TYPE_SPECIAL) -end + return c:GetLevel()>=5 and c:IsSpecialSummoned() +end \ No newline at end of file diff --git a/official/c99234526.lua b/official/c99234526.lua index ba6f2ec38f..89353b560c 100644 --- a/official/c99234526.lua +++ b/official/c99234526.lua @@ -40,14 +40,14 @@ end function s.spcon(e,c) if c==nil then return true end local tp=c:GetControler() - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return ft>-1 and #rg>0 and aux.SelectUnselectGroup(rg,e,tp,1,1,nil,0) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp) + local rg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp) local g=aux.SelectUnselectGroup(rg,e,tp,1,1,nil,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -79,4 +79,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c99243014.lua b/official/c99243014.lua index c91c05b3b9..914b39bcae 100644 --- a/official/c99243014.lua +++ b/official/c99243014.lua @@ -27,7 +27,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Lizard check aux.addTempLizardCheck(e:GetHandler(),tp,s.lizfilter) @@ -40,7 +40,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) end function s.exfilter(c,e,tp,ft) return c:IsType(TYPE_SYNCHRO) and c.material - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp,c,ft) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_DECK,0,1,nil,e,tp,c,ft) end function s.spfilter(c,e,tp,sc,ft) return c:IsCode(table.unpack(sc.material)) @@ -48,8 +48,8 @@ function s.spfilter(c,e,tp,sc,ft) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)) end - Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) - Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -58,7 +58,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #cg==0 then return end Duel.ConfirmCards(1-tp,cg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) - local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp,cg:GetFirst(),ft):GetFirst() + local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_DECK,0,1,1,nil,e,tp,cg:GetFirst(),ft):GetFirst() if tc then aux.ToHandOrElse(tc,tp,function(c) return tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and ft>0 end, @@ -66,4 +66,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end, aux.Stringid(id,0)) end -end +end \ No newline at end of file diff --git a/official/c9925982.lua b/official/c9925982.lua index 8527ad1d8c..5c3014e0bf 100644 --- a/official/c9925982.lua +++ b/official/c9925982.lua @@ -35,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end Duel.SpecialSummonComplete() end -end +end \ No newline at end of file diff --git a/official/c99266988.lua b/official/c99266988.lua index e89114222e..58b4f3733e 100644 --- a/official/c99266988.lua +++ b/official/c99266988.lua @@ -1,7 +1,6 @@ --混沌領域 --Chaos Space --Scripted by AlphaKretin - local s,id=GetID() function s.initial_effect(c) --Add 1 level 4 to 8 LIGHT/DARK monster, that cannot be normal summoned/set @@ -23,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tdtg) e2:SetOperation(s.tdop) c:RegisterEffect(e2) @@ -77,4 +76,4 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect() Duel.Draw(p,d,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99267150.lua b/official/c99267150.lua index b7c603d08f..95e729530c 100644 --- a/official/c99267150.lua +++ b/official/c99267150.lua @@ -1,4 +1,5 @@ --F・G・D +--Five-Headed Dragon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -19,5 +20,5 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.batfilter(e,c) - return c:IsAttribute(0x2f) -end + return c:IsAttribute(ATTRIBUTE_DARK|ATTRIBUTE_WIND|ATTRIBUTE_FIRE|ATTRIBUTE_WATER|ATTRIBUTE_EARTH) +end \ No newline at end of file diff --git a/official/c99274184.lua b/official/c99274184.lua index c7b96c9465..a42b118710 100644 --- a/official/c99274184.lua +++ b/official/c99274184.lua @@ -1,4 +1,5 @@ --クリストロン・インパクト +--Crystron Impact local s,id=GetID() function s.initial_effect(c) --Activate @@ -18,14 +19,14 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.discon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end -s.listed_series={0xea} +s.listed_series={SET_CRYSTRON} function s.filter(c,e,tp) - return c:IsFaceup() and c:IsSetCard(0xea) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsFaceup() and c:IsSetCard(SET_CRYSTRON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and s.filter(chkc,e,tp) end @@ -46,14 +47,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_DEFENSE_FINAL) e1:SetValue(0) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) sc:RegisterEffect(e1) end end end end function s.tgfilter(c,tp) - return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsSetCard(0xea) + return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsSetCard(SET_CRYSTRON) end function s.discon(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end @@ -67,4 +68,4 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) end function s.disop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) -end +end \ No newline at end of file diff --git a/official/c99284890.lua b/official/c99284890.lua index e0a0929498..651feb90e7 100644 --- a/official/c99284890.lua +++ b/official/c99284890.lua @@ -1,4 +1,5 @@ --壺魔神 +--Avatar of The Pot local s,id=GetID() function s.initial_effect(c) --Activate @@ -30,4 +31,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Draw(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9929398.lua b/official/c9929398.lua index 90d4db3a68..f5907217df 100644 --- a/official/c9929398.lua +++ b/official/c9929398.lua @@ -1,6 +1,5 @@ --BF-朧影のゴウフウ --Blackwing - Gofu the Vague Shadow - local s,id=GetID() function s.initial_effect(c) --Must be properly summoned before reviving @@ -35,8 +34,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end s.listed_names={9929399} -s.listed_series={0x33} - +s.listed_series={SET_BLACKWING} function s.spcon(e,c) if c==nil then return true end return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)==0 @@ -65,7 +63,7 @@ function s.tknop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetValue(1) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) token:RegisterEffect(e1,true) local e2=e1:Clone() e2:SetCode(EFFECT_UNRELEASABLE_NONSUM) @@ -86,7 +84,7 @@ function s.spfilter(c,e,tp,ct) local rlv=c:GetLevel()-e:GetHandler():GetLevel() if rlv<1 then return false end local rg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,e:GetHandler()) - return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(SET_BLACKWING) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rg:CheckWithSumEqual(Card.GetLevel,rlv,ct,63) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -109,7 +107,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(TYPE_TUNER) tc:RegisterEffect(e1) end diff --git a/official/c99311109.lua b/official/c99311109.lua index a4f0fc4637..abceb38025 100644 --- a/official/c99311109.lua +++ b/official/c99311109.lua @@ -26,13 +26,13 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -51,4 +51,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp,PHASE_END,1) end -end +end \ No newline at end of file diff --git a/official/c99315585.lua b/official/c99315585.lua index f72c65c690..99a2c40513 100644 --- a/official/c99315585.lua +++ b/official/c99315585.lua @@ -20,14 +20,14 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.regtg) e2:SetOperation(s.regop) c:RegisterEffect(e2) end -s.listed_series={0x10db,0xdb} +s.listed_series={SET_THE_PHANTOM_KNIGHTS,SET_PHANTOM_KNIGHTS} function s.tgfilter(c,tp) - return c:IsControler(tp) and (c:IsSetCard(0x10db) or c:IsSetCard(0xdb) and c:IsSpellTrap()) + return c:IsControler(tp) and (c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) or c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap()) end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.tgfilter,1,nil,tp) @@ -40,7 +40,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) c:RegisterEffect(e1) end end @@ -55,11 +55,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1) e1:SetCondition(s.thcon) e1:SetOperation(s.thop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end function s.thfilter(c) - return (c:IsSetCard(0x10db) or (c:IsSetCard(0xdb) and c:IsSpellTrap())) and c:IsAbleToHand() + return (c:IsSetCard(SET_THE_PHANTOM_KNIGHTS) or (c:IsSetCard(SET_PHANTOM_KNIGHTS) and c:IsSpellTrap())) and c:IsAbleToHand() end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) @@ -72,4 +72,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c99328137.lua b/official/c99328137.lua index 6324e32762..a622107929 100644 --- a/official/c99328137.lua +++ b/official/c99328137.lua @@ -1,7 +1,6 @@ --氷騎士 --Ice Knight --Logical Nonsense - --Substitute ID local s,id=GetID() function s.initial_effect(c) @@ -29,10 +28,10 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD) - e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) + e1:SetTargetRange(LOCATION_HAND|LOCATION_MZONE,0) e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) --Cannot Normal/Special Summon, except WATER monsters local e2=Effect.CreateEffect(e:GetHandler()) @@ -41,7 +40,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetTargetRange(1,0) e2:SetTarget(s.splimit) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) @@ -50,4 +49,4 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) end function s.splimit(e,c,sump,sumtype,sumpos,targetp) return not c:IsAttribute(ATTRIBUTE_WATER) -end +end \ No newline at end of file diff --git a/official/c99330325.lua b/official/c99330325.lua index 642d95863c..5b2fb81a34 100644 --- a/official/c99330325.lua +++ b/official/c99330325.lua @@ -1,6 +1,5 @@ --妨げられた壊獣の眠り --Interrupted Kaiju Slumber - local s,id=GetID() function s.initial_effect(c) --Destroy all monsters on field, then special summon 2 "Kaiju" monsters to each field, from deck @@ -20,28 +19,27 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(aux.exccon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.thtg) e2:SetOperation(s.thop) c:RegisterEffect(e2) end -s.listed_series={0xd3} - +s.listed_series={SET_KAIJU} function s.chkfilter1(c,e,tp) - return c:IsSetCard(0xd3) and c:IsMonster() and + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,tp,c) and Duel.IsExistingMatchingCard(s.chkfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.chkfilter2(c,e,tp,cd) - return c:IsSetCard(0xd3) and c:IsMonster() and not c:IsCode(cd) + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and not c:IsCode(cd) and not c:IsHasEffect(EFFECT_REVIVE_LIMIT) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,1-tp,c) end function s.filter1(c,e,tp) - return c:IsSetCard(0xd3) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) end function s.filter2(c,e,tp,cd) - return c:IsSetCard(0xd3) and c:IsMonster() and not c:IsCode(cd) + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and not c:IsCode(cd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK,1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) @@ -75,7 +73,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc1:RegisterEffect(e1) local e2=e1:Clone() tc2:RegisterEffect(e2) @@ -90,7 +88,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0xd3) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_KAIJU) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c99342953.lua b/official/c99342953.lua index 680cadfe1c..0966ada261 100644 --- a/official/c99342953.lua +++ b/official/c99342953.lua @@ -27,10 +27,10 @@ function s.initial_effect(c) e3:SetOperation(s.spop) c:RegisterEffect(e3) end -s.listed_series={0xc} +s.listed_series={SET_ALIEN} s.counter_place_list={COUNTER_A} function s.ctfilter(c) - return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0xc) + return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(SET_ALIEN) end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.ctfilter,1,nil) @@ -43,7 +43,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.RemoveCounter(tp,1,1,COUNTER_A,2,REASON_COST) end function s.filter(c,e,tp) - return c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_ALIEN) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end @@ -59,4 +59,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99348756.lua b/official/c99348756.lua index 86414478e4..578305b088 100644 --- a/official/c99348756.lua +++ b/official/c99348756.lua @@ -1,4 +1,5 @@ --バルキリー・ナイト +--Valkyrian Knight local s,id=GetID() function s.initial_effect(c) --cannot be battle target @@ -53,4 +54,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99351431.lua b/official/c99351431.lua index 45aeb7a492..918541570d 100644 --- a/official/c99351431.lua +++ b/official/c99351431.lua @@ -1,4 +1,5 @@ --盗賊の極意 +--The Secret of the Bandit local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,7 +13,7 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end - if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 + if chk==0 then return Duel.IsPhase(PHASE_MAIN1) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) @@ -20,7 +21,7 @@ end function s.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsImmuneToEffect(e) and tc:GetFlagEffect(id)==0 then - tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) + tc:RegisterFlagEffect(id,RESETS_STANDARD_PHASE_END,0,1) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_HANDES) @@ -30,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(s.hdcon) e1:SetTarget(s.hdtg) e1:SetOperation(s.hdop) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) end end @@ -44,4 +45,4 @@ end function s.hdop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1) Duel.SendtoGrave(g,REASON_EFFECT+REASON_COST) -end +end \ No newline at end of file diff --git a/official/c99357565.lua b/official/c99357565.lua index f322150489..d7cbe1aa00 100644 --- a/official/c99357565.lua +++ b/official/c99357565.lua @@ -34,7 +34,7 @@ function s.initial_effect(c) e3:SetOperation(s.tgop) c:RegisterEffect(e3) end -s.listed_series={0xc008} +s.listed_series={SET_DESTINY_HERO} s.listed_names={id} function s.scop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -43,8 +43,8 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_ADD_SETCODE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetValue(0xc008) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetValue(SET_DESTINY_HERO) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) c:RegisterEffect(e1) end end @@ -56,14 +56,14 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) local ct=2 if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end ct=math.min(ct,Duel.GetLocationCount(tp,LOCATION_MZONE), - Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp)) - local cg=Duel.DiscardHand(tp,Card.IsDiscardable,1,ct,REASON_COST+REASON_DISCARD,nil) + Duel.GetMatchingGroupCount(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,nil,e,tp)) + local cg=Duel.DiscardHand(tp,Card.IsDiscardable,1,ct,REASON_COST|REASON_DISCARD,nil) e:SetLabel(cg) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,e:GetLabel(),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK) end function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) local ct=e:GetLabel() @@ -71,7 +71,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if ft>=ct then if ft>1 and ct>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,ct,ct,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE|LOCATION_DECK,0,ct,ct,nil,e,tp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end @@ -82,7 +82,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_CANNOT_SUMMON) @@ -90,18 +90,18 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) local e3=Effect.CreateEffect(e:GetHandler()) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_OATH) e3:SetDescription(aux.Stringid(id,3)) - e3:SetReset(RESET_PHASE+PHASE_END) + e3:SetReset(RESET_PHASE|PHASE_END) e3:SetTargetRange(1,0) Duel.RegisterEffect(e3,tp) end function s.splimit(e,c) - return not c:IsSetCard(0xc008) + return not c:IsSetCard(SET_DESTINY_HERO) end function s.tgcon(e,tp,eg,ep,ev,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 end function s.tgfilter(c) - return c:IsMonster() and c:IsSetCard(0xc008) and c:IsAbleToGrave() + return c:IsMonster() and c:IsSetCard(SET_DESTINY_HERO) and c:IsAbleToGrave() end function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end @@ -113,4 +113,4 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SendtoGrave(g,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99365553.lua b/official/c99365553.lua index edda281d2a..14dc4c082a 100644 --- a/official/c99365553.lua +++ b/official/c99365553.lua @@ -46,8 +46,8 @@ end function s.spcon1(e,c) if c==nil then return true end local tp=c:GetControler() - local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) - local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) + local rg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) + local rg2=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK) local rg=rg1:Clone() rg:Merge(rg2) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) @@ -56,7 +56,7 @@ end function s.sptg1(e,tp,eg,ep,ev,re,r,rp,c) local c=e:GetHandler() local g=nil - local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) + local rg=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) local g=aux.SelectUnselectGroup(rg,e,tp,2,2,s.rescon,1,tp,HINTMSG_REMOVE,nil,nil,true) if #g>0 then g:KeepAlive() @@ -127,4 +127,4 @@ function s.spop3(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99370594.lua b/official/c99370594.lua index 4cf45803f9..086449468c 100644 --- a/official/c99370594.lua +++ b/official/c99370594.lua @@ -1,5 +1,5 @@ --劫火の眠り姫ゴースト・スリーパー ---Hellfire Sleeping Beauty, Ghost Sleeper +--Ghost Sleeper, the Underworld Princess local s,id=GetID() function s.initial_effect(c) --Search 1 "Ghost Fusion" @@ -47,7 +47,7 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.thfilter2(c) return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsLevelAbove(4) and c:IsMonster() and c:IsAbleToHand() @@ -64,4 +64,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99397762.lua b/official/c99397762.lua index e37b91dd4c..4c36930187 100644 --- a/official/c99397762.lua +++ b/official/c99397762.lua @@ -1,25 +1,28 @@ --光波防輪 +--Cipher Bit local s,id=GetID() function s.initial_effect(c) - --Activate + --Attach this card to 1 "Galaxy-Eyes" or "Cipher" Xyz Monster you control local e1=Effect.CreateEffect(c) - e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(s.target) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x107b,0xe5} -function s.filter(c) - return c:IsFaceup() and c:IsType(TYPE_XYZ) and (c:IsSetCard(0x107b) or c:IsSetCard(0xe5)) +s.listed_series={SET_GALAXY_EYES,SET_CIPHER} +function s.tgfilter(c,mc,tp) + return c:IsSetCard({SET_GALAXY_EYES,SET_CIPHER}) and c:IsType(TYPE_XYZ) and c:IsFaceup() and mc:IsCanBeXyzMaterial(c,tp,REASON_EFFECT) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end + local c=e:GetHandler() + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,c,tp) end if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) - and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end + and Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil,c,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) - Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp) end function s.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -27,17 +30,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and c:IsRelateToEffect(e) then c:CancelToGrave() Duel.Overlay(tc,c) - -- + --The next time it would be destroyed by battle or card effect this turn, it is not destroyed local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,1)) e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) - e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCountLimit(1) - e1:SetValue(s.indval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetValue(function(e,re,r,rp) return (r&REASON_BATTLE|REASON_EFFECT)>0 end) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end -function s.indval(e,re,r,rp) - return (r&REASON_BATTLE+REASON_EFFECT)~=0 -end diff --git a/official/c9940036.lua b/official/c9940036.lua index cee3a4921b..faa902fdcb 100644 --- a/official/c9940036.lua +++ b/official/c9940036.lua @@ -40,7 +40,7 @@ function s.initial_effect(c) c:RegisterEffect(e3) end function s.tgcond(e,tp,eg,ep,ev,re,r,rp) - return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) + return e:GetHandler():IsXyzSummoned() end function s.tgfilter(c) return c:IsMonster() and c:IsAbleToGrave() @@ -97,21 +97,21 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) if tc:IsType(TYPE_TRAPMONSTER) then local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) - e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e3:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e3) end end diff --git a/official/c99414168.lua b/official/c99414168.lua index 674da9aacc..789c5114d7 100644 --- a/official/c99414168.lua +++ b/official/c99414168.lua @@ -1,4 +1,5 @@ --精霊術師 ドリアード +--Elemental Mistress Doriado local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -8,7 +9,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_ADD_ATTRIBUTE) e1:SetRange(LOCATION_MZONE) - e1:SetValue(0xf) + e1:SetValue(ATTRIBUTE_EARTH|ATTRIBUTE_WIND|ATTRIBUTE_FIRE|ATTRIBUTE_WATER) c:RegisterEffect(e1) end s.listed_names={23965037} \ No newline at end of file diff --git a/official/c99414629.lua b/official/c99414629.lua index 65a59a58b9..9362f00c24 100644 --- a/official/c99414629.lua +++ b/official/c99414629.lua @@ -1,5 +1,5 @@ --ダイノルフィア・ブルート ---Dinoruffia Brute +--Dinomorphia Brute --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -22,20 +22,20 @@ function s.initial_effect(c) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_GRAVE) e2:SetCondition(s.nodamcon) - e2:SetCost(aux.bfgcost) + e2:SetCost(Cost.SelfBanish) e2:SetOperation(s.nodamop) c:RegisterEffect(e2) end -s.listed_series={0x175} +s.listed_series={SET_DINOMORPHIA} function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.PayLPCost(tp,Duel.GetLP(tp)//2) end function s.desfilter(c,tp) - return (c:IsFaceup() and c:IsSetCard(0x175) and c:IsMonster() and c:IsControler(tp)) or c:IsControler(1-tp) + return (c:IsFaceup() and c:IsSetCard(SET_DINOMORPHIA) and c:IsMonster() and c:IsControler(tp)) or c:IsControler(1-tp) end function s.rescon(sg,e,tp,mg) - return sg:FilterCount(Card.IsControler,nil,tp)==1 + return sg:FilterCount(Card.IsControler,nil,tp)==1 end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local rg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp) @@ -61,14 +61,17 @@ function s.nodamop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(s.damval) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e2,tp) end function s.damval(e,re,val,r,rp,rc) - if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then return 0 - else return val end -end + if (r&REASON_EFFECT)~=0 and rp~=e:GetOwnerPlayer() then + return 0 + else + return val + end +end \ No newline at end of file diff --git a/official/c99423156.lua b/official/c99423156.lua index b9d7aeb832..2c08514366 100644 --- a/official/c99423156.lua +++ b/official/c99423156.lua @@ -1,6 +1,5 @@ --不知火の宮司 --Shiranui Spiritmaster - local s,id=GetID() function s.initial_effect(c) --When normal summoned, special summon 1 "Shiranui" monster from hand or GY @@ -24,21 +23,20 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xd9} +s.listed_series={SET_SHIRANUI} s.listed_names={id} - function s.spfilter(c,e,tp) - return c:IsSetCard(0xd9) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsSetCard(SET_SHIRANUI) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end - Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) - local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil,e,tp) local tc=g:GetFirst() if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then --Banish it if it leaves the field @@ -47,7 +45,7 @@ function s.sumop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) tc:RegisterEffect(e1,true) end diff --git a/official/c99426834.lua b/official/c99426834.lua index 5403f4eae2..869bc82ae2 100644 --- a/official/c99426834.lua +++ b/official/c99426834.lua @@ -1,4 +1,5 @@ --沼地の魔獣王 +--Beastking of the Swamps local s,id=GetID() function s.initial_effect(c) --fusion substitute @@ -9,5 +10,5 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.subcon(e) - return e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) -end + return e:GetHandler():IsLocation(LOCATION_HAND|LOCATION_ONFIELD|LOCATION_GRAVE) +end \ No newline at end of file diff --git a/official/c99427357.lua b/official/c99427357.lua index 3cd6dedb00..9a7341df2f 100644 --- a/official/c99427357.lua +++ b/official/c99427357.lua @@ -1,4 +1,5 @@ --サイバー・エンジェル-那沙帝弥- +--Cyber Angel Natasha local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() @@ -34,7 +35,7 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x2093} +s.listed_series={SET_CYBER_ANGEL} s.listed_names={39996157} function s.recfilter(c) return c:IsFaceup() and c:GetAttack()>0 @@ -60,7 +61,7 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end function s.cfilter(c,tp) - return c:IsSetCard(0x2093) and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_CYBER_ANGEL) and c:IsAbleToRemoveAsCost() and c:IsMonster() and aux.SpElimFilter(c,true) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or (c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5)) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) @@ -87,4 +88,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) and tc and tc:IsRelateToEffect(e) then Duel.GetControl(tc,tp) end -end +end \ No newline at end of file diff --git a/official/c99429730.lua b/official/c99429730.lua index 2aed7500c0..a238696315 100644 --- a/official/c99429730.lua +++ b/official/c99429730.lua @@ -65,6 +65,6 @@ end function s.tdop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then - Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) + Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT) end end \ No newline at end of file diff --git a/official/c99456344.lua b/official/c99456344.lua index 7ad1ff1e02..04d20d2200 100644 --- a/official/c99456344.lua +++ b/official/c99456344.lua @@ -1,5 +1,5 @@ --デスピアの大導劇神s ---Dramaturgia of Despia +--Dramaturge of Despia --scripted by Rundas local s,id=GetID() function s.initial_effect(c) @@ -54,22 +54,22 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetValue(RESET_TURN_SET) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end end --Special Summon on being Fusion Material function s.spcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return (r&REASON_FUSION)==REASON_FUSION and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) - and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceup() + return (r&REASON_FUSION)==REASON_FUSION and c:IsPreviousLocation(LOCATION_ONFIELD|LOCATION_HAND) + and c:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and c:IsFaceup() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -81,4 +81,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 or not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -end +end \ No newline at end of file diff --git a/official/c99458769.lua b/official/c99458769.lua index 9a27b3ed81..4640241093 100644 --- a/official/c99458769.lua +++ b/official/c99458769.lua @@ -66,4 +66,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) op=(b1 and 1 or 2) end Duel.Destroy(op==1 and g1 or g2,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99469936.lua b/official/c99469936.lua index 1fda1832f7..c7686994e5 100644 --- a/official/c99469936.lua +++ b/official/c99469936.lua @@ -1,4 +1,5 @@ --FA-クリスタル・ゼロ・ランサー +--Full Armored Crystalzero Lancer local s,id=GetID() function s.initial_effect(c) --xyz summon @@ -27,7 +28,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCountLimit(1) e3:SetRange(LOCATION_MZONE) - e3:SetCost(s.cost) + e3:SetCost(Cost.Detach(1)) e3:SetTarget(s.target) e3:SetOperation(s.operation) c:RegisterEffect(e3,false,REGISTER_FLAG_DETACH_XMAT) @@ -46,10 +47,6 @@ function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) return true else return false end end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsNegatableMonster,tp,0,LOCATION_MZONE,1,nil) end end @@ -61,12 +58,12 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) - e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e2:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e2) end -end +end \ No newline at end of file diff --git a/official/c99471856.lua b/official/c99471856.lua index 956597b84a..4d2d54a219 100644 --- a/official/c99471856.lua +++ b/official/c99471856.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c99517131.lua b/official/c99517131.lua index 13364797e0..86be89e41b 100644 --- a/official/c99517131.lua +++ b/official/c99517131.lua @@ -1,4 +1,5 @@ --生命力吸収魔術 +--The Spell Absorbing Life local s,id=GetID() function s.initial_effect(c) --Activate @@ -23,4 +24,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local rec=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsType,TYPE_EFFECT),tp,LOCATION_MZONE,LOCATION_MZONE,nil)*400 Duel.Recover(p,rec,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99518961.lua b/official/c99518961.lua index 8fa309340e..6eeed2fb27 100644 --- a/official/c99518961.lua +++ b/official/c99518961.lua @@ -1,4 +1,5 @@ --革命 +--Restructer Revolution local s,id=GetID() function s.initial_effect(c) --damage @@ -19,4 +20,4 @@ end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*200,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c9952083.lua b/official/c9952083.lua index 4afd3a1d5e..8fa6366291 100644 --- a/official/c9952083.lua +++ b/official/c9952083.lua @@ -12,7 +12,7 @@ function s.initial_effect(c) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetCurrentChain(true)>1 and Duel.CheckChainUniqueness() and Duel.GetTurnPlayer()==tp + return Duel.GetCurrentChain(true)>1 and Duel.CheckChainUniqueness() and Duel.IsTurnPlayer(tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then @@ -31,6 +31,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(3) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) -end +end \ No newline at end of file diff --git a/official/c99523325.lua b/official/c99523325.lua index 7f4071aebb..e155adb4ea 100644 --- a/official/c99523325.lua +++ b/official/c99523325.lua @@ -1,4 +1,5 @@ --墓守の石版 +--Gravekeeper's Stele local s,id=GetID() function s.initial_effect(c) --Activate @@ -16,9 +17,9 @@ function s.initial_effect(c) e2:SetCode(EFFECT_NECRO_VALLEY_IM) c:RegisterEffect(e2) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.filter(c) - return c:IsSetCard(0x2e) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_GRAVEKEEPERS) and c:IsMonster() and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end @@ -34,4 +35,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg) end -end +end \ No newline at end of file diff --git a/official/c99529628.lua b/official/c99529628.lua index f49760d31f..0176cfcacf 100644 --- a/official/c99529628.lua +++ b/official/c99529628.lua @@ -31,7 +31,7 @@ function s.initial_effect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) - e3:SetCode(EVENT_PHASE+PHASE_STANDBY) + e3:SetCode(EVENT_PHASE|PHASE_STANDBY) e3:SetRange(LOCATION_REMOVED) e3:SetCountLimit(1,{id,2}) e3:SetCondition(function(e) return Duel.GetTurnCount()==e:GetHandler():GetTurnID()+1 end) diff --git a/official/c99532708.lua b/official/c99532708.lua index 4e708d1982..c1e0878840 100644 --- a/official/c99532708.lua +++ b/official/c99532708.lua @@ -14,4 +14,4 @@ end s.counter_list={COUNTER_A} function s.distg(e,c) return c:GetCounter(COUNTER_A)>0 and c:GetCode()~=id -end +end \ No newline at end of file diff --git a/official/c99543666.lua b/official/c99543666.lua index 3e0e3d11f5..b16e88b688 100644 --- a/official/c99543666.lua +++ b/official/c99543666.lua @@ -1,5 +1,5 @@ --烙印劇城デスピア ---Despia, the Stigmatika Theatre +--Despia, Theater of the Branded --Scripted by Eerie Code local s,id=GetID() function s.initial_effect(c) @@ -60,4 +60,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99551425.lua b/official/c99551425.lua index b6d117920a..af80920713 100644 --- a/official/c99551425.lua +++ b/official/c99551425.lua @@ -1,7 +1,8 @@ --迷宮の魔戦車 +--Labyrinth Tank local s,id=GetID() function s.initial_effect(c) --fusion material c:EnableReviveLimit() Fusion.AddProcMix(c,true,true,8471389,11384280) -end +end \ No newline at end of file diff --git a/official/c99581584.lua b/official/c99581584.lua index 75b4736948..77e0c4da0d 100644 --- a/official/c99581584.lua +++ b/official/c99581584.lua @@ -1,4 +1,5 @@ --ガード・ペンギン +--Guard Penguin local s,id=GetID() function s.initial_effect(c) --special summon @@ -27,4 +28,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then Duel.Recover(tp,ev,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99585850.lua b/official/c99585850.lua index c68997078e..2e0e48b27f 100644 --- a/official/c99585850.lua +++ b/official/c99585850.lua @@ -38,7 +38,7 @@ function s.initial_effect(c) e3:SetCode(EVENT_ATTACK_ANNOUNCE) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,0,EFFECT_COUNT_CODE_SINGLE) - e3:SetCondition(function(e,tp) return Duel.GetAttacker():GetControler()==1-tp end) + e3:SetCondition(function(e,tp) return Duel.GetAttacker():IsControler(1-tp) end) e3:SetTarget(s.rmtg) e3:SetOperation(s.rmop) c:RegisterEffect(e3) @@ -111,4 +111,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,chk) if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99590524.lua b/official/c99590524.lua index 741a991066..821db12e70 100644 --- a/official/c99590524.lua +++ b/official/c99590524.lua @@ -1,4 +1,5 @@ --狡猾な落とし穴 +--Treacherous Trap Hole local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c99594764.lua b/official/c99594764.lua index 3ed2098e88..7746dc76a0 100644 --- a/official/c99594764.lua +++ b/official/c99594764.lua @@ -1,4 +1,5 @@ --ドラグニティ-コルセスカ +--Dragunity Corsesca local s,id=GetID() function s.initial_effect(c) --search @@ -33,4 +34,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c99597615.lua b/official/c99597615.lua index 0ab417b10d..62fabf5140 100644 --- a/official/c99597615.lua +++ b/official/c99597615.lua @@ -1,4 +1,5 @@ --悪魔のくちづけ +--Malevolent Nuzzler local s,id=GetID() function s.initial_effect(c) aux.AddEquipProcedure(c) @@ -16,7 +17,7 @@ function s.initial_effect(c) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCode(EVENT_TO_GRAVE) e4:SetCondition(s.tdcon) - e4:SetCost(s.tdcost) + e4:SetCost(Cost.PayLP(500)) e4:SetTarget(s.tdtg) e4:SetOperation(s.tdop) c:RegisterEffect(e4) @@ -24,16 +25,12 @@ end function s.tdcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end -function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,500) end - Duel.PayLPCost(tp,500) -end function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToDeck() end Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) end function s.tdop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then - Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_EFFECT) + Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99599062.lua b/official/c99599062.lua index bd9433ad78..0d32465a85 100644 --- a/official/c99599062.lua +++ b/official/c99599062.lua @@ -16,7 +16,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetCondition(function() return Duel.GetFieldGroupCount(0,LOCATION_FZONE,LOCATION_FZONE)>0 end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) diff --git a/official/c99628747.lua b/official/c99628747.lua index 7b2f061552..5ca13f55ad 100644 --- a/official/c99628747.lua +++ b/official/c99628747.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) - e1:SetCost(aux.SelfDiscardCost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(Ritual.Target(ritual_target_params)) e1:SetOperation(Ritual.Operation(ritual_operation_params)) c:RegisterEffect(e1) diff --git a/official/c99634927.lua b/official/c99634927.lua index f30795a2cd..eb120e617a 100644 --- a/official/c99634927.lua +++ b/official/c99634927.lua @@ -1,6 +1,5 @@ --魔界劇団-ファンキー・コメディアン --Abyss Actor - Funky Comedian - local s,id=GetID() function s.initial_effect(c) --Enable pendulum summon @@ -41,13 +40,12 @@ function s.initial_effect(c) e4:SetOperation(s.atkop3) c:RegisterEffect(e4) end -s.listed_series={0x10ec} - +s.listed_series={SET_ABYSS_ACTOR} function s.atkfilter1(c,tp) - return c:IsSetCard(0x10ec) and Duel.IsExistingTarget(s.atkfilter2,tp,LOCATION_MZONE,0,1,c) + return c:IsSetCard(SET_ABYSS_ACTOR) and Duel.IsExistingTarget(s.atkfilter2,tp,LOCATION_MZONE,0,1,c) end function s.atkfilter2(c) - return c:IsSetCard(0x10ec) and c:IsFaceup() + return c:IsSetCard(SET_ABYSS_ACTOR) and c:IsFaceup() end function s.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.atkfilter1,1,false,nil,nil,tp) end @@ -69,7 +67,7 @@ function s.atkop1(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(e:GetLabel()) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end end @@ -84,7 +82,7 @@ function s.atkop2(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atkval) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_DISABLE_PHASE_END) c:RegisterEffect(e1) end end @@ -97,7 +95,7 @@ function s.atkcost3(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_CANNOT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1,true) end function s.atktg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -115,7 +113,7 @@ function s.atkop3(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) e1:SetValue(atk) tc:RegisterEffect(e1) end diff --git a/official/c99657399.lua b/official/c99657399.lua index e38e58da6c..cb12f26cd0 100644 --- a/official/c99657399.lua +++ b/official/c99657399.lua @@ -1,4 +1,5 @@ --油断大敵 +--Asleep at the Switch local s,id=GetID() function s.initial_effect(c) --Activate @@ -27,4 +28,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99659159.lua b/official/c99659159.lua index 84618cf4ec..6e4529ab76 100644 --- a/official/c99659159.lua +++ b/official/c99659159.lua @@ -28,15 +28,15 @@ function s.initial_effect(c) e3:SetOperation(s.operation) c:RegisterEffect(e3) end -s.listed_series={0x29} +s.listed_series={SET_DRAGUNITY} function s.equipf(c) - return c:IsSetCard(0x29) and (c:GetOriginalType()&TYPE_MONSTER)~=0 + return c:IsSetCard(SET_DRAGUNITY) and c:IsMonsterCard() end function s.atktg(e,c) return c:GetEquipGroup():IsExists(s.equipf,1,nil) end function s.filter(c) - return c:IsSetCard(0x29) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() + return c:IsSetCard(SET_DRAGUNITY) and c:IsRace(RACE_DRAGON) and not c:IsForbidden() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end @@ -59,11 +59,11 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(s.eqlimit) e1:SetLabelObject(tc) sc:RegisterEffect(e1) end function s.eqlimit(e,c) return e:GetLabelObject()==c -end +end \ No newline at end of file diff --git a/official/c99666430.lua b/official/c99666430.lua index 0eb955631d..4e3e665aa8 100644 --- a/official/c99666430.lua +++ b/official/c99666430.lua @@ -14,7 +14,7 @@ function s.initial_effect(c) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,id) e1:SetRange(LOCATION_MZONE) - e1:SetCost(s.cost) + e1:SetCost(Cost.Detach(1)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT) @@ -30,15 +30,11 @@ function s.initial_effect(c) e2:SetOperation(s.desop) c:RegisterEffect(e2) end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end - e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) -end function s.filter(c) return c:IsFaceup() and c:IsControlerCanBeChanged() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) - if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:IsControler(1-tp) and s.filter(chkc) end + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil) @@ -49,7 +45,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if tc and tc:IsRelateToEffect(e) and Duel.GetControl(tc,tp,PHASE_END,1)~=0 then local e1=Effect.CreateEffect(e:GetHandler()) --Cannot attack - local reset=RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END + local reset=RESET_EVENT|RESETS_STANDARD-RESET_TURN_SET|RESET_PHASE|PHASE_END e1:SetDescription(3206) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) @@ -83,4 +79,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) local dg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.HintSelection(dg) Duel.Destroy(dg,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99675356.lua b/official/c99675356.lua index a8bc270869..677d9c7162 100644 --- a/official/c99675356.lua +++ b/official/c99675356.lua @@ -1,4 +1,5 @@ --紫炎の足軽 +--Shien's Footsoldier local s,id=GetID() function s.initial_effect(c) --special summon @@ -12,12 +13,12 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x3d} +s.listed_series={SET_SIX_SAMURAI} function s.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) end function s.filter(c,e,tp) - return c:IsLevelBelow(3) and c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return c:IsLevelBelow(3) and c:IsSetCard(SET_SIX_SAMURAI) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -31,4 +32,4 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99690140.lua b/official/c99690140.lua index 6a8d3f2c6d..b3a6ecf7c1 100644 --- a/official/c99690140.lua +++ b/official/c99690140.lua @@ -1,4 +1,5 @@ --墓守の従者 +--Gravekeeper's Vassal local s,id=GetID() function s.initial_effect(c) --battle damage to effect damage @@ -6,4 +7,4 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_BATTLE_DAMAGE_TO_EFFECT) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c99707692.lua b/official/c99707692.lua index eb148da1aa..47c65f075f 100644 --- a/official/c99707692.lua +++ b/official/c99707692.lua @@ -22,7 +22,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.lvtg) e2:SetOperation(s.lvop) c:RegisterEffect(e2) @@ -93,4 +93,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c99721536.lua b/official/c99721536.lua index beb643041a..a44bc810a2 100644 --- a/official/c99721536.lua +++ b/official/c99721536.lua @@ -1,4 +1,5 @@ --スカルライダー +--Dokurorider local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() diff --git a/official/c99724761.lua b/official/c99724761.lua index d03672bb7f..b549cea5d9 100644 --- a/official/c99724761.lua +++ b/official/c99724761.lua @@ -1,4 +1,5 @@ --XZ-キャタピラー・キャノン +--XZ-Tank Cannon local s,id=GetID() function s.initial_effect(c) --fusion material @@ -21,14 +22,14 @@ function s.contactfil(tp) return Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD,0,nil) end function s.contactop(g) - Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_MATERIAL) + Duel.Remove(g,POS_FACEUP,REASON_COST|REASON_MATERIAL) end function s.splimit(e,se,sp,st) - return not e:GetHandler():IsLocation(LOCATION_EXTRA+LOCATION_GRAVE) + return not e:GetHandler():IsLocation(LOCATION_EXTRA|LOCATION_GRAVE) end function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end - Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) + Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST|REASON_DISCARD) end function s.filter(c) return c:IsFacedown() @@ -45,4 +46,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) and tc:IsFacedown() then Duel.Destroy(tc,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99726621.lua b/official/c99726621.lua index 09f682aeb6..1a2601a9ae 100644 --- a/official/c99726621.lua +++ b/official/c99726621.lua @@ -1,5 +1,5 @@ --鉄獣戦線 凶鳥のシュライグ ---Tribrigade Shrike the Wicked Wings +--Tri-Brigade Shuraig the Ominous Omen --Scripted by the Razgriz local s,id=GetID() function s.initial_effect(c) @@ -41,7 +41,7 @@ function s.initial_effect(c) e3:SetOperation(s.thop) c:RegisterEffect(e3) end -s.listed_series={0x14f} +s.listed_series={SET_TRI_BRIGADE} function s.cfilter(c,tp) return c:IsRace(RACES_BEAST_BWARRIOR_WINGB) and c:IsControler(tp) end @@ -76,4 +76,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end -end +end \ No newline at end of file diff --git a/official/c99733359.lua b/official/c99733359.lua index 1b3b505ed5..a1d1b16602 100644 --- a/official/c99733359.lua +++ b/official/c99733359.lua @@ -1,6 +1,5 @@ --盾航戦車ステゴサイバー --Stegocyber - local s,id=GetID() function s.initial_effect(c) --Special summon itself from GY, and if you do, take no battle damage @@ -12,17 +11,13 @@ function s.initial_effect(c) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCountLimit(1,id) e1:SetCondition(s.condition) - e1:SetCost(s.cost) + e1:SetCost(Cost.PayLP(1000)) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) end function s.condition(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp -end -function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.CheckLPCost(tp,1000) end - Duel.PayLPCost(tp,1000) + return Duel.IsTurnPlayer(1-tp) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -38,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) - e1:SetReset(RESET_EVENT+RESETS_REDIRECT) + e1:SetReset(RESET_EVENT|RESETS_REDIRECT) e1:SetValue(LOCATION_REMOVED) c:RegisterEffect(e1,true) --Take no battle damage from this battle @@ -47,7 +42,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) - e2:SetReset(RESET_PHASE+PHASE_DAMAGE) + e2:SetReset(RESET_PHASE|PHASE_DAMAGE) Duel.RegisterEffect(e2,tp) end end \ No newline at end of file diff --git a/official/c99735427.lua b/official/c99735427.lua index cd241c5f31..b58b868f79 100644 --- a/official/c99735427.lua +++ b/official/c99735427.lua @@ -1,4 +1,5 @@ --暗闇を吸い込むマジック・ミラー +--Shadow-Imprisoning Mirror local s,id=GetID() function s.initial_effect(c) --activate @@ -16,8 +17,8 @@ function s.initial_effect(c) end function s.disop(e,tp,eg,ep,ev,re,r,rp) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) - if re:IsActiveType(TYPE_MONSTER) and (loc==LOCATION_MZONE or loc==LOCATION_GRAVE) + if re:IsMonsterEffect() and (loc==LOCATION_MZONE or loc==LOCATION_GRAVE) and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) then Duel.NegateEffect(ev) end -end +end \ No newline at end of file diff --git a/official/c99742859.lua b/official/c99742859.lua index 2ec31909b5..aba743d8e7 100644 --- a/official/c99742859.lua +++ b/official/c99742859.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) - e1:SetCost(aux.bfgcost) + e1:SetCost(Cost.SelfBanish) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) diff --git a/official/c99747800.lua b/official/c99747800.lua index 774b05081b..60c7ab0678 100644 --- a/official/c99747800.lua +++ b/official/c99747800.lua @@ -7,7 +7,7 @@ function s.initial_effect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_ATKCHANGE) - e1:SetCode(EVENT_PHASE+PHASE_STANDBY) + e1:SetCode(EVENT_PHASE|PHASE_STANDBY) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCondition(s.atkcon) @@ -23,7 +23,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) - e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE) + e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE) e1:SetValue(700) c:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c99788587.lua b/official/c99788587.lua index 2f0eaf6905..4455dbb6af 100644 --- a/official/c99788587.lua +++ b/official/c99788587.lua @@ -1,4 +1,5 @@ --爆導索 +--Blasting Fuse local s,id=GetID() function s.initial_effect(c) --Activate diff --git a/official/c99789342.lua b/official/c99789342.lua index 5ab1d9cac4..ca1aa57181 100644 --- a/official/c99789342.lua +++ b/official/c99789342.lua @@ -21,7 +21,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.sumlimit) Duel.RegisterEffect(e1,tp) @@ -29,7 +29,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e2:SetCode(EFFECT_CANNOT_SUMMON) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) local e3=e2:Clone() @@ -38,7 +38,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e4=Effect.CreateEffect(e:GetHandler()) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e4:SetDescription(aux.Stringid(id,1)) - e4:SetReset(RESET_PHASE+PHASE_END) + e4:SetReset(RESET_PHASE|PHASE_END) e4:SetTargetRange(1,0) Duel.RegisterEffect(e4,tp) end @@ -61,4 +61,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) if #g>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end -end +end \ No newline at end of file diff --git a/official/c99792080.lua b/official/c99792080.lua index 66d017e239..4a71d0b137 100644 --- a/official/c99792080.lua +++ b/official/c99792080.lua @@ -1,7 +1,6 @@ --夢魔鏡の聖獣-パンタス --Phantasos, the Dream Mirror Foe --Scripted by Hel - local s,id=GetID() function s.initial_effect(c) --Can attack directly @@ -19,22 +18,21 @@ function s.initial_effect(c) e2:SetDescription(aux.Stringid(id,0)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) - e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_MAIN_END|TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(s.spcon) - e2:SetCost(s.spcost) + e2:SetCost(Cost.SelfTribute) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end s.listed_names={CARD_DREAM_MIRROR_JOY,62393472} -s.listed_series={0x131} - +s.listed_series={SET_DREAM_MIRROR} function s.acon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end - return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSetCard(0x131) + return re:IsMonsterEffect() and re:GetHandler():IsSetCard(SET_DREAM_MIRROR) end function s.aop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() @@ -44,20 +42,15 @@ function s.aop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetCode(EFFECT_DIRECT_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end function s.sscond(c) return c:IsFaceup() and c:IsCode(CARD_DREAM_MIRROR_JOY) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) - local ph=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(s.sscond,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil,tp) - and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) -end -function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsReleasable() end - Duel.Release(e:GetHandler(),REASON_COST) + and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.spfilter(c,e,tp) return c:IsCode(62393472) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) diff --git a/official/c99795159.lua b/official/c99795159.lua index 0693b3e263..bc8c4c3f51 100644 --- a/official/c99795159.lua +++ b/official/c99795159.lua @@ -37,7 +37,7 @@ function s.initial_effect(c) e5:SetValue(s.damval) c:RegisterEffect(e5) end -s.listed_series={0x8d} +s.listed_series={SET_GHOSTRICK} function s.dirtg(e,c) return not Duel.IsExistingMatchingCard(Card.IsFaceup,c:GetControler(),0,LOCATION_MZONE,1,nil) end @@ -49,6 +49,6 @@ function s.val(e,re,dam,r,rp,rc) end end function s.damval(e,rc) - if rc:IsSetCard(0x8d) then return -1 end + if rc:IsSetCard(SET_GHOSTRICK) then return -1 end return HALF_DAMAGE -end +end \ No newline at end of file diff --git a/official/c99801464.lua b/official/c99801464.lua index 6a1b145324..e6489987f0 100644 --- a/official/c99801464.lua +++ b/official/c99801464.lua @@ -13,7 +13,7 @@ function s.initial_effect(c) e1:SetRange(LOCATION_HAND|LOCATION_MZONE) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMINGS_CHECK_MONSTER_E) e1:SetCountLimit(1,id) - e1:SetCondition(function() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() end) + e1:SetCondition(aux.StatChangeDamageStepCondition) e1:SetTarget(s.eqtg) e1:SetOperation(s.eqop) c:RegisterEffect(e1) diff --git a/official/c99861526.lua b/official/c99861526.lua index b6aad6cfd7..a627d594f3 100644 --- a/official/c99861526.lua +++ b/official/c99861526.lua @@ -45,4 +45,4 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) if e:GetHandler():IsRelateToEffect(e) then Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) end -end +end \ No newline at end of file diff --git a/official/c99865167.lua b/official/c99865167.lua index b94069a2b4..e9815fad28 100644 --- a/official/c99865167.lua +++ b/official/c99865167.lua @@ -1,4 +1,5 @@ --ウィンドフレーム +--Wind Effigy local s,id=GetID() function s.initial_effect(c) --double tribute @@ -10,4 +11,4 @@ function s.initial_effect(c) end function s.condition(e,c) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_NORMAL) -end +end \ No newline at end of file diff --git a/official/c99877698.lua b/official/c99877698.lua index d7aa831111..c64605a5d4 100644 --- a/official/c99877698.lua +++ b/official/c99877698.lua @@ -1,4 +1,5 @@ --墓守の大筒持ち +--Gravekeeper's Cannonholder local s,id=GetID() function s.initial_effect(c) --damage @@ -13,9 +14,9 @@ function s.initial_effect(c) e1:SetOperation(s.operation) c:RegisterEffect(e1) end -s.listed_series={0x2e} +s.listed_series={SET_GRAVEKEEPERS} function s.costfilter(c) - return c:IsSetCard(0x2e) and c:GetCode()~=id + return c:IsSetCard(SET_GRAVEKEEPERS) and c:GetCode()~=id end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil) end @@ -31,4 +32,4 @@ end function s.operation(e,tp,eg,ep,ev,re,r,rp,chk) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) -end +end \ No newline at end of file diff --git a/official/c99885917.lua b/official/c99885917.lua index 21a4d04004..64388dcc1b 100644 --- a/official/c99885917.lua +++ b/official/c99885917.lua @@ -1,5 +1,5 @@ --海晶乙女パスカルス ---Marincess Pascals +--Marincess Pascalus --Scripted by Hel local s,id=GetID() function s.initial_effect(c) @@ -26,15 +26,15 @@ function s.initial_effect(c) e3:SetRange(LOCATION_GRAVE) e3:SetCountLimit(1,{id,1}) e3:SetCondition(aux.exccon) - e3:SetCost(aux.bfgcost) + e3:SetCost(Cost.SelfBanish) e3:SetTarget(s.thtg) e3:SetOperation(s.thop) c:RegisterEffect(e3) end s.listed_names={id} -s.listed_series={0x12b} +s.listed_series={SET_MARINCESS} function s.filter(c,e,tp) - return c:IsSetCard(0x12b) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_MARINCESS) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -50,7 +50,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.thfilter(c) - return c:IsSetCard(0x12b) and c:IsSpellTrap() and c:IsAbleToHand() + return c:IsSetCard(SET_MARINCESS) and c:IsSpellTrap() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -64,5 +64,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end - +end \ No newline at end of file diff --git a/official/c99890852.lua b/official/c99890852.lua index 8844e35659..dbdb6bc805 100644 --- a/official/c99890852.lua +++ b/official/c99890852.lua @@ -15,9 +15,9 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0xfb} +s.listed_series={SET_TRICKSTAR} function s.filter(c,tp) - return c:IsFaceup() and c:IsSetCard(0xfb) and not c:IsType(TYPE_FUSION|TYPE_SYNCHRO|TYPE_TOKEN|TYPE_XYZ|TYPE_LINK) + return c:IsFaceup() and c:IsSetCard(SET_TRICKSTAR) and not c:IsType(TYPE_FUSION|TYPE_SYNCHRO|TYPE_TOKEN|TYPE_XYZ|TYPE_LINK) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -44,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/official/c9989792.lua b/official/c9989792.lua index a00c5621de..830b308c56 100644 --- a/official/c9989792.lua +++ b/official/c9989792.lua @@ -1,4 +1,5 @@ --トラミッド・フォートレス +--Triamid Fortress local s,id=GetID() function s.initial_effect(c) --Activate @@ -21,7 +22,7 @@ function s.initial_effect(c) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetRange(LOCATION_FZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) - e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xe2)) + e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TRIAMID)) e3:SetValue(1) c:RegisterEffect(e3) --to hand @@ -37,13 +38,13 @@ function s.initial_effect(c) e4:SetOperation(s.thop) c:RegisterEffect(e4) end -s.listed_series={0xe2} +s.listed_series={SET_TRIAMID} function s.thcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsPreviousLocation(LOCATION_FZONE) and c:IsPreviousPosition(POS_FACEUP) end function s.thfilter(c) - return c:IsSetCard(0xe2) and c:IsMonster() and c:IsAbleToHand() + return c:IsSetCard(SET_TRIAMID) and c:IsMonster() and c:IsAbleToHand() end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end @@ -57,4 +58,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99899504.lua b/official/c99899504.lua index 806dfbc527..45b892d91f 100644 --- a/official/c99899504.lua +++ b/official/c99899504.lua @@ -42,12 +42,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_BP) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,2)) - e2:SetReset(RESET_PHASE+PHASE_END) + e2:SetReset(RESET_PHASE|PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end @@ -79,7 +79,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_DRAW_COUNT) e1:SetTargetRange(1,0) - e1:SetReset(RESET_PHASE+PHASE_DRAW) + e1:SetReset(RESET_PHASE|PHASE_DRAW) e1:SetValue(0) Duel.RegisterEffect(e1,tp) else e:SetLabel(0) end @@ -90,4 +90,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end -end +end \ No newline at end of file diff --git a/official/c99902789.lua b/official/c99902789.lua index b262b1271b..2fe357c71b 100644 --- a/official/c99902789.lua +++ b/official/c99902789.lua @@ -10,7 +10,7 @@ function s.initial_effect(c) e1:SetCode(EVENT_CHAINING) e1:SetRange(LOCATION_HAND) e1:SetCondition(s.discon) - e1:SetCost(s.discost) + e1:SetCost(Cost.SelfDiscard) e1:SetTarget(s.distg) e1:SetOperation(s.disop) c:RegisterEffect(e1) @@ -20,10 +20,6 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) return Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetAttacker():IsControler(tp) and Duel.GetAttackTarget()~=nil and ep==1-tp and re:GetActiveType()==TYPE_TRAP and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) end -function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return e:GetHandler():IsDiscardable() end - Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) -end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) @@ -35,4 +31,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99910751.lua b/official/c99910751.lua index af63610cd7..476502a377 100644 --- a/official/c99910751.lua +++ b/official/c99910751.lua @@ -1,5 +1,5 @@ --はぐれ・もけもけ ---Stray Mokey Mokey +--Mokey Mokey Adrift --scripted by pyrQ local s,id=GetID() function s.initial_effect(c) @@ -8,7 +8,7 @@ function s.initial_effect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_ADD_TYPE) - e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e1:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e1:SetValue(TYPE_NORMAL) c:RegisterEffect(e1) local e2=e1:Clone() @@ -20,7 +20,7 @@ function s.initial_effect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetCode(EFFECT_CHANGE_CODE) - e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e3:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e3:SetValue(27288416) c:RegisterEffect(e3) --Search 1 "Mokey Mokey" card @@ -29,20 +29,15 @@ function s.initial_effect(c) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_HAND) - e4:SetCost(s.thcost) + e4:SetCost(Cost.SelfDiscard) e4:SetTarget(s.thtg) e4:SetOperation(s.thop) c:RegisterEffect(e4) end s.listed_names={27288416,id} -s.listed_series={0x184} -function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) - local c=e:GetHandler() - if chk==0 then return c:IsDiscardable() end - Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) -end +s.listed_series={SET_MOKEY_MOKEY} function s.thfilter(c) - return c:IsSetCard(0x184) and c:IsAbleToHand() and not c:IsCode(id) + return c:IsSetCard(SET_MOKEY_MOKEY) and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end diff --git a/official/c99913726.lua b/official/c99913726.lua index d5510c1c3b..a2bb01253e 100644 --- a/official/c99913726.lua +++ b/official/c99913726.lua @@ -6,7 +6,7 @@ function s.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) - e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) + e1:SetRange(LOCATION_HAND|LOCATION_GRAVE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) e1:SetCondition(s.hspcon) @@ -20,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) - e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) + e2:SetRange(LOCATION_MZONE|LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCost(s.atkcost) e2:SetTarget(s.atktg) @@ -28,7 +28,7 @@ function s.initial_effect(c) c:RegisterEffect(e2) end s.counter_list={COUNTER_PREDATOR} -s.listed_series={0x10f3} +s.listed_series={SET_PREDAPLANT} function s.hspfilter(c,ft,tp) return c:GetCounter(COUNTER_PREDATOR)>0 and c:IsReleasable() and (ft>0 or (c:GetSequence()<5 and c:IsControler(tp))) and (c:IsFaceup() or c:IsControler(tp)) end @@ -64,13 +64,13 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) g:DeleteGroup() end function s.atkcfil(c) - return c:IsSetCard(0x10f3) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) + return c:IsSetCard(SET_PREDAPLANT) and c:IsMonster() and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) and Duel.IsExistingTarget(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,1,c) end function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) - if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfil,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler()) end + if chk==0 then return Duel.IsExistingMatchingCard(s.atkcfil,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.atkcfil,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler()) + local g=Duel.SelectMatchingCard(tp,s.atkcfil,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -86,7 +86,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-500) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) tc:RegisterEffect(e1) end end \ No newline at end of file diff --git a/official/c99916754.lua b/official/c99916754.lua index aef4029f99..6fb010ab2f 100644 --- a/official/c99916754.lua +++ b/official/c99916754.lua @@ -21,7 +21,7 @@ function s.initial_effect(c) aux.DoubleSnareValidity(c,LOCATION_MZONE) end s.miracle_synchro_fusion=true -s.material_setcode=0x2a +s.material_setcode=SET_NATURIA function s.discon(e,tp,eg,ep,ev,re,r,rp) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) @@ -31,9 +31,9 @@ function s.rmfilter(c) end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) - and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end + and Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) - local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) + local g=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.DiscardDeck(tp,1,REASON_COST) end @@ -50,4 +50,4 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end -end +end \ No newline at end of file diff --git a/official/c99927991.lua b/official/c99927991.lua index 7544038767..f4c24820f6 100644 --- a/official/c99927991.lua +++ b/official/c99927991.lua @@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH+EFFECT_FLAG_CLIENT_HINT) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) - e1:SetReset(RESET_PHASE+PHASE_END) + e1:SetReset(RESET_PHASE|PHASE_END) Duel.RegisterEffect(e1,tp) local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_ROCK),tp,LOCATION_MZONE,0,nil)+5 if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end @@ -72,8 +72,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) end end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 - or Duel.GetCurrentPhase()==PHASE_MAIN2) + return Duel.IsTurnPlayer(1-tp) and Duel.IsMainPhase() end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() @@ -91,5 +90,4 @@ function s.scop(e,tp,eg,ep,ev,re,r,rp) local sg=g:Select(tp,1,1,nil) Duel.SynchroSummon(tp,sg:GetFirst(),c) end -end - +end \ No newline at end of file diff --git a/official/c99940363.lua b/official/c99940363.lua index edfea590dc..afed7c6878 100644 --- a/official/c99940363.lua +++ b/official/c99940363.lua @@ -1,4 +1,5 @@ --帝王の凍気 +--Frost Blast of the Monarchs local s,id=GetID() function s.initial_effect(c) --Activate @@ -24,7 +25,7 @@ function s.initial_effect(c) e2:SetOperation(s.operation) c:RegisterEffect(e2) end -s.listed_series={0xbe} +s.listed_series={SET_MONARCH} function s.mfilter(c) return c:IsFaceup() and c:IsAttackAbove(2400) and c:GetDefense()==1000 end @@ -48,7 +49,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) end end function s.cfilter(c) - return c:IsSetCard(0xbe) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() + return c:IsSetCard(SET_MONARCH) and c:IsSpellTrap() and c:IsAbleToRemoveAsCost() end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() @@ -57,4 +58,4 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) g:AddCard(e:GetHandler()) Duel.Remove(g,POS_FACEUP,REASON_COST) -end +end \ No newline at end of file diff --git a/official/c99946920.lua b/official/c99946920.lua index 43008ebea2..021238ef31 100644 --- a/official/c99946920.lua +++ b/official/c99946920.lua @@ -1,4 +1,5 @@ --魔竜星-トウテツ +--Taotie, Shadow of the Yang Zing local s,id=GetID() function s.initial_effect(c) --spsummon @@ -19,7 +20,7 @@ function s.initial_effect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) - e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) + e2:SetHintTiming(0,TIMING_BATTLE_START|TIMING_BATTLE_END) e2:SetCountLimit(1) e2:SetCondition(s.sccon) e2:SetTarget(s.sctg) @@ -34,15 +35,15 @@ function s.initial_effect(c) e3:SetOperation(s.atkop) c:RegisterEffect(e3) end -s.listed_series={0x9e} +s.listed_series={SET_YANG_ZING} s.listed_names={id} function s.condition(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) + return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) end function s.filter(c,e,tp) - return c:IsSetCard(0x9e) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) + return c:IsSetCard(SET_YANG_ZING) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 @@ -56,19 +57,17 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end function s.sccon(e,tp,eg,ep,ev,re,r,rp) - if Duel.GetTurnPlayer()==tp then return false end - local ph=Duel.GetCurrentPhase() - return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 + return Duel.IsTurnPlayer(1-tp) and (Duel.IsMainPhase() or Duel.IsBattlePhase()) end function s.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9e),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_YANG_ZING),tp,LOCATION_MZONE,0,nil) return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.scop(e,tp,eg,ep,ev,re,r,rp) - local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,0x9e),tp,LOCATION_MZONE,0,nil) + local mg=Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_YANG_ZING),tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg) if #g>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) @@ -87,6 +86,6 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_CHANGE_CONTROL) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) rc:RegisterEffect(e1) -end +end \ No newline at end of file diff --git a/official/c9995766.lua b/official/c9995766.lua index 24d3ba6459..ae34b8351f 100644 --- a/official/c9995766.lua +++ b/official/c9995766.lua @@ -1,5 +1,5 @@ --宮廷のしきたり ---Imperial Custom, OCG +--Imperial Custom local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) @@ -19,8 +19,8 @@ function s.initial_effect(c) c:RegisterEffect(e2) end function s.infilter(e,c) - return (c:GetType()&0x20004)==0x20004 and c:GetCode()~=id + return c:IsContinuousTrap() and c:GetCode()~=id end function s.indesval(e,re,r,rp) return (r&REASON_EFFECT+REASON_BATTLE)~=0 -end +end \ No newline at end of file diff --git a/official/c99984170.lua b/official/c99984170.lua index 012ad97efc..9151ffb729 100644 --- a/official/c99984170.lua +++ b/official/c99984170.lua @@ -16,10 +16,10 @@ function s.initial_effect(c) e1:SetOperation(s.activate) c:RegisterEffect(e1) end -s.listed_series={0x18c} +s.listed_series={SET_RESCUE_ACE} s.listed_names={CARD_R_ACE_HYDRANT} function s.spfilter(c,e,tp) - return (c:IsSetCard(0x18c) or c:IsControler(1-tp)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) + return (c:IsSetCard(SET_RESCUE_ACE) or c:IsControler(1-tp)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local hydrant_chk=Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsCode,CARD_R_ACE_HYDRANT),tp,LOCATION_ONFIELD,0,1,nil) diff --git a/official/c99989863.lua b/official/c99989863.lua index 20fdefaee7..ed99182678 100644 --- a/official/c99989863.lua +++ b/official/c99989863.lua @@ -25,7 +25,7 @@ function s.initial_effect(c) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,{id,1}) e2:SetCondition(function(e,tp,eg) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end) - e2:SetCost(aux.SelfBanishCost) + e2:SetCost(Cost.SelfBanish) e2:SetTarget(s.tgtg) e2:SetOperation(s.tgop) c:RegisterEffect(e2) diff --git a/official/c99991455.lua b/official/c99991455.lua index 22fc596220..f25816f426 100644 --- a/official/c99991455.lua +++ b/official/c99991455.lua @@ -38,7 +38,7 @@ function s.damcon(e) end function s.regop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() - if c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsReason(REASON_DESTROY) then + if c:IsReason(REASON_BATTLE|REASON_EFFECT) and c:IsReason(REASON_DESTROY) then --Special Summon 2 Level 7 or lower Warrior monsters from your GY local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) @@ -50,7 +50,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp) e1:SetCountLimit(1,{id,1}) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) - e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetReset(RESETS_STANDARD_PHASE_END) c:RegisterEffect(e1) end end diff --git a/official/c9999961.lua b/official/c9999961.lua index d2da9c06f3..7524c4edca 100644 --- a/official/c9999961.lua +++ b/official/c9999961.lua @@ -1,4 +1,5 @@ --ビーストレイジ +--Beast Rage local s,id=GetID() function s.initial_effect(c) --Activate @@ -12,19 +13,19 @@ function s.initial_effect(c) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) - and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST+RACE_WINGEDBEAST),tp,LOCATION_REMOVED,0,1,nil) end + and Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsRace,RACE_BEAST|RACE_WINGEDBEAST),tp,LOCATION_REMOVED,0,1,nil) end end function s.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) - local atk=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_BEAST+RACE_WINGEDBEAST),tp,LOCATION_REMOVED,0,nil)*200 + local atk=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsRace,RACE_BEAST|RACE_WINGEDBEAST),tp,LOCATION_REMOVED,0,nil)*200 if #g==0 or atk==0 then return end local tc=g:GetFirst() for tc in aux.Next(g) do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) - e1:SetReset(RESET_EVENT+RESETS_STANDARD) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) e1:SetValue(atk) tc:RegisterEffect(e1) end -end +end \ No newline at end of file diff --git a/proc_workaround.lua b/proc_workaround.lua index 5dc3ee99ac..049661dee3 100644 --- a/proc_workaround.lua +++ b/proc_workaround.lua @@ -1,54 +1,5 @@ --Utilities to be added to the core ---[[ - A monster that is temporarily banished shouldn't be treated as a monster that was Normal, Flip, or Special Summoned that turn, or as a monster that has already changed its battle position, after it returns to the field. - Manually sets the relevant statuses to "false" before returning the monster to the field. ---]] -Duel.ReturnToField=(function() - local oldfunc=Duel.ReturnToField - return function(card,pos,zone,...) - if not card:IsReason(REASON_TEMPORARY) then return false end - card:SetStatus(STATUS_FORM_CHANGED,false) - card:SetStatus(STATUS_SUMMON_TURN,false) - card:SetStatus(STATUS_FLIP_SUMMON_TURN,false) - card:SetStatus(STATUS_SPSUMMON_TURN,false) - pos=pos or card:GetPreviousPosition() - zone=zone or 0xff - return oldfunc(card,pos,zone,...) - end -end)() - ---[[ - Places a hint that says "Added to the hand by a currently resolving effect" (string 225) on any cards added to the hand for the duration of that Chain's/effect's resolution. - Used to differentiate which card(s) were just added to the hand and which ones were already there for cases of multiple copies of the same card being present. - The card ID used for the flag effect (30336082) belongs to "Brimming Sangen Manor", the card that initially needed this workaround. ---]] -Duel.SendtoHand=(function() - local oldfunc=Duel.SendtoHand - return function(card_or_group,dest_player,reason,reason_player,...) - local res=oldfunc(card_or_group,dest_player,reason,reason_player,...) - if res==0 then return res end - if type(card_or_group)=="Group" then - local hand_group=card_or_group:Filter(Card.IsLocation,nil,LOCATION_HAND) - for tc in hand_group:Iter() do - tc:RegisterFlagEffect(30336082,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,225) - end - elseif type(card_or_group)=="Card" and card_or_group:IsLocation(LOCATION_HAND) then - card_or_group:RegisterFlagEffect(30336082,RESET_EVENT|RESETS_STANDARD|RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,225) - end - return res - end -end)() - ---Use the "selected" string by default. Pass "false" as the boolean to use the "targeted" string instead. -Duel.HintSelection=(function() - local oldfunc=Duel.HintSelection - return function(card_or_group,log_as_selection,...) - if log_as_selection==nil then log_as_selection=true end - return oldfunc(card_or_group,log_as_selection,...) - end -end)() - --[[ If called while an effect isn't resolving (e.g. a regular Xyz Summon or through an effect like "Wonder Xyz") then proceed as usual with the attaching. If called while an effect is resolving treat it as attaching by card effect and handle the relevant rulings. @@ -74,18 +25,6 @@ Duel.Overlay=(function() end)() --]] ---Remove counter from only 1 card if it is the only card with counter -local p_rem=Duel.RemoveCounter -function Duel.RemoveCounter(tp,s,o,counter,...) - local ex_params={...} - local s,o=s>0 and LOCATION_ONFIELD or 0,o>0 and LOCATION_ONFIELD or 0 - local cg=Duel.GetFieldGroup(tp,s,o):Match(function(c) return c:GetCounter(counter)>0 end,nil) - if #cg==1 then - return cg:GetFirst():RemoveCounter(tp,counter,table.unpack(ex_params)) - end - return p_rem(tp,s,o,counter,table.unpack(ex_params)) -end - function Auxiliary.ReleaseNonSumCheck(c,tp,e) if c:IsControler(tp) then return false end local chk=false